@djangocfg/api 2.1.420 → 2.1.422
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.
- package/dist/auth-server.cjs +45 -27
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +45 -27
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +61 -33
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +2 -1
- package/dist/auth.d.ts +2 -1
- package/dist/auth.mjs +61 -33
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +45 -27
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +1 -1
- package/dist/clients.d.ts +1 -1
- package/dist/clients.mjs +45 -27
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +48 -29
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.mjs +48 -29
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +45 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +45 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRetrieve.ts +12 -3
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +12 -3
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +12 -3
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +12 -3
- package/src/_api/generated/_cfg_accounts/openapi.json +9 -0
- package/src/_api/generated/_cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +12 -3
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +12 -3
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +12 -3
- package/src/_api/generated/client/client.gen.ts +1 -4
- package/src/_api/generated/client/types.gen.ts +3 -2
- package/src/_api/generated/client/utils.gen.ts +6 -8
- package/src/_api/generated/core/params.gen.ts +4 -4
- package/src/_api/generated/helpers/auth.ts +58 -9
- package/src/_api/generated/index.ts +6 -0
- package/src/_api/generated/openapi.json +9 -0
- package/src/_api/generated/sdk.gen.ts +18 -6
- package/src/auth/hooks/useAuthForm.ts +5 -4
- package/src/auth/hooks/useAutoAuth.ts +23 -4
package/dist/index.d.cts
CHANGED
|
@@ -412,7 +412,7 @@ interface ClientOptions$1 {
|
|
|
412
412
|
throwOnError?: boolean;
|
|
413
413
|
}
|
|
414
414
|
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
415
|
-
type SseFn = <TData = unknown,
|
|
415
|
+
type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
|
|
416
416
|
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
417
417
|
type BuildUrlFn = <TData extends {
|
|
418
418
|
body?: unknown;
|
|
@@ -2648,4 +2648,4 @@ declare namespace types_gen {
|
|
|
2648
2648
|
export { type types_gen_AccountDeleteResponse as AccountDeleteResponse, type types_gen_ApiKey as ApiKey, type types_gen_ApiKeyRegenerate as ApiKeyRegenerate, type types_gen_ApiKeyRequest as ApiKeyRequest, type types_gen_ApiKeyTestRequest as ApiKeyTestRequest, type types_gen_ApiKeyTestResult as ApiKeyTestResult, type types_gen_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, type types_gen_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, type types_gen_BackupCodesStatus as BackupCodesStatus, type types_gen_CentrifugoToken as CentrifugoToken, type types_gen_CfgAccountsApiKeyRegenerateCreateData as CfgAccountsApiKeyRegenerateCreateData, type types_gen_CfgAccountsApiKeyRegenerateCreateErrors as CfgAccountsApiKeyRegenerateCreateErrors, type types_gen_CfgAccountsApiKeyRegenerateCreateResponse as CfgAccountsApiKeyRegenerateCreateResponse, type types_gen_CfgAccountsApiKeyRegenerateCreateResponses as CfgAccountsApiKeyRegenerateCreateResponses, type types_gen_CfgAccountsApiKeyRetrieveData as CfgAccountsApiKeyRetrieveData, type types_gen_CfgAccountsApiKeyRetrieveErrors as CfgAccountsApiKeyRetrieveErrors, type types_gen_CfgAccountsApiKeyRetrieveResponse as CfgAccountsApiKeyRetrieveResponse, type types_gen_CfgAccountsApiKeyRetrieveResponses as CfgAccountsApiKeyRetrieveResponses, type types_gen_CfgAccountsApiKeyTestCreateData as CfgAccountsApiKeyTestCreateData, type types_gen_CfgAccountsApiKeyTestCreateResponse as CfgAccountsApiKeyTestCreateResponse, type types_gen_CfgAccountsApiKeyTestCreateResponses as CfgAccountsApiKeyTestCreateResponses, type types_gen_CfgAccountsOauthConnectionsListData as CfgAccountsOauthConnectionsListData, type types_gen_CfgAccountsOauthConnectionsListResponse as CfgAccountsOauthConnectionsListResponse, type types_gen_CfgAccountsOauthConnectionsListResponses as CfgAccountsOauthConnectionsListResponses, type types_gen_CfgAccountsOauthConnectionsResponse200AutoRef as CfgAccountsOauthConnectionsResponse200AutoRef, type types_gen_CfgAccountsOauthDisconnectCreateData as CfgAccountsOauthDisconnectCreateData, type types_gen_CfgAccountsOauthDisconnectCreateError as CfgAccountsOauthDisconnectCreateError, type types_gen_CfgAccountsOauthDisconnectCreateErrors as CfgAccountsOauthDisconnectCreateErrors, type types_gen_CfgAccountsOauthDisconnectCreateResponse as CfgAccountsOauthDisconnectCreateResponse, type types_gen_CfgAccountsOauthDisconnectCreateResponses as CfgAccountsOauthDisconnectCreateResponses, type types_gen_CfgAccountsOauthDisconnectResponse200AutoRef as CfgAccountsOauthDisconnectResponse200AutoRef, type types_gen_CfgAccountsOauthGithubAuthorizeCreateData as CfgAccountsOauthGithubAuthorizeCreateData, type types_gen_CfgAccountsOauthGithubAuthorizeCreateError as CfgAccountsOauthGithubAuthorizeCreateError, type types_gen_CfgAccountsOauthGithubAuthorizeCreateErrors as CfgAccountsOauthGithubAuthorizeCreateErrors, type types_gen_CfgAccountsOauthGithubAuthorizeCreateResponse as CfgAccountsOauthGithubAuthorizeCreateResponse, type types_gen_CfgAccountsOauthGithubAuthorizeCreateResponses as CfgAccountsOauthGithubAuthorizeCreateResponses, type types_gen_CfgAccountsOauthGithubCallbackCreateData as CfgAccountsOauthGithubCallbackCreateData, type types_gen_CfgAccountsOauthGithubCallbackCreateError as CfgAccountsOauthGithubCallbackCreateError, type types_gen_CfgAccountsOauthGithubCallbackCreateErrors as CfgAccountsOauthGithubCallbackCreateErrors, type types_gen_CfgAccountsOauthGithubCallbackCreateResponse as CfgAccountsOauthGithubCallbackCreateResponse, type types_gen_CfgAccountsOauthGithubCallbackCreateResponses as CfgAccountsOauthGithubCallbackCreateResponses, type types_gen_CfgAccountsOauthProvidersRetrieveData as CfgAccountsOauthProvidersRetrieveData, type types_gen_CfgAccountsOauthProvidersRetrieveResponse as CfgAccountsOauthProvidersRetrieveResponse, type types_gen_CfgAccountsOauthProvidersRetrieveResponses as CfgAccountsOauthProvidersRetrieveResponses, type types_gen_CfgAccountsOtpRequestCreateData as CfgAccountsOtpRequestCreateData, type types_gen_CfgAccountsOtpRequestCreateError as CfgAccountsOtpRequestCreateError, type types_gen_CfgAccountsOtpRequestCreateErrors as CfgAccountsOtpRequestCreateErrors, type types_gen_CfgAccountsOtpRequestCreateResponse as CfgAccountsOtpRequestCreateResponse, type types_gen_CfgAccountsOtpRequestCreateResponses as CfgAccountsOtpRequestCreateResponses, type types_gen_CfgAccountsOtpVerifyCreateData as CfgAccountsOtpVerifyCreateData, type types_gen_CfgAccountsOtpVerifyCreateError as CfgAccountsOtpVerifyCreateError, type types_gen_CfgAccountsOtpVerifyCreateErrors as CfgAccountsOtpVerifyCreateErrors, type types_gen_CfgAccountsOtpVerifyCreateResponse as CfgAccountsOtpVerifyCreateResponse, type types_gen_CfgAccountsOtpVerifyCreateResponses as CfgAccountsOtpVerifyCreateResponses, type types_gen_CfgAccountsProfileAvatarCreateData as CfgAccountsProfileAvatarCreateData, type types_gen_CfgAccountsProfileAvatarCreateErrors as CfgAccountsProfileAvatarCreateErrors, type types_gen_CfgAccountsProfileAvatarCreateResponse as CfgAccountsProfileAvatarCreateResponse, type types_gen_CfgAccountsProfileAvatarCreateResponses as CfgAccountsProfileAvatarCreateResponses, type types_gen_CfgAccountsProfileDeleteCreateData as CfgAccountsProfileDeleteCreateData, type types_gen_CfgAccountsProfileDeleteCreateErrors as CfgAccountsProfileDeleteCreateErrors, type types_gen_CfgAccountsProfileDeleteCreateResponse as CfgAccountsProfileDeleteCreateResponse, type types_gen_CfgAccountsProfileDeleteCreateResponses as CfgAccountsProfileDeleteCreateResponses, type types_gen_CfgAccountsProfilePartialPartialUpdateData as CfgAccountsProfilePartialPartialUpdateData, type types_gen_CfgAccountsProfilePartialPartialUpdateErrors as CfgAccountsProfilePartialPartialUpdateErrors, type types_gen_CfgAccountsProfilePartialPartialUpdateResponse as CfgAccountsProfilePartialPartialUpdateResponse, type types_gen_CfgAccountsProfilePartialPartialUpdateResponses as CfgAccountsProfilePartialPartialUpdateResponses, type types_gen_CfgAccountsProfilePartialUpdateData as CfgAccountsProfilePartialUpdateData, type types_gen_CfgAccountsProfilePartialUpdateErrors as CfgAccountsProfilePartialUpdateErrors, type types_gen_CfgAccountsProfilePartialUpdateResponse as CfgAccountsProfilePartialUpdateResponse, type types_gen_CfgAccountsProfilePartialUpdateResponses as CfgAccountsProfilePartialUpdateResponses, type types_gen_CfgAccountsProfileRetrieveData as CfgAccountsProfileRetrieveData, type types_gen_CfgAccountsProfileRetrieveErrors as CfgAccountsProfileRetrieveErrors, type types_gen_CfgAccountsProfileRetrieveResponse as CfgAccountsProfileRetrieveResponse, type types_gen_CfgAccountsProfileRetrieveResponses as CfgAccountsProfileRetrieveResponses, type types_gen_CfgAccountsProfileUpdatePartialUpdateData as CfgAccountsProfileUpdatePartialUpdateData, type types_gen_CfgAccountsProfileUpdatePartialUpdateErrors as CfgAccountsProfileUpdatePartialUpdateErrors, type types_gen_CfgAccountsProfileUpdatePartialUpdateResponse as CfgAccountsProfileUpdatePartialUpdateResponse, type types_gen_CfgAccountsProfileUpdatePartialUpdateResponses as CfgAccountsProfileUpdatePartialUpdateResponses, type types_gen_CfgAccountsProfileUpdateUpdateData as CfgAccountsProfileUpdateUpdateData, type types_gen_CfgAccountsProfileUpdateUpdateErrors as CfgAccountsProfileUpdateUpdateErrors, type types_gen_CfgAccountsProfileUpdateUpdateResponse as CfgAccountsProfileUpdateUpdateResponse, type types_gen_CfgAccountsProfileUpdateUpdateResponses as CfgAccountsProfileUpdateUpdateResponses, type types_gen_CfgAccountsTokenRefreshCreateData as CfgAccountsTokenRefreshCreateData, type types_gen_CfgAccountsTokenRefreshCreateResponse as CfgAccountsTokenRefreshCreateResponse, type types_gen_CfgAccountsTokenRefreshCreateResponses as CfgAccountsTokenRefreshCreateResponses, type types_gen_CfgCentrifugoAuthTokenRetrieveData as CfgCentrifugoAuthTokenRetrieveData, type types_gen_CfgCentrifugoAuthTokenRetrieveErrors as CfgCentrifugoAuthTokenRetrieveErrors, type types_gen_CfgCentrifugoAuthTokenRetrieveResponse as CfgCentrifugoAuthTokenRetrieveResponse, type types_gen_CfgCentrifugoAuthTokenRetrieveResponses as CfgCentrifugoAuthTokenRetrieveResponses, type types_gen_CfgTotpBackupCodesRegenerateCreateData as CfgTotpBackupCodesRegenerateCreateData, type types_gen_CfgTotpBackupCodesRegenerateCreateErrors as CfgTotpBackupCodesRegenerateCreateErrors, type types_gen_CfgTotpBackupCodesRegenerateCreateResponse as CfgTotpBackupCodesRegenerateCreateResponse, type types_gen_CfgTotpBackupCodesRegenerateCreateResponses as CfgTotpBackupCodesRegenerateCreateResponses, type types_gen_CfgTotpBackupCodesRetrieveData as CfgTotpBackupCodesRetrieveData, type types_gen_CfgTotpBackupCodesRetrieveResponse as CfgTotpBackupCodesRetrieveResponse, type types_gen_CfgTotpBackupCodesRetrieveResponses as CfgTotpBackupCodesRetrieveResponses, type types_gen_CfgTotpDevicesDestroyData as CfgTotpDevicesDestroyData, type types_gen_CfgTotpDevicesDestroyResponse as CfgTotpDevicesDestroyResponse, type types_gen_CfgTotpDevicesDestroyResponses as CfgTotpDevicesDestroyResponses, type types_gen_CfgTotpDevicesRetrieveData as CfgTotpDevicesRetrieveData, type types_gen_CfgTotpDevicesRetrieveResponse as CfgTotpDevicesRetrieveResponse, type types_gen_CfgTotpDevicesRetrieveResponses as CfgTotpDevicesRetrieveResponses, type types_gen_CfgTotpDisableCreateData as CfgTotpDisableCreateData, type types_gen_CfgTotpDisableCreateErrors as CfgTotpDisableCreateErrors, type types_gen_CfgTotpDisableCreateResponse as CfgTotpDisableCreateResponse, type types_gen_CfgTotpDisableCreateResponses as CfgTotpDisableCreateResponses, type types_gen_CfgTotpDisableResponse200AutoRef as CfgTotpDisableResponse200AutoRef, type types_gen_CfgTotpSetupConfirmCreateData as CfgTotpSetupConfirmCreateData, type types_gen_CfgTotpSetupConfirmCreateErrors as CfgTotpSetupConfirmCreateErrors, type types_gen_CfgTotpSetupConfirmCreateResponse as CfgTotpSetupConfirmCreateResponse, type types_gen_CfgTotpSetupConfirmCreateResponses as CfgTotpSetupConfirmCreateResponses, type types_gen_CfgTotpSetupCreateData as CfgTotpSetupCreateData, type types_gen_CfgTotpSetupCreateErrors as CfgTotpSetupCreateErrors, type types_gen_CfgTotpSetupCreateResponse as CfgTotpSetupCreateResponse, type types_gen_CfgTotpSetupCreateResponses as CfgTotpSetupCreateResponses, type types_gen_CfgTotpVerifyBackupCreateData as CfgTotpVerifyBackupCreateData, type types_gen_CfgTotpVerifyBackupCreateErrors as CfgTotpVerifyBackupCreateErrors, type types_gen_CfgTotpVerifyBackupCreateResponse as CfgTotpVerifyBackupCreateResponse, type types_gen_CfgTotpVerifyBackupCreateResponses as CfgTotpVerifyBackupCreateResponses, type types_gen_CfgTotpVerifyCreateData as CfgTotpVerifyCreateData, type types_gen_CfgTotpVerifyCreateErrors as CfgTotpVerifyCreateErrors, type types_gen_CfgTotpVerifyCreateResponse as CfgTotpVerifyCreateResponse, type types_gen_CfgTotpVerifyCreateResponses as CfgTotpVerifyCreateResponses, type types_gen_CfgUserUpdateRequest as CfgUserUpdateRequest, type types_gen_ClientOptions as ClientOptions, type types_gen_ConfirmSetupRequest as ConfirmSetupRequest, type types_gen_ConfirmSetupResponse as ConfirmSetupResponse, type types_gen_ConnectionTokenResponse as ConnectionTokenResponse, type types_gen_DeviceList as DeviceList, type types_gen_DeviceListResponse as DeviceListResponse, type types_gen_DeviceListResponseWritable as DeviceListResponseWritable, types_gen_DeviceStatusEnum as DeviceStatusEnum, type types_gen_DisableRequest as DisableRequest, type types_gen_OAuthAuthorizeRequestRequest as OAuthAuthorizeRequestRequest, type types_gen_OAuthAuthorizeResponse as OAuthAuthorizeResponse, type types_gen_OAuthCallbackRequestRequest as OAuthCallbackRequestRequest, type types_gen_OAuthConnection as OAuthConnection, type types_gen_OAuthDisconnectRequestRequest as OAuthDisconnectRequestRequest, type types_gen_OAuthError as OAuthError, types_gen_OAuthProviderEnum as OAuthProviderEnum, type types_gen_OAuthProvidersResponse as OAuthProvidersResponse, type types_gen_OAuthTokenResponse as OAuthTokenResponse, type types_gen_OtpErrorResponse as OtpErrorResponse, type types_gen_OtpRequestRequest as OtpRequestRequest, type types_gen_OtpRequestResponse as OtpRequestResponse, type types_gen_OtpVerifyRequest as OtpVerifyRequest, type types_gen_OtpVerifyResponse as OtpVerifyResponse, type types_gen_OtpVerifyResponseWritable as OtpVerifyResponseWritable, type types_gen_PatchedCfgUserUpdateRequest as PatchedCfgUserUpdateRequest, type types_gen_SetupRequest as SetupRequest, type types_gen_SetupResponse as SetupResponse, type types_gen_TokenRefresh as TokenRefresh, type types_gen_TokenRefreshRequest as TokenRefreshRequest, type types_gen_TokenRefreshWritable as TokenRefreshWritable, type types_gen_TotpVerifyUser as TotpVerifyUser, type types_gen_TotpVerifyUserWritable as TotpVerifyUserWritable, type types_gen_User as User, type types_gen_UserWritable as UserWritable, type types_gen_VerifyBackupRequest as VerifyBackupRequest, type types_gen_VerifyRequest as VerifyRequest, type types_gen_VerifyResponse as VerifyResponse, type types_gen_VerifyResponseWritable as VerifyResponseWritable };
|
|
2649
2649
|
}
|
|
2650
2650
|
|
|
2651
|
-
export { APIError, APILogger, types_gen$2 as AccountsTypes, type Auth$1 as Auth, types_gen as CentrifugoTypes, CfgAccounts, API$2 as CfgAccountsAPI, CfgAccountsApi, CfgAccountsApiKey, CfgAccountsAuth, CfgAccountsOauth, CfgAccountsProfile, CfgCentrifugo, API$1 as CfgCentrifugoAPI, CfgCentrifugoApi, CfgTotp, API as CfgTotpAPI, CfgTotpApi, CfgTotpBackupCodes, CfgTotpSetup, CfgTotpVerify, CookieStorageAdapter, type ErrorLog, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, NetworkError, type RequestLog, type ResponseLog, type StorageAdapter, types_gen$1 as TotpTypes, type User, type ValidationErrorDetail, type ValidationErrorEvent, CfgAccountsApi as api, auth, defaultLogger, dispatchValidationError, formatZodError, onValidationError };
|
|
2651
|
+
export { APIError, APILogger, type AccountDeleteResponse, types_gen$2 as AccountsTypes, type ApiKey, type ApiKeyRegenerate, type ApiKeyRequest, type ApiKeyTestRequest, type ApiKeyTestResult, type Auth$1 as Auth, type BackupCodesRegenerateRequest, type BackupCodesRegenerateResponse, type BackupCodesStatus, type CentrifugoToken, types_gen as CentrifugoTypes, CfgAccounts, API$2 as CfgAccountsAPI, CfgAccountsApi, CfgAccountsApiKey, type CfgAccountsApiKeyRegenerateCreateData, type CfgAccountsApiKeyRegenerateCreateErrors, type CfgAccountsApiKeyRegenerateCreateResponse, type CfgAccountsApiKeyRegenerateCreateResponses, type CfgAccountsApiKeyRetrieveData, type CfgAccountsApiKeyRetrieveErrors, type CfgAccountsApiKeyRetrieveResponse, type CfgAccountsApiKeyRetrieveResponses, type CfgAccountsApiKeyTestCreateData, type CfgAccountsApiKeyTestCreateResponse, type CfgAccountsApiKeyTestCreateResponses, CfgAccountsAuth, CfgAccountsOauth, type CfgAccountsOauthConnectionsListData, type CfgAccountsOauthConnectionsListResponse, type CfgAccountsOauthConnectionsListResponses, type CfgAccountsOauthConnectionsResponse200AutoRef, type CfgAccountsOauthDisconnectCreateData, type CfgAccountsOauthDisconnectCreateError, type CfgAccountsOauthDisconnectCreateErrors, type CfgAccountsOauthDisconnectCreateResponse, type CfgAccountsOauthDisconnectCreateResponses, type CfgAccountsOauthDisconnectResponse200AutoRef, type CfgAccountsOauthGithubAuthorizeCreateData, type CfgAccountsOauthGithubAuthorizeCreateError, type CfgAccountsOauthGithubAuthorizeCreateErrors, type CfgAccountsOauthGithubAuthorizeCreateResponse, type CfgAccountsOauthGithubAuthorizeCreateResponses, type CfgAccountsOauthGithubCallbackCreateData, type CfgAccountsOauthGithubCallbackCreateError, type CfgAccountsOauthGithubCallbackCreateErrors, type CfgAccountsOauthGithubCallbackCreateResponse, type CfgAccountsOauthGithubCallbackCreateResponses, type CfgAccountsOauthProvidersRetrieveData, type CfgAccountsOauthProvidersRetrieveResponse, type CfgAccountsOauthProvidersRetrieveResponses, type CfgAccountsOtpRequestCreateData, type CfgAccountsOtpRequestCreateError, type CfgAccountsOtpRequestCreateErrors, type CfgAccountsOtpRequestCreateResponse, type CfgAccountsOtpRequestCreateResponses, type CfgAccountsOtpVerifyCreateData, type CfgAccountsOtpVerifyCreateError, type CfgAccountsOtpVerifyCreateErrors, type CfgAccountsOtpVerifyCreateResponse, type CfgAccountsOtpVerifyCreateResponses, CfgAccountsProfile, type CfgAccountsProfileAvatarCreateData, type CfgAccountsProfileAvatarCreateErrors, type CfgAccountsProfileAvatarCreateResponse, type CfgAccountsProfileAvatarCreateResponses, type CfgAccountsProfileDeleteCreateData, type CfgAccountsProfileDeleteCreateErrors, type CfgAccountsProfileDeleteCreateResponse, type CfgAccountsProfileDeleteCreateResponses, type CfgAccountsProfilePartialPartialUpdateData, type CfgAccountsProfilePartialPartialUpdateErrors, type CfgAccountsProfilePartialPartialUpdateResponse, type CfgAccountsProfilePartialPartialUpdateResponses, type CfgAccountsProfilePartialUpdateData, type CfgAccountsProfilePartialUpdateErrors, type CfgAccountsProfilePartialUpdateResponse, type CfgAccountsProfilePartialUpdateResponses, type CfgAccountsProfileRetrieveData, type CfgAccountsProfileRetrieveErrors, type CfgAccountsProfileRetrieveResponse, type CfgAccountsProfileRetrieveResponses, type CfgAccountsProfileUpdatePartialUpdateData, type CfgAccountsProfileUpdatePartialUpdateErrors, type CfgAccountsProfileUpdatePartialUpdateResponse, type CfgAccountsProfileUpdatePartialUpdateResponses, type CfgAccountsProfileUpdateUpdateData, type CfgAccountsProfileUpdateUpdateErrors, type CfgAccountsProfileUpdateUpdateResponse, type CfgAccountsProfileUpdateUpdateResponses, type CfgAccountsTokenRefreshCreateData, type CfgAccountsTokenRefreshCreateResponse, type CfgAccountsTokenRefreshCreateResponses, CfgCentrifugo, API$1 as CfgCentrifugoAPI, CfgCentrifugoApi, type CfgCentrifugoAuthTokenRetrieveData, type CfgCentrifugoAuthTokenRetrieveErrors, type CfgCentrifugoAuthTokenRetrieveResponse, type CfgCentrifugoAuthTokenRetrieveResponses, CfgTotp, API as CfgTotpAPI, CfgTotpApi, CfgTotpBackupCodes, type CfgTotpBackupCodesRegenerateCreateData, type CfgTotpBackupCodesRegenerateCreateErrors, type CfgTotpBackupCodesRegenerateCreateResponse, type CfgTotpBackupCodesRegenerateCreateResponses, type CfgTotpBackupCodesRetrieveData, type CfgTotpBackupCodesRetrieveResponse, type CfgTotpBackupCodesRetrieveResponses, type CfgTotpDevicesDestroyData, type CfgTotpDevicesDestroyResponse, type CfgTotpDevicesDestroyResponses, type CfgTotpDevicesRetrieveData, type CfgTotpDevicesRetrieveResponse, type CfgTotpDevicesRetrieveResponses, type CfgTotpDisableCreateData, type CfgTotpDisableCreateErrors, type CfgTotpDisableCreateResponse, type CfgTotpDisableCreateResponses, type CfgTotpDisableResponse200AutoRef, CfgTotpSetup, type CfgTotpSetupConfirmCreateData, type CfgTotpSetupConfirmCreateErrors, type CfgTotpSetupConfirmCreateResponse, type CfgTotpSetupConfirmCreateResponses, type CfgTotpSetupCreateData, type CfgTotpSetupCreateErrors, type CfgTotpSetupCreateResponse, type CfgTotpSetupCreateResponses, CfgTotpVerify, type CfgTotpVerifyBackupCreateData, type CfgTotpVerifyBackupCreateErrors, type CfgTotpVerifyBackupCreateResponse, type CfgTotpVerifyBackupCreateResponses, type CfgTotpVerifyCreateData, type CfgTotpVerifyCreateErrors, type CfgTotpVerifyCreateResponse, type CfgTotpVerifyCreateResponses, type CfgUserUpdateRequest, type ClientOptions, type ConfirmSetupRequest, type ConfirmSetupResponse, type ConnectionTokenResponse, CookieStorageAdapter, type DeviceList, type DeviceListResponse, type DeviceListResponseWritable, DeviceStatusEnum, type DisableRequest, type ErrorLog, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, NetworkError, type OAuthAuthorizeRequestRequest, type OAuthAuthorizeResponse, type OAuthCallbackRequestRequest, type OAuthConnection, type OAuthDisconnectRequestRequest, type OAuthError, OAuthProviderEnum, type OAuthProvidersResponse, type OAuthTokenResponse, type OtpErrorResponse, type OtpRequestRequest, type OtpRequestResponse, type OtpVerifyRequest, type OtpVerifyResponse, type OtpVerifyResponseWritable, type PatchedCfgUserUpdateRequest, type RequestLog, type ResponseLog, type SetupRequest, type SetupResponse, type StorageAdapter, type TokenRefresh, type TokenRefreshRequest, type TokenRefreshWritable, types_gen$1 as TotpTypes, type TotpVerifyUser, type TotpVerifyUserWritable, type User, type UserWritable, type ValidationErrorDetail, type ValidationErrorEvent, type VerifyBackupRequest, type VerifyRequest, type VerifyResponse, type VerifyResponseWritable, CfgAccountsApi as api, auth, defaultLogger, dispatchValidationError, formatZodError, onValidationError };
|
package/dist/index.d.ts
CHANGED
|
@@ -412,7 +412,7 @@ interface ClientOptions$1 {
|
|
|
412
412
|
throwOnError?: boolean;
|
|
413
413
|
}
|
|
414
414
|
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
415
|
-
type SseFn = <TData = unknown,
|
|
415
|
+
type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
|
|
416
416
|
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
417
417
|
type BuildUrlFn = <TData extends {
|
|
418
418
|
body?: unknown;
|
|
@@ -2648,4 +2648,4 @@ declare namespace types_gen {
|
|
|
2648
2648
|
export { type types_gen_AccountDeleteResponse as AccountDeleteResponse, type types_gen_ApiKey as ApiKey, type types_gen_ApiKeyRegenerate as ApiKeyRegenerate, type types_gen_ApiKeyRequest as ApiKeyRequest, type types_gen_ApiKeyTestRequest as ApiKeyTestRequest, type types_gen_ApiKeyTestResult as ApiKeyTestResult, type types_gen_BackupCodesRegenerateRequest as BackupCodesRegenerateRequest, type types_gen_BackupCodesRegenerateResponse as BackupCodesRegenerateResponse, type types_gen_BackupCodesStatus as BackupCodesStatus, type types_gen_CentrifugoToken as CentrifugoToken, type types_gen_CfgAccountsApiKeyRegenerateCreateData as CfgAccountsApiKeyRegenerateCreateData, type types_gen_CfgAccountsApiKeyRegenerateCreateErrors as CfgAccountsApiKeyRegenerateCreateErrors, type types_gen_CfgAccountsApiKeyRegenerateCreateResponse as CfgAccountsApiKeyRegenerateCreateResponse, type types_gen_CfgAccountsApiKeyRegenerateCreateResponses as CfgAccountsApiKeyRegenerateCreateResponses, type types_gen_CfgAccountsApiKeyRetrieveData as CfgAccountsApiKeyRetrieveData, type types_gen_CfgAccountsApiKeyRetrieveErrors as CfgAccountsApiKeyRetrieveErrors, type types_gen_CfgAccountsApiKeyRetrieveResponse as CfgAccountsApiKeyRetrieveResponse, type types_gen_CfgAccountsApiKeyRetrieveResponses as CfgAccountsApiKeyRetrieveResponses, type types_gen_CfgAccountsApiKeyTestCreateData as CfgAccountsApiKeyTestCreateData, type types_gen_CfgAccountsApiKeyTestCreateResponse as CfgAccountsApiKeyTestCreateResponse, type types_gen_CfgAccountsApiKeyTestCreateResponses as CfgAccountsApiKeyTestCreateResponses, type types_gen_CfgAccountsOauthConnectionsListData as CfgAccountsOauthConnectionsListData, type types_gen_CfgAccountsOauthConnectionsListResponse as CfgAccountsOauthConnectionsListResponse, type types_gen_CfgAccountsOauthConnectionsListResponses as CfgAccountsOauthConnectionsListResponses, type types_gen_CfgAccountsOauthConnectionsResponse200AutoRef as CfgAccountsOauthConnectionsResponse200AutoRef, type types_gen_CfgAccountsOauthDisconnectCreateData as CfgAccountsOauthDisconnectCreateData, type types_gen_CfgAccountsOauthDisconnectCreateError as CfgAccountsOauthDisconnectCreateError, type types_gen_CfgAccountsOauthDisconnectCreateErrors as CfgAccountsOauthDisconnectCreateErrors, type types_gen_CfgAccountsOauthDisconnectCreateResponse as CfgAccountsOauthDisconnectCreateResponse, type types_gen_CfgAccountsOauthDisconnectCreateResponses as CfgAccountsOauthDisconnectCreateResponses, type types_gen_CfgAccountsOauthDisconnectResponse200AutoRef as CfgAccountsOauthDisconnectResponse200AutoRef, type types_gen_CfgAccountsOauthGithubAuthorizeCreateData as CfgAccountsOauthGithubAuthorizeCreateData, type types_gen_CfgAccountsOauthGithubAuthorizeCreateError as CfgAccountsOauthGithubAuthorizeCreateError, type types_gen_CfgAccountsOauthGithubAuthorizeCreateErrors as CfgAccountsOauthGithubAuthorizeCreateErrors, type types_gen_CfgAccountsOauthGithubAuthorizeCreateResponse as CfgAccountsOauthGithubAuthorizeCreateResponse, type types_gen_CfgAccountsOauthGithubAuthorizeCreateResponses as CfgAccountsOauthGithubAuthorizeCreateResponses, type types_gen_CfgAccountsOauthGithubCallbackCreateData as CfgAccountsOauthGithubCallbackCreateData, type types_gen_CfgAccountsOauthGithubCallbackCreateError as CfgAccountsOauthGithubCallbackCreateError, type types_gen_CfgAccountsOauthGithubCallbackCreateErrors as CfgAccountsOauthGithubCallbackCreateErrors, type types_gen_CfgAccountsOauthGithubCallbackCreateResponse as CfgAccountsOauthGithubCallbackCreateResponse, type types_gen_CfgAccountsOauthGithubCallbackCreateResponses as CfgAccountsOauthGithubCallbackCreateResponses, type types_gen_CfgAccountsOauthProvidersRetrieveData as CfgAccountsOauthProvidersRetrieveData, type types_gen_CfgAccountsOauthProvidersRetrieveResponse as CfgAccountsOauthProvidersRetrieveResponse, type types_gen_CfgAccountsOauthProvidersRetrieveResponses as CfgAccountsOauthProvidersRetrieveResponses, type types_gen_CfgAccountsOtpRequestCreateData as CfgAccountsOtpRequestCreateData, type types_gen_CfgAccountsOtpRequestCreateError as CfgAccountsOtpRequestCreateError, type types_gen_CfgAccountsOtpRequestCreateErrors as CfgAccountsOtpRequestCreateErrors, type types_gen_CfgAccountsOtpRequestCreateResponse as CfgAccountsOtpRequestCreateResponse, type types_gen_CfgAccountsOtpRequestCreateResponses as CfgAccountsOtpRequestCreateResponses, type types_gen_CfgAccountsOtpVerifyCreateData as CfgAccountsOtpVerifyCreateData, type types_gen_CfgAccountsOtpVerifyCreateError as CfgAccountsOtpVerifyCreateError, type types_gen_CfgAccountsOtpVerifyCreateErrors as CfgAccountsOtpVerifyCreateErrors, type types_gen_CfgAccountsOtpVerifyCreateResponse as CfgAccountsOtpVerifyCreateResponse, type types_gen_CfgAccountsOtpVerifyCreateResponses as CfgAccountsOtpVerifyCreateResponses, type types_gen_CfgAccountsProfileAvatarCreateData as CfgAccountsProfileAvatarCreateData, type types_gen_CfgAccountsProfileAvatarCreateErrors as CfgAccountsProfileAvatarCreateErrors, type types_gen_CfgAccountsProfileAvatarCreateResponse as CfgAccountsProfileAvatarCreateResponse, type types_gen_CfgAccountsProfileAvatarCreateResponses as CfgAccountsProfileAvatarCreateResponses, type types_gen_CfgAccountsProfileDeleteCreateData as CfgAccountsProfileDeleteCreateData, type types_gen_CfgAccountsProfileDeleteCreateErrors as CfgAccountsProfileDeleteCreateErrors, type types_gen_CfgAccountsProfileDeleteCreateResponse as CfgAccountsProfileDeleteCreateResponse, type types_gen_CfgAccountsProfileDeleteCreateResponses as CfgAccountsProfileDeleteCreateResponses, type types_gen_CfgAccountsProfilePartialPartialUpdateData as CfgAccountsProfilePartialPartialUpdateData, type types_gen_CfgAccountsProfilePartialPartialUpdateErrors as CfgAccountsProfilePartialPartialUpdateErrors, type types_gen_CfgAccountsProfilePartialPartialUpdateResponse as CfgAccountsProfilePartialPartialUpdateResponse, type types_gen_CfgAccountsProfilePartialPartialUpdateResponses as CfgAccountsProfilePartialPartialUpdateResponses, type types_gen_CfgAccountsProfilePartialUpdateData as CfgAccountsProfilePartialUpdateData, type types_gen_CfgAccountsProfilePartialUpdateErrors as CfgAccountsProfilePartialUpdateErrors, type types_gen_CfgAccountsProfilePartialUpdateResponse as CfgAccountsProfilePartialUpdateResponse, type types_gen_CfgAccountsProfilePartialUpdateResponses as CfgAccountsProfilePartialUpdateResponses, type types_gen_CfgAccountsProfileRetrieveData as CfgAccountsProfileRetrieveData, type types_gen_CfgAccountsProfileRetrieveErrors as CfgAccountsProfileRetrieveErrors, type types_gen_CfgAccountsProfileRetrieveResponse as CfgAccountsProfileRetrieveResponse, type types_gen_CfgAccountsProfileRetrieveResponses as CfgAccountsProfileRetrieveResponses, type types_gen_CfgAccountsProfileUpdatePartialUpdateData as CfgAccountsProfileUpdatePartialUpdateData, type types_gen_CfgAccountsProfileUpdatePartialUpdateErrors as CfgAccountsProfileUpdatePartialUpdateErrors, type types_gen_CfgAccountsProfileUpdatePartialUpdateResponse as CfgAccountsProfileUpdatePartialUpdateResponse, type types_gen_CfgAccountsProfileUpdatePartialUpdateResponses as CfgAccountsProfileUpdatePartialUpdateResponses, type types_gen_CfgAccountsProfileUpdateUpdateData as CfgAccountsProfileUpdateUpdateData, type types_gen_CfgAccountsProfileUpdateUpdateErrors as CfgAccountsProfileUpdateUpdateErrors, type types_gen_CfgAccountsProfileUpdateUpdateResponse as CfgAccountsProfileUpdateUpdateResponse, type types_gen_CfgAccountsProfileUpdateUpdateResponses as CfgAccountsProfileUpdateUpdateResponses, type types_gen_CfgAccountsTokenRefreshCreateData as CfgAccountsTokenRefreshCreateData, type types_gen_CfgAccountsTokenRefreshCreateResponse as CfgAccountsTokenRefreshCreateResponse, type types_gen_CfgAccountsTokenRefreshCreateResponses as CfgAccountsTokenRefreshCreateResponses, type types_gen_CfgCentrifugoAuthTokenRetrieveData as CfgCentrifugoAuthTokenRetrieveData, type types_gen_CfgCentrifugoAuthTokenRetrieveErrors as CfgCentrifugoAuthTokenRetrieveErrors, type types_gen_CfgCentrifugoAuthTokenRetrieveResponse as CfgCentrifugoAuthTokenRetrieveResponse, type types_gen_CfgCentrifugoAuthTokenRetrieveResponses as CfgCentrifugoAuthTokenRetrieveResponses, type types_gen_CfgTotpBackupCodesRegenerateCreateData as CfgTotpBackupCodesRegenerateCreateData, type types_gen_CfgTotpBackupCodesRegenerateCreateErrors as CfgTotpBackupCodesRegenerateCreateErrors, type types_gen_CfgTotpBackupCodesRegenerateCreateResponse as CfgTotpBackupCodesRegenerateCreateResponse, type types_gen_CfgTotpBackupCodesRegenerateCreateResponses as CfgTotpBackupCodesRegenerateCreateResponses, type types_gen_CfgTotpBackupCodesRetrieveData as CfgTotpBackupCodesRetrieveData, type types_gen_CfgTotpBackupCodesRetrieveResponse as CfgTotpBackupCodesRetrieveResponse, type types_gen_CfgTotpBackupCodesRetrieveResponses as CfgTotpBackupCodesRetrieveResponses, type types_gen_CfgTotpDevicesDestroyData as CfgTotpDevicesDestroyData, type types_gen_CfgTotpDevicesDestroyResponse as CfgTotpDevicesDestroyResponse, type types_gen_CfgTotpDevicesDestroyResponses as CfgTotpDevicesDestroyResponses, type types_gen_CfgTotpDevicesRetrieveData as CfgTotpDevicesRetrieveData, type types_gen_CfgTotpDevicesRetrieveResponse as CfgTotpDevicesRetrieveResponse, type types_gen_CfgTotpDevicesRetrieveResponses as CfgTotpDevicesRetrieveResponses, type types_gen_CfgTotpDisableCreateData as CfgTotpDisableCreateData, type types_gen_CfgTotpDisableCreateErrors as CfgTotpDisableCreateErrors, type types_gen_CfgTotpDisableCreateResponse as CfgTotpDisableCreateResponse, type types_gen_CfgTotpDisableCreateResponses as CfgTotpDisableCreateResponses, type types_gen_CfgTotpDisableResponse200AutoRef as CfgTotpDisableResponse200AutoRef, type types_gen_CfgTotpSetupConfirmCreateData as CfgTotpSetupConfirmCreateData, type types_gen_CfgTotpSetupConfirmCreateErrors as CfgTotpSetupConfirmCreateErrors, type types_gen_CfgTotpSetupConfirmCreateResponse as CfgTotpSetupConfirmCreateResponse, type types_gen_CfgTotpSetupConfirmCreateResponses as CfgTotpSetupConfirmCreateResponses, type types_gen_CfgTotpSetupCreateData as CfgTotpSetupCreateData, type types_gen_CfgTotpSetupCreateErrors as CfgTotpSetupCreateErrors, type types_gen_CfgTotpSetupCreateResponse as CfgTotpSetupCreateResponse, type types_gen_CfgTotpSetupCreateResponses as CfgTotpSetupCreateResponses, type types_gen_CfgTotpVerifyBackupCreateData as CfgTotpVerifyBackupCreateData, type types_gen_CfgTotpVerifyBackupCreateErrors as CfgTotpVerifyBackupCreateErrors, type types_gen_CfgTotpVerifyBackupCreateResponse as CfgTotpVerifyBackupCreateResponse, type types_gen_CfgTotpVerifyBackupCreateResponses as CfgTotpVerifyBackupCreateResponses, type types_gen_CfgTotpVerifyCreateData as CfgTotpVerifyCreateData, type types_gen_CfgTotpVerifyCreateErrors as CfgTotpVerifyCreateErrors, type types_gen_CfgTotpVerifyCreateResponse as CfgTotpVerifyCreateResponse, type types_gen_CfgTotpVerifyCreateResponses as CfgTotpVerifyCreateResponses, type types_gen_CfgUserUpdateRequest as CfgUserUpdateRequest, type types_gen_ClientOptions as ClientOptions, type types_gen_ConfirmSetupRequest as ConfirmSetupRequest, type types_gen_ConfirmSetupResponse as ConfirmSetupResponse, type types_gen_ConnectionTokenResponse as ConnectionTokenResponse, type types_gen_DeviceList as DeviceList, type types_gen_DeviceListResponse as DeviceListResponse, type types_gen_DeviceListResponseWritable as DeviceListResponseWritable, types_gen_DeviceStatusEnum as DeviceStatusEnum, type types_gen_DisableRequest as DisableRequest, type types_gen_OAuthAuthorizeRequestRequest as OAuthAuthorizeRequestRequest, type types_gen_OAuthAuthorizeResponse as OAuthAuthorizeResponse, type types_gen_OAuthCallbackRequestRequest as OAuthCallbackRequestRequest, type types_gen_OAuthConnection as OAuthConnection, type types_gen_OAuthDisconnectRequestRequest as OAuthDisconnectRequestRequest, type types_gen_OAuthError as OAuthError, types_gen_OAuthProviderEnum as OAuthProviderEnum, type types_gen_OAuthProvidersResponse as OAuthProvidersResponse, type types_gen_OAuthTokenResponse as OAuthTokenResponse, type types_gen_OtpErrorResponse as OtpErrorResponse, type types_gen_OtpRequestRequest as OtpRequestRequest, type types_gen_OtpRequestResponse as OtpRequestResponse, type types_gen_OtpVerifyRequest as OtpVerifyRequest, type types_gen_OtpVerifyResponse as OtpVerifyResponse, type types_gen_OtpVerifyResponseWritable as OtpVerifyResponseWritable, type types_gen_PatchedCfgUserUpdateRequest as PatchedCfgUserUpdateRequest, type types_gen_SetupRequest as SetupRequest, type types_gen_SetupResponse as SetupResponse, type types_gen_TokenRefresh as TokenRefresh, type types_gen_TokenRefreshRequest as TokenRefreshRequest, type types_gen_TokenRefreshWritable as TokenRefreshWritable, type types_gen_TotpVerifyUser as TotpVerifyUser, type types_gen_TotpVerifyUserWritable as TotpVerifyUserWritable, type types_gen_User as User, type types_gen_UserWritable as UserWritable, type types_gen_VerifyBackupRequest as VerifyBackupRequest, type types_gen_VerifyRequest as VerifyRequest, type types_gen_VerifyResponse as VerifyResponse, type types_gen_VerifyResponseWritable as VerifyResponseWritable };
|
|
2649
2649
|
}
|
|
2650
2650
|
|
|
2651
|
-
export { APIError, APILogger, types_gen$2 as AccountsTypes, type Auth$1 as Auth, types_gen as CentrifugoTypes, CfgAccounts, API$2 as CfgAccountsAPI, CfgAccountsApi, CfgAccountsApiKey, CfgAccountsAuth, CfgAccountsOauth, CfgAccountsProfile, CfgCentrifugo, API$1 as CfgCentrifugoAPI, CfgCentrifugoApi, CfgTotp, API as CfgTotpAPI, CfgTotpApi, CfgTotpBackupCodes, CfgTotpSetup, CfgTotpVerify, CookieStorageAdapter, type ErrorLog, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, NetworkError, type RequestLog, type ResponseLog, type StorageAdapter, types_gen$1 as TotpTypes, type User, type ValidationErrorDetail, type ValidationErrorEvent, CfgAccountsApi as api, auth, defaultLogger, dispatchValidationError, formatZodError, onValidationError };
|
|
2651
|
+
export { APIError, APILogger, type AccountDeleteResponse, types_gen$2 as AccountsTypes, type ApiKey, type ApiKeyRegenerate, type ApiKeyRequest, type ApiKeyTestRequest, type ApiKeyTestResult, type Auth$1 as Auth, type BackupCodesRegenerateRequest, type BackupCodesRegenerateResponse, type BackupCodesStatus, type CentrifugoToken, types_gen as CentrifugoTypes, CfgAccounts, API$2 as CfgAccountsAPI, CfgAccountsApi, CfgAccountsApiKey, type CfgAccountsApiKeyRegenerateCreateData, type CfgAccountsApiKeyRegenerateCreateErrors, type CfgAccountsApiKeyRegenerateCreateResponse, type CfgAccountsApiKeyRegenerateCreateResponses, type CfgAccountsApiKeyRetrieveData, type CfgAccountsApiKeyRetrieveErrors, type CfgAccountsApiKeyRetrieveResponse, type CfgAccountsApiKeyRetrieveResponses, type CfgAccountsApiKeyTestCreateData, type CfgAccountsApiKeyTestCreateResponse, type CfgAccountsApiKeyTestCreateResponses, CfgAccountsAuth, CfgAccountsOauth, type CfgAccountsOauthConnectionsListData, type CfgAccountsOauthConnectionsListResponse, type CfgAccountsOauthConnectionsListResponses, type CfgAccountsOauthConnectionsResponse200AutoRef, type CfgAccountsOauthDisconnectCreateData, type CfgAccountsOauthDisconnectCreateError, type CfgAccountsOauthDisconnectCreateErrors, type CfgAccountsOauthDisconnectCreateResponse, type CfgAccountsOauthDisconnectCreateResponses, type CfgAccountsOauthDisconnectResponse200AutoRef, type CfgAccountsOauthGithubAuthorizeCreateData, type CfgAccountsOauthGithubAuthorizeCreateError, type CfgAccountsOauthGithubAuthorizeCreateErrors, type CfgAccountsOauthGithubAuthorizeCreateResponse, type CfgAccountsOauthGithubAuthorizeCreateResponses, type CfgAccountsOauthGithubCallbackCreateData, type CfgAccountsOauthGithubCallbackCreateError, type CfgAccountsOauthGithubCallbackCreateErrors, type CfgAccountsOauthGithubCallbackCreateResponse, type CfgAccountsOauthGithubCallbackCreateResponses, type CfgAccountsOauthProvidersRetrieveData, type CfgAccountsOauthProvidersRetrieveResponse, type CfgAccountsOauthProvidersRetrieveResponses, type CfgAccountsOtpRequestCreateData, type CfgAccountsOtpRequestCreateError, type CfgAccountsOtpRequestCreateErrors, type CfgAccountsOtpRequestCreateResponse, type CfgAccountsOtpRequestCreateResponses, type CfgAccountsOtpVerifyCreateData, type CfgAccountsOtpVerifyCreateError, type CfgAccountsOtpVerifyCreateErrors, type CfgAccountsOtpVerifyCreateResponse, type CfgAccountsOtpVerifyCreateResponses, CfgAccountsProfile, type CfgAccountsProfileAvatarCreateData, type CfgAccountsProfileAvatarCreateErrors, type CfgAccountsProfileAvatarCreateResponse, type CfgAccountsProfileAvatarCreateResponses, type CfgAccountsProfileDeleteCreateData, type CfgAccountsProfileDeleteCreateErrors, type CfgAccountsProfileDeleteCreateResponse, type CfgAccountsProfileDeleteCreateResponses, type CfgAccountsProfilePartialPartialUpdateData, type CfgAccountsProfilePartialPartialUpdateErrors, type CfgAccountsProfilePartialPartialUpdateResponse, type CfgAccountsProfilePartialPartialUpdateResponses, type CfgAccountsProfilePartialUpdateData, type CfgAccountsProfilePartialUpdateErrors, type CfgAccountsProfilePartialUpdateResponse, type CfgAccountsProfilePartialUpdateResponses, type CfgAccountsProfileRetrieveData, type CfgAccountsProfileRetrieveErrors, type CfgAccountsProfileRetrieveResponse, type CfgAccountsProfileRetrieveResponses, type CfgAccountsProfileUpdatePartialUpdateData, type CfgAccountsProfileUpdatePartialUpdateErrors, type CfgAccountsProfileUpdatePartialUpdateResponse, type CfgAccountsProfileUpdatePartialUpdateResponses, type CfgAccountsProfileUpdateUpdateData, type CfgAccountsProfileUpdateUpdateErrors, type CfgAccountsProfileUpdateUpdateResponse, type CfgAccountsProfileUpdateUpdateResponses, type CfgAccountsTokenRefreshCreateData, type CfgAccountsTokenRefreshCreateResponse, type CfgAccountsTokenRefreshCreateResponses, CfgCentrifugo, API$1 as CfgCentrifugoAPI, CfgCentrifugoApi, type CfgCentrifugoAuthTokenRetrieveData, type CfgCentrifugoAuthTokenRetrieveErrors, type CfgCentrifugoAuthTokenRetrieveResponse, type CfgCentrifugoAuthTokenRetrieveResponses, CfgTotp, API as CfgTotpAPI, CfgTotpApi, CfgTotpBackupCodes, type CfgTotpBackupCodesRegenerateCreateData, type CfgTotpBackupCodesRegenerateCreateErrors, type CfgTotpBackupCodesRegenerateCreateResponse, type CfgTotpBackupCodesRegenerateCreateResponses, type CfgTotpBackupCodesRetrieveData, type CfgTotpBackupCodesRetrieveResponse, type CfgTotpBackupCodesRetrieveResponses, type CfgTotpDevicesDestroyData, type CfgTotpDevicesDestroyResponse, type CfgTotpDevicesDestroyResponses, type CfgTotpDevicesRetrieveData, type CfgTotpDevicesRetrieveResponse, type CfgTotpDevicesRetrieveResponses, type CfgTotpDisableCreateData, type CfgTotpDisableCreateErrors, type CfgTotpDisableCreateResponse, type CfgTotpDisableCreateResponses, type CfgTotpDisableResponse200AutoRef, CfgTotpSetup, type CfgTotpSetupConfirmCreateData, type CfgTotpSetupConfirmCreateErrors, type CfgTotpSetupConfirmCreateResponse, type CfgTotpSetupConfirmCreateResponses, type CfgTotpSetupCreateData, type CfgTotpSetupCreateErrors, type CfgTotpSetupCreateResponse, type CfgTotpSetupCreateResponses, CfgTotpVerify, type CfgTotpVerifyBackupCreateData, type CfgTotpVerifyBackupCreateErrors, type CfgTotpVerifyBackupCreateResponse, type CfgTotpVerifyBackupCreateResponses, type CfgTotpVerifyCreateData, type CfgTotpVerifyCreateErrors, type CfgTotpVerifyCreateResponse, type CfgTotpVerifyCreateResponses, type CfgUserUpdateRequest, type ClientOptions, type ConfirmSetupRequest, type ConfirmSetupResponse, type ConnectionTokenResponse, CookieStorageAdapter, type DeviceList, type DeviceListResponse, type DeviceListResponseWritable, DeviceStatusEnum, type DisableRequest, type ErrorLog, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, NetworkError, type OAuthAuthorizeRequestRequest, type OAuthAuthorizeResponse, type OAuthCallbackRequestRequest, type OAuthConnection, type OAuthDisconnectRequestRequest, type OAuthError, OAuthProviderEnum, type OAuthProvidersResponse, type OAuthTokenResponse, type OtpErrorResponse, type OtpRequestRequest, type OtpRequestResponse, type OtpVerifyRequest, type OtpVerifyResponse, type OtpVerifyResponseWritable, type PatchedCfgUserUpdateRequest, type RequestLog, type ResponseLog, type SetupRequest, type SetupResponse, type StorageAdapter, type TokenRefresh, type TokenRefreshRequest, type TokenRefreshWritable, types_gen$1 as TotpTypes, type TotpVerifyUser, type TotpVerifyUserWritable, type User, type UserWritable, type ValidationErrorDetail, type ValidationErrorEvent, type VerifyBackupRequest, type VerifyRequest, type VerifyResponse, type VerifyResponseWritable, CfgAccountsApi as api, auth, defaultLogger, dispatchValidationError, formatZodError, onValidationError };
|
package/dist/index.mjs
CHANGED
|
@@ -139,6 +139,18 @@ function detectLocale() {
|
|
|
139
139
|
}
|
|
140
140
|
__name(detectLocale, "detectLocale");
|
|
141
141
|
function defaultBaseUrl() {
|
|
142
|
+
if (typeof window !== "undefined") {
|
|
143
|
+
try {
|
|
144
|
+
if (typeof process !== "undefined" && process.env) {
|
|
145
|
+
if (process.env.NEXT_PUBLIC_STATIC_BUILD === "true") return "";
|
|
146
|
+
if (process.env.NEXT_PUBLIC_API_PROXY_URL !== void 0)
|
|
147
|
+
return process.env.NEXT_PUBLIC_API_PROXY_URL;
|
|
148
|
+
return process.env.NEXT_PUBLIC_API_URL || "";
|
|
149
|
+
}
|
|
150
|
+
} catch {
|
|
151
|
+
}
|
|
152
|
+
return "";
|
|
153
|
+
}
|
|
142
154
|
try {
|
|
143
155
|
if (typeof process !== "undefined" && process.env) {
|
|
144
156
|
if (process.env.NEXT_PUBLIC_STATIC_BUILD === "true") return "";
|
|
@@ -150,7 +162,6 @@ function defaultBaseUrl() {
|
|
|
150
162
|
}
|
|
151
163
|
__name(defaultBaseUrl, "defaultBaseUrl");
|
|
152
164
|
function defaultApiKey() {
|
|
153
|
-
if (isBrowser) return null;
|
|
154
165
|
try {
|
|
155
166
|
if (typeof process !== "undefined" && process.env?.NEXT_PUBLIC_API_KEY) {
|
|
156
167
|
return process.env.NEXT_PUBLIC_API_KEY;
|
|
@@ -306,7 +317,7 @@ function installAuthOnClient(client2) {
|
|
|
306
317
|
const locale = auth.getLocale();
|
|
307
318
|
if (locale) request.headers.set("Accept-Language", locale);
|
|
308
319
|
const apiKey = auth.getApiKey();
|
|
309
|
-
if (apiKey) request.headers.set("X-API-Key", apiKey);
|
|
320
|
+
if (apiKey && !request.headers.has("X-API-Key")) request.headers.set("X-API-Key", apiKey);
|
|
310
321
|
try {
|
|
311
322
|
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
312
323
|
if (tz) request.headers.set("X-Timezone", tz);
|
|
@@ -945,11 +956,8 @@ var checkForExistence = /* @__PURE__ */ __name((options, name) => {
|
|
|
945
956
|
}
|
|
946
957
|
return false;
|
|
947
958
|
}, "checkForExistence");
|
|
948
|
-
|
|
949
|
-
security
|
|
950
|
-
...options
|
|
951
|
-
}) => {
|
|
952
|
-
for (const auth2 of security) {
|
|
959
|
+
async function setAuthParams(options) {
|
|
960
|
+
for (const auth2 of options.security ?? []) {
|
|
953
961
|
if (checkForExistence(options, auth2.name)) {
|
|
954
962
|
continue;
|
|
955
963
|
}
|
|
@@ -974,7 +982,8 @@ var setAuthParams = /* @__PURE__ */ __name(async ({
|
|
|
974
982
|
break;
|
|
975
983
|
}
|
|
976
984
|
}
|
|
977
|
-
}
|
|
985
|
+
}
|
|
986
|
+
__name(setAuthParams, "setAuthParams");
|
|
978
987
|
var buildUrl = /* @__PURE__ */ __name((options) => getUrl({
|
|
979
988
|
baseUrl: options.baseUrl,
|
|
980
989
|
path: options.path,
|
|
@@ -1103,10 +1112,7 @@ var createClient = /* @__PURE__ */ __name((config = {}) => {
|
|
|
1103
1112
|
serializedBody: void 0
|
|
1104
1113
|
};
|
|
1105
1114
|
if (opts.security) {
|
|
1106
|
-
await setAuthParams(
|
|
1107
|
-
...opts,
|
|
1108
|
-
security: opts.security
|
|
1109
|
-
});
|
|
1115
|
+
await setAuthParams(opts);
|
|
1110
1116
|
}
|
|
1111
1117
|
if (opts.requestValidator) {
|
|
1112
1118
|
await opts.requestValidator(opts);
|
|
@@ -1299,11 +1305,15 @@ var CfgAccountsApiKey = class {
|
|
|
1299
1305
|
*/
|
|
1300
1306
|
static cfgAccountsApiKeyRetrieve(options) {
|
|
1301
1307
|
return (options?.client ?? client).get({
|
|
1302
|
-
security: [
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1308
|
+
security: [
|
|
1309
|
+
{ scheme: "bearer", type: "http" },
|
|
1310
|
+
{
|
|
1311
|
+
in: "cookie",
|
|
1312
|
+
name: "sessionid",
|
|
1313
|
+
type: "apiKey"
|
|
1314
|
+
},
|
|
1315
|
+
{ name: "X-API-Key", type: "apiKey" }
|
|
1316
|
+
],
|
|
1307
1317
|
url: "/cfg/accounts/api-key/",
|
|
1308
1318
|
...options
|
|
1309
1319
|
});
|
|
@@ -1315,11 +1325,15 @@ var CfgAccountsApiKey = class {
|
|
|
1315
1325
|
*/
|
|
1316
1326
|
static cfgAccountsApiKeyRegenerateCreate(options) {
|
|
1317
1327
|
return (options.client ?? client).post({
|
|
1318
|
-
security: [
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1328
|
+
security: [
|
|
1329
|
+
{ scheme: "bearer", type: "http" },
|
|
1330
|
+
{
|
|
1331
|
+
in: "cookie",
|
|
1332
|
+
name: "sessionid",
|
|
1333
|
+
type: "apiKey"
|
|
1334
|
+
},
|
|
1335
|
+
{ name: "X-API-Key", type: "apiKey" }
|
|
1336
|
+
],
|
|
1323
1337
|
url: "/cfg/accounts/api-key/regenerate/",
|
|
1324
1338
|
...options,
|
|
1325
1339
|
headers: {
|
|
@@ -1335,11 +1349,15 @@ var CfgAccountsApiKey = class {
|
|
|
1335
1349
|
*/
|
|
1336
1350
|
static cfgAccountsApiKeyTestCreate(options) {
|
|
1337
1351
|
return (options.client ?? client).post({
|
|
1338
|
-
security: [
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1352
|
+
security: [
|
|
1353
|
+
{ scheme: "bearer", type: "http" },
|
|
1354
|
+
{
|
|
1355
|
+
in: "cookie",
|
|
1356
|
+
name: "sessionid",
|
|
1357
|
+
type: "apiKey"
|
|
1358
|
+
},
|
|
1359
|
+
{ name: "X-API-Key", type: "apiKey" }
|
|
1360
|
+
],
|
|
1343
1361
|
url: "/cfg/accounts/api-key/test/",
|
|
1344
1362
|
...options,
|
|
1345
1363
|
headers: {
|