@lessly/sdk-app 16.0.0 → 17.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.
Files changed (53) hide show
  1. package/dist/analytics/index.d.cts +1 -1
  2. package/dist/analytics/index.d.ts +1 -1
  3. package/dist/brain/index.cjs +5 -0
  4. package/dist/brain/index.cjs.map +1 -1
  5. package/dist/brain/index.d.cts +6 -2
  6. package/dist/brain/index.d.ts +6 -2
  7. package/dist/brain/index.js +5 -1
  8. package/dist/brain/index.js.map +1 -1
  9. package/dist/{client.gen-lpkpZleM.d.cts → client.gen-DYlVp4ZF.d.cts} +232 -3042
  10. package/dist/{client.gen-lpkpZleM.d.ts → client.gen-DYlVp4ZF.d.ts} +232 -3042
  11. package/dist/consent/index.d.cts +1 -1
  12. package/dist/consent/index.d.ts +1 -1
  13. package/dist/deployment/index.d.cts +1 -1
  14. package/dist/deployment/index.d.ts +1 -1
  15. package/dist/index.cjs +13 -846
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +13 -846
  20. package/dist/index.js.map +1 -1
  21. package/dist/mail/index.d.cts +2 -2
  22. package/dist/mail/index.d.ts +2 -2
  23. package/dist/organization/index.d.cts +1 -1
  24. package/dist/organization/index.d.ts +1 -1
  25. package/dist/realtime/index.d.cts +1 -1
  26. package/dist/realtime/index.d.ts +1 -1
  27. package/dist/tracking/index.d.cts +1 -1
  28. package/dist/tracking/index.d.ts +1 -1
  29. package/dist/waitlist/index.d.cts +1 -1
  30. package/dist/waitlist/index.d.ts +1 -1
  31. package/package.json +2 -12
  32. package/src/gen/bindings.gen.ts +13 -846
  33. package/src/gen/brain/index.ts +1 -1
  34. package/src/gen/brain/queryOptions.gen.ts +7 -0
  35. package/src/gen/client.gen.ts +5 -210
  36. package/src/gen/manifest.gen.ts +1 -1
  37. package/src/gen/types.gen.ts +96 -2923
  38. package/dist/playground/index.cjs +0 -66
  39. package/dist/playground/index.cjs.map +0 -1
  40. package/dist/playground/index.d.cts +0 -52
  41. package/dist/playground/index.d.ts +0 -52
  42. package/dist/playground/index.js +0 -53
  43. package/dist/playground/index.js.map +0 -1
  44. package/dist/users/index.cjs +0 -216
  45. package/dist/users/index.cjs.map +0 -1
  46. package/dist/users/index.d.cts +0 -172
  47. package/dist/users/index.d.ts +0 -172
  48. package/dist/users/index.js +0 -173
  49. package/dist/users/index.js.map +0 -1
  50. package/src/gen/playground/index.ts +0 -3
  51. package/src/gen/playground/queryOptions.gen.ts +0 -86
  52. package/src/gen/users/index.ts +0 -3
  53. package/src/gen/users/queryOptions.gen.ts +0 -268
@@ -1028,6 +1028,98 @@ snapshotId: string
1028
1028
  preRestoreSnapshotId: (string | null)
1029
1029
  } | null)
1030
1030
 
1031
+ export interface BrainUsageReportInput {
1032
+ /**
1033
+ * How many UTC days of this product's ledger to return, ending today (default 30, max 90)
1034
+ */
1035
+ days?: number
1036
+ }
1037
+
1038
+ export interface BrainUsageReportOutput {
1039
+ note: string
1040
+ /**
1041
+ * Brain's own ledger, for THIS product only
1042
+ */
1043
+ product: {
1044
+ /**
1045
+ * Inclusive UTC end of the window (today), YYYY-MM-DD
1046
+ */
1047
+ to: string
1048
+ /**
1049
+ * The window actually used, after clamping
1050
+ */
1051
+ days: number
1052
+ /**
1053
+ * Inclusive UTC start of the window, YYYY-MM-DD
1054
+ */
1055
+ from: string
1056
+ rows: {
1057
+ /**
1058
+ * 'sync' | 'batch'; '' when the push carried none
1059
+ */
1060
+ mode: string
1061
+ /**
1062
+ * Manifest meter slug, e.g. llm-tokens
1063
+ */
1064
+ meter: string
1065
+ /**
1066
+ * Model dimension; '' when the push carried none
1067
+ */
1068
+ model: string
1069
+ /**
1070
+ * How many record() calls landed in this slice
1071
+ */
1072
+ events: number
1073
+ /**
1074
+ * Tokens we metered for this slice, delivered or not
1075
+ */
1076
+ tokens: number
1077
+ /**
1078
+ * Purpose dimension; '' when the push carried none
1079
+ */
1080
+ purpose: string
1081
+ /**
1082
+ * UTC calendar day, YYYY-MM-DD
1083
+ */
1084
+ usage_date: string
1085
+ /**
1086
+ * Of those events, how many billing did not accept
1087
+ */
1088
+ delivery_failed: number
1089
+ }[]
1090
+ /**
1091
+ * The rows rolled up per meter across the whole window
1092
+ */
1093
+ totals: {
1094
+ meter: string
1095
+ events: number
1096
+ tokens: number
1097
+ delivery_failed: number
1098
+ }[]
1099
+ product_id: string
1100
+ }
1101
+ /**
1102
+ * The platform billing aggregate for the whole ORG; null if it could not be read
1103
+ */
1104
+ platform: ({
1105
+ plan: string
1106
+ scope: "org"
1107
+ meters: {
1108
+ unit?: string
1109
+ used?: number
1110
+ limit?: (number | null)
1111
+ remaining?: (number | null)
1112
+ unlimited?: boolean
1113
+ meter_slug: string
1114
+ }[]
1115
+ org_id: string
1116
+ } | null)
1117
+ /**
1118
+ * Why the platform aggregate is null; null when it was read successfully
1119
+ */
1120
+ platform_error: (string | null)
1121
+ }
1122
+
1031
1123
  export interface ConsentConfigCookieDomainUpsertInput {
1032
1124
  cookieDomain: ("" | null | string)
1033
1125
  }
@@ -2627,7 +2719,7 @@ baseEnvironmentId: (string | null)
2627
2719
  }
2628
2720
 
