@lessly/sdk-app 74.9.0 → 76.0.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
  /**
@@ -67739,7 +68558,7 @@ capturedAt: string
67739
68558
  /**
67740
68559
  * The network the channel publishes to.
67741
68560
  */
67742
- network: string
68561
+ network: ("linkedin" | "x" | "youtube" | "instagram" | "reddit")
67743
68562
  /**
67744
68563
  * What this network reports for this account. "none" means no snapshot will ever be taken — a personal Instagram profile has no API at all; "basic" means fewer numbers than a business account gets, so an absent metric is the network's silence, not a zero.
67745
68564
  */
@@ -67770,6 +68589,39 @@ limit?: number
67770
68589
  }
67771
68590
 
67772
68591
  export interface ContentMetricsPostSeriesOutput {
68592
+ /**
68593
+ * The newest snapshot as flat, named numbers — what to read when you want "how is this post doing" rather than the whole curve. Null when nothing has been captured yet.
68594
+ */
68595
+ latest: ({
68596
+ /**
68597
+ * Likes. Null when this network does not report it.
68598
+ */
68599
+ likes: (number | null)
68600
+ /**
68601
+ * Plays, on a video surface. Distinct from impressions — YouTube reports one, not both. Null when this network does not report it.
68602
+ */
68603
+ views: (number | null)
68604
+ /**
68605
+ * Clicks on the post or its link. Null when this network does not report it.
68606
+ */
68607
+ clicks: (number | null)
68608
+ /**
68609
+ * Reposts, retweets, shares — whatever the network calls passing it on. Null when this network does not report it.
68610
+ */
68611
+ shares: (number | null)
68612
+ /**
68613
+ * Comments or replies. Null when this network does not report it.
68614
+ */
68615
+ comments: (number | null)
68616
+ /**
68617
+ * ISO-8601 time this snapshot was taken.
68618
+ */
68619
+ capturedAt: string
68620
+ /**
68621
+ * Times the post was served. Null when this network does not report it.
68622
+ */
68623
+ impressions: (number | null)
68624
+ } | null)
67773
68625
  /**
67774
68626
  * Snapshots oldest first. Readings over time, not a current value: reach keeps growing for weeks. Empty means nothing has been captured yet.
67775
68627
  */
@@ -67786,9 +68638,9 @@ metrics: {
67786
68638
  capturedAt: string
67787
68639
  }[]
67788
68640
  /**
67789
- * The network the channel publishes to.
68641
+ * The network the channel publishes to. "unknown" means the channel behind this publication can no longer be read — the publication outlives the channel binding.
67790
68642
  */
67791
- network: string
68643
+ network: ("linkedin" | "x" | "youtube" | "instagram" | "reddit" | "unknown")
67792
68644
  /**
67793
68645
  * What this network reports for this account. "none" means no snapshot will ever be taken — a personal Instagram profile has no API at all; "basic" means fewer numbers than a business account gets, so an absent metric is the network's silence, not a zero.
67794
68646
  */
@@ -68298,9 +69150,9 @@ attempts: number
68298
69150
  */
68299
69151
  channelId: string
68300
69152
  /**
68301
- * Which rate produced costUsd: "plain", "link" or "free".
69153
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost is not known.
68302
69154
  */
68303
- costBasis: (string | null)
69155
+ costBasis: (("plain" | "link" | "free") | null)
68304
69156
  /**
68305
69157
  * ISO-8601 creation time.
68306
69158
  */
@@ -68329,6 +69181,10 @@ publishedAt: (string | null)
68329
69181
  * ISO-8601 time the publication is due.
68330
69182
  */
68331
69183
  scheduledAt: string
69184
+ /**
69185
+ * The publication id again, under the name the content/publication.settled event uses to report this publication finishing. Always identical to id.
69186
+ */
69187
+ publicationId: string
68332
69188
  /**
68333
69189
  * How many reminders have been sent for this publication.
68334
69190
  */
@@ -68388,9 +69244,9 @@ attempts: number
68388
69244
  */
68389
69245
  channelId: string
68390
69246
  /**
68391
- * Which rate produced costUsd: "plain", "link" or "free".
69247
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost is not known.
68392
69248
  */
68393
- costBasis: (string | null)
69249
+ costBasis: (("plain" | "link" | "free") | null)
68394
69250
  /**
68395
69251
  * ISO-8601 creation time.
68396
69252
  */
@@ -68419,6 +69275,10 @@ publishedAt: (string | null)
68419
69275
  * ISO-8601 time the publication is due.
68420
69276
  */
68421
69277
  scheduledAt: string
69278
+ /**
69279
+ * The publication id again, under the name the content/publication.settled event uses to report this publication finishing. Always identical to id.
69280
+ */
69281
+ publicationId: string
68422
69282
  /**
68423
69283
  * How many reminders have been sent for this publication.
68424
69284
  */
@@ -68470,9 +69330,9 @@ attempts: number
68470
69330
  */
68471
69331
  channelId: string
68472
69332
  /**
68473
- * Which rate produced costUsd: "plain", "link" or "free".
69333
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost is not known.
68474
69334
  */
68475
- costBasis: (string | null)
69335
+ costBasis: (("plain" | "link" | "free") | null)
68476
69336
  /**
68477
69337
  * ISO-8601 creation time.
68478
69338
  */
@@ -68501,6 +69361,10 @@ publishedAt: (string | null)
68501
69361
  * ISO-8601 time the publication is due.
68502
69362
  */
68503
69363
  scheduledAt: string
69364
+ /**
69365
+ * The publication id again, under the name the content/publication.settled event uses to report this publication finishing. Always identical to id.
69366
+ */
69367
+ publicationId: string
68504
69368
  /**
68505
69369
  * How many reminders have been sent for this publication.
68506
69370
  */
@@ -68584,9 +69448,9 @@ attempts: number
68584
69448
  */
68585
69449
  channelId: string
68586
69450
  /**
68587
- * Which rate produced costUsd: "plain", "link" or "free".
69451
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost is not known.
68588
69452
  */
68589
- costBasis: (string | null)
69453
+ costBasis: (("plain" | "link" | "free") | null)
68590
69454
  /**
68591
69455
  * ISO-8601 creation time.
68592
69456
  */
@@ -68615,6 +69479,10 @@ publishedAt: (string | null)
68615
69479
  * ISO-8601 time the publication is due.
68616
69480
  */
68617
69481
  scheduledAt: string
69482
+ /**
69483
+ * The publication id again, under the name the content/publication.settled event uses to report this publication finishing. Always identical to id.
69484
+ */
69485
+ publicationId: string
68618
69486
  /**
68619
69487
  * How many reminders have been sent for this publication.
68620
69488
  */
@@ -68679,9 +69547,9 @@ attempts: number
68679
69547
  */
68680
69548
  channelId: string
68681
69549
  /**
68682
- * Which rate produced costUsd: "plain", "link" or "free".
69550
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost is not known.
68683
69551
  */
68684
- costBasis: (string | null)
69552
+ costBasis: (("plain" | "link" | "free") | null)
68685
69553
  /**
68686
69554
  * ISO-8601 creation time.
68687
69555
  */
@@ -68710,6 +69578,10 @@ publishedAt: (string | null)
68710
69578
  * ISO-8601 time the publication is due.
68711
69579
  */
68712
69580
  scheduledAt: string
69581
+ /**
69582
+ * The publication id again, under the name the content/publication.settled event uses to report this publication finishing. Always identical to id.
69583
+ */
69584
+ publicationId: string
68713
69585
  /**
68714
69586
  * How many reminders have been sent for this publication.
68715
69587
  */
@@ -68761,9 +69633,9 @@ attempts: number
68761
69633
  */
68762
69634
  channelId: string
68763
69635
  /**
68764
- * Which rate produced costUsd: "plain", "link" or "free".
69636
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost is not known.
68765
69637
  */
68766
- costBasis: (string | null)
69638
+ costBasis: (("plain" | "link" | "free") | null)
68767
69639
  /**
68768
69640
  * ISO-8601 creation time.
68769
69641
  */
@@ -68792,6 +69664,10 @@ publishedAt: (string | null)
68792
69664
  * ISO-8601 time the publication is due.
68793
69665
  */
68794
69666
  scheduledAt: string
69667
+ /**
69668
+ * The publication id again, under the name the content/publication.settled event uses to report this publication finishing. Always identical to id.
69669
+ */
69670
+ publicationId: string
68795
69671
  /**
68796
69672
  * How many reminders have been sent for this publication.
68797
69673
  */
@@ -68847,9 +69723,9 @@ attempts: number
68847
69723
  */
68848
69724
  channelId: string
68849
69725
  /**
68850
- * Which rate produced costUsd: "plain", "link" or "free".
69726
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost is not known.
68851
69727
  */
68852
- costBasis: (string | null)
69728
+ costBasis: (("plain" | "link" | "free") | null)
68853
69729
  /**
68854
69730
  * ISO-8601 creation time.
68855
69731
  */
@@ -68878,6 +69754,10 @@ publishedAt: (string | null)
68878
69754
  * ISO-8601 time the publication is due.
68879
69755
  */
68880
69756
  scheduledAt: string
69757
+ /**
69758
+ * The publication id again, under the name the content/publication.settled event uses to report this publication finishing. Always identical to id.
69759
+ */
69760
+ publicationId: string
68881
69761
  /**
68882
69762
  * How many reminders have been sent for this publication.
68883
69763
  */
@@ -68945,9 +69825,9 @@ attempts: number
68945
69825
  */
68946
69826
  channelId: string
68947
69827
  /**
68948
- * Which rate produced costUsd: "plain", "link" or "free".
69828
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost is not known.
68949
69829
  */
68950
- costBasis: (string | null)
69830
+ costBasis: (("plain" | "link" | "free") | null)
68951
69831
  /**
68952
69832
  * ISO-8601 creation time.
68953
69833
  */
@@ -68976,6 +69856,10 @@ publishedAt: (string | null)
68976
69856
  * ISO-8601 time the publication is due.
68977
69857
  */
68978
69858
  scheduledAt: string
69859
+ /**
69860
+ * The publication id again, under the name the content/publication.settled event uses to report this publication finishing. Always identical to id.
69861
+ */
69862
+ publicationId: string
68979
69863
  /**
68980
69864
  * How many reminders have been sent for this publication.
68981
69865
  */
@@ -70899,6 +71783,10 @@ scheduledAt?: string
70899
71783
  }
