@djangocfg/api 2.1.359 → 2.1.361

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 (62) hide show
  1. package/dist/auth-server.cjs +68 -0
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +68 -0
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +75 -67
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.d.cts +7 -10
  8. package/dist/auth.d.ts +7 -10
  9. package/dist/auth.mjs +75 -67
  10. package/dist/auth.mjs.map +1 -1
  11. package/dist/clients.cjs +68 -0
  12. package/dist/clients.cjs.map +1 -1
  13. package/dist/clients.d.cts +14 -20
  14. package/dist/clients.d.ts +14 -20
  15. package/dist/clients.mjs +68 -0
  16. package/dist/clients.mjs.map +1 -1
  17. package/dist/hooks.cjs +68 -0
  18. package/dist/hooks.cjs.map +1 -1
  19. package/dist/hooks.mjs +68 -0
  20. package/dist/hooks.mjs.map +1 -1
  21. package/dist/index.cjs +79 -71
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +28 -40
  24. package/dist/index.d.ts +28 -40
  25. package/dist/index.mjs +79 -71
  26. package/dist/index.mjs.map +1 -1
  27. package/package.json +2 -2
  28. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRegenerateCreate.ts +1 -1
  29. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRetrieve.ts +1 -1
  30. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyTestCreate.ts +1 -1
  31. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +1 -1
  32. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthDisconnectCreate.ts +1 -1
  33. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthGithubAuthorizeCreate.ts +1 -1
  34. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthGithubCallbackCreate.ts +1 -1
  35. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +1 -1
  36. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpRequestCreate.ts +1 -1
  37. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpVerifyCreate.ts +1 -1
  38. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileAvatarCreate.ts +1 -1
  39. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileDeleteCreate.ts +1 -1
  40. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialPartialUpdate.ts +1 -1
  41. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialUpdate.ts +1 -1
  42. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +1 -1
  43. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileUpdatePartialUpdate.ts +1 -1
  44. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileUpdateUpdate.ts +1 -1
  45. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsTokenRefreshCreate.ts +1 -1
  46. package/src/_api/generated/_cfg_accounts/openapi.json +1811 -0
  47. package/src/_api/generated/_cfg_accounts/schemas/User.ts +7 -7
  48. package/src/_api/generated/_cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +1 -1
  49. package/src/_api/generated/_cfg_centrifugo/openapi.json +132 -0
  50. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRegenerateCreate.ts +1 -1
  51. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +1 -1
  52. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +1 -1
  53. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDisableCreate.ts +1 -1
  54. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpSetupConfirmCreate.ts +1 -1
  55. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpSetupCreate.ts +1 -1
  56. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpVerifyBackupCreate.ts +1 -1
  57. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpVerifyCreate.ts +1 -1
  58. package/src/_api/generated/_cfg_totp/openapi.json +927 -0
  59. package/src/_api/generated/_cfg_totp/schemas/TotpVerifyUser.ts +7 -7
  60. package/src/_api/generated/helpers/auth.ts +27 -2
  61. package/src/_api/generated/openapi.json +2789 -0
  62. package/src/_api/generated/types.gen.ts +28 -40
@@ -8,16 +8,16 @@ import { CentrifugoTokenSchema } from "./CentrifugoToken";
8
8
  export const UserSchema = z.object({
9
9
  id: z.number().int(),
10
10
  email: z.email(),
11
- first_name: z.string().max(50).optional(),
12
- last_name: z.string().max(50).optional(),
11
+ first_name: z.string().max(50).nullable().optional(),
12
+ last_name: z.string().max(50).nullable().optional(),
13
13
  full_name: z.string(),
14
14
  initials: z.string(),
15
15
  display_username: z.string(),
16
- company: z.string().max(100).optional(),
17
- phone: z.string().max(20).optional(),
18
- position: z.string().max(100).optional(),
19
- language: z.string().max(10).optional(),
20
- timezone: z.string().max(64).optional(),
16
+ company: z.string().max(100).nullable().optional(),
17
+ phone: z.string().max(20).nullable().optional(),
18
+ position: z.string().max(100).nullable().optional(),
19
+ language: z.string().max(10).nullable().optional(),
20
+ timezone: z.string().max(64).nullable().optional(),
21
21
  avatar: z.string().nullable(),
22
22
  is_staff: z.boolean(),
23
23
  is_superuser: z.boolean(),
@@ -58,7 +58,7 @@ export function useCfgCentrifugoAuthTokenRetrieve(
58
58
  }
59
59
  return data;
60
60
  }
61
- return parsed.data as Result;
61
+ return parsed.data as unknown as Result;
62
62
  },
63
63
  config,
64
64
  );
