@newfold/huapi-js 2.1.0-beta.17 → 2.1.0-beta.19
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/package.json +1 -1
- package/src/index.d.ts +601 -7
- package/src/index.js +449 -1
- package/src/index.msw.d.ts +37 -1
- package/src/index.msw.js +230 -14
- package/src/index.schemas.d.ts +1004 -115
- package/src/index.schemas.js +52 -0
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.
|
|
6
|
+
* OpenAPI spec version: 1.1908.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -299,6 +299,7 @@ export const useCodeguardBackupRestore = (options) => {
|
|
|
299
299
|
};
|
|
300
300
|
/**
|
|
301
301
|
* Returns all database records CodeGuard maintains for this user's account.
|
|
302
|
+
* @deprecated
|
|
302
303
|
* @summary database list
|
|
303
304
|
*/
|
|
304
305
|
export const codeguardDatabaseList = (addonId, options) => {
|
|
@@ -315,6 +316,7 @@ export const getCodeguardDatabaseListQueryOptions = (addonId, options) => {
|
|
|
315
316
|
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
316
317
|
};
|
|
317
318
|
/**
|
|
319
|
+
* @deprecated
|
|
318
320
|
* @summary database list
|
|
319
321
|
*/
|
|
320
322
|
export function useCodeguardDatabaseList(addonId, options) {
|
|
@@ -325,6 +327,7 @@ export function useCodeguardDatabaseList(addonId, options) {
|
|
|
325
327
|
}
|
|
326
328
|
/**
|
|
327
329
|
* Returns all database backup records CodeGuard maintains for this user's account.
|
|
330
|
+
* @deprecated
|
|
328
331
|
* @summary database backup list
|
|
329
332
|
*/
|
|
330
333
|
export const codeguardDatabaseBackupList = (addonId, params, options) => {
|
|
@@ -341,6 +344,7 @@ export const getCodeguardDatabaseBackupListQueryOptions = (addonId, params, opti
|
|
|
341
344
|
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
342
345
|
};
|
|
343
346
|
/**
|
|
347
|
+
* @deprecated
|
|
344
348
|
* @summary database backup list
|
|
345
349
|
*/
|
|
346
350
|
export function useCodeguardDatabaseBackupList(addonId, params, options) {
|
|
@@ -351,6 +355,7 @@ export function useCodeguardDatabaseBackupList(addonId, params, options) {
|
|
|
351
355
|
}
|
|
352
356
|
/**
|
|
353
357
|
* Queue the creation of a database backup.
|
|
358
|
+
* @deprecated
|
|
354
359
|
* @summary database backup create
|
|
355
360
|
*/
|
|
356
361
|
export const codeguardDatabaseBackupCreate = (addonId, codeguardDatabaseBackupCreateBody, options) => {
|
|
@@ -365,6 +370,7 @@ export const getCodeguardDatabaseBackupCreateMutationOptions = (options) => {
|
|
|
365
370
|
return Object.assign({ mutationFn }, mutationOptions);
|
|
366
371
|
};
|
|
367
372
|
/**
|
|
373
|
+
* @deprecated
|
|
368
374
|
* @summary database backup create
|
|
369
375
|
*/
|
|
370
376
|
export const useCodeguardDatabaseBackupCreate = (options) => {
|
|
@@ -373,6 +379,7 @@ export const useCodeguardDatabaseBackupCreate = (options) => {
|
|
|
373
379
|
};
|
|
374
380
|
/**
|
|
375
381
|
* Restores a database backup
|
|
382
|
+
* @deprecated
|
|
376
383
|
* @summary database backup restore
|
|
377
384
|
*/
|
|
378
385
|
export const codeguardDatabaseBackupRestore = (addonId, codeguardDatabaseBackupRestoreBody, options) => {
|
|
@@ -387,6 +394,7 @@ export const getCodeguardDatabaseBackupRestoreMutationOptions = (options) => {
|
|
|
387
394
|
return Object.assign({ mutationFn }, mutationOptions);
|
|
388
395
|
};
|
|
389
396
|
/**
|
|
397
|
+
* @deprecated
|
|
390
398
|
* @summary database backup restore
|
|
391
399
|
*/
|
|
392
400
|
export const useCodeguardDatabaseBackupRestore = (options) => {
|
|
@@ -447,6 +455,7 @@ export function useCodeguardPlanInfo(addonId, options) {
|
|
|
447
455
|
}
|
|
448
456
|
/**
|
|
449
457
|
* Returns all website records CodeGuard maintains for this user's account.
|
|
458
|
+
* @deprecated
|
|
450
459
|
* @summary website list
|
|
451
460
|
*/
|
|
452
461
|
export const codeguardWebsiteList = (addonId, options) => {
|
|
@@ -463,6 +472,7 @@ export const getCodeguardWebsiteListQueryOptions = (addonId, options) => {
|
|
|
463
472
|
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
464
473
|
};
|
|
465
474
|
/**
|
|
475
|
+
* @deprecated
|
|
466
476
|
* @summary website list
|
|
467
477
|
*/
|
|
468
478
|
export function useCodeguardWebsiteList(addonId, options) {
|
|
@@ -473,6 +483,7 @@ export function useCodeguardWebsiteList(addonId, options) {
|
|
|
473
483
|
}
|
|
474
484
|
/**
|
|
475
485
|
* Returns all website backup records CodeGuard maintains for this user's account.
|
|
486
|
+
* @deprecated
|
|
476
487
|
* @summary website backup list
|
|
477
488
|
*/
|
|
478
489
|
export const codeguardWebsiteBackupList = (addonId, params, options) => {
|
|
@@ -489,6 +500,7 @@ export const getCodeguardWebsiteBackupListQueryOptions = (addonId, params, optio
|
|
|
489
500
|
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
490
501
|
};
|
|
491
502
|
/**
|
|
503
|
+
* @deprecated
|
|
492
504
|
* @summary website backup list
|
|
493
505
|
*/
|
|
494
506
|
export function useCodeguardWebsiteBackupList(addonId, params, options) {
|
|
@@ -499,6 +511,7 @@ export function useCodeguardWebsiteBackupList(addonId, params, options) {
|
|
|
499
511
|
}
|
|
500
512
|
/**
|
|
501
513
|
* Initiate the creation of a new backup for a given website
|
|
514
|
+
* @deprecated
|
|
502
515
|
* @summary website backup create
|
|
503
516
|
*/
|
|
504
517
|
export const codeguardWebsiteBackupCreate = (addonId, codeguardWebsiteBackupCreateBody, options) => {
|
|
@@ -513,6 +526,7 @@ export const getCodeguardWebsiteBackupCreateMutationOptions = (options) => {
|
|
|
513
526
|
return Object.assign({ mutationFn }, mutationOptions);
|
|
514
527
|
};
|
|
515
528
|
/**
|
|
529
|
+
* @deprecated
|
|
516
530
|
* @summary website backup create
|
|
517
531
|
*/
|
|
518
532
|
export const useCodeguardWebsiteBackupCreate = (options) => {
|
|
@@ -521,6 +535,7 @@ export const useCodeguardWebsiteBackupCreate = (options) => {
|
|
|
521
535
|
};
|
|
522
536
|
/**
|
|
523
537
|
* Restores a website backup
|
|
538
|
+
* @deprecated
|
|
524
539
|
* @summary website backup restore
|
|
525
540
|
*/
|
|
526
541
|
export const codeguardWebsiteBackupRestore = (addonId, codeguardWebsiteBackupRestoreBody, options) => {
|
|
@@ -535,6 +550,7 @@ export const getCodeguardWebsiteBackupRestoreMutationOptions = (options) => {
|
|
|
535
550
|
return Object.assign({ mutationFn }, mutationOptions);
|
|
536
551
|
};
|
|
537
552
|
/**
|
|
553
|
+
* @deprecated
|
|
538
554
|
* @summary website backup restore
|
|
539
555
|
*/
|
|
540
556
|
export const useCodeguardWebsiteBackupRestore = (options) => {
|
|
@@ -567,6 +583,150 @@ export function useAddonsSitelockSso(addonId, options) {
|
|
|
567
583
|
query.queryKey = queryOptions.queryKey;
|
|
568
584
|
return query;
|
|
569
585
|
}
|
|
586
|
+
/**
|
|
587
|
+
* Returns a combined backup list with website commit ids and corresponding database commits
|
|
588
|
+
* @summary backup list
|
|
589
|
+
*/
|
|
590
|
+
export const xcitiumBackupList = (addonId, params, options) => {
|
|
591
|
+
return axios.get(`/v1/addons/xcitium/${addonId}/backups`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
592
|
+
};
|
|
593
|
+
export const getXcitiumBackupListQueryKey = (addonId, params) => {
|
|
594
|
+
return [`/v1/addons/xcitium/${addonId}/backups`, ...(params ? [params] : [])];
|
|
595
|
+
};
|
|
596
|
+
export const getXcitiumBackupListQueryOptions = (addonId, params, options) => {
|
|
597
|
+
var _a;
|
|
598
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
599
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getXcitiumBackupListQueryKey(addonId, params);
|
|
600
|
+
const queryFn = ({ signal }) => xcitiumBackupList(addonId, params, Object.assign({ signal }, axiosOptions));
|
|
601
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
602
|
+
};
|
|
603
|
+
/**
|
|
604
|
+
* @summary backup list
|
|
605
|
+
*/
|
|
606
|
+
export function useXcitiumBackupList(addonId, params, options) {
|
|
607
|
+
const queryOptions = getXcitiumBackupListQueryOptions(addonId, params, options);
|
|
608
|
+
const query = useQuery(queryOptions);
|
|
609
|
+
query.queryKey = queryOptions.queryKey;
|
|
610
|
+
return query;
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Creates the website backup
|
|
614
|
+
* @summary backup create
|
|
615
|
+
*/
|
|
616
|
+
export const xcitiumBackupCreate = (addonId, xcitiumBackupCreateBody, options) => {
|
|
617
|
+
return axios.post(`/v1/addons/xcitium/${addonId}/backups`, xcitiumBackupCreateBody, options);
|
|
618
|
+
};
|
|
619
|
+
export const getXcitiumBackupCreateMutationOptions = (options) => {
|
|
620
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
621
|
+
const mutationFn = (props) => {
|
|
622
|
+
const { addonId, data } = props !== null && props !== void 0 ? props : {};
|
|
623
|
+
return xcitiumBackupCreate(addonId, data, axiosOptions);
|
|
624
|
+
};
|
|
625
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
626
|
+
};
|
|
627
|
+
/**
|
|
628
|
+
* @summary backup create
|
|
629
|
+
*/
|
|
630
|
+
export const useXcitiumBackupCreate = (options) => {
|
|
631
|
+
const mutationOptions = getXcitiumBackupCreateMutationOptions(options);
|
|
632
|
+
return useMutation(mutationOptions);
|
|
633
|
+
};
|
|
634
|
+
/**
|
|
635
|
+
* Queues the backup download.
|
|
636
|
+
* @summary backup download
|
|
637
|
+
*/
|
|
638
|
+
export const xcitiumBackupDownload = (addonId, xcitiumBackupDownloadBody, options) => {
|
|
639
|
+
return axios.post(`/v1/addons/xcitium/${addonId}/backups/download`, xcitiumBackupDownloadBody, options);
|
|
640
|
+
};
|
|
641
|
+
export const getXcitiumBackupDownloadMutationOptions = (options) => {
|
|
642
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
643
|
+
const mutationFn = (props) => {
|
|
644
|
+
const { addonId, data } = props !== null && props !== void 0 ? props : {};
|
|
645
|
+
return xcitiumBackupDownload(addonId, data, axiosOptions);
|
|
646
|
+
};
|
|
647
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
648
|
+
};
|
|
649
|
+
/**
|
|
650
|
+
* @summary backup download
|
|
651
|
+
*/
|
|
652
|
+
export const useXcitiumBackupDownload = (options) => {
|
|
653
|
+
const mutationOptions = getXcitiumBackupDownloadMutationOptions(options);
|
|
654
|
+
return useMutation(mutationOptions);
|
|
655
|
+
};
|
|
656
|
+
/**
|
|
657
|
+
* Restores a website and database backup
|
|
658
|
+
* @summary backups restore
|
|
659
|
+
*/
|
|
660
|
+
export const xcitiumBackupRestore = (addonId, xcitiumBackupRestoreBody, options) => {
|
|
661
|
+
return axios.post(`/v1/addons/xcitium/${addonId}/backups/restore`, xcitiumBackupRestoreBody, options);
|
|
662
|
+
};
|
|
663
|
+
export const getXcitiumBackupRestoreMutationOptions = (options) => {
|
|
664
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
665
|
+
const mutationFn = (props) => {
|
|
666
|
+
const { addonId, data } = props !== null && props !== void 0 ? props : {};
|
|
667
|
+
return xcitiumBackupRestore(addonId, data, axiosOptions);
|
|
668
|
+
};
|
|
669
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
670
|
+
};
|
|
671
|
+
/**
|
|
672
|
+
* @summary backups restore
|
|
673
|
+
*/
|
|
674
|
+
export const useXcitiumBackupRestore = (options) => {
|
|
675
|
+
const mutationOptions = getXcitiumBackupRestoreMutationOptions(options);
|
|
676
|
+
return useMutation(mutationOptions);
|
|
677
|
+
};
|
|
678
|
+
/**
|
|
679
|
+
* Returns the subscribed plan and usage info
|
|
680
|
+
* @summary plan info
|
|
681
|
+
*/
|
|
682
|
+
export const xcitiumPlanInfo = (addonId, options) => {
|
|
683
|
+
return axios.get(`/v1/addons/xcitium/${addonId}/plan`, options);
|
|
684
|
+
};
|
|
685
|
+
export const getXcitiumPlanInfoQueryKey = (addonId) => {
|
|
686
|
+
return [`/v1/addons/xcitium/${addonId}/plan`];
|
|
687
|
+
};
|
|
688
|
+
export const getXcitiumPlanInfoQueryOptions = (addonId, options) => {
|
|
689
|
+
var _a;
|
|
690
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
691
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getXcitiumPlanInfoQueryKey(addonId);
|
|
692
|
+
const queryFn = ({ signal }) => xcitiumPlanInfo(addonId, Object.assign({ signal }, axiosOptions));
|
|
693
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
694
|
+
};
|
|
695
|
+
/**
|
|
696
|
+
* @summary plan info
|
|
697
|
+
*/
|
|
698
|
+
export function useXcitiumPlanInfo(addonId, options) {
|
|
699
|
+
const queryOptions = getXcitiumPlanInfoQueryOptions(addonId, options);
|
|
700
|
+
const query = useQuery(queryOptions);
|
|
701
|
+
query.queryKey = queryOptions.queryKey;
|
|
702
|
+
return query;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Returns an SSO URL that can be used to access the user's Xcitium dashboard.
|
|
706
|
+
* @summary Xcitium SSO link
|
|
707
|
+
*/
|
|
708
|
+
export const xcitiumSso = (addonId, options) => {
|
|
709
|
+
return axios.get(`/v1/addons/xcitium/${addonId}/sso`, options);
|
|
710
|
+
};
|
|
711
|
+
export const getXcitiumSsoQueryKey = (addonId) => {
|
|
712
|
+
return [`/v1/addons/xcitium/${addonId}/sso`];
|
|
713
|
+
};
|
|
714
|
+
export const getXcitiumSsoQueryOptions = (addonId, options) => {
|
|
715
|
+
var _a;
|
|
716
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
717
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getXcitiumSsoQueryKey(addonId);
|
|
718
|
+
const queryFn = ({ signal }) => xcitiumSso(addonId, Object.assign({ signal }, axiosOptions));
|
|
719
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
720
|
+
};
|
|
721
|
+
/**
|
|
722
|
+
* @summary Xcitium SSO link
|
|
723
|
+
*/
|
|
724
|
+
export function useXcitiumSso(addonId, options) {
|
|
725
|
+
const queryOptions = getXcitiumSsoQueryOptions(addonId, options);
|
|
726
|
+
const query = useQuery(queryOptions);
|
|
727
|
+
query.queryKey = queryOptions.queryKey;
|
|
728
|
+
return query;
|
|
729
|
+
}
|
|
570
730
|
/**
|
|
571
731
|
* Backup initiate
|
|
572
732
|
* @summary Backup initiate
|
|
@@ -669,6 +829,168 @@ export function useBackupMeta(addonId, params, options) {
|
|
|
669
829
|
query.queryKey = queryOptions.queryKey;
|
|
670
830
|
return query;
|
|
671
831
|
}
|
|
832
|
+
/**
|
|
833
|
+
* Backup create on demand
|
|
834
|
+
* @summary Backup create on demand
|
|
835
|
+
*/
|
|
836
|
+
export const backupCreateOndemandV1 = (addonId, siteId, backupCreateOndemandV1Body, options) => {
|
|
837
|
+
return axios.post(`/v1/addons/${addonId}/backup/sites/${siteId}/create`, backupCreateOndemandV1Body, options);
|
|
838
|
+
};
|
|
839
|
+
export const getBackupCreateOndemandV1MutationOptions = (options) => {
|
|
840
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
841
|
+
const mutationFn = (props) => {
|
|
842
|
+
const { addonId, siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
843
|
+
return backupCreateOndemandV1(addonId, siteId, data, axiosOptions);
|
|
844
|
+
};
|
|
845
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
846
|
+
};
|
|
847
|
+
/**
|
|
848
|
+
* @summary Backup create on demand
|
|
849
|
+
*/
|
|
850
|
+
export const useBackupCreateOndemandV1 = (options) => {
|
|
851
|
+
const mutationOptions = getBackupCreateOndemandV1MutationOptions(options);
|
|
852
|
+
return useMutation(mutationOptions);
|
|
853
|
+
};
|
|
854
|
+
/**
|
|
855
|
+
* Delete custom backup
|
|
856
|
+
* @summary Delete custom backup
|
|
857
|
+
*/
|
|
858
|
+
export const backupCustomDeleteV1 = (addonId, siteId, backupCustomDeleteV1Body, options) => {
|
|
859
|
+
return axios.post(`/v1/addons/${addonId}/backup/sites/${siteId}/delete`, backupCustomDeleteV1Body, options);
|
|
860
|
+
};
|
|
861
|
+
export const getBackupCustomDeleteV1MutationOptions = (options) => {
|
|
862
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
863
|
+
const mutationFn = (props) => {
|
|
864
|
+
const { addonId, siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
865
|
+
return backupCustomDeleteV1(addonId, siteId, data, axiosOptions);
|
|
866
|
+
};
|
|
867
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
868
|
+
};
|
|
869
|
+
/**
|
|
870
|
+
* @summary Delete custom backup
|
|
871
|
+
*/
|
|
872
|
+
export const useBackupCustomDeleteV1 = (options) => {
|
|
873
|
+
const mutationOptions = getBackupCustomDeleteV1MutationOptions(options);
|
|
874
|
+
return useMutation(mutationOptions);
|
|
875
|
+
};
|
|
876
|
+
/**
|
|
877
|
+
* HAL get_site_backup_pref: schedule, retention, and status for a site.
|
|
878
|
+
* @summary Get site backup preference
|
|
879
|
+
*/
|
|
880
|
+
export const backupSettings = (addonId, siteId, options) => {
|
|
881
|
+
return axios.get(`/v1/addons/${addonId}/backup/sites/${siteId}/settings`, options);
|
|
882
|
+
};
|
|
883
|
+
export const getBackupSettingsQueryKey = (addonId, siteId) => {
|
|
884
|
+
return [`/v1/addons/${addonId}/backup/sites/${siteId}/settings`];
|
|
885
|
+
};
|
|
886
|
+
export const getBackupSettingsQueryOptions = (addonId, siteId, options) => {
|
|
887
|
+
var _a;
|
|
888
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
889
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getBackupSettingsQueryKey(addonId, siteId);
|
|
890
|
+
const queryFn = ({ signal }) => backupSettings(addonId, siteId, Object.assign({ signal }, axiosOptions));
|
|
891
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId && siteId) }, queryOptions);
|
|
892
|
+
};
|
|
893
|
+
/**
|
|
894
|
+
* @summary Get site backup preference
|
|
895
|
+
*/
|
|
896
|
+
export function useBackupSettings(addonId, siteId, options) {
|
|
897
|
+
const queryOptions = getBackupSettingsQueryOptions(addonId, siteId, options);
|
|
898
|
+
const query = useQuery(queryOptions);
|
|
899
|
+
query.queryKey = queryOptions.queryKey;
|
|
900
|
+
return query;
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* HAL backup_pref_create
|
|
904
|
+
* @summary Create site backup preference
|
|
905
|
+
*/
|
|
906
|
+
export const backupSettingsCreate = (addonId, siteId, backupSettingsCreateBody, options) => {
|
|
907
|
+
return axios.post(`/v1/addons/${addonId}/backup/sites/${siteId}/settings`, backupSettingsCreateBody, options);
|
|
908
|
+
};
|
|
909
|
+
export const getBackupSettingsCreateMutationOptions = (options) => {
|
|
910
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
911
|
+
const mutationFn = (props) => {
|
|
912
|
+
const { addonId, siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
913
|
+
return backupSettingsCreate(addonId, siteId, data, axiosOptions);
|
|
914
|
+
};
|
|
915
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
916
|
+
};
|
|
917
|
+
/**
|
|
918
|
+
* @summary Create site backup preference
|
|
919
|
+
*/
|
|
920
|
+
export const useBackupSettingsCreate = (options) => {
|
|
921
|
+
const mutationOptions = getBackupSettingsCreateMutationOptions(options);
|
|
922
|
+
return useMutation(mutationOptions);
|
|
923
|
+
};
|
|
924
|
+
/**
|
|
925
|
+
* HAL backup_pref_update
|
|
926
|
+
* @summary Update site backup preference
|
|
927
|
+
*/
|
|
928
|
+
export const backupSettingsUpdate = (addonId, siteId, backupSettingsUpdateBody, options) => {
|
|
929
|
+
return axios.put(`/v1/addons/${addonId}/backup/sites/${siteId}/settings`, backupSettingsUpdateBody, options);
|
|
930
|
+
};
|
|
931
|
+
export const getBackupSettingsUpdateMutationOptions = (options) => {
|
|
932
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
933
|
+
const mutationFn = (props) => {
|
|
934
|
+
const { addonId, siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
935
|
+
return backupSettingsUpdate(addonId, siteId, data, axiosOptions);
|
|
936
|
+
};
|
|
937
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
938
|
+
};
|
|
939
|
+
/**
|
|
940
|
+
* @summary Update site backup preference
|
|
941
|
+
*/
|
|
942
|
+
export const useBackupSettingsUpdate = (options) => {
|
|
943
|
+
const mutationOptions = getBackupSettingsUpdateMutationOptions(options);
|
|
944
|
+
return useMutation(mutationOptions);
|
|
945
|
+
};
|
|
946
|
+
/**
|
|
947
|
+
* HAL backup_pref_set_status — toggles scheduled backup (enable/disable); response status is active or paused.
|
|
948
|
+
* @summary Enable or disable site backup preference
|
|
949
|
+
*/
|
|
950
|
+
export const backupPrefSetStatus = (addonId, siteId, backupPrefSetStatusBody, options) => {
|
|
951
|
+
return axios.put(`/v1/addons/${addonId}/backup/sites/${siteId}/settings/status`, backupPrefSetStatusBody, options);
|
|
952
|
+
};
|
|
953
|
+
export const getBackupPrefSetStatusMutationOptions = (options) => {
|
|
954
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
955
|
+
const mutationFn = (props) => {
|
|
956
|
+
const { addonId, siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
957
|
+
return backupPrefSetStatus(addonId, siteId, data, axiosOptions);
|
|
958
|
+
};
|
|
959
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
960
|
+
};
|
|
961
|
+
/**
|
|
962
|
+
* @summary Enable or disable site backup preference
|
|
963
|
+
*/
|
|
964
|
+
export const useBackupPrefSetStatus = (options) => {
|
|
965
|
+
const mutationOptions = getBackupPrefSetStatusMutationOptions(options);
|
|
966
|
+
return useMutation(mutationOptions);
|
|
967
|
+
};
|
|
968
|
+
/**
|
|
969
|
+
* HAL backup_usage_stat: allowed, used, and available backup storage in bytes for the addon.
|
|
970
|
+
* @summary Backup storage usage
|
|
971
|
+
*/
|
|
972
|
+
export const backupUsage = (addonId, options) => {
|
|
973
|
+
return axios.get(`/v1/addons/${addonId}/backup/usage`, options);
|
|
974
|
+
};
|
|
975
|
+
export const getBackupUsageQueryKey = (addonId) => {
|
|
976
|
+
return [`/v1/addons/${addonId}/backup/usage`];
|
|
977
|
+
};
|
|
978
|
+
export const getBackupUsageQueryOptions = (addonId, options) => {
|
|
979
|
+
var _a;
|
|
980
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
981
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getBackupUsageQueryKey(addonId);
|
|
982
|
+
const queryFn = ({ signal }) => backupUsage(addonId, Object.assign({ signal }, axiosOptions));
|
|
983
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* @summary Backup storage usage
|
|
987
|
+
*/
|
|
988
|
+
export function useBackupUsage(addonId, options) {
|
|
989
|
+
const queryOptions = getBackupUsageQueryOptions(addonId, options);
|
|
990
|
+
const query = useQuery(queryOptions);
|
|
991
|
+
query.queryKey = queryOptions.queryKey;
|
|
992
|
+
return query;
|
|
993
|
+
}
|
|
672
994
|
/**
|
|
673
995
|
* Decom and delete cloudflare basic addon
|
|
674
996
|
* @summary Uninstall cloudflare basic addon
|
|
@@ -921,6 +1243,32 @@ export function useWeeblySso(addonId, options) {
|
|
|
921
1243
|
query.queryKey = queryOptions.queryKey;
|
|
922
1244
|
return query;
|
|
923
1245
|
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Returns a list of workflows for the addon
|
|
1248
|
+
* @summary addon workflow list
|
|
1249
|
+
*/
|
|
1250
|
+
export const addonsWorkflows = (addonId, params, options) => {
|
|
1251
|
+
return axios.get(`/v1/addons/${addonId}/workflows`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
1252
|
+
};
|
|
1253
|
+
export const getAddonsWorkflowsQueryKey = (addonId, params) => {
|
|
1254
|
+
return [`/v1/addons/${addonId}/workflows`, ...(params ? [params] : [])];
|
|
1255
|
+
};
|
|
1256
|
+
export const getAddonsWorkflowsQueryOptions = (addonId, params, options) => {
|
|
1257
|
+
var _a;
|
|
1258
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1259
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getAddonsWorkflowsQueryKey(addonId, params);
|
|
1260
|
+
const queryFn = ({ signal }) => addonsWorkflows(addonId, params, Object.assign({ signal }, axiosOptions));
|
|
1261
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
1262
|
+
};
|
|
1263
|
+
/**
|
|
1264
|
+
* @summary addon workflow list
|
|
1265
|
+
*/
|
|
1266
|
+
export function useAddonsWorkflows(addonId, params, options) {
|
|
1267
|
+
const queryOptions = getAddonsWorkflowsQueryOptions(addonId, params, options);
|
|
1268
|
+
const query = useQuery(queryOptions);
|
|
1269
|
+
query.queryKey = queryOptions.queryKey;
|
|
1270
|
+
return query;
|
|
1271
|
+
}
|
|
924
1272
|
/**
|
|
925
1273
|
* Get domain info
|
|
926
1274
|
* @summary domain info
|
|
@@ -4390,6 +4738,32 @@ export function useHostingVisitors(hostingId, params, options) {
|
|
|
4390
4738
|
query.queryKey = queryOptions.queryKey;
|
|
4391
4739
|
return query;
|
|
4392
4740
|
}
|
|
4741
|
+
/**
|
|
4742
|
+
* Returns a list of images available for public use.
|
|
4743
|
+
* @summary public hal image list
|
|
4744
|
+
*/
|
|
4745
|
+
export const publicImages = (options) => {
|
|
4746
|
+
return axios.get(`/v1/public/images`, options);
|
|
4747
|
+
};
|
|
4748
|
+
export const getPublicImagesQueryKey = () => {
|
|
4749
|
+
return [`/v1/public/images`];
|
|
4750
|
+
};
|
|
4751
|
+
export const getPublicImagesQueryOptions = (options) => {
|
|
4752
|
+
var _a;
|
|
4753
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4754
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getPublicImagesQueryKey();
|
|
4755
|
+
const queryFn = ({ signal }) => publicImages(Object.assign({ signal }, axiosOptions));
|
|
4756
|
+
return Object.assign({ queryKey, queryFn }, queryOptions);
|
|
4757
|
+
};
|
|
4758
|
+
/**
|
|
4759
|
+
* @summary public hal image list
|
|
4760
|
+
*/
|
|
4761
|
+
export function usePublicImages(options) {
|
|
4762
|
+
const queryOptions = getPublicImagesQueryOptions(options);
|
|
4763
|
+
const query = useQuery(queryOptions);
|
|
4764
|
+
query.queryKey = queryOptions.queryKey;
|
|
4765
|
+
return query;
|
|
4766
|
+
}
|
|
4393
4767
|
/**
|
|
4394
4768
|
* Returns site information.
|
|
4395
4769
|
* @summary info
|
|
@@ -4684,6 +5058,28 @@ export const useBackupsJetpackBackup = (options) => {
|
|
|
4684
5058
|
const mutationOptions = getBackupsJetpackBackupMutationOptions(options);
|
|
4685
5059
|
return useMutation(mutationOptions);
|
|
4686
5060
|
};
|
|
5061
|
+
/**
|
|
5062
|
+
* Adds the site to the Xcitium account
|
|
5063
|
+
* @summary Add site to xcitium
|
|
5064
|
+
*/
|
|
5065
|
+
export const sitesBackupsXcitium = (siteId, options) => {
|
|
5066
|
+
return axios.post(`/v1/sites/${siteId}/backups/xcitium`, undefined, options);
|
|
5067
|
+
};
|
|
5068
|
+
export const getSitesBackupsXcitiumMutationOptions = (options) => {
|
|
5069
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
5070
|
+
const mutationFn = (props) => {
|
|
5071
|
+
const { siteId } = props !== null && props !== void 0 ? props : {};
|
|
5072
|
+
return sitesBackupsXcitium(siteId, axiosOptions);
|
|
5073
|
+
};
|
|
5074
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
5075
|
+
};
|
|
5076
|
+
/**
|
|
5077
|
+
* @summary Add site to xcitium
|
|
5078
|
+
*/
|
|
5079
|
+
export const useSitesBackupsXcitium = (options) => {
|
|
5080
|
+
const mutationOptions = getSitesBackupsXcitiumMutationOptions(options);
|
|
5081
|
+
return useMutation(mutationOptions);
|
|
5082
|
+
};
|
|
4687
5083
|
/**
|
|
4688
5084
|
* Creates cloudflare basic addon using site_id
|
|
4689
5085
|
* @summary Install cloudflare basic addon using site_id
|
|
@@ -7197,6 +7593,32 @@ export const useBackupRestoreV3 = (options) => {
|
|
|
7197
7593
|
const mutationOptions = getBackupRestoreV3MutationOptions(options);
|
|
7198
7594
|
return useMutation(mutationOptions);
|
|
7199
7595
|
};
|
|
7596
|
+
/**
|
|
7597
|
+
* Returns backups for the addon and site with pagination via page and limit query parameters.
|
|
7598
|
+
* @summary Backup list (paginated)
|
|
7599
|
+
*/
|
|
7600
|
+
export const backupListV3 = (addonId, siteId, params, options) => {
|
|
7601
|
+
return axios.get(`/v3/addons/${addonId}/backup/sites/${siteId}/list`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
7602
|
+
};
|
|
7603
|
+
export const getBackupListV3QueryKey = (addonId, siteId, params) => {
|
|
7604
|
+
return [`/v3/addons/${addonId}/backup/sites/${siteId}/list`, ...(params ? [params] : [])];
|
|
7605
|
+
};
|
|
7606
|
+
export const getBackupListV3QueryOptions = (addonId, siteId, params, options) => {
|
|
7607
|
+
var _a;
|
|
7608
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
7609
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getBackupListV3QueryKey(addonId, siteId, params);
|
|
7610
|
+
const queryFn = ({ signal }) => backupListV3(addonId, siteId, params, Object.assign({ signal }, axiosOptions));
|
|
7611
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId && siteId) }, queryOptions);
|
|
7612
|
+
};
|
|
7613
|
+
/**
|
|
7614
|
+
* @summary Backup list (paginated)
|
|
7615
|
+
*/
|
|
7616
|
+
export function useBackupListV3(addonId, siteId, params, options) {
|
|
7617
|
+
const queryOptions = getBackupListV3QueryOptions(addonId, siteId, params, options);
|
|
7618
|
+
const query = useQuery(queryOptions);
|
|
7619
|
+
query.queryKey = queryOptions.queryKey;
|
|
7620
|
+
return query;
|
|
7621
|
+
}
|
|
7200
7622
|
/**
|
|
7201
7623
|
* Add a site to the current hosting.
|
|
7202
7624
|
* @summary sites add
|
|
@@ -7295,6 +7717,32 @@ export function useSitesListV3(params, options) {
|
|
|
7295
7717
|
query.queryKey = queryOptions.queryKey;
|
|
7296
7718
|
return query;
|
|
7297
7719
|
}
|
|
7720
|
+
/**
|
|
7721
|
+
* Returns v3 site information including WordPress options (blogname, blogdescription, nfd_origin_prompt) and WooCommerce status.
|
|
7722
|
+
* @summary Site info v3
|
|
7723
|
+
*/
|
|
7724
|
+
export const sitesInfoV3 = (siteId, options) => {
|
|
7725
|
+
return axios.get(`/v3/sites/${siteId}`, options);
|
|
7726
|
+
};
|
|
7727
|
+
export const getSitesInfoV3QueryKey = (siteId) => {
|
|
7728
|
+
return [`/v3/sites/${siteId}`];
|
|
7729
|
+
};
|
|
7730
|
+
export const getSitesInfoV3QueryOptions = (siteId, options) => {
|
|
7731
|
+
var _a;
|
|
7732
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
7733
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesInfoV3QueryKey(siteId);
|
|
7734
|
+
const queryFn = ({ signal }) => sitesInfoV3(siteId, Object.assign({ signal }, axiosOptions));
|
|
7735
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions);
|
|
7736
|
+
};
|
|
7737
|
+
/**
|
|
7738
|
+
* @summary Site info v3
|
|
7739
|
+
*/
|
|
7740
|
+
export function useSitesInfoV3(siteId, options) {
|
|
7741
|
+
const queryOptions = getSitesInfoV3QueryOptions(siteId, options);
|
|
7742
|
+
const query = useQuery(queryOptions);
|
|
7743
|
+
query.queryKey = queryOptions.queryKey;
|
|
7744
|
+
return query;
|
|
7745
|
+
}
|
|
7298
7746
|
/**
|
|
7299
7747
|
* List all SSH keys on a server or account. Finds all keys in user's .ssh/ directory.
|
|
7300
7748
|
* @summary ssh keys list
|