@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.
@@ -65652,7 +65652,13 @@ export interface BrainCognitionDigestInput {
65652
65652
  }
65653
65653
 
65654
65654
  export interface BrainCognitionDigestOutput {
65655
+ /**
65656
+ * 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.
65657
+ */
65655
65658
  run_id: string
65659
+ /**
65660
+ * Always true — the run was queued. The call fails outright rather than reporting a false here.
65661
+ */
65656
65662
  accepted: true
65657
65663
  }
65658
65664
 
@@ -65691,7 +65697,13 @@ export interface BrainCognitionSweepInput {
65691
65697
  }
65692
65698
 
65693
65699
  export interface BrainCognitionSweepOutput {
65700
+ /**
65701
+ * 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.
65702
+ */
65694
65703
  run_id: string
65704
+ /**
65705
+ * Always true — the run was queued. The call fails outright rather than reporting a false here.
65706
+ */
65695
65707
  accepted: true
65696
65708
  }
65697
65709
 
@@ -65729,6 +65741,9 @@ defaultBranch: string
65729
65741
  }[]
65730
65742
 
65731
65743
  export interface BrainDaemonBatchStatusInput {
65744
+ /**
65745
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
65746
+ */
65732
65747
  id: string
65733
65748
  }
65734
65749
 
@@ -65816,6 +65831,9 @@ unmeasuredCount: number
65816
65831
  }
65817
65832
 
65818
65833
  export interface BrainDaemonGetInput {
65834
+ /**
65835
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
65836
+ */
65819
65837
  id: string
65820
65838
  }
65821
65839
 
@@ -65841,8 +65859,13 @@ unmeasuredCount: number
65841
65859
  }
65842
65860
 
65843
65861
  export interface BrainDaemonReingestInput {
65862
+ /**
65863
+ * Id of the ingestion daemon that owns these documents, as returned by brain_daemons_list
65864
+ */
65844
65865
  id: string
65845
65866
  /**
65867
+ * 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.
65868
+ *
65846
65869
  * @minItems 1
65847
65870
  * @maxItems 100
65848
65871
  */
@@ -65850,14 +65873,36 @@ paths: [string, ...(string)[]]
65850
65873
  }
65851
65874
 
65852
65875
  export interface BrainDaemonReingestOutput {
65876
+ /**
65877
+ * 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).
65878
+ */
65879
+ runId: (string | null)
65880
+ /**
65881
+ * Paths whose ingest state was cleared, so the next run will read them again from scratch
65882
+ */
65853
65883
  cleared: string[]
65884
+ /**
65885
+ * Paths this daemon has no ingest record for — usually a typo, or a document it never ingested
65886
+ */
65854
65887
  notFound: string[]
65888
+ /**
65889
+ * 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
65890
+ */
65855
65891
  triggered: boolean
65892
+ /**
65893
+ * Why no run was started; absent when one was
65894
+ */
65856
65895
  triggerError?: string
65896
+ /**
65897
+ * Paths left alone because they are in an unfinished batch; re-ask once that run has finished
65898
+ */
65857
65899
  skippedPending: string[]
65858
65900
  }
65859
65901
 
65860
65902
  export interface BrainDaemonRemoveInput {
65903
+ /**
65904
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
65905
+ */
65861
65906
  id: string
65862
65907
  }
65863
65908
 
@@ -65866,32 +65911,107 @@ ok: true
65866
65911
  }
65867
65912
 
65868
65913
  export interface BrainDaemonRunInput {
65914
+ /**
65915
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
65916
+ */
65869
65917
  id: string
65870
65918
  }
65871
65919
 
65872
65920
  export interface BrainDaemonRunOutput {
65921
+ /**
65922
+ * True once the run has finished, whether it succeeded or failed
65923
+ */
65873
65924
  done: boolean
65925
+ /**
65926
+ * Id of the run being reported; null when this daemon has never run
65927
+ */
65874
65928
  runId: (string | null)
65929
+ /**
65930
+ * Where the run stands: 'queued' waiting to start, 'running' in progress, 'done' finished, 'failed' gave up, 'none' this daemon has never run
65931
+ */
65875
65932
  status: ("queued" | "running" | "done" | "failed" | "none")
65933
+ /**
65934
+ * 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
65935
+ */
65876
65936
  sources: unknown[]
65937
+ /**
65938
+ * Document counts for the run; null when nothing has been counted yet
65939
+ */
65877
65940
  progress: ({
65878
- counts: BrainDaemonRunOutputCounts
65879
- byCategory: {
65880
- [k: string]: BrainDaemonRunOutputCounts
65881
- }
65882
- } | null)
65883
- routedTo: ("realtime" | "batch")
65884
- triggered: boolean
65885
- triggerError?: string
65941
+ /**
65942
+ * Totals for the whole run
65943
+ */
65944
+ counts: {
65945
+ /**
65946
+ * Documents that failed after retries — transient failures, worth re-running
65947
+ */
65948
+ error: number
65949
+ /**
65950
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
65951
+ */
65952
+ denied: number
65953
+ /**
65954
+ * Of those, how many were downloaded
65955
+ */
65956
+ fetched: number
65957
+ /**
65958
+ * Of those, how many became memories
65959
+ */
65960
+ ingested: number
65961
+ /**
65962
+ * Documents the run found at the source
65963
+ */
65964
+ discovered: number
65965
+ /**
65966
+ * Documents skipped because their content had not changed since the last run
65967
+ */
65968
+ skippedUnchanged: number
65886
65969
  }
65887
- export interface BrainDaemonRunOutputCounts {
65970
+ /**
65971
+ * 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)
65972
+ */
65973
+ byCategory: {
65974
+ [k: string]: {
65975
+ /**
65976
+ * Documents that failed after retries — transient failures, worth re-running
65977
+ */
65888
65978
  error: number
65979
+ /**
65980
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
65981
+ */
65889
65982
  denied: number
65983
+ /**
65984
+ * Of those, how many were downloaded
65985
+ */
65890
65986
  fetched: number
65987
+ /**
65988
+ * Of those, how many became memories
65989
+ */
65891
65990
  ingested: number
65991
+ /**
65992
+ * Documents the run found at the source
65993
+ */
65892
65994
  discovered: number
65995
+ /**
65996
+ * Documents skipped because their content had not changed since the last run
65997
+ */
65893
65998
  skippedUnchanged: number
65894
65999
  }
66000
+ }
66001
+ } | null)
66002
+ /**
66003
+ * Which lane the run went to: 'realtime' finishes in minutes, 'batch' queues the work with the model provider and can take hours
66004
+ */
66005
+ routedTo: ("realtime" | "batch")
66006
+ /**
66007
+ * True when this call actually started a run; false when one was already in flight and nothing new was started
66008
+ */
66009
+ triggered: boolean
66010
+ /**
66011
+ * Why the run could not be started; absent when it was started
66012
+ */
66013
+ triggerError?: string
66014
+ }
65895
66015
 
65896
66016
  export interface BrainDaemonRunItemsInput {
65897
66017
  limit?: number
@@ -65911,68 +66031,212 @@ sourceKind: string
65911
66031
  }[]
65912
66032
  runId: string
65913
66033
  counts: {
66034
+ /**
66035
+ * Documents that failed after retries — transient failures, worth re-running
66036
+ */
65914
66037
  error: number
66038
+ /**
66039
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
66040
+ */
65915
66041
  denied: number
66042
+ /**
66043
+ * Of those, how many were downloaded
66044
+ */
65916
66045
  fetched: number
66046
+ /**
66047
+ * Of those, how many became memories
66048
+ */
65917
66049
  ingested: number
66050
+ /**
66051
+ * Documents the run found at the source
66052
+ */
65918
66053
  discovered: number
66054
+ /**
66055
+ * Documents skipped because their content had not changed since the last run
66056
+ */
65919
66057
  skippedUnchanged: number
65920
66058
  }
65921
66059
  nextCursor: (string | null)
65922
66060
  }
65923
66061
 
65924
66062
  export interface BrainDaemonRunsInput {
66063
+ /**
66064
+ * Id of the ingestion daemon whose run history to read, as returned by brain_daemons_list
66065
+ */
65925
66066
  id: string
66067
+ /**
66068
+ * How many of the most recent runs to return (default 20, max 100)
66069
+ */
65926
66070
  limit?: number
65927
66071
  }
65928
66072
 
65929
66073
  export interface BrainDaemonRunsOutput {
66074
+ /**
66075
+ * The most recent runs, newest first
66076
+ */
65930
66077
  runs: {
66078
+ /**
66079
+ * 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
66080
+ */
65931
66081
  lane: ("realtime" | "batch" | "reclaimed")
66082
+ /**
66083
+ * Id of this run
66084
+ */
65932
66085
  runId: string
66086
+ /**
66087
+ * Document counts for this run
66088
+ */
65933
66089
  counts: {
66090
+ /**
66091
+ * Documents that failed after retries — transient failures, worth re-running
66092
+ */
65934
66093
  error: number
66094
+ /**
66095
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
66096
+ */
65935
66097
  denied: number
66098
+ /**
66099
+ * Of those, how many were downloaded
66100
+ */
65936
66101
  fetched: number
66102
+ /**
66103
+ * Of those, how many became memories
66104
+ */
65937
66105
  ingested: number
66106
+ /**
66107
+ * Documents the run found at the source
66108
+ */
65938
66109
  discovered: number
66110
+ /**
66111
+ * Documents skipped because their content had not changed since the last run
66112
+ */
65939
66113
  skippedUnchanged: number
65940
66114
  }
66115
+ /**
66116
+ * Where the run ended up — 'queued', 'running', 'done' or 'failed'
66117
+ */
65941
66118
  status: string
66119
+ /**
66120
+ * How a batch run finished, in the batch pipeline's own words (e.g. finalized, timeout, crash); null for a realtime run
66121
+ */
65942
66122
  outcome: (string | null)
66123
+ /**
66124
+ * When the run started, ISO 8601 timestamp
66125
+ */
65943
66126
  startedAt: string
66127
+ /**
66128
+ * Documents that failed after retries during this run
66129
+ */
65944
66130
  errorCount: number
66131
+ /**
66132
+ * When the run finished, ISO 8601 timestamp; null while it is still going
66133
+ */
65945
66134
  finishedAt: (string | null)
66135
+ /**
66136
+ * Documents the source permanently refused during this run
66137
+ */
65946
66138
  deniedCount: number
66139
+ /**
66140
+ * 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
66141
+ */
65947
66142
  degradedCount: (number | null)
65948
66143
  }[]
66144
+ /**
66145
+ * Id of the daemon these runs belong to
66146
+ */
65949
66147
  daemonId: string
65950
66148
  }
65951
66149
 
65952
66150
  export interface BrainDaemonStatusInput {
66151
+ /**
66152
+ * Id of the ingestion daemon to act on, as returned by brain_daemons_list
66153
+ */
65953
66154
  id: string
65954
66155
  }
65955
66156
 
65956
66157
  export interface BrainDaemonStatusOutput {
66158
+ /**
66159
+ * True once the run has finished, whether it succeeded or failed
66160
+ */
65957
66161
  done: boolean
66162
+ /**
66163
+ * Id of the run being reported; null when this daemon has never run
66164
+ */
65958
66165
  runId: (string | null)
66166
+ /**
66167
+ * Where the run stands: 'queued' waiting to start, 'running' in progress, 'done' finished, 'failed' gave up, 'none' this daemon has never run
66168
+ */
65959
66169
  status: ("queued" | "running" | "done" | "failed" | "none")
66170
+ /**
66171
+ * 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
66172
+ */
65960
66173
  sources: unknown[]
66174
+ /**
66175
+ * Document counts for the run; null when nothing has been counted yet
66176
+ */
65961
66177
  progress: ({
65962
- counts: BrainDaemonStatusOutputCounts
65963
- byCategory: {
65964
- [k: string]: BrainDaemonStatusOutputCounts
65965
- }
65966
- } | null)
66178
+ /**
66179
+ * Totals for the whole run
66180
+ */
66181
+ counts: {
66182
+ /**
66183
+ * Documents that failed after retries — transient failures, worth re-running
66184
+ */
66185
+ error: number
66186
+ /**
66187
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
66188
+ */
66189
+ denied: number
66190
+ /**
66191
+ * Of those, how many were downloaded
66192
+ */
66193
+ fetched: number
66194
+ /**
66195
+ * Of those, how many became memories
66196
+ */
66197
+ ingested: number
66198
+ /**
66199
+ * Documents the run found at the source
66200
+ */
66201
+ discovered: number
66202
+ /**
66203
+ * Documents skipped because their content had not changed since the last run
66204
+ */
66205
+ skippedUnchanged: number
65967
66206
  }
65968
- export interface BrainDaemonStatusOutputCounts {
66207
+ /**
66208
+ * 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)
66209
+ */
66210
+ byCategory: {
66211
+ [k: string]: {
66212
+ /**
66213
+ * Documents that failed after retries — transient failures, worth re-running
66214
+ */
65969
66215
  error: number
66216
+ /**
66217
+ * Documents the source permanently refused (403/404/401) — a permissions or deletion problem, not a transient one
66218
+ */
65970
66219
  denied: number
66220
+ /**
66221
+ * Of those, how many were downloaded
66222
+ */
65971
66223
  fetched: number
66224
+ /**
66225
+ * Of those, how many became memories
66226
+ */
65972
66227
  ingested: number
66228
+ /**
66229
+ * Documents the run found at the source
66230
+ */
65973
66231
  discovered: number
66232
+ /**
66233
+ * Documents skipped because their content had not changed since the last run
66234
+ */
65974
66235
  skippedUnchanged: number
65975
66236
  }
66237
+ }
66238
+ } | null)
66239
+ }
65976
66240
 
