@djangocfg/api 2.1.327 → 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 +185 -3471
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +185 -3471
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +952 -3305
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +35 -35
- package/dist/auth.d.ts +35 -35
- package/dist/auth.mjs +952 -3305
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +90 -3396
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +4 -2508
- package/dist/clients.d.ts +4 -2508
- package/dist/clients.mjs +90 -3396
- package/dist/clients.mjs.map +1 -1
- package/dist/index.cjs +985 -3052
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1544 -1938
- package/dist/index.d.ts +1544 -1938
- package/dist/index.mjs +985 -3052
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/{cfg_centrifugo → _cfg_accounts}/api.ts +11 -55
- package/src/_api/generated/{cfg_totp → _cfg_accounts}/events.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/index.ts +1 -1
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthConnectionsList.ts +5 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthDisconnectCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthGithubAuthorizeCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthGithubCallbackCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOauthProvidersRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOtpRequestCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsOtpVerifyCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileAvatarCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileDeleteCreate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfilePartialPartialUpdate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfilePartialUpdate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileUpdatePartialUpdate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsProfileUpdateUpdate.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/hooks/useCfgAccountsTokenRefreshCreate.ts +3 -3
- package/src/_api/generated/{cfg_centrifugo → _cfg_accounts}/index.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/AccountDeleteResponse.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/CentrifugoToken.ts +4 -4
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/CfgUserUpdateRequest.ts +4 -4
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthAuthorizeRequestRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthAuthorizeResponse.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthCallbackRequestRequest.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthConnection.ts +6 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthDisconnectRequestRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthError.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthProvidersResponse.ts +3 -3
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OAuthTokenResponse.ts +7 -7
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPErrorResponse.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPRequestRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPRequestResponse.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPVerifyRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/OTPVerifyResponse.ts +6 -6
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/PatchedCfgUserUpdateRequest.ts +4 -4
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/ProviderEnum.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/TokenRefresh.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/TokenRefreshRequest.ts +2 -2
- package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/User.ts +13 -13
- 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_totp → _cfg_centrifugo}/api.ts +11 -72
- package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/events.ts +3 -3
- package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/hooks/index.ts +1 -1
- package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_accounts → _cfg_centrifugo}/index.ts +3 -3
- package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/schemas/ConnectionTokenResponse.ts +4 -4
- 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_accounts → _cfg_totp}/api.ts +11 -78
- package/src/_api/generated/{cfg_accounts → _cfg_totp}/events.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/index.ts +1 -1
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpBackupCodesRegenerateCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpBackupCodesRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpDevicesDestroy.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpDevicesRetrieve.ts +5 -6
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpDisableCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpSetupConfirmCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpSetupCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpVerifyBackupCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/hooks/useCfgTotpVerifyCreate.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/index.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/BackupCodesRegenerateRequest.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/BackupCodesRegenerateResponse.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/BackupCodesStatus.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/ConfirmSetupRequest.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/ConfirmSetupResponse.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/DeviceList.ts +6 -6
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/DeviceListResponse.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/DeviceListStatusEnum.ts +2 -2
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/DisableRequest.ts +2 -2
- package/src/_api/generated/_cfg_totp/schemas/SetupRequest.ts +11 -0
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/SetupResponse.ts +4 -4
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/TotpVerifyUser.ts +12 -12
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/VerifyBackupRequest.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/VerifyRequest.ts +3 -3
- package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/VerifyResponse.ts +4 -4
- 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/index.ts +11 -13
- package/src/_api/generated/{cfg_accounts/sdk.gen.ts → sdk.gen.ts} +455 -1
- package/src/_api/generated/{cfg_accounts/types.gen.ts → types.gen.ts} +607 -77
- package/src/auth/context/AccountsContext.tsx +10 -10
- package/src/auth/context/AuthContext.tsx +1 -1
- package/src/auth/hooks/useDeleteAccount.ts +2 -1
- package/src/auth/hooks/useGithubAuth.ts +3 -2
- package/src/auth/hooks/useTokenRefresh.ts +2 -1
- package/src/auth/hooks/useTwoFactor.ts +4 -3
- package/src/auth/hooks/useTwoFactorSetup.ts +3 -2
- package/src/auth/hooks/useTwoFactorStatus.ts +4 -3
- package/src/auth/middlewares/tokenRefresh.ts +2 -1
- package/src/clients.ts +3 -3
- package/src/index.ts +22 -5
- package/src/server.ts +9 -9
- package/src/_api/generated/cfg_centrifugo/client/client.gen.ts +0 -280
- package/src/_api/generated/cfg_centrifugo/client/index.ts +0 -25
- package/src/_api/generated/cfg_centrifugo/client/types.gen.ts +0 -217
- package/src/_api/generated/cfg_centrifugo/client/utils.gen.ts +0 -318
- package/src/_api/generated/cfg_centrifugo/client.gen.ts +0 -16
- package/src/_api/generated/cfg_centrifugo/core/auth.gen.ts +0 -41
- package/src/_api/generated/cfg_centrifugo/core/bodySerializer.gen.ts +0 -82
- package/src/_api/generated/cfg_centrifugo/core/params.gen.ts +0 -169
- package/src/_api/generated/cfg_centrifugo/core/pathSerializer.gen.ts +0 -171
- package/src/_api/generated/cfg_centrifugo/core/queryKeySerializer.gen.ts +0 -117
- package/src/_api/generated/cfg_centrifugo/core/serverSentEvents.gen.ts +0 -242
- package/src/_api/generated/cfg_centrifugo/core/types.gen.ts +0 -104
- package/src/_api/generated/cfg_centrifugo/core/utils.gen.ts +0 -140
- package/src/_api/generated/cfg_centrifugo/sdk.gen.ts +0 -64
- package/src/_api/generated/cfg_centrifugo/types.gen.ts +0 -61
- package/src/_api/generated/cfg_totp/client/client.gen.ts +0 -280
- package/src/_api/generated/cfg_totp/client/index.ts +0 -25
- package/src/_api/generated/cfg_totp/client/types.gen.ts +0 -217
- package/src/_api/generated/cfg_totp/client/utils.gen.ts +0 -318
- package/src/_api/generated/cfg_totp/client.gen.ts +0 -16
- package/src/_api/generated/cfg_totp/core/auth.gen.ts +0 -41
- package/src/_api/generated/cfg_totp/core/bodySerializer.gen.ts +0 -82
- package/src/_api/generated/cfg_totp/core/params.gen.ts +0 -169
- package/src/_api/generated/cfg_totp/core/pathSerializer.gen.ts +0 -171
- package/src/_api/generated/cfg_totp/core/queryKeySerializer.gen.ts +0 -117
- package/src/_api/generated/cfg_totp/core/serverSentEvents.gen.ts +0 -242
- package/src/_api/generated/cfg_totp/core/types.gen.ts +0 -104
- package/src/_api/generated/cfg_totp/core/utils.gen.ts +0 -140
- package/src/_api/generated/cfg_totp/schemas/SetupRequest.ts +0 -11
- package/src/_api/generated/cfg_totp/sdk.gen.ts +0 -432
- package/src/_api/generated/cfg_totp/types.gen.ts +0 -479
- /package/src/_api/generated/{cfg_accounts → _cfg_accounts}/schemas/index.ts +0 -0
- /package/src/_api/generated/{cfg_centrifugo → _cfg_centrifugo}/schemas/index.ts +0 -0
- /package/src/_api/generated/{cfg_totp → _cfg_totp}/schemas/index.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client → client}/client.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client → client}/index.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client → client}/types.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client → client}/utils.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/client.gen.ts → client.gen.ts} +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/auth.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/bodySerializer.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/params.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/pathSerializer.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/queryKeySerializer.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/serverSentEvents.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/types.gen.ts +0 -0
- /package/src/_api/generated/{cfg_accounts/core → core}/utils.gen.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/errors.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/index.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/logger.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/storage.ts +0 -0
- /package/src/_api/generated/{_shared → helpers}/validation-events.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
2
|
// POST /cfg/totp/setup/confirm/
|
|
3
3
|
// DO NOT EDIT — re-run `make gen`.
|
|
4
4
|
|
|
5
5
|
import useSWRMutation from "swr/mutation";
|
|
6
6
|
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
-
import { Cfg } from "
|
|
8
|
-
import type { CfgTotpSetupConfirmCreateData, CfgTotpSetupConfirmCreateResponses } from "
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpSetupConfirmCreateData, CfgTotpSetupConfirmCreateResponses } from "../../types.gen";
|
|
9
9
|
|
|
10
10
|
type Args = Omit<CfgTotpSetupConfirmCreateData, "url">;
|
|
11
11
|
type Result = CfgTotpSetupConfirmCreateResponses[keyof CfgTotpSetupConfirmCreateResponses];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
2
|
// POST /cfg/totp/setup/
|
|
3
3
|
// DO NOT EDIT — re-run `make gen`.
|
|
4
4
|
|
|
5
5
|
import useSWRMutation from "swr/mutation";
|
|
6
6
|
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
-
import { Cfg } from "
|
|
8
|
-
import type { CfgTotpSetupCreateData, CfgTotpSetupCreateResponses } from "
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpSetupCreateData, CfgTotpSetupCreateResponses } from "../../types.gen";
|
|
9
9
|
|
|
10
10
|
type Args = Omit<CfgTotpSetupCreateData, "url">;
|
|
11
11
|
type Result = CfgTotpSetupCreateResponses[keyof CfgTotpSetupCreateResponses];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
2
|
// POST /cfg/totp/verify/backup/
|
|
3
3
|
// DO NOT EDIT — re-run `make gen`.
|
|
4
4
|
|
|
5
5
|
import useSWRMutation from "swr/mutation";
|
|
6
6
|
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
-
import { Cfg } from "
|
|
8
|
-
import type { CfgTotpVerifyBackupCreateData, CfgTotpVerifyBackupCreateResponses } from "
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpVerifyBackupCreateData, CfgTotpVerifyBackupCreateResponses } from "../../types.gen";
|
|
9
9
|
|
|
10
10
|
type Args = Omit<CfgTotpVerifyBackupCreateData, "url">;
|
|
11
11
|
type Result = CfgTotpVerifyBackupCreateResponses[keyof CfgTotpVerifyBackupCreateResponses];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by openapi_processor / ts.hooks
|
|
2
2
|
// POST /cfg/totp/verify/
|
|
3
3
|
// DO NOT EDIT — re-run `make gen`.
|
|
4
4
|
|
|
5
5
|
import useSWRMutation from "swr/mutation";
|
|
6
6
|
import type { SWRMutationConfiguration } from "swr/mutation";
|
|
7
|
-
import { Cfg } from "
|
|
8
|
-
import type { CfgTotpVerifyCreateData, CfgTotpVerifyCreateResponses } from "
|
|
7
|
+
import { Cfg } from "../../sdk.gen";
|
|
8
|
+
import type { CfgTotpVerifyCreateData, CfgTotpVerifyCreateResponses } from "../../types.gen";
|
|
9
9
|
|
|
10
10
|
type Args = Omit<CfgTotpVerifyCreateData, "url">;
|
|
11
11
|
type Result = CfgTotpVerifyCreateResponses[keyof CfgTotpVerifyCreateResponses];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Group barrel. DO NOT EDIT — re-run `make gen`.
|
|
3
3
|
|
|
4
4
|
// Wrapper class + per-group SDK re-exports
|
|
5
|
-
export { API, type APIOptions,
|
|
5
|
+
export { API, type APIOptions, } from './api';
|
|
6
6
|
|
|
7
7
|
// Shared utilities (storage / errors / logger / validation events)
|
|
8
8
|
export {
|
|
@@ -23,7 +23,7 @@ export {
|
|
|
23
23
|
formatZodError,
|
|
24
24
|
type ValidationErrorDetail,
|
|
25
25
|
type ValidationErrorEvent,
|
|
26
|
-
} from '../
|
|
26
|
+
} from '../helpers';
|
|
27
27
|
|
|
28
28
|
// Generated artifacts (Hey API)
|
|
29
|
-
export type * from '
|
|
29
|
+
export type * from '../types.gen';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export const ConfirmSetupRequestSchema = 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
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
10
|
});
|
|
11
11
|
|
|
12
12
|
export type ConfirmSetupRequest = z.infer<typeof ConfirmSetupRequestSchema>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export const ConfirmSetupResponseSchema = z.object({
|
|
8
|
-
message: z.string(),
|
|
9
8
|
backup_codes: z.array(z.string()),
|
|
10
9
|
backup_codes_warning: z.string(),
|
|
10
|
+
message: z.string(),
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
export type ConfirmSetupResponse = z.infer<typeof ConfirmSetupResponseSchema>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { DeviceListStatusEnumSchema } from "./DeviceListStatusEnum";
|
|
7
7
|
|
|
8
8
|
export const DeviceListSchema = z.object({
|
|
9
|
+
confirmed_at: z.string().datetime({ offset: true }).nullable(),
|
|
10
|
+
created_at: z.string().datetime({ offset: true }),
|
|
9
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),
|
|
10
|
-
name: z.string(),
|
|
11
12
|
is_primary: z.boolean(),
|
|
12
|
-
status: DeviceListStatusEnumSchema,
|
|
13
|
-
created_at: z.string().datetime({ offset: true }),
|
|
14
|
-
confirmed_at: z.string().datetime({ offset: true }).nullable(),
|
|
15
13
|
last_used_at: z.string().datetime({ offset: true }).nullable(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
status: DeviceListStatusEnumSchema,
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
export type DeviceList = z.infer<typeof DeviceListSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { DeviceListSchema } from "./DeviceList";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -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>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export const SetupResponseSchema = z.object({
|
|
8
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
|
-
|
|
9
|
+
expires_in: z.number().int(),
|
|
10
10
|
provisioning_uri: z.string(),
|
|
11
11
|
qr_code_base64: z.string(),
|
|
12
|
-
|
|
12
|
+
secret: z.string(),
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export type SetupResponse = z.infer<typeof SetupResponseSchema>;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export const TotpVerifyUserSchema = z.object({
|
|
8
|
-
|
|
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(),
|
|
9
12
|
email: z.email(),
|
|
10
13
|
first_name: z.string().max(50).optional(),
|
|
11
|
-
last_name: z.string().max(50).optional(),
|
|
12
14
|
full_name: z.string(),
|
|
15
|
+
id: z.number().int(),
|
|
13
16
|
initials: z.string(),
|
|
14
|
-
display_username: z.string(),
|
|
15
|
-
company: z.string().max(100).optional(),
|
|
16
|
-
phone: z.string().max(20).optional(),
|
|
17
|
-
position: z.string().max(100).optional(),
|
|
18
|
-
language: z.string().max(10).optional(),
|
|
19
|
-
avatar: z.string().nullable(),
|
|
20
17
|
is_staff: z.boolean(),
|
|
21
18
|
is_superuser: z.boolean(),
|
|
22
|
-
|
|
19
|
+
language: z.string().max(10).optional(),
|
|
23
20
|
last_login: z.string().datetime({ offset: true }).nullable(),
|
|
24
|
-
|
|
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
25
|
});
|
|
26
26
|
|
|
27
27
|
export type TotpVerifyUser = z.infer<typeof TotpVerifyUserSchema>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export const VerifyBackupRequestSchema = z.object({
|
|
8
|
-
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),
|
|
9
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
10
|
});
|
|
11
11
|
|
|
12
12
|
export type VerifyBackupRequest = z.infer<typeof VerifyBackupRequestSchema>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export const VerifyRequestSchema = z.object({
|
|
8
|
-
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),
|
|
9
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
10
|
});
|
|
11
11
|
|
|
12
12
|
export type VerifyRequest = z.infer<typeof VerifyRequestSchema>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
// AUTO-GENERATED by
|
|
1
|
+
// AUTO-GENERATED by cmdop_server / devtools.generator.ts_extras
|
|
2
2
|
// Source: OpenAPI 3.1 components.schemas
|
|
3
|
-
// DO NOT EDIT — re-run `make gen`.
|
|
3
|
+
// DO NOT EDIT — re-run `make gen-clients`.
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { TotpVerifyUserSchema } from "./TotpVerifyUser";
|
|
7
7
|
|
|
8
8
|
export const VerifyResponseSchema = z.object({
|
|
9
|
-
message: z.string(),
|
|
10
9
|
access_token: z.string(),
|
|
10
|
+
message: z.string(),
|
|
11
11
|
refresh_token: z.string(),
|
|
12
|
-
user: TotpVerifyUserSchema,
|
|
13
12
|
remaining_backup_codes: z.number().int().optional(),
|
|
13
|
+
user: TotpVerifyUserSchema,
|
|
14
14
|
warning: z.string().optional(),
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -2,29 +2,27 @@
|
|
|
2
2
|
// Top-level barrel — one singleton API per group, baseUrl from Next.js env.
|
|
3
3
|
// DO NOT EDIT — re-run `make gen`.
|
|
4
4
|
|
|
5
|
-
import { API as CfgAccountsAPI, LocalStorageAdapter as CfgAccountsStorage } from './
|
|
6
|
-
import { API as CfgCentrifugoAPI, LocalStorageAdapter as CfgCentrifugoStorage } from './
|
|
7
|
-
import { API as CfgTotpAPI, LocalStorageAdapter as CfgTotpStorage } from './
|
|
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
8
|
|
|
9
9
|
const isStaticBuild = process.env.NEXT_PUBLIC_STATIC_BUILD === 'true';
|
|
10
10
|
const baseUrl = isStaticBuild ? '' : process.env.NEXT_PUBLIC_API_URL || '';
|
|
11
11
|
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
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
15
|
|
|
16
16
|
// API wrapper classes — for users who need to construct their own
|
|
17
17
|
// instance (e.g. with MemoryStorageAdapter in SSR/tests).
|
|
18
|
-
export { API as CfgAccountsAPI } from './
|
|
19
|
-
export { API as CfgCentrifugoAPI } from './
|
|
20
|
-
export { API as CfgTotpAPI } from './
|
|
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
21
|
|
|
22
22
|
// Hey API SDK classes — one per OpenAPI tag. Lets consumers call
|
|
23
23
|
// `Centrifugo.cfgCentrifugoAuthTokenRetrieve({...})` directly without
|
|
24
24
|
// going through the wrapper singleton.
|
|
25
|
-
|
|
26
|
-
export { Centrifugo, CentrifugoAuth } from './cfg_centrifugo';
|
|
27
|
-
export { Totp, BackupCodes, TotpManagement, TotpSetup, TotpVerification } from './cfg_totp';
|
|
25
|
+
|
|
28
26
|
|
|
29
27
|
// Shared utilities (errors, storage adapters, logger).
|
|
30
|
-
export * from './
|
|
28
|
+
export * from './helpers';
|