@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.
- package/dist/auth-server.cjs +68 -0
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +68 -0
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +75 -67
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +7 -10
- package/dist/auth.d.ts +7 -10
- package/dist/auth.mjs +75 -67
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +68 -0
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +14 -20
- package/dist/clients.d.ts +14 -20
- package/dist/clients.mjs +68 -0
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +68 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.mjs +68 -0
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +79 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -40
- package/dist/index.d.ts +28 -40
- package/dist/index.mjs +79 -71
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRegenerateCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRetrieve.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyTestCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthDisconnectCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthGithubAuthorizeCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthGithubCallbackCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpRequestCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpVerifyCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileAvatarCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileDeleteCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialPartialUpdate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialUpdate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileUpdatePartialUpdate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileUpdateUpdate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsTokenRefreshCreate.ts +1 -1
- package/src/_api/generated/_cfg_accounts/openapi.json +1811 -0
- package/src/_api/generated/_cfg_accounts/schemas/User.ts +7 -7
- package/src/_api/generated/_cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +1 -1
- package/src/_api/generated/_cfg_centrifugo/openapi.json +132 -0
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRegenerateCreate.ts +1 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +1 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +1 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDisableCreate.ts +1 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpSetupConfirmCreate.ts +1 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpSetupCreate.ts +1 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpVerifyBackupCreate.ts +1 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpVerifyCreate.ts +1 -1
- package/src/_api/generated/_cfg_totp/openapi.json +927 -0
- package/src/_api/generated/_cfg_totp/schemas/TotpVerifyUser.ts +7 -7
- package/src/_api/generated/helpers/auth.ts +27 -2
- package/src/_api/generated/openapi.json +2789 -0
- 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(),
|
|
@@ -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
|
+
}
|