65977
66241
  export interface BrainDaemonUpdateInput {
65978
66242
  id: string
@@ -66068,46 +66332,121 @@ entity_ref: string
66068
66332
  }
66069
66333
 
66070
66334
  export interface BrainKnowledgeEntityMemoriesOutput {
66335
+ /**
66336
+ * How many memories back this entity in total, across all pages
66337
+ */
66071
66338
  total: number
66339
+ /**
66340
+ * The entity the memories belong to; null when `entity_ref` matched nothing
66341
+ */
66072
66342
  entity: ({
66343
+ /**
66344
+ * How closely this entity matches the query, higher is closer; absent on an unscored read such as a plain type filter
66345
+ */
66073
66346
  score?: number
66347
+ /**
66348
+ * Other names the same entity appears under in the ingested text
66349
+ */
66074
66350
  aliases: string[]
66351
+ /**
66352
+ * Id of this entity; pass it as `entity_ref` to brain_knowledge_neighborhood or brain_knowledge_entity_memories
66353
+ */
66075
66354
  entity_id: string
66355
+ /**
66356
+ * What the entity is, as the engine summarised it from the memories mentioning it; null when it has not written one
66357
+ */
66076
66358
  description: (string | null)
66359
+ /**
66360
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
66361
+ */
66077
66362
  entity_type: string
66363
+ /**
66364
+ * The name to show a person — usually the spelling the source text used
66365
+ */
66078
66366
  display_name: string
66367
+ /**
66368
+ * The one name this entity is stored under; use it when matching entities against each other
66369
+ */
66079
66370
  canonical_name: string
66371
+ /**
66372
+ * How many memories mention this entity — a rough measure of how well attested it is
66373
+ */
66080
66374
  evidence_count: number
66081
66375
  } | null)
66376
+ /**
66377
+ * One page of the memories this entity was drawn from — the same shape brain_memory_list returns
66378
+ */
66082
66379
  memories: {
66083
66380
  /**
66084
66381
  * Consumer-facing label derived from the layer; 'unknown' for an unrecognised layer
66085
66382
  */
66086
66383
  kind: ("schema" | "intention" | "identity" | "basic" | "fact" | "summary" | "knowledge" | "raw" | "unknown")
66384
+ /**
66385
+ * Engine tags on this memory; empty when it carries none
66386
+ */
66087
66387
  tags: string[]
66088
66388
  /**
66089
66389
  * Engine memory layer (l0_basic_info…l7_intention)
66090
66390
  */
66091
66391
  layer: ("l6_schema" | "l7_intention" | "l4_identity" | "l0_basic_info" | "l2_fact" | "l3_summary" | "l5_knowledge" | "l1_raw")
66392
+ /**
66393
+ * Free-form metadata, verbatim as the writer passed brain_memory_add's `metadata`; keys are the caller's
66394
+ */
66092
66395
  custom: {
66093
66396
  [k: string]: unknown
66094
66397
  }
66398
+ /**
66399
+ * Engine lifecycle status of the row — 'active' for a memory in use; superseded rows are not listed
66400
+ */
66095
66401
  status: string
66402
+ /**
66403
+ * The memory text itself
66404
+ */
66096
66405
  content: string
66406
+ /**
66407
+ * Engine user namespace the memory was written under
66408
+ */
66097
66409
  user_id: string
66410
+ /**
66411
+ * Engine agent namespace the memory was written under — the shared pool for a 'shared' write, the caller's own for a private one
66412
+ */
66098
66413
  agent_id: string
66414
+ /**
66415
+ * When the remembered EVENT happened, epoch milliseconds; null when the writer stated no time
66416
+ */
66099
66417
  memory_at: (number | null)
66418
+ /**
66419
+ * Engine id of this memory; pass it to brain_memory_get, _update or _delete
66420
+ */
66100
66421
  memory_id: string
66422
+ /**
66423
+ * The engine's own inference about this memory, or null when it recorded none
66424
+ */
66101
66425
  speculate: (string | null)
66426
+ /**
66427
+ * Engine session the memory was written in; empty when the writer opened none
66428
+ */
66102
66429
  session_id: string
66430
+ /**
66431
+ * When this memory row was written, epoch milliseconds
66432
+ */
66103
66433
  gmt_created: number
66104
66434
  /**
66105
66435
  * Source authority (highest→lowest): policy > official > team > informal
66106
66436
  */
66107
66437
  source_authority: ("policy" | "official" | "team" | "informal")
66438
+ /**
66439
+ * Id of the l1_raw memory this one was derived from; null when it was written directly
66440
+ */
66108
66441
  source_raw_memory_id: (string | null)
66109
66442
  }[]
66443
+ /**
66444
+ * How long the engine took to answer, milliseconds
66445
+ */
66110
66446
  elapsed_ms: number
66447
+ /**
66448
+ * Engine request id for this call — quote it when reporting a problem
66449
+ */
66111
66450
  request_id: string
66112
66451
  }
66113
66452
 
@@ -66123,29 +66462,92 @@ scope?: ("shared" | "private" | "both")
66123
66462
  }
66124
66463
 
66125
66464
  export interface BrainKnowledgeGraphOutput {
66465
+ /**
66466
+ * The typed relations between those entities
66467
+ */
66126
66468
  edges: {
66469
+ /**
66470
+ * Why the engine drew this edge, in its own words; null when it recorded none
66471
+ */
66127
66472
  reason: (string | null)
66473
+ /**
66474
+ * Id of the node the edge points FROM (a `nodes[].id`)
66475
+ */
66128
66476
  source: string
66477
+ /**
66478
+ * Id of the node the edge points TO (a `nodes[].id`)
66479
+ */
66129
66480
  target: string
66481
+ /**
66482
+ * True when the relation reads the same in both directions
66483
+ */
66130
66484
  symmetric: boolean
66485
+ /**
66486
+ * Ontology type of the relation, e.g. depends_on, competes_with, owns
66487
+ */
66131
66488
  relation_type: string
66132
66489
  }[]
66490
+ /**
66491
+ * The entities in the exported graph
66492
+ */
66133
66493
  nodes: {
66494
+ /**
66495
+ * Id of this entity; the `source` and `target` of an edge refer to it
66496
+ */
66134
66497
  id: string
66498
+ /**
66499
+ * How many edges touch this node — the hub concepts are the ones kept when the export is truncated
66500
+ */
66135
66501
  degree: number
66502
+ /**
66503
+ * Other names the same entity appears under in the ingested text
66504
+ */
66136
66505
  aliases: string[]
66506
+ /**
66507
+ * What the entity is, as the engine summarised it; null when it has not written one
66508
+ */
66137
66509
  description: (string | null)
66510
+ /**
66511
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
66512
+ */
66138
66513
  entity_type: string
66514
+ /**
66515
+ * The name to show a person
66516
+ */
66139
66517
  display_name: string
66518
+ /**
66519
+ * The one name this entity is stored under
66520
+ */
66140
66521
  canonical_name: string
66522
+ /**
66523
+ * How many memories mention this entity
66524
+ */
66141
66525
  evidence_count: number
66142
66526
  }[]
66527
+ /**
66528
+ * Sizes of what was actually returned
66529
+ */
66143
66530
  totals: {
66531
+ /**
66532
+ * Edges returned in this export
66533
+ */
66144
66534
  edgeCount: number
66535
+ /**
66536
+ * Nodes returned in this export
66537
+ */
66145
66538
  nodeCount: number
66146
66539
  }
66540
+ /**
66541
+ * True when `limit` cut the export short — the highest-degree nodes were kept, so what you get is the hubs
66542
+ */
66147
66543
  truncated: boolean
66544
+ /**
66545
+ * How long the engine took to answer, milliseconds
66546
+ */
66148
66547
  elapsed_ms: number
66548
+ /**
66549
+ * Engine request id for this call — quote it when reporting a problem
66550
+ */
66149
66551
  request_id: string
66150
66552
  }
66151
66553
 
@@ -66177,38 +66579,128 @@ relation_type?: string
66177
66579
  }
66178
66580
 
66179
66581
  export interface BrainKnowledgeNeighborhoodOutput {
66582
+ /**
66583
+ * The entity that was expanded around; null when `entity_ref` matched nothing
66584
+ */
66180
66585
  root: ({
66586
+ /**
66587
+ * How closely this entity matches the query, higher is closer; absent on an unscored read such as a plain type filter
66588
+ */
66181
66589
  score?: number
66590
+ /**
66591
+ * Other names the same entity appears under in the ingested text
66592
+ */
66182
66593
  aliases: string[]
66594
+ /**
66595
+ * Id of this entity; pass it as `entity_ref` to brain_knowledge_neighborhood or brain_knowledge_entity_memories
66596
+ */
66183
66597
  entity_id: string
66598
+ /**
66599
+ * What the entity is, as the engine summarised it from the memories mentioning it; null when it has not written one
66600
+ */
66184
66601
  description: (string | null)
66602
+ /**
66603
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
66604
+ */
66185
66605
  entity_type: string
66606
+ /**
66607
+ * The name to show a person — usually the spelling the source text used
66608
+ */
66186
66609
  display_name: string
66610
+ /**
66611
+ * The one name this entity is stored under; use it when matching entities against each other
66612
+ */
66187
66613
  canonical_name: string
66614
+ /**
66615
+ * How many memories mention this entity — a rough measure of how well attested it is
66616
+ */
66188
66617
  evidence_count: number
66189
66618
  } | null)
66619
+ /**
66620
+ * The neighbours reached within `depth` hops of the root, the root excluded
66621
+ */
66190
66622
  entities: {
66623
+ /**
66624
+ * How closely this entity matches the query, higher is closer; absent on an unscored read such as a plain type filter
66625
+ */
66191
66626
  score?: number
66627
+ /**
66628
+ * Other names the same entity appears under in the ingested text
66629
+ */
66192
66630
  aliases: string[]
66631
+ /**
66632
+ * Id of this entity; pass it as `entity_ref` to brain_knowledge_neighborhood or brain_knowledge_entity_memories
66633
+ */
66193
66634
  entity_id: string
66635
+ /**
66636
+ * What the entity is, as the engine summarised it from the memories mentioning it; null when it has not written one
66637
+ */
66194
66638
  description: (string | null)
66639
+ /**
66640
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
66641
+ */
66195
66642
  entity_type: string
66643
+ /**
66644
+ * The name to show a person — usually the spelling the source text used
66645
+ */
66196
66646
  display_name: string
66647
+ /**
66648
+ * The one name this entity is stored under; use it when matching entities against each other
66649
+ */
66197
66650
  canonical_name: string
66651
+ /**
66652
+ * How many memories mention this entity — a rough measure of how well attested it is
66653
+ */
66198
66654
  evidence_count: number
66199
66655
  }[]
66656
+ /**
66657
+ * The relations that connect the root and the neighbours above
66658
+ */
66200
66659
  relations: {
66660
+ /**
66661
+ * Why the engine drew this relation, in its own words; null when it recorded none
66662
+ */
66201
66663
  reason: (string | null)
66664
+ /**
66665
+ * Id of the entity the relation points FROM
66666
+ */
66202
66667
  source_id: string
66668
+ /**
66669
+ * True when the relation reads the same in both directions, so source and target are interchangeable
66670
+ */
66203
66671
  symmetric: boolean
66672
+ /**
66673
+ * Id of the entity the relation points TO
66674
+ */
66204
66675
  target_id: string
66676
+ /**
66677
+ * Ontology type of the relation, e.g. depends_on, competes_with, owns
66678
+ */
66205
66679
  relation_type: string
66680
+ /**
66681
+ * Name to show for the source entity
66682
+ */
66206
66683
  source_display_name: string
66684
+ /**
66685
+ * Name to show for the target entity
66686
+ */
66207
66687
  target_display_name: string
66688
+ /**
66689
+ * Stored name of the source entity
66690
+ */
66208
66691
  source_canonical_name: string
66692
+ /**
66693
+ * Stored name of the target entity
66694
+ */
66209
66695
  target_canonical_name: string
66210
66696
  }[]
66697
+ /**
66698
+ * How long the engine took to answer, milliseconds
66699
+ */
66211
66700
  elapsed_ms: number
66701
+ /**
66702
+ * Engine request id for this call — quote it when reporting a problem
66703
+ */
66212
66704
  request_id: string
66213
66705
  }
66214
66706
 
@@ -66236,18 +66728,54 @@ target_entity?: string
66236
66728
  }
66237
66729
 
66238
66730
  export interface BrainKnowledgeRelationsOutput {
66731
+ /**
66732
+ * The relations matching the filters
66733
+ */
66239
66734
  relations: {
66735
+ /**
66736
+ * Why the engine drew this relation, in its own words; null when it recorded none
66737
+ */
66240
66738
  reason: (string | null)
66739
+ /**
66740
+ * Id of the entity the relation points FROM
66741
+ */
66241
66742
  source_id: string
66743
+ /**
66744
+ * True when the relation reads the same in both directions, so source and target are interchangeable
66745
+ */
66242
66746
  symmetric: boolean
66747
+ /**
66748
+ * Id of the entity the relation points TO
66749
+ */
66243
66750
  target_id: string
66751
+ /**
66752
+ * Ontology type of the relation, e.g. depends_on, competes_with, owns
66753
+ */
66244
66754
  relation_type: string
66755
+ /**
66756
+ * Name to show for the source entity
66757
+ */
66245
66758
  source_display_name: string
66759
+ /**
66760
+ * Name to show for the target entity
66761
+ */
66246
66762
  target_display_name: string
66763
+ /**
66764
+ * Stored name of the source entity
66765
+ */
66247
66766
  source_canonical_name: string
66767
+ /**
66768
+ * Stored name of the target entity
66769
+ */
66248
66770
  target_canonical_name: string
66249
66771
  }[]
66772
+ /**
66773
+ * How long the engine took to answer, milliseconds
66774
+ */
66250
66775
  elapsed_ms: number
66776
+ /**
66777
+ * Engine request id for this call — quote it when reporting a problem
66778
+ */
66251
66779
  request_id: string
66252
66780
  }
