@newfold/huapi-js 2.1482.0 → 2.1501.0

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/src/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  * Hosting UAPI
5
5
  * Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
6
- * OpenAPI spec version: 1.1482.0
6
+ * OpenAPI spec version: 1.1501.0
7
7
  */
8
8
  import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
9
9
  import axios from 'axios';
@@ -33,6 +33,32 @@ export function useAccountEventList(params, options) {
33
33
  query.queryKey = queryOptions.queryKey;
34
34
  return query;
35
35
  }
36
+ /**
37
+ * Returns a list of feature information such as addon, features, sites, du, fs, db
38
+ * @summary Return the array of product_inst_ids for the supplied account_ids
39
+ */
40
+ export const accountFeatures = (params, options) => {
41
+ return axios.get(`/v1/account/features`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
42
+ };
43
+ export const getAccountFeaturesQueryKey = (params) => {
44
+ return [`/v1/account/features`, ...(params ? [params] : [])];
45
+ };
46
+ export const getAccountFeaturesQueryOptions = (params, options) => {
47
+ var _a;
48
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
49
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getAccountFeaturesQueryKey(params);
50
+ const queryFn = ({ signal }) => accountFeatures(params, Object.assign({ signal }, axiosOptions));
51
+ return Object.assign({ queryKey, queryFn }, queryOptions);
52
+ };
53
+ /**
54
+ * @summary Return the array of product_inst_ids for the supplied account_ids
55
+ */
56
+ export function useAccountFeatures(params, options) {
57
+ const queryOptions = getAccountFeaturesQueryOptions(params, options);
58
+ const query = useQuery(queryOptions);
59
+ query.queryKey = queryOptions.queryKey;
60
+ return query;
61
+ }
36
62
  /**
37
63
  * Returns a hosting account list
38
64
  * @summary Hosting account list for a customer
@@ -2587,6 +2613,102 @@ export const useHostingEmailForwardDelete = (options) => {
2587
2613
  const mutationOptions = getHostingEmailForwardDeleteMutationOptions(options);
2588
2614
  return useMutation(mutationOptions);
2589
2615
  };
2616
+ /**
2617
+ * Generates a GnuPG (GPG) key.
2618
+ * @summary Encryption add
2619
+ */
2620
+ export const hostingEmailKeysAdd = (hostingId, hostingEmailKeysAddBody, options) => {
2621
+ return axios.post(`/v1/hosting/${hostingId}/emails/keys`, hostingEmailKeysAddBody, options);
2622
+ };
2623
+ export const getHostingEmailKeysAddMutationOptions = (options) => {
2624
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2625
+ const mutationFn = (props) => {
2626
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
2627
+ return hostingEmailKeysAdd(hostingId, data, axiosOptions);
2628
+ };
2629
+ return Object.assign({ mutationFn }, mutationOptions);
2630
+ };
2631
+ /**
2632
+ * @summary Encryption add
2633
+ */
2634
+ export const useHostingEmailKeysAdd = (options) => {
2635
+ const mutationOptions = getHostingEmailKeysAddMutationOptions(options);
2636
+ return useMutation(mutationOptions);
2637
+ };
2638
+ /**
2639
+ * Lists the GnuPG (GPG) public and secret keys for the currently-authenticated account.
2640
+ * @summary Encryption lists
2641
+ */
2642
+ export const hostingEmailKeysList = (hostingId, options) => {
2643
+ return axios.get(`/v1/hosting/${hostingId}/emails/keys`, options);
2644
+ };
2645
+ export const getHostingEmailKeysListQueryKey = (hostingId) => {
2646
+ return [`/v1/hosting/${hostingId}/emails/keys`];
2647
+ };
2648
+ export const getHostingEmailKeysListQueryOptions = (hostingId, options) => {
2649
+ var _a;
2650
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2651
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingEmailKeysListQueryKey(hostingId);
2652
+ const queryFn = ({ signal }) => hostingEmailKeysList(hostingId, Object.assign({ signal }, axiosOptions));
2653
+ return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
2654
+ };
2655
+ /**
2656
+ * @summary Encryption lists
2657
+ */
2658
+ export function useHostingEmailKeysList(hostingId, options) {
2659
+ const queryOptions = getHostingEmailKeysListQueryOptions(hostingId, options);
2660
+ const query = useQuery(queryOptions);
2661
+ query.queryKey = queryOptions.queryKey;
2662
+ return query;
2663
+ }
2664
+ /**
2665
+ * Gets the email routing type used when an email is delivered for a domain
2666
+ * @summary Email routing get
2667
+ */
2668
+ export const hostingEmailDomainRouting = (hostingId, params, options) => {
2669
+ return axios.get(`/v1/hosting/${hostingId}/emails/routing`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
2670
+ };
2671
+ export const getHostingEmailDomainRoutingQueryKey = (hostingId, params) => {
2672
+ return [`/v1/hosting/${hostingId}/emails/routing`, ...(params ? [params] : [])];
2673
+ };
2674
+ export const getHostingEmailDomainRoutingQueryOptions = (hostingId, params, options) => {
2675
+ var _a;
2676
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2677
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingEmailDomainRoutingQueryKey(hostingId, params);
2678
+ const queryFn = ({ signal }) => hostingEmailDomainRouting(hostingId, params, Object.assign({ signal }, axiosOptions));
2679
+ return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
2680
+ };
2681
+ /**
2682
+ * @summary Email routing get
2683
+ */
2684
+ export function useHostingEmailDomainRouting(hostingId, params, options) {
2685
+ const queryOptions = getHostingEmailDomainRoutingQueryOptions(hostingId, params, options);
2686
+ const query = useQuery(queryOptions);
2687
+ query.queryKey = queryOptions.queryKey;
2688
+ return query;
2689
+ }
2690
+ /**
2691
+ * Sets the email routing type used when an email is delivered for a domain
2692
+ * @summary Email routing set
2693
+ */
2694
+ export const hostingEmailDomainRoutingSet = (hostingId, hostingEmailDomainRoutingSetBody, options) => {
2695
+ return axios.put(`/v1/hosting/${hostingId}/emails/routing`, hostingEmailDomainRoutingSetBody, options);
2696
+ };
2697
+ export const getHostingEmailDomainRoutingSetMutationOptions = (options) => {
2698
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2699
+ const mutationFn = (props) => {
2700
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
2701
+ return hostingEmailDomainRoutingSet(hostingId, data, axiosOptions);
2702
+ };
2703
+ return Object.assign({ mutationFn }, mutationOptions);
2704
+ };
2705
+ /**
2706
+ * @summary Email routing set
2707
+ */
2708
+ export const useHostingEmailDomainRoutingSet = (options) => {
2709
+ const mutationOptions = getHostingEmailDomainRoutingSetMutationOptions(options);
2710
+ return useMutation(mutationOptions);
2711
+ };
2590
2712
  /**
2591
2713
  * Update an email address's settings, depending on address type
2592
2714
  * @summary update email account settings
@@ -2609,6 +2731,124 @@ export const useHostingEmailSettings = (options) => {
2609
2731
  const mutationOptions = getHostingEmailSettingsMutationOptions(options);
2610
2732
  return useMutation(mutationOptions);
2611
2733
  };
2734
+ /**
2735
+ * Lists email spam custom settings including allowlist, blocklist, and custom scores
2736
+ * @summary Get email spam custom settings
2737
+ */
2738
+ export const hostingEmailSpamCustomSettings = (hostingId, options) => {
2739
+ return axios.get(`/v1/hosting/${hostingId}/emails/spam/custom-settings`, options);
2740
+ };
2741
+ export const getHostingEmailSpamCustomSettingsQueryKey = (hostingId) => {
2742
+ return [`/v1/hosting/${hostingId}/emails/spam/custom-settings`];
2743
+ };
2744
+ export const getHostingEmailSpamCustomSettingsQueryOptions = (hostingId, options) => {
2745
+ var _a;
2746
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2747
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingEmailSpamCustomSettingsQueryKey(hostingId);
2748
+ const queryFn = ({ signal }) => hostingEmailSpamCustomSettings(hostingId, Object.assign({ signal }, axiosOptions));
2749
+ return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
2750
+ };
2751
+ /**
2752
+ * @summary Get email spam custom settings
2753
+ */
2754
+ export function useHostingEmailSpamCustomSettings(hostingId, options) {
2755
+ const queryOptions = getHostingEmailSpamCustomSettingsQueryOptions(hostingId, options);
2756
+ const query = useQuery(queryOptions);
2757
+ query.queryKey = queryOptions.queryKey;
2758
+ return query;
2759
+ }
2760
+ /**
2761
+ * Update one or more of allowlist, blocklist, and custom scores
2762
+ * @summary Set email spam custom settings
2763
+ */
2764
+ export const hostingEmailSpamCustomSettingsUpdate = (hostingId, hostingEmailSpamCustomSettingsUpdateBody, options) => {
2765
+ return axios.put(`/v1/hosting/${hostingId}/emails/spam/custom-settings`, hostingEmailSpamCustomSettingsUpdateBody, options);
2766
+ };
2767
+ export const getHostingEmailSpamCustomSettingsUpdateMutationOptions = (options) => {
2768
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2769
+ const mutationFn = (props) => {
2770
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
2771
+ return hostingEmailSpamCustomSettingsUpdate(hostingId, data, axiosOptions);
2772
+ };
2773
+ return Object.assign({ mutationFn }, mutationOptions);
2774
+ };
2775
+ /**
2776
+ * @summary Set email spam custom settings
2777
+ */
2778
+ export const useHostingEmailSpamCustomSettingsUpdate = (options) => {
2779
+ const mutationOptions = getHostingEmailSpamCustomSettingsUpdateMutationOptions(options);
2780
+ return useMutation(mutationOptions);
2781
+ };
2782
+ /**
2783
+ * Empty the account's email spam box
2784
+ * @summary empty spam box
2785
+ */
2786
+ export const hostingEmailSpamEmpty = (hostingId, options) => {
2787
+ return axios.post(`/v1/hosting/${hostingId}/emails/spam/empty`, undefined, options);
2788
+ };
2789
+ export const getHostingEmailSpamEmptyMutationOptions = (options) => {
2790
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2791
+ const mutationFn = (props) => {
2792
+ const { hostingId } = props !== null && props !== void 0 ? props : {};
2793
+ return hostingEmailSpamEmpty(hostingId, axiosOptions);
2794
+ };
2795
+ return Object.assign({ mutationFn }, mutationOptions);
2796
+ };
2797
+ /**
2798
+ * @summary empty spam box
2799
+ */
2800
+ export const useHostingEmailSpamEmpty = (options) => {
2801
+ const mutationOptions = getHostingEmailSpamEmptyMutationOptions(options);
2802
+ return useMutation(mutationOptions);
2803
+ };
2804
+ /**
2805
+ * Returns current account-wide spam-related settings
2806
+ * @summary Get account spam settings
2807
+ */
2808
+ export const hostingEmailSpamSettings = (hostingId, options) => {
2809
+ return axios.get(`/v1/hosting/${hostingId}/emails/spam/settings`, options);
2810
+ };
2811
+ export const getHostingEmailSpamSettingsQueryKey = (hostingId) => {
2812
+ return [`/v1/hosting/${hostingId}/emails/spam/settings`];
2813
+ };
2814
+ export const getHostingEmailSpamSettingsQueryOptions = (hostingId, options) => {
2815
+ var _a;
2816
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2817
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingEmailSpamSettingsQueryKey(hostingId);
2818
+ const queryFn = ({ signal }) => hostingEmailSpamSettings(hostingId, Object.assign({ signal }, axiosOptions));
2819
+ return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
2820
+ };
2821
+ /**
2822
+ * @summary Get account spam settings
2823
+ */
2824
+ export function useHostingEmailSpamSettings(hostingId, options) {
2825
+ const queryOptions = getHostingEmailSpamSettingsQueryOptions(hostingId, options);
2826
+ const query = useQuery(queryOptions);
2827
+ query.queryKey = queryOptions.queryKey;
2828
+ return query;
2829
+ }
2830
+ /**
2831
+ * Updates one or more account-wide spam-related settings
2832
+ * @summary Update account spam settings
2833
+ */
2834
+ export const hostingEmailSpamSettingsUpdate = (hostingId, hostingEmailSpamSettingsUpdateBody, options) => {
2835
+ return axios.put(`/v1/hosting/${hostingId}/emails/spam/settings`, hostingEmailSpamSettingsUpdateBody, options);
2836
+ };
2837
+ export const getHostingEmailSpamSettingsUpdateMutationOptions = (options) => {
2838
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
2839
+ const mutationFn = (props) => {
2840
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
2841
+ return hostingEmailSpamSettingsUpdate(hostingId, data, axiosOptions);
2842
+ };
2843
+ return Object.assign({ mutationFn }, mutationOptions);
2844
+ };
2845
+ /**
2846
+ * @summary Update account spam settings
2847
+ */
2848
+ export const useHostingEmailSpamSettingsUpdate = (options) => {
2849
+ const mutationOptions = getHostingEmailSpamSettingsUpdateMutationOptions(options);
2850
+ return useMutation(mutationOptions);
2851
+ };
2612
2852
  /**
2613
2853
  * Returns a SSO login token for an email account by using the query parameters. If the email address is not provided, the SSO token will be generated using the account's username by default.
2614
2854
  * @summary email sso
@@ -1,6 +1,7 @@
1
1
  import { http } from 'msw';
2
- import type { AccessLogs200, AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddPrivacy200, AddSiteIpaddress200, AddonsCloudflare200, AddonsInfo200, AddonsJetpackValidate200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupCreateV2200, BackupCreateV3200, BackupDownloadV2200, BackupInitiate200, BackupList200, BackupListV2200, BackupMeta200, BackupRestoreV2200, BackupStatus200, BackupStatusV2200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronLastRun200, Db200, DbAdd200, DbCheckDatabase200, DbListV2200, DbMultipleUserDatabase200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainDnsExport200, DomainDnsImport200, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorEdit200, DomainDnseditorList200, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, EmailSso200, ErrorPagesAdd200, ErrorPagesDelete200, ErrorPagesFetch200, HostingAccount200, HostingAddons200, HostingAdvancedDns200, HostingAdvancedDnsUpdate200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainAssign200, HostingDomainAvailability200, HostingDomainsUnassign200, HostingDomainsUnassignV2200, HostingDomainsV2200, HostingEcommerceInfo200, HostingEmailAdd200, HostingEmailAutoresponderCreate200, HostingEmailAutoresponderDelete200, HostingEmailAutoresponderInfo200, HostingEmailAutoresponderList200, HostingEmailAutoresponderUpdate200, HostingEmailDelete200, HostingEmailFiltersAdd200, HostingEmailFiltersDelete200, HostingEmailFiltersList200, HostingEmailFiltersUpdate200, HostingEmailFolderList200, HostingEmailForwardDelete200, HostingEmailForwarderAdd200, HostingEmailForwardersList200, HostingEmailList200, HostingEmailSettings200, HostingEmailUpdate200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingRedirectsV2200Item, HostingRepo200, HostingRepoList200Item, HostingRepoLog200, HostingRepoSync200, HostingResellerSsoWhm200, HostingServerHits200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSiteAddV2200, HostingSitesV2200, HostingSshInfo200, HostingVisitors200, HotlinkconfigAdd200, HotlinkconfigDelete200, HotlinkconfigDetails200, Index200, JetpackBackupStatus200, ListCrons200, ListFilesV2200, ListIndex200, PasswordGenerate200, PasswordScore200, PhpErrors200, Privacy200, PrivacyUser200, ProductLicenseDetails200, RepairDatabase200, ResetSite200, Site200, SiteAddonCloudflare200, SiteAddonWpsolution200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SiteMalwareStatusV2200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteQualityMetrics200, SiteStatus200, SiteUpdate200, SiteUsers200, SiteUsersV2200, SitesAccessLogs200, SitesAtomicMetrics200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
2
+ import type { AccessLogs200, AccountEventList200, AccountFeatures200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddPrivacy200, AddSiteIpaddress200, AddonsCloudflare200, AddonsInfo200, AddonsJetpackValidate200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupCreateV2200, BackupCreateV3200, BackupDownloadV2200, BackupInitiate200, BackupList200, BackupListV2200, BackupMeta200, BackupRestoreV2200, BackupStatus200, BackupStatusV2200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronLastRun200, Db200, DbAdd200, DbCheckDatabase200, DbListV2200, DbMultipleUserDatabase200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainDnsExport200, DomainDnsImport200, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorEdit200, DomainDnseditorList200, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, EmailSso200, ErrorPagesAdd200, ErrorPagesDelete200, ErrorPagesFetch200, HostingAccount200, HostingAddons200, HostingAdvancedDns200, HostingAdvancedDnsUpdate200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainAssign200, HostingDomainAvailability200, HostingDomainsUnassign200, HostingDomainsUnassignV2200, HostingDomainsV2200, HostingEcommerceInfo200, HostingEmailAdd200, HostingEmailAutoresponderCreate200, HostingEmailAutoresponderDelete200, HostingEmailAutoresponderInfo200, HostingEmailAutoresponderList200, HostingEmailAutoresponderUpdate200, HostingEmailDelete200, HostingEmailDomainRouting200, HostingEmailDomainRoutingSet200, HostingEmailFiltersAdd200, HostingEmailFiltersDelete200, HostingEmailFiltersList200, HostingEmailFiltersUpdate200, HostingEmailFolderList200, HostingEmailForwardDelete200, HostingEmailForwarderAdd200, HostingEmailForwardersList200, HostingEmailKeysAdd200, HostingEmailKeysList200, HostingEmailList200, HostingEmailSettings200, HostingEmailSpamCustomSettings200, HostingEmailSpamCustomSettingsUpdate200, HostingEmailSpamEmpty200, HostingEmailSpamSettings200, HostingEmailSpamSettingsUpdate200, HostingEmailUpdate200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingRedirectsV2200Item, HostingRepo200, HostingRepoList200Item, HostingRepoLog200, HostingRepoSync200, HostingResellerSsoWhm200, HostingServerHits200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSiteAddV2200, HostingSitesV2200, HostingSshInfo200, HostingVisitors200, HotlinkconfigAdd200, HotlinkconfigDelete200, HotlinkconfigDetails200, Index200, JetpackBackupStatus200, ListCrons200, ListFilesV2200, ListIndex200, PasswordGenerate200, PasswordScore200, PhpErrors200, Privacy200, PrivacyUser200, ProductLicenseDetails200, RepairDatabase200, ResetSite200, Site200, SiteAddonCloudflare200, SiteAddonWpsolution200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SiteMalwareStatusV2200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteQualityMetrics200, SiteStatus200, SiteUpdate200, SiteUsers200, SiteUsersV2200, SitesAccessLogs200, SitesAtomicMetrics200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
3
3
  export declare const getAccountEventListResponseMock: (overrideResponse?: Partial<AccountEventList200>) => AccountEventList200;
4
+ export declare const getAccountFeaturesResponseMock: (overrideResponse?: Partial<AccountFeatures200>) => AccountFeatures200;
4
5
  export declare const getAccountHostingListResponseMock: (overrideResponse?: Partial<AccountHostingList200>) => AccountHostingList200;
5
6
  export declare const getAccountPublicKeysResponseMock: (overrideResponse?: Partial<AccountPublicKeys200>) => AccountPublicKeys200;
6
7
  export declare const getAccountPublicKeyCreateResponseMock: (overrideResponse?: Partial<AccountPublicKeyCreate200>) => AccountPublicKeyCreate200;
@@ -108,7 +109,16 @@ export declare const getHostingEmailFiltersDeleteResponseMock: (overrideResponse
108
109
  export declare const getHostingEmailForwardersListResponseMock: (overrideResponse?: Partial<HostingEmailForwardersList200>) => HostingEmailForwardersList200;
109
110
  export declare const getHostingEmailForwarderAddResponseMock: (overrideResponse?: Partial<HostingEmailForwarderAdd200>) => HostingEmailForwarderAdd200;
110
111
  export declare const getHostingEmailForwardDeleteResponseMock: (overrideResponse?: Partial<HostingEmailForwardDelete200>) => HostingEmailForwardDelete200;
112
+ export declare const getHostingEmailKeysAddResponseMock: (overrideResponse?: Partial<HostingEmailKeysAdd200>) => HostingEmailKeysAdd200;
113
+ export declare const getHostingEmailKeysListResponseMock: (overrideResponse?: Partial<HostingEmailKeysList200>) => HostingEmailKeysList200;
114
+ export declare const getHostingEmailDomainRoutingResponseMock: (overrideResponse?: Partial<HostingEmailDomainRouting200>) => HostingEmailDomainRouting200;
115
+ export declare const getHostingEmailDomainRoutingSetResponseMock: (overrideResponse?: Partial<HostingEmailDomainRoutingSet200>) => HostingEmailDomainRoutingSet200;
111
116
  export declare const getHostingEmailSettingsResponseMock: (overrideResponse?: Partial<HostingEmailSettings200>) => HostingEmailSettings200;
117
+ export declare const getHostingEmailSpamCustomSettingsResponseMock: (overrideResponse?: Partial<HostingEmailSpamCustomSettings200>) => HostingEmailSpamCustomSettings200;
118
+ export declare const getHostingEmailSpamCustomSettingsUpdateResponseMock: (overrideResponse?: Partial<HostingEmailSpamCustomSettingsUpdate200>) => HostingEmailSpamCustomSettingsUpdate200;
119
+ export declare const getHostingEmailSpamEmptyResponseMock: (overrideResponse?: Partial<HostingEmailSpamEmpty200>) => HostingEmailSpamEmpty200;
120
+ export declare const getHostingEmailSpamSettingsResponseMock: (overrideResponse?: Partial<HostingEmailSpamSettings200>) => HostingEmailSpamSettings200;
121
+ export declare const getHostingEmailSpamSettingsUpdateResponseMock: (overrideResponse?: Partial<HostingEmailSpamSettingsUpdate200>) => HostingEmailSpamSettingsUpdate200;
112
122
  export declare const getEmailSsoResponseMock: (overrideResponse?: Partial<EmailSso200>) => EmailSso200;
113
123
  export declare const getHostingEmailFolderListResponseMock: (overrideResponse?: Partial<HostingEmailFolderList200>) => HostingEmailFolderList200;
114
124
  export declare const getHostingFixownershipResponseMock: (overrideResponse?: Partial<HostingFixownership200>) => HostingFixownership200;
@@ -257,6 +267,7 @@ export declare const getSshKeyListV3ResponseMock: (overrideResponse?: Partial<Ss
257
267
  export declare const getSitesListV3ResponseMock: (overrideResponse?: Partial<SitesListV3200>) => SitesListV3200;
258
268
  export declare const getSshKeyListV4ResponseMock: (overrideResponse?: Partial<SshKeyListV4200>) => SshKeyListV4200;
259
269
  export declare const getAccountEventListMockHandler: (overrideResponse?: AccountEventList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AccountEventList200> | AccountEventList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
270
+ export declare const getAccountFeaturesMockHandler: (overrideResponse?: AccountFeatures200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AccountFeatures200> | AccountFeatures200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
260
271
  export declare const getAccountHostingListMockHandler: (overrideResponse?: AccountHostingList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AccountHostingList200> | AccountHostingList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
261
272
  export declare const getAccountPublicKeysMockHandler: (overrideResponse?: AccountPublicKeys200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AccountPublicKeys200> | AccountPublicKeys200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
262
273
  export declare const getAccountPublicKeyCreateMockHandler: (overrideResponse?: AccountPublicKeyCreate200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<AccountPublicKeyCreate200> | AccountPublicKeyCreate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
@@ -364,7 +375,16 @@ export declare const getHostingEmailFiltersDeleteMockHandler: (overrideResponse?
364
375
  export declare const getHostingEmailForwardersListMockHandler: (overrideResponse?: HostingEmailForwardersList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEmailForwardersList200> | HostingEmailForwardersList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
365
376
  export declare const getHostingEmailForwarderAddMockHandler: (overrideResponse?: HostingEmailForwarderAdd200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingEmailForwarderAdd200> | HostingEmailForwarderAdd200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
366
377
  export declare const getHostingEmailForwardDeleteMockHandler: (overrideResponse?: HostingEmailForwardDelete200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<HostingEmailForwardDelete200> | HostingEmailForwardDelete200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
378
+ export declare const getHostingEmailKeysAddMockHandler: (overrideResponse?: HostingEmailKeysAdd200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingEmailKeysAdd200> | HostingEmailKeysAdd200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
379
+ export declare const getHostingEmailKeysListMockHandler: (overrideResponse?: HostingEmailKeysList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEmailKeysList200> | HostingEmailKeysList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
380
+ export declare const getHostingEmailDomainRoutingMockHandler: (overrideResponse?: HostingEmailDomainRouting200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEmailDomainRouting200> | HostingEmailDomainRouting200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
381
+ export declare const getHostingEmailDomainRoutingSetMockHandler: (overrideResponse?: HostingEmailDomainRoutingSet200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<HostingEmailDomainRoutingSet200> | HostingEmailDomainRoutingSet200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
367
382
  export declare const getHostingEmailSettingsMockHandler: (overrideResponse?: HostingEmailSettings200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingEmailSettings200> | HostingEmailSettings200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
383
+ export declare const getHostingEmailSpamCustomSettingsMockHandler: (overrideResponse?: HostingEmailSpamCustomSettings200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEmailSpamCustomSettings200> | HostingEmailSpamCustomSettings200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
384
+ export declare const getHostingEmailSpamCustomSettingsUpdateMockHandler: (overrideResponse?: HostingEmailSpamCustomSettingsUpdate200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<HostingEmailSpamCustomSettingsUpdate200> | HostingEmailSpamCustomSettingsUpdate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
385
+ export declare const getHostingEmailSpamEmptyMockHandler: (overrideResponse?: HostingEmailSpamEmpty200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingEmailSpamEmpty200> | HostingEmailSpamEmpty200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
386
+ export declare const getHostingEmailSpamSettingsMockHandler: (overrideResponse?: HostingEmailSpamSettings200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEmailSpamSettings200> | HostingEmailSpamSettings200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
387
+ export declare const getHostingEmailSpamSettingsUpdateMockHandler: (overrideResponse?: HostingEmailSpamSettingsUpdate200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<HostingEmailSpamSettingsUpdate200> | HostingEmailSpamSettingsUpdate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
368
388
  export declare const getEmailSsoMockHandler: (overrideResponse?: EmailSso200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<EmailSso200> | EmailSso200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
369
389
  export declare const getHostingEmailFolderListMockHandler: (overrideResponse?: HostingEmailFolderList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEmailFolderList200> | HostingEmailFolderList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
370
390
  export declare const getHostingFixownershipMockHandler: (overrideResponse?: HostingFixownership200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingFixownership200> | HostingFixownership200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
package/src/index.msw.js CHANGED
@@ -4,11 +4,12 @@ import { __awaiter } from "tslib";
4
4
  * Do not edit manually.
5
5
  * Hosting UAPI
6
6
  * Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
7
- * OpenAPI spec version: 1.1482.0
7
+ * OpenAPI spec version: 1.1501.0
8
8
  */
9
9
  import { faker } from '@faker-js/faker';
10
10
  import { HttpResponse, delay, http } from 'msw';
11
11
  export const getAccountEventListResponseMock = (overrideResponse = {}) => (Object.assign({ events: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), count: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), date_first: faker.helpers.arrayElement([faker.word.sample(), undefined]), date_last: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), event: faker.helpers.arrayElement([faker.word.sample(), undefined]), hosting_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), site_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), tenant_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) })), undefined]), utc: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
