@djangocfg/api 2.1.573 → 2.1.574

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.
Files changed (29) hide show
  1. package/dist/AccountDeleteResponse-32BGUXEK.mjs +13 -0
  2. package/dist/AccountDeleteResponse-32BGUXEK.mjs.map +1 -0
  3. package/dist/OAuthAuthorizeResponse-TQMQXACC.mjs +13 -0
  4. package/dist/OAuthAuthorizeResponse-TQMQXACC.mjs.map +1 -0
  5. package/dist/OAuthProvidersResponse-VM3YO5FZ.mjs +12 -0
  6. package/dist/OAuthProvidersResponse-VM3YO5FZ.mjs.map +1 -0
  7. package/dist/OAuthTokenResponse-ELAZFNHE.mjs +20 -0
  8. package/dist/OAuthTokenResponse-ELAZFNHE.mjs.map +1 -0
  9. package/dist/OTPRequestResponse-ZU5KRNSW.mjs +30 -0
  10. package/dist/OTPRequestResponse-ZU5KRNSW.mjs.map +1 -0
  11. package/dist/OTPVerifyResponse-LJVUP5JS.mjs +21 -0
  12. package/dist/OTPVerifyResponse-LJVUP5JS.mjs.map +1 -0
  13. package/dist/PasswordLoginResponse-A7QRJTAQ.mjs +21 -0
  14. package/dist/PasswordLoginResponse-A7QRJTAQ.mjs.map +1 -0
  15. package/dist/TokenRefresh-JAUMGIFS.mjs +13 -0
  16. package/dist/TokenRefresh-JAUMGIFS.mjs.map +1 -0
  17. package/dist/auth.cjs +0 -370
  18. package/dist/auth.cjs.map +1 -1
  19. package/dist/auth.d.cts +1 -12
  20. package/dist/auth.d.ts +1 -12
  21. package/dist/auth.mjs +3 -143
  22. package/dist/auth.mjs.map +1 -1
  23. package/dist/cfg_accounts_oauth_connections_response_200_AutoRef-ILSH4EVV.mjs +31 -0
  24. package/dist/cfg_accounts_oauth_connections_response_200_AutoRef-ILSH4EVV.mjs.map +1 -0
  25. package/dist/cfg_accounts_oauth_disconnect_response_200_AutoRef-4ZCO4CSB.mjs +12 -0
  26. package/dist/cfg_accounts_oauth_disconnect_response_200_AutoRef-4ZCO4CSB.mjs.map +1 -0
  27. package/package.json +2 -2
  28. package/src/auth/context/AccountsContext.tsx +0 -2
  29. package/src/auth/context/index.ts +1 -1
package/dist/auth.d.cts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { MutableRefObject, ReactNode } from 'react';
3
3
  import * as consola from 'consola';
4
- import { z } from 'zod';
5
4
 
6
5
  /**
7
6
  * Auth-related constants shared across the frontend.
@@ -721,16 +720,6 @@ declare const AuthProvider: React__default.MemoExoticComponent<typeof AuthProvid
721
720
  */
722
721
  declare const useAuth: () => AuthContextType;
723
722
 