66253
66781
 
@@ -66275,18 +66803,54 @@ entity_type?: string
66275
66803
  }
66276
66804
 
66277
66805
  export interface BrainKnowledgeSearchOutput {
66806
+ /**
66807
+ * How many entities match in total, across all pages — not the length of this page
66808
+ */
66278
66809
  total: number
66810
+ /**
66811
+ * Matching entities, best match first
66812
+ */
66279
66813
  entities: {
66814
+ /**
66815
+ * How closely this entity matches the query, higher is closer; absent on an unscored read such as a plain type filter
66816
+ */
66280
66817
  score?: number
66818
+ /**
66819
+ * Other names the same entity appears under in the ingested text
66820
+ */
66281
66821
  aliases: string[]
66822
+ /**
66823
+ * Id of this entity; pass it as `entity_ref` to brain_knowledge_neighborhood or brain_knowledge_entity_memories
66824
+ */
66282
66825
  entity_id: string
66826
+ /**
66827
+ * What the entity is, as the engine summarised it from the memories mentioning it; null when it has not written one
66828
+ */
66283
66829
  description: (string | null)
66830
+ /**
66831
+ * Ontology type of the entity, e.g. Feature, Decision, Risk, Integration
66832
+ */
66284
66833
  entity_type: string
66834
+ /**
66835
+ * The name to show a person — usually the spelling the source text used
66836
+ */
66285
66837
  display_name: string
66838
+ /**
66839
+ * The one name this entity is stored under; use it when matching entities against each other
66840
+ */
66286
66841
  canonical_name: string
66842
+ /**
66843
+ * How many memories mention this entity — a rough measure of how well attested it is
66844
+ */
66287
66845
  evidence_count: number
66288
66846
  }[]
66847
+ /**
66848
+ * How long the engine took to answer, milliseconds
66849
+ */
66289
66850
  elapsed_ms: number
66851
+ /**
66852
+ * Engine request id for this call — quote it when reporting a problem
66853
+ */
66290
66854
  request_id: string
66291
66855
  }
66292
66856
 
@@ -66312,8 +66876,17 @@ source_authority?: ("policy" | "official" | "team" | "informal")
66312
66876
  }
66313
66877
 
66314
66878
  export interface BrainMemoryAddOutput {
66879
+ /**
66880
+ * True when the memory was stored
66881
+ */
66315
66882
  success: boolean
66883
+ /**
66884
+ * Engine id of the memory just stored; keep it to read, replace or delete the memory later
66885
+ */
66316
66886
  memory_id: string
66887
+ /**
66888
+ * Engine request id for this call — quote it when reporting a problem
66889
+ */
66317
66890
  request_id: string
66318
66891
  }
66319
66892
 
@@ -66325,8 +66898,17 @@ memory_id: string
66325
66898
  }
66326
66899
 
66327
66900
  export interface BrainMemoryDeleteOutput {
66901
+ /**
66902
+ * Always true — the call fails outright rather than reporting a false here
66903
+ */
66328
66904
  success: true
66905
+ /**
66906
+ * Engine request id for this call — quote it when reporting a problem
66907
+ */
66329
66908
  request_id: string
66909
+ /**
66910
+ * How many memory rows the engine removed for this id; 0 when it was already gone
66911
+ */
66330
66912
  deleted_count: number
66331
66913
  }
66332
66914
 
@@ -66338,74 +66920,179 @@ memory_id: string
66338
66920
  }
66339
66921
 
66340
66922
  export interface BrainMemoryGetOutput {
66923
+ /**
66924
+ * Engine tags on this memory; empty when it carries none
66925
+ */
66341
66926
  tags: string[]
66342
66927
  /**
66343
66928
  * Engine memory layer (l0_basic_info…l7_intention)
66344
66929
  */
66345
66930
  layer: ("l6_schema" | "l7_intention" | "l4_identity" | "l0_basic_info" | "l2_fact" | "l3_summary" | "l5_knowledge" | "l1_raw")
66931
+ /**
66932
+ * Free-form metadata, verbatim as the writer passed brain_memory_add's `metadata`; keys are the caller's
66933
+ */
66346
66934
  custom: {
66347
66935
  [k: string]: unknown
66348
66936
  }
66937
+ /**
66938
+ * Which store answered the read — 'vdb' the vector store, 'graph' the memory graph. Diagnostic; the content is the same either way.
66939
+ */
66349
66940
  source: ("vdb" | "graph")
66941
+ /**
66942
+ * Engine lifecycle status of the row — 'active' for a memory in use
66943
+ */
66350
66944
  status: string
66945
+ /**
66946
+ * The memory text itself
66947
+ */
66351
66948
  content: string
66949
+ /**
66950
+ * Engine user namespace the memory was written under
66951
+ */
66352
66952
  user_id: string
66953
+ /**
66954
+ * Engine agent namespace the memory was written under
66955
+ */
66353
66956
  agent_id: string
66957
+ /**
66958
+ * True when this is the current version of the memory; false when a newer one has replaced it
66959
+ */
66354
66960
  is_latest: boolean
66961
+ /**
66962
+ * When the remembered EVENT happened, epoch milliseconds; null when the writer stated no time
66963
+ */
66355
66964
  memory_at: (number | null)
66965
+ /**
66966
+ * Engine id of this memory — the id that was asked for
66967
+ */
66356
66968
  memory_id: string
66969
+ /**
66970
+ * The engine's own inference about this memory, or null when it recorded none
66971
+ */
66357
66972
  speculate: (string | null)
66973
+ /**
66974
+ * The engine's confidence in this memory, 0..1
66975
+ */
66358
66976
  confidence: number
66977
+ /**
66978
+ * How long the engine took to answer, milliseconds
66979
+ */
66359
66980
  elapsed_ms: number
66981
+ /**
66982
+ * Engine request id for this call — quote it when reporting a problem
66983
+ */
66360
66984
  request_id: string
66985
+ /**
66986
+ * Ids of the memories this one replaced; null when it replaced none
66987
+ */
66361
66988
  supersedes: (string[] | null)
66989
+ /**
66990
+ * When this memory row was written, epoch milliseconds
66991
+ */
66362
66992
  gmt_created: number
66993
+ /**
66994
+ * Ids of the memories that replaced this one; null while it is still current
66995
+ */
66363
66996
  superseded_by: (string[] | null)
66364
66997
  /**
66365
66998
  * Source authority (highest→lowest): policy > official > team > informal
66366
66999
  */
66367
67000
  source_authority: ("policy" | "official" | "team" | "informal")
67001
+ /**
67002
+ * Id of the l1_raw memory this one was derived from; null when it was written directly
67003
+ */
66368
67004
  source_raw_memory_id: (string | null)
66369
67005
  }
66370
67006
 
66371
67007
  export interface BrainMemoryListInput {
67008
+ /**
67009
+ * How many memories to return, max 1000. Omit to use the engine's own page size.
67010
+ */
66372
67011
  limit?: number
67012
+ /**
67013
+ * Sort by write time: 'desc' newest first, 'asc' oldest first. Omit to take the engine's own order.
67014
+ */
66373
67015
  order?: ("asc" | "desc")
66374
67016
  /**
66375
67017
  * Read scope; 'both' (default) unions shared + your private
66376
67018
  */
66377
67019
  scope?: ("shared" | "private" | "both")
67020
+ /**
67021
+ * How many memories to skip before this page — offset 100 with limit 100 is the second page. Omit to start at the beginning.
67022
+ */
66378
67023
  offset?: number
66379
67024
  }
66380
67025
 
66381
67026
  export interface BrainMemoryListOutput {
67027
+ /**
67028
+ * How many memories match in total, across all pages — not the length of this page
67029
+ */
66382
67030
  total: number
67031
+ /**
67032
+ * One page of memories, newest first unless `order` said otherwise
67033
+ */
66383
67034
  memories: {
66384
67035
  /**
66385
67036
  * Consumer-facing label derived from the layer; 'unknown' for an unrecognised layer
66386
67037
  */
66387
67038
  kind: ("schema" | "intention" | "identity" | "basic" | "fact" | "summary" | "knowledge" | "raw" | "unknown")
67039
+ /**
67040
+ * Engine tags on this memory; empty when it carries none
67041
+ */
66388
67042
  tags: string[]
66389
67043
  /**
66390
67044
  * Engine memory layer (l0_basic_info…l7_intention)
66391
67045
  */
66392
67046
  layer: ("l6_schema" | "l7_intention" | "l4_identity" | "l0_basic_info" | "l2_fact" | "l3_summary" | "l5_knowledge" | "l1_raw")
67047
+ /**
67048
+ * Free-form metadata, verbatim as the writer passed brain_memory_add's `metadata`; keys are the caller's
67049
+ */
66393
67050
  custom: {
66394
67051
  [k: string]: unknown
66395
67052
  }
67053
+ /**
67054
+ * Engine lifecycle status of the row — 'active' for a memory in use; superseded rows are not listed
67055
+ */
66396
67056
  status: string
67057
+ /**
67058
+ * The memory text itself
67059
+ */
66397
67060
  content: string
67061
+ /**
67062
+ * Engine user namespace the memory was written under
67063
+ */
66398
67064
  user_id: string
67065
+ /**
67066
+ * Engine agent namespace the memory was written under — the shared pool for a 'shared' write, the caller's own for a private one
67067
+ */
66399
67068
  agent_id: string
67069
+ /**
67070
+ * When the remembered EVENT happened, epoch milliseconds; null when the writer stated no time
67071
+ */
66400
67072
  memory_at: (number | null)
67073
+ /**
67074
+ * Engine id of this memory; pass it to brain_memory_get, _update or _delete
67075
+ */
66401
67076
  memory_id: string
67077
+ /**
67078
+ * The engine's own inference about this memory, or null when it recorded none
67079
+ */
66402
67080
  speculate: (string | null)
67081
+ /**
67082
+ * Engine session the memory was written in; empty when the writer opened none
67083
+ */
66403
67084
  session_id: string
67085
+ /**
67086
+ * When this memory row was written, epoch milliseconds
67087
+ */
66404
67088
  gmt_created: number
66405
67089
  /**
66406
67090
  * Source authority (highest→lowest): policy > official > team > informal
66407
67091
  */
66408
67092
  source_authority: ("policy" | "official" | "team" | "informal")
67093
+ /**
67094
+ * Id of the l1_raw memory this one was derived from; null when it was written directly
67095
+ */
66409
67096
  source_raw_memory_id: (string | null)
66410
67097
  }[]
66411
67098
  }
@@ -66426,8 +67113,17 @@ scope?: ("shared" | "private" | "both")
66426
67113
  }
66427
67114
 
66428
67115
  export interface BrainMemorySearchOutput {
67116
+ /**
67117
+ * Ordinary hits: the facts, summaries and raw notes that match the query
67118
+ */
66429
67119
  normal: BrainMemorySearchOutputItems[]
67120
+ /**
67121
+ * Hits describing WHO the subject is — stable identity and preference memories (l0/l4). Usually the ones worth carrying into a prompt.
67122
+ */
66430
67123
  profile: BrainMemorySearchOutputItems[]
67124
+ /**
67125
+ * Hits the engine offers unprompted — intentions and open threads (l7) it judged relevant to the query rather than matched to it
67126
+ */
66431
67127
  proactive: BrainMemorySearchOutputItems[]
66432
67128
  }
66433
67129
  export interface BrainMemorySearchOutputItems {
@@ -66435,23 +67131,53 @@ export interface BrainMemorySearchOutputItems {
66435
67131
  * Consumer-facing label derived from the layer; 'unknown' for an unrecognised layer
66436
67132
  */
66437
67133
  kind: ("schema" | "intention" | "identity" | "basic" | "fact" | "summary" | "knowledge" | "raw" | "unknown")
67134
+ /**
67135
+ * Engine tags on this memory; empty when it carries none
67136
+ */
66438
67137
  tags: string[]
66439
67138
  /**
66440
67139
  * Engine memory layer (l0_basic_info…l7_intention)
66441
67140
  */
66442
67141
  layer: ("l6_schema" | "l7_intention" | "l4_identity" | "l0_basic_info" | "l2_fact" | "l3_summary" | "l5_knowledge" | "l1_raw")
67142
+ /**
67143
+ * 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.
67144
+ */
66443
67145
  score: number
67146
+ /**
67147
+ * The memory text itself
67148
+ */
66444
67149
  content: string
67150
+ /**
67151
+ * When the remembered EVENT happened, epoch milliseconds; null when the writer stated no time
67152
+ */
66445
67153
  memory_at: (number | null)
67154
+ /**
67155
+ * Engine id of this memory; pass it to brain_memory_get, _update or _delete
67156
+ */
66446
67157
  memory_id: string
67158
+ /**
67159
+ * The engine's own inference about this memory, or null when it recorded none
67160
+ */
66447
67161
  speculate: (string | null)
67162
+ /**
67163
+ * When this memory row was written, epoch milliseconds
67164
+ */
66448
67165
  gmt_created: number
67166
+ /**
67167
+ * Name of the l6_schema type this memory instantiates; absent on every other layer
67168
+ */
66449
67169
  schema_type?: string
67170
+ /**
67171
+ * Ids of the earlier memories this one grew out of, oldest first; absent when it has no history
67172
+ */
66450
67173
  evolution_chain?: string[]
66451
67174
  /**
66452
67175
  * Source authority (highest→lowest): policy > official > team > informal
66453
67176
  */
66454
67177
  source_authority: ("policy" | "official" | "team" | "informal")
67178
+ /**
67179
+ * Id of the l1_raw memory this one was derived from; null when it was written directly
67180
+ */
66455
67181
  source_raw_memory_id: (string | null)
66456
67182
  }
66457
67183
 
@@ -66463,19 +67189,52 @@ scope?: ("shared" | "private" | "both")
66463
67189
  }
