@lessly/sdk-app 17.0.0 → 17.2.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 (39) 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.d.cts +1 -1
  4. package/dist/brain/index.d.ts +1 -1
  5. package/dist/{client.gen-DYlVp4ZF.d.cts → client.gen-C3-OM0XA.d.cts} +2688 -1
  6. package/dist/{client.gen-DYlVp4ZF.d.ts → client.gen-C3-OM0XA.d.ts} +2688 -1
  7. package/dist/consent/index.d.cts +1 -1
  8. package/dist/consent/index.d.ts +1 -1
  9. package/dist/deployment/index.d.cts +1 -1
  10. package/dist/deployment/index.d.ts +1 -1
  11. package/dist/index.cjs +742 -0
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +742 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/mail/index.d.cts +2 -2
  18. package/dist/mail/index.d.ts +2 -2
  19. package/dist/organization/index.d.cts +1 -1
  20. package/dist/organization/index.d.ts +1 -1
  21. package/dist/realtime/index.d.cts +1 -1
  22. package/dist/realtime/index.d.ts +1 -1
  23. package/dist/tracking/index.d.cts +1 -1
  24. package/dist/tracking/index.d.ts +1 -1
  25. package/dist/users/index.cjs +216 -0
  26. package/dist/users/index.cjs.map +1 -0
  27. package/dist/users/index.d.cts +172 -0
  28. package/dist/users/index.d.ts +172 -0
  29. package/dist/users/index.js +173 -0
  30. package/dist/users/index.js.map +1 -0
  31. package/dist/waitlist/index.d.cts +1 -1
  32. package/dist/waitlist/index.d.ts +1 -1
  33. package/package.json +7 -2
  34. package/src/gen/bindings.gen.ts +742 -0
  35. package/src/gen/client.gen.ts +158 -0
  36. package/src/gen/manifest.gen.ts +1 -1
  37. package/src/gen/types.gen.ts +2699 -0
  38. package/src/gen/users/index.ts +3 -0
  39. package/src/gen/users/queryOptions.gen.ts +268 -0
@@ -15461,6 +15461,2705 @@ scriptUrl: string
15461
15461
  minimalSnippet: string
15462
15462
  }
15463
15463
 
