@djangocfg/api 2.1.198 → 2.1.201

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 (34) hide show
  1. package/dist/auth-server.cjs +14 -14
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +14 -14
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +14 -14
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.mjs +14 -14
  8. package/dist/auth.mjs.map +1 -1
  9. package/dist/clients.cjs +14 -14
  10. package/dist/clients.cjs.map +1 -1
  11. package/dist/clients.d.cts +54 -54
  12. package/dist/clients.d.ts +54 -54
  13. package/dist/clients.mjs +14 -14
  14. package/dist/clients.mjs.map +1 -1
  15. package/dist/index.cjs +14 -14
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.mjs +14 -14
  18. package/dist/index.mjs.map +1 -1
  19. package/package.json +2 -2
  20. package/src/generated/cfg_accounts/CLAUDE.md +1 -1
  21. package/src/generated/cfg_accounts/schema.json +46 -24
  22. package/src/generated/cfg_centrifugo/CLAUDE.md +1 -1
  23. package/src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts +2 -2
  24. package/src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +1 -1
  25. package/src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts +2 -2
  26. package/src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts +2 -2
  27. package/src/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts +2 -2
  28. package/src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts +2 -2
  29. package/src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +2 -2
  30. package/src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts +1 -1
  31. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +14 -14
  32. package/src/generated/cfg_centrifugo/schema.json +27 -15
  33. package/src/generated/cfg_totp/CLAUDE.md +1 -1
  34. package/src/generated/cfg_totp/schema.json +22 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/api",
3
- "version": "2.1.198",
3
+ "version": "2.1.201",
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.198",
87
+ "@djangocfg/typescript-config": "^2.1.201",
88
88
  "next": "^16.0.0",
89
89
  "react": "^19.0.0",
90
90
  "tsup": "^8.5.0",
@@ -10,7 +10,7 @@ python manage.py generate_client --groups cfg_accounts --typescript
10
10
 
11
11
  | | |
12
12
  |---|---|
13
- | Version | 3.0.3 |
13
+ | Version | 3.1.0 |
14
14
  | Operations | 15 |
15
15
  | Schemas | 21 |
16
16
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "openapi": "3.0.3",
2
+ "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Django CFG API",
5
5
  "version": "1.0.0",
@@ -1155,25 +1155,33 @@
1155
1155
  "description": "True if 2FA verification is required"
1156
1156
  },
1157
1157
  "session_id": {
1158
- "type": "string",
1158
+ "type": [
1159
+ "string",
1160
+ "null"
1161
+ ],
1159
1162
  "format": "uuid",
1160
- "nullable": true,
1161
1163
  "description": "2FA session ID (only when requires_2fa=True)"
1162
1164
  },
1163
1165
  "access": {
1164
- "type": "string",
1165
- "nullable": true,
1166
+ "type": [
1167
+ "string",
1168
+ "null"
1169
+ ],
1166
1170
  "description": "JWT access token (null when requires_2fa=True)"
1167
1171
  },
1168
1172
  "refresh": {
1169
- "type": "string",
1170
- "nullable": true,
1173
+ "type": [
1174
+ "string",
1175
+ "null"
1176
+ ],
1171
1177
  "description": "JWT refresh token (null when requires_2fa=True)"
1172
1178
  },
1173
1179
  "user": {
1174
- "type": "object",
1180
+ "type": [
1181
+ "object",
1182
+ "null"
1183
+ ],
1175
1184
  "additionalProperties": {},
1176
- "nullable": true,
1177
1185
  "description": "Authenticated user info (null when requires_2fa=True)"
1178
1186
  },
1179
1187
  "is_new_user": {
@@ -1292,28 +1300,36 @@
1292
1300
  "description": "Whether 2FA verification is required"
1293
1301
  },
1294
1302
  "session_id": {
1295
- "type": "string",
1303
+ "type": [
1304
+ "string",
1305
+ "null"
1306
+ ],
1296
1307
  "format": "uuid",
1297
- "nullable": true,
1298
1308
  "description": "2FA session ID (if requires_2fa is True)"
1299
1309
  },
1300
1310
  "refresh": {
1301
- "type": "string",
1302
- "nullable": true,
1311
+ "type": [
1312
+ "string",
1313
+ "null"
1314
+ ],
1303
1315
  "description": "JWT refresh token (if requires_2fa is False)"
1304
1316
  },
1305
1317
  "access": {
1306
- "type": "string",
1307
- "nullable": true,
1318
+ "type": [
1319
+ "string",
1320
+ "null"
1321
+ ],
1308
1322
  "description": "JWT access token (if requires_2fa is False)"
1309
1323
  },
