@djangocfg/api 2.1.126 → 2.1.129
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 +10 -19
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +10 -19
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +18 -29
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +7 -16
- package/dist/auth.d.ts +7 -16
- package/dist/auth.mjs +18 -29
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +20 -31
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +46 -54
- package/dist/clients.d.ts +46 -54
- package/dist/clients.mjs +20 -31
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +8 -17
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +11 -20
- package/dist/hooks.d.ts +11 -20
- package/dist/hooks.mjs +8 -17
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +12 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -35
- package/dist/index.d.ts +15 -35
- package/dist/index.mjs +12 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts +1 -1
- package/src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts +2 -2
- package/src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts +1 -1
- package/src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +1 -1
- package/src/generated/cfg_accounts/_utils/schemas/User.schema.ts +2 -2
- package/src/generated/cfg_accounts/accounts/models.ts +1 -1
- package/src/generated/cfg_accounts/accounts__oauth/client.ts +1 -1
- package/src/generated/cfg_accounts/accounts__oauth/models.ts +1 -1
- package/src/generated/cfg_accounts/enums.ts +1 -19
- package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +2 -2
- package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +1 -1
- package/src/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts +2 -2
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts +3 -3
- package/src/generated/cfg_centrifugo/schema.json +18 -0
- package/src/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts +2 -2
- package/src/generated/cfg_totp/_utils/hooks/totp__totp_management.ts +1 -1
- package/src/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts +3 -3
- package/src/generated/cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts +2 -2
- package/src/generated/cfg_totp/schema.json +18 -0
- package/src/generated/cfg_totp/totp__totp_management/client.ts +3 -3
package/dist/auth.d.cts
CHANGED
|
@@ -12,15 +12,6 @@ declare enum OTPRequestRequestChannel {
|
|
|
12
12
|
EMAIL = "email",
|
|
13
13
|
PHONE = "phone"
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Delivery channel: 'email' or 'phone'. Auto-detected if not provided.
|
|
17
|
-
* * `email` - Email
|
|
18
|
-
* * `phone` - Phone
|
|
19
|
-
*/
|
|
20
|
-
declare enum OTPVerifyRequestChannel {
|
|
21
|
-
EMAIL = "email",
|
|
22
|
-
PHONE = "phone"
|
|
23
|
-
}
|
|
24
15
|
|
|
25
16
|
/**
|
|
26
17
|
* Zod schema for OTPRequestRequest
|
|
@@ -73,7 +64,7 @@ type OTPRequestResponse = z.infer<typeof OTPRequestResponseSchema>;
|
|
|
73
64
|
declare const OTPVerifyRequestSchema: z.ZodObject<{
|
|
74
65
|
identifier: z.ZodString;
|
|
75
66
|
otp: z.ZodString;
|
|
76
|
-
channel: z.ZodOptional<z.ZodEnum<typeof
|
|
67
|
+
channel: z.ZodOptional<z.ZodEnum<typeof OTPRequestRequestChannel>>;
|
|
77
68
|
source_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
|
|
78
69
|
}, z.core.$strip>;
|
|
79
70
|
/**
|
|
@@ -130,13 +121,13 @@ declare const OTPVerifyResponseSchema: z.ZodObject<{
|
|
|
130
121
|
avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
|
|
131
122
|
is_staff: z.ZodBoolean;
|
|
132
123
|
is_superuser: z.ZodBoolean;
|
|
133
|
-
date_joined: z.
|
|
134
|
-
last_login: z.ZodNullable<z.
|
|
124
|
+
date_joined: z.ZodString;
|
|
125
|
+
last_login: z.ZodNullable<z.ZodString>;
|
|
135
126
|
unanswered_messages_count: z.ZodInt;
|
|
136
127
|
centrifugo: z.ZodNullable<z.ZodObject<{
|
|
137
128
|
token: z.ZodString;
|
|
138
129
|
centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
|
|
139
|
-
expires_at: z.
|
|
130
|
+
expires_at: z.ZodString;
|
|
140
131
|
channels: z.ZodArray<z.ZodString>;
|
|
141
132
|
}, z.core.$strip>>;
|
|
142
133
|
}, z.core.$strip>>>;
|
|
@@ -208,13 +199,13 @@ declare const UserSchema: z.ZodObject<{
|
|
|
208
199
|
avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
|
|
209
200
|
is_staff: z.ZodBoolean;
|
|
210
201
|
is_superuser: z.ZodBoolean;
|
|
211
|
-
date_joined: z.
|
|
212
|
-
last_login: z.ZodNullable<z.
|
|
202
|
+
date_joined: z.ZodString;
|
|
203
|
+
last_login: z.ZodNullable<z.ZodString>;
|
|
213
204
|
unanswered_messages_count: z.ZodInt;
|
|
214
205
|
centrifugo: z.ZodNullable<z.ZodObject<{
|
|
215
206
|
token: z.ZodString;
|
|
216
207
|
centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
|
|
217
|
-
expires_at: z.
|
|
208
|
+
expires_at: z.ZodString;
|
|
218
209
|
channels: z.ZodArray<z.ZodString>;
|
|
219
210
|
}, z.core.$strip>>;
|
|
220
211
|
}, z.core.$strip>;
|
package/dist/auth.d.ts
CHANGED
|
@@ -12,15 +12,6 @@ declare enum OTPRequestRequestChannel {
|
|
|
12
12
|
EMAIL = "email",
|
|
13
13
|
PHONE = "phone"
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Delivery channel: 'email' or 'phone'. Auto-detected if not provided.
|
|
17
|
-
* * `email` - Email
|
|
18
|
-
* * `phone` - Phone
|
|
19
|
-
*/
|
|
20
|
-
declare enum OTPVerifyRequestChannel {
|
|
21
|
-
EMAIL = "email",
|
|
22
|
-
PHONE = "phone"
|
|
23
|
-
}
|
|
24
15
|
|
|
25
16
|
/**
|
|
26
17
|
* Zod schema for OTPRequestRequest
|
|
@@ -73,7 +64,7 @@ type OTPRequestResponse = z.infer<typeof OTPRequestResponseSchema>;
|
|
|
73
64
|
declare const OTPVerifyRequestSchema: z.ZodObject<{
|
|
74
65
|
identifier: z.ZodString;
|
|
75
66
|
otp: z.ZodString;
|
|
76
|
-
channel: z.ZodOptional<z.ZodEnum<typeof
|
|
67
|
+
channel: z.ZodOptional<z.ZodEnum<typeof OTPRequestRequestChannel>>;
|
|
77
68
|
source_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
|
|
78
69
|
}, z.core.$strip>;
|
|
79
70
|
/**
|
|
@@ -130,13 +121,13 @@ declare const OTPVerifyResponseSchema: z.ZodObject<{
|
|
|
130
121
|
avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
|
|
131
122
|
is_staff: z.ZodBoolean;
|
|
132
123
|
is_superuser: z.ZodBoolean;
|
|
133
|
-
date_joined: z.
|
|
134
|
-
last_login: z.ZodNullable<z.
|
|
124
|
+
date_joined: z.ZodString;
|
|
125
|
+
last_login: z.ZodNullable<z.ZodString>;
|
|
135
126
|
unanswered_messages_count: z.ZodInt;
|
|
136
127
|
centrifugo: z.ZodNullable<z.ZodObject<{
|
|
137
128
|
token: z.ZodString;
|
|
138
129
|
centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
|
|
139
|
-
expires_at: z.
|
|
130
|
+
expires_at: z.ZodString;
|
|
140
131
|
channels: z.ZodArray<z.ZodString>;
|
|
141
132
|
}, z.core.$strip>>;
|
|
142
133
|
}, z.core.$strip>>>;
|
|
@@ -208,13 +199,13 @@ declare const UserSchema: z.ZodObject<{
|
|
|
208
199
|
avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
|
|
209
200
|
is_staff: z.ZodBoolean;
|
|
210
201
|
is_superuser: z.ZodBoolean;
|
|
211
|
-
date_joined: z.
|
|
212
|
-
last_login: z.ZodNullable<z.
|
|
202
|
+
date_joined: z.ZodString;
|
|
203
|
+
last_login: z.ZodNullable<z.ZodString>;
|
|
213
204
|
unanswered_messages_count: z.ZodInt;
|
|
214
205
|
centrifugo: z.ZodNullable<z.ZodObject<{
|
|
215
206
|
token: z.ZodString;
|
|
216
207
|
centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
|
|
217
|
-
expires_at: z.
|
|
208
|
+
expires_at: z.ZodString;
|
|
218
209
|
channels: z.ZodArray<z.ZodString>;
|
|
219
210
|
}, z.core.$strip>>;
|
|
220
211
|
}, z.core.$strip>;
|
package/dist/auth.mjs
CHANGED
|
@@ -291,7 +291,7 @@ var Oauth = class {
|
|
|
291
291
|
*/
|
|
292
292
|
async accountsOauthConnectionsList() {
|
|
293
293
|
const response = await this.client.request("GET", "/cfg/accounts/oauth/connections/");
|
|
294
|
-
return response;
|
|
294
|
+
return response.results || response;
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
297
297
|
* Disconnect OAuth provider
|
|
@@ -1068,28 +1068,17 @@ var LocalStorageAdapter = class {
|
|
|
1068
1068
|
var enums_exports = {};
|
|
1069
1069
|
__export(enums_exports, {
|
|
1070
1070
|
OAuthConnectionProvider: () => OAuthConnectionProvider,
|
|
1071
|
-
|
|
1072
|
-
OTPRequestRequestChannel: () => OTPRequestRequestChannel,
|
|
1073
|
-
OTPVerifyRequestChannel: () => OTPVerifyRequestChannel
|
|
1071
|
+
OTPRequestRequestChannel: () => OTPRequestRequestChannel
|
|
1074
1072
|
});
|
|
1075
1073
|
var OAuthConnectionProvider = /* @__PURE__ */ ((OAuthConnectionProvider2) => {
|
|
1076
1074
|
OAuthConnectionProvider2["GITHUB"] = "github";
|
|
1077
1075
|
return OAuthConnectionProvider2;
|
|
1078
1076
|
})(OAuthConnectionProvider || {});
|
|
1079
|
-
var OAuthDisconnectRequestRequestProvider = /* @__PURE__ */ ((OAuthDisconnectRequestRequestProvider2) => {
|
|
1080
|
-
OAuthDisconnectRequestRequestProvider2["GITHUB"] = "github";
|
|
1081
|
-
return OAuthDisconnectRequestRequestProvider2;
|
|
1082
|
-
})(OAuthDisconnectRequestRequestProvider || {});
|
|
1083
1077
|
var OTPRequestRequestChannel = /* @__PURE__ */ ((OTPRequestRequestChannel2) => {
|
|
1084
1078
|
OTPRequestRequestChannel2["EMAIL"] = "email";
|
|
1085
1079
|
OTPRequestRequestChannel2["PHONE"] = "phone";
|
|
1086
1080
|
return OTPRequestRequestChannel2;
|
|
1087
1081
|
})(OTPRequestRequestChannel || {});
|
|
1088
|
-
var OTPVerifyRequestChannel = /* @__PURE__ */ ((OTPVerifyRequestChannel2) => {
|
|
1089
|
-
OTPVerifyRequestChannel2["EMAIL"] = "email";
|
|
1090
|
-
OTPVerifyRequestChannel2["PHONE"] = "phone";
|
|
1091
|
-
return OTPVerifyRequestChannel2;
|
|
1092
|
-
})(OTPVerifyRequestChannel || {});
|
|
1093
1082
|
|
|
1094
1083
|
// src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
|
|
1095
1084
|
import { z } from "zod";
|
|
@@ -1103,7 +1092,7 @@ import { z as z2 } from "zod";
|
|
|
1103
1092
|
var CentrifugoTokenSchema = z2.object({
|
|
1104
1093
|
token: z2.string(),
|
|
1105
1094
|
centrifugo_url: z2.union([z2.url(), z2.literal("")]),
|
|
1106
|
-
expires_at: z2.
|
|
1095
|
+
expires_at: z2.string().datetime({ offset: true }),
|
|
1107
1096
|
channels: z2.array(z2.string())
|
|
1108
1097
|
});
|
|
1109
1098
|
|
|
@@ -1144,14 +1133,14 @@ var OAuthConnectionSchema = z7.object({
|
|
|
1144
1133
|
provider_username: z7.string(),
|
|
1145
1134
|
provider_email: z7.email(),
|
|
1146
1135
|
provider_avatar_url: z7.union([z7.url(), z7.literal("")]),
|
|
1147
|
-
connected_at: z7.
|
|
1148
|
-
last_login_at: z7.
|
|
1136
|
+
connected_at: z7.string().datetime({ offset: true }),
|
|
1137
|
+
last_login_at: z7.string().datetime({ offset: true })
|
|
1149
1138
|
});
|
|
1150
1139
|
|
|
1151
1140
|
// src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
|
|
1152
1141
|
import { z as z8 } from "zod";
|
|
1153
1142
|
var OAuthDisconnectRequestRequestSchema = z8.object({
|
|
1154
|
-
provider: z8.nativeEnum(
|
|
1143
|
+
provider: z8.nativeEnum(OAuthConnectionProvider)
|
|
1155
1144
|
});
|
|
1156
1145
|
|
|
1157
1146
|
// src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
|
|
@@ -1205,7 +1194,7 @@ import { z as z15 } from "zod";
|
|
|
1205
1194
|
var OTPVerifyRequestSchema = z15.object({
|
|
1206
1195
|
identifier: z15.string().min(1),
|
|
1207
1196
|
otp: z15.string().min(6).max(6),
|
|
1208
|
-
channel: z15.nativeEnum(
|
|
1197
|
+
channel: z15.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
1209
1198
|
source_url: z15.union([z15.url(), z15.literal("")]).optional()
|
|
1210
1199
|
});
|
|
1211
1200
|
|
|
@@ -1228,8 +1217,8 @@ var UserSchema = z16.object({
|
|
|
1228
1217
|
avatar: z16.union([z16.url(), z16.literal("")]).nullable(),
|
|
1229
1218
|
is_staff: z16.boolean(),
|
|
1230
1219
|
is_superuser: z16.boolean(),
|
|
1231
|
-
date_joined: z16.
|
|
1232
|
-
last_login: z16.
|
|
1220
|
+
date_joined: z16.string().datetime({ offset: true }),
|
|
1221
|
+
last_login: z16.string().datetime({ offset: true }).nullable(),
|
|
1233
1222
|
unanswered_messages_count: z16.int(),
|
|
1234
1223
|
centrifugo: CentrifugoTokenSchema.nullable()
|
|
1235
1224
|
});
|
|
@@ -1893,7 +1882,7 @@ var CentrifugoMonitoring = class {
|
|
|
1893
1882
|
if (isParamsObject) {
|
|
1894
1883
|
params = args[0];
|
|
1895
1884
|
} else {
|
|
1896
|
-
params = { channel: args[0],
|
|
1885
|
+
params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
|
|
1897
1886
|
}
|
|
1898
1887
|
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/publishes/", { params });
|
|
1899
1888
|
return response;
|
|
@@ -2838,8 +2827,8 @@ var PublishSchema = z51.object({
|
|
|
2838
2827
|
acks_received: z51.int(),
|
|
2839
2828
|
acks_expected: z51.int().nullable(),
|
|
2840
2829
|
duration_ms: z51.number().nullable(),
|
|
2841
|
-
created_at: z51.
|
|
2842
|
-
completed_at: z51.
|
|
2830
|
+
created_at: z51.string().datetime({ offset: true }),
|
|
2831
|
+
completed_at: z51.string().datetime({ offset: true }).nullable(),
|
|
2843
2832
|
error_code: z51.string().nullable(),
|
|
2844
2833
|
error_message: z51.string().nullable()
|
|
2845
2834
|
});
|
|
@@ -3078,7 +3067,7 @@ var TotpManagement = class {
|
|
|
3078
3067
|
if (isParamsObject) {
|
|
3079
3068
|
params = args[0];
|
|
3080
3069
|
} else {
|
|
3081
|
-
params = {
|
|
3070
|
+
params = { ordering: args[0], page: args[1], page_size: args[2], search: args[3] };
|
|
3082
3071
|
}
|
|
3083
3072
|
const response = await this.client.request("GET", "/cfg/totp/devices/", { params });
|
|
3084
3073
|
return response;
|
|
@@ -3836,9 +3825,9 @@ var DeviceListSchema = z62.object({
|
|
|
3836
3825
|
name: z62.string(),
|
|
3837
3826
|
is_primary: z62.boolean(),
|
|
3838
3827
|
status: z62.nativeEnum(DeviceListStatus),
|
|
3839
|
-
created_at: z62.
|
|
3840
|
-
confirmed_at: z62.
|
|
3841
|
-
last_used_at: z62.
|
|
3828
|
+
created_at: z62.string().datetime({ offset: true }),
|
|
3829
|
+
confirmed_at: z62.string().datetime({ offset: true }).nullable(),
|
|
3830
|
+
last_used_at: z62.string().datetime({ offset: true }).nullable()
|
|
3842
3831
|
});
|
|
3843
3832
|
|
|
3844
3833
|
// src/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts
|
|
@@ -3900,8 +3889,8 @@ var TotpVerifyUserSchema = z68.object({
|
|
|
3900
3889
|
avatar: z68.union([z68.url(), z68.literal("")]).nullable(),
|
|
3901
3890
|
is_staff: z68.boolean(),
|
|
3902
3891
|
is_superuser: z68.boolean(),
|
|
3903
|
-
date_joined: z68.
|
|
3904
|
-
last_login: z68.
|
|
3892
|
+
date_joined: z68.string().datetime({ offset: true }),
|
|
3893
|
+
last_login: z68.string().datetime({ offset: true }).nullable(),
|
|
3905
3894
|
unanswered_messages_count: z68.int()
|
|
3906
3895
|
});
|
|
3907
3896
|
|