@supabase/auth-js 2.104.0-canary.0 → 2.104.0-canary.2

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 (49) hide show
  1. package/dist/main/GoTrueAdminApi.d.ts +9 -1
  2. package/dist/main/GoTrueAdminApi.d.ts.map +1 -1
  3. package/dist/main/GoTrueAdminApi.js +9 -1
  4. package/dist/main/GoTrueAdminApi.js.map +1 -1
  5. package/dist/main/GoTrueClient.d.ts +10 -2
  6. package/dist/main/GoTrueClient.d.ts.map +1 -1
  7. package/dist/main/GoTrueClient.js +16 -3
  8. package/dist/main/GoTrueClient.js.map +1 -1
  9. package/dist/main/lib/errors.d.ts +17 -2
  10. package/dist/main/lib/errors.d.ts.map +1 -1
  11. package/dist/main/lib/errors.js +13 -12
  12. package/dist/main/lib/errors.js.map +1 -1
  13. package/dist/main/lib/fetch.d.ts.map +1 -1
  14. package/dist/main/lib/fetch.js +4 -1
  15. package/dist/main/lib/fetch.js.map +1 -1
  16. package/dist/main/lib/types.d.ts +21 -21
  17. package/dist/main/lib/types.d.ts.map +1 -1
  18. package/dist/main/lib/types.js.map +1 -1
  19. package/dist/main/lib/version.d.ts +1 -1
  20. package/dist/main/lib/version.js +1 -1
  21. package/dist/module/GoTrueAdminApi.d.ts +9 -1
  22. package/dist/module/GoTrueAdminApi.d.ts.map +1 -1
  23. package/dist/module/GoTrueAdminApi.js +9 -1
  24. package/dist/module/GoTrueAdminApi.js.map +1 -1
  25. package/dist/module/GoTrueClient.d.ts +10 -2
  26. package/dist/module/GoTrueClient.d.ts.map +1 -1
  27. package/dist/module/GoTrueClient.js +16 -3
  28. package/dist/module/GoTrueClient.js.map +1 -1
  29. package/dist/module/lib/errors.d.ts +17 -2
  30. package/dist/module/lib/errors.d.ts.map +1 -1
  31. package/dist/module/lib/errors.js +13 -12
  32. package/dist/module/lib/errors.js.map +1 -1
  33. package/dist/module/lib/fetch.d.ts.map +1 -1
  34. package/dist/module/lib/fetch.js +4 -1
  35. package/dist/module/lib/fetch.js.map +1 -1
  36. package/dist/module/lib/types.d.ts +21 -21
  37. package/dist/module/lib/types.d.ts.map +1 -1
  38. package/dist/module/lib/types.js.map +1 -1
  39. package/dist/module/lib/version.d.ts +1 -1
  40. package/dist/module/lib/version.js +1 -1
  41. package/dist/tsconfig.module.tsbuildinfo +1 -1
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/package.json +1 -1
  44. package/src/GoTrueAdminApi.ts +9 -1
  45. package/src/GoTrueClient.ts +15 -3
  46. package/src/lib/errors.ts +43 -8
  47. package/src/lib/fetch.ts +4 -1
  48. package/src/lib/types.ts +28 -40
  49. package/src/lib/version.ts +1 -1
package/src/lib/types.ts CHANGED
@@ -609,16 +609,14 @@ export type SignInAnonymouslyCredentials = {
609
609
  }
610
610
  }
611
611
 