1310
1324
  "user": {
1311
- "allOf": [
1325
+ "oneOf": [
1312
1326
  {
1313
1327
  "$ref": "#/components/schemas/User"
1328
+ },
1329
+ {
1330
+ "type": "null"
1314
1331
  }
1315
1332
  ],
1316
- "nullable": true,
1317
1333
  "description": "User information (if requires_2fa is False)"
1318
1334
  },
1319
1335
  "should_prompt_2fa": {
@@ -1433,9 +1449,11 @@
1433
1449
  "maxLength": 10
1434
1450
  },
1435
1451
  "avatar": {
1436
- "type": "string",
1452
+ "type": [
1453
+ "string",
1454
+ "null"
1455
+ ],
1437
1456
  "format": "uri",
1438
- "nullable": true,
1439
1457
  "readOnly": true
1440
1458
  },
1441
1459
  "is_staff": {
@@ -1456,10 +1474,12 @@
1456
1474
  "readOnly": true
1457
1475
  },
1458
1476
  "last_login": {
1459
- "type": "string",
1477
+ "type": [
1478
+ "string",
1479
+ "null"
1480
+ ],
1460
1481
  "format": "date-time",
1461
- "readOnly": true,
1462
- "nullable": true
1482
+ "readOnly": true
1463
1483
  },
1464
1484
  "unanswered_messages_count": {
1465
1485
  "type": "integer",
@@ -1467,12 +1487,14 @@
1467
1487
  "default": 0
1468
1488
  },
1469
1489
  "centrifugo": {
1470
- "allOf": [
1490
+ "oneOf": [
1471
1491
  {
1472
1492
  "$ref": "#/components/schemas/CentrifugoToken"
1493
+ },
1494
+ {
1495
+ "type": "null"
1473
1496
  }
1474
1497
  ],
1475
- "nullable": true,
1476
1498
  "readOnly": true
1477
1499
  }
1478
1500
  },
@@ -10,7 +10,7 @@ python manage.py generate_client --groups cfg_centrifugo --typescript
10
10
 
11
11
  | | |
12
12
  |---|---|
13
- | Version | 3.0.3 |
13
+ | Version | 3.1.0 |
14
14
  | Operations | 15 |
15
15
  | Schemas | 35 |
16
16
 
@@ -12,8 +12,8 @@ import { CentrifugoErrorSchema } from './CentrifugoError.schema'
12
12
  * List of active channels response.
13
13
  */
14
14
  export const CentrifugoChannelsResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.optional(),
16
- result: CentrifugoChannelsResultSchema.optional(),
15
+ error: CentrifugoErrorSchema.nullable().optional(),
16
+ result: CentrifugoChannelsResultSchema.nullable().optional(),
17
17
  })
18
18
 
19
19
  /**
@@ -13,7 +13,7 @@ import { CentrifugoStreamPositionSchema } from './CentrifugoStreamPosition.schem
13
13
  export const CentrifugoHistoryRequestRequestSchema = z.object({
14
14
  channel: z.string(),
15
15
  limit: z.int().nullable().optional(),
16
- since: CentrifugoStreamPositionSchema.optional(),
16
+ since: CentrifugoStreamPositionSchema.nullable().optional(),
17
17
  reverse: z.boolean().nullable().optional(),
18
18
  })
19
19
 
@@ -12,8 +12,8 @@ import { CentrifugoHistoryResultSchema } from './CentrifugoHistoryResult.schema'
12
12
  * Channel history response.
13
13
  */
14
14
  export const CentrifugoHistoryResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.optional(),
16
- result: CentrifugoHistoryResultSchema.optional(),
15
+ error: CentrifugoErrorSchema.nullable().optional(),
16
+ result: CentrifugoHistoryResultSchema.nullable().optional(),
17
17
  })
18
18
 
19
19
  /**
@@ -12,8 +12,8 @@ import { CentrifugoInfoResultSchema } from './CentrifugoInfoResult.schema'
12
12
  * Server info response.
13
13
  */
14
14
  export const CentrifugoInfoResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.optional(),
16
- result: CentrifugoInfoResultSchema.optional(),
15
+ error: CentrifugoErrorSchema.nullable().optional(),
16
+ result: CentrifugoInfoResultSchema.nullable().optional(),
17
17
  })
18
18
 
19
19
  /**
@@ -20,8 +20,8 @@ export const CentrifugoNodeInfoSchema = z.object({
20
20
  num_channels: z.int(),
21
21
  uptime: z.int(),
22
22
  num_subs: z.int(),
23
- metrics: CentrifugoMetricsSchema.optional(),
24
- process: CentrifugoProcessSchema.optional(),
23
+ metrics: CentrifugoMetricsSchema.nullable().optional(),
24
+ process: CentrifugoProcessSchema.nullable().optional(),
25
25
  })
26
26
 
27
27
  /**
@@ -12,8 +12,8 @@ import { CentrifugoPresenceResultSchema } from './CentrifugoPresenceResult.schem
12
12
  * Channel presence response.
13
13
  */
