@djangocfg/api 2.1.215 → 2.1.216
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 +101 -99
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +101 -99
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +164 -158
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +164 -158
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +176 -170
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +248 -242
- package/dist/clients.d.ts +248 -242
- package/dist/clients.mjs +176 -170
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +59 -57
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +56 -54
- package/dist/hooks.d.ts +56 -54
- package/dist/hooks.mjs +59 -57
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +140 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +110 -68
- package/dist/index.d.ts +110 -68
- package/dist/index.mjs +140 -120
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/.claude/.sidecar/activity.jsonl +4 -0
- package/src/.claude/.sidecar/history/2026-03-13.md +28 -0
- package/src/.claude/.sidecar/map_cache.json +50 -0
- package/src/.claude/.sidecar/review.md +28 -0
- package/src/.claude/.sidecar/scan.log +3 -0
- package/src/.claude/.sidecar/tasks/T-001.md +18 -0
- package/src/.claude/.sidecar/tasks/T-002.md +18 -0
- package/src/.claude/.sidecar/tasks/T-003.md +18 -0
- package/src/.claude/.sidecar/tasks/T-004.md +18 -0
- package/src/.claude/.sidecar/usage.json +5 -0
- package/src/.claude/project-map.md +34 -0
- package/src/_api/BaseClient.ts +22 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/hooks/accounts__user_profile.ts +3 -3
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts +1 -1
- package/src/_api/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts +20 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts +1 -1
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts +1 -1
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts +1 -1
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts +1 -1
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +1 -1
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/User.schema.ts +1 -1
- package/src/{generated → _api/generated}/cfg_accounts/accounts__oauth/models.ts +49 -25
- package/src/{generated → _api/generated}/cfg_accounts/http.ts +26 -0
- package/src/{generated → _api/generated}/cfg_accounts/index.ts +5 -1
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts +4 -4
- package/src/{generated/cfg_totp → _api/generated/cfg_centrifugo}/http.ts +26 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/index.ts +5 -1
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts +1 -1
- package/src/{generated/cfg_centrifugo → _api/generated/cfg_totp}/http.ts +26 -0
- package/src/{generated → _api/generated}/cfg_totp/index.ts +5 -1
- package/src/_api/index.ts +23 -0
- package/src/auth/context/AccountsContext.tsx +3 -3
- package/src/clients.ts +16 -16
- package/src/hooks/accounts.ts +1 -1
- package/src/index.ts +6 -6
- package/src/server.ts +5 -5
- package/src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts +0 -20
- package/src/{generated → _api/generated}/cfg_accounts/CLAUDE.md +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/fetchers/accounts.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/fetchers/accounts__auth.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/fetchers/accounts__oauth.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/fetchers/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/hooks/accounts.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/hooks/accounts__auth.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/hooks/accounts__oauth.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/hooks/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OAuthError.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts/models.ts +20 -20
- package/src/{generated → _api/generated}/cfg_accounts/accounts__auth/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts__auth/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts__auth/models.ts +5 -5
- package/src/{generated → _api/generated}/cfg_accounts/accounts__oauth/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts__oauth/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts__user_profile/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts__user_profile/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/accounts__user_profile/models.ts +12 -12
- package/src/{generated → _api/generated}/cfg_accounts/api-instance.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/enums.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/errors.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/logger.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/retry.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/schema.json +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/storage.ts +0 -0
- package/src/{generated → _api/generated}/cfg_accounts/validation-events.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/CLAUDE.md +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/fetchers/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/hooks/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/Publish.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/_utils/schemas/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/api-instance.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +74 -74
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_auth/models.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +61 -61
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +25 -25
- package/src/{generated → _api/generated}/cfg_centrifugo/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/errors.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/logger.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/retry.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/schema.json +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/storage.ts +0 -0
- package/src/{generated → _api/generated}/cfg_centrifugo/validation-events.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/CLAUDE.md +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/fetchers/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/fetchers/totp.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/fetchers/totp__backup_codes.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/fetchers/totp__totp_management.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/fetchers/totp__totp_setup.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/fetchers/totp__totp_verification.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/hooks/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/hooks/totp.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/hooks/totp__backup_codes.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/hooks/totp__totp_management.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/hooks/totp__totp_setup.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/hooks/totp__totp_verification.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/DeviceList.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/DisableRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/PaginatedDeviceListResponseList.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/SetupRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/SetupResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/VerifyRequest.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/VerifyResponse.schema.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/_utils/schemas/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/api-instance.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/enums.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/errors.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/logger.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/retry.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/schema.json +0 -0
- package/src/{generated → _api/generated}/cfg_totp/storage.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp/models.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__backup_codes/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__backup_codes/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__backup_codes/models.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_management/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_management/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_management/models.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_setup/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_setup/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_setup/models.ts +23 -23
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_verification/client.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_verification/index.ts +0 -0
- package/src/{generated → _api/generated}/cfg_totp/totp__totp_verification/models.ts +12 -12
- /package/src/{generated → _api/generated}/cfg_totp/validation-events.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/api",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.216",
|
|
4
4
|
"description": "Auto-generated TypeScript API client with React hooks, SWR integration, and Zod validation for Django REST Framework backends",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"django",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/node": "^24.7.2",
|
|
86
86
|
"@types/react": "^19.0.0",
|
|
87
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
87
|
+
"@djangocfg/typescript-config": "^2.1.216",
|
|
88
88
|
"next": "^16.0.0",
|
|
89
89
|
"react": "^19.0.0",
|
|
90
90
|
"tsup": "^8.5.0",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{"ts":"2026-03-13T14:54:06.216544Z","action":"map","tokens":2824,"model":"deepseek/deepseek-v3.2-20251201","details":{"directories":12,"entry_points":14}}
|
|
2
|
+
{"ts":"2026-03-13T14:54:34.414020Z","action":"update_check","tokens":0,"model":"deepseek/deepseek-v3.2","details":{}}
|
|
3
|
+
{"ts":"2026-03-13T14:55:05.263102Z","action":"review","tokens":2077,"model":"deepseek/deepseek-v3.2","details":{"items_found":4}}
|
|
4
|
+
{"ts":"2026-03-13T14:55:15.072208Z","action":"map","tokens":0,"model":"cache","details":{"directories":12,"entry_points":11}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Sidecar Review -- 2026-03-13T14:55:05.261214+00:00
|
|
2
|
+
|
|
3
|
+
## Contradictions
|
|
4
|
+
|
|
5
|
+
- [?] The project map's summary describes the project as a 'Shared TypeScript API client library for Django CFG services', but recent commits (e.g., 'feat(frontend-monitor): add Sentry-like browser error and event collection') indicate the project contains frontend monitoring features, which suggests a broader scope than just an API client library.
|
|
6
|
+
Files: .claude/project-map.md
|
|
7
|
+
Action: Review and update the project summary to accurately reflect the full scope of the project, including frontend utilities and monitoring features.
|
|
8
|
+
(id: e7481d45af8d)
|
|
9
|
+
|
|
10
|
+
## Missing Documentation
|
|
11
|
+
|
|
12
|
+
- [?] The project map lists a 'server.ts' entry point, but there is no corresponding 'server' directory documented in the structure. Recent commits mention 'django-ogimage' and 'frontend-monitor' features, which are not represented in the documented structure.
|
|
13
|
+
Files: .claude/project-map.md
|
|
14
|
+
Action: Update the project map to include all top-level source directories and their purposes, especially for new features like 'frontend-monitor' and 'django-ogimage'.
|
|
15
|
+
(id: 5421de290ecc)
|
|
16
|
+
|
|
17
|
+
- [~] The project map's 'Structure' section lists '_api/generated/' directories but does not document the root '_api' directory's purpose or structure. The 'hooks/' directory is listed but lacks any sub-structure documentation.
|
|
18
|
+
Files: .claude/project-map.md
|
|
19
|
+
Action: Expand the project map to describe the purpose of the '_api' directory and detail the internal structure of the 'hooks/' directory.
|
|
20
|
+
(id: 16b002809cdb)
|
|
21
|
+
|
|
22
|
+
- [!] No dependencies (pyproject.toml, package.json, requirements.txt) were detected for analysis, but the project is described as a TypeScript package. The lack of dependency documentation is a critical gap for understanding the project's requirements and tech stack.
|
|
23
|
+
Files: .claude/project-map.md
|
|
24
|
+
Action: Ensure dependency files (e.g., package.json) exist and are correctly located, then update the documentation analysis to include them for accurate dependency checking.
|
|
25
|
+
(id: 8209bc5ebfd8)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
Model: deepseek/deepseek-v3.2 | Tokens: 2077
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
".": {
|
|
3
|
+
"hash": "dce90cd429fe0655",
|
|
4
|
+
"annotation": "Primary package entry points for client, server, and combined API exports."
|
|
5
|
+
},
|
|
6
|
+
"_api/generated/cfg_accounts": {
|
|
7
|
+
"hash": "ee7e622ee1adb5d6",
|
|
8
|
+
"annotation": "Auto-generated TypeScript client for the accounts service API."
|
|
9
|
+
},
|
|
10
|
+
"_api/generated/cfg_centrifugo": {
|
|
11
|
+
"hash": "48afdc29ad6c6f4e",
|
|
12
|
+
"annotation": "Auto-generated TypeScript client for the Centrifugo real-time service API."
|
|
13
|
+
},
|
|
14
|
+
"_api/generated/cfg_totp": {
|
|
15
|
+
"hash": "ee7e622ee1adb5d6",
|
|
16
|
+
"annotation": "Auto-generated TypeScript client for the TOTP two-factor authentication service API."
|
|
17
|
+
},
|
|
18
|
+
"auth": {
|
|
19
|
+
"hash": "6477ace2312a963f",
|
|
20
|
+
"annotation": "Core authentication module with React contexts, hooks, and server utilities."
|
|
21
|
+
},
|
|
22
|
+
"auth/context": {
|
|
23
|
+
"hash": "d8518d434f50800b",
|
|
24
|
+
"annotation": "React context providers and types for authentication and account state."
|
|
25
|
+
},
|
|
26
|
+
"auth/hooks": {
|
|
27
|
+
"hash": "e680cd0b828bfa4b",
|
|
28
|
+
"annotation": "Custom React hooks for authentication forms, guards, validation, and API integration."
|
|
29
|
+
},
|
|
30
|
+
"auth/middlewares": {
|
|
31
|
+
"hash": "596c7611c84412d2",
|
|
32
|
+
"annotation": "Authentication middleware for token refresh and request proxying."
|
|
33
|
+
},
|
|
34
|
+
"auth/types": {
|
|
35
|
+
"hash": "eb626cbe01a78813",
|
|
36
|
+
"annotation": "TypeScript type definitions for authentication forms and state."
|
|
37
|
+
},
|
|
38
|
+
"auth/utils": {
|
|
39
|
+
"hash": "c29a2c29776dabed",
|
|
40
|
+
"annotation": "Shared utilities for logging, error handling, validation, and analytics."
|
|
41
|
+
},
|
|
42
|
+
"hooks": {
|
|
43
|
+
"hash": "3acd5f369e44d711",
|
|
44
|
+
"annotation": "General-purpose React hooks for account management."
|
|
45
|
+
},
|
|
46
|
+
"auth/__tests__": {
|
|
47
|
+
"hash": "c1e1582d095d63cf",
|
|
48
|
+
"annotation": "Unit tests for authentication hooks and components."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Sidecar Review -- 2026-03-13T14:55:05.261214+00:00
|
|
2
|
+
|
|
3
|
+
## Contradictions
|
|
4
|
+
|
|
5
|
+
- [?] The project map's summary describes the project as a 'Shared TypeScript API client library for Django CFG services', but recent commits (e.g., 'feat(frontend-monitor): add Sentry-like browser error and event collection') indicate the project contains frontend monitoring features, which suggests a broader scope than just an API client library.
|
|
6
|
+
Files: .claude/project-map.md
|
|
7
|
+
Action: Review and update the project summary to accurately reflect the full scope of the project, including frontend utilities and monitoring features.
|
|
8
|
+
(id: e7481d45af8d)
|
|
9
|
+
|
|
10
|
+
## Missing Documentation
|
|
11
|
+
|
|
12
|
+
- [?] The project map lists a 'server.ts' entry point, but there is no corresponding 'server' directory documented in the structure. Recent commits mention 'django-ogimage' and 'frontend-monitor' features, which are not represented in the documented structure.
|
|
13
|
+
Files: .claude/project-map.md
|
|
14
|
+
Action: Update the project map to include all top-level source directories and their purposes, especially for new features like 'frontend-monitor' and 'django-ogimage'.
|
|
15
|
+
(id: 5421de290ecc)
|
|
16
|
+
|
|
17
|
+
- [~] The project map's 'Structure' section lists '_api/generated/' directories but does not document the root '_api' directory's purpose or structure. The 'hooks/' directory is listed but lacks any sub-structure documentation.
|
|
18
|
+
Files: .claude/project-map.md
|
|
19
|
+
Action: Expand the project map to describe the purpose of the '_api' directory and detail the internal structure of the 'hooks/' directory.
|
|
20
|
+
(id: 16b002809cdb)
|
|
21
|
+
|
|
22
|
+
- [!] No dependencies (pyproject.toml, package.json, requirements.txt) were detected for analysis, but the project is described as a TypeScript package. The lack of dependency documentation is a critical gap for understanding the project's requirements and tech stack.
|
|
23
|
+
Files: .claude/project-map.md
|
|
24
|
+
Action: Ensure dependency files (e.g., package.json) exist and are correctly located, then update the documentation analysis to include them for accurate dependency checking.
|
|
25
|
+
(id: 8209bc5ebfd8)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
Model: deepseek/deepseek-v3.2 | Tokens: 2077
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
context_files:
|
|
3
|
+
- .claude/project-map.md
|
|
4
|
+
created_at: '2026-03-13T14:55:05.266022Z'
|
|
5
|
+
id: T-001
|
|
6
|
+
priority: medium
|
|
7
|
+
source: sidecar_review
|
|
8
|
+
source_item_id: 5421de290ecc
|
|
9
|
+
status: pending
|
|
10
|
+
title: '[gap] The project map lists a ''server.ts'' entry point, but there is no corresponding
|
|
11
|
+
'''
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
The project map lists a 'server.ts' entry point, but there is no corresponding 'server' directory documented in the structure. Recent commits mention 'django-ogimage' and 'frontend-monitor' features, which are not represented in the documented structure.
|
|
15
|
+
|
|
16
|
+
**Files:** .claude/project-map.md
|
|
17
|
+
|
|
18
|
+
**Action:** Update the project map to include all top-level source directories and their purposes, especially for new features like 'frontend-monitor' and 'django-ogimage'.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
context_files:
|
|
3
|
+
- .claude/project-map.md
|
|
4
|
+
created_at: '2026-03-13T14:55:05.268597Z'
|
|
5
|
+
id: T-002
|
|
6
|
+
priority: low
|
|
7
|
+
source: sidecar_review
|
|
8
|
+
source_item_id: 16b002809cdb
|
|
9
|
+
status: pending
|
|
10
|
+
title: '[gap] The project map''s ''Structure'' section lists ''_api/generated/'' directories
|
|
11
|
+
but do'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
The project map's 'Structure' section lists '_api/generated/' directories but does not document the root '_api' directory's purpose or structure. The 'hooks/' directory is listed but lacks any sub-structure documentation.
|
|
15
|
+
|
|
16
|
+
**Files:** .claude/project-map.md
|
|
17
|
+
|
|
18
|
+
**Action:** Expand the project map to describe the purpose of the '_api' directory and detail the internal structure of the 'hooks/' directory.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
context_files:
|
|
3
|
+
- .claude/project-map.md
|
|
4
|
+
created_at: '2026-03-13T14:55:05.269247Z'
|
|
5
|
+
id: T-003
|
|
6
|
+
priority: medium
|
|
7
|
+
source: sidecar_review
|
|
8
|
+
source_item_id: e7481d45af8d
|
|
9
|
+
status: pending
|
|
10
|
+
title: '[contradiction] The project map''s summary describes the project as a ''Shared
|
|
11
|
+
TypeScript API clie'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
The project map's summary describes the project as a 'Shared TypeScript API client library for Django CFG services', but recent commits (e.g., 'feat(frontend-monitor): add Sentry-like browser error and event collection') indicate the project contains frontend monitoring features, which suggests a broader scope than just an API client library.
|
|
15
|
+
|
|
16
|
+
**Files:** .claude/project-map.md
|
|
17
|
+
|
|
18
|
+
**Action:** Review and update the project summary to accurately reflect the full scope of the project, including frontend utilities and monitoring features.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
context_files:
|
|
3
|
+
- .claude/project-map.md
|
|
4
|
+
created_at: '2026-03-13T14:55:05.269870Z'
|
|
5
|
+
id: T-004
|
|
6
|
+
priority: high
|
|
7
|
+
source: sidecar_review
|
|
8
|
+
source_item_id: 8209bc5ebfd8
|
|
9
|
+
status: pending
|
|
10
|
+
title: '[gap] No dependencies (pyproject.toml, package.json, requirements.txt) were
|
|
11
|
+
detected f'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
No dependencies (pyproject.toml, package.json, requirements.txt) were detected for analysis, but the project is described as a TypeScript package. The lack of dependency documentation is a critical gap for understanding the project's requirements and tech stack.
|
|
15
|
+
|
|
16
|
+
**Files:** .claude/project-map.md
|
|
17
|
+
|
|
18
|
+
**Action:** Ensure dependency files (e.g., package.json) exist and are correctly located, then update the documentation analysis to include them for accurate dependency checking.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Project Map
|
|
2
|
+
> typescript-package — Shared TypeScript API client library for Django CFG services with authentication and real-time features.
|
|
3
|
+
> Generated: 2026-03-13T14:55:15.070316+00:00
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
- `_api/generated/cfg_accounts/` — Auto-generated TypeScript client for the accounts service API. **[entry: index.ts]**
|
|
8
|
+
- `_api/generated/cfg_centrifugo/` — Auto-generated TypeScript client for the Centrifugo real-time service API. **[entry: index.ts]**
|
|
9
|
+
- `_api/generated/cfg_totp/` — Auto-generated TypeScript client for the TOTP two-factor authentication service API. **[entry: index.ts]**
|
|
10
|
+
- `auth/` — Core authentication module with React contexts, hooks, and server utilities. **[entry: index.ts]**
|
|
11
|
+
- `auth/__tests__/` — Unit tests for authentication hooks and components.
|
|
12
|
+
- `auth/context/` — React context providers and types for authentication and account state. **[entry: index.ts]**
|
|
13
|
+
- `auth/hooks/` — Custom React hooks for authentication forms, guards, validation, and API integration. **[entry: index.ts]**
|
|
14
|
+
- `auth/middlewares/` — Authentication middleware for token refresh and request proxying. **[entry: index.ts]**
|
|
15
|
+
- `auth/types/` — TypeScript type definitions for authentication forms and state. **[entry: index.ts]**
|
|
16
|
+
- `auth/utils/` — Shared utilities for logging, error handling, validation, and analytics. **[entry: index.ts]**
|
|
17
|
+
- `hooks/` — General-purpose React hooks for account management. **[entry: index.ts]**
|
|
18
|
+
|
|
19
|
+
## Entry Points
|
|
20
|
+
|
|
21
|
+
- `./index.ts`
|
|
22
|
+
- `_api/generated/cfg_accounts/index.ts`
|
|
23
|
+
- `_api/generated/cfg_centrifugo/index.ts`
|
|
24
|
+
- `_api/generated/cfg_totp/index.ts`
|
|
25
|
+
- `auth/index.ts`
|
|
26
|
+
- `auth/context/index.ts`
|
|
27
|
+
- `auth/hooks/index.ts`
|
|
28
|
+
- `auth/middlewares/index.ts`
|
|
29
|
+
- `auth/types/index.ts`
|
|
30
|
+
- `auth/utils/index.ts`
|
|
31
|
+
- `hooks/index.ts`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
Model: cache | Tokens: 0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { API as AccountsAPIClass, LocalStorageAdapter, MemoryStorageAdapter } from './generated/cfg_accounts';
|
|
2
|
+
import { API as CentrifugoAPIClass } from './generated/cfg_centrifugo';
|
|
3
|
+
import { API as TotpAPIClass } from './generated/cfg_totp';
|
|
4
|
+
|
|
5
|
+
const isStaticBuild = process.env.NEXT_PUBLIC_STATIC_BUILD === 'true';
|
|
6
|
+
const apiUrl = isStaticBuild ? '' : process.env.NEXT_PUBLIC_API_URL || '';
|
|
7
|
+
const storage = new LocalStorageAdapter();
|
|
8
|
+
|
|
9
|
+
export const apiAccounts = new AccountsAPIClass(apiUrl, { storage });
|
|
10
|
+
export const apiTotp = new TotpAPIClass(apiUrl, { storage });
|
|
11
|
+
export const apiCentrifugo = new CentrifugoAPIClass(apiUrl, { storage });
|
|
12
|
+
|
|
13
|
+
/** Legacy singleton kept for backwards compatibility */
|
|
14
|
+
export const api = apiAccounts;
|
|
15
|
+
|
|
16
|
+
export class BaseClient {
|
|
17
|
+
protected static api = apiAccounts;
|
|
18
|
+
protected static apiTotp = apiTotp;
|
|
19
|
+
protected static apiCentrifugo = apiCentrifugo;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { LocalStorageAdapter, MemoryStorageAdapter };
|
package/src/{generated → _api/generated}/cfg_accounts/_utils/hooks/accounts__user_profile.ts
RENAMED
|
@@ -90,7 +90,7 @@ export function usePartialUpdateAccountsProfilePartialUpdate() {
|
|
|
90
90
|
return async (data: UserProfileUpdateRequest, client?: API): Promise<User> => {
|
|
91
91
|
const result = await Fetchers.partialUpdateAccountsProfilePartialUpdate(data, client)
|
|
92
92
|
// Revalidate related queries
|
|
93
|
-
mutate('cfg-accounts-profile
|
|
93
|
+
mutate('cfg-accounts-profile')
|
|
94
94
|
return result
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -108,7 +108,7 @@ export function usePartialUpdateAccountsProfilePartialPartialUpdate() {
|
|
|
108
108
|
return async (data?: PatchedUserProfileUpdateRequest, client?: API): Promise<User> => {
|
|
109
109
|
const result = await Fetchers.partialUpdateAccountsProfilePartialPartialUpdate(data, client)
|
|
110
110
|
// Revalidate related queries
|
|
111
|
-
mutate('cfg-accounts-profile-partial
|
|
111
|
+
mutate('cfg-accounts-profile-partial')
|
|
112
112
|
return result
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -144,7 +144,7 @@ export function usePartialUpdateAccountsProfileUpdatePartialUpdate() {
|
|
|
144
144
|
return async (data?: PatchedUserProfileUpdateRequest, client?: API): Promise<User> => {
|
|
145
145
|
const result = await Fetchers.partialUpdateAccountsProfileUpdatePartialUpdate(data, client)
|
|
146
146
|
// Revalidate related queries
|
|
147
|
-
mutate('cfg-accounts-profile
|
|
147
|
+
mutate('cfg-accounts-profile')
|
|
148
148
|
return result
|
|
149
149
|
}
|
|
150
150
|
}
|
package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts
RENAMED
|
@@ -11,7 +11,7 @@ import { z } from 'zod'
|
|
|
11
11
|
*/
|
|
12
12
|
export const CentrifugoTokenSchema = z.object({
|
|
13
13
|
token: z.string(),
|
|
14
|
-
centrifugo_url: z.string()
|
|
14
|
+
centrifugo_url: z.string(),
|
|
15
15
|
expires_at: z.string().datetime({ offset: true }),
|
|
16
16
|
channels: z.array(z.string()),
|
|
17
17
|
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for OAuthAuthorizeRequestRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Request to start OAuth flow.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Request to start OAuth flow.
|
|
11
|
+
*/
|
|
12
|
+
export const OAuthAuthorizeRequestRequestSchema = z.object({
|
|
13
|
+
redirect_uri: z.string().optional(),
|
|
14
|
+
source_url: z.string().optional(),
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Infer TypeScript type from Zod schema
|
|
19
|
+
*/
|
|
20
|
+
export type OAuthAuthorizeRequestRequest = z.infer<typeof OAuthAuthorizeRequestRequestSchema>
|
|
@@ -10,7 +10,7 @@ import { z } from 'zod'
|
|
|
10
10
|
* Response with OAuth authorization URL.
|
|
11
11
|
*/
|
|
12
12
|
export const OAuthAuthorizeResponseSchema = z.object({
|
|
13
|
-
authorization_url: z.string()
|
|
13
|
+
authorization_url: z.string(),
|
|
14
14
|
state: z.string(),
|
|
15
15
|
})
|
|
16
16
|
|
|
@@ -12,7 +12,7 @@ import { z } from 'zod'
|
|
|
12
12
|
export const OAuthCallbackRequestRequestSchema = z.object({
|
|
13
13
|
code: z.string().min(10).max(500),
|
|
14
14
|
state: z.string().min(20).max(100),
|
|
15
|
-
redirect_uri: z.string().
|
|
15
|
+
redirect_uri: z.string().optional(),
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
/**
|
package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
RENAMED
|
@@ -16,7 +16,7 @@ export const OAuthConnectionSchema = z.object({
|
|
|
16
16
|
provider_display: z.string(),
|
|
17
17
|
provider_username: z.string(),
|
|
18
18
|
provider_email: z.email(),
|
|
19
|
-
provider_avatar_url: z.string()
|
|
19
|
+
provider_avatar_url: z.string(),
|
|
20
20
|
connected_at: z.string().datetime({ offset: true }),
|
|
21
21
|
last_login_at: z.string().datetime({ offset: true }),
|
|
22
22
|
})
|
package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
RENAMED
|
@@ -13,7 +13,7 @@ import * as Enums from '../../enums'
|
|
|
13
13
|
export const OTPRequestRequestSchema = z.object({
|
|
14
14
|
identifier: z.string().min(1),
|
|
15
15
|
channel: z.nativeEnum(Enums.OTPRequestRequestChannel).optional(),
|
|
16
|
-
source_url: z.string().
|
|
16
|
+
source_url: z.string().optional(),
|
|
17
17
|
})
|
|
18
18
|
|
|
19
19
|
/**
|
package/src/{generated → _api/generated}/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts
RENAMED
|
@@ -14,7 +14,7 @@ export const OTPVerifyRequestSchema = z.object({
|
|
|
14
14
|
identifier: z.string().min(1),
|
|
15
15
|
otp: z.string().min(6).max(6),
|
|
16
16
|
channel: z.nativeEnum(Enums.OTPRequestRequestChannel).optional(),
|
|
17
|
-
source_url: z.string().
|
|
17
|
+
source_url: z.string().optional(),
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -22,7 +22,7 @@ export const UserSchema = z.object({
|
|
|
22
22
|
phone: z.string().max(20).optional(),
|
|
23
23
|
position: z.string().max(100).optional(),
|
|
24
24
|
language: z.string().max(10).optional(),
|
|
25
|
-
avatar: z.string().
|
|
25
|
+
avatar: z.string().nullable(),
|
|
26
26
|
is_staff: z.boolean(),
|
|
27
27
|
is_superuser: z.boolean(),
|
|
28
28
|
date_joined: z.string().datetime({ offset: true }),
|
|
@@ -2,18 +2,6 @@
|
|
|
2
2
|
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
3
3
|
import * as Enums from "../enums";
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Request to disconnect OAuth provider.
|
|
7
|
-
*
|
|
8
|
-
* Request model (no read-only fields).
|
|
9
|
-
*/
|
|
10
|
-
export interface OAuthDisconnectRequestRequest {
|
|
11
|
-
/** OAuth provider to disconnect
|
|
12
|
-
|
|
13
|
-
* `github` - GitHub */
|
|
14
|
-
provider: Enums.OAuthConnectionProvider;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
5
|
/**
|
|
18
6
|
* Error response for OAuth endpoints.
|
|
19
7
|
*
|
|
@@ -26,6 +14,20 @@ export interface OAuthError {
|
|
|
26
14
|
error_description?: string;
|
|
27
15
|
}
|
|
28
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Request to complete OAuth flow (callback handler).
|
|
19
|
+
*
|
|
20
|
+
* Request model (no read-only fields).
|
|
21
|
+
*/
|
|
22
|
+
export interface OAuthCallbackRequestRequest {
|
|
23
|
+
/** Authorization code from OAuth provider callback */
|
|
24
|
+
code: string;
|
|
25
|
+
/** State token for CSRF verification (from authorize response) */
|
|
26
|
+
state: string;
|
|
27
|
+
/** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
|
|
28
|
+
redirect_uri?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
29
31
|
/**
|
|
30
32
|
* Request to start OAuth flow.
|
|
31
33
|
*
|
|
@@ -51,17 +53,13 @@ export interface OAuthAuthorizeResponse {
|
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
/**
|
|
54
|
-
*
|
|
56
|
+
* Response with available OAuth providers.
|
|
55
57
|
*
|
|
56
|
-
*
|
|
58
|
+
* Response model (includes read-only fields).
|
|
57
59
|
*/
|
|
58
|
-
export interface
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
/** State token for CSRF verification (from authorize response) */
|
|
62
|
-
state: string;
|
|
63
|
-
/** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
|
|
64
|
-
redirect_uri?: string;
|
|
60
|
+
export interface OAuthProvidersResponse {
|
|
61
|
+
/** List of available OAuth providers */
|
|
62
|
+
providers: Array<Record<string, any>>;
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
/**
|
|
@@ -92,12 +90,38 @@ export interface OAuthTokenResponse {
|
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
/**
|
|
95
|
-
*
|
|
93
|
+
* Request to disconnect OAuth provider.
|
|
94
|
+
*
|
|
95
|
+
* Request model (no read-only fields).
|
|
96
|
+
*/
|
|
97
|
+
export interface OAuthDisconnectRequestRequest {
|
|
98
|
+
/** OAuth provider to disconnect
|
|
99
|
+
|
|
100
|
+
* `github` - GitHub */
|
|
101
|
+
provider: Enums.OAuthConnectionProvider;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Serializer for OAuth connection info (user-facing).
|
|
96
106
|
*
|
|
97
107
|
* Response model (includes read-only fields).
|
|
98
108
|
*/
|
|
99
|
-
export interface
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
export interface OAuthConnection {
|
|
110
|
+
id: number;
|
|
111
|
+
/** OAuth provider name (github, google, etc.)
|
|
112
|
+
|
|
113
|
+
* `github` - GitHub */
|
|
114
|
+
provider: Enums.OAuthConnectionProvider;
|
|
115
|
+
provider_display: string;
|
|
116
|
+
/** Username on the OAuth provider platform */
|
|
117
|
+
provider_username: string;
|
|
118
|
+
/** Email from OAuth provider (may differ from user.email) */
|
|
119
|
+
provider_email: string;
|
|
120
|
+
/** Avatar URL from OAuth provider */
|
|
121
|
+
provider_avatar_url: string;
|
|
122
|
+
/** When this OAuth connection was created */
|
|
123
|
+
connected_at: string;
|
|
124
|
+
/** Last time this OAuth connection was used for login */
|
|
125
|
+
last_login_at: string;
|
|
102
126
|
}
|
|
103
127
|
|
|
@@ -108,4 +108,30 @@ export class FetchAdapter implements HttpClientAdapter {
|
|
|
108
108
|
headers: responseHeaders,
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* FetchAdapter with keepalive:true.
|
|
115
|
+
*
|
|
116
|
+
* Use this adapter when you need requests to survive page unload
|
|
117
|
+
* (visibilitychange / beforeunload) — the browser will complete the request
|
|
118
|
+
* even after the page is navigated away. Typical use: monitor / analytics flush.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* import { APIClient, KeepAliveFetchAdapter } from './client';
|
|
123
|
+
* const client = new APIClient(baseUrl, { httpClient: new KeepAliveFetchAdapter() });
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export class KeepAliveFetchAdapter extends FetchAdapter {
|
|
127
|
+
async request<T = any>(request: HttpRequest): Promise<HttpResponse<T>> {
|
|
128
|
+
const origFetch = globalThis.fetch;
|
|
129
|
+
globalThis.fetch = (input: RequestInfo | URL, init?: RequestInit) =>
|
|
130
|
+
origFetch(input, { ...init, keepalive: true });
|
|
131
|
+
try {
|
|
132
|
+
return await super.request<T>(request);
|
|
133
|
+
} finally {
|
|
134
|
+
globalThis.fetch = origFetch;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
111
137
|
}
|
|
@@ -101,7 +101,7 @@ export { APIError, NetworkError } from "./errors";
|
|
|
101
101
|
|
|
102
102
|
// Re-export HTTP adapters for custom implementations
|
|
103
103
|
export type { HttpClientAdapter, HttpRequest, HttpResponse } from "./http";
|
|
104
|
-
export { FetchAdapter } from "./http";
|
|
104
|
+
export { FetchAdapter, KeepAliveFetchAdapter } from "./http";
|
|
105
105
|
|
|
106
106
|
// Re-export logger types and classes
|
|
107
107
|
export type { LoggerConfig, RequestLog, ResponseLog, ErrorLog } from "./logger";
|
|
@@ -131,6 +131,8 @@ function detectLocale(): string | null {
|
|
|
131
131
|
export interface APIOptions {
|
|
132
132
|
/** Custom storage adapter (defaults to LocalStorageAdapter) */
|
|
133
133
|
storage?: StorageAdapter;
|
|
134
|
+
/** Custom HTTP client adapter (defaults to FetchAdapter) */
|
|
135
|
+
httpClient?: HttpClientAdapter;
|
|
134
136
|
/** Retry configuration for failed requests */
|
|
135
137
|
retryConfig?: RetryConfig;
|
|
136
138
|
/** Logger configuration */
|
|
@@ -170,6 +172,7 @@ export class API {
|
|
|
170
172
|
|
|
171
173
|
// Initialize APIClient with token getter for URL authentication
|
|
172
174
|
this._client = new APIClient(this.baseUrl, {
|
|
175
|
+
httpClient: this.options?.httpClient,
|
|
173
176
|
retryConfig: this.options?.retryConfig,
|
|
174
177
|
loggerConfig: this.options?.loggerConfig,
|
|
175
178
|
tokenGetter: () => this.getToken(),
|
|
@@ -192,6 +195,7 @@ export class API {
|
|
|
192
195
|
|
|
193
196
|
private _reinitClients(): void {
|
|
194
197
|
this._client = new APIClient(this.baseUrl, {
|
|
198
|
+
httpClient: this.options?.httpClient,
|
|
195
199
|
retryConfig: this.options?.retryConfig,
|
|
196
200
|
loggerConfig: this.options?.loggerConfig,
|
|
197
201
|
tokenGetter: () => this.getToken(),
|
package/src/{generated → _api/generated}/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts
RENAMED
|
@@ -12,15 +12,15 @@ export class CentrifugoMonitoring {
|
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async centrifugoMonitorChannelsRetrieve(hours?: number): Promise<Models.ChannelList
|
|
16
|
-
async centrifugoMonitorChannelsRetrieve(params?: { hours?: number }): Promise<Models.ChannelList
|
|
15
|
+
async centrifugoMonitorChannelsRetrieve(hours?: number): Promise<Models.ChannelList>;
|
|
16
|
+
async centrifugoMonitorChannelsRetrieve(params?: { hours?: number }): Promise<Models.ChannelList>;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Get channel statistics
|
|
20
20
|
*
|
|
21
21
|
* Returns statistics grouped by channel.
|
|
22
22
|
*/
|
|
23
|
-
async centrifugoMonitorChannelsRetrieve(...args: any[]): Promise<Models.ChannelList
|
|
23
|
+
async centrifugoMonitorChannelsRetrieve(...args: any[]): Promise<Models.ChannelList> {
|
|
24
24
|
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
25
25
|
|
|
26
26
|
let params;
|
|
@@ -30,7 +30,7 @@ export class CentrifugoMonitoring {
|
|
|
30
30
|
params = { hours: args[0] };
|
|
31
31
|
}
|
|
32
32
|
const response = await this.client.request('GET', "/cfg/centrifugo/monitor/channels/", { params });
|
|
33
|
-
return
|
|
33
|
+
return response;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -108,4 +108,30 @@ export class FetchAdapter implements HttpClientAdapter {
|
|
|
108
108
|
headers: responseHeaders,
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* FetchAdapter with keepalive:true.
|
|
115
|
+
*
|
|
116
|
+
* Use this adapter when you need requests to survive page unload
|
|
117
|
+
* (visibilitychange / beforeunload) — the browser will complete the request
|
|
118
|
+
* even after the page is navigated away. Typical use: monitor / analytics flush.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* import { APIClient, KeepAliveFetchAdapter } from './client';
|
|
123
|
+
* const client = new APIClient(baseUrl, { httpClient: new KeepAliveFetchAdapter() });
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export class KeepAliveFetchAdapter extends FetchAdapter {
|
|
127
|
+
async request<T = any>(request: HttpRequest): Promise<HttpResponse<T>> {
|
|
128
|
+
const origFetch = globalThis.fetch;
|
|
129
|
+
globalThis.fetch = (input: RequestInfo | URL, init?: RequestInit) =>
|
|
130
|
+
origFetch(input, { ...init, keepalive: true });
|
|
131
|
+
try {
|
|
132
|
+
return await super.request<T>(request);
|
|
133
|
+
} finally {
|
|
134
|
+
globalThis.fetch = origFetch;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
111
137
|
}
|