66464
67190
 
66465
67191
  export interface BrainMemoryStatsOutput {
67192
+ /**
67193
+ * Size of the engine's memory graph
67194
+ */
66466
67195
  graph: {
67196
+ /**
67197
+ * Edges between those nodes
67198
+ */
66467
67199
  edgeCount: number
67200
+ /**
67201
+ * Nodes in the memory graph
67202
+ */
66468
67203
  nodeCount: number
66469
67204
  }
67205
+ /**
67206
+ * Memory counts for the requested scope
67207
+ */
66470
67208
  memories: {
67209
+ /**
67210
+ * How many memories the scope holds in total
67211
+ */
66471
67212
  total: number
67213
+ /**
67214
+ * Counts for the three derived layers the engine reports; the other layers are not broken out
67215
+ */
66472
67216
  byLayer: {
67217
+ /**
67218
+ * Count of l2_fact memories — extracted facts
67219
+ */
66473
67220
  l2: number
67221
+ /**
67222
+ * Count of l3_summary memories — summaries over facts
67223
+ */
66474
67224
  l3: number
67225
+ /**
67226
+ * Count of l4_identity memories — who the subject is
67227
+ */
66475
67228
  l4: number
66476
67229
  }
66477
67230
  }
67231
+ /**
67232
+ * Size of the product knowledge graph
67233
+ */
66478
67234
  knowledge: {
67235
+ /**
67236
+ * Entities in the product knowledge graph (see brain_knowledge_search)
67237
+ */
66479
67238
  entityCount: number
66480
67239
  }
66481
67240
  }
@@ -66492,8 +67251,17 @@ memory_id: string
66492
67251
  }
66493
67252
 
66494
67253
  export interface BrainMemoryUpdateOutput {
67254
+ /**
67255
+ * Always true — the call fails outright rather than reporting a false here
67256
+ */
66495
67257
  success: true
67258
+ /**
67259
+ * Engine id of the memory that was replaced
67260
+ */
66496
67261
  memory_id: string
67262
+ /**
67263
+ * Engine request id for this call — quote it when reporting a problem
67264
+ */
66497
67265
  request_id: string
66498
67266
  }
66499
67267
 
@@ -66548,6 +67316,9 @@ days?: number
66548
67316
  }
66549
67317
 
66550
67318
  export interface BrainUsageReportOutput {
67319
+ /**
67320
+ * A standing warning, in words, that product.rows and platform.meters have different subjects and need not match
67321
+ */
66551
67322
  note: string
66552
67323
  /**
66553
67324
  * Brain's own ledger, for THIS product only
@@ -66565,6 +67336,9 @@ days: number
66565
67336
  * Inclusive UTC start of the window, YYYY-MM-DD
66566
67337
  */
66567
67338
  from: string
67339
+ /**
67340
+ * One row per UTC day and meter dimension — the grain to join against a billing export
67341
+ */
66568
67342
  rows: {
66569
67343
  /**
66570
67344
  * 'sync' | 'batch'; '' when the push carried none
@@ -66603,27 +67377,72 @@ delivery_failed: number
66603
67377
  * The rows rolled up per meter across the whole window
66604
67378
  */
66605
67379
  totals: {
67380
+ /**
67381
+ * Manifest meter slug, e.g. llm-tokens
67382
+ */
66606
67383
  meter: string
67384
+ /**
67385
+ * How many metered calls landed in the window
67386
+ */
66607
67387
  events: number
67388
+ /**
67389
+ * Tokens metered for this meter across the whole window
67390
+ */
66608
67391
  tokens: number
67392
+ /**
67393
+ * Of those calls, how many billing did not accept — a non-zero here means our ledger and the invoice will differ
67394
+ */
66609
67395
  delivery_failed: number
66610
67396
  }[]
67397
+ /**
67398
+ * The product this ledger belongs to — the one the call was made for
67399
+ */
66611
67400
  product_id: string
66612
67401
  }
66613
67402
  /**
66614
67403
  * The platform billing aggregate for the whole ORG; null if it could not be read
66615
67404
  */
66616
67405
  platform: ({
67406
+ /**
67407
+ * The billing plan in force for that organisation
67408
+ */
66617
67409
  plan: string
67410
+ /**
67411
+ * Always 'org' — a reminder that these numbers are the whole organisation's, not this product's
67412
+ */
66618
67413
  scope: "org"
67414
+ /**
67415
+ * Per-meter allowance and month-to-date usage as billing reports it
67416
+ */
66619
67417
  meters: {
67418
+ /**
67419
+ * What the numbers below are counted in, e.g. tokens
67420
+ */
66620
67421
  unit?: string
67422
+ /**
67423
+ * How much of it has been used MONTH TO DATE, for the whole org — not for the window asked for here
67424
+ */
66621
67425
  used?: number
67426
+ /**
67427
+ * The plan's allowance for this meter; null or absent when there is no cap
67428
+ */
66622
67429
  limit?: (number | null)
67430
+ /**
67431
+ * Allowance left; null or absent when the meter is uncapped
67432
+ */
66623
67433
  remaining?: (number | null)
67434
+ /**
67435
+ * True when this meter has no cap at all
67436
+ */
66624
67437
  unlimited?: boolean
67438
+ /**
67439
+ * Platform meter slug, e.g. llm-tokens
67440
+ */
66625
67441
  meter_slug: string
66626
67442
  }[]
67443
+ /**
67444
+ * The organisation the billing aggregate was read for
67445
+ */
66627
67446
  org_id: string
66628
67447
  } | null)
66629
67448
  /**
@@ -110198,13 +111017,75 @@ type: ("server" | "publishable")
110198
111017
  }
110199
111018
 
110200
111019
  export interface UsersApikeysCreateOutput {
111020
+ /**
111021
+ * Id of the key. Pass it to users_apikeys_revoke.
111022
+ */
110201
111023
  id: string
111024
+ /**
111025
+ * 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.
111026
+ */
110202
111027
  key: string
111028
+ /**
111029
+ * The label a human gave this key — which backend or environment holds it.
111030
+ */
110203
111031
  name: string
111032
+ /**
111033
+ * `server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
111034
+ */
111035
+ type: ("server" | "publishable")
111036
+ /**
111037
+ * 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.
111038
+ */
111039
+ value: (string | null)
111040
+ /**
111041
+ * `usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
111042
+ */
111043
+ prefix: string
111044
+ /**
111045
+ * When the key was issued (ISO 8601).
111046
+ */
111047
+ createdAt: string
111048
+ /**
111049
+ * When the key was revoked (ISO 8601). Null while it still works.
111050
+ */
111051
+ revokedAt: (string | null)
111052
+ }
111053
+
111054
+ export interface UsersApikeysGetInput {
111055
+ /**
111056
+ * Id of the key to read — the `id` from users_apikeys_list.
111057
+ */
111058
+ id: string
111059
+ }
111060
+
111061
+ export interface UsersApikeysGetOutput {
111062
+ /**
111063
+ * Id of the key. Pass it to users_apikeys_revoke.
111064
+ */
111065
+ id: string
111066
+ /**
111067
+ * The label a human gave this key — which backend or environment holds it.
111068
+ */
111069
+ name: string
111070
+ /**
111071
+ * `server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
111072
+ */
110204
111073
  type: ("server" | "publishable")
111074
+ /**
111075
+ * 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.
111076
+ */
110205
111077
  value: (string | null)
111078
+ /**
111079
+ * `usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
111080
+ */
110206
111081
  prefix: string
111082
+ /**
111083
+ * When the key was issued (ISO 8601).
111084
+ */
110207
111085
  createdAt: string
111086
+ /**
111087
+ * When the key was revoked (ISO 8601). Null while it still works.
111088
+ */
110208
111089
  revokedAt: (string | null)
110209
111090
  }
110210
111091
 
@@ -110214,12 +111095,33 @@ export interface UsersApikeysListInput {
110214
111095
 
110215
111096
  export interface UsersApikeysListOutput {
110216
111097
  keys: {
111098
+ /**
111099
+ * Id of the key. Pass it to users_apikeys_revoke.
111100
+ */
110217
111101
  id: string
111102
+ /**
111103
+ * The label a human gave this key — which backend or environment holds it.
111104
+ */
110218
111105
  name: string
111106
+ /**
111107
+ * `server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
111108
+ */
110219
111109
  type: ("server" | "publishable")
111110
+ /**
111111
+ * 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.
111112
+ */
110220
111113
  value: (string | null)
111114
+ /**
111115
+ * `usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
111116
+ */
110221
111117
  prefix: string
111118
+ /**
111119
+ * When the key was issued (ISO 8601).
111120
+ */
110222
111121
  createdAt: string
111122
+ /**
111123
+ * When the key was revoked (ISO 8601). Null while it still works.
111124
+ */
110223
111125
  revokedAt: (string | null)
110224
111126
  }[]
110225
111127
  }
@@ -110232,7 +111134,13 @@ id: string
110232
111134
  }
110233
111135
 
110234
111136
  export interface UsersApikeysRevokeOutput {
111137
+ /**
111138
+ * Id of the key that was revoked.
111139
+ */
110235
111140
  id: string
111141
+ /**
111142
+ * Always true — revocation is immediate and final.
111143
+ */
110236
111144
  revoked: true
110237
111145
  }
110238
111146
 
@@ -110268,21 +111176,60 @@ targetType?: string
110268
111176
  }
110269
111177
 
110270
111178
  export interface UsersAuditListOutput {
111179
+ /**
111180
+ * The page of audit events, newest first.
111181
+ */
110271
111182
  events: {
111183
+ /**
111184
+ * Id of this audit row.
111185
+ */
110272
111186
  id: string
111187
+ /**
111188
+ * IP the action came from. Null when it was not an HTTP action.
111189
+ */
110273
111190
  ip: (string | null)
111191
+ /**
111192
+ * What happened, as a dotted name — `user.created`, `passkey.deleted`, `email_change.override_applied`.
111193
+ */
110274
111194
  action: string
111195
+ /**
111196
+ * Id of the actor. Null for a system action.
111197
+ */
110275
111198
  actorId: (string | null)
111199
+ /**
111200
+ * Action-specific detail — the reason text, counts, whatever the action recorded.
111201
+ */
110276
111202
  metadata: {
110277
111203
  [k: string]: unknown
110278
111204
  }
111205
+ /**
111206
+ * Id of the row the action was about. Null when there was none.
111207
+ */
110279
111208
  targetId: (string | null)
111209
+ /**
111210
+ * Who acted: `operator` (a human or agent on the management plane), `end_user`, or `system`.
111211
+ */
110280
111212
  actorType: ("operator" | "system" | "end_user")
111213
+ /**
111214
+ * When the action happened (ISO 8601).
111215
+ */
110281
111216
  createdAt: string
111217
+ /**
111218
+ * Product the audited action happened in.
111219
+ */
110282
111220
  productId: string
111221
+ /**
111222
+ * User agent the action came from. Null when none was sent.
111223
+ */
110283
111224
  userAgent: (string | null)
111225
+ /**
111226
+ * What kind of row the action was about — `user` or `product`. Null when it was about nothing in particular.
111227
+ */
110284
111228
  targetType: (string | null)
110285
111229
  }[]
111230
+ /**
111231
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
111232
+ */
110286
111233
  nextCursor: (string | null)
110287
111234
  }
110288
111235
 
@@ -111265,12 +112212,33 @@ userId: string
111265
112212
  }
111266
112213
 
111267
112214
  export interface UsersFactorsListOutput {
112215
+ /**
112216
+ * Every second factor this user has — types and status only, never material.
112217
+ */
111268
112218
  factors: {
112219
+ /**
112220
+ * Kind of second factor: `totp` or `backup_codes`. No key material is ever returned.
112221
+ */
111269
112222
  type: ("totp" | "backup_codes" | "webauthn")
112223
+ /**
112224
+ * Whether this factor is enrolled and usable, or still pending verification.
112225
+ */
111270
112226
  status: ("unverified" | "verified")
112227
+ /**
112228
+ * When the factor was enrolled (ISO 8601).
112229
+ */
111271
112230
  createdAt: string
112231
+ /**
112232
+ * `backup_codes` only: how many of the batch are still unspent. Null for any other factor type.
112233
+ */
111272
112234
  remaining: (number | null)
112235
+ /**
112236
+ * When the factor was last used to sign in (ISO 8601). Null if it never was.
112237
+ */
111273
112238
  lastUsedAt: (string | null)
112239
+ /**
112240
+ * When the user first proved the factor works (ISO 8601). Null while it is unverified.
112241
+ */
111274
112242
  verifiedAt: (string | null)
111275
112243
  }[]
111276
112244
  }
