@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/clients.cjs
CHANGED
|
@@ -135,7 +135,7 @@ var Oauth = class {
|
|
|
135
135
|
*/
|
|
136
136
|
async accountsOauthConnectionsList() {
|
|
137
137
|
const response = await this.client.request("GET", "/cfg/accounts/oauth/connections/");
|
|
138
|
-
return response;
|
|
138
|
+
return response.results || response;
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
141
|
* Disconnect OAuth provider
|
|
@@ -912,28 +912,17 @@ var LocalStorageAdapter = class {
|
|
|
912
912
|
var enums_exports = {};
|
|
913
913
|
__export(enums_exports, {
|
|
914
914
|
OAuthConnectionProvider: () => OAuthConnectionProvider,
|
|
915
|
-
|
|
916
|
-
OTPRequestRequestChannel: () => OTPRequestRequestChannel,
|
|
917
|
-
OTPVerifyRequestChannel: () => OTPVerifyRequestChannel
|
|
915
|
+
OTPRequestRequestChannel: () => OTPRequestRequestChannel
|
|
918
916
|
});
|
|
919
917
|
var OAuthConnectionProvider = /* @__PURE__ */ ((OAuthConnectionProvider2) => {
|
|
920
918
|
OAuthConnectionProvider2["GITHUB"] = "github";
|
|
921
919
|
return OAuthConnectionProvider2;
|
|
922
920
|
})(OAuthConnectionProvider || {});
|
|
923
|
-
var OAuthDisconnectRequestRequestProvider = /* @__PURE__ */ ((OAuthDisconnectRequestRequestProvider2) => {
|
|
924
|
-
OAuthDisconnectRequestRequestProvider2["GITHUB"] = "github";
|
|
925
|
-
return OAuthDisconnectRequestRequestProvider2;
|
|
926
|
-
})(OAuthDisconnectRequestRequestProvider || {});
|
|
927
921
|
var OTPRequestRequestChannel = /* @__PURE__ */ ((OTPRequestRequestChannel2) => {
|
|
928
922
|
OTPRequestRequestChannel2["EMAIL"] = "email";
|
|
929
923
|
OTPRequestRequestChannel2["PHONE"] = "phone";
|
|
930
924
|
return OTPRequestRequestChannel2;
|
|
931
925
|
})(OTPRequestRequestChannel || {});
|
|
932
|
-
var OTPVerifyRequestChannel = /* @__PURE__ */ ((OTPVerifyRequestChannel2) => {
|
|
933
|
-
OTPVerifyRequestChannel2["EMAIL"] = "email";
|
|
934
|
-
OTPVerifyRequestChannel2["PHONE"] = "phone";
|
|
935
|
-
return OTPVerifyRequestChannel2;
|
|
936
|
-
})(OTPVerifyRequestChannel || {});
|
|
937
926
|
|
|
938
927
|
// src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
|
|
939
928
|
var import_zod = require("zod");
|
|
@@ -947,7 +936,7 @@ var import_zod2 = require("zod");
|
|
|
947
936
|
var CentrifugoTokenSchema = import_zod2.z.object({
|
|
948
937
|
token: import_zod2.z.string(),
|
|
949
938
|
centrifugo_url: import_zod2.z.union([import_zod2.z.url(), import_zod2.z.literal("")]),
|
|
950
|
-
expires_at: import_zod2.z.
|
|
939
|
+
expires_at: import_zod2.z.string().datetime({ offset: true }),
|
|
951
940
|
channels: import_zod2.z.array(import_zod2.z.string())
|
|
952
941
|
});
|
|
953
942
|
|
|
@@ -988,14 +977,14 @@ var OAuthConnectionSchema = import_zod7.z.object({
|
|
|
988
977
|
provider_username: import_zod7.z.string(),
|
|
989
978
|
provider_email: import_zod7.z.email(),
|
|
990
979
|
provider_avatar_url: import_zod7.z.union([import_zod7.z.url(), import_zod7.z.literal("")]),
|
|
991
|
-
connected_at: import_zod7.z.
|
|
992
|
-
last_login_at: import_zod7.z.
|
|
980
|
+
connected_at: import_zod7.z.string().datetime({ offset: true }),
|
|
981
|
+
last_login_at: import_zod7.z.string().datetime({ offset: true })
|
|
993
982
|
});
|
|
994
983
|
|
|
995
984
|
// src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
|
|
996
985
|
var import_zod8 = require("zod");
|
|
997
986
|
var OAuthDisconnectRequestRequestSchema = import_zod8.z.object({
|
|
998
|
-
provider: import_zod8.z.nativeEnum(
|
|
987
|
+
provider: import_zod8.z.nativeEnum(OAuthConnectionProvider)
|
|
999
988
|
});
|
|
1000
989
|
|
|
1001
990
|
// src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
|
|
@@ -1049,7 +1038,7 @@ var import_zod15 = require("zod");
|
|
|
1049
1038
|
var OTPVerifyRequestSchema = import_zod15.z.object({
|
|
1050
1039
|
identifier: import_zod15.z.string().min(1),
|
|
1051
1040
|
otp: import_zod15.z.string().min(6).max(6),
|
|
1052
|
-
channel: import_zod15.z.nativeEnum(
|
|
1041
|
+
channel: import_zod15.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
1053
1042
|
source_url: import_zod15.z.union([import_zod15.z.url(), import_zod15.z.literal("")]).optional()
|
|
1054
1043
|
});
|
|
1055
1044
|
|
|
@@ -1072,8 +1061,8 @@ var UserSchema = import_zod16.z.object({
|
|
|
1072
1061
|
avatar: import_zod16.z.union([import_zod16.z.url(), import_zod16.z.literal("")]).nullable(),
|
|
1073
1062
|
is_staff: import_zod16.z.boolean(),
|
|
1074
1063
|
is_superuser: import_zod16.z.boolean(),
|
|
1075
|
-
date_joined: import_zod16.z.
|
|
1076
|
-
last_login: import_zod16.z.
|
|
1064
|
+
date_joined: import_zod16.z.string().datetime({ offset: true }),
|
|
1065
|
+
last_login: import_zod16.z.string().datetime({ offset: true }).nullable(),
|
|
1077
1066
|
unanswered_messages_count: import_zod16.z.int(),
|
|
1078
1067
|
centrifugo: CentrifugoTokenSchema.nullable()
|
|
1079
1068
|
});
|
|
@@ -2007,7 +1996,7 @@ var CentrifugoMonitoring = class {
|
|
|
2007
1996
|
if (isParamsObject) {
|
|
2008
1997
|
params = args[0];
|
|
2009
1998
|
} else {
|
|
2010
|
-
params = { channel: args[0],
|
|
1999
|
+
params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
|
|
2011
2000
|
}
|
|
2012
2001
|
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/publishes/", { params });
|
|
2013
2002
|
return response;
|
|
@@ -2992,8 +2981,8 @@ var PublishSchema = import_zod51.z.object({
|
|
|
2992
2981
|
acks_received: import_zod51.z.int(),
|
|
2993
2982
|
acks_expected: import_zod51.z.int().nullable(),
|
|
2994
2983
|
duration_ms: import_zod51.z.number().nullable(),
|
|
2995
|
-
created_at: import_zod51.z.
|
|
2996
|
-
completed_at: import_zod51.z.
|
|
2984
|
+
created_at: import_zod51.z.string().datetime({ offset: true }),
|
|
2985
|
+
completed_at: import_zod51.z.string().datetime({ offset: true }).nullable(),
|
|
2997
2986
|
error_code: import_zod51.z.string().nullable(),
|
|
2998
2987
|
error_message: import_zod51.z.string().nullable()
|
|
2999
2988
|
});
|
|
@@ -3499,7 +3488,7 @@ Method: GET`);
|
|
|
3499
3488
|
__name(getCentrifugoMonitorOverviewRetrieve, "getCentrifugoMonitorOverviewRetrieve");
|
|
3500
3489
|
async function getCentrifugoMonitorPublishesList(params, client) {
|
|
3501
3490
|
const api = client || getAPIInstance2();
|
|
3502
|
-
const response = await api.centrifugo_monitoring.centrifugoMonitorPublishesList(params?.channel, params?.page, params?.page_size, params?.status);
|
|
3491
|
+
const response = await api.centrifugo_monitoring.centrifugoMonitorPublishesList(params?.channel, params?.ordering, params?.page, params?.page_size, params?.search, params?.status);
|
|
3503
3492
|
try {
|
|
3504
3493
|
return PaginatedPublishListSchema.parse(response);
|
|
3505
3494
|
} catch (error) {
|
|
@@ -3887,7 +3876,7 @@ var TotpManagement = class {
|
|
|
3887
3876
|
if (isParamsObject) {
|
|
3888
3877
|
params = args[0];
|
|
3889
3878
|
} else {
|
|
3890
|
-
params = {
|
|
3879
|
+
params = { ordering: args[0], page: args[1], page_size: args[2], search: args[3] };
|
|
3891
3880
|
}
|
|
3892
3881
|
const response = await this.client.request("GET", "/cfg/totp/devices/", { params });
|
|
3893
3882
|
return response;
|
|
@@ -4665,9 +4654,9 @@ var DeviceListSchema = import_zod62.z.object({
|
|
|
4665
4654
|
name: import_zod62.z.string(),
|
|
4666
4655
|
is_primary: import_zod62.z.boolean(),
|
|
4667
4656
|
status: import_zod62.z.nativeEnum(DeviceListStatus),
|
|
4668
|
-
created_at: import_zod62.z.
|
|
4669
|
-
confirmed_at: import_zod62.z.
|
|
4670
|
-
last_used_at: import_zod62.z.
|
|
4657
|
+
created_at: import_zod62.z.string().datetime({ offset: true }),
|
|
4658
|
+
confirmed_at: import_zod62.z.string().datetime({ offset: true }).nullable(),
|
|
4659
|
+
last_used_at: import_zod62.z.string().datetime({ offset: true }).nullable()
|
|
4671
4660
|
});
|
|
4672
4661
|
|
|
4673
4662
|
// src/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts
|
|
@@ -4729,8 +4718,8 @@ var TotpVerifyUserSchema = import_zod68.z.object({
|
|
|
4729
4718
|
avatar: import_zod68.z.union([import_zod68.z.url(), import_zod68.z.literal("")]).nullable(),
|
|
4730
4719
|
is_staff: import_zod68.z.boolean(),
|
|
4731
4720
|
is_superuser: import_zod68.z.boolean(),
|
|
4732
|
-
date_joined: import_zod68.z.
|
|
4733
|
-
last_login: import_zod68.z.
|
|
4721
|
+
date_joined: import_zod68.z.string().datetime({ offset: true }),
|
|
4722
|
+
last_login: import_zod68.z.string().datetime({ offset: true }).nullable(),
|
|
4734
4723
|
unanswered_messages_count: import_zod68.z.int()
|
|
4735
4724
|
});
|
|
4736
4725
|
|
|
@@ -4899,7 +4888,7 @@ __name(createTotpBackupCodesRegenerateCreate, "createTotpBackupCodesRegenerateCr
|
|
|
4899
4888
|
var import_consola13 = require("consola");
|
|
4900
4889
|
async function getTotpDevicesList(params, client) {
|
|
4901
4890
|
const api = client || getAPIInstance3();
|
|
4902
|
-
const response = await api.totp_management.totpDevicesList(params?.page, params?.page_size);
|
|
4891
|
+
const response = await api.totp_management.totpDevicesList(params?.ordering, params?.page, params?.page_size, params?.search);
|
|
4903
4892
|
try {
|
|
4904
4893
|
return PaginatedDeviceListResponseListSchema.parse(response);
|
|
4905
4894
|
} catch (error) {
|