@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.
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/clients.mjs CHANGED
@@ -38,7 +38,7 @@ var Oauth = class {
38
38
  */
39
39
  async accountsOauthConnectionsList() {
40
40
  const response = await this.client.request("GET", "/cfg/accounts/oauth/connections/");
41
- return response;
41
+ return response.results || response;
42
42
  }
43
43
  /**
44
44
  * Disconnect OAuth provider
@@ -815,28 +815,17 @@ var LocalStorageAdapter = class {
815
815
  var enums_exports = {};
816
816
  __export(enums_exports, {
817
817
  OAuthConnectionProvider: () => OAuthConnectionProvider,
818
- OAuthDisconnectRequestRequestProvider: () => OAuthDisconnectRequestRequestProvider,
819
- OTPRequestRequestChannel: () => OTPRequestRequestChannel,
820
- OTPVerifyRequestChannel: () => OTPVerifyRequestChannel
818
+ OTPRequestRequestChannel: () => OTPRequestRequestChannel
821
819
  });
822
820
  var OAuthConnectionProvider = /* @__PURE__ */ ((OAuthConnectionProvider2) => {
823
821
  OAuthConnectionProvider2["GITHUB"] = "github";
824
822
  return OAuthConnectionProvider2;
825
823
  })(OAuthConnectionProvider || {});
826
- var OAuthDisconnectRequestRequestProvider = /* @__PURE__ */ ((OAuthDisconnectRequestRequestProvider2) => {
827
- OAuthDisconnectRequestRequestProvider2["GITHUB"] = "github";
828
- return OAuthDisconnectRequestRequestProvider2;
829
- })(OAuthDisconnectRequestRequestProvider || {});
830
824
  var OTPRequestRequestChannel = /* @__PURE__ */ ((OTPRequestRequestChannel2) => {
831
825
  OTPRequestRequestChannel2["EMAIL"] = "email";
832
826
  OTPRequestRequestChannel2["PHONE"] = "phone";
833
827
  return OTPRequestRequestChannel2;
834
828
  })(OTPRequestRequestChannel || {});
835
- var OTPVerifyRequestChannel = /* @__PURE__ */ ((OTPVerifyRequestChannel2) => {
836
- OTPVerifyRequestChannel2["EMAIL"] = "email";
837
- OTPVerifyRequestChannel2["PHONE"] = "phone";
838
- return OTPVerifyRequestChannel2;
839
- })(OTPVerifyRequestChannel || {});
840
829
 
841
830
  // src/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
842
831
  import { z } from "zod";
@@ -850,7 +839,7 @@ import { z as z2 } from "zod";
850
839
  var CentrifugoTokenSchema = z2.object({
851
840
  token: z2.string(),
852
841
  centrifugo_url: z2.union([z2.url(), z2.literal("")]),
853
- expires_at: z2.iso.datetime(),
842
+ expires_at: z2.string().datetime({ offset: true }),
854
843
  channels: z2.array(z2.string())
855
844
  });
856
845
 
@@ -891,14 +880,14 @@ var OAuthConnectionSchema = z7.object({
891
880
  provider_username: z7.string(),
892
881
  provider_email: z7.email(),
893
882
  provider_avatar_url: z7.union([z7.url(), z7.literal("")]),
894
- connected_at: z7.iso.datetime(),
895
- last_login_at: z7.iso.datetime()
883
+ connected_at: z7.string().datetime({ offset: true }),
884
+ last_login_at: z7.string().datetime({ offset: true })
896
885
  });
897
886
 
898
887
  // src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
899
888
  import { z as z8 } from "zod";
900
889
  var OAuthDisconnectRequestRequestSchema = z8.object({
901
- provider: z8.nativeEnum(OAuthDisconnectRequestRequestProvider)
890
+ provider: z8.nativeEnum(OAuthConnectionProvider)
902
891
  });
903
892
 
904
893
  // src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
@@ -952,7 +941,7 @@ import { z as z15 } from "zod";
952
941
  var OTPVerifyRequestSchema = z15.object({
953
942
  identifier: z15.string().min(1),
954
943
  otp: z15.string().min(6).max(6),
955
- channel: z15.nativeEnum(OTPVerifyRequestChannel).optional(),
944
+ channel: z15.nativeEnum(OTPRequestRequestChannel).optional(),
956
945
  source_url: z15.union([z15.url(), z15.literal("")]).optional()
957
946
  });
958
947
 
@@ -975,8 +964,8 @@ var UserSchema = z16.object({
975
964
  avatar: z16.union([z16.url(), z16.literal("")]).nullable(),
976
965
  is_staff: z16.boolean(),
977
966
  is_superuser: z16.boolean(),
978
- date_joined: z16.iso.datetime(),
979
- last_login: z16.iso.datetime().nullable(),
967
+ date_joined: z16.string().datetime({ offset: true }),
968
+ last_login: z16.string().datetime({ offset: true }).nullable(),
980
969
  unanswered_messages_count: z16.int(),
981
970
  centrifugo: CentrifugoTokenSchema.nullable()
982
971
  });
@@ -1910,7 +1899,7 @@ var CentrifugoMonitoring = class {
1910
1899
  if (isParamsObject) {
1911
1900
  params = args[0];
1912
1901
  } else {
1913
- params = { channel: args[0], page: args[1], page_size: args[2], status: args[3] };
1902
+ params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
1914
1903
  }
1915
1904
  const response = await this.client.request("GET", "/cfg/centrifugo/monitor/publishes/", { params });
1916
1905
  return response;
@@ -2895,8 +2884,8 @@ var PublishSchema = z51.object({
2895
2884
  acks_received: z51.int(),
2896
2885
  acks_expected: z51.int().nullable(),
2897
2886
  duration_ms: z51.number().nullable(),
2898
- created_at: z51.iso.datetime(),
2899
- completed_at: z51.iso.datetime().nullable(),
2887
+ created_at: z51.string().datetime({ offset: true }),
2888
+ completed_at: z51.string().datetime({ offset: true }).nullable(),
2900
2889
  error_code: z51.string().nullable(),
2901
2890
  error_message: z51.string().nullable()
2902
2891
  });
@@ -3402,7 +3391,7 @@ Method: GET`);
3402
3391
  __name(getCentrifugoMonitorOverviewRetrieve, "getCentrifugoMonitorOverviewRetrieve");
3403
3392
  async function getCentrifugoMonitorPublishesList(params, client) {
3404
3393
  const api = client || getAPIInstance2();
3405
- const response = await api.centrifugo_monitoring.centrifugoMonitorPublishesList(params?.channel, params?.page, params?.page_size, params?.status);
3394
+ const response = await api.centrifugo_monitoring.centrifugoMonitorPublishesList(params?.channel, params?.ordering, params?.page, params?.page_size, params?.search, params?.status);
3406
3395
  try {
3407
3396
  return PaginatedPublishListSchema.parse(response);
3408
3397
  } catch (error) {
@@ -3790,7 +3779,7 @@ var TotpManagement = class {
3790
3779
  if (isParamsObject) {
3791
3780
  params = args[0];
3792
3781
  } else {
3793
- params = { page: args[0], page_size: args[1] };
3782
+ params = { ordering: args[0], page: args[1], page_size: args[2], search: args[3] };
3794
3783
  }
3795
3784
  const response = await this.client.request("GET", "/cfg/totp/devices/", { params });
3796
3785
  return response;
@@ -4568,9 +4557,9 @@ var DeviceListSchema = z62.object({
4568
4557
  name: z62.string(),
4569
4558
  is_primary: z62.boolean(),
4570
4559
  status: z62.nativeEnum(DeviceListStatus),
4571
- created_at: z62.iso.datetime(),
4572
- confirmed_at: z62.iso.datetime().nullable(),
4573
- last_used_at: z62.iso.datetime().nullable()
4560
+ created_at: z62.string().datetime({ offset: true }),
4561
+ confirmed_at: z62.string().datetime({ offset: true }).nullable(),
4562
+ last_used_at: z62.string().datetime({ offset: true }).nullable()
4574
4563
  });
4575
4564
 
4576
4565
  // src/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts
@@ -4632,8 +4621,8 @@ var TotpVerifyUserSchema = z68.object({
4632
4621
  avatar: z68.union([z68.url(), z68.literal("")]).nullable(),
4633
4622
  is_staff: z68.boolean(),
4634
4623
  is_superuser: z68.boolean(),
4635
- date_joined: z68.iso.datetime(),
4636
- last_login: z68.iso.datetime().nullable(),
4624
+ date_joined: z68.string().datetime({ offset: true }),
4625
+ last_login: z68.string().datetime({ offset: true }).nullable(),
4637
4626
  unanswered_messages_count: z68.int()
4638
4627
  });
4639
4628
 
@@ -4802,7 +4791,7 @@ __name(createTotpBackupCodesRegenerateCreate, "createTotpBackupCodesRegenerateCr
4802
4791
  import { consola as consola10 } from "consola";
4803
4792
  async function getTotpDevicesList(params, client) {
4804
4793
  const api = client || getAPIInstance3();
4805
- const response = await api.totp_management.totpDevicesList(params?.page, params?.page_size);
4794
+ const response = await api.totp_management.totpDevicesList(params?.ordering, params?.page, params?.page_size, params?.search);
4806
4795
  try {
4807
4796
  return PaginatedDeviceListResponseListSchema.parse(response);
4808
4797
  } catch (error) {