@djangocfg/api 2.1.322 → 2.1.327
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 +4265 -1169
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +4265 -1159
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +4150 -3053
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +158 -209
- package/dist/auth.d.ts +158 -209
- package/dist/auth.mjs +4139 -3042
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +3932 -4031
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +2408 -2671
- package/dist/clients.d.ts +2408 -2671
- package/dist/clients.mjs +3945 -4038
- package/dist/clients.mjs.map +1 -1
- package/dist/index.cjs +4214 -2713
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2758 -1828
- package/dist/index.d.ts +2758 -1828
- package/dist/index.mjs +4183 -2676
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -7
- package/src/_api/generated/_shared/errors.ts +70 -0
- package/src/_api/generated/_shared/index.ts +25 -0
- package/src/_api/generated/_shared/logger.ts +123 -0
- package/src/_api/generated/_shared/storage.ts +83 -0
- package/src/_api/generated/_shared/validation-events.ts +52 -0
- package/src/_api/generated/cfg_accounts/api.ts +187 -0
- package/src/_api/generated/cfg_accounts/client/client.gen.ts +280 -0
- package/src/_api/generated/cfg_accounts/client/index.ts +25 -0
- package/src/_api/generated/cfg_accounts/client/types.gen.ts +217 -0
- package/src/_api/generated/cfg_accounts/client/utils.gen.ts +318 -0
- package/src/_api/generated/cfg_accounts/client.gen.ts +16 -0
- package/src/_api/generated/cfg_accounts/core/auth.gen.ts +41 -0
- package/src/_api/generated/cfg_accounts/core/bodySerializer.gen.ts +82 -0
- package/src/_api/generated/cfg_accounts/core/params.gen.ts +169 -0
- package/src/_api/generated/cfg_accounts/core/pathSerializer.gen.ts +171 -0
- package/src/_api/generated/cfg_accounts/core/queryKeySerializer.gen.ts +117 -0
- package/src/_api/generated/cfg_accounts/core/serverSentEvents.gen.ts +242 -0
- package/src/_api/generated/cfg_accounts/core/types.gen.ts +104 -0
- package/src/_api/generated/cfg_accounts/core/utils.gen.ts +140 -0
- package/src/_api/generated/cfg_accounts/events.ts +198 -0
- package/src/_api/generated/cfg_accounts/hooks/index.ts +18 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +26 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthDisconnectCreate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthGithubAuthorizeCreate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthGithubCallbackCreate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +26 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOtpRequestCreate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsOtpVerifyCreate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileAvatarCreate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileDeleteCreate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfilePartialPartialUpdate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfilePartialUpdate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +26 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileUpdatePartialUpdate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsProfileUpdateUpdate.ts +24 -0
- package/src/_api/generated/cfg_accounts/hooks/useCfgAccountsTokenRefreshCreate.ts +24 -0
- package/src/_api/generated/cfg_accounts/index.ts +26 -335
- package/src/_api/generated/cfg_accounts/schemas/AccountDeleteResponse.ts +12 -0
- package/src/_api/generated/cfg_accounts/schemas/CentrifugoToken.ts +14 -0
- package/src/_api/generated/cfg_accounts/schemas/CfgUserUpdateRequest.ts +16 -0
- package/src/_api/generated/cfg_accounts/schemas/OAuthAuthorizeRequestRequest.ts +12 -0
- package/src/_api/generated/cfg_accounts/schemas/OAuthAuthorizeResponse.ts +12 -0
- package/src/_api/generated/cfg_accounts/schemas/OAuthCallbackRequestRequest.ts +13 -0
- package/src/_api/generated/cfg_accounts/schemas/OAuthConnection.ts +19 -0
- package/src/_api/generated/cfg_accounts/schemas/OAuthDisconnectRequestRequest.ts +12 -0
- package/src/_api/generated/cfg_accounts/schemas/OAuthError.ts +12 -0
- package/src/_api/generated/cfg_accounts/schemas/OAuthProvidersResponse.ts +11 -0
- package/src/_api/generated/cfg_accounts/schemas/OAuthTokenResponse.ts +18 -0
- package/src/_api/generated/cfg_accounts/schemas/OTPErrorResponse.ts +13 -0
- package/src/_api/generated/cfg_accounts/schemas/OTPRequestRequest.ts +12 -0
- package/src/_api/generated/cfg_accounts/schemas/OTPRequestResponse.ts +11 -0
- package/src/_api/generated/cfg_accounts/schemas/OTPVerifyRequest.ts +13 -0
- package/src/_api/generated/cfg_accounts/schemas/OTPVerifyResponse.ts +17 -0
- package/src/_api/generated/cfg_accounts/schemas/PatchedCfgUserUpdateRequest.ts +16 -0
- package/src/_api/generated/cfg_accounts/schemas/ProviderEnum.ts +9 -0
- package/src/_api/generated/cfg_accounts/schemas/TokenRefresh.ts +12 -0
- package/src/_api/generated/cfg_accounts/schemas/TokenRefreshRequest.ts +11 -0
- package/src/_api/generated/cfg_accounts/{_utils/schemas/User.schema.ts → schemas/User.ts} +8 -16
- package/src/_api/generated/cfg_accounts/schemas/index.ts +24 -0
- package/src/_api/generated/cfg_accounts/sdk.gen.ts +796 -0
- package/src/_api/generated/cfg_accounts/types.gen.ts +764 -0
- package/src/_api/generated/cfg_centrifugo/api.ts +164 -0
- package/src/_api/generated/cfg_centrifugo/client/client.gen.ts +280 -0
- package/src/_api/generated/cfg_centrifugo/client/index.ts +25 -0
- package/src/_api/generated/cfg_centrifugo/client/types.gen.ts +217 -0
- package/src/_api/generated/cfg_centrifugo/client/utils.gen.ts +318 -0
- package/src/_api/generated/cfg_centrifugo/client.gen.ts +16 -0
- package/src/_api/generated/cfg_centrifugo/core/auth.gen.ts +41 -0
- package/src/_api/generated/cfg_centrifugo/core/bodySerializer.gen.ts +82 -0
- package/src/_api/generated/cfg_centrifugo/core/params.gen.ts +169 -0
- package/src/_api/generated/cfg_centrifugo/core/pathSerializer.gen.ts +171 -0
- package/src/_api/generated/cfg_centrifugo/core/queryKeySerializer.gen.ts +117 -0
- package/src/_api/generated/cfg_centrifugo/core/serverSentEvents.gen.ts +242 -0
- package/src/_api/generated/cfg_centrifugo/core/types.gen.ts +104 -0
- package/src/_api/generated/cfg_centrifugo/core/utils.gen.ts +140 -0
- package/src/_api/generated/cfg_centrifugo/events.ts +198 -0
- package/src/_api/generated/cfg_centrifugo/hooks/index.ts +4 -0
- package/src/_api/generated/cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +26 -0
- package/src/_api/generated/cfg_centrifugo/index.ts +26 -313
- package/src/_api/generated/cfg_centrifugo/schemas/ConnectionTokenResponse.ts +14 -0
- package/src/_api/generated/cfg_centrifugo/schemas/index.ts +4 -0
- package/src/_api/generated/cfg_centrifugo/sdk.gen.ts +64 -0
- package/src/_api/generated/cfg_centrifugo/types.gen.ts +61 -0
- package/src/_api/generated/cfg_totp/api.ts +181 -0
- package/src/_api/generated/cfg_totp/client/client.gen.ts +280 -0
- package/src/_api/generated/cfg_totp/client/index.ts +25 -0
- package/src/_api/generated/cfg_totp/client/types.gen.ts +217 -0
- package/src/_api/generated/cfg_totp/client/utils.gen.ts +318 -0
- package/src/_api/generated/cfg_totp/client.gen.ts +16 -0
- package/src/_api/generated/cfg_totp/core/auth.gen.ts +41 -0
- package/src/_api/generated/cfg_totp/core/bodySerializer.gen.ts +82 -0
- package/src/_api/generated/cfg_totp/core/params.gen.ts +169 -0
- package/src/_api/generated/cfg_totp/core/pathSerializer.gen.ts +171 -0
- package/src/_api/generated/cfg_totp/core/queryKeySerializer.gen.ts +117 -0
- package/src/_api/generated/cfg_totp/core/serverSentEvents.gen.ts +242 -0
- package/src/_api/generated/cfg_totp/core/types.gen.ts +104 -0
- package/src/_api/generated/cfg_totp/core/utils.gen.ts +140 -0
- package/src/_api/generated/cfg_totp/events.ts +198 -0
- package/src/_api/generated/cfg_totp/hooks/index.ts +12 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpBackupCodesRegenerateCreate.ts +24 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +26 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpDevicesDestroy.ts +24 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +26 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpDisableCreate.ts +24 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpSetupConfirmCreate.ts +24 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpSetupCreate.ts +24 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpVerifyBackupCreate.ts +24 -0
- package/src/_api/generated/cfg_totp/hooks/useCfgTotpVerifyCreate.ts +24 -0
- package/src/_api/generated/cfg_totp/index.ts +26 -342
- package/src/_api/generated/cfg_totp/schemas/BackupCodesRegenerateRequest.ts +11 -0
- package/src/_api/generated/cfg_totp/schemas/BackupCodesRegenerateResponse.ts +12 -0
- package/src/_api/generated/cfg_totp/schemas/BackupCodesStatus.ts +13 -0
- package/src/_api/generated/cfg_totp/schemas/ConfirmSetupRequest.ts +12 -0
- package/src/_api/generated/cfg_totp/schemas/ConfirmSetupResponse.ts +13 -0
- package/src/_api/generated/cfg_totp/schemas/DeviceList.ts +18 -0
- package/src/_api/generated/cfg_totp/schemas/DeviceListResponse.ts +13 -0
- package/src/_api/generated/cfg_totp/schemas/DeviceListStatusEnum.ts +9 -0
- package/src/_api/generated/cfg_totp/schemas/DisableRequest.ts +11 -0
- package/src/_api/generated/cfg_totp/schemas/SetupRequest.ts +11 -0
- package/src/_api/generated/cfg_totp/schemas/SetupResponse.ts +15 -0
- package/src/_api/generated/cfg_totp/{_utils/schemas/TotpVerifyUser.schema.ts → schemas/TotpVerifyUser.ts} +7 -15
- package/src/_api/generated/cfg_totp/schemas/VerifyBackupRequest.ts +12 -0
- package/src/_api/generated/cfg_totp/schemas/VerifyRequest.ts +12 -0
- package/src/_api/generated/cfg_totp/schemas/VerifyResponse.ts +17 -0
- package/src/_api/generated/cfg_totp/schemas/index.ts +18 -0
- package/src/_api/generated/cfg_totp/sdk.gen.ts +432 -0
- package/src/_api/generated/cfg_totp/types.gen.ts +479 -0
- package/src/_api/generated/index.ts +30 -0
- package/src/_api/index.ts +5 -23
- package/src/auth/context/AccountsContext.tsx +58 -89
- package/src/auth/context/AuthContext.tsx +3 -3
- package/src/auth/context/index.ts +2 -2
- package/src/auth/hooks/useDeleteAccount.ts +2 -1
- package/src/auth/hooks/useGithubAuth.ts +12 -11
- package/src/auth/hooks/useTokenRefresh.ts +6 -4
- package/src/auth/hooks/useTwoFactor.ts +14 -8
- package/src/auth/hooks/useTwoFactorSetup.ts +8 -5
- package/src/auth/hooks/useTwoFactorStatus.ts +3 -2
- package/src/auth/middlewares/tokenRefresh.ts +6 -4
- package/src/clients.ts +14 -51
- package/src/index.ts +15 -57
- package/src/server.ts +25 -23
- package/src/_api/BaseClient.ts +0 -22
- package/src/_api/generated/cfg_accounts/CLAUDE.md +0 -86
- package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts.ts +0 -154
- package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__auth.ts +0 -95
- package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__oauth.ts +0 -285
- package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +0 -440
- package/src/_api/generated/cfg_accounts/_utils/fetchers/index.ts +0 -33
- package/src/_api/generated/cfg_accounts/_utils/hooks/accounts.ts +0 -64
- package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__auth.ts +0 -44
- package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__oauth.ts +0 -114
- package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +0 -152
- package/src/_api/generated/cfg_accounts/_utils/hooks/index.ts +0 -33
- package/src/_api/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts +0 -20
- package/src/_api/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts +0 -22
- package/src/_api/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts +0 -15
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts +0 -20
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts +0 -20
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts +0 -21
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts +0 -27
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts +0 -20
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts +0 -20
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts +0 -19
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts +0 -46
- package/src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts +0 -41
- package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts +0 -20
- package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts +0 -19
- package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +0 -21
- package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts +0 -45
- package/src/_api/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts +0 -24
- package/src/_api/generated/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts +0 -16
- package/src/_api/generated/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts +0 -15
- package/src/_api/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts +0 -24
- package/src/_api/generated/cfg_accounts/_utils/schemas/index.ts +0 -41
- package/src/_api/generated/cfg_accounts/accounts/client.ts +0 -34
- package/src/_api/generated/cfg_accounts/accounts/index.ts +0 -4
- package/src/_api/generated/cfg_accounts/accounts/models.ts +0 -127
- package/src/_api/generated/cfg_accounts/accounts__auth/client.ts +0 -23
- package/src/_api/generated/cfg_accounts/accounts__auth/index.ts +0 -4
- package/src/_api/generated/cfg_accounts/accounts__auth/models.ts +0 -19
- package/src/_api/generated/cfg_accounts/accounts__oauth/client.ts +0 -67
- package/src/_api/generated/cfg_accounts/accounts__oauth/index.ts +0 -4
- package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +0 -127
- package/src/_api/generated/cfg_accounts/accounts__user_profile/client.ts +0 -94
- package/src/_api/generated/cfg_accounts/accounts__user_profile/index.ts +0 -4
- package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +0 -98
- package/src/_api/generated/cfg_accounts/api-instance.ts +0 -181
- package/src/_api/generated/cfg_accounts/client.ts +0 -339
- package/src/_api/generated/cfg_accounts/enums.ts +0 -10
- package/src/_api/generated/cfg_accounts/errors.ts +0 -123
- package/src/_api/generated/cfg_accounts/http.ts +0 -160
- package/src/_api/generated/cfg_accounts/logger.ts +0 -261
- package/src/_api/generated/cfg_accounts/retry.ts +0 -177
- package/src/_api/generated/cfg_accounts/schema.json +0 -1576
- package/src/_api/generated/cfg_accounts/storage.ts +0 -163
- package/src/_api/generated/cfg_accounts/validation-events.ts +0 -135
- package/src/_api/generated/cfg_centrifugo/CLAUDE.md +0 -60
- package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts +0 -94
- package/src/_api/generated/cfg_centrifugo/_utils/fetchers/index.ts +0 -30
- package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts +0 -39
- package/src/_api/generated/cfg_centrifugo/_utils/hooks/index.ts +0 -30
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/index.ts +0 -21
- package/src/_api/generated/cfg_centrifugo/api-instance.ts +0 -181
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts +0 -27
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +0 -4
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/models.ts +0 -18
- package/src/_api/generated/cfg_centrifugo/client.ts +0 -330
- package/src/_api/generated/cfg_centrifugo/errors.ts +0 -123
- package/src/_api/generated/cfg_centrifugo/http.ts +0 -160
- package/src/_api/generated/cfg_centrifugo/logger.ts +0 -261
- package/src/_api/generated/cfg_centrifugo/retry.ts +0 -177
- package/src/_api/generated/cfg_centrifugo/schema.json +0 -118
- package/src/_api/generated/cfg_centrifugo/storage.ts +0 -163
- package/src/_api/generated/cfg_centrifugo/validation-events.ts +0 -135
- package/src/_api/generated/cfg_totp/CLAUDE.md +0 -83
- package/src/_api/generated/cfg_totp/_utils/fetchers/index.ts +0 -34
- package/src/_api/generated/cfg_totp/_utils/fetchers/totp.ts +0 -50
- package/src/_api/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts +0 -153
- package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts +0 -109
- package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_setup.ts +0 -154
- package/src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_verification.ts +0 -153
- package/src/_api/generated/cfg_totp/_utils/hooks/index.ts +0 -34
- package/src/_api/generated/cfg_totp/_utils/hooks/totp.ts +0 -43
- package/src/_api/generated/cfg_totp/_utils/hooks/totp__backup_codes.ts +0 -60
- package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_management.ts +0 -59
- package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_setup.ts +0 -64
- package/src/_api/generated/cfg_totp/_utils/hooks/totp__totp_verification.ts +0 -63
- package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts +0 -19
- package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts +0 -20
- package/src/_api/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts +0 -21
- package/src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts +0 -20
- package/src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts +0 -21
- package/src/_api/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts +0 -26
- package/src/_api/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts +0 -21
- package/src/_api/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts +0 -19
- package/src/_api/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts +0 -19
- package/src/_api/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts +0 -23
- package/src/_api/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts +0 -20
- package/src/_api/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts +0 -20
- package/src/_api/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts +0 -25
- package/src/_api/generated/cfg_totp/_utils/schemas/index.ts +0 -34
- package/src/_api/generated/cfg_totp/api-instance.ts +0 -181
- package/src/_api/generated/cfg_totp/client.ts +0 -342
- package/src/_api/generated/cfg_totp/enums.ts +0 -13
- package/src/_api/generated/cfg_totp/errors.ts +0 -123
- package/src/_api/generated/cfg_totp/http.ts +0 -160
- package/src/_api/generated/cfg_totp/logger.ts +0 -261
- package/src/_api/generated/cfg_totp/retry.ts +0 -177
- package/src/_api/generated/cfg_totp/schema.json +0 -910
- package/src/_api/generated/cfg_totp/storage.ts +0 -163
- package/src/_api/generated/cfg_totp/totp/client.ts +0 -24
- package/src/_api/generated/cfg_totp/totp/index.ts +0 -4
- package/src/_api/generated/cfg_totp/totp/models.ts +0 -4
- package/src/_api/generated/cfg_totp/totp__backup_codes/client.ts +0 -32
- package/src/_api/generated/cfg_totp/totp__backup_codes/index.ts +0 -4
- package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +0 -38
- package/src/_api/generated/cfg_totp/totp__totp_management/client.ts +0 -31
- package/src/_api/generated/cfg_totp/totp__totp_management/index.ts +0 -4
- package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +0 -46
- package/src/_api/generated/cfg_totp/totp__totp_setup/client.ts +0 -33
- package/src/_api/generated/cfg_totp/totp__totp_setup/index.ts +0 -4
- package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +0 -55
- package/src/_api/generated/cfg_totp/totp__totp_verification/client.ts +0 -33
- package/src/_api/generated/cfg_totp/totp__totp_verification/index.ts +0 -4
- package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +0 -74
- package/src/_api/generated/cfg_totp/validation-events.ts +0 -135
- package/src/hooks/accounts.ts +0 -8
- package/src/hooks/index.ts +0 -10
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
export type ClientOptions = {
|
|
4
|
+
baseUrl: 'http://localhost:8000' | (string & {});
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Serializer for regenerating backup codes.
|
|
9
|
+
*/
|
|
10
|
+
export type BackupCodesRegenerateRequest = {
|
|
11
|
+
/**
|
|
12
|
+
* TOTP code for verification
|
|
13
|
+
*/
|
|
14
|
+
code: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Response serializer for backup codes regeneration.
|
|
19
|
+
*/
|
|
20
|
+
export type BackupCodesRegenerateResponse = {
|
|
21
|
+
/**
|
|
22
|
+
* List of new backup codes (save these!)
|
|
23
|
+
*/
|
|
24
|
+
backup_codes: Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Warning about previous codes being invalidated
|
|
27
|
+
*/
|
|
28
|
+
warning: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Serializer for backup codes status.
|
|
33
|
+
*/
|
|
34
|
+
export type BackupCodesStatus = {
|
|
35
|
+
/**
|
|
36
|
+
* Number of unused backup codes
|
|
37
|
+
*/
|
|
38
|
+
remaining_count: number;
|
|
39
|
+
/**
|
|
40
|
+
* Total number of codes generated
|
|
41
|
+
*/
|
|
42
|
+
total_generated: number;
|
|
43
|
+
/**
|
|
44
|
+
* Warning if running low on codes
|
|
45
|
+
*/
|
|
46
|
+
warning?: string | null;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Serializer for confirming 2FA setup with first code.
|
|
51
|
+
*/
|
|
52
|
+
export type ConfirmSetupRequest = {
|
|
53
|
+
/**
|
|
54
|
+
* Device ID from setup response
|
|
55
|
+
*/
|
|
56
|
+
device_id: string;
|
|
57
|
+
/**
|
|
58
|
+
* 6-digit TOTP code from authenticator app
|
|
59
|
+
*/
|
|
60
|
+
code: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Response serializer for setup confirmation.
|
|
65
|
+
*/
|
|
66
|
+
export type ConfirmSetupResponse = {
|
|
67
|
+
message: string;
|
|
68
|
+
/**
|
|
69
|
+
* List of backup recovery codes (save these!)
|
|
70
|
+
*/
|
|
71
|
+
backup_codes: Array<string>;
|
|
72
|
+
/**
|
|
73
|
+
* Warning message about backup codes
|
|
74
|
+
*/
|
|
75
|
+
backup_codes_warning: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Serializer for listing TOTP devices.
|
|
80
|
+
*/
|
|
81
|
+
export type DeviceList = {
|
|
82
|
+
readonly id: string;
|
|
83
|
+
/**
|
|
84
|
+
* Device name for identification
|
|
85
|
+
*/
|
|
86
|
+
readonly name: string;
|
|
87
|
+
/**
|
|
88
|
+
* Primary device used for verification
|
|
89
|
+
*/
|
|
90
|
+
readonly is_primary: boolean;
|
|
91
|
+
readonly status: DeviceListStatusEnum;
|
|
92
|
+
readonly created_at: string;
|
|
93
|
+
/**
|
|
94
|
+
* When device setup was confirmed
|
|
95
|
+
*/
|
|
96
|
+
readonly confirmed_at: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Last successful verification
|
|
99
|
+
*/
|
|
100
|
+
readonly last_used_at: string | null;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Response serializer for device list endpoint.
|
|
105
|
+
*/
|
|
106
|
+
export type DeviceListResponse = {
|
|
107
|
+
devices: Array<DeviceList>;
|
|
108
|
+
has_2fa_enabled: boolean;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* * `pending` - Pending Confirmation
|
|
113
|
+
* * `active` - Active
|
|
114
|
+
* * `disabled` - Disabled
|
|
115
|
+
*/
|
|
116
|
+
export enum DeviceListStatusEnum {
|
|
117
|
+
PENDING = 'pending',
|
|
118
|
+
ACTIVE = 'active',
|
|
119
|
+
DISABLED = 'disabled'
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Serializer for completely disabling 2FA.
|
|
124
|
+
*/
|
|
125
|
+
export type DisableRequest = {
|
|
126
|
+
/**
|
|
127
|
+
* TOTP code for verification
|
|
128
|
+
*/
|
|
129
|
+
code: string;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Serializer for starting 2FA setup.
|
|
134
|
+
*/
|
|
135
|
+
export type SetupRequest = {
|
|
136
|
+
/**
|
|
137
|
+
* Device name for identification (e.g., 'My iPhone')
|
|
138
|
+
*/
|
|
139
|
+
device_name?: string;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Response serializer for setup initiation.
|
|
144
|
+
*/
|
|
145
|
+
export type SetupResponse = {
|
|
146
|
+
/**
|
|
147
|
+
* Device ID to use for confirmation
|
|
148
|
+
*/
|
|
149
|
+
device_id: string;
|
|
150
|
+
/**
|
|
151
|
+
* Base32-encoded TOTP secret (for manual entry)
|
|
152
|
+
*/
|
|
153
|
+
secret: string;
|
|
154
|
+
/**
|
|
155
|
+
* otpauth:// URI for QR code generation
|
|
156
|
+
*/
|
|
157
|
+
provisioning_uri: string;
|
|
158
|
+
/**
|
|
159
|
+
* Base64-encoded QR code image (data URI)
|
|
160
|
+
*/
|
|
161
|
+
qr_code_base64: string;
|
|
162
|
+
/**
|
|
163
|
+
* Seconds until setup expires (typically 600 = 10 minutes)
|
|
164
|
+
*/
|
|
165
|
+
expires_in: number;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* User data returned after 2FA verification.
|
|
170
|
+
*/
|
|
171
|
+
export type TotpVerifyUser = {
|
|
172
|
+
readonly id: number;
|
|
173
|
+
readonly email: string;
|
|
174
|
+
first_name?: string;
|
|
175
|
+
last_name?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Get user's full name.
|
|
178
|
+
*/
|
|
179
|
+
readonly full_name: string;
|
|
180
|
+
/**
|
|
181
|
+
* Get user's initials for avatar fallback.
|
|
182
|
+
*/
|
|
183
|
+
readonly initials: string;
|
|
184
|
+
/**
|
|
185
|
+
* Get formatted username for display.
|
|
186
|
+
*/
|
|
187
|
+
readonly display_username: string;
|
|
188
|
+
company?: string;
|
|
189
|
+
phone?: string;
|
|
190
|
+
position?: string;
|
|
191
|
+
language?: string;
|
|
192
|
+
readonly avatar: string | null;
|
|
193
|
+
/**
|
|
194
|
+
* Staff status
|
|
195
|
+
*
|
|
196
|
+
* Designates whether the user can log into this admin site.
|
|
197
|
+
*/
|
|
198
|
+
readonly is_staff: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Superuser status
|
|
201
|
+
*
|
|
202
|
+
* Designates that this user has all permissions without explicitly assigning them.
|
|
203
|
+
*/
|
|
204
|
+
readonly is_superuser: boolean;
|
|
205
|
+
readonly date_joined: string;
|
|
206
|
+
readonly last_login: string | null;
|
|
207
|
+
readonly unanswered_messages_count: number;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Serializer for backup code verification during login.
|
|
212
|
+
*/
|
|
213
|
+
export type VerifyBackupRequest = {
|
|
214
|
+
/**
|
|
215
|
+
* 2FA session ID from login response
|
|
216
|
+
*/
|
|
217
|
+
session_id: string;
|
|
218
|
+
/**
|
|
219
|
+
* 8-character backup recovery code
|
|
220
|
+
*/
|
|
221
|
+
backup_code: string;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Serializer for TOTP code verification during login.
|
|
226
|
+
*/
|
|
227
|
+
export type VerifyRequest = {
|
|
228
|
+
/**
|
|
229
|
+
* 2FA session ID from login response
|
|
230
|
+
*/
|
|
231
|
+
session_id: string;
|
|
232
|
+
/**
|
|
233
|
+
* 6-digit TOTP code from authenticator app
|
|
234
|
+
*/
|
|
235
|
+
code: string;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Response serializer for successful 2FA verification.
|
|
240
|
+
*/
|
|
241
|
+
export type VerifyResponse = {
|
|
242
|
+
message: string;
|
|
243
|
+
/**
|
|
244
|
+
* JWT access token
|
|
245
|
+
*/
|
|
246
|
+
access_token: string;
|
|
247
|
+
/**
|
|
248
|
+
* JWT refresh token
|
|
249
|
+
*/
|
|
250
|
+
refresh_token: string;
|
|
251
|
+
/**
|
|
252
|
+
* User profile data
|
|
253
|
+
*/
|
|
254
|
+
user: TotpVerifyUser;
|
|
255
|
+
/**
|
|
256
|
+
* Number of remaining backup codes (if backup code was used)
|
|
257
|
+
*/
|
|
258
|
+
remaining_backup_codes?: number;
|
|
259
|
+
/**
|
|
260
|
+
* Warning message (e.g., low backup codes)
|
|
261
|
+
*/
|
|
262
|
+
warning?: string;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Response serializer for device list endpoint.
|
|
267
|
+
*/
|
|
268
|
+
export type DeviceListResponseWritable = {
|
|
269
|
+
devices: Array<unknown>;
|
|
270
|
+
has_2fa_enabled: boolean;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* User data returned after 2FA verification.
|
|
275
|
+
*/
|
|
276
|
+
export type TotpVerifyUserWritable = {
|
|
277
|
+
first_name?: string;
|
|
278
|
+
last_name?: string;
|
|
279
|
+
company?: string;
|
|
280
|
+
phone?: string;
|
|
281
|
+
position?: string;
|
|
282
|
+
language?: string;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Response serializer for successful 2FA verification.
|
|
287
|
+
*/
|
|
288
|
+
export type VerifyResponseWritable = {
|
|
289
|
+
message: string;
|
|
290
|
+
/**
|
|
291
|
+
* JWT access token
|
|
292
|
+
*/
|
|
293
|
+
access_token: string;
|
|
294
|
+
/**
|
|
295
|
+
* JWT refresh token
|
|
296
|
+
*/
|
|
297
|
+
refresh_token: string;
|
|
298
|
+
/**
|
|
299
|
+
* User profile data
|
|
300
|
+
*/
|
|
301
|
+
user: TotpVerifyUserWritable;
|
|
302
|
+
/**
|
|
303
|
+
* Number of remaining backup codes (if backup code was used)
|
|
304
|
+
*/
|
|
305
|
+
remaining_backup_codes?: number;
|
|
306
|
+
/**
|
|
307
|
+
* Warning message (e.g., low backup codes)
|
|
308
|
+
*/
|
|
309
|
+
warning?: string;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
export type CfgTotpBackupCodesRetrieveData = {
|
|
313
|
+
body?: never;
|
|
314
|
+
path?: never;
|
|
315
|
+
query?: never;
|
|
316
|
+
url: '/cfg/totp/backup-codes/';
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
export type CfgTotpBackupCodesRetrieveResponses = {
|
|
320
|
+
200: BackupCodesStatus;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
export type CfgTotpBackupCodesRetrieveResponse = CfgTotpBackupCodesRetrieveResponses[keyof CfgTotpBackupCodesRetrieveResponses];
|
|
324
|
+
|
|
325
|
+
export type CfgTotpBackupCodesRegenerateCreateData = {
|
|
326
|
+
body: BackupCodesRegenerateRequest;
|
|
327
|
+
path?: never;
|
|
328
|
+
query?: never;
|
|
329
|
+
url: '/cfg/totp/backup-codes/regenerate/';
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export type CfgTotpBackupCodesRegenerateCreateErrors = {
|
|
333
|
+
/**
|
|
334
|
+
* Invalid code or 2FA not enabled
|
|
335
|
+
*/
|
|
336
|
+
400: unknown;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export type CfgTotpBackupCodesRegenerateCreateResponses = {
|
|
340
|
+
200: BackupCodesRegenerateResponse;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
export type CfgTotpBackupCodesRegenerateCreateResponse = CfgTotpBackupCodesRegenerateCreateResponses[keyof CfgTotpBackupCodesRegenerateCreateResponses];
|
|
344
|
+
|
|
345
|
+
export type CfgTotpDevicesRetrieveData = {
|
|
346
|
+
body?: never;
|
|
347
|
+
path?: never;
|
|
348
|
+
query?: never;
|
|
349
|
+
url: '/cfg/totp/devices/';
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
export type CfgTotpDevicesRetrieveResponses = {
|
|
353
|
+
200: DeviceListResponse;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
export type CfgTotpDevicesRetrieveResponse = CfgTotpDevicesRetrieveResponses[keyof CfgTotpDevicesRetrieveResponses];
|
|
357
|
+
|
|
358
|
+
export type CfgTotpDevicesDestroyData = {
|
|
359
|
+
body?: never;
|
|
360
|
+
path: {
|
|
361
|
+
id: string;
|
|
362
|
+
};
|
|
363
|
+
query?: never;
|
|
364
|
+
url: '/cfg/totp/devices/{id}/';
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
export type CfgTotpDevicesDestroyResponses = {
|
|
368
|
+
/**
|
|
369
|
+
* No response body
|
|
370
|
+
*/
|
|
371
|
+
204: void;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
export type CfgTotpDevicesDestroyResponse = CfgTotpDevicesDestroyResponses[keyof CfgTotpDevicesDestroyResponses];
|
|
375
|
+
|
|
376
|
+
export type CfgTotpDisableCreateData = {
|
|
377
|
+
body: DisableRequest;
|
|
378
|
+
path?: never;
|
|
379
|
+
query?: never;
|
|
380
|
+
url: '/cfg/totp/disable/';
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
export type CfgTotpDisableCreateErrors = {
|
|
384
|
+
/**
|
|
385
|
+
* Invalid code
|
|
386
|
+
*/
|
|
387
|
+
400: unknown;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export type CfgTotpDisableCreateResponses = {
|
|
391
|
+
/**
|
|
392
|
+
* 2FA disabled successfully
|
|
393
|
+
*/
|
|
394
|
+
200: unknown;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
export type CfgTotpSetupCreateData = {
|
|
398
|
+
body?: SetupRequest;
|
|
399
|
+
path?: never;
|
|
400
|
+
query?: never;
|
|
401
|
+
url: '/cfg/totp/setup/';
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
export type CfgTotpSetupCreateErrors = {
|
|
405
|
+
/**
|
|
406
|
+
* 2FA already enabled or invalid request
|
|
407
|
+
*/
|
|
408
|
+
400: unknown;
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
export type CfgTotpSetupCreateResponses = {
|
|
412
|
+
200: SetupResponse;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
export type CfgTotpSetupCreateResponse = CfgTotpSetupCreateResponses[keyof CfgTotpSetupCreateResponses];
|
|
416
|
+
|
|
417
|
+
export type CfgTotpSetupConfirmCreateData = {
|
|
418
|
+
body: ConfirmSetupRequest;
|
|
419
|
+
path?: never;
|
|
420
|
+
query?: never;
|
|
421
|
+
url: '/cfg/totp/setup/confirm/';
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
export type CfgTotpSetupConfirmCreateErrors = {
|
|
425
|
+
/**
|
|
426
|
+
* Invalid code or setup expired
|
|
427
|
+
*/
|
|
428
|
+
400: unknown;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
export type CfgTotpSetupConfirmCreateResponses = {
|
|
432
|
+
200: ConfirmSetupResponse;
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
export type CfgTotpSetupConfirmCreateResponse = CfgTotpSetupConfirmCreateResponses[keyof CfgTotpSetupConfirmCreateResponses];
|
|
436
|
+
|
|
437
|
+
export type CfgTotpVerifyCreateData = {
|
|
438
|
+
body: VerifyRequest;
|
|
439
|
+
path?: never;
|
|
440
|
+
query?: never;
|
|
441
|
+
url: '/cfg/totp/verify/';
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
export type CfgTotpVerifyCreateErrors = {
|
|
445
|
+
/**
|
|
446
|
+
* Invalid code or session
|
|
447
|
+
*/
|
|
448
|
+
400: unknown;
|
|
449
|
+
/**
|
|
450
|
+
* Too many attempts
|
|
451
|
+
*/
|
|
452
|
+
403: unknown;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export type CfgTotpVerifyCreateResponses = {
|
|
456
|
+
200: VerifyResponse;
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
export type CfgTotpVerifyCreateResponse = CfgTotpVerifyCreateResponses[keyof CfgTotpVerifyCreateResponses];
|
|
460
|
+
|
|
461
|
+
export type CfgTotpVerifyBackupCreateData = {
|
|
462
|
+
body: VerifyBackupRequest;
|
|
463
|
+
path?: never;
|
|
464
|
+
query?: never;
|
|
465
|
+
url: '/cfg/totp/verify/backup/';
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
export type CfgTotpVerifyBackupCreateErrors = {
|
|
469
|
+
/**
|
|
470
|
+
* Invalid backup code or session
|
|
471
|
+
*/
|
|
472
|
+
400: unknown;
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
export type CfgTotpVerifyBackupCreateResponses = {
|
|
476
|
+
200: VerifyResponse;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
export type CfgTotpVerifyBackupCreateResponse = CfgTotpVerifyBackupCreateResponses[keyof CfgTotpVerifyBackupCreateResponses];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// AUTO-GENERATED by django_generator / ts_extras.wrapper
|
|
2
|
+
// Top-level barrel — one singleton API per group, baseUrl from Next.js env.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen`.
|
|
4
|
+
|
|
5
|
+
import { API as CfgAccountsAPI, LocalStorageAdapter as CfgAccountsStorage } from './cfg_accounts';
|
|
6
|
+
import { API as CfgCentrifugoAPI, LocalStorageAdapter as CfgCentrifugoStorage } from './cfg_centrifugo';
|
|
7
|
+
import { API as CfgTotpAPI, LocalStorageAdapter as CfgTotpStorage } from './cfg_totp';
|
|
8
|
+
|
|
9
|
+
const isStaticBuild = process.env.NEXT_PUBLIC_STATIC_BUILD === 'true';
|
|
10
|
+
const baseUrl = isStaticBuild ? '' : process.env.NEXT_PUBLIC_API_URL || '';
|
|
11
|
+
|
|
12
|
+
export const cfgAccountsApi = new CfgAccountsAPI(baseUrl, { storage: new CfgAccountsStorage() });
|
|
13
|
+
export const cfgCentrifugoApi = new CfgCentrifugoAPI(baseUrl, { storage: new CfgCentrifugoStorage() });
|
|
14
|
+
export const cfgTotpApi = new CfgTotpAPI(baseUrl, { storage: new CfgTotpStorage() });
|
|
15
|
+
|
|
16
|
+
// API wrapper classes — for users who need to construct their own
|
|
17
|
+
// instance (e.g. with MemoryStorageAdapter in SSR/tests).
|
|
18
|
+
export { API as CfgAccountsAPI } from './cfg_accounts';
|
|
19
|
+
export { API as CfgCentrifugoAPI } from './cfg_centrifugo';
|
|
20
|
+
export { API as CfgTotpAPI } from './cfg_totp';
|
|
21
|
+
|
|
22
|
+
// Hey API SDK classes — one per OpenAPI tag. Lets consumers call
|
|
23
|
+
// `Centrifugo.cfgCentrifugoAuthTokenRetrieve({...})` directly without
|
|
24
|
+
// going through the wrapper singleton.
|
|
25
|
+
export { Accounts, OAuth, UserProfile, Auth } from './cfg_accounts';
|
|
26
|
+
export { Centrifugo, CentrifugoAuth } from './cfg_centrifugo';
|
|
27
|
+
export { Totp, BackupCodes, TotpManagement, TotpSetup, TotpVerification } from './cfg_totp';
|
|
28
|
+
|
|
29
|
+
// Shared utilities (errors, storage adapters, logger).
|
|
30
|
+
export * from './_shared';
|
package/src/_api/index.ts
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
export * from './generated
|
|
6
|
-
export { Schemas, Fetchers, Enums } from './generated/cfg_accounts';
|
|
7
|
-
export * as CfgAccountsTypes from './generated/cfg_accounts';
|
|
8
|
-
|
|
9
|
-
// cfg_centrifugo
|
|
10
|
-
export { getCentrifugoAuthTokenRetrieve } from './generated/cfg_centrifugo';
|
|
11
|
-
export * as CentrifugoHooks from './generated/cfg_centrifugo/_utils/hooks';
|
|
12
|
-
export * as CentrifugoFetchers from './generated/cfg_centrifugo/_utils/fetchers';
|
|
13
|
-
export * as CentrifugoTypes from './generated/cfg_centrifugo/_utils/schemas';
|
|
14
|
-
|
|
15
|
-
// cfg_totp
|
|
16
|
-
export * as TotpHooks from './generated/cfg_totp/_utils/hooks';
|
|
17
|
-
export * as TotpFetchers from './generated/cfg_totp/_utils/fetchers';
|
|
18
|
-
export * as TotpTypes from './generated/cfg_totp/_utils/schemas';
|
|
19
|
-
|
|
20
|
-
// API Classes
|
|
21
|
-
export { API as AccountsAPI } from './generated/cfg_accounts';
|
|
22
|
-
export { API as TotpAPI } from './generated/cfg_totp';
|
|
23
|
-
export { API as CentrifugoAPI } from './generated/cfg_centrifugo';
|
|
1
|
+
// Re-export the generated barrel directly. Per-group API singletons,
|
|
2
|
+
// API classes (AccountsAPI/TotpAPI/CentrifugoAPI), and shared utilities
|
|
3
|
+
// (LocalStorageAdapter / MemoryStorageAdapter / APIError / ...) all come
|
|
4
|
+
// from `_api/generated/index.ts`.
|
|
5
|
+
export * from './generated';
|