12
+ export const getAccountFeaturesResponseMock = (overrideResponse = {}) => (Object.assign({ rows: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ back_reference: faker.helpers.arrayElement([faker.word.sample(), undefined]), feature_set: faker.helpers.arrayElement([faker.word.sample(), undefined]), info: faker.helpers.arrayElement([{ addon_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), addon_status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), brand: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), brand_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), data_center: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), date_added: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), date_modified: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), feature_set: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), homedir: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), ip: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), limit_remote: faker.helpers.arrayElement([{ quota_kib: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, undefined]), meta: faker.helpers.arrayElement([{ main_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), prev_tenant: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), operating_system: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), platform: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), server_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), server_status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), server_type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), ssh_hostname: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), tenant_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), tenant_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), username: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, undefined]), limit: faker.helpers.arrayElement([{ disk_limit_gib: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), workers: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), package: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), panel: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), used: faker.helpers.arrayElement([{ disk_usage: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), sites_active: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), staging_sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), workers: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]) })), undefined]), total_count: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
12
13
  export const getAccountHostingListResponseMock = (overrideResponse = {}) => (Object.assign({ accounts: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), current_sites: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), feature_set: faker.helpers.arrayElement([faker.word.sample(), undefined]), hosting_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), max_sites: faker.helpers.arrayElement([faker.word.sample(), undefined]), platform: faker.helpers.arrayElement([faker.word.sample(), undefined]), prod_inst_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), region_desc: faker.helpers.arrayElement([faker.word.sample(), undefined]), region_type: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