@@ -111287,7 +112255,13 @@ userId: string
111287
112255
  }
111288
112256
 
111289
112257
  export interface UsersFactorsResetOutput {
112258
+ /**
112259
+ * Id of the scheduled reset. The same value arrives on `users/mfa.reset-settled`, which is what finishes this step.
112260
+ */
111290
112261
  requestId: string
112262
+ /**
112263
+ * When the removal happens, if nobody aborts it first (ISO 8601). The delay is this product's, not a fixed one.
112264
+ */
111291
112265
  scheduledFor: string
111292
112266
  }
111293
112267
 
@@ -111583,6 +112557,52 @@ signInFailureBaseline: (number | null)
111583
112557
  }
111584
112558
  }
111585
112559
 
112560
+ export interface UsersPasskeysGetInput {
112561
+ /**
112562
+ * The end user the credential belongs to.
112563
+ */
112564
+ userId: string
112565
+ /**
112566
+ * Which credential to read — the `id` from `users_passkeys_list`.
112567
+ */
112568
+ passkeyId: string
112569
+ }
112570
+
112571
+ export interface UsersPasskeysGetOutput {
112572
+ /**
112573
+ * Id of the credential. Pass it to users_passkeys_revoke.
112574
+ */
112575
+ id: string
112576
+ /**
112577
+ * The name the user gave this credential, so a person can tell their devices apart. Null when they never named it.
112578
+ */
112579
+ name: (string | null)
112580
+ /**
112581
+ * The authenticator MODEL’s identifier, which says what kind of device this is, never which one. Null when the authenticator withheld it.
112582
+ */
112583
+ aaguid: (string | null)
112584
+ /**
112585
+ * True when the platform syncs this credential, so it survives losing the device. False means it lives on that device alone.
112586
+ */
112587
+ backedUp: boolean
112588
+ /**
112589
+ * When the credential was registered (ISO 8601).
112590
+ */
112591
+ createdAt: string
112592
+ /**
112593
+ * The authenticator’s own counter as of the last assertion. 0 when the authenticator does not count.
112594
+ */
112595
+ signCount: number
112596
+ /**
112597
+ * When it last signed in (ISO 8601). Null when it never has.
112598
+ */
112599
+ lastUsedAt: (string | null)
112600
+ /**
112601
+ * 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.
112602
+ */
112603
+ transports: string[]
112604
+ }
112605
+
111586
112606
  export interface UsersPasskeysListInput {
111587
112607
  /**
111588
112608
  * The end user whose passkeys to list.
@@ -111591,14 +112611,41 @@ userId: string
111591
112611
  }
111592
112612
 
111593
112613
  export interface UsersPasskeysListOutput {
112614
+ /**
112615
+ * The credentials this user has registered, newest first. Empty when they have none.
112616
+ */
111594
112617
  passkeys: {
112618
+ /**
112619
+ * Id of the credential. Pass it to users_passkeys_revoke.
112620
+ */
111595
112621
  id: string
112622
+ /**
112623
+ * The name the user gave this credential, so a person can tell their devices apart. Null when they never named it.
112624
+ */
111596
112625
  name: (string | null)
112626
+ /**
112627
+ * The authenticator MODEL’s identifier, which says what kind of device this is, never which one. Null when the authenticator withheld it.
112628
+ */
111597
112629
  aaguid: (string | null)
112630
+ /**
112631
+ * True when the platform syncs this credential, so it survives losing the device. False means it lives on that device alone.
112632
+ */
111598
112633
  backedUp: boolean
112634
+ /**
112635
+ * When the credential was registered (ISO 8601).
112636
+ */
111599
112637
  createdAt: string
112638
+ /**
112639
+ * The authenticator’s own counter as of the last assertion. 0 when the authenticator does not count.
112640
+ */
111600
112641
  signCount: number
112642
+ /**
112643
+ * When it last signed in (ISO 8601). Null when it never has.
112644
+ */
111601
112645
  lastUsedAt: (string | null)
112646
+ /**
112647
+ * 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.
112648
+ */
111602
112649
  transports: string[]
111603
112650
  }[]
111604
112651
  }
@@ -111623,9 +112670,18 @@ export interface UsersPasskeysRevokeOutput {
111623
112670
  * Present when the revoke was refused — today, only because it was the last way in.
111624
112671
  */
111625
112672
  error: ({
112673
+ /**
112674
+ * Why it was refused. Today only `passkey_last_way_in`.
112675
+ */
111626
112676
  code: string
112677
+ /**
112678
+ * The refusal in a sentence, safe to show a human.
112679
+ */
111627
112680
  message: string
111628
112681
  } | null)
112682
+ /**
112683
+ * `deleted` when the credential is gone, `failed` when the revoke was refused.
112684
+ */
111629
112685
  status: ("deleted" | "failed")
111630
112686
  }
111631
112687
 
@@ -111637,7 +112693,13 @@ sessionId: string
111637
112693
  }
111638
112694
 
111639
112695
  export interface UsersSessionsGetOutput {
112696
+ /**
112697
+ * Id of this session. Pass it to users_sessions_revoke.
112698
+ */
111640
112699
  id: string
112700
+ /**
112701
+ * IP the session was opened from. Null when it was not recorded.
112702
+ */
111641
112703
  ip: (string | null)
111642
112704
  /**
111643
112705
  * `aal2` only if a verified second factor completed.
@@ -111647,18 +112709,45 @@ aal: ("aal1" | "aal2")
111647
112709
  * The factors this session was established with.
111648
112710
  */
111649
112711
  amr: string[]
112712
+ /**
112713
+ * Whether the session is still usable, expired, or revoked.
112714
+ */
111650
112715
  status: ("active" | "revoked")
112716
+ /**
112717
+ * The end user this session belongs to.
112718
+ */
111651
112719
  userId: string
112720
+ /**
112721
+ * When the session was opened (ISO 8601).
112722
+ */
111652
112723
  createdAt: string
112724
+ /**
112725
+ * When the current token stops working unless refreshed (ISO 8601).
112726
+ */
111653
112727
  expiresAt: string
112728
+ /**
112729
+ * When the session was revoked (ISO 8601). Null while it is live.
112730
+ */
111654
112731
  revokedAt: (string | null)
112732
+ /**
112733
+ * User agent the session was opened from. Null when none was sent.
112734
+ */
111655
112735
  userAgent: (string | null)
112736
+ /**
112737
+ * 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.
112738
+ */
111656
112739
  revokedReason: (string | null)
111657
112740
  /**
111658
112741
  * The operator behind an impersonated session, or null for an ordinary one.
111659
112742
  */
111660
112743
  impersonatedBy: (string | null)
112744
+ /**
112745
+ * When the session last refreshed its tokens (ISO 8601). Null if it never has.
112746
+ */
111661
112747
  lastRefreshedAt: (string | null)
112748
+ /**
112749
+ * When the session ends no matter how often it refreshes (ISO 8601).
112750
+ */
111662
112751
  absoluteExpiresAt: string
111663
112752
  }
111664
112753
 
@@ -111698,16 +112787,49 @@ userId: string
111698
112787
  }
111699
112788
 
111700
112789
  export interface UsersSessionsListOutput {
112790
+ /**
112791
+ * The sessions matching the filter, newest first.
112792
+ */
111701
112793
  sessions: {
112794
+ /**
112795
+ * Id of this session. Pass it to users_sessions_revoke.
112796
+ */
111702
112797
  id: string
112798
+ /**
112799
+ * IP the session was opened from. Null when it was not recorded.
112800
+ */
111703
112801
  ip: (string | null)
112802
+ /**
112803
+ * Whether the session is still usable, expired, or revoked.
112804
+ */
111704
112805
  status: ("active" | "revoked")
112806
+ /**
112807
+ * The end user this session belongs to.
112808
+ */
111705
112809
  userId: string
112810
+ /**
112811
+ * When the session was opened (ISO 8601).
112812
+ */
111706
112813
  createdAt: string
112814
+ /**
112815
+ * When the current token stops working unless refreshed (ISO 8601).
112816
+ */
111707
112817
  expiresAt: string
112818
+ /**
112819
+ * When the session was revoked (ISO 8601). Null while it is live.
112820
+ */
111708
112821
  revokedAt: (string | null)
112822
+ /**
112823
+ * User agent the session was opened from. Null when none was sent.
112824
+ */
111709
112825
  userAgent: (string | null)
112826
+ /**
112827
+ * When the session last refreshed its tokens (ISO 8601). Null if it never has.
112828
+ */
111710
112829
  lastRefreshedAt: (string | null)
112830
+ /**
112831
+ * When the session ends no matter how often it refreshes (ISO 8601).
112832
+ */
111711
112833
  absoluteExpiresAt: string
111712
112834
  }[]
111713
112835
  }
@@ -111724,6 +112846,9 @@ sessionId?: string
111724
112846
  }
111725
112847
 
111726
112848
  export interface UsersSessionsRevokeOutput {
112849
+ /**
112850
+ * How many sessions were revoked. Zero when there was nothing live to revoke.
112851
+ */
111727
112852
  revoked: number
111728
112853
  }
111729
112854
 
@@ -111850,37 +112975,126 @@ userId: string
111850
112975
  }
111851
112976
 