2629
2721
  export interface DeploymentEventsListByEnvironmentInput {
2630
- type?: ("deployment.queued" | "deployment.build.started" | "deployment.build.succeeded" | "deployment.build.failed" | "deployment.deploying" | "deployment.variable.ignored" | "deployment.healthcheck.passed" | "deployment.healthcheck.failed" | "deployment.healthy" | "deployment.failed" | "deployment.replaced" | "deployment.release.started" | "deployment.release.log" | "deployment.release.succeeded" | "deployment.release.failed" | "replica.restarted" | "service.scaled" | "service.restarted" | "service.restart-failed" | "domain.verified" | "domain.tls.issued" | "domain.tls.failed" | "domain.www-tls.issued" | "domain.www-tls.failed" | "domain.routing.active" | "domain.routing.failed" | "domain.removed" | "domain.governance.mirror-failed" | "service.slept" | "service.woke" | "service.wake_failed" | "service.sleep-enabled" | "service.sleep-disabled")
2722
+ type?: ("deployment.queued" | "deployment.build.started" | "deployment.build.succeeded" | "deployment.build.failed" | "deployment.deploying" | "deployment.variable.ignored" | "deployment.healthcheck.passed" | "deployment.healthcheck.failed" | "deployment.healthy" | "deployment.failed" | "deployment.replaced" | "deployment.release.started" | "deployment.release.log" | "deployment.release.succeeded" | "deployment.release.failed" | "replica.restarted" | "service.scaled" | "service.restarted" | "service.restart-failed" | "domain.verified" | "domain.tls.issued" | "domain.tls.failed" | "domain.www-tls.issued" | "domain.www-tls.failed" | "domain.routing.active" | "domain.routing.failed" | "domain.removed" | "domain.governance.mirror-failed" | "service.slept" | "service.woke" | "service.wake_failed" | "service.sleep-enabled" | "service.sleep-disabled" | "service.sleep-enable-failed")
2631
2723
  limit?: number
2632
2724
  since?: string
2633
2725
  until?: string
@@ -2636,7 +2728,7 @@ environmentId: string
2636
2728
 
2637
2729
  export type DeploymentEventsListByEnvironmentOutput = {
2638
2730
  id: string
2639
- type: ("deployment.queued" | "deployment.build.started" | "deployment.build.succeeded" | "deployment.build.failed" | "deployment.deploying" | "deployment.variable.ignored" | "deployment.healthcheck.passed" | "deployment.healthcheck.failed" | "deployment.healthy" | "deployment.failed" | "deployment.replaced" | "deployment.release.started" | "deployment.release.log" | "deployment.release.succeeded" | "deployment.release.failed" | "replica.restarted" | "service.scaled" | "service.restarted" | "service.restart-failed" | "domain.verified" | "domain.tls.issued" | "domain.tls.failed" | "domain.www-tls.issued" | "domain.www-tls.failed" | "domain.routing.active" | "domain.routing.failed" | "domain.removed" | "domain.governance.mirror-failed" | "service.slept" | "service.woke" | "service.wake_failed" | "service.sleep-enabled" | "service.sleep-disabled")
2731
+ type: ("deployment.queued" | "deployment.build.started" | "deployment.build.succeeded" | "deployment.build.failed" | "deployment.deploying" | "deployment.variable.ignored" | "deployment.healthcheck.passed" | "deployment.healthcheck.failed" | "deployment.healthy" | "deployment.failed" | "deployment.replaced" | "deployment.release.started" | "deployment.release.log" | "deployment.release.succeeded" | "deployment.release.failed" | "replica.restarted" | "service.scaled" | "service.restarted" | "service.restart-failed" | "domain.verified" | "domain.tls.issued" | "domain.tls.failed" | "domain.www-tls.issued" | "domain.www-tls.failed" | "domain.routing.active" | "domain.routing.failed" | "domain.removed" | "domain.governance.mirror-failed" | "service.slept" | "service.woke" | "service.wake_failed" | "service.sleep-enabled" | "service.sleep-disabled" | "service.sleep-enable-failed")
2640
2732
  payload: {
2641
2733
  [k: string]: unknown
2642
2734
  }
@@ -2649,7 +2741,7 @@ environmentId: (string | null)
2649
2741
  }[]
2650
2742
 
2651
2743
  export interface DeploymentEventsListByServiceInput {
2652
- type?: ("deployment.queued" | "deployment.build.started" | "deployment.build.succeeded" | "deployment.build.failed" | "deployment.deploying" | "deployment.variable.ignored" | "deployment.healthcheck.passed" | "deployment.healthcheck.failed" | "deployment.healthy" | "deployment.failed" | "deployment.replaced" | "deployment.release.started" | "deployment.release.log" | "deployment.release.succeeded" | "deployment.release.failed" | "replica.restarted" | "service.scaled" | "service.restarted" | "service.restart-failed" | "domain.verified" | "domain.tls.issued" | "domain.tls.failed" | "domain.www-tls.issued" | "domain.www-tls.failed" | "domain.routing.active" | "domain.routing.failed" | "domain.removed" | "domain.governance.mirror-failed" | "service.slept" | "service.woke" | "service.wake_failed" | "service.sleep-enabled" | "service.sleep-disabled")
2744
+ type?: ("deployment.queued" | "deployment.build.started" | "deployment.build.succeeded" | "deployment.build.failed" | "deployment.deploying" | "deployment.variable.ignored" | "deployment.healthcheck.passed" | "deployment.healthcheck.failed" | "deployment.healthy" | "deployment.failed" | "deployment.replaced" | "deployment.release.started" | "deployment.release.log" | "deployment.release.succeeded" | "deployment.release.failed" | "replica.restarted" | "service.scaled" | "service.restarted" | "service.restart-failed" | "domain.verified" | "domain.tls.issued" | "domain.tls.failed" | "domain.www-tls.issued" | "domain.www-tls.failed" | "domain.routing.active" | "domain.routing.failed" | "domain.removed" | "domain.governance.mirror-failed" | "service.slept" | "service.woke" | "service.wake_failed" | "service.sleep-enabled" | "service.sleep-disabled" | "service.sleep-enable-failed")
2653
2745
  limit?: number
2654
2746
  since?: string
2655
2747
  until?: string
@@ -2659,7 +2751,7 @@ deploymentId?: string
2659
2751
 
2660
2752
  export type DeploymentEventsListByServiceOutput = {
2661
2753
  id: string
2662
- type: ("deployment.queued" | "deployment.build.started" | "deployment.build.succeeded" | "deployment.build.failed" | "deployment.deploying" | "deployment.variable.ignored" | "deployment.healthcheck.passed" | "deployment.healthcheck.failed" | "deployment.healthy" | "deployment.failed" | "deployment.replaced" | "deployment.release.started" | "deployment.release.log" | "deployment.release.succeeded" | "deployment.release.failed" | "replica.restarted" | "service.scaled" | "service.restarted" | "service.restart-failed" | "domain.verified" | "domain.tls.issued" | "domain.tls.failed" | "domain.www-tls.issued" | "domain.www-tls.failed" | "domain.routing.active" | "domain.routing.failed" | "domain.removed" | "domain.governance.mirror-failed" | "service.slept" | "service.woke" | "service.wake_failed" | "service.sleep-enabled" | "service.sleep-disabled")
2754
+ type: ("deployment.queued" | "deployment.build.started" | "deployment.build.succeeded" | "deployment.build.failed" | "deployment.deploying" | "deployment.variable.ignored" | "deployment.healthcheck.passed" | "deployment.healthcheck.failed" | "deployment.healthy" | "deployment.failed" | "deployment.replaced" | "deployment.release.started" | "deployment.release.log" | "deployment.release.succeeded" | "deployment.release.failed" | "replica.restarted" | "service.scaled" | "service.restarted" | "service.restart-failed" | "domain.verified" | "domain.tls.issued" | "domain.tls.failed" | "domain.www-tls.issued" | "domain.www-tls.failed" | "domain.routing.active" | "domain.routing.failed" | "domain.removed" | "domain.governance.mirror-failed" | "service.slept" | "service.woke" | "service.wake_failed" | "service.sleep-enabled" | "service.sleep-disabled" | "service.sleep-enable-failed")
2663
2755
  payload: {
2664
2756
  [k: string]: unknown
2665
2757
  }
@@ -13384,226 +13476,6 @@ name: string
13384
13476
  activeProductId: (string | null)
13385
13477
  }
13386
13478
 
13387
- export interface PlaygroundAnalyticsOverviewInput {
13388
- /**
13389
- * Max records per entity in recent[]; omit for the endpoint default
13390
- */
13391
- limit?: number
13392
- }
13393
-
13394
- export interface PlaygroundAnalyticsOverviewOutput {
13395
- ok: boolean
13396
- minted: boolean
13397
- overview?: unknown
13398
- http_status: number
13399
- }
13400
-
13401
- export interface PlaygroundBillingEntitlementsInput {
13402
-
13403
- }
13404
-
13405
- export interface PlaygroundBillingEntitlementsOutput {
13406
- ok: boolean
13407
- minted: boolean
13408
- http_status: number
13409
- entitlements?: unknown
13410
- }
13411
-
13412
- export interface PlaygroundBillingRecordUsageInput {
13413
- /**
13414
- * Quantity of events to record against playground-events (SUM); defaults to 1
13415
- */
13416
- value?: number
13417
- }
13418
-
13419
- export interface PlaygroundBillingRecordUsageOutput {
13420
- minted: boolean
13421
- accepted: (number | null)
13422
- recorded: boolean
13423
- duplicates: (number | null)
13424
- http_status: number
13425
- }
13426
-
13427
- export interface PlaygroundClickupCreateTaskInput {
13428
- /**
13429
- * Task title; defaults to a fixture label
13430
- */
13431
- name?: string
13432
- /**
13433
- * ClickUp list id; falls back to CLICKUP_TEST_LIST_ID
13434
- */
13435
- listId?: string
13436
- }
13437
-
13438
- export interface PlaygroundClickupCreateTaskOutput {
13439
- minted: boolean
13440
- task_id: (string | null)
13441
- list_status: number
13442
- vend_status: number
13443
- clickup_status: number
13444
- installation_count: number
13445
- }
13446
-
13447
- export interface PlaygroundClickupGetLastWebhookInput {
13448
-
13449
- }
13450
-
13451
- export type PlaygroundClickupGetLastWebhookOutput = ({
13452
- payload: string
13453
- event_id: string
13454
- provider: string
13455
- verified: boolean
13456
- product_id: string
13457
- occurred_at: string
13458
- connector_id: string
13459
- clickup_event: (string | null)
13460
- receipt_count: number
13461
- } | {
13462
- found: false
13463
- })
13464
-
13465
- export interface PlaygroundClickupGetOverviewInput {
13466
-
13467
- }
13468
-
13469
- export interface PlaygroundClickupGetOverviewOutput {
13470
- team: ({
13471
- teamId: string
13472
- teamName: string
13473
- } | null)
13474
- lists: PlaygroundClickupGetOverviewOutputItems[]
13475
- tasks: {
13476
- id: string
13477
- name: string
13478
- status: (string | null)
13479
- }[]
13480
- minted: boolean
13481
- spaces: PlaygroundClickupGetOverviewOutputItems[]
13482
- list_status: number
13483
- vend_status: number
13484
- lists_status: number
13485
- tasks_status: number
13486
- spaces_status: number
13487
- folders_status: number
13488
- installation_count: number
13489
- }
13490
- export interface PlaygroundClickupGetOverviewOutputItems {
13491
- id: string
13492
- name: string
13493
- }
13494
-
13495
- export interface PlaygroundGdriveGetLastChangeInput {
13496
-
13497
- }
13498
-
13499
- export type PlaygroundGdriveGetLastChangeOutput = ({
13500
- file_id: string
13501
- removed: boolean
13502
- file_name: (string | null)
13503
- mime_type: (string | null)
13504
- product_id: string
13505
- occurred_at: string
13506
- connector_id: string
13507
- resource_state: string
13508
- } | {
13509
- found: false
13510
- })
13511
-
13512
- export interface PlaygroundGdriveReadFileInput {
13513
- /**
13514
- * Drive file id; falls back to GDRIVE_TEST_FILE_ID, then the first picked file
13515
- */
13516
- fileId?: string
13517
- }
13518
-
13519
- export interface PlaygroundGdriveReadFileOutput {
13520
- minted: boolean
13521
- file_id: (string | null)
13522
- file_name: (string | null)
13523
- mime_type: (string | null)
13524
- file_count: number
13525
- get_status: number
13526
- list_status: number
13527
- vend_status: number
13528
- content_bytes: (number | null)
13529
- }
13530
-
13531
- export interface PlaygroundGoogleadsReadCustomerInput {
13532
-
13533
- }
13534
-
13535
- export interface PlaygroundGoogleadsReadCustomerOutput {
13536
- minted: boolean
13537
- vended: boolean
13538
- customer_id: (string | null)
13539
- vend_status: number
13540
- result_count: number
13541
- search_status: number
13542
- login_customer_id: (string | null)
13543
- }
13544
-
13545
- export interface PlaygroundLifecycleGetStateInput {
13546
-
13547
- }
13548
-
13549
- export interface PlaygroundLifecycleGetStateOutput {
13550
- blocked: boolean
13551
- archived: boolean
13552
- productId: string
13553
- lastBlockTransition: ({
13554
- eventId: string
13555
- eventName: string
13556
- productId: string
13557
- occurredAt: string
13558
- recordedAt: string
13559
- receiptCount: number
13560
- organizationId: string
13561
- cascadedFromOrg: boolean
13562
- } | null)
13563
- lastArchiveTransition: ({
13564
- eventId: string
13565
- eventName: string
13566
- productId: string
13567
- occurredAt: string
13568
- recordedAt: string
13569
- receiptCount: number
13570
- organizationId: string
13571
- cascadedFromOrg: boolean
13572
- } | null)
13573
- }
13574
-
13575
- export interface PlaygroundLifecycleListEventsInput {
13576
-
13577
- }
13578
-
13579
- export type PlaygroundLifecycleListEventsOutput = {
13580
- eventId: string
13581
- eventName: string
13582
- productId: string
13583
- occurredAt: string
13584
- recordedAt: string
13585
- receiptCount: number
13586
- organizationId: string
13587
- cascadedFromOrg: boolean
13588
- }[]
13589
-
13590
- export interface PlaygroundWebhookGetLastInput {
13591
-
13592
- }
13593
-
13594
- export type PlaygroundWebhookGetLastOutput = ({
13595
- payload?: unknown
13596
- event_id: string
13597
- provider: string
13598
- verified: boolean
13599
- product_id: string
13600
- occurred_at: string
13601
- connector_id: string
13602
- delivery_count: number
13603
- } | {
13604
- found: false
13605
- })
13606
-
13607
13479
  export interface RealtimeApikeyCreateInput {
13608
13480
  /**
13609
13481
  * Human-readable label for the key, e.g. "production backend"
@@ -15589,2705 +15461,6 @@ scriptUrl: string
15589
15461
  minimalSnippet: string
15590
15462
  }
15591
15463
 
15592
- export interface UsersApikeysCreateInput {
15593
- /**
15594
- * A label only humans read — which backend or environment holds this key.
15595
- */
15596
- name: string
15597
- /**
15598
- * 'server' mints a SECRET key (usk_…) for the Product's backend — returned exactly once and stored hashed. 'publishable' mints a non-secret key (upk_…) that identifies this product in browser flows and stays readable.
15599
- */
15600
- type: ("server" | "publishable")
15601
- }
15602
-
15603
- export interface UsersApikeysCreateOutput {
15604
- id: string
15605
- key: string
15606
- name: string
15607
- type: ("server" | "publishable")
15608
- value: (string | null)
15609
- prefix: string
15610
- createdAt: string
15611
- revokedAt: (string | null)
15612
- }
15613
-
15614
- export interface UsersApikeysListInput {
15615
-
15616
- }
15617
-
15618
- export interface UsersApikeysListOutput {
15619
- keys: {
15620
- id: string
15621
- name: string
15622
- type: ("server" | "publishable")
15623
- value: (string | null)
15624
- prefix: string
15625
- createdAt: string
15626
- revokedAt: (string | null)
15627
- }[]
15628
- }
15629
-
15630
- export interface UsersApikeysRevokeInput {
15631
- /**
15632
- * Id of the key to revoke. Revocation is immediate and final.
15633
- */
15634
- id: string
15635
- }
15636
-
15637
- export interface UsersApikeysRevokeOutput {
15638
- id: string
15639
- revoked: true
15640
- }
15641
-
15642
- export interface UsersAuditListInput {
15643
- /**
15644
- * Page size, 1-100. Default 25.
15645
- */
15646
- limit?: number
15647
- /**
15648
- * ISO-8601 lower bound (inclusive) on the event timestamp.
15649
- */
15650
- since?: string
15651
- /**
15652
- * ISO-8601 upper bound (exclusive) on the event timestamp.
15653
- */
15654
- until?: string
15655
- /**
15656
- * Exact action to filter by, e.g. 'user.banned'. Omit for all actions.
15657
- */
15658
- action?: string
15659
- /**
15660
- * Opaque cursor from a previous response's `nextCursor`. Omit for the first page.
15661
- */
15662
- cursor?: string
15663
- /**
15664
- * Exact id of the audited target, e.g. a user id.
15665
- */
15666
- targetId?: string
15667
- /**
15668
- * Target kind to filter by, e.g. 'user'.
15669
- */
15670
- targetType?: string
15671
- }
15672
-
15673
- export interface UsersAuditListOutput {
15674
- events: {
15675
- id: string
15676
- ip: (string | null)
15677
- action: string
15678
- actorId: (string | null)
15679
- metadata: {
15680
- [k: string]: unknown
15681
- }
15682
- targetId: (string | null)
15683
- actorType: ("operator" | "system" | "end_user")
15684
- createdAt: string
15685
- productId: string
15686
- userAgent: (string | null)
15687
- targetType: (string | null)
15688
- }[]
15689
- nextCursor: (string | null)
15690
- }
15691
-
15692
- export interface UsersConfigGetInput {
15693
-
15694
- }
15695
-
15696
- export interface UsersConfigGetOutput {
15697
- mfa: {
15698
- /**
15699
- * Whether a second factor is MANDATORY for this product. When true, a user may not unenroll their last verified factor. Default false.
15700
- */
15701
- required: boolean
15702
- /**
15703
- * How many single-use backup codes a batch contains. Default 10.
15704
- */
15705
- backupCodeCount: number
15706
- /**
15707
- * Mandatory delay on an operator-initiated factor reset, in hours — the abort window the user is emailed. Default 72.
15708
- */
15709
- resetDelayHours: number
15710
- /**
15711
- * How long a passed step-up challenge stays spendable, in minutes. The grant is SINGLE-USE regardless. Default 5.
15712
- */
15713
- stepUpGrantMinutes: number
15714
- /**
15715
- * Wrong BACKUP codes before the account is locked, counted separately from TOTP. Default 5.
15716
- */
15717
- maxBackupCodeAttempts: number
15718
- /**
15719
- * Wrong second-factor codes before the account is locked. Default 5.
15720
- */
15721
- maxSecondFactorAttempts: number
15722
- /**
15723
- * How recently the caller must have authenticated to enroll or regenerate a factor, in minutes. Default 10.
15724
- */
15725
- sensitiveAuthAgeMinutes: number
15726
- }
15727
- email: {
15728
- /**
15729
- * Sender for auth email, e.g. "Acme <auth@acme.com>". MUST be on a domain verified in this product's mail toolkit. While it is null, email_code/email_link are not offered as strategies.
15730
- */
15731
- from: (string | null)
15732
- /**
15733
- * Offer the 6-digit code strategy (email_code). Default true.
15734
- */
15735
- codeEnabled: boolean
15736
- /**
15737
- * Base URL magic links point at, e.g. "https://public.lessly.com/{productId}/users". Null uses the deployment default.
15738
- */
15739
- linkBaseUrl: (string | null)
15740
- /**
15741
- * Offer the magic-link strategy (email_link). Default true.
15742
- */
15743
- linkEnabled: boolean
15744
- /**
15745
- * How long an emailed code or link stays usable, in minutes. Default 15.
15746
- */
15747
- codeTtlMinutes: number
15748
- /**
15749
- * Auth emails one address may receive per day. Default 10.
15750
- */
15751
- resendDailyCap: number
15752
- /**
15753
- * Wrong-code entries allowed per token before it is spent. Default 5.
15754
- */
15755
- maxCodeAttempts: number
15756
- /**
15757
- * Minimum seconds between two auth emails to one address. Floor of 60 is enforced regardless. Default 60.
15758
- */
15759
- resendCooldownSeconds: number
15760
- }
15761
- oauth: {
15762
- providers: {
15763
- github: UsersConfigGetOutputGoogle
15764
- google: UsersConfigGetOutputGoogle
15765
- }
15766
- }
15767
- hosted: {
15768
- /**
15769
- * Serve the hosted sign-in, sign-up and recovery pages for this product. Default true. False answers those routes with a refusal page instead — for a product that ships its own frontend and wants no second front door.
15770
- */
15771
- enabled: boolean
15772
- /**
15773
- * Absolute https URL of a logo rendered above the form. Null renders no logo.
15774
- */
15775
- logoUrl: (string | null)
15776
- /**
15777
- * Terms link rendered in the footer. Null renders no link.
15778
- */
15779
- termsUrl: (string | null)
15780
- /**
15781
- * CSS colour of the body text.
15782
- */
15783
- textColor: string
15784
- /**
15785
- * One line under the card. Null renders no footer.
15786
- */
15787
- footerText: (string | null)
15788
- /**
15789
- * Privacy-policy link rendered in the footer. Null renders no link.
15790
- */
15791
- privacyUrl: (string | null)
15792
- /**
15793
- * CSS colour for the submit button, the links and the focus ring.
15794
- */
15795
- accentColor: string
15796
- /**
15797
- * Shown in the heading and the page title. Default "This product".
15798
- */
15799
- productName: string
15800
- /**
15801
- * CSS length for the card and its controls, e.g. "12px".
15802
- */
15803
- borderRadius: string
15804
- /**
15805
- * CSS colour of the card itself.
15806
- */
15807
- surfaceColor: string
15808
- /**
15809
- * CSS colour of secondary text and hints.
15810
- */
15811
- mutedTextColor: string
15812
- /**
15813
- * CSS colour of the page behind the card.
15814
- */
15815
- backgroundColor: string
15816
- }
15817
- invite: {
15818
- /**
15819
- * How long an invite link stays usable, in days. Default 14.
15820
- */
15821
- ttlDays: number
15822
- /**
15823
- * Minimum minutes between two invite emails to one address. Default 60.
15824
- */
15825
- resendCooldownMinutes: number
15826
- }
15827
- status: ("active" | "paused")
15828
- captcha: {
15829
- enabled: boolean
15830
- siteKey: (string | null)
15831
- provider: "turnstile"
15832
- riskElevated: boolean
15833
- }
15834
- recovery: {
15835
- /**
15836
- * Offer the password-recovery flow at all. Default true.
15837
- */
15838
- enabled: boolean
15839
- /**
15840
- * How long a reset link stays usable, in minutes. Default 60.
15841
- */
15842
- ttlMinutes: number
15843
- }
15844
- testMode: {
15845
- /**
15846
- * Opt this product into test mode. Refused outright on a production deployment — the environment gate is checked first and cannot be configured away. Turning it on is audited and raises an alert. Default false.
15847
- */
15848
- enabled: boolean
15849
- }
15850
- waitlist: {
15851
- /**
15852
- * The embeddable widget’s copy and colours.
15853
- */
15854
- widget: {
15855
- /**
15856
- * Heading above the widget form.
15857
- */
15858
- title: string
15859
- /**
15860
- * Link rendered beside the consent text. Null renders no link.
15861
- */
15862
- policyUrl: (string | null)
15863
- /**
15864
- * CSS colour for the button and the focus ring.
15865
- */
15866
- accentColor: string
15867
- /**
15868
- * Submit button copy.
15869
- */
15870
- buttonLabel: string
15871
- /**
15872
- * Consent checkbox copy. Null renders no checkbox, and the signup records the consent proof as `unspecified`.
15873
- */
15874
- consentText: (string | null)
15875
- /**
15876
- * One line under the heading.
15877
- */
15878
- description: string
15879
- /**
15880
- * The privacy-policy version the widget records in each consent proof.
15881
- */
15882
- policyVersion: string
15883
- /**
15884
- * Shown after a submission. ONE message for every outcome: the signup route answers identically whether or not the address was already on the list.
15885
- */
15886
- successMessage: string
15887
- }
15888
- /**
15889
- * Require a confirmation email before a waitlist signup counts. Default false — the entry is created either way, but an unconfirmed one is reported separately and is never invited.
15890
- */
15891
- doubleOptIn: boolean
15892
- /**
15893
- * How long a still-pending waitlist entry is kept before the sweep erases it. Default 365.
15894
- */
15895
- retentionDays: number
15896
- /**
15897
- * How long a double-opt-in confirmation link stays usable, in hours. Default 48.
15898
- */
15899
- confirmTtlHours: number
15900
- }
15901
- productId: string
15902
- retention: {
15903
- /**
15904
- * How long an EXPIRED flow attempt is kept after its own expiry. Default 0 — swept as soon as it dies, which is what the reaper did before this window existed.
15905
- */
15906
- flowAttemptDays: number
15907
- /**
15908
- * How long a SPENT or EXPIRED one-time token row (an OTP, a magic link, a recovery or abort token) is kept after it stops being usable, for forensics. The secret is a hash and the row is already dead — this only decides how long the trail lives. Default 30.
15909
- */
15910
- oneTimeTokenDays: number
15911
- /**
15912
- * How long an EXPIRED session and its refresh tokens are kept after expiry. Zero does not shorten any lifetime: a session past either window can never be refreshed again, so the row is already inert. Default 0.
15913
- */
15914
- expiredSessionDays: number
15915
- }
15916
- protection: {
15917
- /**
15918
- * Check passwords against the HaveIBeenPwned breach corpus (k-anonymity). Blocking at sign-up, advisory at sign-in. Default true.
15919
- */
15920
- hibpEnabled: boolean
15921
- /**
15922
- * How long an account stays locked. Self-healing — the lock expires on its own. Default 15.
15923
- */
15924
- lockoutMinutes: number
15925
- /**
15926
- * Failed sign-ins for one identifier before the account is locked. Default 10.
15927
- */
15928
- maxFailedAttempts: number
15929
- /**
15930
- * Flow calls allowed per IP per product per window before HTTP 429. Default 120.
15931
- */
15932
- ipAttemptsPerWindow: number
15933
- /**
15934
- * Sliding window the failed sign-ins are counted over, in minutes. Default 15.
15935
- */
15936
- failedAttemptWindowMinutes: number
15937
- /**
15938
- * Flow calls allowed per identifier per window before HTTP 429. Default 30.
15939
- */
15940
- identifierAttemptsPerWindow: number
15941
- }
15942
- signupMode: ("public" | "invite-only" | "waitlist")
15943
- emailChange: {
15944
- /**
15945
- * Allow end users to change their email address. Default true.
15946
- */
15947
- enabled: boolean
15948
- /**
15949
- * How long after a REVERT further email changes are refused, in days. Default 7.
15950
- */
15951
- cooldownDays: number
15952
- /**
15953
- * How long the old address may undo the change, in days. Default 30.
15954
- */
15955
- revertTtlDays: number
15956
- /**
15957
- * How long the two confirmation links stay usable, in hours. Default 24.
15958
- */
15959
- requestTtlHours: number
15960
- /**
15961
- * Mandatory delay on an operator-assisted override, in hours — the abort window the old address is notified with. Default 72.
15962
- */
15963
- overrideDelayHours: number
15964
- }
15965
- notifications: {
15966
- /**
15967
- * Email the user the first time a session appears from an unseen device. Default true.
15968
- */
15969
- newDevice: boolean
15970
- /**
15971
- * Email the old address when an email change is requested, completed, reverted or overridden. Default true.
15972
- */
15973
- emailChange: boolean
15974
- /**
15975
- * Email the user when an operator impersonates their account. Default true.
15976
- */
15977
- impersonation: boolean
15978
- /**
15979
- * Email the user when their password is set or changed. Default true.
15980
- */
15981
- passwordChanged: boolean
15982
- }
15983
- allowedOrigins: string[]
15984
- passwordPolicy: {
15985
- /**
15986
- * Minimum password length. Default 8.
15987
- */
15988
- minLength: number
15989
- /**
15990
- * Require at least one digit.
15991
- */
15992
- requireNumber: boolean
15993
- /**
15994
- * Require at least one non-alphanumeric character.
15995
- */
15996
- requireSymbol: boolean
15997
- /**
15998
- * Require at least one uppercase letter.
15999
- */
16000
- requireUppercase: boolean
16001
- }
16002
- sessionTtlHours: number
16003
- lifecycleBlocked: boolean
16004
- lifecycleArchived: boolean
16005
- refreshSlidingDays: number
16006
- refreshAbsoluteDays: number
16007
- redirectUriAllowlist: string[]
16008
- accessTokenTtlMinutes: number
16009
- captchaSecretConfigured: boolean
16010
- }
16011
- export interface UsersConfigGetOutputGoogle {
16012
- enabled: boolean
16013
- clientId: (string | null)
16014
- secretConfigured: boolean
16015
- }
16016
-
16017
- export interface UsersConfigUpsertInput {
16018
- /**
16019
- * MFA settings: backup-code batch size, the operator-reset delay, how fresh authentication must be to enroll, and the second-factor lockout ceilings. Merged field-by-field.
16020
- */
16021
- mfa?: {
16022
- /**
16023
- * Whether a second factor is MANDATORY for this product. When true, a user may not unenroll their last verified factor. Default false.
16024
- */
16025
- required?: boolean
16026
- /**
16027
- * How many single-use backup codes a batch contains. Default 10.
16028
- */
16029
- backupCodeCount?: number
16030
- /**
16031
- * Mandatory delay on an operator-initiated factor reset, in hours — the abort window the user is emailed. Default 72.
16032
- */
16033
- resetDelayHours?: number
16034
- /**
16035
- * How long a passed step-up challenge stays spendable, in minutes. The grant is SINGLE-USE regardless. Default 5.
16036
- */
16037
- stepUpGrantMinutes?: number
16038
- /**
16039
- * Wrong BACKUP codes before the account is locked, counted separately from TOTP. Default 5.
16040
- */
16041
- maxBackupCodeAttempts?: number
16042
- /**
16043
- * Wrong second-factor codes before the account is locked. Default 5.
16044
- */
16045
- maxSecondFactorAttempts?: number
16046
- /**
16047
- * How recently the caller must have authenticated to enroll or regenerate a factor, in minutes. Default 10.
16048
- */
16049
- sensitiveAuthAgeMinutes?: number
16050
- }
16051
- /**
16052
- * Email OTP / magic-link settings. Merged field-by-field. Set `email.from` to a sender on a domain verified in this product's mail toolkit — until then the email strategies are not offered.
16053
- */
16054
- email?: {
16055
- /**
16056
- * Sender for auth email, e.g. "Acme <auth@acme.com>". MUST be on a domain verified in this product's mail toolkit. While it is null, email_code/email_link are not offered as strategies.
16057
- */
16058
- from?: (string | null)
16059
- /**
16060
- * Offer the 6-digit code strategy (email_code). Default true.
16061
- */
16062
- codeEnabled?: boolean
16063
- /**
16064
- * Base URL magic links point at, e.g. "https://public.lessly.com/{productId}/users". Null uses the deployment default.
16065
- */
16066
- linkBaseUrl?: (string | null)
16067
- /**
16068
- * Offer the magic-link strategy (email_link). Default true.
16069
- */
16070
- linkEnabled?: boolean
16071
- /**
16072
- * How long an emailed code or link stays usable, in minutes. Default 15.
16073
- */
16074
- codeTtlMinutes?: number
16075
- /**
16076
- * Auth emails one address may receive per day. Default 10.
16077
- */
16078
- resendDailyCap?: number
16079
- /**
16080
- * Wrong-code entries allowed per token before it is spent. Default 5.
16081
- */
16082
- maxCodeAttempts?: number
16083
- /**
16084
- * Minimum seconds between two auth emails to one address. Floor of 60 is enforced regardless. Default 60.
16085
- */
16086
- resendCooldownSeconds?: number
16087
- }
16088
- /**
16089
- * OAuth provider credentials and switches, per provider. Merged field-by-field. A provider is offered as a sign-in strategy only when it is enabled AND a full client id + secret pair resolves — from here, or from the deployment's shared development credentials.
16090
- */
16091
- oauth?: {
16092
- github?: UsersConfigUpsertInputGoogle
16093
- /**
16094
- * Google sign-in credentials and switch.
16095
- */
16096
- google?: {
16097
- /**
16098
- * Offer this provider as a sign-in strategy.
16099
- */
16100
- enabled?: boolean
16101
- /**
16102
- * The OAuth client id from the provider console. Pass null to clear it and fall back to the deployment's shared development credentials, if it has any.
16103
- */
16104
- clientId?: (string | null)
16105
- /**
16106
- * WRITE-ONLY. The OAuth client secret; stored encrypted and never returned. Omit to leave the stored secret untouched, pass null to clear it.
16107
- */
16108
- clientSecret?: (string | null)
16109
- }
16110
- }
16111
- /**
16112
- * The hosted sign-in / sign-up / recovery pages: whether they are served, and the product name, logo, colours and footer links they render with. Merged field-by-field, so setting one colour leaves the rest alone.
16113
- */
16114
- hosted?: {
16115
- /**
16116
- * Serve the hosted sign-in, sign-up and recovery pages for this product. Default true. False answers those routes with a refusal page instead — for a product that ships its own frontend and wants no second front door.
16117
- */
16118
- enabled?: boolean
16119
- /**
16120
- * Absolute https URL of a logo rendered above the form. Null renders no logo.
16121
- */
16122
- logoUrl?: (string | null)
16123
- /**
16124
- * Terms link rendered in the footer. Null renders no link.
16125
- */
16126
- termsUrl?: (string | null)
16127
- /**
16128
- * CSS colour of the body text.
16129
- */
16130
- textColor?: string
16131
- /**
16132
- * One line under the card. Null renders no footer.
16133
- */
16134
- footerText?: (string | null)
16135
- /**
16136
- * Privacy-policy link rendered in the footer. Null renders no link.
16137
- */
16138
- privacyUrl?: (string | null)
16139
- /**
16140
- * CSS colour for the submit button, the links and the focus ring.
16141
- */
16142
- accentColor?: string
16143
- /**
16144
- * Shown in the heading and the page title. Default "This product".
16145
- */
16146
- productName?: string
16147
- /**
16148
- * CSS length for the card and its controls, e.g. "12px".
16149
- */
16150
- borderRadius?: string
16151
- /**
16152
- * CSS colour of the card itself.
16153
- */
16154
- surfaceColor?: string
16155
- /**
16156
- * CSS colour of secondary text and hints.
16157
- */
16158
- mutedTextColor?: string
16159
- /**
16160
- * CSS colour of the page behind the card.
16161
- */
16162
- backgroundColor?: string
16163
- }
16164
- /**
16165
- * Invite lifetime and re-invite cooldown. Merged field-by-field.
16166
- */
16167
- invite?: {
16168
- /**
16169
- * How long an invite link stays usable, in days. Default 14.
16170
- */
16171
- ttlDays?: number
16172
- /**
16173
- * Minimum minutes between two invite emails to one address. Default 60.
16174
- */
16175
- resendCooldownMinutes?: number
16176
- }
16177
- /**
16178
- * Captcha (Cloudflare Turnstile) settings for flow creation. Merged field-by-field.
16179
- */
16180
- captcha?: {
16181
- /**
16182
- * Require a captcha token when a flow attempt is created.
16183
- */
16184
- enabled?: boolean
16185
- /**
16186
- * The public site key the Product renders the widget with.
16187
- */
16188
- siteKey?: (string | null)
16189
- /**
16190
- * WRITE-ONLY. The provider secret used server-side to verify tokens; stored encrypted and never returned. Omit to leave the stored secret untouched, pass null to clear it.
16191
- */
16192
- secretKey?: (string | null)
16193
- /**
16194
- * Demand a captcha from an identifier that is currently accumulating failed attempts, even when `enabled` is false. Default true.
16195
- */
16196
- riskElevated?: boolean
16197
- }
16198
- /**
16199
- * Password-recovery settings (whether it is offered, how long a reset link lives). Merged field-by-field.
16200
- */
16201
- recovery?: {
16202
- /**
16203
- * Offer the password-recovery flow at all. Default true.
16204
- */
16205
- enabled?: boolean
16206
- /**
16207
- * How long a reset link stays usable, in minutes. Default 60.
16208
- */
16209
- ttlMinutes?: number
16210
- }
16211
- /**
16212
- * Test mode: whether this product may have TEST USERS — accounts that are excluded from metering, kept out of the default directory listing, never really emailed, and (when the deployment sets one) able to sign in with the fixed magic OTP. REFUSED on a production deployment. Merged field-by-field.
16213
- */
16214
- testMode?: {
16215
- /**
16216
- * Opt this product into test mode. Refused outright on a production deployment — the environment gate is checked first and cannot be configured away. Turning it on is audited and raises an alert. Default false.
16217
- */
16218
- enabled?: boolean
16219
- }
16220
- /**
16221
- * Waitlist settings: the double-opt-in toggle, how long a pending entry is retained before the sweep erases it, the confirmation link lifetime, and the embeddable widget’s copy and colours. Merged field-by-field, including inside `widget`.
16222
- */
16223
- waitlist?: {
16224
- /**
16225
- * The embeddable widget’s copy and colours. Merged field-by-field, so setting one line leaves the rest alone.
16226
- */
16227
- widget?: {
16228
- /**
16229
- * Heading above the widget form.
16230
- */
16231
- title?: string
16232
- /**
16233
- * Link rendered beside the consent text. Null renders no link.
16234
- */
16235
- policyUrl?: (string | null)
16236
- /**
16237
- * CSS colour for the button and the focus ring.
16238
- */
16239
- accentColor?: string
16240
- /**
16241
- * Submit button copy.
16242
- */
16243
- buttonLabel?: string
16244
- /**
16245
- * Consent checkbox copy. Null renders no checkbox, and the signup records the consent proof as `unspecified`.
16246
- */
16247
- consentText?: (string | null)
16248
- /**
16249
- * One line under the heading.
16250
- */
16251
- description?: string
16252
- /**
16253
- * The privacy-policy version the widget records in each consent proof.
16254
- */
16255
- policyVersion?: string
16256
- /**
16257
- * Shown after a submission. ONE message for every outcome: the signup route answers identically whether or not the address was already on the list.
16258
- */
16259
- successMessage?: string
16260
- }
16261
- /**
16262
- * Require a confirmation email before a waitlist signup counts. Default false — the entry is created either way, but an unconfirmed one is reported separately and is never invited.
16263
- */
16264
- doubleOptIn?: boolean
16265
- /**
16266
- * How long a still-pending waitlist entry is kept before the sweep erases it. Default 365.
16267
- */
16268
- retentionDays?: number
16269
- /**
16270
- * How long a double-opt-in confirmation link stays usable, in hours. Default 48.
16271
- */
16272
- confirmTtlHours?: number
16273
- }
16274
- /**
16275
- * How long DEAD rows are kept before the retention sweep removes them: spent one-time tokens, expired flow attempts, expired sessions and their refresh tokens. These are grace periods on top of expiry, never lifetimes — an unswept expired row is inert. Merged field-by-field.
16276
- */
16277
- retention?: {
16278
- /**
16279
- * How long an EXPIRED flow attempt is kept after its own expiry. Default 0 — swept as soon as it dies, which is what the reaper did before this window existed.
16280
- */
16281
- flowAttemptDays?: number
16282
- /**
16283
- * How long a SPENT or EXPIRED one-time token row (an OTP, a magic link, a recovery or abort token) is kept after it stops being usable, for forensics. The secret is a hash and the row is already dead — this only decides how long the trail lives. Default 30.
16284
- */
16285
- oneTimeTokenDays?: number
16286
- /**
16287
- * How long an EXPIRED session and its refresh tokens are kept after expiry. Zero does not shorten any lifetime: a session past either window can never be refreshed again, so the row is already inert. Default 0.
16288
- */
16289
- expiredSessionDays?: number
16290
- }
16291
- /**
16292
- * Rate limits, lockout and breached-password settings. Merged field-by-field.
16293
- */
16294
- protection?: {
16295
- /**
16296
- * Check passwords against the HaveIBeenPwned breach corpus (k-anonymity). Blocking at sign-up, advisory at sign-in. Default true.
16297
- */
16298
- hibpEnabled?: boolean
16299
- /**
16300
- * How long an account stays locked. Self-healing — the lock expires on its own. Default 15.
16301
- */
16302
- lockoutMinutes?: number
16303
- /**
16304
- * Failed sign-ins for one identifier before the account is locked. Default 10.
16305
- */
16306
- maxFailedAttempts?: number
16307
- /**
16308
- * Flow calls allowed per IP per product per window before HTTP 429. Default 120.
16309
- */
16310
- ipAttemptsPerWindow?: number
16311
- /**
16312
- * Sliding window the failed sign-ins are counted over, in minutes. Default 15.
16313
- */
16314
- failedAttemptWindowMinutes?: number
16315
- /**
16316
- * Flow calls allowed per identifier per window before HTTP 429. Default 30.
16317
- */
16318
- identifierAttemptsPerWindow?: number
16319
- }
16320
- /**
16321
- * How end users may join this product: 'public' (anyone), 'invite-only', or 'waitlist'. Default 'public'.
16322
- */
16323
- signupMode?: ("public" | "invite-only" | "waitlist")
16324
- /**
16325
- * Email-change settings: confirmation lifetime, the old address's revert window, the post-revert cooldown and the operator-override delay. Merged field-by-field.
16326
- */
16327
- emailChange?: {
16328
- /**
16329
- * Allow end users to change their email address. Default true.
16330
- */
16331
- enabled?: boolean
16332
- /**
16333
- * How long after a REVERT further email changes are refused, in days. Default 7.
16334
- */
16335
- cooldownDays?: number
16336
- /**
16337
- * How long the old address may undo the change, in days. Default 30.
16338
- */
16339
- revertTtlDays?: number
16340
- /**
16341
- * How long the two confirmation links stay usable, in hours. Default 24.
16342
- */
16343
- requestTtlHours?: number
16344
- /**
16345
- * Mandatory delay on an operator-assisted override, in hours — the abort window the old address is notified with. Default 72.
16346
- */
16347
- overrideDelayHours?: number
16348
- }
16349
- /**
16350
- * Which security notification emails this product sends. All on by default. Merged field-by-field.
16351
- */
16352
- notifications?: {
16353
- /**
16354
- * Email the user the first time a session appears from an unseen device. Default true.
16355
- */
16356
- newDevice?: boolean
16357
- /**
16358
- * Email the old address when an email change is requested, completed, reverted or overridden. Default true.
16359
- */
16360
- emailChange?: boolean
16361
- /**
16362
- * Email the user when an operator impersonates their account. Default true.
16363
- */
16364
- impersonation?: boolean
16365
- /**
16366
- * Email the user when their password is set or changed. Default true.
16367
- */
16368
- passwordChanged?: boolean
16369
- }
16370
- /**
16371
- * Browser origins allowed to drive this product's end-user flows, up to 20. Scheme + host + port only, matched exactly. Replaces the whole list. Empty means "no browser origin" once this product has a publishable key.
16372
- *
16373
- * @maxItems 20
16374
- */
16375
- allowedOrigins?: []|[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]
16376
- /**
16377
- * Password rules for this product. Merged field-by-field into the current policy.
16378
- */
16379
- passwordPolicy?: {
16380
- /**
16381
- * Minimum password length. Default 8.
16382
- */
16383
- minLength?: number
16384
- /**
16385
- * Require at least one digit.
16386
- */
16387
- requireNumber?: boolean
16388
- /**
16389
- * Require at least one non-alphanumeric character.
16390
- */
16391
- requireSymbol?: boolean
16392
- /**
16393
- * Require at least one uppercase letter.
16394
- */
16395
- requireUppercase?: boolean
16396
- }
16397
- /**
16398
- * End-user session lifetime in hours. Default 720 (30 days).
16399
- */
16400
- sessionTtlHours?: number
16401
- /**
16402
- * Inactivity window of a session in days — every refresh slides it forward. Default 30.
16403
- */
16404
- refreshSlidingDays?: number
16405
- /**
16406
- * Hard time-box of a session in days, counted from sign-in and never extended. Default 365.
16407
- */
16408
- refreshAbsoluteDays?: number
16409
- /**
16410
- * Callback URIs the browser code handoff may deliver a one-time authorization code to, up to 20. Matched EXACTLY — no wildcards, no prefixes, no fragments — so list every callback in full. Replaces the whole list.
16411
- *
16412
- * @maxItems 20
16413
- */
16414
- redirectUriAllowlist?: []|[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]
16415
- /**
16416
- * Access JWT lifetime in minutes, 5-60. Default 10. Short on purpose: a revoked session dies within one TTL.
16417
- */
16418
- accessTokenTtlMinutes?: number
16419
- }
16420
- /**
16421
- * GitHub sign-in credentials and switch.
16422
- */
16423
- export interface UsersConfigUpsertInputGoogle {
16424
- /**
16425
- * Offer this provider as a sign-in strategy.
16426
- */
16427
- enabled?: boolean
16428
- /**
16429
- * The OAuth client id from the provider console. Pass null to clear it and fall back to the deployment's shared development credentials, if it has any.
16430
- */
16431
- clientId?: (string | null)
16432
- /**
16433
- * WRITE-ONLY. The OAuth client secret; stored encrypted and never returned. Omit to leave the stored secret untouched, pass null to clear it.
16434
- */
16435
- clientSecret?: (string | null)
16436
- }
16437
-
16438
- export interface UsersConfigUpsertOutput {
16439
- mfa: {
16440
- /**
16441
- * Whether a second factor is MANDATORY for this product. When true, a user may not unenroll their last verified factor. Default false.
16442
- */
16443
- required: boolean
16444
- /**
16445
- * How many single-use backup codes a batch contains. Default 10.
16446
- */
16447
- backupCodeCount: number
16448
- /**
16449
- * Mandatory delay on an operator-initiated factor reset, in hours — the abort window the user is emailed. Default 72.
16450
- */
16451
- resetDelayHours: number
16452
- /**
16453
- * How long a passed step-up challenge stays spendable, in minutes. The grant is SINGLE-USE regardless. Default 5.
16454
- */
16455
- stepUpGrantMinutes: number
16456
- /**
16457
- * Wrong BACKUP codes before the account is locked, counted separately from TOTP. Default 5.
16458
- */
16459
- maxBackupCodeAttempts: number
16460
- /**
16461
- * Wrong second-factor codes before the account is locked. Default 5.
16462
- */
16463
- maxSecondFactorAttempts: number
16464
- /**
16465
- * How recently the caller must have authenticated to enroll or regenerate a factor, in minutes. Default 10.
16466
- */
16467
- sensitiveAuthAgeMinutes: number
16468
- }
16469
- email: {
16470
- /**
16471
- * Sender for auth email, e.g. "Acme <auth@acme.com>". MUST be on a domain verified in this product's mail toolkit. While it is null, email_code/email_link are not offered as strategies.
16472
- */
16473
- from: (string | null)
16474
- /**
16475
- * Offer the 6-digit code strategy (email_code). Default true.
16476
- */
16477
- codeEnabled: boolean
16478
- /**
16479
- * Base URL magic links point at, e.g. "https://public.lessly.com/{productId}/users". Null uses the deployment default.
16480
- */
16481
- linkBaseUrl: (string | null)
16482
- /**
16483
- * Offer the magic-link strategy (email_link). Default true.
16484
- */
16485
- linkEnabled: boolean
16486
- /**
16487
- * How long an emailed code or link stays usable, in minutes. Default 15.
16488
- */
16489
- codeTtlMinutes: number
16490
- /**
16491
- * Auth emails one address may receive per day. Default 10.
16492
- */
16493
- resendDailyCap: number
16494
- /**
16495
- * Wrong-code entries allowed per token before it is spent. Default 5.
16496
- */
16497
- maxCodeAttempts: number
16498
- /**
16499
- * Minimum seconds between two auth emails to one address. Floor of 60 is enforced regardless. Default 60.
16500
- */
16501
- resendCooldownSeconds: number
16502
- }
16503
- oauth: {
16504
- providers: {
16505
- github: UsersConfigUpsertOutputGoogle
16506
- google: UsersConfigUpsertOutputGoogle
16507
- }
16508
- }
16509
- hosted: {
16510
- /**
16511
- * Serve the hosted sign-in, sign-up and recovery pages for this product. Default true. False answers those routes with a refusal page instead — for a product that ships its own frontend and wants no second front door.
16512
- */
16513
- enabled: boolean
16514
- /**
16515
- * Absolute https URL of a logo rendered above the form. Null renders no logo.
16516
- */
16517
- logoUrl: (string | null)
16518
- /**
16519
- * Terms link rendered in the footer. Null renders no link.
16520
- */
16521
- termsUrl: (string | null)
16522
- /**
16523
- * CSS colour of the body text.
16524
- */
16525
- textColor: string
16526
- /**
16527
- * One line under the card. Null renders no footer.
16528
- */
16529
- footerText: (string | null)
16530
- /**
16531
- * Privacy-policy link rendered in the footer. Null renders no link.
16532
- */
16533
- privacyUrl: (string | null)
16534
- /**
16535
- * CSS colour for the submit button, the links and the focus ring.
16536
- */
16537
- accentColor: string
16538
- /**
16539
- * Shown in the heading and the page title. Default "This product".
16540
- */
16541
- productName: string
16542
- /**
16543
- * CSS length for the card and its controls, e.g. "12px".
16544
- */
16545
- borderRadius: string
16546
- /**
16547
- * CSS colour of the card itself.
16548
- */
16549
- surfaceColor: string
16550
- /**
16551
- * CSS colour of secondary text and hints.
16552
- */
16553
- mutedTextColor: string
16554
- /**
16555
- * CSS colour of the page behind the card.
16556
- */
16557
- backgroundColor: string
16558
- }
16559
- invite: {
16560
- /**
16561
- * How long an invite link stays usable, in days. Default 14.
16562
- */
16563
- ttlDays: number
16564
- /**
16565
- * Minimum minutes between two invite emails to one address. Default 60.
16566
- */
16567
- resendCooldownMinutes: number
16568
- }
16569
- status: ("active" | "paused")
16570
- captcha: {
16571
- enabled: boolean
16572
- siteKey: (string | null)
16573
- provider: "turnstile"
16574
- riskElevated: boolean
16575
- }
16576
- recovery: {
16577
- /**
16578
- * Offer the password-recovery flow at all. Default true.
16579
- */
16580
- enabled: boolean
16581
- /**
16582
- * How long a reset link stays usable, in minutes. Default 60.
16583
- */
16584
- ttlMinutes: number
16585
- }
16586
- testMode: {
16587
- /**
16588
- * Opt this product into test mode. Refused outright on a production deployment — the environment gate is checked first and cannot be configured away. Turning it on is audited and raises an alert. Default false.
16589
- */
16590
- enabled: boolean
16591
- }
16592
- waitlist: {
16593
- /**
16594
- * The embeddable widget’s copy and colours.
16595
- */
16596
- widget: {
16597
- /**
16598
- * Heading above the widget form.
16599
- */
16600
- title: string
16601
- /**
16602
- * Link rendered beside the consent text. Null renders no link.
16603
- */
16604
- policyUrl: (string | null)
16605
- /**
16606
- * CSS colour for the button and the focus ring.
16607
- */
16608
- accentColor: string
16609
- /**
16610
- * Submit button copy.
16611
- */
16612
- buttonLabel: string
16613
- /**
16614
- * Consent checkbox copy. Null renders no checkbox, and the signup records the consent proof as `unspecified`.
16615
- */
16616
- consentText: (string | null)
16617
- /**
16618
- * One line under the heading.
16619
- */
16620
- description: string
16621
- /**
16622
- * The privacy-policy version the widget records in each consent proof.
16623
- */
16624
- policyVersion: string
16625
- /**
16626
- * Shown after a submission. ONE message for every outcome: the signup route answers identically whether or not the address was already on the list.
16627
- */
16628
- successMessage: string
16629
- }
16630
- /**
16631
- * Require a confirmation email before a waitlist signup counts. Default false — the entry is created either way, but an unconfirmed one is reported separately and is never invited.
16632
- */
16633
- doubleOptIn: boolean
16634
- /**
16635
- * How long a still-pending waitlist entry is kept before the sweep erases it. Default 365.
16636
- */
16637
- retentionDays: number
16638
- /**
16639
- * How long a double-opt-in confirmation link stays usable, in hours. Default 48.
16640
- */
16641
- confirmTtlHours: number
16642
- }
16643
- productId: string
16644
- retention: {
16645
- /**
16646
- * How long an EXPIRED flow attempt is kept after its own expiry. Default 0 — swept as soon as it dies, which is what the reaper did before this window existed.
16647
- */
16648
- flowAttemptDays: number
16649
- /**
16650
- * How long a SPENT or EXPIRED one-time token row (an OTP, a magic link, a recovery or abort token) is kept after it stops being usable, for forensics. The secret is a hash and the row is already dead — this only decides how long the trail lives. Default 30.
16651
- */
16652
- oneTimeTokenDays: number
16653
- /**
16654
- * How long an EXPIRED session and its refresh tokens are kept after expiry. Zero does not shorten any lifetime: a session past either window can never be refreshed again, so the row is already inert. Default 0.
16655
- */
16656
- expiredSessionDays: number
16657
- }
16658
- protection: {
16659
- /**
16660
- * Check passwords against the HaveIBeenPwned breach corpus (k-anonymity). Blocking at sign-up, advisory at sign-in. Default true.
16661
- */
16662
- hibpEnabled: boolean
16663
- /**
16664
- * How long an account stays locked. Self-healing — the lock expires on its own. Default 15.
16665
- */
16666
- lockoutMinutes: number
16667
- /**
16668
- * Failed sign-ins for one identifier before the account is locked. Default 10.
16669
- */
16670
- maxFailedAttempts: number
16671
- /**
16672
- * Flow calls allowed per IP per product per window before HTTP 429. Default 120.
16673
- */
16674
- ipAttemptsPerWindow: number
16675
- /**
16676
- * Sliding window the failed sign-ins are counted over, in minutes. Default 15.
16677
- */
16678
- failedAttemptWindowMinutes: number
16679
- /**
16680
- * Flow calls allowed per identifier per window before HTTP 429. Default 30.
16681
- */
16682
- identifierAttemptsPerWindow: number
16683
- }
16684
- signupMode: ("public" | "invite-only" | "waitlist")
16685
- emailChange: {
16686
- /**
16687
- * Allow end users to change their email address. Default true.
16688
- */
16689
- enabled: boolean
16690
- /**
16691
- * How long after a REVERT further email changes are refused, in days. Default 7.
16692
- */
16693
- cooldownDays: number
16694
- /**
16695
- * How long the old address may undo the change, in days. Default 30.
16696
- */
16697
- revertTtlDays: number
16698
- /**
16699
- * How long the two confirmation links stay usable, in hours. Default 24.
16700
- */
16701
- requestTtlHours: number
16702
- /**
16703
- * Mandatory delay on an operator-assisted override, in hours — the abort window the old address is notified with. Default 72.
16704
- */
16705
- overrideDelayHours: number
16706
- }
16707
- notifications: {
16708
- /**
16709
- * Email the user the first time a session appears from an unseen device. Default true.
16710
- */
16711
- newDevice: boolean
16712
- /**
16713
- * Email the old address when an email change is requested, completed, reverted or overridden. Default true.
16714
- */
16715
- emailChange: boolean
16716
- /**
16717
- * Email the user when an operator impersonates their account. Default true.
16718
- */
16719
- impersonation: boolean
16720
- /**
16721
- * Email the user when their password is set or changed. Default true.
16722
- */
16723
- passwordChanged: boolean
16724
- }
16725
- allowedOrigins: string[]
16726
- passwordPolicy: {
16727
- /**
16728
- * Minimum password length. Default 8.
16729
- */
16730
- minLength: number
16731
- /**
16732
- * Require at least one digit.
16733
- */
16734
- requireNumber: boolean
16735
- /**
16736
- * Require at least one non-alphanumeric character.
16737
- */
16738
- requireSymbol: boolean
16739
- /**
16740
- * Require at least one uppercase letter.
16741
- */
16742
- requireUppercase: boolean
16743
- }
16744
- sessionTtlHours: number
16745
- lifecycleBlocked: boolean
16746
- lifecycleArchived: boolean
16747
- refreshSlidingDays: number
16748
- refreshAbsoluteDays: number
16749
- redirectUriAllowlist: string[]
16750
- accessTokenTtlMinutes: number
16751
- captchaSecretConfigured: boolean
16752
- }
16753
- export interface UsersConfigUpsertOutputGoogle {
16754
- enabled: boolean
16755
- clientId: (string | null)
16756
- secretConfigured: boolean
16757
- }
16758
-
16759
- export interface UsersFactorsListInput {
16760
- /**
16761
- * The end user whose enrolled factors to list.
16762
- */
16763
- userId: string
16764
- }
16765
-
16766
- export interface UsersFactorsListOutput {
16767
- factors: {
16768
- type: ("totp" | "backup_codes")
16769
- status: ("unverified" | "verified")
16770
- createdAt: string
16771
- remaining: (number | null)
16772
- lastUsedAt: (string | null)
16773
- verifiedAt: (string | null)
16774
- }[]
16775
- }
16776
-
16777
- export interface UsersFactorsResetInput {
16778
- /**
16779
- * What identity proofing was done and under which ticket. Recorded verbatim in the audit row — this is the whole point of the tool being audited.
16780
- */
16781
- reason: string
16782
- /**
16783
- * The end user whose second factor is being reset.
16784
- */
16785
- userId: string
16786
- }
16787
-
16788
- export interface UsersFactorsResetOutput {
16789
- requestId: string
16790
- scheduledFor: string
16791
- }
16792
-
16793
- export interface UsersKeysListInput {
16794
-
16795
- }
16796
-
16797
- export interface UsersKeysListOutput {
16798
- keys: {
16799
- /**
16800
- * The RFC 7638 JWK thumbprint — what a token header carries.
16801
- */
16802
- kid: string
16803
- /**
16804
- * `standby` is pre-generated and not published; `current` signs; `retired` is still in JWKS for the overlap; `revoked` was evicted.
16805
- */
16806
- state: ("standby" | "current" | "retired" | "revoked")
16807
- createdAt: string
16808
- retiredAt: (string | null)
16809
- revokedAt: (string | null)
16810
- /**
16811
- * When a retired key leaves JWKS. Null unless the key is retired.
16812
- */
16813
- overlapExpiresAt: (string | null)
16814
- }[]
16815
- }
16816
-
16817
- export interface UsersKeysRevokeInput {
16818
- /**
16819
- * The key to evict, as listed by users_keys_list.
16820
- */
16821
- kid: string
16822
- /**
16823
- * Why. Goes into the audit row and is the only account of the incident it keeps.
16824
- */
16825
- reason?: string
16826
- /**
16827
- * Sign every end user of this product out as well. Defaults to TRUE: a compromised signing key could have minted any of those sessions. Pass false ONLY when you know no forged token was ever issued.
16828
- */
16829
- revokeSessions?: boolean
16830
- }
16831
-
16832
- export interface UsersKeysRevokeOutput {
16833
- /**
16834
- * The fresh key minted or promoted in its place.
16835
- */
16836
- currentKid: string
16837
- revokedKid: string
16838
- sessionsRevoked: number
16839
- }
16840
-
16841
- export interface UsersKeysRotateInput {
16842
-
16843
- }
16844
-
16845
- export interface UsersKeysRotateOutput {
16846
- /**
16847
- * The key signing from now on.
16848
- */
16849
- currentKid: string
16850
- /**
16851
- * The key just retired. Null if there was none.
16852
- */
16853
- previousKid: (string | null)
16854
- /**
16855
- * When the retired key stops verifying. Both kids are in JWKS until then.
16856
- */
16857
- overlapExpiresAt: (string | null)
16858
- }
16859
-
16860
- export interface UsersOpsRetentionGetInput {
16861
-
16862
- }
16863
-
16864
- export interface UsersOpsRetentionGetOutput {
16865
- /**
16866
- * The single retention job. There is exactly one — it replaced the sessions reaper and the waitlist sweep.
16867
- */
16868
- sweep: {
16869
- /**
16870
- * Its schedule, in cron syntax.
16871
- */
16872
- cron: string
16873
- /**
16874
- * What one pass removes, in the order it removes it.
16875
- */
16876
- removes: string[]
16877
- /**
16878
- * The Synapse cron function that performs every sweep below.
16879
- */
16880
- functionId: string
16881
- }
16882
- /**
16883
- * This product’s EFFECTIVE windows — what it configured, with the documented default filling anything it did not.
16884
- */
16885
- windows: {
16886
- /**
16887
- * How long an EXPIRED flow attempt is kept after its own expiry. Default 0 — swept as soon as it dies, which is what the reaper did before this window existed.
16888
- */
16889
- flowAttemptDays: number
16890
- /**
16891
- * How long a SPENT or EXPIRED one-time token row (an OTP, a magic link, a recovery or abort token) is kept after it stops being usable, for forensics. The secret is a hash and the row is already dead — this only decides how long the trail lives. Default 30.
16892
- */
16893
- oneTimeTokenDays: number
16894
- /**
16895
- * How long an EXPIRED session and its refresh tokens are kept after expiry. Zero does not shorten any lifetime: a session past either window can never be refreshed again, so the row is already inert. Default 0.
16896
- */
16897
- expiredSessionDays: number
16898
- }
16899
- /**
16900
- * The documented defaults, so a reader can tell a deliberate window from an inherited one without a second call.
16901
- */
16902
- defaults: {
16903
- /**
16904
- * How long an EXPIRED flow attempt is kept after its own expiry. Default 0 — swept as soon as it dies, which is what the reaper did before this window existed.
16905
- */
16906
- flowAttemptDays: number
16907
- /**
16908
- * How long a SPENT or EXPIRED one-time token row (an OTP, a magic link, a recovery or abort token) is kept after it stops being usable, for forensics. The secret is a hash and the row is already dead — this only decides how long the trail lives. Default 30.
16909
- */
16910
- oneTimeTokenDays: number
16911
- /**
16912
- * How long an EXPIRED session and its refresh tokens are kept after expiry. Zero does not shorten any lifetime: a session past either window can never be refreshed again, so the row is already inert. Default 0.
16913
- */
16914
- expiredSessionDays: number
16915
- }
16916
- /**
16917
- * What this service deliberately keeps forever, and why. Reading a retention surface that lists only what IS deleted is how an operator concludes the audit log ages out — it does not.
16918
- */
16919
- notSwept: {
16920
- why: string
16921
- what: string
16922
- }[]
16923
- /**
16924
- * How long a still-PENDING waitlist entry is kept. It lives in the `waitlist` config block rather than in `retention`, because it is not a grace period on a dead row: a pending entry never expires on its own, so this window is the whole of what makes it go away — and the sweep ERASES it (audit row, `users/waitlist-entry.erased`) rather than deleting it.
16925
- */
16926
- waitlistRetentionDays: number
16927
- }
16928
-
16929
- export interface UsersOpsSloGetInput {
16930
-
16931
- }
16932
-
16933
- export interface UsersOpsSloGetOutput {
16934
- /**
16935
- * Every published objective and its verdict for this window.
16936
- */
16937
- slos: {
16938
- /**
16939
- * Stable id of the objective — the key to quote in a runbook.
16940
- */
16941
- id: string
16942
- /**
16943
- * Short human name.
16944
- */
16945
- title: string
16946
- /**
16947
- * `insufficient_data` is NOT `ok`: it means the window is too quiet to judge, which an operator reading a dashboard must be able to tell apart from health.
16948
- */
16949
- status: ("ok" | "breached" | "insufficient_data")
16950
- /**
16951
- * How many events went into `observed`.
16952
- */
16953
- samples: number
16954
- /**
16955
- * What this replica sees in the CURRENT window, in the same unit as `objective`. NULL when nothing was observed.
16956
- */
16957
- observed: (number | null)
16958
- /**
16959
- * The `users/alert.raised` kind a breach of this objective fires, for wiring an alert route.
16960
- */
16961
- alertKind: string
16962
- /**
16963
- * The published objective, as a ratio in 0..1.
16964
- */
16965
- objective: number
16966
- /**
16967
- * Which side of `objective` is healthy: a success rate is at-least, an error rate at-most.
16968
- */
16969
- comparator: ("at-least" | "at-most")
16970
- /**
16971
- * Below this many samples the ratio is not judged at all — a quiet window is not an outage.
16972
- */
16973
- minSamples: number
16974
- /**
16975
- * What is counted, and what is deliberately NOT counted.
16976
- */
16977
- description: string
16978
- /**
16979
- * The window the observation is computed over.
16980
- */
16981
- windowSeconds: number
16982
- }[]
16983
- /**
16984
- * These numbers come from ONE replica’s in-process window, not from the whole deployment. Treat them as a spot check, not as the fleet’s error budget.
16985
- */
16986
- scope: "replica"
16987
- /**
16988
- * The current window, exactly as the alert hook sees it.
16989
- */
16990
- window: {
16991
- mail: {
16992
- /**
16993
- * Auth emails handed to mail (a cooldown or daily cap never reaches this).
16994
- */
16995
- total: number
16996
- /**
16997
- * Of those, the ones mail would not take.
16998
- */
16999
- failures: number
17000
- /**
17001
- * failures / total. NULL when nothing was sent.
17002
- */
17003
- failureRate: (number | null)
17004
- }
17005
- signIn: {
17006
- /**
17007
- * SETTLED flow attempts — completed or failed. A pending one is neither.
17008
- */
17009
- total: number
17010
- /**
17011
- * Of those, the ones that failed.
17012
- */
17013
- failures: number
17014
- /**
17015
- * completed / settled. NULL, never 0, when nothing settled.
17016
- */
17017
- successRate: (number | null)
17018
- }
17019
- refresh: {
17020
- /**
17021
- * Refresh attempts.
17022
- */
17023
- total: number
17024
- /**
17025
- * Failed refreshes, detected reuse included.
17026
- */
17027
- errors: number
17028
- /**
17029
- * Detected token REUSE — theft, counted rather than rated.
17030
- */
17031
- reuses: number
17032
- /**
17033
- * errors / total. NULL when nothing was refreshed.
17034
- */
17035
- errorRate: (number | null)
17036
- }
17037
- /**
17038
- * Length of the evaluation window.
17039
- */
17040
- windowSeconds: number
17041
- /**
17042
- * ISO start of the window these numbers belong to.
17043
- */
17044
- windowStartedAt: string
17045
- /**
17046
- * This product’s OWN trailing sign-in failure rate, over CLOSED windows. What the anomaly signal compares the live window against — NULL until at least one window has closed.
17047
- */
17048
- signInFailureBaseline: (number | null)
17049
- }
17050
- }
17051
-
17052
- export interface UsersSessionsGetInput {
17053
- /**
17054
- * The session to read.
17055
- */
17056
- sessionId: string
17057
- }
17058
-
17059
- export interface UsersSessionsGetOutput {
17060
- id: string
17061
- ip: (string | null)
17062
- /**
17063
- * `aal2` only if a verified second factor completed.
17064
- */
17065
- aal: ("aal1" | "aal2")
17066
- /**
17067
- * The factors this session was established with.
17068
- */
17069
- amr: string[]
17070
- status: ("active" | "revoked")
17071
- userId: string
17072
- createdAt: string
17073
- expiresAt: string
17074
- revokedAt: (string | null)
17075
- userAgent: (string | null)
17076
- revokedReason: (string | null)
17077
- /**
17078
- * The operator behind an impersonated session, or null for an ordinary one.
17079
- */
17080
- impersonatedBy: (string | null)
17081
- lastRefreshedAt: (string | null)
17082
- absoluteExpiresAt: string
17083
- }
17084
-
17085
- export interface UsersSessionsImpersonateInput {
17086
- /**
17087
- * Why. Recorded in the audit trail and shown to the user in the notification email — write what you would want to read in an incident review (a ticket number and one sentence).
17088
- */
17089
- reason: string
17090
- /**
17091
- * The end user to sign in as.
17092
- */
17093
- userId: string
17094
- }
17095
-
17096
- export interface UsersSessionsImpersonateOutput {
17097
- userId: string
17098
- /**
17099
- * When the session dies. It cannot be extended or refreshed.
17100
- */
17101
- expiresAt: string
17102
- /**
17103
- * Seconds until the access token expires.
17104
- */
17105
- expiresIn: number
17106
- sessionId: string
17107
- /**
17108
- * The access JWT of the impersonated session. There is NO refresh token.
17109
- */
17110
- accessToken: string
17111
- }
17112
-
17113
- export interface UsersSessionsListInput {
17114
- /**
17115
- * The end user whose sessions to list.
17116
- */
17117
- userId: string
17118
- }
17119
-
17120
- export interface UsersSessionsListOutput {
17121
- sessions: {
17122
- id: string
17123
- ip: (string | null)
17124
- status: ("active" | "revoked")
17125
- userId: string
17126
- createdAt: string
17127
- expiresAt: string
17128
- revokedAt: (string | null)
17129
- userAgent: (string | null)
17130
- lastRefreshedAt: (string | null)
17131
- absoluteExpiresAt: string
17132
- }[]
17133
- }
17134
-
17135
- export interface UsersSessionsRevokeInput {
17136
- /**
17137
- * Revoke every session of this user.
17138
- */
17139
- userId?: string
17140
- /**
17141
- * Revoke exactly this session.
17142
- */
17143
- sessionId?: string
17144
- }
17145
-
17146
- export interface UsersSessionsRevokeOutput {
17147
- revoked: number
17148
- }
17149
-
17150
- export interface UsersStatsGetInput {
17151
- /**
17152
- * Look-back window for the TIME-BOUNDED numbers — the sign-in counters, the abuse block and `sessions.createdInWindow`: '24h', '7d', '30d' or '90d'. Default '7d'. The user, live-session and factor populations are point-in-time and ignore it.
17153
- */
17154
- window?: ("24h" | "7d" | "30d" | "90d")
17155
- }
17156
-
17157
- export interface UsersStatsGetOutput {
17158
- /**
17159
- * Abuse signals over the window. Denied origins are deliberately absent: that check fires on unauthenticated traffic and is served by logs and metrics, not by per-product audit rows.
17160
- */
17161
- abuse: {
17162
- /**
17163
- * Accounts locked by a failed-attempt ceiling — password and second factor both.
17164
- */
17165
- lockouts: number
17166
- /**
17167
- * The subset of `lockouts` caused by the SECOND-factor ceiling.
17168
- */
17169
- mfaLockouts: number
17170
- /**
17171
- * Mirrors `signIns.failed`, so the abuse block reads on its own.
17172
- */
17173
- failedSignIns: number
17174
- /**
17175
- * Breach-corpus matches against a user's password.
17176
- */
17177
- pwnedPasswordsSeen: number
17178
- /**
17179
- * Refresh tokens spent twice outside the grace window — theft, not staleness. Each one revoked a whole session family.
17180
- */
17181
- refreshReuseDetected: number
17182
- }
17183
- /**
17184
- * ISO start of that window — the `created_at` floor every counter used.
17185
- */
17186
- since: string
17187
- /**
17188
- * Point-in-time directory populations by DERIVED status — `user` has no status column, these are computed from `waitlisted` and the ban/delete/erase timestamps.
17189
- */
17190
- users: {
17191
- /**
17192
- * Every directory row, GDPR tombstones included.
17193
- */
17194
- total: number
17195
- /**
17196
- * Full accounts: not waitlisted, not banned, not deleted, not erased.
17197
- */
17198
- active: number
17199
- /**
17200
- * Banned accounts that are still present.
17201
- */
17202
- banned: number
17203
- /**
17204
- * GDPR-erased tombstones: the id survives, the PII does not.
17205
- */
17206
- erased: number
17207
- /**
17208
- * SOFT-deleted and still recoverable — not erased.
17209
- */
17210
- deleted: number
17211
- /**
17212
- * Waitlist signups with no credential yet.
17213
- */
17214
- waitlisted: number
17215
- }
17216
- /**
17217
- * The window the time-bounded numbers were computed over.
17218
- */
17219
- window: ("24h" | "7d" | "30d" | "90d")
17220
- /**
17221
- * Enrolled second factors (TOTP and backup-code batches).
17222
- */
17223
- factors: {
17224
- /**
17225
- * VERIFIED second factors; an unverified enrollment gates nothing.
17226
- */
17227
- verified: number
17228
- /**
17229
- * Distinct users holding at least one verified factor.
17230
- */
17231
- usersWithFactor: number
17232
- }
17233
- /**
17234
- * Sign-in outcomes over the window, from the audit log.
17235
- */
17236
- signIns: {
17237
- /**
17238
- * Failed sign-in attempts in the window.
17239
- */
17240
- failed: number
17241
- /**
17242
- * Successful sign-ins in the window.
17243
- */
17244
- succeeded: number
17245
- /**
17246
- * succeeded / (succeeded + failed), 4 decimals. NULL — never 0 — when nothing was attempted: an idle window and a totally broken one are opposite facts.
17247
- */
17248
- successRate: (number | null)
17249
- }
17250
- /**
17251
- * Device sessions.
17252
- */
17253
- sessions: {
17254
- /**
17255
- * Live right now: active, unrevoked and inside BOTH the sliding and absolute expiry.
17256
- */
17257
- active: number
17258
- /**
17259
- * Sessions established since `since`.
17260
- */
17261
- createdInWindow: number
17262
- }
17263
- }
17264
-
17265
- export interface UsersUsersBanInput {
17266
- /**
17267
- * The opaque user id returned by users_users_create or _list.
17268
- */
17269
- userId: string
17270
- }
17271
-
17272
- export interface UsersUsersBanOutput {
17273
- id: string
17274
- name: (string | null)
17275
- bannedAt: (string | null)
17276
- erasedAt: (string | null)
17277
- imageUrl: (string | null)
17278
- testUser: boolean
17279
- createdAt: string
17280
- deletedAt: (string | null)
17281
- productId: string
17282
- updatedAt: string
17283
- waitlisted: boolean
17284
- identifiers: {
17285
- id: string
17286
- type: "email"
17287
- value: string
17288
- isPrimary: boolean
17289
- verifiedAt: (string | null)
17290
- valueCanonical: string
17291
- verificationStatus: ("unverified" | "verified" | "expired")
17292
- }[]
17293
- lockedUntil: (string | null)
17294
- lastSignInAt: (string | null)
17295
- requiresReset: boolean
17296
- publicMetadata: UsersUsersBanOutputPublicMetadata
17297
- unsafeMetadata: UsersUsersBanOutputPublicMetadata
17298
- privateMetadata: UsersUsersBanOutputPublicMetadata
17299
- emailChangeLockedUntil: (string | null)
17300
- }
17301
- export interface UsersUsersBanOutputPublicMetadata {
17302
- [k: string]: unknown
17303
- }
17304
-
17305
- export interface UsersUsersCreateInput {
17306
- /**
17307
- * The user's display name.
17308
- */
17309
- name?: string
17310
- /**
17311
- * URL of the user's avatar image.
17312
- */
17313
- imageUrl?: string
17314
- /**
17315
- * Optional credential to store for this user. Hashes only — this toolkit never accepts a plaintext password. Nothing verifies it until Phase 2.
17316
- */
17317
- password?: {
17318
- /**
17319
- * A PHC-format password hash (e.g. an argon2id string) to store as-is. Never send a plaintext password.
17320
- */
17321
- phcHash?: string
17322
- /**
17323
- * An imported hash from another system, to be lazily rehashed on the first successful sign-in (Phase 2).
17324
- */
17325
- foreignHash?: string
17326
- /**
17327
- * Algorithm of `foreignHash`. Required when `foreignHash` is set.
17328
- */
17329
- foreignHashAlgo?: ("bcrypt" | "argon2" | "pbkdf2" | "scrypt")
17330
- }
17331
- /**
17332
- * Create this user as a TEST FIXTURE: excluded from metering (it never counts toward retained-users), hidden from the default users_users_list view, never really emailed, and — when the deployment configures one — able to sign in with the fixed magic OTP. REFUSED unless this product has test mode enabled, which a production deployment cannot do. There is no way to set or clear this later. Default false.
17333
- */
17334
- testUser?: boolean
17335
- /**
17336
- * Create the user as a waitlist signup: no way in until promoted. Default false.
17337
- */
17338
- waitlisted?: boolean
17339
- /**
17340
- * The email addresses that reach this user. At least one is required.
17341
- *
17342
- * @minItems 1
17343
- */
17344
- identifiers: [{
17345
- /**
17346
- * Identifier kind. Only 'email' exists in this phase.
17347
- */
17348
- type: "email"
17349
- /**
17350
- * The email address. Stored canonicalised (lowercase, NFC) plus raw for display.
17351
- */
17352
- value: string
17353
- /**
17354
- * Record the identifier as already verified (use for trusted imports). Only ONE verified copy of a value may exist per product; unverified duplicates are allowed. Default false.
17355
- */
17356
- verified?: boolean
17357
- /**
17358
- * Mark as the primary identifier of its type. The first identifier of a type defaults to primary.
17359
- */
17360
- isPrimary?: boolean
17361
- }, ...({
17362
- /**
17363
- * Identifier kind. Only 'email' exists in this phase.
17364
- */
17365
- type: "email"
17366
- /**
17367
- * The email address. Stored canonicalised (lowercase, NFC) plus raw for display.
17368
- */
17369
- value: string
17370
- /**
17371
- * Record the identifier as already verified (use for trusted imports). Only ONE verified copy of a value may exist per product; unverified duplicates are allowed. Default false.
17372
- */
17373
- verified?: boolean
17374
- /**
17375
- * Mark as the primary identifier of its type. The first identifier of a type defaults to primary.
17376
- */
17377
- isPrimary?: boolean
17378
- })[]]
17379
- /**
17380
- * Force a password reset before the user can sign in (use for unverifiable imported hashes). Default false.
17381
- */
17382
- requiresReset?: boolean
17383
- /**
17384
- * Metadata the end user may READ and that may flow into the JWT. Management-plane write only.
17385
- */
17386
- publicMetadata?: {
17387
- [k: string]: unknown
17388
- }
17389
- unsafeMetadata?: UsersUsersCreateInputPublicMetadata
17390
- privateMetadata?: UsersUsersCreateInputPublicMetadata1
17391
- }
17392
- /**
17393
- * Metadata the end user may WRITE in a later phase. Never trust it for authorization.
17394
- */
17395
- export interface UsersUsersCreateInputPublicMetadata {
17396
- [k: string]: unknown
17397
- }
17398
- /**
17399
- * Metadata visible to the management plane only. Never exposed to the end user.
17400
- */
17401
- export interface UsersUsersCreateInputPublicMetadata1 {
17402
- [k: string]: unknown
17403
- }
17404
-
17405
- export interface UsersUsersCreateOutput {
17406
- id: string
17407
- name: (string | null)
17408
- bannedAt: (string | null)
17409
- erasedAt: (string | null)
17410
- imageUrl: (string | null)
17411
- testUser: boolean
17412
- createdAt: string
17413
- deletedAt: (string | null)
17414
- productId: string
17415
- updatedAt: string
17416
- waitlisted: boolean
17417
- identifiers: {
17418
- id: string
17419
- type: "email"
17420
- value: string
17421
- isPrimary: boolean
17422
- verifiedAt: (string | null)
17423
- valueCanonical: string
17424
- verificationStatus: ("unverified" | "verified" | "expired")
17425
- }[]
17426
- lockedUntil: (string | null)
17427
- lastSignInAt: (string | null)
17428
- requiresReset: boolean
17429
- publicMetadata: UsersUsersCreateOutputPublicMetadata
17430
- unsafeMetadata: UsersUsersCreateOutputPublicMetadata
17431
- privateMetadata: UsersUsersCreateOutputPublicMetadata
17432
- emailChangeLockedUntil: (string | null)
17433
- }
17434
- export interface UsersUsersCreateOutputPublicMetadata {
17435
- [k: string]: unknown
17436
- }
17437
-
17438
- export interface UsersUsersDeleteInput {
17439
- /**
17440
- * The opaque user id returned by users_users_create or _list.
17441
- */
17442
- userId: string
17443
- }
17444
-
17445
- export interface UsersUsersDeleteOutput {
17446
- id: string
17447
- name: (string | null)
17448
- bannedAt: (string | null)
17449
- erasedAt: (string | null)
17450
- imageUrl: (string | null)
17451
- testUser: boolean
17452
- createdAt: string
17453
- deletedAt: (string | null)
17454
- productId: string
17455
- updatedAt: string
17456
- waitlisted: boolean
17457
- identifiers: {
17458
- id: string
17459
- type: "email"
17460
- value: string
17461
- isPrimary: boolean
17462
- verifiedAt: (string | null)
17463
- valueCanonical: string
17464
- verificationStatus: ("unverified" | "verified" | "expired")
17465
- }[]
17466
- lockedUntil: (string | null)
17467
- lastSignInAt: (string | null)
17468
- requiresReset: boolean
17469
- publicMetadata: UsersUsersDeleteOutputPublicMetadata
17470
- unsafeMetadata: UsersUsersDeleteOutputPublicMetadata
17471
- privateMetadata: UsersUsersDeleteOutputPublicMetadata
17472
- emailChangeLockedUntil: (string | null)
17473
- }
17474
- export interface UsersUsersDeleteOutputPublicMetadata {
17475
- [k: string]: unknown
17476
- }
17477
-
17478
- export interface UsersUsersEraseInput {
17479
- /**
17480
- * The opaque user id returned by users_users_create or _list.
17481
- */
17482
- userId: string
17483
- }
17484
-
17485
- export interface UsersUsersEraseOutput {
17486
- id: string
17487
- name: (string | null)
17488
- bannedAt: (string | null)
17489
- erasedAt: (string | null)
17490
- imageUrl: (string | null)
17491
- testUser: boolean
17492
- createdAt: string
17493
- deletedAt: (string | null)
17494
- productId: string
17495
- updatedAt: string
17496
- waitlisted: boolean
17497
- identifiers: {
17498
- id: string
17499
- type: "email"
17500
- value: string
17501
- isPrimary: boolean
17502
- verifiedAt: (string | null)
17503
- valueCanonical: string
17504
- verificationStatus: ("unverified" | "verified" | "expired")
17505
- }[]
17506
- lockedUntil: (string | null)
17507
- lastSignInAt: (string | null)
17508
- requiresReset: boolean
17509
- publicMetadata: UsersUsersEraseOutputPublicMetadata
17510
- unsafeMetadata: UsersUsersEraseOutputPublicMetadata
17511
- privateMetadata: UsersUsersEraseOutputPublicMetadata
17512
- emailChangeLockedUntil: (string | null)
17513
- }
17514
- export interface UsersUsersEraseOutputPublicMetadata {
17515
- [k: string]: unknown
17516
- }
17517
-
17518
- export interface UsersUsersExportInput {
17519
- /**
17520
- * Rows per page, 1-500. Default 100.
17521
- */
17522
- limit?: number
17523
- /**
17524
- * Case-insensitive substring match against the user's identifiers (email) and name.
17525
- */
17526
- query?: string
17527
- /**
17528
- * Opaque cursor from the previous page's `nextCursor`. Omit for the first page.
17529
- */
17530
- cursor?: string
17531
- /**
17532
- * Filter by status: 'active', 'banned' or 'waitlisted'. Omit for all.
17533
- */
17534
- status?: ("active" | "banned" | "waitlisted")
17535
- /**
17536
- * Include soft-deleted users. Default false.
17537
- */
17538
- includeDeleted?: boolean
17539
- }
17540
-
17541
- export interface UsersUsersExportOutput {
17542
- count: number
17543
- users: {
17544
- id: string
17545
- name: (string | null)
17546
- bannedAt: (string | null)
17547
- erasedAt: (string | null)
17548
- imageUrl: (string | null)
17549
- testUser: boolean
17550
- createdAt: string
17551
- deletedAt: (string | null)
17552
- productId: string
17553
- updatedAt: string
17554
- waitlisted: boolean
17555
- identifiers: {
17556
- id: string
17557
- type: "email"
17558
- value: string
17559
- isPrimary: boolean
17560
- verifiedAt: (string | null)
17561
- valueCanonical: string
17562
- verificationStatus: ("unverified" | "verified" | "expired")
17563
- }[]
17564
- lockedUntil: (string | null)
17565
- lastSignInAt: (string | null)
17566
- requiresReset: boolean
17567
- publicMetadata: UsersUsersExportOutputPublicMetadata
17568
- unsafeMetadata: UsersUsersExportOutputPublicMetadata
17569
- privateMetadata: UsersUsersExportOutputPublicMetadata
17570
- emailChangeLockedUntil: (string | null)
17571
- }[]
17572
- exportedAt: string
17573
- nextCursor: (string | null)
17574
- }
17575
- export interface UsersUsersExportOutputPublicMetadata {
17576
- [k: string]: unknown
17577
- }
17578
-
17579
- export interface UsersUsersGetInput {
17580
- /**
17581
- * The opaque user id returned by users_users_create or _list.
17582
- */
17583
- userId: string
17584
- }
17585
-
17586
- export interface UsersUsersGetOutput {
17587
- id: string
17588
- name: (string | null)
17589
- bannedAt: (string | null)
17590
- erasedAt: (string | null)
17591
- imageUrl: (string | null)
17592
- testUser: boolean
17593
- createdAt: string
17594
- deletedAt: (string | null)
17595
- productId: string
17596
- updatedAt: string
17597
- waitlisted: boolean
17598
- identifiers: {
17599
- id: string
17600
- type: "email"
17601
- value: string
17602
- isPrimary: boolean
17603
- verifiedAt: (string | null)
17604
- valueCanonical: string
17605
- verificationStatus: ("unverified" | "verified" | "expired")
17606
- }[]
17607
- lockedUntil: (string | null)
17608
- lastSignInAt: (string | null)
17609
- requiresReset: boolean
17610
- publicMetadata: UsersUsersGetOutputPublicMetadata
17611
- unsafeMetadata: UsersUsersGetOutputPublicMetadata
17612
- privateMetadata: UsersUsersGetOutputPublicMetadata
17613
- emailChangeLockedUntil: (string | null)
17614
- }
17615
- export interface UsersUsersGetOutputPublicMetadata {
17616
- [k: string]: unknown
17617
- }
17618
-
17619
- export interface UsersUsersImportInput {
17620
- /**
17621
- * The users to import, at most 500 per call — batch client-side beyond that. Each row: identifiers (email), optional profile, optional password HASH, optional flags.
17622
- *
17623
- * @minItems 1
17624
- * @maxItems 500
17625
- */
17626
- users: [unknown, ...(unknown)[]]
17627
- }
17628
-
17629
- export interface UsersUsersImportOutput {
17630
- failed: number
17631
- created: number
17632
- results: {
17633
- row: number
17634
- reason: (string | null)
17635
- status: ("created" | "skipped" | "failed")
17636
- userId: (string | null)
17637
- }[]
17638
- skipped: number
17639
- requested: number
17640
- }
17641
-
17642
- export interface UsersUsersInviteInput {
17643
- /**
17644
- * The invitee's display name.
17645
- */
17646
- name?: string
17647
- /**
17648
- * The address to invite. Stored canonicalised (lowercase, NFC) plus raw for display.
17649
- */
17650
- email: string
17651
- /**
17652
- * Metadata the end user may READ and that may flow into the JWT.
17653
- */
17654
- publicMetadata?: {
17655
- [k: string]: unknown
17656
- }
17657
- /**
17658
- * Metadata visible to the management plane only. Never exposed to the end user.
17659
- */
17660
- privateMetadata?: {
17661
- [k: string]: unknown
17662
- }
17663
- }
17664
-
17665
- export interface UsersUsersInviteOutput {
17666
- mailed: boolean
17667
- userId: string
17668
- created: boolean
17669
- expiresAt: string
17670
- }
17671
-
17672
- export interface UsersUsersListInput {
17673
- /**
17674
- * Page size, 1-100. Default 25.
17675
- */
17676
- limit?: number
17677
- /**
17678
- * Case-insensitive substring match against the user's identifiers (email) and name.
17679
- */
17680
- query?: string
17681
- /**
17682
- * Opaque cursor from a previous response's `nextCursor`. Omit for the first page.
17683
- */
17684
- cursor?: string
17685
- /**
17686
- * Filter by status: 'active' (not banned, not waitlisted), 'banned', or 'waitlisted'. Omit for all.
17687
- */
17688
- status?: ("active" | "banned" | "waitlisted")
17689
- /**
17690
- * Include soft-deleted users. Default false — deleted users are hidden.
17691
- */
17692
- includeDeleted?: boolean
17693
- /**
17694
- * Include TEST USERS. Default false: a test user is a fixture, not a customer — it is excluded from metering and from this listing for the same reason. Ask for it explicitly when you are debugging the fixtures themselves.
17695
- */
17696
- includeTestUsers?: boolean
17697
- /**
17698
- * Include waitlist signups. Default false: a waitlisted row is somebody who ASKED to join and cannot sign in, so it is not part of the directory an operator browses. Use `status: "waitlisted"` to see only them, or `users_waitlist_list` for the funnel.
17699
- */
17700
- includeWaitlisted?: boolean
17701
- }
17702
-
17703
- export interface UsersUsersListOutput {
17704
- users: {
17705
- id: string
17706
- name: (string | null)
17707
- bannedAt: (string | null)
17708
- erasedAt: (string | null)
17709
- imageUrl: (string | null)
17710
- testUser: boolean
17711
- createdAt: string
17712
- deletedAt: (string | null)
17713
- productId: string
17714
- updatedAt: string
17715
- waitlisted: boolean
17716
- identifiers: {
17717
- id: string
17718
- type: "email"
17719
- value: string
17720
- isPrimary: boolean
17721
- verifiedAt: (string | null)
17722
- valueCanonical: string
17723
- verificationStatus: ("unverified" | "verified" | "expired")
17724
- }[]
17725
- lockedUntil: (string | null)
17726
- lastSignInAt: (string | null)
17727
- requiresReset: boolean
17728
- publicMetadata: UsersUsersListOutputPublicMetadata
17729
- unsafeMetadata: UsersUsersListOutputPublicMetadata
17730
- privateMetadata: UsersUsersListOutputPublicMetadata
17731
- emailChangeLockedUntil: (string | null)
17732
- }[]
17733
- nextCursor: (string | null)
17734
- }
17735
- export interface UsersUsersListOutputPublicMetadata {
17736
- [k: string]: unknown
17737
- }
17738
-
17739
- export interface UsersUsersSetPrimaryIdentifierInput {
17740
- /**
17741
- * The address to make primary. Must not already belong, verified, to another user of this product.
17742
- */
17743
- email: string
17744
- /**
17745
- * What identity proofing was done and under which ticket. Recorded verbatim in the audit row — this is the whole point of the tool being audited.
17746
- */
17747
- reason: string
17748
- /**
17749
- * The user whose primary email address is being replaced.
17750
- */
17751
- userId: string
17752
- }
17753
-
17754
- export interface UsersUsersSetPrimaryIdentifierOutput {
17755
- requestId: string
17756
- scheduledFor: string
17757
- }
17758
-
17759
- export interface UsersUsersUnbanInput {
17760
- /**
17761
- * The opaque user id returned by users_users_create or _list.
17762
- */
17763
- userId: string
17764
- }
17765
-
17766
- export interface UsersUsersUnbanOutput {
17767
- id: string
17768
- name: (string | null)
17769
- bannedAt: (string | null)
17770
- erasedAt: (string | null)
17771
- imageUrl: (string | null)
17772
- testUser: boolean
17773
- createdAt: string
17774
- deletedAt: (string | null)
17775
- productId: string
17776
- updatedAt: string
17777
- waitlisted: boolean
17778
- identifiers: {
17779
- id: string
17780
- type: "email"
17781
- value: string
17782
- isPrimary: boolean
17783
- verifiedAt: (string | null)
17784
- valueCanonical: string
17785
- verificationStatus: ("unverified" | "verified" | "expired")
17786
- }[]
17787
- lockedUntil: (string | null)
17788
- lastSignInAt: (string | null)
17789
- requiresReset: boolean
17790
- publicMetadata: UsersUsersUnbanOutputPublicMetadata
17791
- unsafeMetadata: UsersUsersUnbanOutputPublicMetadata
17792
- privateMetadata: UsersUsersUnbanOutputPublicMetadata
17793
- emailChangeLockedUntil: (string | null)
17794
- }
17795
- export interface UsersUsersUnbanOutputPublicMetadata {
17796
- [k: string]: unknown
17797
- }
17798
-
17799
- export interface UsersUsersUpdateInput {
17800
- /**
17801
- * The user's display name. Pass null to clear.
17802
- */
17803
- name?: (string | null)
17804
- /**
17805
- * The user to update.
17806
- */
17807
- userId: string
17808
- /**
17809
- * URL of the user's avatar image. Pass null to clear.
17810
- */
17811
- imageUrl?: (string | null)
17812
- /**
17813
- * Whether the user is still a waitlist signup.
17814
- */
17815
- waitlisted?: boolean
17816
- /**
17817
- * ISO-8601 timestamp of a temporary, self-healing lockout — the failed-attempt ceiling sets it and it expires on its own. Pass null to unlock the account immediately (audited as `user.unlocked`).
17818
- */
17819
- lockedUntil?: (string | null)
17820
- /**
17821
- * Whether the user must reset their password before signing in.
17822
- */
17823
- requiresReset?: boolean
17824
- /**
17825
- * REPLACES the whole public metadata bag. Management-plane write, end-user read.
17826
- */
17827
- publicMetadata?: {
17828
- [k: string]: unknown
17829
- }
17830
- unsafeMetadata?: UsersUsersUpdateInputPublicMetadata
17831
- privateMetadata?: UsersUsersUpdateInputPublicMetadata1
17832
- }
17833
- /**
17834
- * REPLACES the whole unsafe metadata bag. End-user writable in a later phase; never authoritative.
17835
- */
17836
- export interface UsersUsersUpdateInputPublicMetadata {
17837
- [k: string]: unknown
17838
- }
17839
- /**
17840
- * REPLACES the whole private metadata bag. Management plane only.
17841
- */
17842
- export interface UsersUsersUpdateInputPublicMetadata1 {
17843
- [k: string]: unknown
17844
- }
17845
-
17846
- export interface UsersUsersUpdateOutput {
17847
- id: string
17848
- name: (string | null)
17849
- bannedAt: (string | null)
17850
- erasedAt: (string | null)
17851
- imageUrl: (string | null)
17852
- testUser: boolean
17853
- createdAt: string
17854
- deletedAt: (string | null)
17855
- productId: string
17856
- updatedAt: string
17857
- waitlisted: boolean
17858
- identifiers: {
17859
- id: string
17860
- type: "email"
17861
- value: string
17862
- isPrimary: boolean
17863
- verifiedAt: (string | null)
17864
- valueCanonical: string
17865
- verificationStatus: ("unverified" | "verified" | "expired")
17866
- }[]
17867
- lockedUntil: (string | null)
17868
- lastSignInAt: (string | null)
17869
- requiresReset: boolean
17870
- publicMetadata: UsersUsersUpdateOutputPublicMetadata
17871
- unsafeMetadata: UsersUsersUpdateOutputPublicMetadata
17872
- privateMetadata: UsersUsersUpdateOutputPublicMetadata
17873
- emailChangeLockedUntil: (string | null)
17874
- }
17875
- export interface UsersUsersUpdateOutputPublicMetadata {
17876
- [k: string]: unknown
17877
- }
17878
-
17879
- export interface UsersWaitlistEraseInput {
17880
- /**
17881
- * The waitlisted user whose entry and directory row to erase.
17882
- */
17883
- userId: string
17884
- }
17885
-
17886
- export interface UsersWaitlistEraseOutput {
17887
- erased: boolean
17888
- }
17889
-
17890
- export interface UsersWaitlistFunnelInput {
17891
-
17892
- }
17893
-
17894
- export interface UsersWaitlistFunnelOutput {
17895
- total: number
17896
- invited: number
17897
- pending: number
17898
- withdrawn: number
17899
- registered: number
17900
- unconfirmed: number
17901
- }
17902
-
17903
- export interface UsersWaitlistImportInput {
17904
- /**
17905
- * The legacy signups to import, at most 500 per call — batch client-side beyond that.
17906
- *
17907
- * @minItems 1
17908
- * @maxItems 500
17909
- */
17910
- entries: [{
17911
- /**
17912
- * The signup's display name.
17913
- */
17914
- name?: string
17915
- /**
17916
- * The consent proof from the source system. REQUIRED: a waitlist entry with no evidence of consent is exactly what this import exists to avoid creating.
17917
- */
17918
- consent: {
17919
- /**
17920
- * The IP the source system recorded, when it recorded one.
17921
- */
17922
- ip?: (string | null)
17923
- /**
17924
- * Where the acceptance happened in the source system, e.g. `legacy-widget`.
17925
- */
17926
- source: string
17927
- /**
17928
- * The user agent the source system recorded, when it recorded one.
17929
- */
17930
- userAgent?: (string | null)
17931
- /**
17932
- * When they accepted it, as recorded by the source system. Carried over verbatim — this is the evidence, and stamping it with the import time would destroy it.
17933
- */
17934
- acceptedAt: string
17935
- /**
17936
- * The privacy-policy version the signer accepted in the SOURCE system.
17937
- */
17938
- policyVersion: string
17939
- }
17940
- /**
17941
- * Whether the address had proven itself reachable in the source system. Default true — a legacy list has already been mailed. Pass false to land the row as unconfirmed, where it is reported separately and is never invited.
17942
- */
17943
- confirmed?: boolean
17944
- /**
17945
- * The email address on the legacy list. Stored canonicalised plus raw for display.
17946
- */
17947
- identifier: string
17948
- /**
17949
- * Referrer / UTM attribution the source system recorded.
17950
- */
17951
- attribution?: {
17952
- /**
17953
- * utm_term of the visit.
17954
- */
17955
- utmTerm?: string
17956
- /**
17957
- * The document referrer of the signup page.
17958
- */
17959
- referrer?: string
17960
- /**
17961
- * utm_medium of the visit.
17962
- */
17963
- utmMedium?: string
17964
- /**
17965
- * utm_source of the visit.
17966
- */
17967
- utmSource?: string
17968
- /**
17969
- * utm_content of the visit.
17970
- */
17971
- utmContent?: string
17972
- /**
17973
- * The URL the signup was submitted from.
17974
- */
17975
- landingPage?: string
17976
- /**
17977
- * utm_campaign of the visit.
17978
- */
17979
- utmCampaign?: string
17980
- }
17981
- /**
17982
- * End-user-writable metadata to carry onto the created user.
17983
- */
17984
- unsafeMetadata?: {
17985
- [k: string]: unknown
17986
- }
17987
- }, ...({
17988
- /**
17989
- * The signup's display name.
17990
- */
17991
- name?: string
17992
- /**
17993
- * The consent proof from the source system. REQUIRED: a waitlist entry with no evidence of consent is exactly what this import exists to avoid creating.
17994
- */
17995
- consent: {
17996
- /**
17997
- * The IP the source system recorded, when it recorded one.
17998
- */
17999
- ip?: (string | null)
18000
- /**
18001
- * Where the acceptance happened in the source system, e.g. `legacy-widget`.
18002
- */
18003
- source: string
18004
- /**
18005
- * The user agent the source system recorded, when it recorded one.
18006
- */
18007
- userAgent?: (string | null)
18008
- /**
18009
- * When they accepted it, as recorded by the source system. Carried over verbatim — this is the evidence, and stamping it with the import time would destroy it.
18010
- */
18011
- acceptedAt: string
18012
- /**
18013
- * The privacy-policy version the signer accepted in the SOURCE system.
18014
- */
18015
- policyVersion: string
18016
- }
18017
- /**
18018
- * Whether the address had proven itself reachable in the source system. Default true — a legacy list has already been mailed. Pass false to land the row as unconfirmed, where it is reported separately and is never invited.
18019
- */
18020
- confirmed?: boolean
18021
- /**
18022
- * The email address on the legacy list. Stored canonicalised plus raw for display.
18023
- */
18024
- identifier: string
18025
- /**
18026
- * Referrer / UTM attribution the source system recorded.
18027
- */
18028
- attribution?: {
18029
- /**
18030
- * utm_term of the visit.
18031
- */
18032
- utmTerm?: string
18033
- /**
18034
- * The document referrer of the signup page.
18035
- */
18036
- referrer?: string
18037
- /**
18038
- * utm_medium of the visit.
18039
- */
18040
- utmMedium?: string
18041
- /**
18042
- * utm_source of the visit.
18043
- */
18044
- utmSource?: string
18045
- /**
18046
- * utm_content of the visit.
18047
- */
18048
- utmContent?: string
18049
- /**
18050
- * The URL the signup was submitted from.
18051
- */
18052
- landingPage?: string
18053
- /**
18054
- * utm_campaign of the visit.
18055
- */
18056
- utmCampaign?: string
18057
- }
18058
- /**
18059
- * End-user-writable metadata to carry onto the created user.
18060
- */
18061
- unsafeMetadata?: {
18062
- [k: string]: unknown
18063
- }
18064
- })[]]
18065
- }
18066
-
18067
- export interface UsersWaitlistImportOutput {
18068
- failed: number
18069
- results: {
18070
- row: number
18071
- reason: (string | null)
18072
- status: ("imported" | "skipped" | "failed")
18073
- userId: (string | null)
18074
- }[]
18075
- skipped: number
18076
- imported: number
18077
- requested: number
18078
- }
18079
-
18080
- export interface UsersWaitlistInviteInput {
18081
- /**
18082
- * The waitlisted users to promote, up to 100 per call. Each gets the STANDARD invite email; accepting it is what creates their credential.
18083
- *
18084
- * @minItems 1
18085
- * @maxItems 100
18086
- */
18087
- userIds: [string, ...(string)[]]
18088
- }
18089
-
18090
- export interface UsersWaitlistInviteOutput {
18091
- invited: number
18092
- results: {
18093
- reason: (("suppressed" | "not_found" | "already_registered") | null)
18094
- status: ("invited" | "skipped")
18095
- userId: string
18096
- }[]
18097
- skipped: number
18098
- }
18099
-
18100
- export interface UsersWaitlistListInput {
18101
- /**
18102
- * Entries per page, 1-100. Default 25.
18103
- */
18104
- limit?: number
18105
- /**
18106
- * Opaque cursor from the previous page's `nextCursor`. Omit for the first page.
18107
- */
18108
- cursor?: string
18109
- /**
18110
- * Filter by funnel status: 'pending', 'invited', 'registered' or 'withdrawn'. Omit for all.
18111
- */
18112
- status?: ("pending" | "invited" | "registered" | "withdrawn")
18113
- /**
18114
- * Double opt-in only: false returns entries whose address never confirmed. Omit for both.
18115
- */
18116
- confirmed?: boolean
18117
- }
18118
-
18119
- export interface UsersWaitlistListOutput {
18120
- entries: {
18121
- status: ("pending" | "invited" | "registered" | "withdrawn")
18122
- userId: string
18123
- createdAt: string
18124
- invitedAt: (string | null)
18125
- identifier: string
18126
- attribution: {
18127
- [k: string]: unknown
18128
- }
18129
- confirmedAt: (string | null)
18130
- withdrawnAt: (string | null)
18131
- consentProof: {
18132
- [k: string]: unknown
18133
- }
18134
- registeredAt: (string | null)
18135
- inviteTokenId: (string | null)
18136
- }[]
18137
- nextCursor: (string | null)
18138
- }
18139
-
18140
- export interface UsersWebhooksCreateInput {
18141
- /**
18142
- * Where deliveries are POSTed. HTTPS only, no embedded credentials.
18143
- */
18144
- url: string
18145
- /**
18146
- * Which events to deliver. `user.created`, `user.updated` and `user.deleted` mirror the directory; `session.revoked` fires on sign-out, ban, erase and refresh-token reuse.
18147
- *
18148
- * @minItems 1
18149
- */
18150
- events: [("user.created" | "user.updated" | "user.deleted" | "session.revoked"), ...(("user.created" | "user.updated" | "user.deleted" | "session.revoked"))[]]
18151
- /**
18152
- * A label only humans read — which system this endpoint feeds.
18153
- */
18154
- description?: string
18155
- }
18156
-
18157
- export interface UsersWebhooksCreateOutput {
18158
- id: string
18159
- url: string
18160
- active: boolean
18161
- events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18162
- secret: string
18163
- createdAt: string
18164
- updatedAt: string
18165
- description: (string | null)
18166
- secretPrefix: string
18167
- }
18168
-
18169
- export interface UsersWebhooksDeleteInput {
18170
- /**
18171
- * Id of the webhook endpoint.
18172
- */
18173
- id: string
18174
- }
18175
-
18176
- export interface UsersWebhooksDeleteOutput {
18177
- id: string
18178
- deleted: true
18179
- }
18180
-
18181
- export interface UsersWebhooksDeliveriesListInput {
18182
- /**
18183
- * Id of the webhook endpoint whose deliveries to list.
18184
- */
18185
- id: string
18186
- limit?: number
18187
- }
18188
-
18189
- export interface UsersWebhooksDeliveriesListOutput {
18190
- deliveries: {
18191
- id: string
18192
- status: ("pending" | "succeeded" | "failed")
18193
- eventId: string
18194
- attempts: number
18195
- createdAt: string
18196
- eventType: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")
18197
- lastError: (string | null)
18198
- webhookId: string
18199
- lastAttemptAt: (string | null)
18200
- responseStatus: (number | null)
18201
- }[]
18202
- }
18203
-
18204
- export interface UsersWebhooksGetInput {
18205
- /**
18206
- * Id of the webhook endpoint.
18207
- */
18208
- id: string
18209
- }
18210
-
18211
- export interface UsersWebhooksGetOutput {
18212
- id: string
18213
- url: string
18214
- active: boolean
18215
- events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18216
- createdAt: string
18217
- updatedAt: string
18218
- description: (string | null)
18219
- secretPrefix: string
18220
- }
18221
-
18222
- export interface UsersWebhooksListInput {
18223
-
18224
- }
18225
-
18226
- export interface UsersWebhooksListOutput {
18227
- webhooks: {
18228
- id: string
18229
- url: string
18230
- active: boolean
18231
- events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18232
- createdAt: string
18233
- updatedAt: string
18234
- description: (string | null)
18235
- secretPrefix: string
18236
- }[]
18237
- }
18238
-
18239
- export interface UsersWebhooksRotateSecretInput {
18240
- /**
18241
- * Id of the webhook endpoint.
18242
- */
18243
- id: string
18244
- }
18245
-
18246
- export interface UsersWebhooksRotateSecretOutput {
18247
- id: string
18248
- url: string
18249
- active: boolean
18250
- events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18251
- secret: string
18252
- createdAt: string
18253
- updatedAt: string
18254
- description: (string | null)
18255
- secretPrefix: string
18256
- }
18257
-
18258
- export interface UsersWebhooksUpdateInput {
18259
- /**
18260
- * Id of the webhook endpoint.
18261
- */
18262
- id: string
18263
- /**
18264
- * Where deliveries are POSTed. HTTPS only, no embedded credentials.
18265
- */
18266
- url?: string
18267
- /**
18268
- * false pauses delivery without losing the endpoint or its secret.
18269
- */
18270
- active?: boolean
18271
- /**
18272
- * Which events to deliver. `user.created`, `user.updated` and `user.deleted` mirror the directory; `session.revoked` fires on sign-out, ban, erase and refresh-token reuse.
18273
- *
18274
- * @minItems 1
18275
- */
18276
- events?: [("user.created" | "user.updated" | "user.deleted" | "session.revoked"), ...(("user.created" | "user.updated" | "user.deleted" | "session.revoked"))[]]
18277
- description?: (string | null)
18278
- }
18279
-
18280
- export interface UsersWebhooksUpdateOutput {
18281
- id: string
18282
- url: string
18283
- active: boolean
18284
- events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18285
- createdAt: string
18286
- updatedAt: string
18287
- description: (string | null)
18288
- secretPrefix: string
18289
- }
18290
-
18291
15464
  export interface WaitlistConfigGetInput {
18292
15465
 
18293
15466
  }