13
14
  export const getAccountPublicKeysResponseMock = (overrideResponse = {}) => (Object.assign({ public_keys: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ date_modified: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), is_active: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]), public_key: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
14
15
  export const getAccountPublicKeyCreateResponseMock = (overrideResponse = {}) => (Object.assign({ date_modified: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), is_active: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]), public_key: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
@@ -118,7 +119,16 @@ export const getHostingEmailFiltersDeleteResponseMock = (overrideResponse = {})
118
119
  export const getHostingEmailForwardersListResponseMock = (overrideResponse = {}) => (Object.assign({ forwarders: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ destination: faker.helpers.arrayElement([faker.word.sample(), undefined]), destination_type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), source: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) })), undefined]) }, overrideResponse));
119
120
  export const getHostingEmailForwarderAddResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
120
121
  export const getHostingEmailForwardDeleteResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
122
+ export const getHostingEmailKeysAddResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
123
+ export const getHostingEmailKeysListResponseMock = (overrideResponse = {}) => (Object.assign({ keys: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ algo: faker.helpers.arrayElement([faker.word.sample(), undefined]), created: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), email: faker.helpers.arrayElement([faker.word.sample(), undefined]), expires: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), keyid: faker.helpers.arrayElement([faker.word.sample(), undefined]), keysize: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), uids: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
124
+ export const getHostingEmailDomainRoutingResponseMock = (overrideResponse = {}) => (Object.assign({ domain: faker.helpers.arrayElement([faker.word.sample(), undefined]), route_type: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
125
+ export const getHostingEmailDomainRoutingSetResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
121
126
  export const getHostingEmailSettingsResponseMock = (overrideResponse = {}) => (Object.assign({ account_incoming: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), account_login: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), account_outgoing: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), address: faker.helpers.arrayElement([faker.word.sample(), undefined]), autofolders: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), utf8_folders: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, overrideResponse));