612
- export type SignUpWithPasswordCredentials = Prettify<
613
- PasswordCredentialsBase & {
614
- options?: {
615
- emailRedirectTo?: string // only for email
616
- data?: object
617
- captchaToken?: string
618
- channel?: 'sms' | 'whatsapp' // only for phone
619
- }
612
+ export type SignUpWithPasswordCredentials = PasswordCredentialsBase & {
613
+ options?: {
614
+ emailRedirectTo?: string // only for email
615
+ data?: object
616
+ captchaToken?: string
617
+ channel?: 'sms' | 'whatsapp' // only for phone
620
618
  }
621
- >
619
+ }
622
620
 
623
621
  type PasswordCredentialsBase =
624
622
  | { email: string; password: string }
@@ -995,11 +993,11 @@ type MFAVerifyTOTPParamFields = {
995
993
  code: string
996
994
  }
997
995
 
998
- export type MFAVerifyTOTPParams = Prettify<MFAVerifyParamsBase & MFAVerifyTOTPParamFields>
996
+ export type MFAVerifyTOTPParams = MFAVerifyParamsBase & MFAVerifyTOTPParamFields
999
997
 
1000
998
  type MFAVerifyPhoneParamFields = MFAVerifyTOTPParamFields
1001
999
 
1002
- export type MFAVerifyPhoneParams = Prettify<MFAVerifyParamsBase & MFAVerifyPhoneParamFields>
1000
+ export type MFAVerifyPhoneParams = MFAVerifyParamsBase & MFAVerifyPhoneParamFields
1003
1001
 
1004
1002
  type MFAVerifyWebauthnParamFieldsBase = {
1005
1003
  /** Relying party ID */
@@ -1032,7 +1030,7 @@ export type MFAVerifyWebauthnParamFields<T extends 'create' | 'request' = 'creat
1032
1030
  * @see {@link https://w3c.github.io/webauthn/#sctn-verifying-assertion W3C WebAuthn Spec - Verifying an Authentication Assertion}
1033
1031
  */
1034
1032
  export type MFAVerifyWebauthnParams<T extends 'create' | 'request' = 'create' | 'request'> =
1035
- Prettify<MFAVerifyParamsBase & MFAVerifyWebauthnParamFields<T>>
1033
+ MFAVerifyParamsBase & MFAVerifyWebauthnParamFields<T>
1036
1034
 
1037
1035
  export type MFAVerifyParams = MFAVerifyTOTPParams | MFAVerifyPhoneParams | MFAVerifyWebauthnParams
1038
1036
 
@@ -1044,16 +1042,14 @@ type MFAChallengeParamsBase = {
1044
1042
  const MFATOTPChannels = ['sms', 'whatsapp'] as const
1045
1043
  export type MFATOTPChannel = (typeof MFATOTPChannels)[number]
1046
1044
 
1047
- export type MFAChallengeTOTPParams = Prettify<MFAChallengeParamsBase>
1045
+ export type MFAChallengeTOTPParams = MFAChallengeParamsBase
1048
1046
 
1049
1047
  type MFAChallengePhoneParamFields<Channel extends MFATOTPChannel = MFATOTPChannel> = {
1050
1048
  /** Messaging channel to use (e.g. whatsapp or sms). Only relevant for phone factors */
1051
1049
  channel: Channel
1052
1050
  }
1053
1051
 
1054
- export type MFAChallengePhoneParams = Prettify<
1055
- MFAChallengeParamsBase & MFAChallengePhoneParamFields
1056
- >
1052
+ export type MFAChallengePhoneParams = MFAChallengeParamsBase & MFAChallengePhoneParamFields
1057
1053
 
1058
1054
  /** WebAuthn parameters for WebAuthn factor challenge */
1059
1055
  type MFAChallengeWebauthnParamFields = {
@@ -1070,9 +1066,7 @@ type MFAChallengeWebauthnParamFields = {
1070
1066
  * Includes Relying Party information needed for WebAuthn ceremonies.
1071
1067
  * @see {@link https://w3c.github.io/webauthn/#sctn-rp-operations W3C WebAuthn Spec - Relying Party Operations}
1072
1068
  */
1073
- export type MFAChallengeWebauthnParams = Prettify<
1074
- MFAChallengeParamsBase & MFAChallengeWebauthnParamFields
1075
- >
1069
+ export type MFAChallengeWebauthnParams = MFAChallengeParamsBase & MFAChallengeWebauthnParamFields
1076
1070
 
1077
1071
  export type MFAChallengeParams =
1078
1072
  | MFAChallengeTOTPParams
@@ -1083,9 +1077,8 @@ type MFAChallengeAndVerifyParamsBase = Omit<MFAVerifyParamsBase, 'challengeId'>
1083
1077
 
1084
1078
  type MFAChallengeAndVerifyTOTPParamFields = MFAVerifyTOTPParamFields
1085
1079
 
1086
- type MFAChallengeAndVerifyTOTPParams = Prettify<
1087
- MFAChallengeAndVerifyParamsBase & MFAChallengeAndVerifyTOTPParamFields
1088
- >
1080
+ type MFAChallengeAndVerifyTOTPParams = MFAChallengeAndVerifyParamsBase &
1081
+ MFAChallengeAndVerifyTOTPParamFields
1089
1082
 
1090
1083
  export type MFAChallengeAndVerifyParams = MFAChallengeAndVerifyTOTPParams
1091
1084
 
@@ -1142,7 +1135,7 @@ type AuthMFAChallengeTOTPResponseFields = {
1142
1135
  }
1143
1136
 
1144
1137
  export type AuthMFAChallengeTOTPResponse = RequestResult<
1145
- Prettify<AuthMFAChallengeResponseBase<'totp'> & AuthMFAChallengeTOTPResponseFields>
1138
+ AuthMFAChallengeResponseBase<'totp'> & AuthMFAChallengeTOTPResponseFields
1146
1139
  >
1147
1140
 
1148
1141
  type AuthMFAChallengePhoneResponseFields = {
@@ -1150,7 +1143,7 @@ type AuthMFAChallengePhoneResponseFields = {
1150
1143
  }
1151
1144
 
1152
1145
  export type AuthMFAChallengePhoneResponse = RequestResult<
1153
- Prettify<AuthMFAChallengeResponseBase<'phone'> & AuthMFAChallengePhoneResponseFields>
1146
+ AuthMFAChallengeResponseBase<'phone'> & AuthMFAChallengePhoneResponseFields
1154
1147
  >
1155
1148
 
1156
1149
  type AuthMFAChallengeWebauthnResponseFields = {
@@ -1171,7 +1164,7 @@ type AuthMFAChallengeWebauthnResponseFields = {
1171
1164
  * @see {@link https://w3c.github.io/webauthn/#sctn-credential-creation W3C WebAuthn Spec - Credential Creation}
1172
1165
  */
1173
1166
  export type AuthMFAChallengeWebauthnResponse = RequestResult<
1174
- Prettify<AuthMFAChallengeResponseBase<'webauthn'> & AuthMFAChallengeWebauthnResponseFields>
1167
+ AuthMFAChallengeResponseBase<'webauthn'> & AuthMFAChallengeWebauthnResponseFields
1175
1168
  >
1176
1169
 
1177
1170
  type AuthMFAChallengeWebauthnResponseFieldsJSON = {
@@ -1190,9 +1183,8 @@ type AuthMFAChallengeWebauthnResponseFieldsJSON = {
1190
1183
  * JSON-serializable version of WebAuthn challenge response.
1191
1184
  * Used for server communication with base64url-encoded binary fields.
1192
1185
  */
1193
- export type AuthMFAChallengeWebauthnResponseDataJSON = Prettify<
1194
- AuthMFAChallengeResponseBase<'webauthn'> & AuthMFAChallengeWebauthnResponseFieldsJSON
1195
- >
1186
+ export type AuthMFAChallengeWebauthnResponseDataJSON = AuthMFAChallengeResponseBase<'webauthn'> &
1187
+ AuthMFAChallengeWebauthnResponseFieldsJSON
1196
1188
 
1197
1189
  /**
1198
1190
  * Server response type for WebAuthn MFA challenge.
@@ -1211,11 +1203,11 @@ export type AuthMFAListFactorsResponse<T extends typeof FactorTypes = typeof Fac
1211
1203
  RequestResult<
1212
1204
  {
1213
1205
  /** All available factors (verified and unverified). */
1214
- all: Prettify<Factor>[]
1206
+ all: Factor[]
1215
1207
 
1216
1208
  // Dynamically create a property for each factor type with only verified factors
1217
1209
  } & {
1218
- [K in T[number]]: Prettify<Factor<K, 'verified'>>[]
1210
+ [K in T[number]]: Factor<K, 'verified'>[]
1219
1211
  }
1220
1212
  >
1221
1213
 
@@ -1837,15 +1829,13 @@ type MFAEnrollTOTPParamFields = {
1837
1829
  issuer?: string
1838
1830
  }
1839
1831
 
1840
- export type MFAEnrollTOTPParams = Prettify<MFAEnrollParamsBase<'totp'> & MFAEnrollTOTPParamFields>
1832
+ export type MFAEnrollTOTPParams = MFAEnrollParamsBase<'totp'> & MFAEnrollTOTPParamFields
1841
1833
 
1842
1834
  type MFAEnrollPhoneParamFields = {
1843
1835
  /** Phone number associated with a factor. Number should conform to E.164 format */
1844
1836
  phone: string
1845
1837
  }
1846
- export type MFAEnrollPhoneParams = Prettify<
1847
- MFAEnrollParamsBase<'phone'> & MFAEnrollPhoneParamFields
1848
- >
1838
+ export type MFAEnrollPhoneParams = MFAEnrollParamsBase<'phone'> & MFAEnrollPhoneParamFields
1849
1839
 
1850
1840
  type MFAEnrollWebauthnFields = {
1851
1841
  /** no extra fields for now, kept for consistency and for possible future changes */
@@ -1856,9 +1846,7 @@ type MFAEnrollWebauthnFields = {
1856
1846
  * Creates an unverified WebAuthn factor that must be verified with a credential.
1857
1847
  * @see {@link https://w3c.github.io/webauthn/#sctn-registering-a-new-credential W3C WebAuthn Spec - Registering a New Credential}
1858
1848
  */
1859
- export type MFAEnrollWebauthnParams = Prettify<
1860
- MFAEnrollParamsBase<'webauthn'> & MFAEnrollWebauthnFields
1861
- >
1849
+ export type MFAEnrollWebauthnParams = MFAEnrollParamsBase<'webauthn'> & MFAEnrollWebauthnFields
1862
1850
 
1863
1851
  type AuthMFAEnrollResponseBase<T extends FactorType> = {
1864
1852
  /** ID of the factor that was just enrolled (in an unverified state). */
@@ -1891,7 +1879,7 @@ type AuthMFAEnrollTOTPResponseFields = {
1891
1879
  }
1892
1880
 
1893
1881
  export type AuthMFAEnrollTOTPResponse = RequestResult<
1894
- Prettify<AuthMFAEnrollResponseBase<'totp'> & AuthMFAEnrollTOTPResponseFields>
1882
+ AuthMFAEnrollResponseBase<'totp'> & AuthMFAEnrollTOTPResponseFields
1895
1883
  >
1896
1884
 
1897
1885
  type AuthMFAEnrollPhoneResponseFields = {
@@ -1900,7 +1888,7 @@ type AuthMFAEnrollPhoneResponseFields = {
1900
1888
  }
1901
1889
 
1902
1890
  export type AuthMFAEnrollPhoneResponse = RequestResult<
1903
- Prettify<AuthMFAEnrollResponseBase<'phone'> & AuthMFAEnrollPhoneResponseFields>
1891
+ AuthMFAEnrollResponseBase<'phone'> & AuthMFAEnrollPhoneResponseFields
1904
1892
  >
1905
1893
 
1906
1894
  type AuthMFAEnrollWebauthnFields = {
@@ -1913,7 +1901,7 @@ type AuthMFAEnrollWebauthnFields = {
1913
1901
  * @see {@link https://w3c.github.io/webauthn/#sctn-registering-a-new-credential W3C WebAuthn Spec - Registering a New Credential}
1914
1902
  */
1915
1903
  export type AuthMFAEnrollWebauthnResponse = RequestResult<
1916
- Prettify<AuthMFAEnrollResponseBase<'webauthn'> & AuthMFAEnrollWebauthnFields>
1904
+ AuthMFAEnrollResponseBase<'webauthn'> & AuthMFAEnrollWebauthnFields
1917
1905
  >
1918
1906
 
1919
1907
  export type JwtHeader = {
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '2.104.0-canary.0'
7
+ export const version = '2.104.0-canary.2'