724
- declare const PatchedCfgUserUpdateRequestSchema: z.ZodObject<{
725
- first_name: z.ZodOptional<z.ZodString>;
726
- last_name: z.ZodOptional<z.ZodString>;
727
- company: z.ZodOptional<z.ZodString>;
728
- phone: z.ZodOptional<z.ZodString>;
729
- position: z.ZodOptional<z.ZodString>;
730
- language: z.ZodOptional<z.ZodString>;
731
- timezone: z.ZodOptional<z.ZodString>;
732
- }, z.core.$strip>;
733
-
734
723
  interface AccountsContextValue {
735
724
  profile?: User;
736
725
  isLoadingProfile: boolean;
@@ -1440,4 +1429,4 @@ declare const Analytics: {
1440
1429
  setUser(userId: string | null): void;
1441
1430
  };
1442
1431
 
1443
- export { AUTH_CONSTANTS, AUTH_ERROR_KEYS, type AccountsContextValue, AccountsProvider, Analytics, AnalyticsCategory, type AnalyticsCategoryType, AnalyticsEvent, type AnalyticsEventType, type AnalyticsSink, type AuthConfig, AuthContext, type AuthContextType, type AuthErrorCopy, type AuthErrorKey, type AuthFormAutoSubmit, type AuthFormReturn, type AuthFormState, type AuthFormStateHandlers, type AuthFormSubmitHandlers, type AuthFormValidation, AuthProvider, type AuthProviderProps, type AuthStep, type DeleteAccountResult, type GuardInput, type OTPRequestConsent, type OTPRequestResult, type PasswordLoginOptions, type PasswordLoginResult, type PatchedCfgUserUpdateRequest, PatchedCfgUserUpdateRequestSchema, type ProfileCacheOptions, type SessionSnapshot, type SessionStatus, type TwoFactorDevice, type TwoFactorSetupData, type UseAuthFormOptions, type UseAuthFormStateReturn, type UseAutoAuthOptions, type UseDeleteAccountReturn, type UseGithubAuthOptions, type UseGithubAuthReturn, type UseTwoFactorOptions, type UseTwoFactorReturn, type UseTwoFactorSetupOptions, type UseTwoFactorSetupReturn, type UseTwoFactorStatusReturn, type UseTwoFactorVerifyOptions, type UseTwoFactorVerifyReturn, type UserProfile, type WebmailLink, authLogger, clearProfileCache, consumeSavedRedirect, decodeBase64, encodeBase64, formatAuthError, getCacheMetadata, getCachedProfile, hasValidCache, isAllowedAuthPath, isForbidden, logAuthFailure, logger, normalizePath, peekSavedRedirect, resolveAuthError, resolveGuardIsAuthenticated, resolveGuardIsLoading, setAnalyticsSink, setCachedProfile, shouldRedirectToAuth, useAccountsContext, useAuth, useAuthForm, useAuthFormState, useAuthRedirectManager, useAuthValidation, useAutoAuth, useBase64, useCfgRouter, useDeleteAccount, useGithubAuth, useLocalStorage, useQueryParams, useSession, useSessionStorage, useTwoFactor, useTwoFactorSetup, useTwoFactorStatus, useTwoFactorVerify, validateEmail, validateIdentifier };
1432
+ export { AUTH_CONSTANTS, AUTH_ERROR_KEYS, type AccountsContextValue, AccountsProvider, Analytics, AnalyticsCategory, type AnalyticsCategoryType, AnalyticsEvent, type AnalyticsEventType, type AnalyticsSink, type AuthConfig, AuthContext, type AuthContextType, type AuthErrorCopy, type AuthErrorKey, type AuthFormAutoSubmit, type AuthFormReturn, type AuthFormState, type AuthFormStateHandlers, type AuthFormSubmitHandlers, type AuthFormValidation, AuthProvider, type AuthProviderProps, type AuthStep, type DeleteAccountResult, type GuardInput, type OTPRequestConsent, type OTPRequestResult, type PasswordLoginOptions, type PasswordLoginResult, type PatchedCfgUserUpdateRequest, type ProfileCacheOptions, type SessionSnapshot, type SessionStatus, type TwoFactorDevice, type TwoFactorSetupData, type UseAuthFormOptions, type UseAuthFormStateReturn, type UseAutoAuthOptions, type UseDeleteAccountReturn, type UseGithubAuthOptions, type UseGithubAuthReturn, type UseTwoFactorOptions, type UseTwoFactorReturn, type UseTwoFactorSetupOptions, type UseTwoFactorSetupReturn, type UseTwoFactorStatusReturn, type UseTwoFactorVerifyOptions, type UseTwoFactorVerifyReturn, type UserProfile, type WebmailLink, authLogger, clearProfileCache, consumeSavedRedirect, decodeBase64, encodeBase64, formatAuthError, getCacheMetadata, getCachedProfile, hasValidCache, isAllowedAuthPath, isForbidden, logAuthFailure, logger, normalizePath, peekSavedRedirect, resolveAuthError, resolveGuardIsAuthenticated, resolveGuardIsLoading, setAnalyticsSink, setCachedProfile, shouldRedirectToAuth, useAccountsContext, useAuth, useAuthForm, useAuthFormState, useAuthRedirectManager, useAuthValidation, useAutoAuth, useBase64, useCfgRouter, useDeleteAccount, useGithubAuth, useLocalStorage, useQueryParams, useSession, useSessionStorage, useTwoFactor, useTwoFactorSetup, useTwoFactorStatus, useTwoFactorVerify, validateEmail, validateIdentifier };
package/dist/auth.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { MutableRefObject, ReactNode } from 'react';
3
3
  import * as consola from 'consola';
4
- import { z } from 'zod';
5
4
 
6
5
  /**
7
6
  * Auth-related constants shared across the frontend.
@@ -721,16 +720,6 @@ declare const AuthProvider: React__default.MemoExoticComponent<typeof AuthProvid
721
720
  */
722
721
  declare const useAuth: () => AuthContextType;
723
722
 
724
- declare const PatchedCfgUserUpdateRequestSchema: z.ZodObject<{
725
- first_name: z.ZodOptional<z.ZodString>;
726
- last_name: z.ZodOptional<z.ZodString>;
727
- company: z.ZodOptional<z.ZodString>;
728
- phone: z.ZodOptional<z.ZodString>;
729
- position: z.ZodOptional<z.ZodString>;
730
- language: z.ZodOptional<z.ZodString>;
731
- timezone: z.ZodOptional<z.ZodString>;
732
- }, z.core.$strip>;
733
-
734
723
  interface AccountsContextValue {
735
724
  profile?: User;
736
725
  isLoadingProfile: boolean;
@@ -1440,4 +1429,4 @@ declare const Analytics: {
1440
1429
  setUser(userId: string | null): void;
1441
1430
  };
1442
1431
 
1443
- export { AUTH_CONSTANTS, AUTH_ERROR_KEYS, type AccountsContextValue, AccountsProvider, Analytics, AnalyticsCategory, type AnalyticsCategoryType, AnalyticsEvent, type AnalyticsEventType, type AnalyticsSink, type AuthConfig, AuthContext, type AuthContextType, type AuthErrorCopy, type AuthErrorKey, type AuthFormAutoSubmit, type AuthFormReturn, type AuthFormState, type AuthFormStateHandlers, type AuthFormSubmitHandlers, type AuthFormValidation, AuthProvider, type AuthProviderProps, type AuthStep, type DeleteAccountResult, type GuardInput, type OTPRequestConsent, type OTPRequestResult, type PasswordLoginOptions, type PasswordLoginResult, type PatchedCfgUserUpdateRequest, PatchedCfgUserUpdateRequestSchema, type ProfileCacheOptions, type SessionSnapshot, type SessionStatus, type TwoFactorDevice, type TwoFactorSetupData, type UseAuthFormOptions, type UseAuthFormStateReturn, type UseAutoAuthOptions, type UseDeleteAccountReturn, type UseGithubAuthOptions, type UseGithubAuthReturn, type UseTwoFactorOptions, type UseTwoFactorReturn, type UseTwoFactorSetupOptions, type UseTwoFactorSetupReturn, type UseTwoFactorStatusReturn, type UseTwoFactorVerifyOptions, type UseTwoFactorVerifyReturn, type UserProfile, type WebmailLink, authLogger, clearProfileCache, consumeSavedRedirect, decodeBase64, encodeBase64, formatAuthError, getCacheMetadata, getCachedProfile, hasValidCache, isAllowedAuthPath, isForbidden, logAuthFailure, logger, normalizePath, peekSavedRedirect, resolveAuthError, resolveGuardIsAuthenticated, resolveGuardIsLoading, setAnalyticsSink, setCachedProfile, shouldRedirectToAuth, useAccountsContext, useAuth, useAuthForm, useAuthFormState, useAuthRedirectManager, useAuthValidation, useAutoAuth, useBase64, useCfgRouter, useDeleteAccount, useGithubAuth, useLocalStorage, useQueryParams, useSession, useSessionStorage, useTwoFactor, useTwoFactorSetup, useTwoFactorStatus, useTwoFactorVerify, validateEmail, validateIdentifier };
1432
+ export { AUTH_CONSTANTS, AUTH_ERROR_KEYS, type AccountsContextValue, AccountsProvider, Analytics, AnalyticsCategory, type AnalyticsCategoryType, AnalyticsEvent, type AnalyticsEventType, type AnalyticsSink, type AuthConfig, AuthContext, type AuthContextType, type AuthErrorCopy, type AuthErrorKey, type AuthFormAutoSubmit, type AuthFormReturn, type AuthFormState, type AuthFormStateHandlers, type AuthFormSubmitHandlers, type AuthFormValidation, AuthProvider, type AuthProviderProps, type AuthStep, type DeleteAccountResult, type GuardInput, type OTPRequestConsent, type OTPRequestResult, type PasswordLoginOptions, type PasswordLoginResult, type PatchedCfgUserUpdateRequest, type ProfileCacheOptions, type SessionSnapshot, type SessionStatus, type TwoFactorDevice, type TwoFactorSetupData, type UseAuthFormOptions, type UseAuthFormStateReturn, type UseAutoAuthOptions, type UseDeleteAccountReturn, type UseGithubAuthOptions, type UseGithubAuthReturn, type UseTwoFactorOptions, type UseTwoFactorReturn, type UseTwoFactorSetupOptions, type UseTwoFactorSetupReturn, type UseTwoFactorStatusReturn, type UseTwoFactorVerifyOptions, type UseTwoFactorVerifyReturn, type UserProfile, type WebmailLink, authLogger, clearProfileCache, consumeSavedRedirect, decodeBase64, encodeBase64, formatAuthError, getCacheMetadata, getCachedProfile, hasValidCache, isAllowedAuthPath, isForbidden, logAuthFailure, logger, normalizePath, peekSavedRedirect, resolveAuthError, resolveGuardIsAuthenticated, resolveGuardIsLoading, setAnalyticsSink, setCachedProfile, shouldRedirectToAuth, useAccountsContext, useAuth, useAuthForm, useAuthFormState, useAuthRedirectManager, useAuthValidation, useAutoAuth, useBase64, useCfgRouter, useDeleteAccount, useGithubAuth, useLocalStorage, useQueryParams, useSession, useSessionStorage, useTwoFactor, useTwoFactorSetup, useTwoFactorStatus, useTwoFactorVerify, validateEmail, validateIdentifier };
package/dist/auth.mjs CHANGED
@@ -1,22 +1,4 @@
1
1
  "use client";
2
- import "./chunk-X5FEPK4J.mjs";
3
- import "./chunk-NTSWD2CP.mjs";
4
- import "./chunk-SUTMTPAG.mjs";
5
- import "./chunk-XSAHOB2U.mjs";
6
- import "./chunk-6MHVHTWT.mjs";
7
- import "./chunk-K5HZ55SP.mjs";
8
- import "./chunk-OGDF6IJV.mjs";
9
- import "./chunk-AQ2RQ4BQ.mjs";
10
- import "./chunk-B22YGMM3.mjs";
11
- import "./chunk-RQDZ2EMB.mjs";
12
- import "./chunk-NZGOHTNF.mjs";
13
- import "./chunk-PDARU7RC.mjs";
14
- import "./chunk-GCRGQTJ4.mjs";
15
- import {
16
- OAuthProviderEnumSchema
17
- } from "./chunk-IPXJOS2Y.mjs";
18
- import "./chunk-YMOOSBRI.mjs";
19
- import "./chunk-AXBITHBG.mjs";
20
2
  import {
21
3
  __name
22
4
  } from "./chunk-53YKWR6F.mjs";
@@ -3978,7 +3960,7 @@ function useCfgAccountsOtpRequestCreate(config) {
3978
3960
  async (_key, { arg }) => {
3979
3961
  const res = await CfgAccountsOtp.cfgAccountsOtpRequestCreate({ ...arg, throwOnError: true });
3980
3962
  const data = res.data;
3981
- void import("./OTPRequestResponse-KKEOYXXS.mjs").then(({ OTPRequestResponseSchema }) => {
3963
+ void import("./OTPRequestResponse-ZU5KRNSW.mjs").then(({ OTPRequestResponseSchema }) => {
3982
3964
  const parsed = OTPRequestResponseSchema.safeParse(data);
3983
3965
  if (parsed.success) return;
3984
3966
  console.warn(
@@ -4027,7 +4009,7 @@ function useCfgAccountsOtpVerifyCreate(config) {
4027
4009
  async (_key, { arg }) => {
4028
4010
  const res = await CfgAccountsOtp.cfgAccountsOtpVerifyCreate({ ...arg, throwOnError: true });
4029
4011
  const data = res.data;
4030
- void import("./OTPVerifyResponse-XBXVMTO3.mjs").then(({ OTPVerifyResponseSchema }) => {
4012
+ void import("./OTPVerifyResponse-LJVUP5JS.mjs").then(({ OTPVerifyResponseSchema }) => {
4031
4013
  const parsed = OTPVerifyResponseSchema.safeParse(data);
4032
4014
  if (parsed.success) return;
4033
4015
  console.warn(
@@ -4238,7 +4220,7 @@ function useCfgAccountsTokenCreate(config) {
4238
4220
  async (_key, { arg }) => {
4239
4221
  const res = await CfgAccountsAuth.cfgAccountsTokenCreate({ ...arg, throwOnError: true });
4240
4222
  const data = res.data;
4241
- void import("./PasswordLoginResponse-3IRCBQIN.mjs").then(({ PasswordLoginResponseSchema }) => {
4223
+ void import("./PasswordLoginResponse-A7QRJTAQ.mjs").then(({ PasswordLoginResponseSchema }) => {
4242
4224
  const parsed = PasswordLoginResponseSchema.safeParse(data);
4243
4225
  if (parsed.success) return;
4244
4226
  console.warn(
@@ -4282,127 +4264,6 @@ __name(useCfgAccountsTokenCreate, "useCfgAccountsTokenCreate");
4282
4264
  // src/_api/generated/_cfg_accounts/hooks/useCfgAccountsTokenRefreshCreate.ts
4283
4265
  import useSWRMutation17 from "swr/mutation";
4284
4266
 
4285
- // src/_api/generated/_cfg_accounts/schemas/APIKeyRequest.ts
4286
- import { z } from "zod";
4287
- var APIKeyRequestSchema = z.object({
4288
- key: z.string().min(1),
4289
- reissued_at: z.string().datetime({ offset: true }).nullable(),
4290
- created_at: z.string().datetime({ offset: true })
4291
- });
4292
-
4293
- // src/_api/generated/_cfg_accounts/schemas/APIKeyTestRequest.ts
4294
- import { z as z2 } from "zod";
4295
- var APIKeyTestRequestSchema = z2.object({
4296
- key: z2.string().min(1)
4297
- });
4298
-
4299
- // src/_api/generated/_cfg_accounts/schemas/CfgUserUpdateRequest.ts
4300
- import { z as z3 } from "zod";
4301
- var CfgUserUpdateRequestSchema = z3.object({
4302
- first_name: z3.string().max(50).optional(),
4303
- last_name: z3.string().max(50).optional(),
4304
- company: z3.string().max(100).optional(),
4305
- phone: z3.string().max(20).optional(),
4306
- position: z3.string().max(100).optional(),
4307
- language: z3.string().max(10).optional(),
4308
- timezone: z3.string().max(64).optional()
4309
- });
4310
-
4311
- // src/_api/generated/_cfg_accounts/schemas/OAuthAuthorizeRequestRequest.ts
4312
- import { z as z4 } from "zod";
4313
- var OAuthAuthorizeRequestRequestSchema = z4.object({
4314
- redirect_uri: z4.url().or(z4.literal("")).optional(),
4315
- source_url: z4.url().or(z4.literal("")).optional()
4316
- });
4317
-
4318
- // src/_api/generated/_cfg_accounts/schemas/OAuthCallbackRequestRequest.ts
4319
- import { z as z5 } from "zod";
4320
- var OAuthCallbackRequestRequestSchema = z5.object({
4321
- code: z5.string().min(10).max(500),
4322
- state: z5.string().min(20).max(100),
4323
- redirect_uri: z5.url().or(z5.literal("")).optional(),
4324
- remember_me: z5.boolean().default(false).optional()
4325
- });
4326
-
4327
- // src/_api/generated/_cfg_accounts/schemas/OAuthDisconnectRequestRequest.ts
4328
- import { z as z6 } from "zod";
4329
- var OAuthDisconnectRequestRequestSchema = z6.object({
4330
- provider: OAuthProviderEnumSchema
4331
- });
4332
-
4333
- // src/_api/generated/_cfg_accounts/schemas/OAuthError.ts
4334
- import { z as z7 } from "zod";
4335
- var OAuthErrorSchema = z7.object({
4336
- error: z7.string(),
4337
- error_description: z7.string().optional()
4338
- });
4339
-
4340
- // src/_api/generated/_cfg_accounts/schemas/OTPErrorResponse.ts
4341
- import { z as z8 } from "zod";
4342
- var OTPErrorResponseSchema = z8.object({
4343
- error: z8.string(),
4344
- error_code: z8.string().nullable().optional(),
4345
- retry_after: z8.number().int().nullable().optional()
4346
- });
4347
-
4348
- // src/_api/generated/_cfg_accounts/schemas/OTPRequestRequest.ts
4349
- import { z as z9 } from "zod";
4350
- var OTPRequestRequestSchema = z9.object({
4351
- identifier: z9.string().min(1),
4352
- source_url: z9.url().or(z9.literal("")).optional(),
4353
- marketing_consent: z9.boolean().nullable().optional(),
4354
- consent_disclosure_version: z9.string().max(64).optional()
4355
- });
4356
-
4357
- // src/_api/generated/_cfg_accounts/schemas/OTPVerifyRequest.ts
4358
- import { z as z10 } from "zod";
4359
- var OTPVerifyRequestSchema = z10.object({
4360
- identifier: z10.string().min(1),
4361
- otp: z10.string().min(4).max(4),
4362
- source_url: z10.url().or(z10.literal("")).optional(),
4363
- remember_me: z10.boolean().default(false).optional()
4364
- });
4365
-
4366
- // src/_api/generated/_cfg_accounts/schemas/PasswordLoginError.ts
4367
- import { z as z11 } from "zod";
4368
- var PasswordLoginErrorSchema = z11.object({
4369
- error: z11.string(),
4370
- error_code: z11.string(),
4371
- retry_after: z11.number().int().nullable().optional()
4372
- });
4373
-
4374
- // src/_api/generated/_cfg_accounts/schemas/PasswordLoginRequest.ts
4375
- import { z as z12 } from "zod";
4376
- var PasswordLoginRequestSchema = z12.object({
4377
- remember_me: z12.boolean().default(false).optional(),
4378
- email: z12.email(),
4379
- password: z12.string()
4380
- });
4381
-
4382
- // src/_api/generated/_cfg_accounts/schemas/PatchedCfgUserUpdateRequest.ts
4383
- import { z as z13 } from "zod";
4384
- var PatchedCfgUserUpdateRequestSchema = z13.object({
4385
- first_name: z13.string().max(50).optional(),
4386
- last_name: z13.string().max(50).optional(),
4387
- company: z13.string().max(100).optional(),
4388
- phone: z13.string().max(20).optional(),
4389
- position: z13.string().max(100).optional(),
4390
- language: z13.string().max(10).optional(),
4391
- timezone: z13.string().max(64).optional()
4392
- });
4393
-
4394
- // src/_api/generated/_cfg_accounts/schemas/TokenBlacklistRequest.ts
4395
- import { z as z14 } from "zod";
4396
- var TokenBlacklistRequestSchema = z14.object({
4397
- refresh: z14.string().min(1)
4398
- });
4399
-
4400
- // src/_api/generated/_cfg_accounts/schemas/TokenRefreshRequest.ts
4401
- import { z as z15 } from "zod";
4402
- var TokenRefreshRequestSchema = z15.object({
4403
- refresh: z15.string().min(1)
4404
- });
4405
-
4406
4267
  // src/auth/context/AccountsContext.tsx
4407
4268
  import { jsx } from "react/jsx-runtime";
4408
4269
  function hasApiOrigin() {
@@ -5045,7 +4906,6 @@ export {
5045
4906
  AnalyticsEvent,
5046
4907
  AuthContext_default as AuthContext,
5047
4908
  AuthProvider,
5048
- PatchedCfgUserUpdateRequestSchema,
5049
4909
  authLogger,
5050
4910
  clearProfileCache,
5051
4911
  consumeSavedRedirect,