127
+ export const getHostingEmailSpamCustomSettingsResponseMock = (overrideResponse = {}) => (Object.assign({ allowlist: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), blocklist: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), custom_scores: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ subtype: faker.helpers.arrayElement([faker.word.sample(), undefined]), value: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) })), undefined]), spam_score: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, overrideResponse));
128
+ export const getHostingEmailSpamCustomSettingsUpdateResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
129
+ export const getHostingEmailSpamEmptyResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
130
+ export const getHostingEmailSpamSettingsResponseMock = (overrideResponse = {}) => (Object.assign({ auto_delete_enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), auto_delete_score: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), spam_box_enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), spam_filter_enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
131
+ export const getHostingEmailSpamSettingsUpdateResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
122
132
  export const getEmailSsoResponseMock = (overrideResponse = {}) => (Object.assign({ url: faker.word.sample() }, overrideResponse));
123
133
  export const getHostingEmailFolderListResponseMock = (overrideResponse = {}) => (Object.assign({ count: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), folders: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ children: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ children: faker.helpers.arrayElement([[], undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
124
134
  export const getHostingFixownershipResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
@@ -298,6 +308,16 @@ export const getAccountEventListMockHandler = (overrideResponse) => {
298
308
  });
299
309
  }));
300
310
  };