70900
71784
 
70901
71785
  export interface ContentPublicationsValidateOutput {
71786
+ /**
71787
+ * True when nothing blocks scheduling. False when any channel carries an issue of severity "error" — the same fact as the issue list below, stated once so it can be branched on.
71788
+ */
71789
+ ok: boolean
70902
71790
  /**
70903
71791
  * The post that was checked.
70904
71792
  */
@@ -70916,9 +71804,9 @@ text: string
70916
71804
  */
70917
71805
  issues: {
70918
71806
  /**
70919
- * Stable machine code: text_empty, text_too_long, too_many_media, link_not_supported, media_missing, media_not_ready, media_not_supported, cost_unknown, daily_ceiling_exceeded.
71807
+ * Stable machine code for what is wrong: text_empty, text_too_long, too_many_media, link_not_supported, multiple_links, media_missing, media_not_ready, media_not_supported, video_required, cost_unknown, daily_ceiling_exceeded.
70920
71808
  */
70921
- code: string
71809
+ code: ("text_empty" | "text_too_long" | "too_many_media" | "link_not_supported" | "multiple_links" | "media_missing" | "media_not_ready" | "media_not_supported" | "video_required" | "cost_unknown" | "daily_ceiling_exceeded")
70922
71810
  /**
70923
71811
  * Which input the issue is about, when it is about one.
70924
71812
  */
@@ -70956,15 +71844,15 @@ costUsd: (number | null)
70956
71844
  /**
70957
71845
  * The network behind that channel.
70958
71846
  */
70959
- network: string
71847
+ network: ("linkedin" | "x" | "youtube" | "instagram" | "reddit")
70960
71848
  /**
70961
71849
  * The channel this result is for.
70962
71850
  */
70963
71851
  channelId: string
70964
71852
  /**
70965
- * Which rate produced costUsd: "plain", "link" or "free".
71853
+ * Which rate produced costUsd: `plain` the flat per-post rate, `link` the higher rate a post carrying a link is charged, `free` a channel whose rates are both zero. Null when the cost cannot be computed.
70966
71854
  */
70967
- costBasis: (string | null)
71855
+ costBasis: (("plain" | "link" | "free") | null)
70968
71856
  /**
70969
71857
  * The channel as a person sees it.
70970
71858
  */
@@ -70974,6 +71862,14 @@ displayName: string
70974
71862
  */
70975
71863
  renderedText: string
70976
71864
  }[]
71865
+ /**
71866
+ * How many error-severity issues there are across every channel. Warnings are not counted: they do not block scheduling.
71867
+ */
71868
+ errorCount: number
71869
+ /**
71870
+ * The first error message in report order, ready to show a person or put in a notification. Null when there are no errors.
71871
+ */
71872
+ firstErrorMessage: (string | null)
70977
71873
  }
70978
71874
 