111852
112977
  export interface UsersUsersBanOutput {
112978
+ /**
112979
+ * Id of this end user. Pass it to any users_users_* tool.
112980
+ */
111853
112981
  id: string
112982
+ /**
112983
+ * The user's display name. Null when nobody set one.
112984
+ */
111854
112985
  name: (string | null)
112986
+ /**
112987
+ * When the user was banned (ISO 8601). Null while they are not banned.
112988
+ */
111855
112989
  bannedAt: (string | null)
112990
+ /**
112991
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
112992
+ */
111856
112993
  erasedAt: (string | null)
112994
+ /**
112995
+ * URL of the user's avatar. Null when there is none.
112996
+ */
111857
112997
  imageUrl: (string | null)
112998
+ /**
112999
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113000
+ */
111858
113001
  testUser: boolean
113002
+ /**
113003
+ * When the user was created (ISO 8601).
113004
+ */
111859
113005
  createdAt: string
113006
+ /**
113007
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113008
+ */
111860
113009
  deletedAt: (string | null)
113010
+ /**
113011
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113012
+ */
111861
113013
  productId: string
113014
+ /**
113015
+ * When the user was last changed (ISO 8601).
113016
+ */
111862
113017
  updatedAt: string
113018
+ /**
113019
+ * Whether this user is still on the waitlist and cannot sign in yet.
113020
+ */
111863
113021
  waitlisted: boolean
113022
+ /**
113023
+ * 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".
113024
+ */
111864
113025
  identifiers: {
113026
+ /**
113027
+ * Id of this identifier row.
113028
+ */
111865
113029
  id: string
113030
+ /**
113031
+ * What kind of identifier this is. Today always `email`.
113032
+ */
111866
113033
  type: "email"
113034
+ /**
113035
+ * The address as the user typed it, for display.
113036
+ */
111867
113037
  value: string
113038
+ /**
113039
+ * Whether this is the identifier the user signs in with and is contacted at.
113040
+ */
111868
113041
  isPrimary: boolean
113042
+ /**
113043
+ * When this address was verified (ISO 8601). Null while it never was.
113044
+ */
111869
113045
  verifiedAt: (string | null)
113046
+ /**
113047
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113048
+ */
111870
113049
  valueCanonical: string
113050
+ /**
113051
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113052
+ */
111871
113053
  verificationStatus: ("unverified" | "verified" | "expired")
111872
113054
  }[]
113055
+ /**
113056
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113057
+ */
111873
113058
  lockedUntil: (string | null)
113059
+ /**
113060
+ * When the user last signed in (ISO 8601). Null if they never have.
113061
+ */
111874
113062
  lastSignInAt: (string | null)
113063
+ /**
113064
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113065
+ */
113066
+ primaryEmail: (string | null)
113067
+ /**
113068
+ * Whether the user must set a new password at their next sign-in.
113069
+ */
111875
113070
  requiresReset: boolean
111876
- publicMetadata: UsersUsersBanOutputPublicMetadata
111877
- unsafeMetadata: UsersUsersBanOutputPublicMetadata
111878
- privateMetadata: UsersUsersBanOutputPublicMetadata
111879
- emailChangeLockedUntil: (string | null)
113071
+ /**
113072
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113073
+ */
113074
+ publicMetadata: {
113075
+ [k: string]: unknown
111880
113076
  }
111881
- export interface UsersUsersBanOutputPublicMetadata {
113077
+ /**
113078
+ * Metadata the end user may write themselves. Treat it as untrusted.
113079
+ */
113080
+ unsafeMetadata: {
113081
+ [k: string]: unknown
113082
+ }
113083
+ /**
113084
+ * Metadata for the management plane only. Never reaches the end user or a token.
113085
+ */
113086
+ privateMetadata: {
111882
113087
  [k: string]: unknown
111883
113088
  }
113089
+ /**
113090
+ * Id of the primary identifier row. Null when there is no primary identifier.
113091
+ */
113092
+ primaryIdentifierId: (string | null)
113093
+ /**
113094
+ * 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.
113095
+ */
113096
+ emailChangeLockedUntil: (string | null)
113097
+ }
111884
113098
 
111885
113099
  export interface UsersUsersCreateInput {
111886
113100
  /**
@@ -111983,37 +113197,126 @@ export interface UsersUsersCreateInputPublicMetadata1 {
111983
113197
  }
111984
113198
 
111985
113199
  export interface UsersUsersCreateOutput {
113200
+ /**
113201
+ * Id of this end user. Pass it to any users_users_* tool.
113202
+ */
111986
113203
  id: string
113204
+ /**
113205
+ * The user's display name. Null when nobody set one.
113206
+ */
111987
113207
  name: (string | null)
113208
+ /**
113209
+ * When the user was banned (ISO 8601). Null while they are not banned.
113210
+ */
111988
113211
  bannedAt: (string | null)
113212
+ /**
113213
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113214
+ */
111989
113215
  erasedAt: (string | null)
113216
+ /**
113217
+ * URL of the user's avatar. Null when there is none.
113218
+ */
111990
113219
  imageUrl: (string | null)
113220
+ /**
113221
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113222
+ */
111991
113223
  testUser: boolean
113224
+ /**
113225
+ * When the user was created (ISO 8601).
113226
+ */
111992
113227
  createdAt: string
113228
+ /**
113229
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113230
+ */
111993
113231
  deletedAt: (string | null)
113232
+ /**
113233
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113234
+ */
111994
113235
  productId: string
113236
+ /**
113237
+ * When the user was last changed (ISO 8601).
113238
+ */
111995
113239
  updatedAt: string
113240
+ /**
113241
+ * Whether this user is still on the waitlist and cannot sign in yet.
113242
+ */
111996
113243
  waitlisted: boolean
113244
+ /**
113245
+ * 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".
113246
+ */
111997
113247
  identifiers: {
113248
+ /**
113249
+ * Id of this identifier row.
113250
+ */
111998
113251
  id: string
113252
+ /**
113253
+ * What kind of identifier this is. Today always `email`.
113254
+ */
111999
113255
  type: "email"
113256
+ /**
113257
+ * The address as the user typed it, for display.
113258
+ */
112000
113259
  value: string
113260
+ /**
113261
+ * Whether this is the identifier the user signs in with and is contacted at.
113262
+ */
112001
113263
  isPrimary: boolean
113264
+ /**
113265
+ * When this address was verified (ISO 8601). Null while it never was.
113266
+ */
112002
113267
  verifiedAt: (string | null)
113268
+ /**
113269
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113270
+ */
112003
113271
  valueCanonical: string
113272
+ /**
113273
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113274
+ */
112004
113275
  verificationStatus: ("unverified" | "verified" | "expired")
112005
113276
  }[]
113277
+ /**
113278
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113279
+ */
112006
113280
  lockedUntil: (string | null)
113281
+ /**
113282
+ * When the user last signed in (ISO 8601). Null if they never have.
113283
+ */
112007
113284
  lastSignInAt: (string | null)
113285
+ /**
113286
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113287
+ */
113288
+ primaryEmail: (string | null)
113289
+ /**
113290
+ * Whether the user must set a new password at their next sign-in.
113291
+ */
112008
113292
  requiresReset: boolean
112009
- publicMetadata: UsersUsersCreateOutputPublicMetadata
112010
- unsafeMetadata: UsersUsersCreateOutputPublicMetadata
112011
- privateMetadata: UsersUsersCreateOutputPublicMetadata
112012
- emailChangeLockedUntil: (string | null)
113293
+ /**
113294
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113295
+ */
113296
+ publicMetadata: {
113297
+ [k: string]: unknown
113298
+ }
113299
+ /**
113300
+ * Metadata the end user may write themselves. Treat it as untrusted.
113301
+ */
113302
+ unsafeMetadata: {
113303
+ [k: string]: unknown
112013
113304
  }
112014
- export interface UsersUsersCreateOutputPublicMetadata {
113305
+ /**
113306
+ * Metadata for the management plane only. Never reaches the end user or a token.
113307
+ */
113308
+ privateMetadata: {
112015
113309
  [k: string]: unknown
112016
113310
  }
113311
+ /**
113312
+ * Id of the primary identifier row. Null when there is no primary identifier.
113313
+ */
113314
+ primaryIdentifierId: (string | null)
113315
+ /**
113316
+ * 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.
113317
+ */
113318
+ emailChangeLockedUntil: (string | null)
113319
+ }
112017
113320
 
112018
113321
  export interface UsersUsersDeleteInput {
112019
113322
  /**
@@ -112023,37 +113326,126 @@ userId: string
112023
113326
  }
112024
113327
 
112025
113328
  export interface UsersUsersDeleteOutput {
113329
+ /**
113330
+ * Id of this end user. Pass it to any users_users_* tool.
113331
+ */
112026
113332
  id: string
113333
+ /**
113334
+ * The user's display name. Null when nobody set one.
113335
+ */
112027
113336
  name: (string | null)
113337
+ /**
113338
+ * When the user was banned (ISO 8601). Null while they are not banned.
113339
+ */
112028
113340
  bannedAt: (string | null)
113341
+ /**
113342
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113343
+ */
112029
113344
  erasedAt: (string | null)
113345
+ /**
113346
+ * URL of the user's avatar. Null when there is none.
113347
+ */
112030
113348
  imageUrl: (string | null)
113349
+ /**
113350
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113351
+ */
112031
113352
  testUser: boolean
113353
+ /**
113354
+ * When the user was created (ISO 8601).
113355
+ */
112032
113356
  createdAt: string
113357
+ /**
113358
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113359
+ */
112033
113360
  deletedAt: (string | null)
113361
+ /**
113362
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113363
+ */
112034
113364
  productId: string
113365
+ /**
113366
+ * When the user was last changed (ISO 8601).
113367
+ */
112035
113368
  updatedAt: string
113369
+ /**
113370
+ * Whether this user is still on the waitlist and cannot sign in yet.
113371
+ */
112036
113372
  waitlisted: boolean
113373
+ /**
113374
+ * 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".
113375
+ */
112037
113376
  identifiers: {
113377
+ /**
113378
+ * Id of this identifier row.
113379
+ */
112038
113380
  id: string
113381
+ /**
113382
+ * What kind of identifier this is. Today always `email`.
113383
+ */
112039
113384
  type: "email"
113385
+ /**
113386
+ * The address as the user typed it, for display.
113387
+ */
112040
113388
  value: string
113389
+ /**
113390
+ * Whether this is the identifier the user signs in with and is contacted at.
113391
+ */
112041
113392
  isPrimary: boolean
113393
+ /**
113394
+ * When this address was verified (ISO 8601). Null while it never was.
113395
+ */
112042
113396
  verifiedAt: (string | null)
113397
+ /**
113398
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113399
+ */
112043
113400
  valueCanonical: string
113401
+ /**
113402
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113403
+ */
112044
113404
  verificationStatus: ("unverified" | "verified" | "expired")
112045
113405
  }[]
113406
+ /**
113407
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113408
+ */
112046
113409
  lockedUntil: (string | null)
113410
+ /**
113411
+ * When the user last signed in (ISO 8601). Null if they never have.
113412
+ */
112047
113413
  lastSignInAt: (string | null)
113414
+ /**
113415
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113416
+ */
113417
+ primaryEmail: (string | null)
113418
+ /**
113419
+ * Whether the user must set a new password at their next sign-in.
113420
+ */
112048
113421
  requiresReset: boolean
112049
- publicMetadata: UsersUsersDeleteOutputPublicMetadata
112050
- unsafeMetadata: UsersUsersDeleteOutputPublicMetadata
112051
- privateMetadata: UsersUsersDeleteOutputPublicMetadata
112052
- emailChangeLockedUntil: (string | null)
113422
+ /**
113423
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113424
+ */
113425
+ publicMetadata: {
113426
+ [k: string]: unknown
112053
113427
  }
112054
- export interface UsersUsersDeleteOutputPublicMetadata {
113428
+ /**
113429
+ * Metadata the end user may write themselves. Treat it as untrusted.
113430
+ */
113431
+ unsafeMetadata: {
113432
+ [k: string]: unknown
113433
+ }
113434
+ /**
113435
+ * Metadata for the management plane only. Never reaches the end user or a token.
113436
+ */
113437
+ privateMetadata: {
112055
113438
  [k: string]: unknown
112056
113439
  }
113440
+ /**
113441
+ * Id of the primary identifier row. Null when there is no primary identifier.
113442
+ */
113443
+ primaryIdentifierId: (string | null)
113444
+ /**
113445
+ * 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.
113446
+ */
113447
+ emailChangeLockedUntil: (string | null)
113448
+ }
112057
113449
 
112058
113450
  export interface UsersUsersExportInput {
112059
113451
  /**
@@ -112081,40 +113473,129 @@ includeDeleted?: boolean
112081
113473
  export interface UsersUsersExportOutput {
112082
113474
  count: number
112083
113475
  users: {
113476
+ /**
113477
+ * Id of this end user. Pass it to any users_users_* tool.
113478
+ */
112084
113479
  id: string
113480
+ /**
113481
+ * The user's display name. Null when nobody set one.
113482
+ */
112085
113483
  name: (string | null)
113484
+ /**
113485
+ * When the user was banned (ISO 8601). Null while they are not banned.
113486
+ */
112086
113487
  bannedAt: (string | null)
113488
+ /**
113489
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113490
+ */
112087
113491
  erasedAt: (string | null)
113492
+ /**
113493
+ * URL of the user's avatar. Null when there is none.
113494
+ */
112088
113495
  imageUrl: (string | null)
113496
+ /**
113497
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113498
+ */
112089
113499
  testUser: boolean
113500
+ /**
113501
+ * When the user was created (ISO 8601).
113502
+ */
112090
113503
  createdAt: string
113504
+ /**
113505
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113506
+ */
112091
113507
  deletedAt: (string | null)
113508
+ /**
113509
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113510
+ */
112092
113511
  productId: string
113512
+ /**
113513
+ * When the user was last changed (ISO 8601).
113514
+ */
112093
113515
  updatedAt: string
113516
+ /**
113517
+ * Whether this user is still on the waitlist and cannot sign in yet.
113518
+ */
112094
113519
  waitlisted: boolean
113520
+ /**
113521
+ * 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".
113522
+ */
112095
113523
  identifiers: {
113524
+ /**
113525
+ * Id of this identifier row.
113526
+ */
112096
113527
  id: string
113528
+ /**
113529
+ * What kind of identifier this is. Today always `email`.
113530
+ */
112097
113531
  type: "email"
113532
+ /**
113533
+ * The address as the user typed it, for display.
113534
+ */
112098
113535
  value: string
113536
+ /**
113537
+ * Whether this is the identifier the user signs in with and is contacted at.
113538
+ */
112099
113539
  isPrimary: boolean
113540
+ /**
113541
+ * When this address was verified (ISO 8601). Null while it never was.
113542
+ */
112100
113543
  verifiedAt: (string | null)
113544
+ /**
113545
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113546
+ */
112101
113547
  valueCanonical: string
113548
+ /**
113549
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113550
+ */
112102
113551
  verificationStatus: ("unverified" | "verified" | "expired")
112103
113552
  }[]
113553
+ /**
113554
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113555
+ */
112104
113556
  lockedUntil: (string | null)
113557
+ /**
113558
+ * When the user last signed in (ISO 8601). Null if they never have.
113559
+ */
112105
113560
  lastSignInAt: (string | null)
113561
+ /**
113562
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113563
+ */
113564
+ primaryEmail: (string | null)
113565
+ /**
113566
+ * Whether the user must set a new password at their next sign-in.
113567
+ */
112106
113568
  requiresReset: boolean
112107
- publicMetadata: UsersUsersExportOutputPublicMetadata
112108
- unsafeMetadata: UsersUsersExportOutputPublicMetadata
112109
- privateMetadata: UsersUsersExportOutputPublicMetadata
113569
+ /**
113570
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113571
+ */
113572
+ publicMetadata: {
113573
+ [k: string]: unknown
113574
+ }
113575
+ /**
113576
+ * Metadata the end user may write themselves. Treat it as untrusted.
113577
+ */
113578
+ unsafeMetadata: {
113579
+ [k: string]: unknown
113580
+ }
113581
+ /**
113582
+ * Metadata for the management plane only. Never reaches the end user or a token.
113583
+ */
113584
+ privateMetadata: {
113585
+ [k: string]: unknown
113586
+ }
113587
+ /**
113588
+ * Id of the primary identifier row. Null when there is no primary identifier.
113589
+ */
113590
+ primaryIdentifierId: (string | null)
113591
+ /**
113592
+ * 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.
113593
+ */
112110
113594
  emailChangeLockedUntil: (string | null)
112111
113595
  }[]
112112
113596
  exportedAt: string
112113
113597
  nextCursor: (string | null)
112114
113598
  }
112115
- export interface UsersUsersExportOutputPublicMetadata {
112116
- [k: string]: unknown
112117
- }
112118
113599
 
112119
113600
  export interface UsersUsersGetInput {
112120
113601
  /**
@@ -112124,37 +113605,126 @@ userId: string
112124
113605
  }
112125
113606
 
112126
113607
  export interface UsersUsersGetOutput {
113608
+ /**
113609
+ * Id of this end user. Pass it to any users_users_* tool.
113610
+ */
112127
113611
  id: string
113612
+ /**
113613
+ * The user's display name. Null when nobody set one.
113614
+ */
112128
113615
  name: (string | null)
113616
+ /**
113617
+ * When the user was banned (ISO 8601). Null while they are not banned.
113618
+ */
112129
113619
  bannedAt: (string | null)
113620
+ /**
113621
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113622
+ */
112130
113623
  erasedAt: (string | null)
113624
+ /**
113625
+ * URL of the user's avatar. Null when there is none.
113626
+ */
112131
113627
  imageUrl: (string | null)
113628
+ /**
113629
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113630
+ */
112132
113631
  testUser: boolean
113632
+ /**
113633
+ * When the user was created (ISO 8601).
113634
+ */
112133
113635
  createdAt: string
113636
+ /**
113637
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113638
+ */
112134
113639
  deletedAt: (string | null)
113640
+ /**
113641
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113642
+ */
112135
113643
  productId: string
113644
+ /**
113645
+ * When the user was last changed (ISO 8601).
113646
+ */
112136
113647
  updatedAt: string
113648
+ /**
113649
+ * Whether this user is still on the waitlist and cannot sign in yet.
113650
+ */
112137
113651
  waitlisted: boolean
113652
+ /**
113653
+ * 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".
113654
+ */
112138
113655
  identifiers: {
113656
+ /**
113657
+ * Id of this identifier row.
113658
+ */
112139
113659
  id: string
113660
+ /**
113661
+ * What kind of identifier this is. Today always `email`.
113662
+ */
112140
113663
  type: "email"
113664
+ /**
113665
+ * The address as the user typed it, for display.
113666
+ */
112141
113667
  value: string
113668
+ /**
113669
+ * Whether this is the identifier the user signs in with and is contacted at.
113670
+ */
112142
113671
  isPrimary: boolean
113672
+ /**
113673
+ * When this address was verified (ISO 8601). Null while it never was.
113674
+ */
112143
113675
  verifiedAt: (string | null)
113676
+ /**
113677
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113678
+ */
112144
113679
  valueCanonical: string
113680
+ /**
113681
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113682
+ */
112145
113683
  verificationStatus: ("unverified" | "verified" | "expired")
112146
113684
  }[]
113685
+ /**
113686
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113687
+ */
112147
113688
  lockedUntil: (string | null)
113689
+ /**
113690
+ * When the user last signed in (ISO 8601). Null if they never have.
113691
+ */
112148
113692
  lastSignInAt: (string | null)
113693
+ /**
113694
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113695
+ */
113696
+ primaryEmail: (string | null)
113697
+ /**
113698
+ * Whether the user must set a new password at their next sign-in.
113699
+ */
112149
113700
  requiresReset: boolean
112150
- publicMetadata: UsersUsersGetOutputPublicMetadata
112151
- unsafeMetadata: UsersUsersGetOutputPublicMetadata
112152
- privateMetadata: UsersUsersGetOutputPublicMetadata
112153
- emailChangeLockedUntil: (string | null)
113701
+ /**
113702
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113703
+ */
113704
+ publicMetadata: {
113705
+ [k: string]: unknown
113706
+ }
113707
+ /**
113708
+ * Metadata the end user may write themselves. Treat it as untrusted.
113709
+ */
113710
+ unsafeMetadata: {
113711
+ [k: string]: unknown
112154
113712
  }
112155
- export interface UsersUsersGetOutputPublicMetadata {
113713
+ /**
113714
+ * Metadata for the management plane only. Never reaches the end user or a token.
113715
+ */
113716
+ privateMetadata: {
112156
113717
  [k: string]: unknown
112157
113718
  }
113719
+ /**
113720
+ * Id of the primary identifier row. Null when there is no primary identifier.
113721
+ */
113722
+ primaryIdentifierId: (string | null)
113723
+ /**
113724
+ * 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.
113725
+ */
113726
+ emailChangeLockedUntil: (string | null)
113727
+ }
112158
113728
 
112159
113729
  export interface UsersUsersImportInput {
112160
113730
  /**
@@ -112167,15 +113737,42 @@ users: [unknown, ...(unknown)[]]
112167
113737
  }
112168
113738
 
112169
113739
  export interface UsersUsersImportOutput {
113740
+ /**
113741
+ * How many rows could not be imported at all.
113742
+ */
112170
113743
  failed: number
113744
+ /**
113745
+ * How many users were created.
113746
+ */
112171
113747
  created: number
113748
+ /**
113749
+ * One row per submitted row, in the order you sent them.
113750
+ */
112172
113751
  results: {
113752
+ /**
113753
+ * Zero-based index of the row in the `users` array you sent.
113754
+ */
112173
113755
  row: number
113756
+ /**
113757
+ * Why it was skipped, or what went wrong. Null for a created row.
113758
+ */
112174
113759
  reason: (string | null)
113760
+ /**
113761
+ * What happened to this row.
113762
+ */
112175
113763
  status: ("created" | "skipped" | "failed")
113764
+ /**
113765
+ * The created user's id. Null for skipped and failed rows.
113766
+ */
112176
113767
  userId: (string | null)
112177
113768
  }[]
113769
+ /**
113770
+ * How many rows were passed over — an address already in the directory, typically.
113771
+ */
112178
113772
  skipped: number
113773
+ /**
113774
+ * How many rows you submitted.
113775
+ */
112179
113776
  requested: number
112180
113777
  }
112181
113778
 
@@ -112203,9 +113800,21 @@ privateMetadata?: {
112203
113800
  }
112204
113801
 
112205
113802
  export interface UsersUsersInviteOutput {
113803
+ /**
113804
+ * False when the re-invite cooldown or the mail toolkit refused the send. The invite is still live.
113805
+ */
112206
113806
  mailed: boolean
113807
+ /**
113808
+ * The invited user, created immediately and listed straight away — they simply cannot sign in until they accept.
113809
+ */
112207
113810
  userId: string
113811
+ /**
113812
+ * False when this address had already been invited; the same user is returned.
113813
+ */
112208
113814
  created: boolean
113815
+ /**
113816
+ * When the invite link stops working (ISO 8601).
113817
+ */
112209
113818
  expiresAt: string
112210
113819
  }
112211
113820
 
@@ -112241,40 +113850,135 @@ includeWaitlisted?: boolean
112241
113850
  }
112242
113851
 
112243
113852
  export interface UsersUsersListOutput {
113853
+ /**
113854
+ * The page of users, newest first.
113855
+ */
112244
113856
  users: {
113857
+ /**
113858
+ * Id of this end user. Pass it to any users_users_* tool.
113859
+ */
112245
113860
  id: string
113861
+ /**
113862
+ * The user's display name. Null when nobody set one.
113863
+ */
112246
113864
  name: (string | null)
113865
+ /**
113866
+ * When the user was banned (ISO 8601). Null while they are not banned.
113867
+ */
112247
113868
  bannedAt: (string | null)
113869
+ /**
113870
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113871
+ */
112248
113872
  erasedAt: (string | null)
113873
+ /**
113874
+ * URL of the user's avatar. Null when there is none.
113875
+ */
112249
113876
  imageUrl: (string | null)
113877
+ /**
113878
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113879
+ */
112250
113880
  testUser: boolean
113881
+ /**
113882
+ * When the user was created (ISO 8601).
113883
+ */
112251
113884
  createdAt: string
113885
+ /**
113886
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113887
+ */
112252
113888
  deletedAt: (string | null)
113889
+ /**
113890
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113891
+ */
112253
113892
  productId: string
113893
+ /**
113894
+ * When the user was last changed (ISO 8601).
113895
+ */
112254
113896
  updatedAt: string
113897
+ /**
113898
+ * Whether this user is still on the waitlist and cannot sign in yet.
113899
+ */
112255
113900
  waitlisted: boolean
113901
+ /**
113902
+ * 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".
113903
+ */
112256
113904
  identifiers: {
113905
+ /**
113906
+ * Id of this identifier row.
113907
+ */
112257
113908
  id: string
113909
+ /**
113910
+ * What kind of identifier this is. Today always `email`.
113911
+ */
112258
113912
  type: "email"
113913
+ /**
113914
+ * The address as the user typed it, for display.
113915
+ */
112259
113916
  value: string
113917
+ /**
113918
+ * Whether this is the identifier the user signs in with and is contacted at.
113919
+ */
112260
113920
  isPrimary: boolean
113921
+ /**
113922
+ * When this address was verified (ISO 8601). Null while it never was.
113923
+ */
112261
113924
  verifiedAt: (string | null)
113925
+ /**
113926
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113927
+ */
112262
113928
  valueCanonical: string
113929
+ /**
113930
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113931
+ */
112263
113932
  verificationStatus: ("unverified" | "verified" | "expired")
112264
113933
  }[]
113934
+ /**
113935
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113936
+ */
112265
113937
  lockedUntil: (string | null)
113938
+ /**
113939
+ * When the user last signed in (ISO 8601). Null if they never have.
113940
+ */
112266
113941
  lastSignInAt: (string | null)
113942
+ /**
113943
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113944
+ */
113945
+ primaryEmail: (string | null)
113946
+ /**
113947
+ * Whether the user must set a new password at their next sign-in.
113948
+ */
112267
113949
  requiresReset: boolean
112268
- publicMetadata: UsersUsersListOutputPublicMetadata
112269
- unsafeMetadata: UsersUsersListOutputPublicMetadata
112270
- privateMetadata: UsersUsersListOutputPublicMetadata
113950
+ /**
113951
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113952
+ */
113953
+ publicMetadata: {
113954
+ [k: string]: unknown
113955
+ }
113956
+ /**
113957
+ * Metadata the end user may write themselves. Treat it as untrusted.
113958
+ */
113959
+ unsafeMetadata: {
113960
+ [k: string]: unknown
113961
+ }
113962
+ /**
113963
+ * Metadata for the management plane only. Never reaches the end user or a token.
113964
+ */
113965
+ privateMetadata: {
113966
+ [k: string]: unknown
113967
+ }
113968
+ /**
113969
+ * Id of the primary identifier row. Null when there is no primary identifier.
113970
+ */
113971
+ primaryIdentifierId: (string | null)
113972
+ /**
113973
+ * 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.
113974
+ */
112271
113975
  emailChangeLockedUntil: (string | null)
112272
113976
  }[]
113977
+ /**
113978
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
113979
+ */
112273
113980
  nextCursor: (string | null)
112274
113981
  }
112275
- export interface UsersUsersListOutputPublicMetadata {
112276
- [k: string]: unknown
112277
- }
112278
113982
 
112279
113983
  export interface UsersUsersSetPrimaryIdentifierInput {
112280
113984
  /**
@@ -112292,7 +113996,13 @@ userId: string
112292
113996
  }
112293
113997
 
112294
113998
  export interface UsersUsersSetPrimaryIdentifierOutput {
113999
+ /**
114000
+ * Id of the scheduled change. It appears in the audit rows and in the abort link mailed to the old address.
114001
+ */
112295
114002
  requestId: string
114003
+ /**
114004
+ * When the swap becomes applicable, if nobody aborts it first (ISO 8601). The delay is this product's `emailChange.overrideDelayHours`, 72 by default.
114005
+ */
112296
114006
  scheduledFor: string
112297
114007
  }
112298
114008
 
@@ -112304,37 +114014,126 @@ userId: string
112304
114014
  }
112305
114015
 
112306
114016
  export interface UsersUsersUnbanOutput {
114017
+ /**
114018
+ * Id of this end user. Pass it to any users_users_* tool.
114019
+ */
112307
114020
  id: string
114021
+ /**
114022
+ * The user's display name. Null when nobody set one.
114023
+ */
112308
114024
  name: (string | null)
114025
+ /**
114026
+ * When the user was banned (ISO 8601). Null while they are not banned.
114027
+ */
112309
114028
  bannedAt: (string | null)
114029
+ /**
114030
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
114031
+ */
112310
114032
  erasedAt: (string | null)
114033
+ /**
114034
+ * URL of the user's avatar. Null when there is none.
114035
+ */
112311
114036
  imageUrl: (string | null)
114037
+ /**
114038
+ * Whether this is a test fixture — excluded from metering and from the default listing.
114039
+ */
112312
114040
  testUser: boolean
114041
+ /**
114042
+ * When the user was created (ISO 8601).
114043
+ */
112313
114044
  createdAt: string
114045
+ /**
114046
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
114047
+ */
112314
114048
  deletedAt: (string | null)
114049
+ /**
114050
+ * Product this user belongs to. Never an input — it comes from the calling identity.
114051
+ */
112315
114052
  productId: string
114053
+ /**
114054
+ * When the user was last changed (ISO 8601).
114055
+ */
112316
114056
  updatedAt: string
114057
+ /**
114058
+ * Whether this user is still on the waitlist and cannot sign in yet.
114059
+ */
112317
114060
  waitlisted: boolean
114061
+ /**
114062
+ * 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".
114063
+ */
112318
114064
  identifiers: {
114065
+ /**
114066
+ * Id of this identifier row.
114067
+ */
112319
114068
  id: string
114069
+ /**
114070
+ * What kind of identifier this is. Today always `email`.
114071
+ */
112320
114072
  type: "email"
114073
+ /**
114074
+ * The address as the user typed it, for display.
114075
+ */
112321
114076
  value: string
114077
+ /**
114078
+ * Whether this is the identifier the user signs in with and is contacted at.
114079
+ */
112322
114080
  isPrimary: boolean
114081
+ /**
114082
+ * When this address was verified (ISO 8601). Null while it never was.
114083
+ */
112323
114084
  verifiedAt: (string | null)
114085
+ /**
114086
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
114087
+ */
112324
114088
  valueCanonical: string
114089
+ /**
114090
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
114091
+ */
112325
114092
  verificationStatus: ("unverified" | "verified" | "expired")
112326
114093
  }[]
114094
+ /**
114095
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
114096
+ */
112327
114097
  lockedUntil: (string | null)
114098
+ /**
114099
+ * When the user last signed in (ISO 8601). Null if they never have.
114100
+ */
112328
114101
  lastSignInAt: (string | null)
114102
+ /**
114103
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
114104
+ */
114105
+ primaryEmail: (string | null)
114106
+ /**
114107
+ * Whether the user must set a new password at their next sign-in.
114108
+ */
112329
114109
  requiresReset: boolean
112330
- publicMetadata: UsersUsersUnbanOutputPublicMetadata
112331
- unsafeMetadata: UsersUsersUnbanOutputPublicMetadata
112332
- privateMetadata: UsersUsersUnbanOutputPublicMetadata
112333
- emailChangeLockedUntil: (string | null)
114110
+ /**
114111
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
114112
+ */
114113
+ publicMetadata: {
114114
+ [k: string]: unknown
114115
+ }
114116
+ /**
114117
+ * Metadata the end user may write themselves. Treat it as untrusted.
114118
+ */
114119
+ unsafeMetadata: {
114120
+ [k: string]: unknown
112334
114121
  }
112335
- export interface UsersUsersUnbanOutputPublicMetadata {
114122
+ /**
114123
+ * Metadata for the management plane only. Never reaches the end user or a token.
114124
+ */
114125
+ privateMetadata: {
112336
114126
  [k: string]: unknown
112337
114127
  }
114128
+ /**
114129
+ * Id of the primary identifier row. Null when there is no primary identifier.
114130
+ */
114131
+ primaryIdentifierId: (string | null)
114132
+ /**
114133
+ * 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.
114134
+ */
114135
+ emailChangeLockedUntil: (string | null)
114136
+ }
112338
114137
 
112339
114138
  export interface UsersUsersUpdateInput {
112340
114139
  /**
@@ -112384,37 +114183,126 @@ export interface UsersUsersUpdateInputPublicMetadata1 {
112384
114183
  }
112385
114184
 
112386
114185
  export interface UsersUsersUpdateOutput {
114186
+ /**
114187
+ * Id of this end user. Pass it to any users_users_* tool.
114188
+ */
112387
114189
  id: string
114190
+ /**
114191
+ * The user's display name. Null when nobody set one.
114192
+ */
112388
114193
  name: (string | null)
114194
+ /**
114195
+ * When the user was banned (ISO 8601). Null while they are not banned.
114196
+ */
112389
114197
  bannedAt: (string | null)
114198
+ /**
114199
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
114200
+ */
112390
114201
  erasedAt: (string | null)
114202
+ /**
114203
+ * URL of the user's avatar. Null when there is none.
114204
+ */
112391
114205
  imageUrl: (string | null)
114206
+ /**
114207
+ * Whether this is a test fixture — excluded from metering and from the default listing.
114208
+ */
112392
114209
  testUser: boolean
114210
+ /**
114211
+ * When the user was created (ISO 8601).
114212
+ */
112393
114213
  createdAt: string
114214
+ /**
114215
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
114216
+ */
112394
114217
  deletedAt: (string | null)
114218
+ /**
114219
+ * Product this user belongs to. Never an input — it comes from the calling identity.
114220
+ */
112395
114221
  productId: string
114222
+ /**
114223
+ * When the user was last changed (ISO 8601).
114224
+ */
112396
114225
  updatedAt: string
114226
+ /**
114227
+ * Whether this user is still on the waitlist and cannot sign in yet.
114228
+ */
112397
114229
  waitlisted: boolean
114230
+ /**
114231
+ * 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".
114232
+ */
112398
114233
  identifiers: {
114234
+ /**
114235
+ * Id of this identifier row.
114236
+ */
112399
114237
  id: string
114238
+ /**
114239
+ * What kind of identifier this is. Today always `email`.
114240
+ */
112400
114241
  type: "email"
114242
+ /**
114243
+ * The address as the user typed it, for display.
114244
+ */
112401
114245
  value: string
114246
+ /**
114247
+ * Whether this is the identifier the user signs in with and is contacted at.
114248
+ */
112402
114249
  isPrimary: boolean
114250
+ /**
114251
+ * When this address was verified (ISO 8601). Null while it never was.
114252
+ */
112403
114253
  verifiedAt: (string | null)
114254
+ /**
114255
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
114256
+ */
112404
114257
  valueCanonical: string
114258
+ /**
114259
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
114260
+ */
112405
114261
  verificationStatus: ("unverified" | "verified" | "expired")
112406
114262
  }[]
114263
+ /**
114264
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
114265
+ */
112407
114266
  lockedUntil: (string | null)
114267
+ /**
114268
+ * When the user last signed in (ISO 8601). Null if they never have.
114269
+ */
112408
114270
  lastSignInAt: (string | null)
114271
+ /**
114272
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
114273
+ */
114274
+ primaryEmail: (string | null)
114275
+ /**
114276
+ * Whether the user must set a new password at their next sign-in.
114277
+ */
112409
114278
  requiresReset: boolean
112410
- publicMetadata: UsersUsersUpdateOutputPublicMetadata
112411
- unsafeMetadata: UsersUsersUpdateOutputPublicMetadata
112412
- privateMetadata: UsersUsersUpdateOutputPublicMetadata
112413
- emailChangeLockedUntil: (string | null)
114279
+ /**
114280
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
114281
+ */
114282
+ publicMetadata: {
114283
+ [k: string]: unknown
114284
+ }
114285
+ /**
114286
+ * Metadata the end user may write themselves. Treat it as untrusted.
114287
+ */
114288
+ unsafeMetadata: {
114289
+ [k: string]: unknown
112414
114290
  }
112415
- export interface UsersUsersUpdateOutputPublicMetadata {
114291
+ /**
114292
+ * Metadata for the management plane only. Never reaches the end user or a token.
114293
+ */
114294
+ privateMetadata: {
112416
114295
  [k: string]: unknown
112417
114296
  }
114297
+ /**
114298
+ * Id of the primary identifier row. Null when there is no primary identifier.
114299
+ */
114300
+ primaryIdentifierId: (string | null)
114301
+ /**
114302
+ * 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.
114303
+ */
114304
+ emailChangeLockedUntil: (string | null)
114305
+ }
112418
114306
 
112419
114307
  export interface UsersWaitlistFunnelInput {
112420
114308
 
@@ -112429,6 +114317,64 @@ registered: number
112429
114317
  unconfirmed: number
112430
114318
  }
112431
114319
 
114320
+ export interface UsersWaitlistGetInput {
114321
+ /**
114322
+ * The waitlisted user to read — the `userId` from `users_waitlist_list`.
114323
+ */
114324
+ userId: string
114325
+ }
114326
+
114327
+ export interface UsersWaitlistGetOutput {
114328
+ /**
114329
+ * Where in the funnel this entry is: `pending`, `invited`, `registered` or `withdrawn`.
114330
+ */
114331
+ status: ("pending" | "invited" | "registered" | "withdrawn")
114332
+ /**
114333
+ * The waitlisted user. Every users_users_* tool takes this id.
114334
+ */
114335
+ userId: string
114336
+ /**
114337
+ * When the entry joined the waitlist (ISO 8601).
114338
+ */
114339
+ createdAt: string
114340
+ /**
114341
+ * When the invite was sent (ISO 8601). Null while the entry is pending.
114342
+ */
114343
+ invitedAt: (string | null)
114344
+ /**
114345
+ * The email address that signed up.
114346
+ */
114347
+ identifier: string
114348
+ /**
114349
+ * Where the signup came from — the campaign, referrer and landing page recorded at the time.
114350
+ */
114351
+ attribution: {
114352
+ [k: string]: unknown
114353
+ }
114354
+ /**
114355
+ * When the address confirmed a double opt-in (ISO 8601). Null when it never did.
114356
+ */
114357
+ confirmedAt: (string | null)
114358
+ /**
114359
+ * When the address asked to be taken off the list (ISO 8601). Null when it did not.
114360
+ */
114361
+ withdrawnAt: (string | null)
114362
+ /**
114363
+ * What was recorded to show this address consented: when, from where, and under which wording.
114364
+ */
114365
+ consentProof: {
114366
+ [k: string]: unknown
114367
+ }
114368
+ /**
114369
+ * When the invitee finished signing up (ISO 8601). Null until they do.
114370
+ */
114371
+ registeredAt: (string | null)
114372
+ /**
114373
+ * Id of the live invite token. Null while the entry has not been invited.
114374
+ */
114375
+ inviteTokenId: (string | null)
114376
+ }
114377
+
112432
114378
  export interface UsersWaitlistImportInput {
112433
114379
  /**
112434
114380
  * The legacy signups to import, at most 500 per call — batch client-side beyond that.
@@ -112594,15 +114540,42 @@ unsafeMetadata?: {
112594
114540
  }
112595
114541
 
112596
114542
  export interface UsersWaitlistImportOutput {
114543
+ /**
114544
+ * How many could not be imported at all.
114545
+ */
112597
114546
  failed: number
114547
+ /**
114548
+ * One row per submitted row, in the order you sent them.
114549
+ */
112598
114550
  results: {
114551
+ /**
114552
+ * Zero-based index of the row in the array you sent.
114553
+ */
112599
114554
  row: number
114555
+ /**
114556
+ * Why it was skipped, or what went wrong. Null for an imported row.
114557
+ */
112600
114558
  reason: (string | null)
114559
+ /**
114560
+ * What happened to this row.
114561
+ */
112601
114562
  status: ("imported" | "skipped" | "failed")
114563
+ /**
114564
+ * The waitlisted user this row created. Null for skipped and failed rows.
114565
+ */
112602
114566
  userId: (string | null)
112603
114567
  }[]
114568
+ /**
114569
+ * How many were already on the list or otherwise passed over.
114570
+ */
112604
114571
  skipped: number
114572
+ /**
114573
+ * How many became waitlist entries.
114574
+ */
112605
114575
  imported: number
114576
+ /**
114577
+ * How many rows you submitted.
114578
+ */
112606
114579
  requested: number
112607
114580
  }
112608
114581
 
@@ -112617,12 +114590,30 @@ userIds: [string, ...(string)[]]
112617
114590
  }
112618
114591
 
112619
114592
  export interface UsersWaitlistInviteOutput {
114593
+ /**
114594
+ * How many of the requested users were invited.
114595
+ */
112620
114596
  invited: number
114597
+ /**
114598
+ * One row per user you asked for, in the order you sent them.
114599
+ */
112621
114600
  results: {
114601
+ /**
114602
+ * Why this user was skipped. Null for an invited row.
114603
+ */
112622
114604
  reason: (("suppressed" | "not_found" | "already_registered") | null)
114605
+ /**
114606
+ * Whether this user was invited or passed over.
114607
+ */
112623
114608
  status: ("invited" | "skipped")
114609
+ /**
114610
+ * The user this row is about.
114611
+ */
112624
114612
  userId: string
112625
114613
  }[]
114614
+ /**
114615
+ * How many were passed over — see each row's `reason`.
114616
+ */
112626
114617
  skipped: number
112627
114618
  }
112628
114619
 
@@ -112646,23 +114637,62 @@ confirmed?: boolean
112646
114637
  }
112647
114638
 
112648
114639
  export interface UsersWaitlistListOutput {
114640
+ /**
114641
+ * The page of waitlist entries, newest first.
114642
+ */
112649
114643
  entries: {
114644
+ /**
114645
+ * Where in the funnel this entry is: `pending`, `invited`, `registered` or `withdrawn`.
114646
+ */
112650
114647
  status: ("pending" | "invited" | "registered" | "withdrawn")
114648
+ /**
114649
+ * The waitlisted user. Every users_users_* tool takes this id.
114650
+ */
112651
114651
  userId: string
114652
+ /**
114653
+ * When the entry joined the waitlist (ISO 8601).
114654
+ */
112652
114655
  createdAt: string
114656
+ /**
114657
+ * When the invite was sent (ISO 8601). Null while the entry is pending.
114658
+ */
112653
114659
  invitedAt: (string | null)
114660
+ /**
114661
+ * The email address that signed up.
114662
+ */
112654
114663
  identifier: string
114664
+ /**
114665
+ * Where the signup came from — the campaign, referrer and landing page recorded at the time.
114666
+ */
112655
114667
  attribution: {
112656
114668
  [k: string]: unknown
112657
114669
  }
114670
+ /**
114671
+ * When the address confirmed a double opt-in (ISO 8601). Null when it never did.
114672
+ */
112658
114673
  confirmedAt: (string | null)
114674
+ /**
114675
+ * When the address asked to be taken off the list (ISO 8601). Null when it did not.
114676
+ */
112659
114677
  withdrawnAt: (string | null)
114678
+ /**
114679
+ * What was recorded to show this address consented: when, from where, and under which wording.
114680
+ */
112660
114681
  consentProof: {
112661
114682
  [k: string]: unknown
112662
114683
  }
114684
+ /**
114685
+ * When the invitee finished signing up (ISO 8601). Null until they do.
114686
+ */
112663
114687
  registeredAt: (string | null)
114688
+ /**
114689
+ * Id of the live invite token. Null while the entry has not been invited.
114690
+ */
112664
114691
  inviteTokenId: (string | null)
112665
114692
  }[]
114693
+ /**
114694
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
114695
+ */
112666
114696
  nextCursor: (string | null)
112667
114697
  }
112668
114698