311
+ export const getAccountFeaturesMockHandler = (overrideResponse) => {
312
+ return http.get('*/v1/account/features', (info) => __awaiter(void 0, void 0, void 0, function* () {
313
+ yield delay(0);
314
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
315
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
316
+ : getAccountFeaturesResponseMock()), { status: 200,
317
+ headers: { 'Content-Type': 'application/json' }
318
+ });
319
+ }));
320
+ };
301
321
  export const getAccountHostingListMockHandler = (overrideResponse) => {
302
322
  return http.get('*/v1/account/hosting', (info) => __awaiter(void 0, void 0, void 0, function* () {
303
323
  yield delay(0);
@@ -1368,6 +1388,46 @@ export const getHostingEmailForwardDeleteMockHandler = (overrideResponse) => {
1368
1388
  });
1369
1389
  }));
1370
1390
  };
1391
+ export const getHostingEmailKeysAddMockHandler = (overrideResponse) => {
1392
+ return http.post('*/v1/hosting/:hostingId/emails/keys', (info) => __awaiter(void 0, void 0, void 0, function* () {
1393
+ yield delay(0);
1394
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1395
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1396
+ : getHostingEmailKeysAddResponseMock()), { status: 200,
1397
+ headers: { 'Content-Type': 'application/json' }
1398
+ });
1399
+ }));
1400
+ };
1401
+ export const getHostingEmailKeysListMockHandler = (overrideResponse) => {
1402
+ return http.get('*/v1/hosting/:hostingId/emails/keys', (info) => __awaiter(void 0, void 0, void 0, function* () {
1403
+ yield delay(0);
1404
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1405
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1406
+ : getHostingEmailKeysListResponseMock()), { status: 200,
1407
+ headers: { 'Content-Type': 'application/json' }
1408
+ });
1409
+ }));
1410
+ };
1411
+ export const getHostingEmailDomainRoutingMockHandler = (overrideResponse) => {
1412
+ return http.get('*/v1/hosting/:hostingId/emails/routing', (info) => __awaiter(void 0, void 0, void 0, function* () {
1413
+ yield delay(0);
1414
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1415
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1416
+ : getHostingEmailDomainRoutingResponseMock()), { status: 200,
1417
+ headers: { 'Content-Type': 'application/json' }
1418
+ });
1419
+ }));
1420
+ };
1421
+ export const getHostingEmailDomainRoutingSetMockHandler = (overrideResponse) => {
1422
+ return http.put('*/v1/hosting/:hostingId/emails/routing', (info) => __awaiter(void 0, void 0, void 0, function* () {
1423
+ yield delay(0);
1424
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1425
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1426
+ : getHostingEmailDomainRoutingSetResponseMock()), { status: 200,
1427
+ headers: { 'Content-Type': 'application/json' }
1428
+ });
1429
+ }));
1430
+ };
1371
1431
  export const getHostingEmailSettingsMockHandler = (overrideResponse) => {
1372
1432
  return http.post('*/v1/hosting/:hostingId/emails/settings', (info) => __awaiter(void 0, void 0, void 0, function* () {
1373
1433
  yield delay(0);
@@ -1378,6 +1438,56 @@ export const getHostingEmailSettingsMockHandler = (overrideResponse) => {
1378
1438
  });
1379
1439
  }));
