@djangocfg/api 2.1.127 → 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.
Files changed (49) hide show
  1. package/dist/auth-server.cjs +10 -19
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +10 -19
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +18 -29
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.d.cts +7 -16
  8. package/dist/auth.d.ts +7 -16
  9. package/dist/auth.mjs +18 -29
  10. package/dist/auth.mjs.map +1 -1
  11. package/dist/clients.cjs +20 -31
  12. package/dist/clients.cjs.map +1 -1
  13. package/dist/clients.d.cts +46 -54
  14. package/dist/clients.d.ts +46 -54
  15. package/dist/clients.mjs +20 -31
  16. package/dist/clients.mjs.map +1 -1
  17. package/dist/hooks.cjs +8 -17
  18. package/dist/hooks.cjs.map +1 -1
  19. package/dist/hooks.d.cts +11 -20
  20. package/dist/hooks.d.ts +11 -20
  21. package/dist/hooks.mjs +8 -17
  22. package/dist/hooks.mjs.map +1 -1
  23. package/dist/index.cjs +12 -23
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +15 -35
  26. package/dist/index.d.ts +15 -35
  27. package/dist/index.mjs +12 -23
  28. package/dist/index.mjs.map +1 -1
  29. package/package.json +2 -2
  30. package/src/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts +1 -1
  31. package/src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts +2 -2
  32. package/src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts +1 -1
  33. package/src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +1 -1
  34. package/src/generated/cfg_accounts/_utils/schemas/User.schema.ts +2 -2
  35. package/src/generated/cfg_accounts/accounts/models.ts +1 -1
  36. package/src/generated/cfg_accounts/accounts__oauth/client.ts +1 -1
  37. package/src/generated/cfg_accounts/accounts__oauth/models.ts +1 -1
  38. package/src/generated/cfg_accounts/enums.ts +1 -19
  39. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +2 -2
  40. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +1 -1
  41. package/src/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts +2 -2
  42. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts +3 -3
  43. package/src/generated/cfg_centrifugo/schema.json +18 -0
  44. package/src/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts +2 -2
  45. package/src/generated/cfg_totp/_utils/hooks/totp__totp_management.ts +1 -1
  46. package/src/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts +3 -3
  47. package/src/generated/cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts +2 -2
  48. package/src/generated/cfg_totp/schema.json +18 -0
  49. package/src/generated/cfg_totp/totp__totp_management/client.ts +3 -3