14
14
  export const CentrifugoPresenceResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.optional(),
16
- result: CentrifugoPresenceResultSchema.optional(),
15
+ error: CentrifugoErrorSchema.nullable().optional(),
16
+ result: CentrifugoPresenceResultSchema.nullable().optional(),
17
17
  })
18
18
 
19
19
  /**
@@ -12,8 +12,8 @@ import { CentrifugoPresenceStatsResultSchema } from './CentrifugoPresenceStatsRe
12
12
  * Channel presence stats response.
13
13
  */
14
14
  export const CentrifugoPresenceStatsResponseSchema = z.object({
15
- error: CentrifugoErrorSchema.optional(),
16
- result: CentrifugoPresenceStatsResultSchema.optional(),
15
+ error: CentrifugoErrorSchema.nullable().optional(),
16
+ result: CentrifugoPresenceStatsResultSchema.nullable().optional(),
17
17
  })
18
18
 
19
19
  /**
@@ -12,7 +12,7 @@ import { CentrifugoClientInfoSchema } from './CentrifugoClientInfo.schema'
12
12
  */
13
13
  export const CentrifugoPublicationSchema = z.object({
14
14
  data: z.record(z.string(), z.any()),
15
- info: CentrifugoClientInfoSchema.optional(),
15
+ info: CentrifugoClientInfoSchema.nullable().optional(),
16
16
  offset: z.int(),
17
17
  tags: z.record(z.string(), z.any()).nullable().optional(),
18
18
  })
@@ -16,8 +16,8 @@ export interface CentrifugoChannelsRequestRequest {
16
16
  * Response model (includes read-only fields).
17
17
  */
18
18
  export interface CentrifugoChannelsResponse {
19
- error?: CentrifugoError;
20
- result?: CentrifugoChannelsResult;
19
+ error?: CentrifugoError | null;
20
+ result?: CentrifugoChannelsResult | null;
21
21
  }
22
22
 
23
23
  /**
@@ -30,7 +30,7 @@ export interface CentrifugoHistoryRequestRequest {
30
30
  channel: string;
31
31
  /** Maximum number of messages to return */
32
32
  limit?: number | null;
33
- since?: CentrifugoStreamPosition;
33
+ since?: CentrifugoStreamPosition | null;
34
34
  /** Reverse message order (newest first) */
35
35
  reverse?: boolean | null;
36
36
  }