1380
1440
  };
1441
+ export const getHostingEmailSpamCustomSettingsMockHandler = (overrideResponse) => {
1442
+ return http.get('*/v1/hosting/:hostingId/emails/spam/custom-settings', (info) => __awaiter(void 0, void 0, void 0, function* () {
1443
+ yield delay(0);
1444
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1445
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1446
+ : getHostingEmailSpamCustomSettingsResponseMock()), { status: 200,
1447
+ headers: { 'Content-Type': 'application/json' }
1448
+ });
1449
+ }));
1450
+ };
1451
+ export const getHostingEmailSpamCustomSettingsUpdateMockHandler = (overrideResponse) => {
1452
+ return http.put('*/v1/hosting/:hostingId/emails/spam/custom-settings', (info) => __awaiter(void 0, void 0, void 0, function* () {
1453
+ yield delay(0);
1454
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1455
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1456
+ : getHostingEmailSpamCustomSettingsUpdateResponseMock()), { status: 200,
1457
+ headers: { 'Content-Type': 'application/json' }
1458
+ });
1459
+ }));
1460
+ };
1461
+ export const getHostingEmailSpamEmptyMockHandler = (overrideResponse) => {
1462
+ return http.post('*/v1/hosting/:hostingId/emails/spam/empty', (info) => __awaiter(void 0, void 0, void 0, function* () {
1463
+ yield delay(0);
1464
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1465
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1466
+ : getHostingEmailSpamEmptyResponseMock()), { status: 200,
1467
+ headers: { 'Content-Type': 'application/json' }
1468
+ });
1469
+ }));
1470
+ };
1471
+ export const getHostingEmailSpamSettingsMockHandler = (overrideResponse) => {
1472
+ return http.get('*/v1/hosting/:hostingId/emails/spam/settings', (info) => __awaiter(void 0, void 0, void 0, function* () {
1473
+ yield delay(0);
1474
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1475
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1476
+ : getHostingEmailSpamSettingsResponseMock()), { status: 200,
1477
+ headers: { 'Content-Type': 'application/json' }
1478
+ });
1479
+ }));
1480
+ };
1481
+ export const getHostingEmailSpamSettingsUpdateMockHandler = (overrideResponse) => {
1482
+ return http.put('*/v1/hosting/:hostingId/emails/spam/settings', (info) => __awaiter(void 0, void 0, void 0, function* () {
1483
+ yield delay(0);
1484
+ return new HttpResponse(JSON.stringify(overrideResponse !== undefined
1485
+ ? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
1486
+ : getHostingEmailSpamSettingsUpdateResponseMock()), { status: 200,
1487
+ headers: { 'Content-Type': 'application/json' }
1488
+ });
1489
+ }));
1490
+ };
1381
1491
  export const getEmailSsoMockHandler = (overrideResponse) => {
1382
1492
  return http.get('*/v1/hosting/:hostingId/emails/sso', (info) => __awaiter(void 0, void 0, void 0, function* () {
1383
1493
  yield delay(0);
@@ -2870,6 +2980,7 @@ export const getSshKeyListV4MockHandler = (overrideResponse) => {
2870
2980
  };
2871
2981
  export const getHostingUAPIMock = () => [
2872
2982
  getAccountEventListMockHandler(),
2983
+ getAccountFeaturesMockHandler(),
2873
2984
  getAccountHostingListMockHandler(),
2874
2985
  getAccountPublicKeysMockHandler(),
2875
2986
  getAccountPublicKeyCreateMockHandler(),
@@ -2977,7 +3088,16 @@ export const getHostingUAPIMock = () => [
2977
3088
  getHostingEmailForwardersListMockHandler(),
2978
3089
  getHostingEmailForwarderAddMockHandler(),
2979
3090
  getHostingEmailForwardDeleteMockHandler(),
3091
+ getHostingEmailKeysAddMockHandler(),
3092
+ getHostingEmailKeysListMockHandler(),
3093
+ getHostingEmailDomainRoutingMockHandler(),
3094
+ getHostingEmailDomainRoutingSetMockHandler(),
2980
3095
  getHostingEmailSettingsMockHandler(),
3096
+ getHostingEmailSpamCustomSettingsMockHandler(),
3097
+ getHostingEmailSpamCustomSettingsUpdateMockHandler(),
3098
+ getHostingEmailSpamEmptyMockHandler(),
3099
+ getHostingEmailSpamSettingsMockHandler(),
3100
+ getHostingEmailSpamSettingsUpdateMockHandler(),
2981
3101
  getEmailSsoMockHandler(),
2982
3102
  getHostingEmailFolderListMockHandler(),
2983
3103
  getHostingFixownershipMockHandler(),