70979
71875
  export interface DeploymentAlertCreateInput {
@@ -87694,6 +88590,378 @@ export interface OrganizationYoutubeInstallOutput {
87694
88590
  url: string
87695
88591
  }
87696
88592
 
88593
+ export interface PlaygroundAnalyticsOverviewInput {
88594
+ /**
88595
+ * Max records per entity in recent[]; omit for the endpoint default
88596
+ */
88597
+ limit?: number
88598
+ }
88599
+
88600
+ export interface PlaygroundAnalyticsOverviewOutput {
88601
+ ok: boolean
88602
+ minted: boolean
88603
+ overview?: unknown
88604
+ http_status: number
88605
+ }
88606
+
88607
+ export interface PlaygroundBillingEntitlementsInput {
88608
+
88609
+ }
88610
+
88611
+ export interface PlaygroundBillingEntitlementsOutput {
88612
+ ok: boolean
88613
+ minted: boolean
88614
+ http_status: number
88615
+ entitlements?: unknown
88616
+ }
88617
+
88618
+ export interface PlaygroundBillingRecordUsageInput {
88619
+ /**
88620
+ * Quantity of events to record against playground-events (SUM); defaults to 1
88621
+ */
88622
+ value?: number
88623
+ }
88624
+
88625
+ export interface PlaygroundBillingRecordUsageOutput {
88626
+ minted: boolean
88627
+ accepted: (number | null)
88628
+ recorded: boolean
88629
+ duplicates: (number | null)
88630
+ http_status: number
88631
+ }
88632
+
88633
+ export interface PlaygroundClickupCreateTaskInput {
88634
+ /**
88635
+ * Task title; defaults to a fixture label
88636
+ */
88637
+ name?: string
88638
+ /**
88639
+ * ClickUp list id; falls back to CLICKUP_TEST_LIST_ID
88640
+ */
88641
+ listId?: string
88642
+ }
88643
+
88644
+ export interface PlaygroundClickupCreateTaskOutput {
88645
+ minted: boolean
88646
+ task_id: (string | null)
88647
+ list_status: number
88648
+ vend_status: number
88649
+ clickup_status: number
88650
+ installation_count: number
88651
+ }
88652
+
88653
+ export interface PlaygroundClickupGetLastWebhookInput {
88654
+
88655
+ }
88656
+
88657
+ export type PlaygroundClickupGetLastWebhookOutput = ({
88658
+ payload: string
88659
+ event_id: string
88660
+ provider: string
88661
+ verified: boolean
88662
+ product_id: string
88663
+ occurred_at: string
88664
+ connector_id: string
88665
+ clickup_event: (string | null)
88666
+ receipt_count: number
88667
+ } | {
88668
+ found: false
88669
+ })
88670
+
88671
+ export interface PlaygroundClickupGetOverviewInput {
88672
+
88673
+ }
88674
+
88675
+ export interface PlaygroundClickupGetOverviewOutput {
88676
+ team: ({
88677
+ teamId: string
88678
+ teamName: string
88679
+ } | null)
88680
+ lists: PlaygroundClickupGetOverviewOutputItems[]
88681
+ tasks: {
88682
+ id: string
88683
+ name: string
88684
+ status: (string | null)
88685
+ }[]
88686
+ minted: boolean
88687
+ spaces: PlaygroundClickupGetOverviewOutputItems[]
88688
+ list_status: number
88689
+ vend_status: number
88690
+ lists_status: number
88691
+ tasks_status: number
88692
+ spaces_status: number
88693
+ folders_status: number
88694
+ installation_count: number
88695
+ }
88696
+ export interface PlaygroundClickupGetOverviewOutputItems {
88697
+ id: string
88698
+ name: string
88699
+ }
88700
+
88701
+ export interface PlaygroundEchoPingInput {
88702
+ /**
88703
+ * The text to echo back, 1–1024 characters
88704
+ */
88705
+ message: string
88706
+ }
88707
+
88708
+ export interface PlaygroundEchoPingOutput {
88709
+ /**
88710
+ * The message exactly as it was received
88711
+ */
88712
+ message: string
88713
+ /**
88714
+ * The product the call was resolved to
88715
+ */
88716
+ productId: string
88717
+ /**
88718
+ * ISO-8601 instant (UTC) at which the call reached the service
88719
+ */
88720
+ receivedAt: string
88721
+ }
88722
+
88723
+ export interface PlaygroundGdriveGetLastChangeInput {
88724
+
88725
+ }
88726
+
88727
+ export type PlaygroundGdriveGetLastChangeOutput = ({
88728
+ file_id: string
88729
+ removed: boolean
88730
+ file_name: (string | null)
88731
+ mime_type: (string | null)
88732
+ product_id: string
88733
+ occurred_at: string
88734
+ connector_id: string
88735
+ resource_state: string
88736
+ } | {
88737
+ found: false
88738
+ })
88739
+
88740
+ export interface PlaygroundGdriveReadFileInput {
88741
+ /**
88742
+ * Drive file id; falls back to GDRIVE_TEST_FILE_ID, then the first picked file
88743
+ */
88744
+ fileId?: string
88745
+ }
88746
+
88747
+ export interface PlaygroundGdriveReadFileOutput {
88748
+ minted: boolean
88749
+ file_id: (string | null)
88750
+ file_name: (string | null)
88751
+ mime_type: (string | null)
88752
+ file_count: number
88753
+ get_status: number
88754
+ list_status: number
88755
+ vend_status: number
88756
+ content_bytes: (number | null)
88757
+ }
88758
+
88759
+ export interface PlaygroundGoogleadsReadCustomerInput {
88760
+
88761
+ }
88762
+
88763
+ export interface PlaygroundGoogleadsReadCustomerOutput {
88764
+ minted: boolean
88765
+ vended: boolean
88766
+ customer_id: (string | null)
88767
+ vend_status: number
88768
+ result_count: number
88769
+ search_status: number
88770
+ login_customer_id: (string | null)
88771
+ }
88772
+
88773
+ export interface PlaygroundLifecycleGetStateInput {
88774
+
88775
+ }
88776
+
88777
+ export interface PlaygroundLifecycleGetStateOutput {
88778
+ blocked: boolean
88779
+ archived: boolean
88780
+ productId: string
88781
+ lastBlockTransition: ({
88782
+ eventId: string
88783
+ eventName: string
88784
+ productId: string
88785
+ occurredAt: string
88786
+ recordedAt: string
88787
+ receiptCount: number
88788
+ organizationId: string
88789
+ cascadedFromOrg: boolean
88790
+ } | null)
88791
+ lastArchiveTransition: ({
88792
+ eventId: string
88793
+ eventName: string
88794
+ productId: string
88795
+ occurredAt: string
88796
+ recordedAt: string
88797
+ receiptCount: number
88798
+ organizationId: string
88799
+ cascadedFromOrg: boolean
88800
+ } | null)
88801
+ }
88802
+
88803
+ export interface PlaygroundLifecycleListEventsInput {
88804
+
88805
+ }
88806
+
88807
+ export type PlaygroundLifecycleListEventsOutput = {
88808
+ eventId: string
88809
+ eventName: string
88810
+ productId: string
88811
+ occurredAt: string
88812
+ recordedAt: string
88813
+ receiptCount: number
88814
+ organizationId: string
88815
+ cascadedFromOrg: boolean
88816
+ }[]
88817
+
88818
+ export interface PlaygroundWebhookGetLastInput {
88819
+
88820
+ }
88821
+
88822
+ export type PlaygroundWebhookGetLastOutput = ({
88823
+ payload?: unknown
88824
+ event_id: string
88825
+ provider: string
88826
+ verified: boolean
88827
+ product_id: string
88828
+ occurred_at: string
88829
+ connector_id: string
88830
+ delivery_count: number
88831
+ } | {
88832
+ found: false
88833
+ })
88834
+
88835
+ export interface PlaygroundWorkflowEchoInput {
88836
+ /**
88837
+ * The text to store, 1–1024 characters
88838
+ */
88839
+ note: string
88840
+ /**
88841
+ * Optional labels stored alongside the note, at most 20
88842
+ *
88843
+ * @maxItems 20
88844
+ */
88845
+ tags?: []|[string]|[string, string]|[string, string, string]|[string, string, string, string]|[string, string, string, string, string]|[string, string, string, string, string, string]|[string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string]|[string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string]
88846
+ }
88847
+
88848
+ export interface PlaygroundWorkflowEchoOutput {
88849
+ /**
88850
+ * Identifier of the stored echo
88851
+ */
88852
+ id: string
88853
+ /**
88854
+ * The note exactly as it was received
88855
+ */
88856
+ note: string
88857
+ /**
88858
+ * The tags exactly as they were received
88859
+ */
88860
+ tags: string[]
88861
+ /**
88862
+ * Correlation id for this echo. The playground/workflow.echoed event published about two seconds later repeats it, which is how a composer matches the completion back to this step.
88863
+ */
88864
+ echo_id: string
88865
+ /**
88866
+ * ISO-8601 instant (UTC) at which the echo was stored
88867
+ */
88868
+ received_at: string
88869
+ }
88870
+
88871
+ export interface PlaygroundWorkflowEchoListInput {
88872
+
88873
+ }
88874
+
88875
+ export type PlaygroundWorkflowEchoListOutput = {
88876
+ /**
88877
+ * Identifier of the stored echo
88878
+ */
88879
+ id: string
88880
+ /**
88881
+ * The note exactly as it was received
88882
+ */
88883
+ note: string
88884
+ /**
88885
+ * The tags exactly as they were received
88886
+ */
88887
+ tags: string[]
88888
+ /**
88889
+ * ISO-8601 instant (UTC) at which the echo was stored
88890
+ */
88891
+ received_at: string
88892
+ }[]
88893
+
88894
+ export interface PlaygroundWorkflowPingInput {
88895
+ /**
88896
+ * Class of ping, echoed on the emitted event and filterable on the trigger. Defaults to 'manual'.
88897
+ */
88898
+ kind?: string
88899
+ }
88900
+
88901
+ export interface PlaygroundWorkflowPingOutput {
88902
+ /**
88903
+ * Correlation id for this ping. The emitted playground/workflow.ping event repeats it, which is how a composer matches the event back to this step.
88904
+ */
88905
+ id: string
88906
+ /**
88907
+ * The name of the event that was published
88908
+ */
88909
+ event: string
88910
+ }
88911
+
88912
+ export interface PlaygroundWorkflowSubjectsListInput {
88913
+ /**
88914
+ * How many subjects to return, 1–100. Defaults to 25.
88915
+ */
88916
+ limit?: number
88917
+ /**
88918
+ * The next_cursor of the previous page. Opaque — pass it back unchanged. Omit for the first page.
88919
+ */
88920
+ cursor?: string
88921
+ /**
88922
+ * ISO-8601 UTC instant. Return only subjects whose last_activity_at is AT OR AFTER this — the opposite question, the recently active population. Omit for no lower bound.
88923
+ */
88924
+ last_activity_after?: string
88925
+ /**
88926
+ * ISO-8601 UTC instant. Return only subjects whose last_activity_at is AT OR BEFORE this — the "inactive for N days" question: pass now minus N days. Omit for no upper bound.
88927
+ */
88928
+ last_activity_before?: string
88929
+ }
88930
+
88931
+ export interface PlaygroundWorkflowSubjectsListOutput {
88932
+ /**
88933
+ * This page of subjects, most recently active first
88934
+ */
88935
+ items: {
88936
+ /**
88937
+ * Stable identifier for the subject. This is the field a batch trigger keys on, so a subject already served in an earlier run is skipped rather than served twice.
88938
+ */
88939
+ subject_key: string
88940
+ /**
88941
+ * Human-readable name of the subject
88942
+ */
88943
+ display_name: string
88944
+ /**
88945
+ * ISO-8601 instant (UTC) of the subject last activity
88946
+ */
88947
+ last_activity_at: string
88948
+ }[]
88949
+ /**
88950
+ * Whether another page follows. False and a null next_cursor both mark the last page, so a consumer that loops on either terminates.
88951
+ */
88952
+ has_more: boolean
88953
+ /**
88954
+ * Pass back as `cursor` to fetch the next page; null on the last page. Always null when has_more is false.
88955
+ */
88956
+ next_cursor: (string | null)
88957
+ }
88958
+
88959
+ export interface PlaygroundWsEchoInput {
88960
+
88961
+ }
88962
+
88963
+ export type PlaygroundWsEchoOutput = unknown;
88964
+
87697
88965
  export interface RealtimeArchiveExportInput {
87698
88966
  /**
87699
88967
  * Only entries with ts <= to_ts (epoch ms)
@@ -109749,13 +111017,37 @@ type: ("server" | "publishable")
109749
111017
  }
109750
111018
 
109751
111019
  export interface UsersApikeysCreateOutput {
111020
+ /**
111021
+ * Id of the key. Pass it to users_apikeys_revoke.
111022
+ */
109752
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
+ */
109753
111027
  key: string
111028
+ /**
111029
+ * The label a human gave this key — which backend or environment holds it.
111030
+ */
109754
111031
  name: string
111032
+ /**
111033
+ * `server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
111034
+ */
109755
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
+ */
109756
111039
  value: (string | null)
111040
+ /**
111041
+ * `usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
111042
+ */
109757
111043
  prefix: string
111044
+ /**
111045
+ * When the key was issued (ISO 8601).
111046
+ */
109758
111047
  createdAt: string
111048
+ /**
111049
+ * When the key was revoked (ISO 8601). Null while it still works.
111050
+ */
109759
111051
  revokedAt: (string | null)
109760
111052
  }
109761
111053
 
@@ -109765,12 +111057,33 @@ export interface UsersApikeysListInput {
109765
111057
 
109766
111058
  export interface UsersApikeysListOutput {
109767
111059
  keys: {
111060
+ /**
111061
+ * Id of the key. Pass it to users_apikeys_revoke.
111062
+ */
109768
111063
  id: string
111064
+ /**
111065
+ * The label a human gave this key — which backend or environment holds it.
111066
+ */
109769
111067
  name: string
111068
+ /**
111069
+ * `server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
111070
+ */
109770
111071
  type: ("server" | "publishable")
111072
+ /**
111073
+ * 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.
111074
+ */
109771
111075
  value: (string | null)
111076
+ /**
111077
+ * `usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
111078
+ */
109772
111079
  prefix: string
111080
+ /**
111081
+ * When the key was issued (ISO 8601).
111082
+ */
109773
111083
  createdAt: string
111084
+ /**
111085
+ * When the key was revoked (ISO 8601). Null while it still works.
111086
+ */
109774
111087
  revokedAt: (string | null)
109775
111088
  }[]
109776
111089
  }
@@ -109783,7 +111096,13 @@ id: string
109783
111096
  }
109784
111097
 
109785
111098
  export interface UsersApikeysRevokeOutput {
111099
+ /**
111100
+ * Id of the key that was revoked.
111101
+ */
109786
111102
  id: string
111103
+ /**
111104
+ * Always true — revocation is immediate and final.
111105
+ */
109787
111106
  revoked: true
109788
111107
  }
109789
111108
 
@@ -109819,21 +111138,60 @@ targetType?: string
109819
111138
  }
109820
111139
 
109821
111140
  export interface UsersAuditListOutput {
111141
+ /**
111142
+ * The page of audit events, newest first.
111143
+ */
109822
111144
  events: {
111145
+ /**
111146
+ * Id of this audit row.
111147
+ */
109823
111148
  id: string
111149
+ /**
111150
+ * IP the action came from. Null when it was not an HTTP action.
111151
+ */
109824
111152
  ip: (string | null)
111153
+ /**
111154
+ * What happened, as a dotted name — `user.created`, `passkey.deleted`, `email_change.override_applied`.
111155
+ */
109825
111156
  action: string
111157
+ /**
111158
+ * Id of the actor. Null for a system action.
111159
+ */
109826
111160
  actorId: (string | null)
111161
+ /**
111162
+ * Action-specific detail — the reason text, counts, whatever the action recorded.
111163
+ */
109827
111164
  metadata: {
109828
111165
  [k: string]: unknown
109829
111166
  }
111167
+ /**
111168
+ * Id of the row the action was about. Null when there was none.
111169
+ */
109830
111170
  targetId: (string | null)
111171
+ /**
111172
+ * Who acted: `operator` (a human or agent on the management plane), `end_user`, or `system`.
111173
+ */
109831
111174
  actorType: ("operator" | "system" | "end_user")
111175
+ /**
111176
+ * When the action happened (ISO 8601).
111177
+ */
109832
111178
  createdAt: string
111179
+ /**
111180
+ * Product the audited action happened in.
111181
+ */
109833
111182
  productId: string
111183
+ /**
111184
+ * User agent the action came from. Null when none was sent.
111185
+ */
109834
111186
  userAgent: (string | null)
111187
+ /**
111188
+ * What kind of row the action was about — `user` or `product`. Null when it was about nothing in particular.
111189
+ */
109835
111190
  targetType: (string | null)
109836
111191
  }[]
111192
+ /**
111193
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
111194
+ */
109837
111195
  nextCursor: (string | null)
109838
111196
  }