@@ -41,8 +41,8 @@ export interface CentrifugoHistoryRequestRequest {
41
41
  * Response model (includes read-only fields).
42
42
  */
43
43
  export interface CentrifugoHistoryResponse {
44
- error?: CentrifugoError;
45
- result?: CentrifugoHistoryResult;
44
+ error?: CentrifugoError | null;
45
+ result?: CentrifugoHistoryResult | null;
46
46
  }
47
47
 
48
48
  /**
@@ -51,8 +51,8 @@ export interface CentrifugoHistoryResponse {
51
51
  * Response model (includes read-only fields).
52
52
  */
53
53
  export interface CentrifugoInfoResponse {
54
- error?: CentrifugoError;
55
- result?: CentrifugoInfoResult;
54
+ error?: CentrifugoError | null;
55
+ result?: CentrifugoInfoResult | null;
56
56
  }
57
57
 
58
58
  /**
@@ -71,8 +71,8 @@ export interface CentrifugoPresenceRequestRequest {
71
71
  * Response model (includes read-only fields).
72
72
  */
73
73
  export interface CentrifugoPresenceResponse {
74
- error?: CentrifugoError;
75
- result?: CentrifugoPresenceResult;
74
+ error?: CentrifugoError | null;
75
+ result?: CentrifugoPresenceResult | null;
76
76
  }
77
77
 
78
78
  /**
@@ -91,8 +91,8 @@ export interface CentrifugoPresenceStatsRequestRequest {
91
91
  * Response model (includes read-only fields).
92
92
  */
93
93
  export interface CentrifugoPresenceStatsResponse {
94
- error?: CentrifugoError;
95
- result?: CentrifugoPresenceStatsResult;
94
+ error?: CentrifugoError | null;
95
+ result?: CentrifugoPresenceStatsResult | null;
96
96
  }
97
97
 
98
98
  /**
@@ -193,7 +193,7 @@ export interface CentrifugoChannelInfo {
193
193
  export interface CentrifugoPublication {
194
194
  /** Message payload */
195
195
  data: Record<string, any>;
196
- info?: CentrifugoClientInfo;
196
+ info?: CentrifugoClientInfo | null;
197
197
  /** Message offset in channel stream */
198
198
  offset: number;
199
199
  /** Optional message tags */
@@ -222,8 +222,8 @@ export interface CentrifugoNodeInfo {
222
222
  uptime: number;
223
223
  /** Total number of subscriptions */
224
224
  num_subs: number;
225
- metrics?: CentrifugoMetrics;
226
- process?: CentrifugoProcess;
225
+ metrics?: CentrifugoMetrics | null;
226
+ process?: CentrifugoProcess | null;
227
227
  }
228
228
 
229
229
  /**
@@ -1,5 +1,5 @@
1
1
  {
2
- "openapi": "3.0.3",
2
+ "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Django CFG API",
5
5
  "version": "1.0.0",
@@ -1742,8 +1742,10 @@
1742
1742
  "description": "Average ACKs received"
1743
1743
  },
1744
1744
  "last_activity_at": {
1745
- "type": "string",
1746
- "nullable": true,
1745
+ "type": [
1746
+ "string",
1747
+ "null"
1748
+ ],
1747
1749
  "description": "Last activity timestamp (ISO format)"
1748
1750
  }
1749
1751
  },
@@ -1931,30 +1933,40 @@
1931
1933
  "type": "integer"
1932
1934
  },
1933
1935
  "acks_expected": {
1934
- "type": "integer",
1935
- "nullable": true
1936
+ "type": [
1937
+ "integer",
1938
+ "null"
1939
+ ]
1936
1940
  },
1937
1941
  "duration_ms": {
1938
- "type": "number",
1939
- "format": "double",
1940
- "nullable": true
1942
+ "type": [
1943
+ "number",
1944
+ "null"
1945
+ ],
1946
+ "format": "double"
1941
1947
  },
1942
1948
  "created_at": {
1943
1949
  "type": "string",
1944
1950
  "format": "date-time"
1945
1951
  },
1946
1952
  "completed_at": {
1947
- "type": "string",
1948
- "format": "date-time",
1949
- "nullable": true
1953
+ "type": [
1954
+ "string",
1955
+ "null"
1956
+ ],
1957
+ "format": "date-time"
1950
1958
  },
1951
1959
  "error_code": {
1952
- "type": "string",
1953
- "nullable": true
1960
+ "type": [
1961
+ "string",
1962
+ "null"
1963
+ ]
1954
1964
  },
1955
1965
  "error_message": {
1956
- "type": "string",
1957
- "nullable": true
1966
+ "type": [
1967
+ "string",
1968
+ "null"
1969
+ ]
1958
1970
  }
1959
1971
  },
1960
1972
  "required": [
@@ -10,7 +10,7 @@ python manage.py generate_client --groups cfg_totp --typescript
10
10
 
11
11
  | | |
12
12
  |---|---|
13
- | Version | 3.0.3 |
13
+ | Version | 3.1.0 |
14
14
  | Operations | 9 |
15
15
  | Schemas | 15 |
16
16
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "openapi": "3.0.3",
2
+ "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Django CFG API",
5
5
  "version": "1.0.0",
@@ -542,8 +542,10 @@
542
542
  "description": "Total number of codes generated"
543
543
  },
544
544
  "warning": {
545
- "type": "string",
546
- "nullable": true,
545
+ "type": [
546
+ "string",
547
+ "null"
548
+ ],
547
549
  "description": "Warning if running low on codes"
548
550
  }
549
551
  },
@@ -634,17 +636,21 @@
634
636
  "readOnly": true
635
637
  },
636
638
  "confirmed_at": {
637
- "type": "string",
639
+ "type": [
640
+ "string",
641
+ "null"
642
+ ],
638
643
  "format": "date-time",
639
644
  "readOnly": true,
640
- "nullable": true,
641
645
  "description": "When device setup was confirmed"
642
646
  },
643
647
  "last_used_at": {
644
- "type": "string",
648
+ "type": [
649
+ "string",
650
+ "null"
651
+ ],
645
652
  "format": "date-time",
646
653
  "readOnly": true,
647
- "nullable": true,
648
654
  "description": "Last successful verification"
649
655
  }
650
656
  },
@@ -855,9 +861,11 @@
855
861
  "maxLength": 10
856
862
  },
857
863
  "avatar": {
858
- "type": "string",
864
+ "type": [
865
+ "string",
866
+ "null"
867
+ ],
859
868
  "format": "uri",
860
- "nullable": true,
861
869
  "readOnly": true
862
870
  },
863
871
  "is_staff": {
@@ -878,10 +886,12 @@
878
886
  "readOnly": true
879
887
  },
880
888
  "last_login": {
881
- "type": "string",
889
+ "type": [
890
+ "string",
891
+ "null"
892
+ ],
882
893
  "format": "date-time",
883
- "readOnly": true,
884
- "nullable": true
894
+ "readOnly": true
885
895
  },
886
896
  "unanswered_messages_count": {
887
897
  "type": "integer",