@@ -0,0 +1,132 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Django CFG API",
5
+ "version": "1.0.0",
6
+ "description": "RESTful API with modern architecture"
7
+ },
8
+ "paths": {
9
+ "/cfg/centrifugo/auth/token/": {
10
+ "get": {
11
+ "operationId": "cfg_centrifugo_auth_token_retrieve",
12
+ "description": "Generate JWT token for WebSocket connection to Centrifugo. Token includes user's allowed channels based on their permissions. Requires authentication.",
13
+ "summary": "Get Centrifugo connection token",
14
+ "tags": [
15
+ "cfg_centrifugo"
16
+ ],
17
+ "security": [
18
+ {
19
+ "apiKeyAuth": []
20
+ },
21
+ {
22
+ "jwtAuthWithLastLogin": []
23
+ }
24
+ ],
25
+ "responses": {
26
+ "200": {
27
+ "content": {
28
+ "application/json": {
29
+ "schema": {
30
+ "$ref": "#/components/schemas/ConnectionTokenResponse"
31
+ }
32
+ }
33
+ },
34
+ "description": ""
35
+ },
36
+ "401": {
37
+ "content": {
38
+ "application/json": {
39
+ "schema": {
40
+ "description": "Unauthorized - authentication required"
41
+ }
42
+ }
43
+ },
44
+ "description": ""
45
+ },
46
+ "500": {
47
+ "content": {
48
+ "application/json": {
49
+ "schema": {
50
+ "description": "Server error"
51
+ }
52
+ }
53
+ },
54
+ "description": ""
55
+ }
56
+ },
57
+ "x-async-capable": false
58
+ }
59
+ }
60
+ },
61
+ "components": {
62
+ "schemas": {
63
+ "ConnectionTokenResponse": {
64
+ "description": "Response model for Centrifugo connection token.",
65
+ "properties": {
66
+ "token": {
67
+ "description": "JWT token for Centrifugo connection",
68
+ "title": "Token",
69
+ "type": "string"
70
+ },
71
+ "centrifugo_url": {
72
+ "description": "Centrifugo WebSocket URL",
73
+ "title": "Centrifugo Url",
74
+ "type": "string"
75
+ },
76
+ "expires_at": {
77
+ "description": "Token expiration time (ISO 8601)",
78
+ "title": "Expires At",
79
+ "type": "string"
80
+ },
81
+ "channels": {
82
+ "description": "List of allowed channels",
83
+ "items": {
84
+ "type": "string"
85
+ },
86
+ "title": "Channels",
87
+ "type": "array"
88
+ }
89
+ },
90
+ "required": [
91
+ "token",
92
+ "centrifugo_url",
93
+ "expires_at",
94
+ "channels"
95
+ ],
96
+ "title": "ConnectionTokenResponse",
97
+ "type": "object"
98
+ }
99
+ },
100
+ "securitySchemes": {
101
+ "apiKeyAuth": {
102
+ "type": "apiKey",
103
+ "in": "header",
104
+ "name": "X-API-Key"
105
+ },
106
+ "basicAuth": {
107
+ "type": "http",
108
+ "scheme": "basic"
109
+ },
110
+ "cookieAuth": {
111
+ "type": "apiKey",
112
+ "in": "cookie",
113
+ "name": "sessionid"
114
+ },
115
+ "jwtAuth": {
116
+ "type": "http",
117
+ "scheme": "bearer",
118
+ "bearerFormat": "JWT"
119
+ },
120
+ "jwtAuthWithLastLogin": {
121
+ "type": "http",
122
+ "scheme": "bearer",
123
+ "bearerFormat": "JWT"
124
+ }
125
+ }
126
+ },
127
+ "servers": [
128
+ {
129
+ "url": "http://localhost:8000"
130
+ }
131
+ ]
132
+ }
@@ -57,7 +57,7 @@ export function useCfgTotpBackupCodesRegenerateCreate(
57
57
  }
58
58
  return data;
59
59
  }
60
- return parsed.data as Result;
60
+ return parsed.data as unknown as Result;
61
61
  },
62
62
  config,
63
63
  );
@@ -58,7 +58,7 @@ export function useCfgTotpBackupCodesRetrieve(
58
58
  }
59
59
  return data;
60
60
  }
61
- return parsed.data as Result;
61
+ return parsed.data as unknown as Result;
62
62
  },
63
63
  config,
64
64
  );
@@ -58,7 +58,7 @@ export function useCfgTotpDevicesRetrieve(
58
58
  }
59
59
  return data;
60
60
  }
61
- return parsed.data as Result;
61
+ return parsed.data as unknown as Result;
62
62
  },
63
63
  config,
64
64
  );
@@ -57,7 +57,7 @@ export function useCfgTotpDisableCreate(
57
57
  }
58
58
  return data;
59
59
  }
60
- return parsed.data as Result;
60
+ return parsed.data as unknown as Result;
61
61
  },
62
62
  config,
63
63
  );
@@ -57,7 +57,7 @@ export function useCfgTotpSetupConfirmCreate(
57
57
  }
58
58
  return data;
59
59
  }
60
- return parsed.data as Result;
60
+ return parsed.data as unknown as Result;
61
61
  },
62
62
  config,
63
63
  );
@@ -57,7 +57,7 @@ export function useCfgTotpSetupCreate(
57
57
  }
58
58
  return data;
59
59
  }
60
- return parsed.data as Result;
60
+ return parsed.data as unknown as Result;
61
61
  },
62
62
  config,
63
63
  );
@@ -57,7 +57,7 @@ export function useCfgTotpVerifyBackupCreate(
57
57
  }
58
58
  return data;
59
59
  }
60
- return parsed.data as Result;
60
+ return parsed.data as unknown as Result;
61
61
  },
62
62
  config,
63
63
  );
@@ -57,7 +57,7 @@ export function useCfgTotpVerifyCreate(
57
57
  }
58
58
  return data;
59
59
  }
60
- return parsed.data as Result;
60
+ return parsed.data as unknown as Result;
61
61
  },
62
62
  config,
63
63
  );