109839
111197
 
@@ -110816,12 +112174,33 @@ userId: string
110816
112174
  }
110817
112175
 
110818
112176
  export interface UsersFactorsListOutput {
112177
+ /**
112178
+ * Every second factor this user has — types and status only, never material.
112179
+ */
110819
112180
  factors: {
112181
+ /**
112182
+ * Kind of second factor: `totp` or `backup_codes`. No key material is ever returned.
112183
+ */
110820
112184
  type: ("totp" | "backup_codes" | "webauthn")
112185
+ /**
112186
+ * Whether this factor is enrolled and usable, or still pending verification.
112187
+ */
110821
112188
  status: ("unverified" | "verified")
112189
+ /**
112190
+ * When the factor was enrolled (ISO 8601).
112191
+ */
110822
112192
  createdAt: string
112193
+ /**
112194
+ * `backup_codes` only: how many of the batch are still unspent. Null for any other factor type.
112195
+ */
110823
112196
  remaining: (number | null)
112197
+ /**
112198
+ * When the factor was last used to sign in (ISO 8601). Null if it never was.
112199
+ */
110824
112200
  lastUsedAt: (string | null)
112201
+ /**
112202
+ * When the user first proved the factor works (ISO 8601). Null while it is unverified.
112203
+ */
110825
112204
  verifiedAt: (string | null)
110826
112205
  }[]
110827
112206
  }
@@ -110838,7 +112217,13 @@ userId: string
110838
112217
  }
110839
112218
 
110840
112219
  export interface UsersFactorsResetOutput {
112220
+ /**
112221
+ * Id of the scheduled reset. The same value arrives on `users/mfa.reset-settled`, which is what finishes this step.
112222
+ */
110841
112223
  requestId: string
112224
+ /**
112225
+ * When the removal happens, if nobody aborts it first (ISO 8601). The delay is this product's, not a fixed one.
112226
+ */
110842
112227
  scheduledFor: string
110843
112228
  }
110844
112229
 
@@ -111174,9 +112559,18 @@ export interface UsersPasskeysRevokeOutput {
111174
112559
  * Present when the revoke was refused — today, only because it was the last way in.
111175
112560
  */
111176
112561
  error: ({
112562
+ /**
112563
+ * Why it was refused. Today only `passkey_last_way_in`.
112564
+ */
111177
112565
  code: string
112566
+ /**
112567
+ * The refusal in a sentence, safe to show a human.
112568
+ */
111178
112569
  message: string
111179
112570
  } | null)
112571
+ /**
112572
+ * `deleted` when the credential is gone, `failed` when the revoke was refused.
112573
+ */
111180
112574
  status: ("deleted" | "failed")
111181
112575
  }
111182
112576
 
@@ -111188,7 +112582,13 @@ sessionId: string
111188
112582
  }
111189
112583
 
111190
112584
  export interface UsersSessionsGetOutput {
112585
+ /**
112586
+ * Id of this session. Pass it to users_sessions_revoke.
112587
+ */
111191
112588
  id: string
112589
+ /**
112590
+ * IP the session was opened from. Null when it was not recorded.
112591
+ */
111192
112592
  ip: (string | null)
111193
112593
  /**
111194
112594
  * `aal2` only if a verified second factor completed.
@@ -111198,18 +112598,42 @@ aal: ("aal1" | "aal2")
111198
112598
  * The factors this session was established with.
111199
112599
  */
111200
112600
  amr: string[]
112601
+ /**
112602
+ * Whether the session is still usable, expired, or revoked.
112603
+ */
111201
112604
  status: ("active" | "revoked")
112605
+ /**
112606
+ * The end user this session belongs to.
112607
+ */
111202
112608
  userId: string
112609
+ /**
112610
+ * When the session was opened (ISO 8601).
112611
+ */
111203
112612
  createdAt: string
112613
+ /**
112614
+ * When the current token stops working unless refreshed (ISO 8601).
112615
+ */
111204
112616
  expiresAt: string
112617
+ /**
112618
+ * When the session was revoked (ISO 8601). Null while it is live.
112619
+ */
111205
112620
  revokedAt: (string | null)
112621
+ /**
112622
+ * User agent the session was opened from. Null when none was sent.
112623
+ */
111206
112624
  userAgent: (string | null)
111207
112625
  revokedReason: (string | null)
111208
112626
  /**
111209
112627
  * The operator behind an impersonated session, or null for an ordinary one.
111210
112628
  */
111211
112629
  impersonatedBy: (string | null)
112630
+ /**
112631
+ * When the session last refreshed its tokens (ISO 8601). Null if it never has.
112632
+ */
111212
112633
  lastRefreshedAt: (string | null)
112634
+ /**
112635
+ * When the session ends no matter how often it refreshes (ISO 8601).
112636
+ */
111213
112637
  absoluteExpiresAt: string
111214
112638
  }
111215
112639
 
@@ -111249,16 +112673,49 @@ userId: string
111249
112673
  }
111250
112674
 
111251
112675
  export interface UsersSessionsListOutput {
112676
+ /**
112677
+ * The sessions matching the filter, newest first.
112678
+ */
111252
112679
  sessions: {
112680
+ /**
112681
+ * Id of this session. Pass it to users_sessions_revoke.
112682
+ */
111253
112683
  id: string
112684
+ /**
112685
+ * IP the session was opened from. Null when it was not recorded.
112686
+ */
111254
112687
  ip: (string | null)
112688
+ /**
112689
+ * Whether the session is still usable, expired, or revoked.
112690
+ */
111255
112691
  status: ("active" | "revoked")
112692
+ /**
112693
+ * The end user this session belongs to.
112694
+ */
111256
112695
  userId: string
112696
+ /**
112697
+ * When the session was opened (ISO 8601).
112698
+ */
111257
112699
  createdAt: string
112700
+ /**
112701
+ * When the current token stops working unless refreshed (ISO 8601).
112702
+ */
111258
112703
  expiresAt: string
112704
+ /**
112705
+ * When the session was revoked (ISO 8601). Null while it is live.
112706
+ */
111259
112707
  revokedAt: (string | null)
112708
+ /**
112709
+ * User agent the session was opened from. Null when none was sent.
112710
+ */
111260
112711
  userAgent: (string | null)
112712
+ /**
112713
+ * When the session last refreshed its tokens (ISO 8601). Null if it never has.
112714
+ */
111261
112715
  lastRefreshedAt: (string | null)
112716
+ /**
112717
+ * When the session ends no matter how often it refreshes (ISO 8601).
112718
+ */
111262
112719
  absoluteExpiresAt: string
111263
112720
  }[]
111264
112721
  }
@@ -111275,6 +112732,9 @@ sessionId?: string
111275
112732
  }
111276
112733
 
111277
112734
  export interface UsersSessionsRevokeOutput {
112735
+ /**
112736
+ * How many sessions were revoked. Zero when there was nothing live to revoke.
112737
+ */
111278
112738
  revoked: number
111279
112739
  }
111280
112740
 
@@ -111401,37 +112861,126 @@ userId: string
111401
112861
  }
111402
112862
 