package/dist/auth.cjs CHANGED
@@ -349,7 +349,7 @@ var Oauth = class {
349
349
  */
350
350
  async accountsOauthConnectionsList() {
351
351
  const response = await this.client.request("GET", "/cfg/accounts/oauth/connections/");
352
- return response;
352
+ return response.results || response;
353
353
  }
354
354
  /**
355
355
  * Disconnect OAuth provider
@@ -1126,28 +1126,17 @@ var LocalStorageAdapter = class {
1126
1126
  var enums_exports = {};
1127
1127
  __export(enums_exports, {
1128
1128
  OAuthConnectionProvider: () => OAuthConnectionProvider,
1129
- OAuthDisconnectRequestRequestProvider: () => OAuthDisconnectRequestRequestProvider,
1130
- OTPRequestRequestChannel: () => OTPRequestRequestChannel,
1131
- OTPVerifyRequestChannel: () => OTPVerifyRequestChannel
1129
+ OTPRequestRequestChannel: () => OTPRequestRequestChannel
1132
1130
  });
1133
1131
  var OAuthConnectionProvider = /* @__PURE__ */ ((OAuthConnectionProvider2) => {
1134
1132
  OAuthConnectionProvider2["GITHUB"] = "github";
1135
1133
  return OAuthConnectionProvider2;
1136
1134
  })(OAuthConnectionProvider || {});
1137
- var OAuthDisconnectRequestRequestProvider = /* @__PURE__ */ ((OAuthDisconnectRequestRequestProvider2) => {
1138
- OAuthDisconnectRequestRequestProvider2["GITHUB"] = "github";
1139
- return OAuthDisconnectRequestRequestProvider2;
1140
- })(OAuthDisconnectRequestRequestProvider || {});
1141
1135
  var OTPRequestRequestChannel = /* @__PURE__ */ ((OTPRequestRequestChannel2) => {
1142
1136
  OTPRequestRequestChannel2["EMAIL"] = "email";
1143
1137
  OTPRequestRequestChannel2["PHONE"] = "phone";
1144
1138
  return OTPRequestRequestChannel2;
1145
1139
  })(OTPRequestRequestChannel || {});
1146
- var OTPVerifyRequestChannel = /* @__PURE__ */ ((OTPVerifyRequestChannel2) => {
1147
- OTPVerifyRequestChannel2["EMAIL"] = "email";
1148
- OTPVerifyRequestChannel2["PHONE"] = "phone";
1149
- return OTPVerifyRequestChannel2;
1150
- })(OTPVerifyRequestChannel || {});
1151
1140
 
1152
1141
  // src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
1153
1142
  var import_zod = require("zod");
@@ -1161,7 +1150,7 @@ var import_zod2 = require("zod");
1161
1150
  var CentrifugoTokenSchema = import_zod2.z.object({
1162
1151
  token: import_zod2.z.string(),
1163
1152
  centrifugo_url: import_zod2.z.union([import_zod2.z.url(), import_zod2.z.literal("")]),
1164
- expires_at: import_zod2.z.iso.datetime(),
1153
+ expires_at: import_zod2.z.string().datetime({ offset: true }),
1165
1154
  channels: import_zod2.z.array(import_zod2.z.string())
1166
1155
  });
1167
1156
 
@@ -1202,14 +1191,14 @@ var OAuthConnectionSchema = import_zod7.z.object({
1202
1191
  provider_username: import_zod7.z.string(),
1203
1192
  provider_email: import_zod7.z.email(),
1204
1193
  provider_avatar_url: import_zod7.z.union([import_zod7.z.url(), import_zod7.z.literal("")]),
1205
- connected_at: import_zod7.z.iso.datetime(),
1206
- last_login_at: import_zod7.z.iso.datetime()
1194
+ connected_at: import_zod7.z.string().datetime({ offset: true }),
1195
+ last_login_at: import_zod7.z.string().datetime({ offset: true })
1207
1196
  });
1208
1197
 
1209
1198
  // src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
1210
1199
  var import_zod8 = require("zod");
1211
1200
  var OAuthDisconnectRequestRequestSchema = import_zod8.z.object({
1212
- provider: import_zod8.z.nativeEnum(OAuthDisconnectRequestRequestProvider)
1201
+ provider: import_zod8.z.nativeEnum(OAuthConnectionProvider)
1213
1202
  });
1214
1203
 
1215
1204
  // src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
@@ -1263,7 +1252,7 @@ var import_zod15 = require("zod");
1263
1252
  var OTPVerifyRequestSchema = import_zod15.z.object({
1264
1253
  identifier: import_zod15.z.string().min(1),
1265
1254
  otp: import_zod15.z.string().min(6).max(6),
1266
- channel: import_zod15.z.nativeEnum(OTPVerifyRequestChannel).optional(),
1255
+ channel: import_zod15.z.nativeEnum(OTPRequestRequestChannel).optional(),
1267
1256
  source_url: import_zod15.z.union([import_zod15.z.url(), import_zod15.z.literal("")]).optional()
1268
1257
  });
1269
1258
 
@@ -1286,8 +1275,8 @@ var UserSchema = import_zod16.z.object({
1286
1275
  avatar: import_zod16.z.union([import_zod16.z.url(), import_zod16.z.literal("")]).nullable(),
1287
1276
  is_staff: import_zod16.z.boolean(),
1288
1277
  is_superuser: import_zod16.z.boolean(),
1289
- date_joined: import_zod16.z.iso.datetime(),
1290
- last_login: import_zod16.z.iso.datetime().nullable(),
1278
+ date_joined: import_zod16.z.string().datetime({ offset: true }),
1279
+ last_login: import_zod16.z.string().datetime({ offset: true }).nullable(),
1291
1280
  unanswered_messages_count: import_zod16.z.int(),
1292
1281
  centrifugo: CentrifugoTokenSchema.nullable()
1293
1282
  });
@@ -1951,7 +1940,7 @@ var CentrifugoMonitoring = class {
1951
1940
  if (isParamsObject) {
1952
1941
  params = args[0];
1953
1942
  } else {
1954
- params = { channel: args[0], page: args[1], page_size: args[2], status: args[3] };
1943
+ params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
1955
1944
  }
1956
1945
  const response = await this.client.request("GET", "/cfg/centrifugo/monitor/publishes/", { params });
1957
1946
  return response;
@@ -2896,8 +2885,8 @@ var PublishSchema = import_zod51.z.object({
2896
2885
  acks_received: import_zod51.z.int(),
2897
2886
  acks_expected: import_zod51.z.int().nullable(),
2898
2887
  duration_ms: import_zod51.z.number().nullable(),
2899
- created_at: import_zod51.z.iso.datetime(),
2900
- completed_at: import_zod51.z.iso.datetime().nullable(),
2888
+ created_at: import_zod51.z.string().datetime({ offset: true }),
2889
+ completed_at: import_zod51.z.string().datetime({ offset: true }).nullable(),
2901
2890
  error_code: import_zod51.z.string().nullable(),
2902
2891
  error_message: import_zod51.z.string().nullable()
2903
2892
  });
@@ -3136,7 +3125,7 @@ var TotpManagement = class {
3136
3125
  if (isParamsObject) {
3137
3126
  params = args[0];
3138
3127
  } else {
3139
- params = { page: args[0], page_size: args[1] };
3128
+ params = { ordering: args[0], page: args[1], page_size: args[2], search: args[3] };
3140
3129
  }
3141
3130
  const response = await this.client.request("GET", "/cfg/totp/devices/", { params });
3142
3131
  return response;
@@ -3894,9 +3883,9 @@ var DeviceListSchema = import_zod62.z.object({
3894
3883
  name: import_zod62.z.string(),
3895
3884
  is_primary: import_zod62.z.boolean(),
3896
3885
  status: import_zod62.z.nativeEnum(DeviceListStatus),
3897
- created_at: import_zod62.z.iso.datetime(),
3898
- confirmed_at: import_zod62.z.iso.datetime().nullable(),
3899
- last_used_at: import_zod62.z.iso.datetime().nullable()
3886
+ created_at: import_zod62.z.string().datetime({ offset: true }),
3887
+ confirmed_at: import_zod62.z.string().datetime({ offset: true }).nullable(),
3888
+ last_used_at: import_zod62.z.string().datetime({ offset: true }).nullable()
3900
3889
  });
3901
3890
 
3902
3891
  // src/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts
@@ -3958,8 +3947,8 @@ var TotpVerifyUserSchema = import_zod68.z.object({
3958
3947
  avatar: import_zod68.z.union([import_zod68.z.url(), import_zod68.z.literal("")]).nullable(),
3959
3948
  is_staff: import_zod68.z.boolean(),
3960
3949
  is_superuser: import_zod68.z.boolean(),
3961
- date_joined: import_zod68.z.iso.datetime(),
3962
- last_login: import_zod68.z.iso.datetime().nullable(),
3950
+ date_joined: import_zod68.z.string().datetime({ offset: true }),
3951
+ last_login: import_zod68.z.string().datetime({ offset: true }).nullable(),
3963
3952
  unanswered_messages_count: import_zod68.z.int()
3964
3953
  });
3965
3954