15464
+ export interface UsersApikeysCreateInput {
15465
+ /**
15466
+ * A label only humans read — which backend or environment holds this key.
15467
+ */
15468
+ name: string
15469
+ /**
15470
+ * '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.
15471
+ */
15472
+ type: ("server" | "publishable")
15473
+ }
15474
+
15475
+ export interface UsersApikeysCreateOutput {
15476
+ id: string
15477
+ key: string
15478
+ name: string
15479
+ type: ("server" | "publishable")
15480
+ value: (string | null)
15481
+ prefix: string
15482
+ createdAt: string
15483
+ revokedAt: (string | null)
15484
+ }
15485
+
15486
+ export interface UsersApikeysListInput {
15487
+
15488
+ }
15489
+
15490
+ export interface UsersApikeysListOutput {
15491
+ keys: {
15492
+ id: string
15493
+ name: string
15494
+ type: ("server" | "publishable")
15495
+ value: (string | null)
15496
+ prefix: string
15497
+ createdAt: string
15498
+ revokedAt: (string | null)
15499
+ }[]
15500
+ }
15501
+
15502
+ export interface UsersApikeysRevokeInput {
15503
+ /**
15504
+ * Id of the key to revoke. Revocation is immediate and final.
15505
+ */
15506
+ id: string
15507
+ }
15508
+
15509
+ export interface UsersApikeysRevokeOutput {
15510
+ id: string
15511
+ revoked: true
15512
+ }
15513
+
15514
+ export interface UsersAuditListInput {
15515
+ /**
15516
+ * Page size, 1-100. Default 25.
15517
+ */
15518
+ limit?: number
15519
+ /**
15520
+ * ISO-8601 lower bound (inclusive) on the event timestamp.
15521
+ */
15522
+ since?: string
15523
+ /**
15524
+ * ISO-8601 upper bound (exclusive) on the event timestamp.
15525
+ */
15526
+ until?: string
15527
+ /**
15528
+ * Exact action to filter by, e.g. 'user.banned'. Omit for all actions.
15529
+ */
15530
+ action?: string
15531
+ /**
15532
+ * Opaque cursor from a previous response's `nextCursor`. Omit for the first page.
15533
+ */
15534
+ cursor?: string
15535
+ /**
15536
+ * Exact id of the audited target, e.g. a user id.
15537
+ */
15538
+ targetId?: string
15539
+ /**
15540
+ * Target kind to filter by, e.g. 'user'.
15541
+ */
15542
+ targetType?: string
15543
+ }
15544
+
15545
+ export interface UsersAuditListOutput {
15546
+ events: {
15547
+ id: string
15548
+ ip: (string | null)
15549
+ action: string
15550
+ actorId: (string | null)
15551
+ metadata: {
15552
+ [k: string]: unknown
15553
+ }
15554
+ targetId: (string | null)
15555
+ actorType: ("operator" | "system" | "end_user")
15556
+ createdAt: string
15557
+ productId: string
15558
+ userAgent: (string | null)
15559
+ targetType: (string | null)
15560
+ }[]
15561
+ nextCursor: (string | null)
15562
+ }
15563
+
15564
+ export interface UsersConfigGetInput {
15565
+
15566
+ }
15567
+
15568
+ export interface UsersConfigGetOutput {
15569
+ mfa: {
15570
+ /**
15571
+ * Whether a second factor is MANDATORY for this product. When true, a user may not unenroll their last verified factor. Default false.
15572
+ */
15573
+ required: boolean
15574
+ /**
15575
+ * How many single-use backup codes a batch contains. Default 10.
15576
+ */
15577
+ backupCodeCount: number
15578
+ /**
15579
+ * Mandatory delay on an operator-initiated factor reset, in hours — the abort window the user is emailed. Default 72.
15580
+ */
15581
+ resetDelayHours: number
15582
+ /**
15583
+ * How long a passed step-up challenge stays spendable, in minutes. The grant is SINGLE-USE regardless. Default 5.
15584
+ */
15585
+ stepUpGrantMinutes: number
15586
+ /**
15587
+ * Wrong BACKUP codes before the account is locked, counted separately from TOTP. Default 5.
15588
+ */
15589
+ maxBackupCodeAttempts: number
15590
+ /**
15591
+ * Wrong second-factor codes before the account is locked. Default 5.
15592
+ */
15593
+ maxSecondFactorAttempts: number
15594
+ /**
15595
+ * How recently the caller must have authenticated to enroll or regenerate a factor, in minutes. Default 10.
15596
+ */
15597
+ sensitiveAuthAgeMinutes: number
15598
+ }
15599
+ email: {
15600
+ /**
15601
+ * 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.
15602
+ */
15603
+ from: (string | null)
15604
+ /**
15605
+ * Offer the 6-digit code strategy (email_code). Default true.
15606
+ */
15607
+ codeEnabled: boolean
15608
+ /**
15609
+ * Base URL magic links point at, e.g. "https://public.lessly.com/{productId}/users". Null uses the deployment default.
15610
+ */
15611
+ linkBaseUrl: (string | null)
15612
+ /**
15613
+ * Offer the magic-link strategy (email_link). Default true.
15614
+ */
15615
+ linkEnabled: boolean
15616
+ /**
15617
+ * How long an emailed code or link stays usable, in minutes. Default 15.
15618
+ */
15619
+ codeTtlMinutes: number
15620
+ /**
15621
+ * Auth emails one address may receive per day. Default 10.
15622
+ */
15623
+ resendDailyCap: number
15624
+ /**
15625
+ * Wrong-code entries allowed per token before it is spent. Default 5.
15626
+ */
15627
+ maxCodeAttempts: number
15628
+ /**
15629
+ * Minimum seconds between two auth emails to one address. Floor of 60 is enforced regardless. Default 60.
15630
+ */
15631
+ resendCooldownSeconds: number
15632
+ }
15633
+ oauth: {
15634
+ providers: {
15635
+ github: UsersConfigGetOutputGoogle
15636
+ google: UsersConfigGetOutputGoogle
15637
+ }
15638
+ }
15639
+ hosted: {
15640
+ /**
15641
+ * 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.
15642
+ */
15643
+ enabled: boolean
15644
+ /**
15645
+ * Absolute https URL of a logo rendered above the form. Null renders no logo.
15646
+ */
15647
+ logoUrl: (string | null)
15648
+ /**
15649
+ * Terms link rendered in the footer. Null renders no link.
15650
+ */
15651
+ termsUrl: (string | null)
15652
+ /**
15653
+ * CSS colour of the body text.
15654
+ */
15655
+ textColor: string
15656
+ /**
15657
+ * One line under the card. Null renders no footer.
15658
+ */
15659
+ footerText: (string | null)
15660
+ /**
15661
+ * Privacy-policy link rendered in the footer. Null renders no link.
15662
+ */
15663
+ privacyUrl: (string | null)
15664
+ /**
15665
+ * CSS colour for the submit button, the links and the focus ring.
15666
+ */
15667
+ accentColor: string
15668
+ /**
15669
+ * Shown in the heading and the page title. Default "This product".
15670
+ */
15671
+ productName: string
15672
+ /**
15673
+ * CSS length for the card and its controls, e.g. "12px".
15674
+ */
15675
+ borderRadius: string
15676
+ /**
15677
+ * CSS colour of the card itself.
15678
+ */
15679
+ surfaceColor: string
15680
+ /**
15681
+ * CSS colour of secondary text and hints.
15682
+ */
15683
+ mutedTextColor: string
15684
+ /**
15685
+ * CSS colour of the page behind the card.
15686
+ */
15687
+ backgroundColor: string
15688
+ }
15689
+ invite: {
15690
+ /**
15691
+ * How long an invite link stays usable, in days. Default 14.
15692
+ */
15693
+ ttlDays: number
15694
+ /**
15695
+ * Minimum minutes between two invite emails to one address. Default 60.
15696
+ */
15697
+ resendCooldownMinutes: number
15698
+ }
15699
+ status: ("active" | "paused")
15700
+ captcha: {
15701
+ enabled: boolean
15702
+ siteKey: (string | null)
15703
+ provider: "turnstile"
15704
+ riskElevated: boolean
15705
+ }
15706
+ recovery: {
15707
+ /**
15708
+ * Offer the password-recovery flow at all. Default true.
15709
+ */
15710
+ enabled: boolean
15711
+ /**
15712
+ * How long a reset link stays usable, in minutes. Default 60.
15713
+ */
15714
+ ttlMinutes: number
15715
+ }
15716
+ testMode: {
15717
+ /**
15718
+ * 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.
15719
+ */
15720
+ enabled: boolean
15721
+ }
15722
+ waitlist: {
15723
+ /**
15724
+ * The embeddable widget’s copy and colours.
15725
+ */
15726
+ widget: {
15727
+ /**
15728
+ * Heading above the widget form.
15729
+ */
15730
+ title: string
15731
+ /**
15732
+ * Link rendered beside the consent text. Null renders no link.
15733
+ */
15734
+ policyUrl: (string | null)
15735
+ /**
15736
+ * CSS colour for the button and the focus ring.
15737
+ */
15738
+ accentColor: string
15739
+ /**
15740
+ * Submit button copy.
15741
+ */
15742
+ buttonLabel: string
15743
+ /**
15744
+ * Consent checkbox copy. Null renders no checkbox, and the signup records the consent proof as `unspecified`.
15745
+ */
15746
+ consentText: (string | null)
15747
+ /**
15748
+ * One line under the heading.
15749
+ */
15750
+ description: string
15751
+ /**
15752
+ * The privacy-policy version the widget records in each consent proof.
15753
+ */
15754
+ policyVersion: string
15755
+ /**
15756
+ * Shown after a submission. ONE message for every outcome: the signup route answers identically whether or not the address was already on the list.
15757
+ */
15758
+ successMessage: string
15759
+ }
15760
+ /**
15761
+ * 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.
15762
+ */
15763
+ doubleOptIn: boolean
15764
+ /**
15765
+ * How long a still-pending waitlist entry is kept before the sweep erases it. Default 365.
15766
+ */
15767
+ retentionDays: number
15768
+ /**
15769
+ * How long a double-opt-in confirmation link stays usable, in hours. Default 48.
15770
+ */
15771
+ confirmTtlHours: number
15772
+ }
15773
+ productId: string
15774
+ retention: {
15775
+ /**
15776
+ * 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.
15777
+ */
15778
+ flowAttemptDays: number
15779
+ /**
15780
+ * 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.
15781
+ */
15782
+ oneTimeTokenDays: number
15783
+ /**
15784
+ * 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.
15785
+ */
15786
+ expiredSessionDays: number
15787
+ }
15788
+ protection: {
15789
+ /**
15790
+ * Check passwords against the HaveIBeenPwned breach corpus (k-anonymity). Blocking at sign-up, advisory at sign-in. Default true.
15791
+ */
15792
+ hibpEnabled: boolean
15793
+ /**
15794
+ * How long an account stays locked. Self-healing — the lock expires on its own. Default 15.
15795
+ */
15796
+ lockoutMinutes: number
15797
+ /**
15798
+ * Failed sign-ins for one identifier before the account is locked. Default 10.
15799
+ */
15800
+ maxFailedAttempts: number
15801
+ /**
15802
+ * Flow calls allowed per IP per product per window before HTTP 429. Default 120.
15803
+ */
15804
+ ipAttemptsPerWindow: number
15805
+ /**
15806
+ * Sliding window the failed sign-ins are counted over, in minutes. Default 15.
15807
+ */
15808
+ failedAttemptWindowMinutes: number
15809
+ /**
15810
+ * Flow calls allowed per identifier per window before HTTP 429. Default 30.
15811
+ */
15812
+ identifierAttemptsPerWindow: number
15813
+ }
15814
+ signupMode: ("public" | "invite-only" | "waitlist")
15815
+ emailChange: {
15816
+ /**
15817
+ * Allow end users to change their email address. Default true.
15818
+ */
15819
+ enabled: boolean
15820
+ /**
15821
+ * How long after a REVERT further email changes are refused, in days. Default 7.
15822
+ */
15823
+ cooldownDays: number
15824
+ /**
15825
+ * How long the old address may undo the change, in days. Default 30.
15826
+ */
15827
+ revertTtlDays: number
15828
+ /**
15829
+ * How long the two confirmation links stay usable, in hours. Default 24.
15830
+ */
15831
+ requestTtlHours: number
15832
+ /**
15833
+ * Mandatory delay on an operator-assisted override, in hours — the abort window the old address is notified with. Default 72.
15834
+ */
15835
+ overrideDelayHours: number
15836
+ }
15837
+ notifications: {
15838
+ /**
15839
+ * Email the user the first time a session appears from an unseen device. Default true.
15840
+ */
15841
+ newDevice: boolean
15842
+ /**
15843
+ * Email the old address when an email change is requested, completed, reverted or overridden. Default true.
15844
+ */
15845
+ emailChange: boolean
15846
+ /**
15847
+ * Email the user when an operator impersonates their account. Default true.
15848
+ */
15849
+ impersonation: boolean
15850
+ /**
15851
+ * Email the user when their password is set or changed. Default true.
15852
+ */
15853
+ passwordChanged: boolean
15854
+ }
15855
+ allowedOrigins: string[]
15856
+ passwordPolicy: {
15857
+ /**
15858
+ * Minimum password length. Default 8.
15859
+ */
15860
+ minLength: number
15861
+ /**
15862
+ * Require at least one digit.
15863
+ */
15864
+ requireNumber: boolean
15865
+ /**
15866
+ * Require at least one non-alphanumeric character.
15867
+ */
15868
+ requireSymbol: boolean
15869
+ /**
15870
+ * Require at least one uppercase letter.
15871
+ */
15872
+ requireUppercase: boolean
15873
+ }
15874
+ sessionTtlHours: number
15875
+ lifecycleBlocked: boolean
15876
+ lifecycleArchived: boolean
15877
+ refreshSlidingDays: number
15878
+ refreshAbsoluteDays: number
15879
+ redirectUriAllowlist: string[]
15880
+ accessTokenTtlMinutes: number
15881
+ captchaSecretConfigured: boolean
15882
+ }
15883
+ export interface UsersConfigGetOutputGoogle {
15884
+ enabled: boolean
15885
+ clientId: (string | null)
15886
+ secretConfigured: boolean
15887
+ }
15888
+
15889
+ export interface UsersConfigUpsertInput {
15890
+ /**
15891
+ * 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.
15892
+ */
15893
+ mfa?: {
15894
+ /**
15895
+ * Whether a second factor is MANDATORY for this product. When true, a user may not unenroll their last verified factor. Default false.
15896
+ */
15897
+ required?: boolean
15898
+ /**
15899
+ * How many single-use backup codes a batch contains. Default 10.
15900
+ */
15901
+ backupCodeCount?: number
15902
+ /**
15903
+ * Mandatory delay on an operator-initiated factor reset, in hours — the abort window the user is emailed. Default 72.
15904
+ */
15905
+ resetDelayHours?: number
15906
+ /**
15907
+ * How long a passed step-up challenge stays spendable, in minutes. The grant is SINGLE-USE regardless. Default 5.
15908
+ */
15909
+ stepUpGrantMinutes?: number
15910
+ /**
15911
+ * Wrong BACKUP codes before the account is locked, counted separately from TOTP. Default 5.
15912
+ */
15913
+ maxBackupCodeAttempts?: number
15914
+ /**
15915
+ * Wrong second-factor codes before the account is locked. Default 5.
15916
+ */
15917
+ maxSecondFactorAttempts?: number
15918
+ /**
15919
+ * How recently the caller must have authenticated to enroll or regenerate a factor, in minutes. Default 10.
15920
+ */
15921
+ sensitiveAuthAgeMinutes?: number
15922
+ }
15923
+ /**
15924
+ * 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.
15925
+ */
15926
+ email?: {
15927
+ /**
15928
+ * 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.
15929
+ */
15930
+ from?: (string | null)
15931
+ /**
15932
+ * Offer the 6-digit code strategy (email_code). Default true.
15933
+ */
15934
+ codeEnabled?: boolean
15935
+ /**
15936
+ * Base URL magic links point at, e.g. "https://public.lessly.com/{productId}/users". Null uses the deployment default.
15937
+ */
15938
+ linkBaseUrl?: (string | null)
15939
+ /**
15940
+ * Offer the magic-link strategy (email_link). Default true.
15941
+ */
15942
+ linkEnabled?: boolean
15943
+ /**
15944
+ * How long an emailed code or link stays usable, in minutes. Default 15.
15945
+ */
15946
+ codeTtlMinutes?: number
15947
+ /**
15948
+ * Auth emails one address may receive per day. Default 10.
15949
+ */
15950
+ resendDailyCap?: number
15951
+ /**
15952
+ * Wrong-code entries allowed per token before it is spent. Default 5.
15953
+ */
15954
+ maxCodeAttempts?: number
15955
+ /**
15956
+ * Minimum seconds between two auth emails to one address. Floor of 60 is enforced regardless. Default 60.
15957
+ */
15958
+ resendCooldownSeconds?: number
15959
+ }
15960
+ /**
15961
+ * 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.
15962
+ */
15963
+ oauth?: {
15964
+ github?: UsersConfigUpsertInputGoogle
15965
+ /**
15966
+ * Google sign-in credentials and switch.
15967
+ */
15968
+ google?: {
15969
+ /**
15970
+ * Offer this provider as a sign-in strategy.
15971
+ */
15972
+ enabled?: boolean
15973
+ /**
15974
+ * 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.
15975
+ */
15976
+ clientId?: (string | null)
15977
+ /**
15978
+ * WRITE-ONLY. The OAuth client secret; stored encrypted and never returned. Omit to leave the stored secret untouched, pass null to clear it.
15979
+ */
15980
+ clientSecret?: (string | null)
15981
+ }
15982
+ }
15983
+ /**
15984
+ * 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.
15985
+ */
15986
+ hosted?: {
15987
+ /**
15988
+ * 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.
15989
+ */
15990
+ enabled?: boolean
15991
+ /**
15992
+ * Absolute https URL of a logo rendered above the form. Null renders no logo.
15993
+ */
15994
+ logoUrl?: (string | null)
15995
+ /**
15996
+ * Terms link rendered in the footer. Null renders no link.
15997
+ */
15998
+ termsUrl?: (string | null)
15999
+ /**
16000
+ * CSS colour of the body text.
16001
+ */
16002
+ textColor?: string
16003
+ /**
16004
+ * One line under the card. Null renders no footer.
16005
+ */
16006
+ footerText?: (string | null)
16007
+ /**
16008
+ * Privacy-policy link rendered in the footer. Null renders no link.
16009
+ */
16010
+ privacyUrl?: (string | null)
16011
+ /**
16012
+ * CSS colour for the submit button, the links and the focus ring.
16013
+ */
16014
+ accentColor?: string
16015
+ /**
16016
+ * Shown in the heading and the page title. Default "This product".
16017
+ */
16018
+ productName?: string
16019
+ /**
16020
+ * CSS length for the card and its controls, e.g. "12px".
16021
+ */
16022
+ borderRadius?: string
16023
+ /**
16024
+ * CSS colour of the card itself.
16025
+ */
16026
+ surfaceColor?: string
16027
+ /**
16028
+ * CSS colour of secondary text and hints.
16029
+ */
16030
+ mutedTextColor?: string
16031
+ /**
16032
+ * CSS colour of the page behind the card.
16033
+ */
16034
+ backgroundColor?: string
16035
+ }
16036
+ /**
16037
+ * Invite lifetime and re-invite cooldown. Merged field-by-field.
16038
+ */
16039
+ invite?: {
16040
+ /**
16041
+ * How long an invite link stays usable, in days. Default 14.
16042
+ */
16043
+ ttlDays?: number
16044
+ /**
16045
+ * Minimum minutes between two invite emails to one address. Default 60.
16046
+ */
16047
+ resendCooldownMinutes?: number
16048
+ }
16049
+ /**
16050
+ * Captcha (Cloudflare Turnstile) settings for flow creation. Merged field-by-field.
16051
+ */
16052
+ captcha?: {
16053
+ /**
16054
+ * Require a captcha token when a flow attempt is created.
16055
+ */
16056
+ enabled?: boolean
16057
+ /**
16058
+ * The public site key the Product renders the widget with.
16059
+ */
16060
+ siteKey?: (string | null)
16061
+ /**
16062
+ * 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.
16063
+ */
16064
+ secretKey?: (string | null)
16065
+ /**
16066
+ * Demand a captcha from an identifier that is currently accumulating failed attempts, even when `enabled` is false. Default true.
16067
+ */
16068
+ riskElevated?: boolean
16069
+ }
16070
+ /**
16071
+ * Password-recovery settings (whether it is offered, how long a reset link lives). Merged field-by-field.
16072
+ */
16073
+ recovery?: {
16074
+ /**
16075
+ * Offer the password-recovery flow at all. Default true.
16076
+ */
16077
+ enabled?: boolean
16078
+ /**
16079
+ * How long a reset link stays usable, in minutes. Default 60.
16080
+ */
16081
+ ttlMinutes?: number
16082
+ }
16083
+ /**
16084
+ * 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.
16085
+ */
16086
+ testMode?: {
16087
+ /**
16088
+ * 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.
16089
+ */
16090
+ enabled?: boolean
16091
+ }
16092
+ /**
16093
+ * 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`.
16094
+ */
16095
+ waitlist?: {
16096
+ /**
16097
+ * The embeddable widget’s copy and colours. Merged field-by-field, so setting one line leaves the rest alone.
16098
+ */
16099
+ widget?: {
16100
+ /**
16101
+ * Heading above the widget form.
16102
+ */
16103
+ title?: string
16104
+ /**
16105
+ * Link rendered beside the consent text. Null renders no link.
16106
+ */
16107
+ policyUrl?: (string | null)
16108
+ /**
16109
+ * CSS colour for the button and the focus ring.
16110
+ */
16111
+ accentColor?: string
16112
+ /**
16113
+ * Submit button copy.
16114
+ */
16115
+ buttonLabel?: string
16116
+ /**
16117
+ * Consent checkbox copy. Null renders no checkbox, and the signup records the consent proof as `unspecified`.
16118
+ */
16119
+ consentText?: (string | null)
16120
+ /**
16121
+ * One line under the heading.
16122
+ */
16123
+ description?: string
16124
+ /**
16125
+ * The privacy-policy version the widget records in each consent proof.
16126
+ */
16127
+ policyVersion?: string
16128
+ /**
16129
+ * Shown after a submission. ONE message for every outcome: the signup route answers identically whether or not the address was already on the list.
16130
+ */
16131
+ successMessage?: string
16132
+ }
16133
+ /**
16134
+ * 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.
16135
+ */
16136
+ doubleOptIn?: boolean
16137
+ /**
16138
+ * How long a still-pending waitlist entry is kept before the sweep erases it. Default 365.
16139
+ */
16140
+ retentionDays?: number
16141
+ /**
16142
+ * How long a double-opt-in confirmation link stays usable, in hours. Default 48.
16143
+ */
16144
+ confirmTtlHours?: number
16145
+ }
16146
+ /**
16147
+ * 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.
16148
+ */
16149
+ retention?: {
16150
+ /**
16151
+ * 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.
16152
+ */
16153
+ flowAttemptDays?: number
16154
+ /**
16155
+ * 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.
16156
+ */
16157
+ oneTimeTokenDays?: number
16158
+ /**
16159
+ * 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.
16160
+ */
16161
+ expiredSessionDays?: number
16162
+ }
16163
+ /**
16164
+ * Rate limits, lockout and breached-password settings. Merged field-by-field.
16165
+ */
16166
+ protection?: {
16167
+ /**
16168
+ * Check passwords against the HaveIBeenPwned breach corpus (k-anonymity). Blocking at sign-up, advisory at sign-in. Default true.
16169
+ */
16170
+ hibpEnabled?: boolean
16171
+ /**
16172
+ * How long an account stays locked. Self-healing — the lock expires on its own. Default 15.
16173
+ */
16174
+ lockoutMinutes?: number
16175
+ /**
16176
+ * Failed sign-ins for one identifier before the account is locked. Default 10.
16177
+ */
16178
+ maxFailedAttempts?: number
16179
+ /**
16180
+ * Flow calls allowed per IP per product per window before HTTP 429. Default 120.
16181
+ */
16182
+ ipAttemptsPerWindow?: number
16183
+ /**
16184
+ * Sliding window the failed sign-ins are counted over, in minutes. Default 15.
16185
+ */
16186
+ failedAttemptWindowMinutes?: number
16187
+ /**
16188
+ * Flow calls allowed per identifier per window before HTTP 429. Default 30.
16189
+ */
16190
+ identifierAttemptsPerWindow?: number
16191
+ }
16192
+ /**
16193
+ * How end users may join this product: 'public' (anyone), 'invite-only', or 'waitlist'. Default 'public'.
16194
+ */
16195
+ signupMode?: ("public" | "invite-only" | "waitlist")
16196
+ /**
16197
+ * Email-change settings: confirmation lifetime, the old address's revert window, the post-revert cooldown and the operator-override delay. Merged field-by-field.
16198
+ */
16199
+ emailChange?: {
16200
+ /**
16201
+ * Allow end users to change their email address. Default true.
16202
+ */
16203
+ enabled?: boolean
16204
+ /**
16205
+ * How long after a REVERT further email changes are refused, in days. Default 7.
16206
+ */
16207
+ cooldownDays?: number
16208
+ /**
16209
+ * How long the old address may undo the change, in days. Default 30.
16210
+ */
16211
+ revertTtlDays?: number
16212
+ /**
16213
+ * How long the two confirmation links stay usable, in hours. Default 24.
16214
+ */
16215
+ requestTtlHours?: number
16216
+ /**
16217
+ * Mandatory delay on an operator-assisted override, in hours — the abort window the old address is notified with. Default 72.
16218
+ */
16219
+ overrideDelayHours?: number
16220
+ }
16221
+ /**
16222
+ * Which security notification emails this product sends. All on by default. Merged field-by-field.
16223
+ */
16224
+ notifications?: {
16225
+ /**
16226
+ * Email the user the first time a session appears from an unseen device. Default true.
16227
+ */
16228
+ newDevice?: boolean
16229
+ /**
16230
+ * Email the old address when an email change is requested, completed, reverted or overridden. Default true.
16231
+ */
16232
+ emailChange?: boolean
16233
+ /**
16234
+ * Email the user when an operator impersonates their account. Default true.
16235
+ */
16236
+ impersonation?: boolean
16237
+ /**
16238
+ * Email the user when their password is set or changed. Default true.
16239
+ */
16240
+ passwordChanged?: boolean
16241
+ }
16242
+ /**
16243
+ * 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.
16244
+ *
16245
+ * @maxItems 20
16246
+ */
16247
+ 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]
16248
+ /**
16249
+ * Password rules for this product. Merged field-by-field into the current policy.
16250
+ */
16251
+ passwordPolicy?: {
16252
+ /**
16253
+ * Minimum password length. Default 8.
16254
+ */
16255
+ minLength?: number
16256
+ /**
16257
+ * Require at least one digit.
16258
+ */
16259
+ requireNumber?: boolean
16260
+ /**
16261
+ * Require at least one non-alphanumeric character.
16262
+ */
16263
+ requireSymbol?: boolean
16264
+ /**
16265
+ * Require at least one uppercase letter.
16266
+ */
16267
+ requireUppercase?: boolean
16268
+ }
16269
+ /**
16270
+ * End-user session lifetime in hours. Default 720 (30 days).
16271
+ */
16272
+ sessionTtlHours?: number
16273
+ /**
16274
+ * Inactivity window of a session in days — every refresh slides it forward. Default 30.
16275
+ */
16276
+ refreshSlidingDays?: number
16277
+ /**
16278
+ * Hard time-box of a session in days, counted from sign-in and never extended. Default 365.
16279
+ */
16280
+ refreshAbsoluteDays?: number
16281
+ /**
16282
+ * 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.
16283
+ *
16284
+ * @maxItems 20
16285
+ */
16286
+ 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]
16287
+ /**
16288
+ * Access JWT lifetime in minutes, 5-60. Default 10. Short on purpose: a revoked session dies within one TTL.
16289
+ */
16290
+ accessTokenTtlMinutes?: number
16291
+ }
16292
+ /**
16293
+ * GitHub sign-in credentials and switch.
16294
+ */
16295
+ export interface UsersConfigUpsertInputGoogle {
16296
+ /**
16297
+ * Offer this provider as a sign-in strategy.
16298
+ */
16299
+ enabled?: boolean
16300
+ /**
16301
+ * 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.
16302
+ */
16303
+ clientId?: (string | null)
16304
+ /**
16305
+ * WRITE-ONLY. The OAuth client secret; stored encrypted and never returned. Omit to leave the stored secret untouched, pass null to clear it.
16306
+ */
16307
+ clientSecret?: (string | null)
16308
+ }
16309
+
16310
+ export interface UsersConfigUpsertOutput {
16311
+ mfa: {
16312
+ /**
16313
+ * Whether a second factor is MANDATORY for this product. When true, a user may not unenroll their last verified factor. Default false.
16314
+ */
16315
+ required: boolean
16316
+ /**
16317
+ * How many single-use backup codes a batch contains. Default 10.
16318
+ */
16319
+ backupCodeCount: number
16320
+ /**
16321
+ * Mandatory delay on an operator-initiated factor reset, in hours — the abort window the user is emailed. Default 72.
16322
+ */
16323
+ resetDelayHours: number
16324
+ /**
16325
+ * How long a passed step-up challenge stays spendable, in minutes. The grant is SINGLE-USE regardless. Default 5.
16326
+ */
16327
+ stepUpGrantMinutes: number
16328
+ /**
16329
+ * Wrong BACKUP codes before the account is locked, counted separately from TOTP. Default 5.
16330
+ */
16331
+ maxBackupCodeAttempts: number
16332
+ /**
16333
+ * Wrong second-factor codes before the account is locked. Default 5.
16334
+ */
16335
+ maxSecondFactorAttempts: number
16336
+ /**
16337
+ * How recently the caller must have authenticated to enroll or regenerate a factor, in minutes. Default 10.
16338
+ */
16339
+ sensitiveAuthAgeMinutes: number
16340
+ }
16341
+ email: {
16342
+ /**
16343
+ * 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.
16344
+ */
16345
+ from: (string | null)
16346
+ /**
16347
+ * Offer the 6-digit code strategy (email_code). Default true.
16348
+ */
16349
+ codeEnabled: boolean
16350
+ /**
16351
+ * Base URL magic links point at, e.g. "https://public.lessly.com/{productId}/users". Null uses the deployment default.
16352
+ */
16353
+ linkBaseUrl: (string | null)
16354
+ /**
16355
+ * Offer the magic-link strategy (email_link). Default true.
16356
+ */
16357
+ linkEnabled: boolean
16358
+ /**
16359
+ * How long an emailed code or link stays usable, in minutes. Default 15.
16360
+ */
16361
+ codeTtlMinutes: number
16362
+ /**
16363
+ * Auth emails one address may receive per day. Default 10.
16364
+ */
16365
+ resendDailyCap: number
16366
+ /**
16367
+ * Wrong-code entries allowed per token before it is spent. Default 5.
16368
+ */
16369
+ maxCodeAttempts: number
16370
+ /**
16371
+ * Minimum seconds between two auth emails to one address. Floor of 60 is enforced regardless. Default 60.
16372
+ */
16373
+ resendCooldownSeconds: number
16374
+ }
16375
+ oauth: {
16376
+ providers: {
16377
+ github: UsersConfigUpsertOutputGoogle
16378
+ google: UsersConfigUpsertOutputGoogle
16379
+ }
16380
+ }
16381
+ hosted: {
16382
+ /**
16383
+ * 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.
16384
+ */
16385
+ enabled: boolean
16386
+ /**
16387
+ * Absolute https URL of a logo rendered above the form. Null renders no logo.
16388
+ */
16389
+ logoUrl: (string | null)
16390
+ /**
16391
+ * Terms link rendered in the footer. Null renders no link.
16392
+ */
16393
+ termsUrl: (string | null)
16394
+ /**
16395
+ * CSS colour of the body text.
16396
+ */
16397
+ textColor: string
16398
+ /**
16399
+ * One line under the card. Null renders no footer.
16400
+ */
16401
+ footerText: (string | null)
16402
+ /**
16403
+ * Privacy-policy link rendered in the footer. Null renders no link.
16404
+ */
16405
+ privacyUrl: (string | null)
16406
+ /**
16407
+ * CSS colour for the submit button, the links and the focus ring.
16408
+ */
16409
+ accentColor: string
16410
+ /**
16411
+ * Shown in the heading and the page title. Default "This product".
16412
+ */
16413
+ productName: string
16414
+ /**
16415
+ * CSS length for the card and its controls, e.g. "12px".
16416
+ */
16417
+ borderRadius: string
16418
+ /**
16419
+ * CSS colour of the card itself.
16420
+ */
16421
+ surfaceColor: string
16422
+ /**
16423
+ * CSS colour of secondary text and hints.
16424
+ */
16425
+ mutedTextColor: string
16426
+ /**
16427
+ * CSS colour of the page behind the card.
16428
+ */
16429
+ backgroundColor: string
16430
+ }
16431
+ invite: {
16432
+ /**
16433
+ * How long an invite link stays usable, in days. Default 14.
16434
+ */
16435
+ ttlDays: number
16436
+ /**
16437
+ * Minimum minutes between two invite emails to one address. Default 60.
16438
+ */
16439
+ resendCooldownMinutes: number
16440
+ }
16441
+ status: ("active" | "paused")
16442
+ captcha: {
16443
+ enabled: boolean
16444
+ siteKey: (string | null)
16445
+ provider: "turnstile"
16446
+ riskElevated: boolean
16447
+ }
16448
+ recovery: {
16449
+ /**
16450
+ * Offer the password-recovery flow at all. Default true.
16451
+ */
16452
+ enabled: boolean
16453
+ /**
16454
+ * How long a reset link stays usable, in minutes. Default 60.
16455
+ */
16456
+ ttlMinutes: number
16457
+ }
16458
+ testMode: {
16459
+ /**
16460
+ * 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.
16461
+ */
16462
+ enabled: boolean
16463
+ }
16464
+ waitlist: {
16465
+ /**
16466
+ * The embeddable widget’s copy and colours.
16467
+ */
16468
+ widget: {
16469
+ /**
16470
+ * Heading above the widget form.
16471
+ */
16472
+ title: string
16473
+ /**
16474
+ * Link rendered beside the consent text. Null renders no link.
16475
+ */
16476
+ policyUrl: (string | null)
16477
+ /**
16478
+ * CSS colour for the button and the focus ring.
16479
+ */
16480
+ accentColor: string
16481
+ /**
16482
+ * Submit button copy.
16483
+ */
16484
+ buttonLabel: string
16485
+ /**
16486
+ * Consent checkbox copy. Null renders no checkbox, and the signup records the consent proof as `unspecified`.
16487
+ */
16488
+ consentText: (string | null)
16489
+ /**
16490
+ * One line under the heading.
16491
+ */
16492
+ description: string
16493
+ /**
16494
+ * The privacy-policy version the widget records in each consent proof.
16495
+ */
16496
+ policyVersion: string
16497
+ /**
16498
+ * Shown after a submission. ONE message for every outcome: the signup route answers identically whether or not the address was already on the list.
16499
+ */
16500
+ successMessage: string
16501
+ }
16502
+ /**
16503
+ * 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.
16504
+ */
16505
+ doubleOptIn: boolean
16506
+ /**
16507
+ * How long a still-pending waitlist entry is kept before the sweep erases it. Default 365.
16508
+ */
16509
+ retentionDays: number
16510
+ /**
16511
+ * How long a double-opt-in confirmation link stays usable, in hours. Default 48.
16512
+ */
16513
+ confirmTtlHours: number
16514
+ }
16515
+ productId: string
16516
+ retention: {
16517
+ /**
16518
+ * 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.
16519
+ */
16520
+ flowAttemptDays: number
16521
+ /**
16522
+ * 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.
16523
+ */
16524
+ oneTimeTokenDays: number
16525
+ /**
16526
+ * 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.
16527
+ */
16528
+ expiredSessionDays: number
16529
+ }
16530
+ protection: {
16531
+ /**
16532
+ * Check passwords against the HaveIBeenPwned breach corpus (k-anonymity). Blocking at sign-up, advisory at sign-in. Default true.
16533
+ */
16534
+ hibpEnabled: boolean
16535
+ /**
16536
+ * How long an account stays locked. Self-healing — the lock expires on its own. Default 15.
16537
+ */
16538
+ lockoutMinutes: number
16539
+ /**
16540
+ * Failed sign-ins for one identifier before the account is locked. Default 10.
16541
+ */
16542
+ maxFailedAttempts: number
16543
+ /**
16544
+ * Flow calls allowed per IP per product per window before HTTP 429. Default 120.
16545
+ */
16546
+ ipAttemptsPerWindow: number
16547
+ /**
16548
+ * Sliding window the failed sign-ins are counted over, in minutes. Default 15.
16549
+ */
16550
+ failedAttemptWindowMinutes: number
16551
+ /**
16552
+ * Flow calls allowed per identifier per window before HTTP 429. Default 30.
16553
+ */
16554
+ identifierAttemptsPerWindow: number
16555
+ }
16556
+ signupMode: ("public" | "invite-only" | "waitlist")
16557
+ emailChange: {
16558
+ /**
16559
+ * Allow end users to change their email address. Default true.
16560
+ */
16561
+ enabled: boolean
16562
+ /**
16563
+ * How long after a REVERT further email changes are refused, in days. Default 7.
16564
+ */
16565
+ cooldownDays: number
16566
+ /**
16567
+ * How long the old address may undo the change, in days. Default 30.
16568
+ */
16569
+ revertTtlDays: number
16570
+ /**
16571
+ * How long the two confirmation links stay usable, in hours. Default 24.
16572
+ */
16573
+ requestTtlHours: number
16574
+ /**
16575
+ * Mandatory delay on an operator-assisted override, in hours — the abort window the old address is notified with. Default 72.
16576
+ */
16577
+ overrideDelayHours: number
16578
+ }
16579
+ notifications: {
16580
+ /**
16581
+ * Email the user the first time a session appears from an unseen device. Default true.
16582
+ */
16583
+ newDevice: boolean
16584
+ /**
16585
+ * Email the old address when an email change is requested, completed, reverted or overridden. Default true.
16586
+ */
16587
+ emailChange: boolean
16588
+ /**
16589
+ * Email the user when an operator impersonates their account. Default true.
16590
+ */
16591
+ impersonation: boolean
16592
+ /**
16593
+ * Email the user when their password is set or changed. Default true.
16594
+ */
16595
+ passwordChanged: boolean
16596
+ }
16597
+ allowedOrigins: string[]
16598
+ passwordPolicy: {
16599
+ /**
16600
+ * Minimum password length. Default 8.
16601
+ */
16602
+ minLength: number
16603
+ /**
16604
+ * Require at least one digit.
16605
+ */
16606
+ requireNumber: boolean
16607
+ /**
16608
+ * Require at least one non-alphanumeric character.
16609
+ */
16610
+ requireSymbol: boolean
16611
+ /**
16612
+ * Require at least one uppercase letter.
16613
+ */
16614
+ requireUppercase: boolean
16615
+ }
16616
+ sessionTtlHours: number
16617
+ lifecycleBlocked: boolean
16618
+ lifecycleArchived: boolean
16619
+ refreshSlidingDays: number
16620
+ refreshAbsoluteDays: number
16621
+ redirectUriAllowlist: string[]
16622
+ accessTokenTtlMinutes: number
16623
+ captchaSecretConfigured: boolean
16624
+ }
16625
+ export interface UsersConfigUpsertOutputGoogle {
16626
+ enabled: boolean
16627
+ clientId: (string | null)
16628
+ secretConfigured: boolean
16629
+ }
16630
+
16631
+ export interface UsersFactorsListInput {
16632
+ /**
16633
+ * The end user whose enrolled factors to list.
16634
+ */
16635
+ userId: string
16636
+ }
16637
+
16638
+ export interface UsersFactorsListOutput {
16639
+ factors: {
16640
+ type: ("totp" | "backup_codes")
16641
+ status: ("unverified" | "verified")
16642
+ createdAt: string
16643
+ remaining: (number | null)
16644
+ lastUsedAt: (string | null)
16645
+ verifiedAt: (string | null)
16646
+ }[]
16647
+ }
16648
+
16649
+ export interface UsersFactorsResetInput {
16650
+ /**
16651
+ * 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.
16652
+ */
16653
+ reason: string
16654
+ /**
16655
+ * The end user whose second factor is being reset.
16656
+ */
16657
+ userId: string
16658
+ }
16659
+
16660
+ export interface UsersFactorsResetOutput {
16661
+ requestId: string
16662
+ scheduledFor: string
16663
+ }
16664
+
16665
+ export interface UsersKeysListInput {
16666
+
16667
+ }
16668
+
16669
+ export interface UsersKeysListOutput {
16670
+ keys: {
16671
+ /**
16672
+ * The RFC 7638 JWK thumbprint — what a token header carries.
16673
+ */
16674
+ kid: string
16675
+ /**
16676
+ * `standby` is pre-generated and not published; `current` signs; `retired` is still in JWKS for the overlap; `revoked` was evicted.
16677
+ */
16678
+ state: ("standby" | "current" | "retired" | "revoked")
16679
+ createdAt: string
16680
+ retiredAt: (string | null)
16681
+ revokedAt: (string | null)
16682
+ /**
16683
+ * When a retired key leaves JWKS. Null unless the key is retired.
16684
+ */
16685
+ overlapExpiresAt: (string | null)
16686
+ }[]
16687
+ }
16688
+
16689
+ export interface UsersKeysRevokeInput {
16690
+ /**
16691
+ * The key to evict, as listed by users_keys_list.
16692
+ */
16693
+ kid: string
16694
+ /**
16695
+ * Why. Goes into the audit row and is the only account of the incident it keeps.
16696
+ */
16697
+ reason?: string
16698
+ /**
16699
+ * 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.
16700
+ */
16701
+ revokeSessions?: boolean
16702
+ }
16703
+
16704
+ export interface UsersKeysRevokeOutput {
16705
+ /**
16706
+ * The fresh key minted or promoted in its place.
16707
+ */
16708
+ currentKid: string
16709
+ revokedKid: string
16710
+ sessionsRevoked: number
16711
+ }
16712
+
16713
+ export interface UsersKeysRotateInput {
16714
+
16715
+ }
16716
+
16717
+ export interface UsersKeysRotateOutput {
16718
+ /**
16719
+ * The key signing from now on.
16720
+ */
16721
+ currentKid: string
16722
+ /**
16723
+ * The key just retired. Null if there was none.
16724
+ */
16725
+ previousKid: (string | null)
16726
+ /**
16727
+ * When the retired key stops verifying. Both kids are in JWKS until then.
16728
+ */
16729
+ overlapExpiresAt: (string | null)
16730
+ }
16731
+
16732
+ export interface UsersOpsRetentionGetInput {
16733
+
16734
+ }
16735
+
16736
+ export interface UsersOpsRetentionGetOutput {
16737
+ /**
16738
+ * The single retention job. There is exactly one — it replaced the sessions reaper and the waitlist sweep.
16739
+ */
16740
+ sweep: {
16741
+ /**
16742
+ * Its schedule, in cron syntax.
16743
+ */
16744
+ cron: string
16745
+ /**
16746
+ * What one pass removes, in the order it removes it.
16747
+ */
16748
+ removes: string[]
16749
+ /**
16750
+ * The Synapse cron function that performs every sweep below.
16751
+ */
16752
+ functionId: string
16753
+ }
16754
+ /**
16755
+ * This product’s EFFECTIVE windows — what it configured, with the documented default filling anything it did not.
16756
+ */
16757
+ windows: {
16758
+ /**
16759
+ * 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.
16760
+ */
16761
+ flowAttemptDays: number
16762
+ /**
16763
+ * 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.
16764
+ */
16765
+ oneTimeTokenDays: number
16766
+ /**
16767
+ * 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.
16768
+ */
16769
+ expiredSessionDays: number
16770
+ }
16771
+ /**
16772
+ * The documented defaults, so a reader can tell a deliberate window from an inherited one without a second call.
16773
+ */
16774
+ defaults: {
16775
+ /**
16776
+ * 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.
16777
+ */
16778
+ flowAttemptDays: number
16779
+ /**
16780
+ * 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.
16781
+ */
16782
+ oneTimeTokenDays: number
16783
+ /**
16784
+ * 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.
16785
+ */
16786
+ expiredSessionDays: number
16787
+ }
16788
+ /**
16789
+ * 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.
16790
+ */
16791
+ notSwept: {
16792
+ why: string
16793
+ what: string
16794
+ }[]
16795
+ /**
16796
+ * 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.
16797
+ */
16798
+ waitlistRetentionDays: number
16799
+ }
16800
+
16801
+ export interface UsersOpsSloGetInput {
16802
+
16803
+ }
16804
+
16805
+ export interface UsersOpsSloGetOutput {
16806
+ /**
16807
+ * Every published objective and its verdict for this window.
16808
+ */
16809
+ slos: {
16810
+ /**
16811
+ * Stable id of the objective — the key to quote in a runbook.
16812
+ */
16813
+ id: string
16814
+ /**
16815
+ * Short human name.
16816
+ */
16817
+ title: string
16818
+ /**
16819
+ * `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.
16820
+ */
16821
+ status: ("ok" | "breached" | "insufficient_data")
16822
+ /**
16823
+ * How many events went into `observed`.
16824
+ */
16825
+ samples: number
16826
+ /**
16827
+ * What this replica sees in the CURRENT window, in the same unit as `objective`. NULL when nothing was observed.
16828
+ */
16829
+ observed: (number | null)
16830
+ /**
16831
+ * The `users/alert.raised` kind a breach of this objective fires, for wiring an alert route.
16832
+ */
16833
+ alertKind: string
16834
+ /**
16835
+ * The published objective, as a ratio in 0..1.
16836
+ */
16837
+ objective: number
16838
+ /**
16839
+ * Which side of `objective` is healthy: a success rate is at-least, an error rate at-most.
16840
+ */
16841
+ comparator: ("at-least" | "at-most")
16842
+ /**
16843
+ * Below this many samples the ratio is not judged at all — a quiet window is not an outage.
16844
+ */
16845
+ minSamples: number
16846
+ /**
16847
+ * What is counted, and what is deliberately NOT counted.
16848
+ */
16849
+ description: string
16850
+ /**
16851
+ * The window the observation is computed over.
16852
+ */
16853
+ windowSeconds: number
16854
+ }[]
16855
+ /**
16856
+ * 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.
16857
+ */
16858
+ scope: "replica"
16859
+ /**
16860
+ * The current window, exactly as the alert hook sees it.
16861
+ */
16862
+ window: {
16863
+ mail: {
16864
+ /**
16865
+ * Auth emails handed to mail (a cooldown or daily cap never reaches this).
16866
+ */
16867
+ total: number
16868
+ /**
16869
+ * Of those, the ones mail would not take.
16870
+ */
16871
+ failures: number
16872
+ /**
16873
+ * failures / total. NULL when nothing was sent.
16874
+ */
16875
+ failureRate: (number | null)
16876
+ }
16877
+ signIn: {
16878
+ /**
16879
+ * SETTLED flow attempts — completed or failed. A pending one is neither.
16880
+ */
16881
+ total: number
16882
+ /**
16883
+ * Of those, the ones that failed.
16884
+ */
16885
+ failures: number
16886
+ /**
16887
+ * completed / settled. NULL, never 0, when nothing settled.
16888
+ */
16889
+ successRate: (number | null)
16890
+ }
16891
+ refresh: {
16892
+ /**
16893
+ * Refresh attempts.
16894
+ */
16895
+ total: number
16896
+ /**
16897
+ * Failed refreshes, detected reuse included.
16898
+ */
16899
+ errors: number
16900
+ /**
16901
+ * Detected token REUSE — theft, counted rather than rated.
16902
+ */
16903
+ reuses: number
16904
+ /**
16905
+ * errors / total. NULL when nothing was refreshed.
16906
+ */
16907
+ errorRate: (number | null)
16908
+ }
16909
+ /**
16910
+ * Length of the evaluation window.
16911
+ */
16912
+ windowSeconds: number
16913
+ /**
16914
+ * ISO start of the window these numbers belong to.
16915
+ */
16916
+ windowStartedAt: string
16917
+ /**
16918
+ * 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.
16919
+ */
16920
+ signInFailureBaseline: (number | null)
16921
+ }
16922
+ }
16923
+
16924
+ export interface UsersSessionsGetInput {
16925
+ /**
16926
+ * The session to read.
16927
+ */
16928
+ sessionId: string
16929
+ }
16930
+
16931
+ export interface UsersSessionsGetOutput {
16932
+ id: string
16933
+ ip: (string | null)
16934
+ /**
16935
+ * `aal2` only if a verified second factor completed.
16936
+ */
16937
+ aal: ("aal1" | "aal2")
16938
+ /**
16939
+ * The factors this session was established with.
16940
+ */
16941
+ amr: string[]
16942
+ status: ("active" | "revoked")
16943
+ userId: string
16944
+ createdAt: string
16945
+ expiresAt: string
16946
+ revokedAt: (string | null)
16947
+ userAgent: (string | null)
16948
+ revokedReason: (string | null)
16949
+ /**
16950
+ * The operator behind an impersonated session, or null for an ordinary one.
16951
+ */
16952
+ impersonatedBy: (string | null)
16953
+ lastRefreshedAt: (string | null)
16954
+ absoluteExpiresAt: string
16955
+ }
16956
+
16957
+ export interface UsersSessionsImpersonateInput {
16958
+ /**
16959
+ * 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).
16960
+ */
16961
+ reason: string
16962
+ /**
16963
+ * The end user to sign in as.
16964
+ */
16965
+ userId: string
16966
+ }
16967
+
16968
+ export interface UsersSessionsImpersonateOutput {
16969
+ userId: string
16970
+ /**
16971
+ * When the session dies. It cannot be extended or refreshed.
16972
+ */
16973
+ expiresAt: string
16974
+ /**
16975
+ * Seconds until the access token expires.
16976
+ */
16977
+ expiresIn: number
16978
+ sessionId: string
16979
+ /**
16980
+ * The access JWT of the impersonated session. There is NO refresh token.
16981
+ */
16982
+ accessToken: string
16983
+ }
16984
+
16985
+ export interface UsersSessionsListInput {
16986
+ /**
16987
+ * The end user whose sessions to list.
16988
+ */
16989
+ userId: string
16990
+ }
16991
+
16992
+ export interface UsersSessionsListOutput {
16993
+ sessions: {
16994
+ id: string
16995
+ ip: (string | null)
16996
+ status: ("active" | "revoked")
16997
+ userId: string
16998
+ createdAt: string
16999
+ expiresAt: string
17000
+ revokedAt: (string | null)
17001
+ userAgent: (string | null)
17002
+ lastRefreshedAt: (string | null)
17003
+ absoluteExpiresAt: string
17004
+ }[]
17005
+ }
17006
+
17007
+ export interface UsersSessionsRevokeInput {
17008
+ /**
17009
+ * Revoke every session of this user.
17010
+ */
17011
+ userId?: string
17012
+ /**
17013
+ * Revoke exactly this session.
17014
+ */
17015
+ sessionId?: string
17016
+ }
17017
+
17018
+ export interface UsersSessionsRevokeOutput {
17019
+ revoked: number
17020
+ }
17021
+
17022
+ export interface UsersStatsGetInput {
17023
+ /**
17024
+ * 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.
17025
+ */
17026
+ window?: ("24h" | "7d" | "30d" | "90d")
17027
+ }
17028
+
17029
+ export interface UsersStatsGetOutput {
17030
+ /**
17031
+ * 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.
17032
+ */
17033
+ abuse: {
17034
+ /**
17035
+ * Accounts locked by a failed-attempt ceiling — password and second factor both.
17036
+ */
17037
+ lockouts: number
17038
+ /**
17039
+ * The subset of `lockouts` caused by the SECOND-factor ceiling.
17040
+ */
17041
+ mfaLockouts: number
17042
+ /**
17043
+ * Mirrors `signIns.failed`, so the abuse block reads on its own.
17044
+ */
17045
+ failedSignIns: number
17046
+ /**
17047
+ * Breach-corpus matches against a user's password.
17048
+ */
17049
+ pwnedPasswordsSeen: number
17050
+ /**
17051
+ * Refresh tokens spent twice outside the grace window — theft, not staleness. Each one revoked a whole session family.
17052
+ */
17053
+ refreshReuseDetected: number
17054
+ }
17055
+ /**
17056
+ * ISO start of that window — the `created_at` floor every counter used.
17057
+ */
17058
+ since: string
17059
+ /**
17060
+ * Point-in-time directory populations by DERIVED status — `user` has no status column, these are computed from `waitlisted` and the ban/delete/erase timestamps.
17061
+ */
17062
+ users: {
17063
+ /**
17064
+ * Every directory row, GDPR tombstones included.
17065
+ */
17066
+ total: number
17067
+ /**
17068
+ * Full accounts: not waitlisted, not banned, not deleted, not erased.
17069
+ */
17070
+ active: number
17071
+ /**
17072
+ * Banned accounts that are still present.
17073
+ */
17074
+ banned: number
17075
+ /**
17076
+ * GDPR-erased tombstones: the id survives, the PII does not.
17077
+ */
17078
+ erased: number
17079
+ /**
17080
+ * SOFT-deleted and still recoverable — not erased.
17081
+ */
17082
+ deleted: number
17083
+ /**
17084
+ * Waitlist signups with no credential yet.
17085
+ */
17086
+ waitlisted: number
17087
+ }
17088
+ /**
17089
+ * The window the time-bounded numbers were computed over.
17090
+ */
17091
+ window: ("24h" | "7d" | "30d" | "90d")
17092
+ /**
17093
+ * Enrolled second factors (TOTP and backup-code batches).
17094
+ */
17095
+ factors: {
17096
+ /**
17097
+ * VERIFIED second factors; an unverified enrollment gates nothing.
17098
+ */
17099
+ verified: number
17100
+ /**
17101
+ * Distinct users holding at least one verified factor.
17102
+ */
17103
+ usersWithFactor: number
17104
+ }
17105
+ /**
17106
+ * Sign-in outcomes over the window, from the audit log.
17107
+ */
17108
+ signIns: {
17109
+ /**
17110
+ * Failed sign-in attempts in the window.
17111
+ */
17112
+ failed: number
17113
+ /**
17114
+ * Successful sign-ins in the window.
17115
+ */
17116
+ succeeded: number
17117
+ /**
17118
+ * succeeded / (succeeded + failed), 4 decimals. NULL — never 0 — when nothing was attempted: an idle window and a totally broken one are opposite facts.
17119
+ */
17120
+ successRate: (number | null)
17121
+ }
17122
+ /**
17123
+ * Device sessions.
17124
+ */
17125
+ sessions: {
17126
+ /**
17127
+ * Live right now: active, unrevoked and inside BOTH the sliding and absolute expiry.
17128
+ */
17129
+ active: number
17130
+ /**
17131
+ * Sessions established since `since`.
17132
+ */
17133
+ createdInWindow: number
17134
+ }
17135
+ }
17136
+
17137
+ export interface UsersUsersBanInput {
17138
+ /**
17139
+ * The opaque user id returned by users_users_create or _list.
17140
+ */
17141
+ userId: string
17142
+ }
17143
+
17144
+ export interface UsersUsersBanOutput {
17145
+ id: string
17146
+ name: (string | null)
17147
+ bannedAt: (string | null)
17148
+ erasedAt: (string | null)
17149
+ imageUrl: (string | null)
17150
+ testUser: boolean
17151
+ createdAt: string
17152
+ deletedAt: (string | null)
17153
+ productId: string
17154
+ updatedAt: string
17155
+ waitlisted: boolean
17156
+ identifiers: {
17157
+ id: string
17158
+ type: "email"
17159
+ value: string
17160
+ isPrimary: boolean
17161
+ verifiedAt: (string | null)
17162
+ valueCanonical: string
17163
+ verificationStatus: ("unverified" | "verified" | "expired")
17164
+ }[]
17165
+ lockedUntil: (string | null)
17166
+ lastSignInAt: (string | null)
17167
+ requiresReset: boolean
17168
+ publicMetadata: UsersUsersBanOutputPublicMetadata
17169
+ unsafeMetadata: UsersUsersBanOutputPublicMetadata
17170
+ privateMetadata: UsersUsersBanOutputPublicMetadata
17171
+ emailChangeLockedUntil: (string | null)
17172
+ }
17173
+ export interface UsersUsersBanOutputPublicMetadata {
17174
+ [k: string]: unknown
17175
+ }
17176
+
17177
+ export interface UsersUsersCreateInput {
17178
+ /**
17179
+ * The user's display name.
17180
+ */
17181
+ name?: string
17182
+ /**
17183
+ * URL of the user's avatar image.
17184
+ */
17185
+ imageUrl?: string
17186
+ /**
17187
+ * Optional credential to store for this user. Hashes only — this toolkit never accepts a plaintext password. Nothing verifies it until Phase 2.
17188
+ */
17189
+ password?: {
17190
+ /**
17191
+ * A PHC-format password hash (e.g. an argon2id string) to store as-is. Never send a plaintext password.
17192
+ */
17193
+ phcHash?: string
17194
+ /**
17195
+ * An imported hash from another system, to be lazily rehashed on the first successful sign-in (Phase 2).
17196
+ */
17197
+ foreignHash?: string
17198
+ /**
17199
+ * Algorithm of `foreignHash`. Required when `foreignHash` is set.
17200
+ */
17201
+ foreignHashAlgo?: ("bcrypt" | "argon2" | "pbkdf2" | "scrypt")
17202
+ }
17203
+ /**
17204
+ * 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.
17205
+ */
17206
+ testUser?: boolean
17207
+ /**
17208
+ * Create the user as a waitlist signup: no way in until promoted. Default false.
17209
+ */
17210
+ waitlisted?: boolean
17211
+ /**
17212
+ * The email addresses that reach this user. At least one is required.
17213
+ *
17214
+ * @minItems 1
17215
+ */
17216
+ identifiers: [{
17217
+ /**
17218
+ * Identifier kind. Only 'email' exists in this phase.
17219
+ */
17220
+ type: "email"
17221
+ /**
17222
+ * The email address. Stored canonicalised (lowercase, NFC) plus raw for display.
17223
+ */
17224
+ value: string
17225
+ /**
17226
+ * 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.
17227
+ */
17228
+ verified?: boolean
17229
+ /**
17230
+ * Mark as the primary identifier of its type. The first identifier of a type defaults to primary.
17231
+ */
17232
+ isPrimary?: boolean
17233
+ }, ...({
17234
+ /**
17235
+ * Identifier kind. Only 'email' exists in this phase.
17236
+ */
17237
+ type: "email"
17238
+ /**
17239
+ * The email address. Stored canonicalised (lowercase, NFC) plus raw for display.
17240
+ */
17241
+ value: string
17242
+ /**
17243
+ * 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.
17244
+ */
17245
+ verified?: boolean
17246
+ /**
17247
+ * Mark as the primary identifier of its type. The first identifier of a type defaults to primary.
17248
+ */
17249
+ isPrimary?: boolean
17250
+ })[]]
17251
+ /**
17252
+ * Force a password reset before the user can sign in (use for unverifiable imported hashes). Default false.
17253
+ */
17254
+ requiresReset?: boolean
17255
+ /**
17256
+ * Metadata the end user may READ and that may flow into the JWT. Management-plane write only.
17257
+ */
17258
+ publicMetadata?: {
17259
+ [k: string]: unknown
17260
+ }
17261
+ unsafeMetadata?: UsersUsersCreateInputPublicMetadata
17262
+ privateMetadata?: UsersUsersCreateInputPublicMetadata1
17263
+ }
17264
+ /**
17265
+ * Metadata the end user may WRITE in a later phase. Never trust it for authorization.
17266
+ */
17267
+ export interface UsersUsersCreateInputPublicMetadata {
17268
+ [k: string]: unknown
17269
+ }
17270
+ /**
17271
+ * Metadata visible to the management plane only. Never exposed to the end user.
17272
+ */
17273
+ export interface UsersUsersCreateInputPublicMetadata1 {
17274
+ [k: string]: unknown
17275
+ }
17276
+
17277
+ export interface UsersUsersCreateOutput {
17278
+ id: string
17279
+ name: (string | null)
17280
+ bannedAt: (string | null)
17281
+ erasedAt: (string | null)
17282
+ imageUrl: (string | null)
17283
+ testUser: boolean
17284
+ createdAt: string
17285
+ deletedAt: (string | null)
17286
+ productId: string
17287
+ updatedAt: string
17288
+ waitlisted: boolean
17289
+ identifiers: {
17290
+ id: string
17291
+ type: "email"
17292
+ value: string
17293
+ isPrimary: boolean
17294
+ verifiedAt: (string | null)
17295
+ valueCanonical: string
17296
+ verificationStatus: ("unverified" | "verified" | "expired")
17297
+ }[]
17298
+ lockedUntil: (string | null)
17299
+ lastSignInAt: (string | null)
17300
+ requiresReset: boolean
17301
+ publicMetadata: UsersUsersCreateOutputPublicMetadata
17302
+ unsafeMetadata: UsersUsersCreateOutputPublicMetadata
17303
+ privateMetadata: UsersUsersCreateOutputPublicMetadata
17304
+ emailChangeLockedUntil: (string | null)
17305
+ }
17306
+ export interface UsersUsersCreateOutputPublicMetadata {
17307
+ [k: string]: unknown
17308
+ }
17309
+
17310
+ export interface UsersUsersDeleteInput {
17311
+ /**
17312
+ * The opaque user id returned by users_users_create or _list.
17313
+ */
17314
+ userId: string
17315
+ }
17316
+
17317
+ export interface UsersUsersDeleteOutput {
17318
+ id: string
17319
+ name: (string | null)
17320
+ bannedAt: (string | null)
17321
+ erasedAt: (string | null)
17322
+ imageUrl: (string | null)
17323
+ testUser: boolean
17324
+ createdAt: string
17325
+ deletedAt: (string | null)
17326
+ productId: string
17327
+ updatedAt: string
17328
+ waitlisted: boolean
17329
+ identifiers: {
17330
+ id: string
17331
+ type: "email"
17332
+ value: string
17333
+ isPrimary: boolean
17334
+ verifiedAt: (string | null)
17335
+ valueCanonical: string
17336
+ verificationStatus: ("unverified" | "verified" | "expired")
17337
+ }[]
17338
+ lockedUntil: (string | null)
17339
+ lastSignInAt: (string | null)
17340
+ requiresReset: boolean
17341
+ publicMetadata: UsersUsersDeleteOutputPublicMetadata
17342
+ unsafeMetadata: UsersUsersDeleteOutputPublicMetadata
17343
+ privateMetadata: UsersUsersDeleteOutputPublicMetadata
17344
+ emailChangeLockedUntil: (string | null)
17345
+ }
17346
+ export interface UsersUsersDeleteOutputPublicMetadata {
17347
+ [k: string]: unknown
17348
+ }
17349
+
17350
+ export interface UsersUsersEraseInput {
17351
+ /**
17352
+ * The opaque user id returned by users_users_create or _list.
17353
+ */
17354
+ userId: string
17355
+ }
17356
+
17357
+ export interface UsersUsersEraseOutput {
17358
+ id: string
17359
+ name: (string | null)
17360
+ bannedAt: (string | null)
17361
+ erasedAt: (string | null)
17362
+ imageUrl: (string | null)
17363
+ testUser: boolean
17364
+ createdAt: string
17365
+ deletedAt: (string | null)
17366
+ productId: string
17367
+ updatedAt: string
17368
+ waitlisted: boolean
17369
+ identifiers: {
17370
+ id: string
17371
+ type: "email"
17372
+ value: string
17373
+ isPrimary: boolean
17374
+ verifiedAt: (string | null)
17375
+ valueCanonical: string
17376
+ verificationStatus: ("unverified" | "verified" | "expired")
17377
+ }[]
17378
+ lockedUntil: (string | null)
17379
+ lastSignInAt: (string | null)
17380
+ requiresReset: boolean
17381
+ publicMetadata: UsersUsersEraseOutputPublicMetadata
17382
+ unsafeMetadata: UsersUsersEraseOutputPublicMetadata
17383
+ privateMetadata: UsersUsersEraseOutputPublicMetadata
17384
+ emailChangeLockedUntil: (string | null)
17385
+ }
17386
+ export interface UsersUsersEraseOutputPublicMetadata {
17387
+ [k: string]: unknown
17388
+ }
17389
+
17390
+ export interface UsersUsersExportInput {
17391
+ /**
17392
+ * Rows per page, 1-500. Default 100.
17393
+ */
17394
+ limit?: number
17395
+ /**
17396
+ * Case-insensitive substring match against the user's identifiers (email) and name.
17397
+ */
17398
+ query?: string
17399
+ /**
17400
+ * Opaque cursor from the previous page's `nextCursor`. Omit for the first page.
17401
+ */
17402
+ cursor?: string
17403
+ /**
17404
+ * Filter by status: 'active', 'banned' or 'waitlisted'. Omit for all.
17405
+ */
17406
+ status?: ("active" | "banned" | "waitlisted")
17407
+ /**
17408
+ * Include soft-deleted users. Default false.
17409
+ */
17410
+ includeDeleted?: boolean
17411
+ }
17412
+
17413
+ export interface UsersUsersExportOutput {
17414
+ count: number
17415
+ users: {
17416
+ id: string
17417
+ name: (string | null)
17418
+ bannedAt: (string | null)
17419
+ erasedAt: (string | null)
17420
+ imageUrl: (string | null)
17421
+ testUser: boolean
17422
+ createdAt: string
17423
+ deletedAt: (string | null)
17424
+ productId: string
17425
+ updatedAt: string
17426
+ waitlisted: boolean
17427
+ identifiers: {
17428
+ id: string
17429
+ type: "email"
17430
+ value: string
17431
+ isPrimary: boolean
17432
+ verifiedAt: (string | null)
17433
+ valueCanonical: string
17434
+ verificationStatus: ("unverified" | "verified" | "expired")
17435
+ }[]
17436
+ lockedUntil: (string | null)
17437
+ lastSignInAt: (string | null)
17438
+ requiresReset: boolean
17439
+ publicMetadata: UsersUsersExportOutputPublicMetadata
17440
+ unsafeMetadata: UsersUsersExportOutputPublicMetadata
17441
+ privateMetadata: UsersUsersExportOutputPublicMetadata
17442
+ emailChangeLockedUntil: (string | null)
17443
+ }[]
17444
+ exportedAt: string
17445
+ nextCursor: (string | null)
17446
+ }
17447
+ export interface UsersUsersExportOutputPublicMetadata {
17448
+ [k: string]: unknown
17449
+ }
17450
+
17451
+ export interface UsersUsersGetInput {
17452
+ /**
17453
+ * The opaque user id returned by users_users_create or _list.
17454
+ */
17455
+ userId: string
17456
+ }
17457
+
17458
+ export interface UsersUsersGetOutput {
17459
+ id: string
17460
+ name: (string | null)
17461
+ bannedAt: (string | null)
17462
+ erasedAt: (string | null)
17463
+ imageUrl: (string | null)
17464
+ testUser: boolean
17465
+ createdAt: string
17466
+ deletedAt: (string | null)
17467
+ productId: string
17468
+ updatedAt: string
17469
+ waitlisted: boolean
17470
+ identifiers: {
17471
+ id: string
17472
+ type: "email"
17473
+ value: string
17474
+ isPrimary: boolean
17475
+ verifiedAt: (string | null)
17476
+ valueCanonical: string
17477
+ verificationStatus: ("unverified" | "verified" | "expired")
17478
+ }[]
17479
+ lockedUntil: (string | null)
17480
+ lastSignInAt: (string | null)
17481
+ requiresReset: boolean
17482
+ publicMetadata: UsersUsersGetOutputPublicMetadata
17483
+ unsafeMetadata: UsersUsersGetOutputPublicMetadata
17484
+ privateMetadata: UsersUsersGetOutputPublicMetadata
17485
+ emailChangeLockedUntil: (string | null)
17486
+ }
17487
+ export interface UsersUsersGetOutputPublicMetadata {
17488
+ [k: string]: unknown
17489
+ }
17490
+
17491
+ export interface UsersUsersImportInput {
17492
+ /**
17493
+ * 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.
17494
+ *
17495
+ * @minItems 1
17496
+ * @maxItems 500
17497
+ */
17498
+ users: [unknown, ...(unknown)[]]
17499
+ }
17500
+
17501
+ export interface UsersUsersImportOutput {
17502
+ failed: number
17503
+ created: number
17504
+ results: {
17505
+ row: number
17506
+ reason: (string | null)
17507
+ status: ("created" | "skipped" | "failed")
17508
+ userId: (string | null)
17509
+ }[]
17510
+ skipped: number
17511
+ requested: number
17512
+ }
17513
+
17514
+ export interface UsersUsersInviteInput {
17515
+ /**
17516
+ * The invitee's display name.
17517
+ */
17518
+ name?: string
17519
+ /**
17520
+ * The address to invite. Stored canonicalised (lowercase, NFC) plus raw for display.
17521
+ */
17522
+ email: string
17523
+ /**
17524
+ * Metadata the end user may READ and that may flow into the JWT.
17525
+ */
17526
+ publicMetadata?: {
17527
+ [k: string]: unknown
17528
+ }
17529
+ /**
17530
+ * Metadata visible to the management plane only. Never exposed to the end user.
17531
+ */
17532
+ privateMetadata?: {
17533
+ [k: string]: unknown
17534
+ }
17535
+ }
17536
+
17537
+ export interface UsersUsersInviteOutput {
17538
+ mailed: boolean
17539
+ userId: string
17540
+ created: boolean
17541
+ expiresAt: string
17542
+ }
17543
+
17544
+ export interface UsersUsersListInput {
17545
+ /**
17546
+ * Page size, 1-100. Default 25.
17547
+ */
17548
+ limit?: number
17549
+ /**
17550
+ * Case-insensitive substring match against the user's identifiers (email) and name.
17551
+ */
17552
+ query?: string
17553
+ /**
17554
+ * Opaque cursor from a previous response's `nextCursor`. Omit for the first page.
17555
+ */
17556
+ cursor?: string
17557
+ /**
17558
+ * Filter by status: 'active' (not banned, not waitlisted), 'banned', or 'waitlisted'. Omit for all.
17559
+ */
17560
+ status?: ("active" | "banned" | "waitlisted")
17561
+ /**
17562
+ * Include soft-deleted users. Default false — deleted users are hidden.
17563
+ */
17564
+ includeDeleted?: boolean
17565
+ /**
17566
+ * 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.
17567
+ */
17568
+ includeTestUsers?: boolean
17569
+ /**
17570
+ * 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.
17571
+ */
17572
+ includeWaitlisted?: boolean
17573
+ }
17574
+
17575
+ export interface UsersUsersListOutput {
17576
+ users: {
17577
+ id: string
17578
+ name: (string | null)
17579
+ bannedAt: (string | null)
17580
+ erasedAt: (string | null)
17581
+ imageUrl: (string | null)
17582
+ testUser: boolean
17583
+ createdAt: string
17584
+ deletedAt: (string | null)
17585
+ productId: string
17586
+ updatedAt: string
17587
+ waitlisted: boolean
17588
+ identifiers: {
17589
+ id: string
17590
+ type: "email"
17591
+ value: string
17592
+ isPrimary: boolean
17593
+ verifiedAt: (string | null)
17594
+ valueCanonical: string
17595
+ verificationStatus: ("unverified" | "verified" | "expired")
17596
+ }[]
17597
+ lockedUntil: (string | null)
17598
+ lastSignInAt: (string | null)
17599
+ requiresReset: boolean
17600
+ publicMetadata: UsersUsersListOutputPublicMetadata
17601
+ unsafeMetadata: UsersUsersListOutputPublicMetadata
17602
+ privateMetadata: UsersUsersListOutputPublicMetadata
17603
+ emailChangeLockedUntil: (string | null)
17604
+ }[]
17605
+ nextCursor: (string | null)
17606
+ }
17607
+ export interface UsersUsersListOutputPublicMetadata {
17608
+ [k: string]: unknown
17609
+ }
17610
+
17611
+ export interface UsersUsersSetPrimaryIdentifierInput {
17612
+ /**
17613
+ * The address to make primary. Must not already belong, verified, to another user of this product.
17614
+ */
17615
+ email: string
17616
+ /**
17617
+ * 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.
17618
+ */
17619
+ reason: string
17620
+ /**
17621
+ * The user whose primary email address is being replaced.
17622
+ */
17623
+ userId: string
17624
+ }
17625
+
17626
+ export interface UsersUsersSetPrimaryIdentifierOutput {
17627
+ requestId: string
17628
+ scheduledFor: string
17629
+ }
17630
+
17631
+ export interface UsersUsersUnbanInput {
17632
+ /**
17633
+ * The opaque user id returned by users_users_create or _list.
17634
+ */
17635
+ userId: string
17636
+ }
17637
+
17638
+ export interface UsersUsersUnbanOutput {
17639
+ id: string
17640
+ name: (string | null)
17641
+ bannedAt: (string | null)
17642
+ erasedAt: (string | null)
17643
+ imageUrl: (string | null)
17644
+ testUser: boolean
17645
+ createdAt: string
17646
+ deletedAt: (string | null)
17647
+ productId: string
17648
+ updatedAt: string
17649
+ waitlisted: boolean
17650
+ identifiers: {
17651
+ id: string
17652
+ type: "email"
17653
+ value: string
17654
+ isPrimary: boolean
17655
+ verifiedAt: (string | null)
17656
+ valueCanonical: string
17657
+ verificationStatus: ("unverified" | "verified" | "expired")
17658
+ }[]
17659
+ lockedUntil: (string | null)
17660
+ lastSignInAt: (string | null)
17661
+ requiresReset: boolean
17662
+ publicMetadata: UsersUsersUnbanOutputPublicMetadata
17663
+ unsafeMetadata: UsersUsersUnbanOutputPublicMetadata
17664
+ privateMetadata: UsersUsersUnbanOutputPublicMetadata
17665
+ emailChangeLockedUntil: (string | null)
17666
+ }
17667
+ export interface UsersUsersUnbanOutputPublicMetadata {
17668
+ [k: string]: unknown
17669
+ }
17670
+
17671
+ export interface UsersUsersUpdateInput {
17672
+ /**
17673
+ * The user's display name. Pass null to clear.
17674
+ */
17675
+ name?: (string | null)
17676
+ /**
17677
+ * The user to update.
17678
+ */
17679
+ userId: string
17680
+ /**
17681
+ * URL of the user's avatar image. Pass null to clear.
17682
+ */
17683
+ imageUrl?: (string | null)
17684
+ /**
17685
+ * Whether the user is still a waitlist signup.
17686
+ */
17687
+ waitlisted?: boolean
17688
+ /**
17689
+ * 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`).
17690
+ */
17691
+ lockedUntil?: (string | null)
17692
+ /**
17693
+ * Whether the user must reset their password before signing in.
17694
+ */
17695
+ requiresReset?: boolean
17696
+ /**
17697
+ * REPLACES the whole public metadata bag. Management-plane write, end-user read.
17698
+ */
17699
+ publicMetadata?: {
17700
+ [k: string]: unknown
17701
+ }
17702
+ unsafeMetadata?: UsersUsersUpdateInputPublicMetadata
17703
+ privateMetadata?: UsersUsersUpdateInputPublicMetadata1
17704
+ }
17705
+ /**
17706
+ * REPLACES the whole unsafe metadata bag. End-user writable in a later phase; never authoritative.
17707
+ */
17708
+ export interface UsersUsersUpdateInputPublicMetadata {
17709
+ [k: string]: unknown
17710
+ }
17711
+ /**
17712
+ * REPLACES the whole private metadata bag. Management plane only.
17713
+ */
17714
+ export interface UsersUsersUpdateInputPublicMetadata1 {
17715
+ [k: string]: unknown
17716
+ }
17717
+
17718
+ export interface UsersUsersUpdateOutput {
17719
+ id: string
17720
+ name: (string | null)
17721
+ bannedAt: (string | null)
17722
+ erasedAt: (string | null)
17723
+ imageUrl: (string | null)
17724
+ testUser: boolean
17725
+ createdAt: string
17726
+ deletedAt: (string | null)
17727
+ productId: string
17728
+ updatedAt: string
17729
+ waitlisted: boolean
17730
+ identifiers: {
17731
+ id: string
17732
+ type: "email"
17733
+ value: string
17734
+ isPrimary: boolean
17735
+ verifiedAt: (string | null)
17736
+ valueCanonical: string
17737
+ verificationStatus: ("unverified" | "verified" | "expired")
17738
+ }[]
17739
+ lockedUntil: (string | null)
17740
+ lastSignInAt: (string | null)
17741
+ requiresReset: boolean
17742
+ publicMetadata: UsersUsersUpdateOutputPublicMetadata
17743
+ unsafeMetadata: UsersUsersUpdateOutputPublicMetadata
17744
+ privateMetadata: UsersUsersUpdateOutputPublicMetadata
17745
+ emailChangeLockedUntil: (string | null)
17746
+ }
17747
+ export interface UsersUsersUpdateOutputPublicMetadata {
17748
+ [k: string]: unknown
17749
+ }
17750
+
17751
+ export interface UsersWaitlistEraseInput {
17752
+ /**
17753
+ * The waitlisted user whose entry and directory row to erase.
17754
+ */
17755
+ userId: string
17756
+ }
17757
+
17758
+ export interface UsersWaitlistEraseOutput {
17759
+ erased: boolean
17760
+ }
17761
+
17762
+ export interface UsersWaitlistFunnelInput {
17763
+
17764
+ }
17765
+
17766
+ export interface UsersWaitlistFunnelOutput {
17767
+ total: number
17768
+ invited: number
17769
+ pending: number
17770
+ withdrawn: number
17771
+ registered: number
17772
+ unconfirmed: number
17773
+ }
17774
+
17775
+ export interface UsersWaitlistImportInput {
17776
+ /**
17777
+ * The legacy signups to import, at most 500 per call — batch client-side beyond that.
17778
+ *
17779
+ * @minItems 1
17780
+ * @maxItems 500
17781
+ */
17782
+ entries: [{
17783
+ /**
17784
+ * The signup's display name.
17785
+ */
17786
+ name?: string
17787
+ /**
17788
+ * 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.
17789
+ */
17790
+ consent: {
17791
+ /**
17792
+ * The IP the source system recorded, when it recorded one.
17793
+ */
17794
+ ip?: (string | null)
17795
+ /**
17796
+ * Where the acceptance happened in the source system, e.g. `legacy-widget`.
17797
+ */
17798
+ source: string
17799
+ /**
17800
+ * The user agent the source system recorded, when it recorded one.
17801
+ */
17802
+ userAgent?: (string | null)
17803
+ /**
17804
+ * 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.
17805
+ */
17806
+ acceptedAt: string
17807
+ /**
17808
+ * The privacy-policy version the signer accepted in the SOURCE system.
17809
+ */
17810
+ policyVersion: string
17811
+ }
17812
+ /**
17813
+ * 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.
17814
+ */
17815
+ confirmed?: boolean
17816
+ /**
17817
+ * The email address on the legacy list. Stored canonicalised plus raw for display.
17818
+ */
17819
+ identifier: string
17820
+ /**
17821
+ * Referrer / UTM attribution the source system recorded.
17822
+ */
17823
+ attribution?: {
17824
+ /**
17825
+ * utm_term of the visit.
17826
+ */
17827
+ utmTerm?: string
17828
+ /**
17829
+ * The document referrer of the signup page.
17830
+ */
17831
+ referrer?: string
17832
+ /**
17833
+ * utm_medium of the visit.
17834
+ */
17835
+ utmMedium?: string
17836
+ /**
17837
+ * utm_source of the visit.
17838
+ */
17839
+ utmSource?: string
17840
+ /**
17841
+ * utm_content of the visit.
17842
+ */
17843
+ utmContent?: string
17844
+ /**
17845
+ * The URL the signup was submitted from.
17846
+ */
17847
+ landingPage?: string
17848
+ /**
17849
+ * utm_campaign of the visit.
17850
+ */
17851
+ utmCampaign?: string
17852
+ }
17853
+ /**
17854
+ * End-user-writable metadata to carry onto the created user.
17855
+ */
17856
+ unsafeMetadata?: {
17857
+ [k: string]: unknown
17858
+ }
17859
+ }, ...({
17860
+ /**
17861
+ * The signup's display name.
17862
+ */
17863
+ name?: string
17864
+ /**
17865
+ * 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.
17866
+ */
17867
+ consent: {
17868
+ /**
17869
+ * The IP the source system recorded, when it recorded one.
17870
+ */
17871
+ ip?: (string | null)
17872
+ /**
17873
+ * Where the acceptance happened in the source system, e.g. `legacy-widget`.
17874
+ */
17875
+ source: string
17876
+ /**
17877
+ * The user agent the source system recorded, when it recorded one.
17878
+ */
17879
+ userAgent?: (string | null)
17880
+ /**
17881
+ * 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.
17882
+ */
17883
+ acceptedAt: string
17884
+ /**
17885
+ * The privacy-policy version the signer accepted in the SOURCE system.
17886
+ */
17887
+ policyVersion: string
17888
+ }
17889
+ /**
17890
+ * 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.
17891
+ */
17892
+ confirmed?: boolean
17893
+ /**
17894
+ * The email address on the legacy list. Stored canonicalised plus raw for display.
17895
+ */
17896
+ identifier: string
17897
+ /**
17898
+ * Referrer / UTM attribution the source system recorded.
17899
+ */
17900
+ attribution?: {
17901
+ /**
17902
+ * utm_term of the visit.
17903
+ */
17904
+ utmTerm?: string
17905
+ /**
17906
+ * The document referrer of the signup page.
17907
+ */
17908
+ referrer?: string
17909
+ /**
17910
+ * utm_medium of the visit.
17911
+ */
17912
+ utmMedium?: string
17913
+ /**
17914
+ * utm_source of the visit.
17915
+ */
17916
+ utmSource?: string
17917
+ /**
17918
+ * utm_content of the visit.
17919
+ */
17920
+ utmContent?: string
17921
+ /**
17922
+ * The URL the signup was submitted from.
17923
+ */
17924
+ landingPage?: string
17925
+ /**
17926
+ * utm_campaign of the visit.
17927
+ */
17928
+ utmCampaign?: string
17929
+ }
17930
+ /**
17931
+ * End-user-writable metadata to carry onto the created user.
17932
+ */
17933
+ unsafeMetadata?: {
17934
+ [k: string]: unknown
17935
+ }
17936
+ })[]]
17937
+ }
17938
+
17939
+ export interface UsersWaitlistImportOutput {
17940
+ failed: number
17941
+ results: {
17942
+ row: number
17943
+ reason: (string | null)
17944
+ status: ("imported" | "skipped" | "failed")
17945
+ userId: (string | null)
17946
+ }[]
17947
+ skipped: number
17948
+ imported: number
17949
+ requested: number
17950
+ }
17951
+
17952
+ export interface UsersWaitlistInviteInput {
17953
+ /**
17954
+ * The waitlisted users to promote, up to 100 per call. Each gets the STANDARD invite email; accepting it is what creates their credential.
17955
+ *
17956
+ * @minItems 1
17957
+ * @maxItems 100
17958
+ */
17959
+ userIds: [string, ...(string)[]]
17960
+ }
17961
+
17962
+ export interface UsersWaitlistInviteOutput {
17963
+ invited: number
17964
+ results: {
17965
+ reason: (("suppressed" | "not_found" | "already_registered") | null)
17966
+ status: ("invited" | "skipped")
17967
+ userId: string
17968
+ }[]
17969
+ skipped: number
17970
+ }
17971
+
17972
+ export interface UsersWaitlistListInput {
17973
+ /**
17974
+ * Entries per page, 1-100. Default 25.
17975
+ */
17976
+ limit?: number
17977
+ /**
17978
+ * Opaque cursor from the previous page's `nextCursor`. Omit for the first page.
17979
+ */
17980
+ cursor?: string
17981
+ /**
17982
+ * Filter by funnel status: 'pending', 'invited', 'registered' or 'withdrawn'. Omit for all.
17983
+ */
17984
+ status?: ("pending" | "invited" | "registered" | "withdrawn")
17985
+ /**
17986
+ * Double opt-in only: false returns entries whose address never confirmed. Omit for both.
17987
+ */
17988
+ confirmed?: boolean
17989
+ }
17990
+
17991
+ export interface UsersWaitlistListOutput {
17992
+ entries: {
17993
+ status: ("pending" | "invited" | "registered" | "withdrawn")
17994
+ userId: string
17995
+ createdAt: string
17996
+ invitedAt: (string | null)
17997
+ identifier: string
17998
+ attribution: {
17999
+ [k: string]: unknown
18000
+ }
18001
+ confirmedAt: (string | null)
18002
+ withdrawnAt: (string | null)
18003
+ consentProof: {
18004
+ [k: string]: unknown
18005
+ }
18006
+ registeredAt: (string | null)
18007
+ inviteTokenId: (string | null)
18008
+ }[]
18009
+ nextCursor: (string | null)
18010
+ }
18011
+
18012
+ export interface UsersWebhooksCreateInput {
18013
+ /**
18014
+ * Where deliveries are POSTed. HTTPS only, no embedded credentials.
18015
+ */
18016
+ url: string
18017
+ /**
18018
+ * 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.
18019
+ *
18020
+ * @minItems 1
18021
+ */
18022
+ events: [("user.created" | "user.updated" | "user.deleted" | "session.revoked"), ...(("user.created" | "user.updated" | "user.deleted" | "session.revoked"))[]]
18023
+ /**
18024
+ * A label only humans read — which system this endpoint feeds.
18025
+ */
18026
+ description?: string
18027
+ }
18028
+
18029
+ export interface UsersWebhooksCreateOutput {
18030
+ id: string
18031
+ url: string
18032
+ active: boolean
18033
+ events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18034
+ secret: string
18035
+ createdAt: string
18036
+ updatedAt: string
18037
+ description: (string | null)
18038
+ secretPrefix: string
18039
+ }
18040
+
18041
+ export interface UsersWebhooksDeleteInput {
18042
+ /**
18043
+ * Id of the webhook endpoint.
18044
+ */
18045
+ id: string
18046
+ }
18047
+
18048
+ export interface UsersWebhooksDeleteOutput {
18049
+ id: string
18050
+ deleted: true
18051
+ }
18052
+
18053
+ export interface UsersWebhooksDeliveriesListInput {
18054
+ /**
18055
+ * Id of the webhook endpoint whose deliveries to list.
18056
+ */
18057
+ id: string
18058
+ limit?: number
18059
+ }
18060
+
18061
+ export interface UsersWebhooksDeliveriesListOutput {
18062
+ deliveries: {
18063
+ id: string
18064
+ status: ("pending" | "succeeded" | "failed")
18065
+ eventId: string
18066
+ attempts: number
18067
+ createdAt: string
18068
+ eventType: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")
18069
+ lastError: (string | null)
18070
+ webhookId: string
18071
+ lastAttemptAt: (string | null)
18072
+ responseStatus: (number | null)
18073
+ }[]
18074
+ }
18075
+
18076
+ export interface UsersWebhooksGetInput {
18077
+ /**
18078
+ * Id of the webhook endpoint.
18079
+ */
18080
+ id: string
18081
+ }
18082
+
18083
+ export interface UsersWebhooksGetOutput {
18084
+ id: string
18085
+ url: string
18086
+ active: boolean
18087
+ events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18088
+ createdAt: string
18089
+ updatedAt: string
18090
+ description: (string | null)
18091
+ secretPrefix: string
18092
+ }
18093
+
18094
+ export interface UsersWebhooksListInput {
18095
+
18096
+ }
18097
+
18098
+ export interface UsersWebhooksListOutput {
18099
+ webhooks: {
18100
+ id: string
18101
+ url: string
18102
+ active: boolean
18103
+ events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18104
+ createdAt: string
18105
+ updatedAt: string
18106
+ description: (string | null)
18107
+ secretPrefix: string
18108
+ }[]
18109
+ }
18110
+
18111
+ export interface UsersWebhooksRotateSecretInput {
18112
+ /**
18113
+ * Id of the webhook endpoint.
18114
+ */
18115
+ id: string
18116
+ }
18117
+
18118
+ export interface UsersWebhooksRotateSecretOutput {
18119
+ id: string
18120
+ url: string
18121
+ active: boolean
18122
+ events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18123
+ secret: string
18124
+ createdAt: string
18125
+ updatedAt: string
18126
+ description: (string | null)
18127
+ secretPrefix: string
18128
+ }
18129
+
18130
+ export interface UsersWebhooksUpdateInput {
18131
+ /**
18132
+ * Id of the webhook endpoint.
18133
+ */
18134
+ id: string
18135
+ /**
18136
+ * Where deliveries are POSTed. HTTPS only, no embedded credentials.
18137
+ */
18138
+ url?: string
18139
+ /**
18140
+ * false pauses delivery without losing the endpoint or its secret.
18141
+ */
18142
+ active?: boolean
18143
+ /**
18144
+ * 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.
18145
+ *
18146
+ * @minItems 1
18147
+ */
18148
+ events?: [("user.created" | "user.updated" | "user.deleted" | "session.revoked"), ...(("user.created" | "user.updated" | "user.deleted" | "session.revoked"))[]]
18149
+ description?: (string | null)
18150
+ }
18151
+
18152
+ export interface UsersWebhooksUpdateOutput {
18153
+ id: string
18154
+ url: string
18155
+ active: boolean
18156
+ events: ("user.created" | "user.updated" | "user.deleted" | "session.revoked")[]
18157
+ createdAt: string
18158
+ updatedAt: string
18159
+ description: (string | null)
18160
+ secretPrefix: string
18161
+ }
18162
+
15464
18163
  export interface WaitlistConfigGetInput {
15465
18164
 
15466
18165
  }