@lessly/sdk-app 15.0.1 → 15.1.0

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