@djangocfg/api 2.1.322 → 2.1.331
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 +1037 -1227
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +1037 -1217
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +2142 -3398
- 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 +2136 -3392
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +1018 -4423
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +151 -2918
- package/dist/clients.d.ts +151 -2918
- package/dist/clients.mjs +1018 -4417
- package/dist/clients.mjs.map +1 -1
- package/dist/index.cjs +2253 -2819
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2408 -1872
- package/dist/index.d.ts +2408 -1872
- package/dist/index.mjs +2235 -2795
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -7
- package/src/_api/generated/_cfg_accounts/api.ts +120 -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 +25 -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 +25 -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 +25 -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 +29 -0
- 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 → _cfg_accounts/schemas/User.ts} +19 -27
- package/src/_api/generated/_cfg_accounts/schemas/index.ts +24 -0
- package/src/_api/generated/_cfg_accounts/sdk.gen.ts +5 -0
- package/src/_api/generated/_cfg_accounts/types.gen.ts +5 -0
- package/src/_api/generated/_cfg_centrifugo/api.ts +120 -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 +25 -0
- package/src/_api/generated/_cfg_centrifugo/index.ts +29 -0
- 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 +5 -0
- package/src/_api/generated/_cfg_centrifugo/types.gen.ts +5 -0
- package/src/_api/generated/_cfg_totp/api.ts +120 -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 +25 -0
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesDestroy.ts +24 -0
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +25 -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 +29 -0
- 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 → _cfg_totp/schemas/TotpVerifyUser.ts} +17 -25
- 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 +5 -0
- package/src/_api/generated/_cfg_totp/types.gen.ts +5 -0
- package/src/_api/generated/client/client.gen.ts +280 -0
- package/src/_api/generated/client/index.ts +25 -0
- package/src/_api/generated/client/types.gen.ts +217 -0
- package/src/_api/generated/client/utils.gen.ts +318 -0
- package/src/_api/generated/client.gen.ts +16 -0
- package/src/_api/generated/core/auth.gen.ts +41 -0
- package/src/_api/generated/core/bodySerializer.gen.ts +82 -0
- package/src/_api/generated/core/params.gen.ts +169 -0
- package/src/_api/generated/core/pathSerializer.gen.ts +171 -0
- package/src/_api/generated/core/queryKeySerializer.gen.ts +117 -0
- package/src/_api/generated/core/serverSentEvents.gen.ts +242 -0
- package/src/_api/generated/core/types.gen.ts +104 -0
- package/src/_api/generated/core/utils.gen.ts +140 -0
- package/src/_api/generated/helpers/errors.ts +70 -0
- package/src/_api/generated/helpers/index.ts +25 -0
- package/src/_api/generated/helpers/logger.ts +123 -0
- package/src/_api/generated/helpers/storage.ts +83 -0
- package/src/_api/generated/helpers/validation-events.ts +52 -0
- package/src/_api/generated/index.ts +28 -0
- package/src/_api/generated/sdk.gen.ts +1250 -0
- package/src/_api/generated/types.gen.ts +1294 -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 +3 -1
- package/src/auth/hooks/useGithubAuth.ts +13 -11
- package/src/auth/hooks/useTokenRefresh.ts +7 -4
- package/src/auth/hooks/useTwoFactor.ts +15 -8
- package/src/auth/hooks/useTwoFactorSetup.ts +9 -5
- package/src/auth/hooks/useTwoFactorStatus.ts +5 -3
- package/src/auth/middlewares/tokenRefresh.ts +7 -4
- package/src/clients.ts +14 -51
- package/src/index.ts +35 -60
- 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/index.ts +0 -338
- 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/index.ts +0 -316
- 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/index.ts +0 -345
- 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,24 @@
|
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
|
+
// DELETE /cfg/totp/devices/{id}/
|
|
3
|
+
// DO NOT EDIT — re-run `make gen`.
|
|
4
|
+
|
|
5
|
+
import useSWRMutation from "swr/mutation";
|
|
6
|
+
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpDevicesDestroyData, CfgTotpDevicesDestroyResponses } from "../../types.gen";
|
|
9
|
+
|
|
10
|
+
type Args = Omit<CfgTotpDevicesDestroyData, "url">;
|
|
11
|
+
type Result = CfgTotpDevicesDestroyResponses[keyof CfgTotpDevicesDestroyResponses];
|
|
12
|
+
|
|
13
|
+
export function useCfgTotpDevicesDestroy(
|
|
14
|
+
config?: SWRMutationConfiguration<Result, Error, readonly ["cfg_totp_devices_destroy"], Args>,
|
|
15
|
+
) {
|
|
16
|
+
return useSWRMutation<Result, Error, readonly ["cfg_totp_devices_destroy"], Args>(
|
|
17
|
+
["cfg_totp_devices_destroy"] as const,
|
|
18
|
+
async (_key, { arg }: { arg: Args }) => {
|
|
19
|
+
const res = await Cfg.cfgTotpDevicesDestroy({ ...arg, throwOnError: true } as never);
|
|
20
|
+
return res.data as Result;
|
|
21
|
+
},
|
|
22
|
+
config,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
|
+
// GET /cfg/totp/devices/
|
|
3
|
+
// DO NOT EDIT — re-run `make gen`.
|
|
4
|
+
|
|
5
|
+
import useSWR from "swr";
|
|
6
|
+
import type { SWRConfiguration } from "swr";
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpDevicesRetrieveData, CfgTotpDevicesRetrieveResponses } from "../../types.gen";
|
|
9
|
+
|
|
10
|
+
type Result = CfgTotpDevicesRetrieveResponses[keyof CfgTotpDevicesRetrieveResponses];
|
|
11
|
+
|
|
12
|
+
export function useCfgTotpDevicesRetrieve(
|
|
13
|
+
args?: Omit<CfgTotpDevicesRetrieveData, "url" | "body">,
|
|
14
|
+
config?: SWRConfiguration<Result>,
|
|
15
|
+
) {
|
|
16
|
+
const key = ["cfg_totp_devices_retrieve", args ?? {}] as const;
|
|
17
|
+
return useSWR<Result>(
|
|
18
|
+
key,
|
|
19
|
+
async () => {
|
|
20
|
+
const res = await Cfg.cfgTotpDevicesRetrieve({ ...(args ?? {}), throwOnError: true } as never);
|
|
21
|
+
return res.data as Result;
|
|
22
|
+
},
|
|
23
|
+
config,
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
|
+
// POST /cfg/totp/disable/
|
|
3
|
+
// DO NOT EDIT — re-run `make gen`.
|
|
4
|
+
|
|
5
|
+
import useSWRMutation from "swr/mutation";
|
|
6
|
+
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpDisableCreateData, CfgTotpDisableCreateResponses } from "../../types.gen";
|
|
9
|
+
|
|
10
|
+
type Args = Omit<CfgTotpDisableCreateData, "url">;
|
|
11
|
+
type Result = CfgTotpDisableCreateResponses[keyof CfgTotpDisableCreateResponses];
|
|
12
|
+
|
|
13
|
+
export function useCfgTotpDisableCreate(
|
|
14
|
+
config?: SWRMutationConfiguration<Result, Error, readonly ["cfg_totp_disable_create"], Args>,
|
|
15
|
+
) {
|
|
16
|
+
return useSWRMutation<Result, Error, readonly ["cfg_totp_disable_create"], Args>(
|
|
17
|
+
["cfg_totp_disable_create"] as const,
|
|
18
|
+
async (_key, { arg }: { arg: Args }) => {
|
|
19
|
+
const res = await Cfg.cfgTotpDisableCreate({ ...arg, throwOnError: true } as never);
|
|
20
|
+
return res.data as Result;
|
|
21
|
+
},
|
|
22
|
+
config,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
|
+
// POST /cfg/totp/setup/confirm/
|
|
3
|
+
// DO NOT EDIT — re-run `make gen`.
|
|
4
|
+
|
|
5
|
+
import useSWRMutation from "swr/mutation";
|
|
6
|
+
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpSetupConfirmCreateData, CfgTotpSetupConfirmCreateResponses } from "../../types.gen";
|
|
9
|
+
|
|
10
|
+
type Args = Omit<CfgTotpSetupConfirmCreateData, "url">;
|
|
11
|
+
type Result = CfgTotpSetupConfirmCreateResponses[keyof CfgTotpSetupConfirmCreateResponses];
|
|
12
|
+
|
|
13
|
+
export function useCfgTotpSetupConfirmCreate(
|
|
14
|
+
config?: SWRMutationConfiguration<Result, Error, readonly ["cfg_totp_setup_confirm_create"], Args>,
|
|
15
|
+
) {
|
|
16
|
+
return useSWRMutation<Result, Error, readonly ["cfg_totp_setup_confirm_create"], Args>(
|
|
17
|
+
["cfg_totp_setup_confirm_create"] as const,
|
|
18
|
+
async (_key, { arg }: { arg: Args }) => {
|
|
19
|
+
const res = await Cfg.cfgTotpSetupConfirmCreate({ ...arg, throwOnError: true } as never);
|
|
20
|
+
return res.data as Result;
|
|
21
|
+
},
|
|
22
|
+
config,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
|
+
// POST /cfg/totp/setup/
|
|
3
|
+
// DO NOT EDIT — re-run `make gen`.
|
|
4
|
+
|
|
5
|
+
import useSWRMutation from "swr/mutation";
|
|
6
|
+
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpSetupCreateData, CfgTotpSetupCreateResponses } from "../../types.gen";
|
|
9
|
+
|
|
10
|
+
type Args = Omit<CfgTotpSetupCreateData, "url">;
|
|
11
|
+
type Result = CfgTotpSetupCreateResponses[keyof CfgTotpSetupCreateResponses];
|
|
12
|
+
|
|
13
|
+
export function useCfgTotpSetupCreate(
|
|
14
|
+
config?: SWRMutationConfiguration<Result, Error, readonly ["cfg_totp_setup_create"], Args>,
|
|
15
|
+
) {
|
|
16
|
+
return useSWRMutation<Result, Error, readonly ["cfg_totp_setup_create"], Args>(
|
|
17
|
+
["cfg_totp_setup_create"] as const,
|
|
18
|
+
async (_key, { arg }: { arg: Args }) => {
|
|
19
|
+
const res = await Cfg.cfgTotpSetupCreate({ ...arg, throwOnError: true } as never);
|
|
20
|
+
return res.data as Result;
|
|
21
|
+
},
|
|
22
|
+
config,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
|
+
// POST /cfg/totp/verify/backup/
|
|
3
|
+
// DO NOT EDIT — re-run `make gen`.
|
|
4
|
+
|
|
5
|
+
import useSWRMutation from "swr/mutation";
|
|
6
|
+
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpVerifyBackupCreateData, CfgTotpVerifyBackupCreateResponses } from "../../types.gen";
|
|
9
|
+
|
|
10
|
+
type Args = Omit<CfgTotpVerifyBackupCreateData, "url">;
|
|
11
|
+
type Result = CfgTotpVerifyBackupCreateResponses[keyof CfgTotpVerifyBackupCreateResponses];
|
|
12
|
+
|
|
13
|
+
export function useCfgTotpVerifyBackupCreate(
|
|
14
|
+
config?: SWRMutationConfiguration<Result, Error, readonly ["cfg_totp_verify_backup_create"], Args>,
|
|
15
|
+
) {
|
|
16
|
+
return useSWRMutation<Result, Error, readonly ["cfg_totp_verify_backup_create"], Args>(
|
|
17
|
+
["cfg_totp_verify_backup_create"] as const,
|
|
18
|
+
async (_key, { arg }: { arg: Args }) => {
|
|
19
|
+
const res = await Cfg.cfgTotpVerifyBackupCreate({ ...arg, throwOnError: true } as never);
|
|
20
|
+
return res.data as Result;
|
|
21
|
+
},
|
|
22
|
+
config,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
|
+
// POST /cfg/totp/verify/
|
|
3
|
+
// DO NOT EDIT — re-run `make gen`.
|
|
4
|
+
|
|
5
|
+
import useSWRMutation from "swr/mutation";
|
|
6
|
+
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpVerifyCreateData, CfgTotpVerifyCreateResponses } from "../../types.gen";
|
|
9
|
+
|
|
10
|
+
type Args = Omit<CfgTotpVerifyCreateData, "url">;
|
|
11
|
+
type Result = CfgTotpVerifyCreateResponses[keyof CfgTotpVerifyCreateResponses];
|
|
12
|
+
|
|
13
|
+
export function useCfgTotpVerifyCreate(
|
|
14
|
+
config?: SWRMutationConfiguration<Result, Error, readonly ["cfg_totp_verify_create"], Args>,
|
|
15
|
+
) {
|
|
16
|
+
return useSWRMutation<Result, Error, readonly ["cfg_totp_verify_create"], Args>(
|
|
17
|
+
["cfg_totp_verify_create"] as const,
|
|
18
|
+
async (_key, { arg }: { arg: Args }) => {
|
|
19
|
+
const res = await Cfg.cfgTotpVerifyCreate({ ...arg, throwOnError: true } as never);
|
|
20
|
+
return res.data as Result;
|
|
21
|
+
},
|
|
22
|
+
config,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// AUTO-GENERATED by django_generator / ts_extras.wrapper
|
|
2
|
+
// Group barrel. DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
|
|
4
|
+
// Wrapper class + per-group SDK re-exports
|
|
5
|
+
export { API, type APIOptions, } from './api';
|
|
6
|
+
|
|
7
|
+
// Shared utilities (storage / errors / logger / validation events)
|
|
8
|
+
export {
|
|
9
|
+
type StorageAdapter,
|
|
10
|
+
LocalStorageAdapter,
|
|
11
|
+
MemoryStorageAdapter,
|
|
12
|
+
CookieStorageAdapter,
|
|
13
|
+
APIError,
|
|
14
|
+
NetworkError,
|
|
15
|
+
APILogger,
|
|
16
|
+
defaultLogger,
|
|
17
|
+
type LoggerConfig,
|
|
18
|
+
type RequestLog,
|
|
19
|
+
type ResponseLog,
|
|
20
|
+
type ErrorLog,
|
|
21
|
+
dispatchValidationError,
|
|
22
|
+
onValidationError,
|
|
23
|
+
formatZodError,
|
|
24
|
+
type ValidationErrorDetail,
|
|
25
|
+
type ValidationErrorEvent,
|
|
26
|
+
} from '../helpers';
|
|
27
|
+
|
|
28
|
+
// Generated artifacts (Hey API)
|
|
29
|
+
export type * from '../types.gen';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const BackupCodesRegenerateRequestSchema = z.object({
|
|
8
|
+
code: z.string().min(6).max(6),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type BackupCodesRegenerateRequest = z.infer<typeof BackupCodesRegenerateRequestSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const BackupCodesRegenerateResponseSchema = z.object({
|
|
8
|
+
backup_codes: z.array(z.string()),
|
|
9
|
+
warning: z.string(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type BackupCodesRegenerateResponse = z.infer<typeof BackupCodesRegenerateResponseSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const BackupCodesStatusSchema = z.object({
|
|
8
|
+
remaining_count: z.number().int(),
|
|
9
|
+
total_generated: z.number().int(),
|
|
10
|
+
warning: z.string().nullable().optional(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type BackupCodesStatus = z.infer<typeof BackupCodesStatusSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const ConfirmSetupRequestSchema = z.object({
|
|
8
|
+
code: z.string().min(6).max(6),
|
|
9
|
+
device_id: z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type ConfirmSetupRequest = z.infer<typeof ConfirmSetupRequestSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const ConfirmSetupResponseSchema = z.object({
|
|
8
|
+
backup_codes: z.array(z.string()),
|
|
9
|
+
backup_codes_warning: z.string(),
|
|
10
|
+
message: z.string(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type ConfirmSetupResponse = z.infer<typeof ConfirmSetupResponseSchema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { DeviceListStatusEnumSchema } from "./DeviceListStatusEnum";
|
|
7
|
+
|
|
8
|
+
export const DeviceListSchema = z.object({
|
|
9
|
+
confirmed_at: z.string().datetime({ offset: true }).nullable(),
|
|
10
|
+
created_at: z.string().datetime({ offset: true }),
|
|
11
|
+
id: z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
12
|
+
is_primary: z.boolean(),
|
|
13
|
+
last_used_at: z.string().datetime({ offset: true }).nullable(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
status: DeviceListStatusEnumSchema,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type DeviceList = z.infer<typeof DeviceListSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { DeviceListSchema } from "./DeviceList";
|
|
7
|
+
|
|
8
|
+
export const DeviceListResponseSchema = z.object({
|
|
9
|
+
devices: z.array(DeviceListSchema),
|
|
10
|
+
has_2fa_enabled: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type DeviceListResponse = z.infer<typeof DeviceListResponseSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const DeviceListStatusEnumSchema = z.enum(["pending", "active", "disabled"]);
|
|
8
|
+
|
|
9
|
+
export type DeviceListStatusEnum = z.infer<typeof DeviceListStatusEnumSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const DisableRequestSchema = z.object({
|
|
8
|
+
code: z.string().min(6).max(6),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type DisableRequest = z.infer<typeof DisableRequestSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const SetupRequestSchema = z.object({
|
|
8
|
+
device_name: z.string().min(1).max(100).default("Authenticator").optional(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type SetupRequest = z.infer<typeof SetupRequestSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const SetupResponseSchema = z.object({
|
|
8
|
+
device_id: z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
9
|
+
expires_in: z.number().int(),
|
|
10
|
+
provisioning_uri: z.string(),
|
|
11
|
+
qr_code_base64: z.string(),
|
|
12
|
+
secret: z.string(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type SetupResponse = z.infer<typeof SetupResponseSchema>;
|
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* */
|
|
7
|
-
import { z } from 'zod'
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
8
6
|
|
|
9
|
-
/**
|
|
10
|
-
* User data returned after 2FA verification.
|
|
11
|
-
*/
|
|
12
7
|
export const TotpVerifyUserSchema = z.object({
|
|
13
|
-
|
|
8
|
+
avatar: z.string().nullable(),
|
|
9
|
+
company: z.string().max(100).optional(),
|
|
10
|
+
date_joined: z.string().datetime({ offset: true }),
|
|
11
|
+
display_username: z.string(),
|
|
14
12
|
email: z.email(),
|
|
15
13
|
first_name: z.string().max(50).optional(),
|
|
16
|
-
last_name: z.string().max(50).optional(),
|
|
17
14
|
full_name: z.string(),
|
|
15
|
+
id: z.number().int(),
|
|
18
16
|
initials: z.string(),
|
|
19
|
-
display_username: z.string(),
|
|
20
|
-
company: z.string().max(100).optional(),
|
|
21
|
-
phone: z.string().max(20).optional(),
|
|
22
|
-
position: z.string().max(100).optional(),
|
|
23
|
-
language: z.string().max(10).optional(),
|
|
24
|
-
avatar: z.string().nullable(),
|
|
25
17
|
is_staff: z.boolean(),
|
|
26
18
|
is_superuser: z.boolean(),
|
|
27
|
-
|
|
19
|
+
language: z.string().max(10).optional(),
|
|
28
20
|
last_login: z.string().datetime({ offset: true }).nullable(),
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
last_name: z.string().max(50).optional(),
|
|
22
|
+
phone: z.string().max(20).optional(),
|
|
23
|
+
position: z.string().max(100).optional(),
|
|
24
|
+
unanswered_messages_count: z.number().int().default(0),
|
|
25
|
+
});
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
* Infer TypeScript type from Zod schema
|
|
34
|
-
*/
|
|
35
|
-
export type TotpVerifyUser = z.infer<typeof TotpVerifyUserSchema>
|
|
27
|
+
export type TotpVerifyUser = z.infer<typeof TotpVerifyUserSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const VerifyBackupRequestSchema = z.object({
|
|
8
|
+
backup_code: z.string().min(8).max(8),
|
|
9
|
+
session_id: z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type VerifyBackupRequest = z.infer<typeof VerifyBackupRequestSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const VerifyRequestSchema = z.object({
|
|
8
|
+
code: z.string().min(6).max(6),
|
|
9
|
+
session_id: z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type VerifyRequest = z.infer<typeof VerifyRequestSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
|
+
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { TotpVerifyUserSchema } from "./TotpVerifyUser";
|
|
7
|
+
|
|
8
|
+
export const VerifyResponseSchema = z.object({
|
|
9
|
+
access_token: z.string(),
|
|
10
|
+
message: z.string(),
|
|
11
|
+
refresh_token: z.string(),
|
|
12
|
+
remaining_backup_codes: z.number().int().optional(),
|
|
13
|
+
user: TotpVerifyUserSchema,
|
|
14
|
+
warning: z.string().optional(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type VerifyResponse = z.infer<typeof VerifyResponseSchema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// AUTO-GENERATED — barrel for zod schemas.
|
|
2
|
+
// DO NOT EDIT.
|
|
3
|
+
|
|
4
|
+
export * from "./BackupCodesRegenerateRequest";
|
|
5
|
+
export * from "./BackupCodesRegenerateResponse";
|
|
6
|
+
export * from "./BackupCodesStatus";
|
|
7
|
+
export * from "./ConfirmSetupRequest";
|
|
8
|
+
export * from "./ConfirmSetupResponse";
|
|
9
|
+
export * from "./DeviceList";
|
|
10
|
+
export * from "./DeviceListResponse";
|
|
11
|
+
export * from "./DeviceListStatusEnum";
|
|
12
|
+
export * from "./DisableRequest";
|
|
13
|
+
export * from "./SetupRequest";
|
|
14
|
+
export * from "./SetupResponse";
|
|
15
|
+
export * from "./TotpVerifyUser";
|
|
16
|
+
export * from "./VerifyBackupRequest";
|
|
17
|
+
export * from "./VerifyRequest";
|
|
18
|
+
export * from "./VerifyResponse";
|