111403
112863
  export interface UsersUsersBanOutput {
112864
+ /**
112865
+ * Id of this end user. Pass it to any users_users_* tool.
112866
+ */
111404
112867
  id: string
112868
+ /**
112869
+ * The user's display name. Null when nobody set one.
112870
+ */
111405
112871
  name: (string | null)
112872
+ /**
112873
+ * When the user was banned (ISO 8601). Null while they are not banned.
112874
+ */
111406
112875
  bannedAt: (string | null)
112876
+ /**
112877
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
112878
+ */
111407
112879
  erasedAt: (string | null)
112880
+ /**
112881
+ * URL of the user's avatar. Null when there is none.
112882
+ */
111408
112883
  imageUrl: (string | null)
112884
+ /**
112885
+ * Whether this is a test fixture — excluded from metering and from the default listing.
112886
+ */
111409
112887
  testUser: boolean
112888
+ /**
112889
+ * When the user was created (ISO 8601).
112890
+ */
111410
112891
  createdAt: string
112892
+ /**
112893
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
112894
+ */
111411
112895
  deletedAt: (string | null)
112896
+ /**
112897
+ * Product this user belongs to. Never an input — it comes from the calling identity.
112898
+ */
111412
112899
  productId: string
112900
+ /**
112901
+ * When the user was last changed (ISO 8601).
112902
+ */
111413
112903
  updatedAt: string
112904
+ /**
112905
+ * Whether this user is still on the waitlist and cannot sign in yet.
112906
+ */
111414
112907
  waitlisted: boolean
112908
+ /**
112909
+ * 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".
112910
+ */
111415
112911
  identifiers: {
112912
+ /**
112913
+ * Id of this identifier row.
112914
+ */
111416
112915
  id: string
112916
+ /**
112917
+ * What kind of identifier this is. Today always `email`.
112918
+ */
111417
112919
  type: "email"
112920
+ /**
112921
+ * The address as the user typed it, for display.
112922
+ */
111418
112923
  value: string
112924
+ /**
112925
+ * Whether this is the identifier the user signs in with and is contacted at.
112926
+ */
111419
112927
  isPrimary: boolean
112928
+ /**
112929
+ * When this address was verified (ISO 8601). Null while it never was.
112930
+ */
111420
112931
  verifiedAt: (string | null)
112932
+ /**
112933
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
112934
+ */
111421
112935
  valueCanonical: string
112936
+ /**
112937
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
112938
+ */
111422
112939
  verificationStatus: ("unverified" | "verified" | "expired")
111423
112940
  }[]
112941
+ /**
112942
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
112943
+ */
111424
112944
  lockedUntil: (string | null)
112945
+ /**
112946
+ * When the user last signed in (ISO 8601). Null if they never have.
112947
+ */
111425
112948
  lastSignInAt: (string | null)
112949
+ /**
112950
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
112951
+ */
112952
+ primaryEmail: (string | null)
112953
+ /**
112954
+ * Whether the user must set a new password at their next sign-in.
112955
+ */
111426
112956
  requiresReset: boolean
111427
- publicMetadata: UsersUsersBanOutputPublicMetadata
111428
- unsafeMetadata: UsersUsersBanOutputPublicMetadata
111429
- privateMetadata: UsersUsersBanOutputPublicMetadata
111430
- emailChangeLockedUntil: (string | null)
112957
+ /**
112958
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
112959
+ */
112960
+ publicMetadata: {
112961
+ [k: string]: unknown
112962
+ }
112963
+ /**
112964
+ * Metadata the end user may write themselves. Treat it as untrusted.
112965
+ */
112966
+ unsafeMetadata: {
112967
+ [k: string]: unknown
111431
112968
  }
111432
- export interface UsersUsersBanOutputPublicMetadata {
112969
+ /**
112970
+ * Metadata for the management plane only. Never reaches the end user or a token.
112971
+ */
112972
+ privateMetadata: {
111433
112973
  [k: string]: unknown
111434
112974
  }
112975
+ /**
112976
+ * Id of the primary identifier row. Null when there is no primary identifier.
112977
+ */
112978
+ primaryIdentifierId: (string | null)
112979
+ /**
112980
+ * 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.
112981
+ */
112982
+ emailChangeLockedUntil: (string | null)
112983
+ }
111435
112984
 
111436
112985
  export interface UsersUsersCreateInput {
111437
112986
  /**
@@ -111534,37 +113083,126 @@ export interface UsersUsersCreateInputPublicMetadata1 {
111534
113083
  }
111535
113084
 
111536
113085
  export interface UsersUsersCreateOutput {
113086
+ /**
113087
+ * Id of this end user. Pass it to any users_users_* tool.
113088
+ */
111537
113089
  id: string
113090
+ /**
113091
+ * The user's display name. Null when nobody set one.
113092
+ */
111538
113093
  name: (string | null)
113094
+ /**
113095
+ * When the user was banned (ISO 8601). Null while they are not banned.
113096
+ */
111539
113097
  bannedAt: (string | null)
113098
+ /**
113099
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113100
+ */
111540
113101
  erasedAt: (string | null)
113102
+ /**
113103
+ * URL of the user's avatar. Null when there is none.
113104
+ */
111541
113105
  imageUrl: (string | null)
113106
+ /**
113107
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113108
+ */
111542
113109
  testUser: boolean
113110
+ /**
113111
+ * When the user was created (ISO 8601).
113112
+ */
111543
113113
  createdAt: string
113114
+ /**
113115
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113116
+ */
111544
113117
  deletedAt: (string | null)
113118
+ /**
113119
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113120
+ */
111545
113121
  productId: string
113122
+ /**
113123
+ * When the user was last changed (ISO 8601).
113124
+ */
111546
113125
  updatedAt: string
113126
+ /**
113127
+ * Whether this user is still on the waitlist and cannot sign in yet.
113128
+ */
111547
113129
  waitlisted: boolean
113130
+ /**
113131
+ * 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".
113132
+ */
111548
113133
  identifiers: {
113134
+ /**
113135
+ * Id of this identifier row.
113136
+ */
111549
113137
  id: string
113138
+ /**
113139
+ * What kind of identifier this is. Today always `email`.
113140
+ */
111550
113141
  type: "email"
113142
+ /**
113143
+ * The address as the user typed it, for display.
113144
+ */
111551
113145
  value: string
113146
+ /**
113147
+ * Whether this is the identifier the user signs in with and is contacted at.
113148
+ */
111552
113149
  isPrimary: boolean
113150
+ /**
113151
+ * When this address was verified (ISO 8601). Null while it never was.
113152
+ */
111553
113153
  verifiedAt: (string | null)
113154
+ /**
113155
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113156
+ */
111554
113157
  valueCanonical: string
113158
+ /**
113159
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113160
+ */
111555
113161
  verificationStatus: ("unverified" | "verified" | "expired")
111556
113162
  }[]
113163
+ /**
113164
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113165
+ */
111557
113166
  lockedUntil: (string | null)
113167
+ /**
113168
+ * When the user last signed in (ISO 8601). Null if they never have.
113169
+ */
111558
113170
  lastSignInAt: (string | null)
113171
+ /**
113172
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113173
+ */
113174
+ primaryEmail: (string | null)
113175
+ /**
113176
+ * Whether the user must set a new password at their next sign-in.
113177
+ */
111559
113178
  requiresReset: boolean
111560
- publicMetadata: UsersUsersCreateOutputPublicMetadata
111561
- unsafeMetadata: UsersUsersCreateOutputPublicMetadata
111562
- privateMetadata: UsersUsersCreateOutputPublicMetadata
111563
- emailChangeLockedUntil: (string | null)
113179
+ /**
113180
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113181
+ */
113182
+ publicMetadata: {
113183
+ [k: string]: unknown
113184
+ }
113185
+ /**
113186
+ * Metadata the end user may write themselves. Treat it as untrusted.
113187
+ */
113188
+ unsafeMetadata: {
113189
+ [k: string]: unknown
111564
113190
  }
111565
- export interface UsersUsersCreateOutputPublicMetadata {
113191
+ /**
113192
+ * Metadata for the management plane only. Never reaches the end user or a token.
113193
+ */
113194
+ privateMetadata: {
111566
113195
  [k: string]: unknown
111567
113196
  }
113197
+ /**
113198
+ * Id of the primary identifier row. Null when there is no primary identifier.
113199
+ */
113200
+ primaryIdentifierId: (string | null)
113201
+ /**
113202
+ * 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.
113203
+ */
113204
+ emailChangeLockedUntil: (string | null)
113205
+ }
111568
113206
 
111569
113207
  export interface UsersUsersDeleteInput {
111570
113208
  /**
@@ -111574,37 +113212,126 @@ userId: string
111574
113212
  }
111575
113213
 
111576
113214
  export interface UsersUsersDeleteOutput {
113215
+ /**
113216
+ * Id of this end user. Pass it to any users_users_* tool.
113217
+ */
111577
113218
  id: string
113219
+ /**
113220
+ * The user's display name. Null when nobody set one.
113221
+ */
111578
113222
  name: (string | null)
113223
+ /**
113224
+ * When the user was banned (ISO 8601). Null while they are not banned.
113225
+ */
111579
113226
  bannedAt: (string | null)
113227
+ /**
113228
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113229
+ */
111580
113230
  erasedAt: (string | null)
113231
+ /**
113232
+ * URL of the user's avatar. Null when there is none.
113233
+ */
111581
113234
  imageUrl: (string | null)
113235
+ /**
113236
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113237
+ */
111582
113238
  testUser: boolean
113239
+ /**
113240
+ * When the user was created (ISO 8601).
113241
+ */
111583
113242
  createdAt: string
113243
+ /**
113244
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113245
+ */
111584
113246
  deletedAt: (string | null)
113247
+ /**
113248
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113249
+ */
111585
113250
  productId: string
113251
+ /**
113252
+ * When the user was last changed (ISO 8601).
113253
+ */
111586
113254
  updatedAt: string
113255
+ /**
113256
+ * Whether this user is still on the waitlist and cannot sign in yet.
113257
+ */
111587
113258
  waitlisted: boolean
113259
+ /**
113260
+ * 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".
113261
+ */
111588
113262
  identifiers: {
113263
+ /**
113264
+ * Id of this identifier row.
113265
+ */
111589
113266
  id: string
113267
+ /**
113268
+ * What kind of identifier this is. Today always `email`.
113269
+ */
111590
113270
  type: "email"
113271
+ /**
113272
+ * The address as the user typed it, for display.
113273
+ */
111591
113274
  value: string
113275
+ /**
113276
+ * Whether this is the identifier the user signs in with and is contacted at.
113277
+ */
111592
113278
  isPrimary: boolean
113279
+ /**
113280
+ * When this address was verified (ISO 8601). Null while it never was.
113281
+ */
111593
113282
  verifiedAt: (string | null)
113283
+ /**
113284
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113285
+ */
111594
113286
  valueCanonical: string
113287
+ /**
113288
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113289
+ */
111595
113290
  verificationStatus: ("unverified" | "verified" | "expired")
111596
113291
  }[]
113292
+ /**
113293
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113294
+ */
111597
113295
  lockedUntil: (string | null)
113296
+ /**
113297
+ * When the user last signed in (ISO 8601). Null if they never have.
113298
+ */
111598
113299
  lastSignInAt: (string | null)
113300
+ /**
113301
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113302
+ */
113303
+ primaryEmail: (string | null)
113304
+ /**
113305
+ * Whether the user must set a new password at their next sign-in.
113306
+ */
111599
113307
  requiresReset: boolean
111600
- publicMetadata: UsersUsersDeleteOutputPublicMetadata
111601
- unsafeMetadata: UsersUsersDeleteOutputPublicMetadata
111602
- privateMetadata: UsersUsersDeleteOutputPublicMetadata
111603
- emailChangeLockedUntil: (string | null)
113308
+ /**
113309
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113310
+ */
113311
+ publicMetadata: {
113312
+ [k: string]: unknown
111604
113313
  }
111605
- export interface UsersUsersDeleteOutputPublicMetadata {
113314
+ /**
113315
+ * Metadata the end user may write themselves. Treat it as untrusted.
113316
+ */
113317
+ unsafeMetadata: {
111606
113318
  [k: string]: unknown
111607
113319
  }
113320
+ /**
113321
+ * Metadata for the management plane only. Never reaches the end user or a token.
113322
+ */
113323
+ privateMetadata: {
113324
+ [k: string]: unknown
113325
+ }
113326
+ /**
113327
+ * Id of the primary identifier row. Null when there is no primary identifier.
113328
+ */
113329
+ primaryIdentifierId: (string | null)
113330
+ /**
113331
+ * 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.
113332
+ */
113333
+ emailChangeLockedUntil: (string | null)
113334
+ }
111608
113335
 
111609
113336
  export interface UsersUsersExportInput {
111610
113337
  /**
@@ -111632,40 +113359,129 @@ includeDeleted?: boolean
111632
113359
  export interface UsersUsersExportOutput {
111633
113360
  count: number
111634
113361
  users: {
113362
+ /**
113363
+ * Id of this end user. Pass it to any users_users_* tool.
113364
+ */
111635
113365
  id: string
113366
+ /**
113367
+ * The user's display name. Null when nobody set one.
113368
+ */
111636
113369
  name: (string | null)
113370
+ /**
113371
+ * When the user was banned (ISO 8601). Null while they are not banned.
113372
+ */
111637
113373
  bannedAt: (string | null)
113374
+ /**
113375
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113376
+ */
111638
113377
  erasedAt: (string | null)
113378
+ /**
113379
+ * URL of the user's avatar. Null when there is none.
113380
+ */
111639
113381
  imageUrl: (string | null)
113382
+ /**
113383
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113384
+ */
111640
113385
  testUser: boolean
113386
+ /**
113387
+ * When the user was created (ISO 8601).
113388
+ */
111641
113389
  createdAt: string
113390
+ /**
113391
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113392
+ */
111642
113393
  deletedAt: (string | null)
113394
+ /**
113395
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113396
+ */
111643
113397
  productId: string
113398
+ /**
113399
+ * When the user was last changed (ISO 8601).
113400
+ */
111644
113401
  updatedAt: string
113402
+ /**
113403
+ * Whether this user is still on the waitlist and cannot sign in yet.
113404
+ */
111645
113405
  waitlisted: boolean
113406
+ /**
113407
+ * 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".
113408
+ */
111646
113409
  identifiers: {
113410
+ /**
113411
+ * Id of this identifier row.
113412
+ */
111647
113413
  id: string
113414
+ /**
113415
+ * What kind of identifier this is. Today always `email`.
113416
+ */
111648
113417
  type: "email"
113418
+ /**
113419
+ * The address as the user typed it, for display.
113420
+ */
111649
113421
  value: string
113422
+ /**
113423
+ * Whether this is the identifier the user signs in with and is contacted at.
113424
+ */
111650
113425
  isPrimary: boolean
113426
+ /**
113427
+ * When this address was verified (ISO 8601). Null while it never was.
113428
+ */
111651
113429
  verifiedAt: (string | null)
113430
+ /**
113431
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113432
+ */
111652
113433
  valueCanonical: string
113434
+ /**
113435
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113436
+ */
111653
113437
  verificationStatus: ("unverified" | "verified" | "expired")
111654
113438
  }[]
113439
+ /**
113440
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113441
+ */
111655
113442
  lockedUntil: (string | null)
113443
+ /**
113444
+ * When the user last signed in (ISO 8601). Null if they never have.
113445
+ */
111656
113446
  lastSignInAt: (string | null)
113447
+ /**
113448
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113449
+ */
113450
+ primaryEmail: (string | null)
113451
+ /**
113452
+ * Whether the user must set a new password at their next sign-in.
113453
+ */
111657
113454
  requiresReset: boolean
111658
- publicMetadata: UsersUsersExportOutputPublicMetadata
111659
- unsafeMetadata: UsersUsersExportOutputPublicMetadata
111660
- privateMetadata: UsersUsersExportOutputPublicMetadata
113455
+ /**
113456
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113457
+ */
113458
+ publicMetadata: {
113459
+ [k: string]: unknown
113460
+ }
113461
+ /**
113462
+ * Metadata the end user may write themselves. Treat it as untrusted.
113463
+ */
113464
+ unsafeMetadata: {
113465
+ [k: string]: unknown
113466
+ }
113467
+ /**
113468
+ * Metadata for the management plane only. Never reaches the end user or a token.
113469
+ */
113470
+ privateMetadata: {
113471
+ [k: string]: unknown
113472
+ }
113473
+ /**
113474
+ * Id of the primary identifier row. Null when there is no primary identifier.
113475
+ */
113476
+ primaryIdentifierId: (string | null)
113477
+ /**
113478
+ * 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.
113479
+ */
111661
113480
  emailChangeLockedUntil: (string | null)
111662
113481
  }[]
111663
113482
  exportedAt: string
111664
113483
  nextCursor: (string | null)
111665
113484
  }
111666
- export interface UsersUsersExportOutputPublicMetadata {
111667
- [k: string]: unknown
111668
- }
111669
113485
 
111670
113486
  export interface UsersUsersGetInput {
111671
113487
  /**
@@ -111675,37 +113491,126 @@ userId: string
111675
113491
  }
111676
113492
 
111677
113493
  export interface UsersUsersGetOutput {
113494
+ /**
113495
+ * Id of this end user. Pass it to any users_users_* tool.
113496
+ */
111678
113497
  id: string
113498
+ /**
113499
+ * The user's display name. Null when nobody set one.
113500
+ */
111679
113501
  name: (string | null)
113502
+ /**
113503
+ * When the user was banned (ISO 8601). Null while they are not banned.
113504
+ */
111680
113505
  bannedAt: (string | null)
113506
+ /**
113507
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113508
+ */
111681
113509
  erasedAt: (string | null)
113510
+ /**
113511
+ * URL of the user's avatar. Null when there is none.
113512
+ */
111682
113513
  imageUrl: (string | null)
113514
+ /**
113515
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113516
+ */
111683
113517
  testUser: boolean
113518
+ /**
113519
+ * When the user was created (ISO 8601).
113520
+ */
111684
113521
  createdAt: string
113522
+ /**
113523
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113524
+ */
111685
113525
  deletedAt: (string | null)
113526
+ /**
113527
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113528
+ */
111686
113529
  productId: string
113530
+ /**
113531
+ * When the user was last changed (ISO 8601).
113532
+ */
111687
113533
  updatedAt: string
113534
+ /**
113535
+ * Whether this user is still on the waitlist and cannot sign in yet.
113536
+ */
111688
113537
  waitlisted: boolean
113538
+ /**
113539
+ * 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".
113540
+ */
111689
113541
  identifiers: {
113542
+ /**
113543
+ * Id of this identifier row.
113544
+ */
111690
113545
  id: string
113546
+ /**
113547
+ * What kind of identifier this is. Today always `email`.
113548
+ */
111691
113549
  type: "email"
113550
+ /**
113551
+ * The address as the user typed it, for display.
113552
+ */
111692
113553
  value: string
113554
+ /**
113555
+ * Whether this is the identifier the user signs in with and is contacted at.
113556
+ */
111693
113557
  isPrimary: boolean
113558
+ /**
113559
+ * When this address was verified (ISO 8601). Null while it never was.
113560
+ */
111694
113561
  verifiedAt: (string | null)
113562
+ /**
113563
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113564
+ */
111695
113565
  valueCanonical: string
113566
+ /**
113567
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113568
+ */
111696
113569
  verificationStatus: ("unverified" | "verified" | "expired")
111697
113570
  }[]
113571
+ /**
113572
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113573
+ */
111698
113574
  lockedUntil: (string | null)
113575
+ /**
113576
+ * When the user last signed in (ISO 8601). Null if they never have.
113577
+ */
111699
113578
  lastSignInAt: (string | null)
113579
+ /**
113580
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113581
+ */
113582
+ primaryEmail: (string | null)
113583
+ /**
113584
+ * Whether the user must set a new password at their next sign-in.
113585
+ */
111700
113586
  requiresReset: boolean
111701
- publicMetadata: UsersUsersGetOutputPublicMetadata
111702
- unsafeMetadata: UsersUsersGetOutputPublicMetadata
111703
- privateMetadata: UsersUsersGetOutputPublicMetadata
111704
- emailChangeLockedUntil: (string | null)
113587
+ /**
113588
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113589
+ */
113590
+ publicMetadata: {
113591
+ [k: string]: unknown
111705
113592
  }
111706
- export interface UsersUsersGetOutputPublicMetadata {
113593
+ /**
113594
+ * Metadata the end user may write themselves. Treat it as untrusted.
113595
+ */
113596
+ unsafeMetadata: {
111707
113597
  [k: string]: unknown
111708
113598
  }
113599
+ /**
113600
+ * Metadata for the management plane only. Never reaches the end user or a token.
113601
+ */
113602
+ privateMetadata: {
113603
+ [k: string]: unknown
113604
+ }
113605
+ /**
113606
+ * Id of the primary identifier row. Null when there is no primary identifier.
113607
+ */
113608
+ primaryIdentifierId: (string | null)
113609
+ /**
113610
+ * 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.
113611
+ */
113612
+ emailChangeLockedUntil: (string | null)
113613
+ }
111709
113614
 
111710
113615
  export interface UsersUsersImportInput {
111711
113616
  /**
@@ -111718,15 +113623,42 @@ users: [unknown, ...(unknown)[]]
111718
113623
  }
111719
113624
 
111720
113625
  export interface UsersUsersImportOutput {
113626
+ /**
113627
+ * How many rows could not be imported at all.
113628
+ */
111721
113629
  failed: number
113630
+ /**
113631
+ * How many users were created.
113632
+ */
111722
113633
  created: number
113634
+ /**
113635
+ * One row per submitted row, in the order you sent them.
113636
+ */
111723
113637
  results: {
113638
+ /**
113639
+ * Zero-based index of the row in the `users` array you sent.
113640
+ */
111724
113641
  row: number
113642
+ /**
113643
+ * Why it was skipped, or what went wrong. Null for a created row.
113644
+ */
111725
113645
  reason: (string | null)
113646
+ /**
113647
+ * What happened to this row.
113648
+ */
111726
113649
  status: ("created" | "skipped" | "failed")
113650
+ /**
113651
+ * The created user's id. Null for skipped and failed rows.
113652
+ */
111727
113653
  userId: (string | null)
111728
113654
  }[]
113655
+ /**
113656
+ * How many rows were passed over — an address already in the directory, typically.
113657
+ */
111729
113658
  skipped: number
113659
+ /**
113660
+ * How many rows you submitted.
113661
+ */
111730
113662
  requested: number
111731
113663
  }
111732
113664
 
@@ -111754,9 +113686,21 @@ privateMetadata?: {
111754
113686
  }
111755
113687
 
111756
113688
  export interface UsersUsersInviteOutput {
113689
+ /**
113690
+ * False when the re-invite cooldown or the mail toolkit refused the send. The invite is still live.
113691
+ */
111757
113692
  mailed: boolean
113693
+ /**
113694
+ * The invited user, created immediately and listed straight away — they simply cannot sign in until they accept.
113695
+ */
111758
113696
  userId: string
113697
+ /**
113698
+ * False when this address had already been invited; the same user is returned.
113699
+ */
111759
113700
  created: boolean
113701
+ /**
113702
+ * When the invite link stops working (ISO 8601).
113703
+ */
111760
113704
  expiresAt: string
111761
113705
  }
111762
113706
 
@@ -111792,40 +113736,135 @@ includeWaitlisted?: boolean
111792
113736
  }
111793
113737
 
111794
113738
  export interface UsersUsersListOutput {
113739
+ /**
113740
+ * The page of users, newest first.
113741
+ */
111795
113742
  users: {
113743
+ /**
113744
+ * Id of this end user. Pass it to any users_users_* tool.
113745
+ */
111796
113746
  id: string
113747
+ /**
113748
+ * The user's display name. Null when nobody set one.
113749
+ */
111797
113750
  name: (string | null)
113751
+ /**
113752
+ * When the user was banned (ISO 8601). Null while they are not banned.
113753
+ */
111798
113754
  bannedAt: (string | null)
113755
+ /**
113756
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113757
+ */
111799
113758
  erasedAt: (string | null)
113759
+ /**
113760
+ * URL of the user's avatar. Null when there is none.
113761
+ */
111800
113762
  imageUrl: (string | null)
113763
+ /**
113764
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113765
+ */
111801
113766
  testUser: boolean
113767
+ /**
113768
+ * When the user was created (ISO 8601).
113769
+ */
111802
113770
  createdAt: string
113771
+ /**
113772
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113773
+ */
111803
113774
  deletedAt: (string | null)
113775
+ /**
113776
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113777
+ */
111804
113778
  productId: string
113779
+ /**
113780
+ * When the user was last changed (ISO 8601).
113781
+ */
111805
113782
  updatedAt: string
113783
+ /**
113784
+ * Whether this user is still on the waitlist and cannot sign in yet.
113785
+ */
111806
113786
  waitlisted: boolean
113787
+ /**
113788
+ * 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".
113789
+ */
111807
113790
  identifiers: {
113791
+ /**
113792
+ * Id of this identifier row.
113793
+ */
111808
113794
  id: string
113795
+ /**
113796
+ * What kind of identifier this is. Today always `email`.
113797
+ */
111809
113798
  type: "email"
113799
+ /**
113800
+ * The address as the user typed it, for display.
113801
+ */
111810
113802
  value: string
113803
+ /**
113804
+ * Whether this is the identifier the user signs in with and is contacted at.
113805
+ */
111811
113806
  isPrimary: boolean
113807
+ /**
113808
+ * When this address was verified (ISO 8601). Null while it never was.
113809
+ */
111812
113810
  verifiedAt: (string | null)
113811
+ /**
113812
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113813
+ */
111813
113814
  valueCanonical: string
113815
+ /**
113816
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113817
+ */
111814
113818
  verificationStatus: ("unverified" | "verified" | "expired")
111815
113819
  }[]
113820
+ /**
113821
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113822
+ */
111816
113823
  lockedUntil: (string | null)
113824
+ /**
113825
+ * When the user last signed in (ISO 8601). Null if they never have.
113826
+ */
111817
113827
  lastSignInAt: (string | null)
113828
+ /**
113829
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113830
+ */
113831
+ primaryEmail: (string | null)
113832
+ /**
113833
+ * Whether the user must set a new password at their next sign-in.
113834
+ */
111818
113835
  requiresReset: boolean
111819
- publicMetadata: UsersUsersListOutputPublicMetadata
111820
- unsafeMetadata: UsersUsersListOutputPublicMetadata
111821
- privateMetadata: UsersUsersListOutputPublicMetadata
113836
+ /**
113837
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113838
+ */
113839
+ publicMetadata: {
113840
+ [k: string]: unknown
113841
+ }
113842
+ /**
113843
+ * Metadata the end user may write themselves. Treat it as untrusted.
113844
+ */
113845
+ unsafeMetadata: {
113846
+ [k: string]: unknown
113847
+ }
113848
+ /**
113849
+ * Metadata for the management plane only. Never reaches the end user or a token.
113850
+ */
113851
+ privateMetadata: {
113852
+ [k: string]: unknown
113853
+ }
113854
+ /**
113855
+ * Id of the primary identifier row. Null when there is no primary identifier.
113856
+ */
113857
+ primaryIdentifierId: (string | null)
113858
+ /**
113859
+ * 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.
113860
+ */
111822
113861
  emailChangeLockedUntil: (string | null)
111823
113862
  }[]
113863
+ /**
113864
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
113865
+ */
111824
113866
  nextCursor: (string | null)
111825
113867
  }
111826
- export interface UsersUsersListOutputPublicMetadata {
111827
- [k: string]: unknown
111828
- }
111829
113868
 
111830
113869
  export interface UsersUsersSetPrimaryIdentifierInput {
111831
113870
  /**
@@ -111843,7 +113882,13 @@ userId: string
111843
113882
  }
111844
113883
 
111845
113884
  export interface UsersUsersSetPrimaryIdentifierOutput {
113885
+ /**
113886
+ * Id of the scheduled change. It appears in the audit rows and in the abort link mailed to the old address.
113887
+ */
111846
113888
  requestId: string
113889
+ /**
113890
+ * When the swap becomes applicable, if nobody aborts it first (ISO 8601). The delay is this product's `emailChange.overrideDelayHours`, 72 by default.
113891
+ */
111847
113892
  scheduledFor: string
111848
113893
  }
111849
113894
 
@@ -111855,37 +113900,126 @@ userId: string
111855
113900
  }
111856
113901
 
111857
113902
  export interface UsersUsersUnbanOutput {
113903
+ /**
113904
+ * Id of this end user. Pass it to any users_users_* tool.
113905
+ */
111858
113906
  id: string
113907
+ /**
113908
+ * The user's display name. Null when nobody set one.
113909
+ */
111859
113910
  name: (string | null)
113911
+ /**
113912
+ * When the user was banned (ISO 8601). Null while they are not banned.
113913
+ */
111860
113914
  bannedAt: (string | null)
113915
+ /**
113916
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
113917
+ */
111861
113918
  erasedAt: (string | null)
113919
+ /**
113920
+ * URL of the user's avatar. Null when there is none.
113921
+ */
111862
113922
  imageUrl: (string | null)
113923
+ /**
113924
+ * Whether this is a test fixture — excluded from metering and from the default listing.
113925
+ */
111863
113926
  testUser: boolean
113927
+ /**
113928
+ * When the user was created (ISO 8601).
113929
+ */
111864
113930
  createdAt: string
113931
+ /**
113932
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
113933
+ */
111865
113934
  deletedAt: (string | null)
113935
+ /**
113936
+ * Product this user belongs to. Never an input — it comes from the calling identity.
113937
+ */
111866
113938
  productId: string
113939
+ /**
113940
+ * When the user was last changed (ISO 8601).
113941
+ */
111867
113942
  updatedAt: string
113943
+ /**
113944
+ * Whether this user is still on the waitlist and cannot sign in yet.
113945
+ */
111868
113946
  waitlisted: boolean
113947
+ /**
113948
+ * 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".
113949
+ */
111869
113950
  identifiers: {
113951
+ /**
113952
+ * Id of this identifier row.
113953
+ */
111870
113954
  id: string
113955
+ /**
113956
+ * What kind of identifier this is. Today always `email`.
113957
+ */
111871
113958
  type: "email"
113959
+ /**
113960
+ * The address as the user typed it, for display.
113961
+ */
111872
113962
  value: string
113963
+ /**
113964
+ * Whether this is the identifier the user signs in with and is contacted at.
113965
+ */
111873
113966
  isPrimary: boolean
113967
+ /**
113968
+ * When this address was verified (ISO 8601). Null while it never was.
113969
+ */
111874
113970
  verifiedAt: (string | null)
113971
+ /**
113972
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
113973
+ */
111875
113974
  valueCanonical: string
113975
+ /**
113976
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
113977
+ */
111876
113978
  verificationStatus: ("unverified" | "verified" | "expired")
111877
113979
  }[]
113980
+ /**
113981
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
113982
+ */
111878
113983
  lockedUntil: (string | null)
113984
+ /**
113985
+ * When the user last signed in (ISO 8601). Null if they never have.
113986
+ */
111879
113987
  lastSignInAt: (string | null)
113988
+ /**
113989
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
113990
+ */
113991
+ primaryEmail: (string | null)
113992
+ /**
113993
+ * Whether the user must set a new password at their next sign-in.
113994
+ */
111880
113995
  requiresReset: boolean
111881
- publicMetadata: UsersUsersUnbanOutputPublicMetadata
111882
- unsafeMetadata: UsersUsersUnbanOutputPublicMetadata
111883
- privateMetadata: UsersUsersUnbanOutputPublicMetadata
111884
- emailChangeLockedUntil: (string | null)
113996
+ /**
113997
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
113998
+ */
113999
+ publicMetadata: {
114000
+ [k: string]: unknown
114001
+ }
114002
+ /**
114003
+ * Metadata the end user may write themselves. Treat it as untrusted.
114004
+ */
114005
+ unsafeMetadata: {
114006
+ [k: string]: unknown
111885
114007
  }
111886
- export interface UsersUsersUnbanOutputPublicMetadata {
114008
+ /**
114009
+ * Metadata for the management plane only. Never reaches the end user or a token.
114010
+ */
114011
+ privateMetadata: {
111887
114012
  [k: string]: unknown
111888
114013
  }
114014
+ /**
114015
+ * Id of the primary identifier row. Null when there is no primary identifier.
114016
+ */
114017
+ primaryIdentifierId: (string | null)
114018
+ /**
114019
+ * 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.
114020
+ */
114021
+ emailChangeLockedUntil: (string | null)
114022
+ }
111889
114023
 
111890
114024
  export interface UsersUsersUpdateInput {
111891
114025
  /**
@@ -111935,37 +114069,126 @@ export interface UsersUsersUpdateInputPublicMetadata1 {
111935
114069
  }
111936
114070
 
111937
114071
  export interface UsersUsersUpdateOutput {
114072
+ /**
114073
+ * Id of this end user. Pass it to any users_users_* tool.
114074
+ */
111938
114075
  id: string
114076
+ /**
114077
+ * The user's display name. Null when nobody set one.
114078
+ */
111939
114079
  name: (string | null)
114080
+ /**
114081
+ * When the user was banned (ISO 8601). Null while they are not banned.
114082
+ */
111940
114083
  bannedAt: (string | null)
114084
+ /**
114085
+ * When this user's personal data was purged for good (ISO 8601). Null while it is intact.
114086
+ */
111941
114087
  erasedAt: (string | null)
114088
+ /**
114089
+ * URL of the user's avatar. Null when there is none.
114090
+ */
111942
114091
  imageUrl: (string | null)
114092
+ /**
114093
+ * Whether this is a test fixture — excluded from metering and from the default listing.
114094
+ */
111943
114095
  testUser: boolean
114096
+ /**
114097
+ * When the user was created (ISO 8601).
114098
+ */
111944
114099
  createdAt: string
114100
+ /**
114101
+ * When the user was soft-deleted (ISO 8601). Null while the account is live.
114102
+ */
111945
114103
  deletedAt: (string | null)
114104
+ /**
114105
+ * Product this user belongs to. Never an input — it comes from the calling identity.
114106
+ */
111946
114107
  productId: string
114108
+ /**
114109
+ * When the user was last changed (ISO 8601).
114110
+ */
111947
114111
  updatedAt: string
114112
+ /**
114113
+ * Whether this user is still on the waitlist and cannot sign in yet.
114114
+ */
111948
114115
  waitlisted: boolean
114116
+ /**
114117
+ * 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".
114118
+ */
111949
114119
  identifiers: {
114120
+ /**
114121
+ * Id of this identifier row.
114122
+ */
111950
114123
  id: string
114124
+ /**
114125
+ * What kind of identifier this is. Today always `email`.
114126
+ */
111951
114127
  type: "email"
114128
+ /**
114129
+ * The address as the user typed it, for display.
114130
+ */
111952
114131
  value: string
114132
+ /**
114133
+ * Whether this is the identifier the user signs in with and is contacted at.
114134
+ */
111953
114135
  isPrimary: boolean
114136
+ /**
114137
+ * When this address was verified (ISO 8601). Null while it never was.
114138
+ */
111954
114139
  verifiedAt: (string | null)
114140
+ /**
114141
+ * The address lowercased and NFC-normalised — what uniqueness is checked against.
114142
+ */
111955
114143
  valueCanonical: string
114144
+ /**
114145
+ * `unverified`, `verified`, or `expired` when a verification link ran out before it was used.
114146
+ */
111956
114147
  verificationStatus: ("unverified" | "verified" | "expired")
111957
114148
  }[]
114149
+ /**
114150
+ * When a failed-attempt lockout expires (ISO 8601). Null when the user is not locked out.
114151
+ */
111958
114152
  lockedUntil: (string | null)
114153
+ /**
114154
+ * When the user last signed in (ISO 8601). Null if they never have.
114155
+ */
111959
114156
  lastSignInAt: (string | null)
114157
+ /**
114158
+ * The user's primary email address, as typed. Null when they have no primary identifier. Bind this rather than `identifiers.0.value`.
114159
+ */
114160
+ primaryEmail: (string | null)
114161
+ /**
114162
+ * Whether the user must set a new password at their next sign-in.
114163
+ */
111960
114164
  requiresReset: boolean
111961
- publicMetadata: UsersUsersUpdateOutputPublicMetadata
111962
- unsafeMetadata: UsersUsersUpdateOutputPublicMetadata
111963
- privateMetadata: UsersUsersUpdateOutputPublicMetadata
111964
- emailChangeLockedUntil: (string | null)
114165
+ /**
114166
+ * Metadata the end user may read; the only bag projected into their access token. Capped at 1.2 KB.
114167
+ */
114168
+ publicMetadata: {
114169
+ [k: string]: unknown
111965
114170
  }
111966
- export interface UsersUsersUpdateOutputPublicMetadata {
114171
+ /**
114172
+ * Metadata the end user may write themselves. Treat it as untrusted.
114173
+ */
114174
+ unsafeMetadata: {
114175
+ [k: string]: unknown
114176
+ }
114177
+ /**
114178
+ * Metadata for the management plane only. Never reaches the end user or a token.
114179
+ */
114180
+ privateMetadata: {
111967
114181
  [k: string]: unknown
111968
114182
  }
114183
+ /**
114184
+ * Id of the primary identifier row. Null when there is no primary identifier.
114185
+ */
114186
+ primaryIdentifierId: (string | null)
114187
+ /**
114188
+ * 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.
114189
+ */
114190
+ emailChangeLockedUntil: (string | null)
114191
+ }
111969
114192
 
111970
114193
  export interface UsersWaitlistFunnelInput {
111971
114194
 
@@ -112145,15 +114368,42 @@ unsafeMetadata?: {
112145
114368
  }
112146
114369
 
112147
114370
  export interface UsersWaitlistImportOutput {
114371
+ /**
114372
+ * How many could not be imported at all.
114373
+ */
112148
114374
  failed: number
114375
+ /**
114376
+ * One row per submitted row, in the order you sent them.
114377
+ */
112149
114378
  results: {
114379
+ /**
114380
+ * Zero-based index of the row in the array you sent.
114381
+ */
112150
114382
  row: number
114383
+ /**
114384
+ * Why it was skipped, or what went wrong. Null for an imported row.
114385
+ */
112151
114386
  reason: (string | null)
114387
+ /**
114388
+ * What happened to this row.
114389
+ */
112152
114390
  status: ("imported" | "skipped" | "failed")
114391
+ /**
114392
+ * The waitlisted user this row created. Null for skipped and failed rows.
114393
+ */
112153
114394
  userId: (string | null)
112154
114395
  }[]
114396
+ /**
114397
+ * How many were already on the list or otherwise passed over.
114398
+ */
112155
114399
  skipped: number
114400
+ /**
114401
+ * How many became waitlist entries.
114402
+ */
112156
114403
  imported: number
114404
+ /**
114405
+ * How many rows you submitted.
114406
+ */
112157
114407
  requested: number
112158
114408
  }
112159
114409
 
@@ -112168,12 +114418,30 @@ userIds: [string, ...(string)[]]
112168
114418
  }
112169
114419
 
112170
114420
  export interface UsersWaitlistInviteOutput {
114421
+ /**
114422
+ * How many of the requested users were invited.
114423
+ */
112171
114424
  invited: number
114425
+ /**
114426
+ * One row per user you asked for, in the order you sent them.
114427
+ */
112172
114428
  results: {
114429
+ /**
114430
+ * Why this user was skipped. Null for an invited row.
114431
+ */
112173
114432
  reason: (("suppressed" | "not_found" | "already_registered") | null)
114433
+ /**
114434
+ * Whether this user was invited or passed over.
114435
+ */
112174
114436
  status: ("invited" | "skipped")
114437
+ /**
114438
+ * The user this row is about.
114439
+ */
112175
114440
  userId: string
112176
114441
  }[]
114442
+ /**
114443
+ * How many were passed over — see each row's `reason`.
114444
+ */
112177
114445
  skipped: number
112178
114446
  }
112179
114447
 
@@ -112197,23 +114465,62 @@ confirmed?: boolean
112197
114465
  }
112198
114466
 
112199
114467
  export interface UsersWaitlistListOutput {
114468
+ /**
114469
+ * The page of waitlist entries, newest first.
114470
+ */
112200
114471
  entries: {
114472
+ /**
114473
+ * Where in the funnel this entry is: `pending`, `invited`, `registered` or `withdrawn`.
114474
+ */
112201
114475
  status: ("pending" | "invited" | "registered" | "withdrawn")
114476
+ /**
114477
+ * The waitlisted user. Every users_users_* tool takes this id.
114478
+ */
112202
114479
  userId: string
114480
+ /**
114481
+ * When the entry joined the waitlist (ISO 8601).
114482
+ */
112203
114483
  createdAt: string
114484
+ /**
114485
+ * When the invite was sent (ISO 8601). Null while the entry is pending.
114486
+ */
112204
114487
  invitedAt: (string | null)
114488
+ /**
114489
+ * The email address that signed up.
114490
+ */
112205
114491
  identifier: string
114492
+ /**
114493
+ * Where the signup came from — the campaign, referrer and landing page recorded at the time.
114494
+ */
112206
114495
  attribution: {
112207
114496
  [k: string]: unknown
112208
114497
  }
114498
+ /**
114499
+ * When the address confirmed a double opt-in (ISO 8601). Null when it never did.
114500
+ */
112209
114501
  confirmedAt: (string | null)
114502
+ /**
114503
+ * When the address asked to be taken off the list (ISO 8601). Null when it did not.
114504
+ */
112210
114505
  withdrawnAt: (string | null)
114506
+ /**
114507
+ * What was recorded to show this address consented: when, from where, and under which wording.
114508
+ */
112211
114509
  consentProof: {
112212
114510
  [k: string]: unknown
112213
114511
  }
114512
+ /**
114513
+ * When the invitee finished signing up (ISO 8601). Null until they do.
114514
+ */
112214
114515
  registeredAt: (string | null)
114516
+ /**
114517
+ * Id of the live invite token. Null while the entry has not been invited.
114518
+ */
112215
114519
  inviteTokenId: (string | null)
112216
114520
  }[]
114521
+ /**
114522
+ * Pass back as `cursor` to fetch the next page. Null when this page is the last.
114523
+ */
112217
114524
  nextCursor: (string | null)
112218
114525
  }
112219
114526