hostinger-api-sdk 0.0.2 → 0.0.3
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/.github/workflows/{publish-release.yaml → build-release.yaml} +24 -3
- package/README.md +2 -2
- package/api.ts +382 -12
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +245 -13
- package/dist/api.js +256 -4
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +245 -13
- package/dist/esm/api.js +254 -2
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: build-release
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
@@ -6,8 +6,28 @@ on:
|
|
|
6
6
|
- main
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
|
-
|
|
9
|
+
release:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Repo checkout
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Bump version and push tag
|
|
16
|
+
id: bump
|
|
17
|
+
uses: hennejg/github-tag-action@v4.3.1
|
|
18
|
+
with:
|
|
19
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
release_branches: main
|
|
21
|
+
|
|
22
|
+
- name: Release tag
|
|
23
|
+
uses: ncipollo/release-action@v1
|
|
24
|
+
with:
|
|
25
|
+
tag: ${{ steps.bump.outputs.new_tag }}
|
|
26
|
+
generateReleaseNotes: true
|
|
27
|
+
|
|
28
|
+
publish-npmjs:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
needs: [release]
|
|
11
31
|
permissions:
|
|
12
32
|
contents: read
|
|
13
33
|
id-token: write
|
|
@@ -27,8 +47,9 @@ jobs:
|
|
|
27
47
|
env:
|
|
28
48
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
29
49
|
|
|
30
|
-
github:
|
|
50
|
+
publish-github:
|
|
31
51
|
runs-on: ubuntu-latest
|
|
52
|
+
needs: [release]
|
|
32
53
|
permissions:
|
|
33
54
|
contents: read
|
|
34
55
|
id-token: write
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## hostinger-api-sdk@0.0.
|
|
1
|
+
## hostinger-api-sdk@0.0.3
|
|
2
2
|
|
|
3
3
|
For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
|
|
4
4
|
|
|
5
5
|
### Usage
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
npm install hostinger-api-sdk@0.0.
|
|
8
|
+
npm install hostinger-api-sdk@0.0.3 --save
|
|
9
9
|
```
|
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 0.0.
|
|
6
|
+
* API Version: 0.0.16
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -670,6 +670,54 @@ export interface DNSV1SnapshotSnapshotWithContentResource {
|
|
|
670
670
|
*/
|
|
671
671
|
'created_at'?: string;
|
|
672
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
*
|
|
675
|
+
* @export
|
|
676
|
+
* @interface DNSV1ZoneDestroyRequest
|
|
677
|
+
*/
|
|
678
|
+
export interface DNSV1ZoneDestroyRequest {
|
|
679
|
+
/**
|
|
680
|
+
* Filter records for deletion
|
|
681
|
+
* @type {Array<DNSV1ZoneDestroyRequestFiltersInner>}
|
|
682
|
+
* @memberof DNSV1ZoneDestroyRequest
|
|
683
|
+
*/
|
|
684
|
+
'filters': Array<DNSV1ZoneDestroyRequestFiltersInner>;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
*
|
|
688
|
+
* @export
|
|
689
|
+
* @interface DNSV1ZoneDestroyRequestFiltersInner
|
|
690
|
+
*/
|
|
691
|
+
export interface DNSV1ZoneDestroyRequestFiltersInner {
|
|
692
|
+
/**
|
|
693
|
+
* Name of the record
|
|
694
|
+
* @type {string}
|
|
695
|
+
* @memberof DNSV1ZoneDestroyRequestFiltersInner
|
|
696
|
+
*/
|
|
697
|
+
'name'?: string;
|
|
698
|
+
/**
|
|
699
|
+
* Type of the record
|
|
700
|
+
* @type {string}
|
|
701
|
+
* @memberof DNSV1ZoneDestroyRequestFiltersInner
|
|
702
|
+
*/
|
|
703
|
+
'type'?: DNSV1ZoneDestroyRequestFiltersInnerTypeEnum;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export const DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = {
|
|
707
|
+
A: 'A',
|
|
708
|
+
Aaaa: 'AAAA',
|
|
709
|
+
Cname: 'CNAME',
|
|
710
|
+
Alias: 'ALIAS',
|
|
711
|
+
Mx: 'MX',
|
|
712
|
+
Txt: 'TXT',
|
|
713
|
+
Ns: 'NS',
|
|
714
|
+
Soa: 'SOA',
|
|
715
|
+
Srv: 'SRV',
|
|
716
|
+
Caa: 'CAA'
|
|
717
|
+
} as const;
|
|
718
|
+
|
|
719
|
+
export type DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = typeof DNSV1ZoneDestroyRequestFiltersInnerTypeEnum[keyof typeof DNSV1ZoneDestroyRequestFiltersInnerTypeEnum];
|
|
720
|
+
|
|
673
721
|
/**
|
|
674
722
|
*
|
|
675
723
|
* @export
|
|
@@ -692,36 +740,36 @@ export interface DNSV1ZoneNameRecordResource {
|
|
|
692
740
|
/**
|
|
693
741
|
*
|
|
694
742
|
* @export
|
|
695
|
-
* @interface
|
|
743
|
+
* @interface DNSV1ZoneRecordResource
|
|
696
744
|
*/
|
|
697
|
-
export interface
|
|
745
|
+
export interface DNSV1ZoneRecordResource {
|
|
698
746
|
/**
|
|
699
747
|
* Name of the record (use `@` for wildcard name)
|
|
700
748
|
* @type {string}
|
|
701
|
-
* @memberof
|
|
749
|
+
* @memberof DNSV1ZoneRecordResource
|
|
702
750
|
*/
|
|
703
751
|
'name'?: string;
|
|
704
752
|
/**
|
|
705
753
|
* Array of [`DNS.V1.Zone.NameRecordResource`](#model/dnsv1zonenamerecordresource)
|
|
706
754
|
* @type {Array<DNSV1ZoneNameRecordResource>}
|
|
707
|
-
* @memberof
|
|
755
|
+
* @memberof DNSV1ZoneRecordResource
|
|
708
756
|
*/
|
|
709
757
|
'records'?: Array<DNSV1ZoneNameRecordResource>;
|
|
710
758
|
/**
|
|
711
759
|
* TTL (Time-To-Live) of the record
|
|
712
760
|
* @type {number}
|
|
713
|
-
* @memberof
|
|
761
|
+
* @memberof DNSV1ZoneRecordResource
|
|
714
762
|
*/
|
|
715
763
|
'ttl'?: number;
|
|
716
764
|
/**
|
|
717
765
|
* Type of the record
|
|
718
766
|
* @type {string}
|
|
719
|
-
* @memberof
|
|
767
|
+
* @memberof DNSV1ZoneRecordResource
|
|
720
768
|
*/
|
|
721
|
-
'type'?:
|
|
769
|
+
'type'?: DNSV1ZoneRecordResourceTypeEnum;
|
|
722
770
|
}
|
|
723
771
|
|
|
724
|
-
export const
|
|
772
|
+
export const DNSV1ZoneRecordResourceTypeEnum = {
|
|
725
773
|
A: 'A',
|
|
726
774
|
Aaaa: 'AAAA',
|
|
727
775
|
Cname: 'CNAME',
|
|
@@ -734,7 +782,7 @@ export const DNSV1ZoneNameResourceTypeEnum = {
|
|
|
734
782
|
Caa: 'CAA'
|
|
735
783
|
} as const;
|
|
736
784
|
|
|
737
|
-
export type
|
|
785
|
+
export type DNSV1ZoneRecordResourceTypeEnum = typeof DNSV1ZoneRecordResourceTypeEnum[keyof typeof DNSV1ZoneRecordResourceTypeEnum];
|
|
738
786
|
|
|
739
787
|
/**
|
|
740
788
|
*
|
|
@@ -761,6 +809,85 @@ export interface DNSV1ZoneResetRequest {
|
|
|
761
809
|
*/
|
|
762
810
|
'whitelisted_record_types'?: Array<string>;
|
|
763
811
|
}
|
|
812
|
+
/**
|
|
813
|
+
*
|
|
814
|
+
* @export
|
|
815
|
+
* @interface DNSV1ZoneUpdateRequest
|
|
816
|
+
*/
|
|
817
|
+
export interface DNSV1ZoneUpdateRequest {
|
|
818
|
+
/**
|
|
819
|
+
* If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records\' ttl\'s are updated and new records are appended. If no matching RRs are found, they are created.
|
|
820
|
+
* @type {boolean}
|
|
821
|
+
* @memberof DNSV1ZoneUpdateRequest
|
|
822
|
+
*/
|
|
823
|
+
'overwrite'?: boolean;
|
|
824
|
+
/**
|
|
825
|
+
*
|
|
826
|
+
* @type {Array<DNSV1ZoneUpdateRequestZoneInner>}
|
|
827
|
+
* @memberof DNSV1ZoneUpdateRequest
|
|
828
|
+
*/
|
|
829
|
+
'zone': Array<DNSV1ZoneUpdateRequestZoneInner>;
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
*
|
|
833
|
+
* @export
|
|
834
|
+
* @interface DNSV1ZoneUpdateRequestZoneInner
|
|
835
|
+
*/
|
|
836
|
+
export interface DNSV1ZoneUpdateRequestZoneInner {
|
|
837
|
+
/**
|
|
838
|
+
* Name of the record (use `@` for wildcard name)
|
|
839
|
+
* @type {string}
|
|
840
|
+
* @memberof DNSV1ZoneUpdateRequestZoneInner
|
|
841
|
+
*/
|
|
842
|
+
'name': string;
|
|
843
|
+
/**
|
|
844
|
+
* Records assigned to the name
|
|
845
|
+
* @type {Array<DNSV1ZoneUpdateRequestZoneInnerRecordsInner>}
|
|
846
|
+
* @memberof DNSV1ZoneUpdateRequestZoneInner
|
|
847
|
+
*/
|
|
848
|
+
'records'?: Array<DNSV1ZoneUpdateRequestZoneInnerRecordsInner>;
|
|
849
|
+
/**
|
|
850
|
+
* TTL (Time-To-Live) of the record
|
|
851
|
+
* @type {number}
|
|
852
|
+
* @memberof DNSV1ZoneUpdateRequestZoneInner
|
|
853
|
+
*/
|
|
854
|
+
'ttl'?: number;
|
|
855
|
+
/**
|
|
856
|
+
* Type of the record
|
|
857
|
+
* @type {string}
|
|
858
|
+
* @memberof DNSV1ZoneUpdateRequestZoneInner
|
|
859
|
+
*/
|
|
860
|
+
'type': DNSV1ZoneUpdateRequestZoneInnerTypeEnum;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
export const DNSV1ZoneUpdateRequestZoneInnerTypeEnum = {
|
|
864
|
+
A: 'A',
|
|
865
|
+
Aaaa: 'AAAA',
|
|
866
|
+
Cname: 'CNAME',
|
|
867
|
+
Alias: 'ALIAS',
|
|
868
|
+
Mx: 'MX',
|
|
869
|
+
Txt: 'TXT',
|
|
870
|
+
Ns: 'NS',
|
|
871
|
+
Soa: 'SOA',
|
|
872
|
+
Srv: 'SRV',
|
|
873
|
+
Caa: 'CAA'
|
|
874
|
+
} as const;
|
|
875
|
+
|
|
876
|
+
export type DNSV1ZoneUpdateRequestZoneInnerTypeEnum = typeof DNSV1ZoneUpdateRequestZoneInnerTypeEnum[keyof typeof DNSV1ZoneUpdateRequestZoneInnerTypeEnum];
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
*
|
|
880
|
+
* @export
|
|
881
|
+
* @interface DNSV1ZoneUpdateRequestZoneInnerRecordsInner
|
|
882
|
+
*/
|
|
883
|
+
export interface DNSV1ZoneUpdateRequestZoneInnerRecordsInner {
|
|
884
|
+
/**
|
|
885
|
+
* Content of the name record
|
|
886
|
+
* @type {string}
|
|
887
|
+
* @memberof DNSV1ZoneUpdateRequestZoneInnerRecordsInner
|
|
888
|
+
*/
|
|
889
|
+
'content': string;
|
|
890
|
+
}
|
|
764
891
|
/**
|
|
765
892
|
*
|
|
766
893
|
* @export
|
|
@@ -2799,6 +2926,50 @@ export class DNSSnapshotApi extends BaseAPI {
|
|
|
2799
2926
|
*/
|
|
2800
2927
|
export const DNSZoneApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
2801
2928
|
return {
|
|
2929
|
+
/**
|
|
2930
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
2931
|
+
* @summary Delete zone records
|
|
2932
|
+
* @param {string} domain Domain name
|
|
2933
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
2934
|
+
* @param {*} [options] Override http request option.
|
|
2935
|
+
* @throws {RequiredError}
|
|
2936
|
+
*/
|
|
2937
|
+
deleteZoneRecordsV1: async (domain: string, dNSV1ZoneDestroyRequest: DNSV1ZoneDestroyRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2938
|
+
// verify required parameter 'domain' is not null or undefined
|
|
2939
|
+
assertParamExists('deleteZoneRecordsV1', 'domain', domain)
|
|
2940
|
+
// verify required parameter 'dNSV1ZoneDestroyRequest' is not null or undefined
|
|
2941
|
+
assertParamExists('deleteZoneRecordsV1', 'dNSV1ZoneDestroyRequest', dNSV1ZoneDestroyRequest)
|
|
2942
|
+
const localVarPath = `/api/dns/v1/zones/{domain}`
|
|
2943
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
2944
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2945
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2946
|
+
let baseOptions;
|
|
2947
|
+
if (configuration) {
|
|
2948
|
+
baseOptions = configuration.baseOptions;
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
2952
|
+
const localVarHeaderParameter = {} as any;
|
|
2953
|
+
const localVarQueryParameter = {} as any;
|
|
2954
|
+
|
|
2955
|
+
// authentication apiToken required
|
|
2956
|
+
// http bearer authentication required
|
|
2957
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2958
|
+
|
|
2959
|
+
|
|
2960
|
+
|
|
2961
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2962
|
+
|
|
2963
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2964
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2965
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2966
|
+
localVarRequestOptions.data = serializeDataIfNeeded(dNSV1ZoneDestroyRequest, localVarRequestOptions, configuration)
|
|
2967
|
+
|
|
2968
|
+
return {
|
|
2969
|
+
url: toPathString(localVarUrlObj),
|
|
2970
|
+
options: localVarRequestOptions,
|
|
2971
|
+
};
|
|
2972
|
+
},
|
|
2802
2973
|
/**
|
|
2803
2974
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
2804
2975
|
* @summary Get records
|
|
@@ -2876,6 +3047,94 @@ export const DNSZoneApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
2876
3047
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2877
3048
|
localVarRequestOptions.data = serializeDataIfNeeded(dNSV1ZoneResetRequest, localVarRequestOptions, configuration)
|
|
2878
3049
|
|
|
3050
|
+
return {
|
|
3051
|
+
url: toPathString(localVarUrlObj),
|
|
3052
|
+
options: localVarRequestOptions,
|
|
3053
|
+
};
|
|
3054
|
+
},
|
|
3055
|
+
/**
|
|
3056
|
+
* This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
|
|
3057
|
+
* @summary Update zone records
|
|
3058
|
+
* @param {string} domain Domain name
|
|
3059
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
3060
|
+
* @param {*} [options] Override http request option.
|
|
3061
|
+
* @throws {RequiredError}
|
|
3062
|
+
*/
|
|
3063
|
+
updateZoneRecordsV1: async (domain: string, dNSV1ZoneUpdateRequest: DNSV1ZoneUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3064
|
+
// verify required parameter 'domain' is not null or undefined
|
|
3065
|
+
assertParamExists('updateZoneRecordsV1', 'domain', domain)
|
|
3066
|
+
// verify required parameter 'dNSV1ZoneUpdateRequest' is not null or undefined
|
|
3067
|
+
assertParamExists('updateZoneRecordsV1', 'dNSV1ZoneUpdateRequest', dNSV1ZoneUpdateRequest)
|
|
3068
|
+
const localVarPath = `/api/dns/v1/zones/{domain}`
|
|
3069
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
3070
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3071
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3072
|
+
let baseOptions;
|
|
3073
|
+
if (configuration) {
|
|
3074
|
+
baseOptions = configuration.baseOptions;
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
3078
|
+
const localVarHeaderParameter = {} as any;
|
|
3079
|
+
const localVarQueryParameter = {} as any;
|
|
3080
|
+
|
|
3081
|
+
// authentication apiToken required
|
|
3082
|
+
// http bearer authentication required
|
|
3083
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3084
|
+
|
|
3085
|
+
|
|
3086
|
+
|
|
3087
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3088
|
+
|
|
3089
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3090
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3091
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3092
|
+
localVarRequestOptions.data = serializeDataIfNeeded(dNSV1ZoneUpdateRequest, localVarRequestOptions, configuration)
|
|
3093
|
+
|
|
3094
|
+
return {
|
|
3095
|
+
url: toPathString(localVarUrlObj),
|
|
3096
|
+
options: localVarRequestOptions,
|
|
3097
|
+
};
|
|
3098
|
+
},
|
|
3099
|
+
/**
|
|
3100
|
+
* This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
|
|
3101
|
+
* @summary Validate zone records
|
|
3102
|
+
* @param {string} domain Domain name
|
|
3103
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
3104
|
+
* @param {*} [options] Override http request option.
|
|
3105
|
+
* @throws {RequiredError}
|
|
3106
|
+
*/
|
|
3107
|
+
validateZoneRecordsV1: async (domain: string, dNSV1ZoneUpdateRequest: DNSV1ZoneUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3108
|
+
// verify required parameter 'domain' is not null or undefined
|
|
3109
|
+
assertParamExists('validateZoneRecordsV1', 'domain', domain)
|
|
3110
|
+
// verify required parameter 'dNSV1ZoneUpdateRequest' is not null or undefined
|
|
3111
|
+
assertParamExists('validateZoneRecordsV1', 'dNSV1ZoneUpdateRequest', dNSV1ZoneUpdateRequest)
|
|
3112
|
+
const localVarPath = `/api/dns/v1/zones/{domain}/validate`
|
|
3113
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
3114
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3115
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3116
|
+
let baseOptions;
|
|
3117
|
+
if (configuration) {
|
|
3118
|
+
baseOptions = configuration.baseOptions;
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3121
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3122
|
+
const localVarHeaderParameter = {} as any;
|
|
3123
|
+
const localVarQueryParameter = {} as any;
|
|
3124
|
+
|
|
3125
|
+
// authentication apiToken required
|
|
3126
|
+
// http bearer authentication required
|
|
3127
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3128
|
+
|
|
3129
|
+
|
|
3130
|
+
|
|
3131
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3132
|
+
|
|
3133
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3134
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3135
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3136
|
+
localVarRequestOptions.data = serializeDataIfNeeded(dNSV1ZoneUpdateRequest, localVarRequestOptions, configuration)
|
|
3137
|
+
|
|
2879
3138
|
return {
|
|
2880
3139
|
url: toPathString(localVarUrlObj),
|
|
2881
3140
|
options: localVarRequestOptions,
|
|
@@ -2891,6 +3150,19 @@ export const DNSZoneApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
2891
3150
|
export const DNSZoneApiFp = function(configuration?: Configuration) {
|
|
2892
3151
|
const localVarAxiosParamCreator = DNSZoneApiAxiosParamCreator(configuration)
|
|
2893
3152
|
return {
|
|
3153
|
+
/**
|
|
3154
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
3155
|
+
* @summary Delete zone records
|
|
3156
|
+
* @param {string} domain Domain name
|
|
3157
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
3158
|
+
* @param {*} [options] Override http request option.
|
|
3159
|
+
* @throws {RequiredError}
|
|
3160
|
+
*/
|
|
3161
|
+
async deleteZoneRecordsV1(domain: string, dNSV1ZoneDestroyRequest: DNSV1ZoneDestroyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
3162
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options);
|
|
3163
|
+
const localVarOperationServerBasePath = operationServerMap['DNSZoneApi.deleteZoneRecordsV1']?.[0]?.url;
|
|
3164
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3165
|
+
},
|
|
2894
3166
|
/**
|
|
2895
3167
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
2896
3168
|
* @summary Get records
|
|
@@ -2898,7 +3170,7 @@ export const DNSZoneApiFp = function(configuration?: Configuration) {
|
|
|
2898
3170
|
* @param {*} [options] Override http request option.
|
|
2899
3171
|
* @throws {RequiredError}
|
|
2900
3172
|
*/
|
|
2901
|
-
async getRecordsV1(domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<
|
|
3173
|
+
async getRecordsV1(domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DNSV1ZoneRecordResource>>> {
|
|
2902
3174
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getRecordsV1(domain, options);
|
|
2903
3175
|
const localVarOperationServerBasePath = operationServerMap['DNSZoneApi.getRecordsV1']?.[0]?.url;
|
|
2904
3176
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -2916,6 +3188,32 @@ export const DNSZoneApiFp = function(configuration?: Configuration) {
|
|
|
2916
3188
|
const localVarOperationServerBasePath = operationServerMap['DNSZoneApi.resetZoneRecordsV1']?.[0]?.url;
|
|
2917
3189
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2918
3190
|
},
|
|
3191
|
+
/**
|
|
3192
|
+
* This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
|
|
3193
|
+
* @summary Update zone records
|
|
3194
|
+
* @param {string} domain Domain name
|
|
3195
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
3196
|
+
* @param {*} [options] Override http request option.
|
|
3197
|
+
* @throws {RequiredError}
|
|
3198
|
+
*/
|
|
3199
|
+
async updateZoneRecordsV1(domain: string, dNSV1ZoneUpdateRequest: DNSV1ZoneUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
3200
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options);
|
|
3201
|
+
const localVarOperationServerBasePath = operationServerMap['DNSZoneApi.updateZoneRecordsV1']?.[0]?.url;
|
|
3202
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3203
|
+
},
|
|
3204
|
+
/**
|
|
3205
|
+
* This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
|
|
3206
|
+
* @summary Validate zone records
|
|
3207
|
+
* @param {string} domain Domain name
|
|
3208
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
3209
|
+
* @param {*} [options] Override http request option.
|
|
3210
|
+
* @throws {RequiredError}
|
|
3211
|
+
*/
|
|
3212
|
+
async validateZoneRecordsV1(domain: string, dNSV1ZoneUpdateRequest: DNSV1ZoneUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
3213
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options);
|
|
3214
|
+
const localVarOperationServerBasePath = operationServerMap['DNSZoneApi.validateZoneRecordsV1']?.[0]?.url;
|
|
3215
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3216
|
+
},
|
|
2919
3217
|
}
|
|
2920
3218
|
};
|
|
2921
3219
|
|
|
@@ -2926,6 +3224,17 @@ export const DNSZoneApiFp = function(configuration?: Configuration) {
|
|
|
2926
3224
|
export const DNSZoneApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
2927
3225
|
const localVarFp = DNSZoneApiFp(configuration)
|
|
2928
3226
|
return {
|
|
3227
|
+
/**
|
|
3228
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
3229
|
+
* @summary Delete zone records
|
|
3230
|
+
* @param {string} domain Domain name
|
|
3231
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
3232
|
+
* @param {*} [options] Override http request option.
|
|
3233
|
+
* @throws {RequiredError}
|
|
3234
|
+
*/
|
|
3235
|
+
deleteZoneRecordsV1(domain: string, dNSV1ZoneDestroyRequest: DNSV1ZoneDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
3236
|
+
return localVarFp.deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options).then((request) => request(axios, basePath));
|
|
3237
|
+
},
|
|
2929
3238
|
/**
|
|
2930
3239
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
2931
3240
|
* @summary Get records
|
|
@@ -2933,7 +3242,7 @@ export const DNSZoneApiFactory = function (configuration?: Configuration, basePa
|
|
|
2933
3242
|
* @param {*} [options] Override http request option.
|
|
2934
3243
|
* @throws {RequiredError}
|
|
2935
3244
|
*/
|
|
2936
|
-
getRecordsV1(domain: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<
|
|
3245
|
+
getRecordsV1(domain: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<DNSV1ZoneRecordResource>> {
|
|
2937
3246
|
return localVarFp.getRecordsV1(domain, options).then((request) => request(axios, basePath));
|
|
2938
3247
|
},
|
|
2939
3248
|
/**
|
|
@@ -2947,6 +3256,28 @@ export const DNSZoneApiFactory = function (configuration?: Configuration, basePa
|
|
|
2947
3256
|
resetZoneRecordsV1(domain: string, dNSV1ZoneResetRequest: DNSV1ZoneResetRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
2948
3257
|
return localVarFp.resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options).then((request) => request(axios, basePath));
|
|
2949
3258
|
},
|
|
3259
|
+
/**
|
|
3260
|
+
* This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
|
|
3261
|
+
* @summary Update zone records
|
|
3262
|
+
* @param {string} domain Domain name
|
|
3263
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
3264
|
+
* @param {*} [options] Override http request option.
|
|
3265
|
+
* @throws {RequiredError}
|
|
3266
|
+
*/
|
|
3267
|
+
updateZoneRecordsV1(domain: string, dNSV1ZoneUpdateRequest: DNSV1ZoneUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
3268
|
+
return localVarFp.updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(axios, basePath));
|
|
3269
|
+
},
|
|
3270
|
+
/**
|
|
3271
|
+
* This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
|
|
3272
|
+
* @summary Validate zone records
|
|
3273
|
+
* @param {string} domain Domain name
|
|
3274
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
3275
|
+
* @param {*} [options] Override http request option.
|
|
3276
|
+
* @throws {RequiredError}
|
|
3277
|
+
*/
|
|
3278
|
+
validateZoneRecordsV1(domain: string, dNSV1ZoneUpdateRequest: DNSV1ZoneUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
3279
|
+
return localVarFp.validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(axios, basePath));
|
|
3280
|
+
},
|
|
2950
3281
|
};
|
|
2951
3282
|
};
|
|
2952
3283
|
|
|
@@ -2957,6 +3288,19 @@ export const DNSZoneApiFactory = function (configuration?: Configuration, basePa
|
|
|
2957
3288
|
* @extends {BaseAPI}
|
|
2958
3289
|
*/
|
|
2959
3290
|
export class DNSZoneApi extends BaseAPI {
|
|
3291
|
+
/**
|
|
3292
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
3293
|
+
* @summary Delete zone records
|
|
3294
|
+
* @param {string} domain Domain name
|
|
3295
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
3296
|
+
* @param {*} [options] Override http request option.
|
|
3297
|
+
* @throws {RequiredError}
|
|
3298
|
+
* @memberof DNSZoneApi
|
|
3299
|
+
*/
|
|
3300
|
+
public deleteZoneRecordsV1(domain: string, dNSV1ZoneDestroyRequest: DNSV1ZoneDestroyRequest, options?: RawAxiosRequestConfig) {
|
|
3301
|
+
return DNSZoneApiFp(this.configuration).deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3302
|
+
}
|
|
3303
|
+
|
|
2960
3304
|
/**
|
|
2961
3305
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
2962
3306
|
* @summary Get records
|
|
@@ -2981,6 +3325,32 @@ export class DNSZoneApi extends BaseAPI {
|
|
|
2981
3325
|
public resetZoneRecordsV1(domain: string, dNSV1ZoneResetRequest: DNSV1ZoneResetRequest, options?: RawAxiosRequestConfig) {
|
|
2982
3326
|
return DNSZoneApiFp(this.configuration).resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2983
3327
|
}
|
|
3328
|
+
|
|
3329
|
+
/**
|
|
3330
|
+
* This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
|
|
3331
|
+
* @summary Update zone records
|
|
3332
|
+
* @param {string} domain Domain name
|
|
3333
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
3334
|
+
* @param {*} [options] Override http request option.
|
|
3335
|
+
* @throws {RequiredError}
|
|
3336
|
+
* @memberof DNSZoneApi
|
|
3337
|
+
*/
|
|
3338
|
+
public updateZoneRecordsV1(domain: string, dNSV1ZoneUpdateRequest: DNSV1ZoneUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
3339
|
+
return DNSZoneApiFp(this.configuration).updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
/**
|
|
3343
|
+
* This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
|
|
3344
|
+
* @summary Validate zone records
|
|
3345
|
+
* @param {string} domain Domain name
|
|
3346
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
3347
|
+
* @param {*} [options] Override http request option.
|
|
3348
|
+
* @throws {RequiredError}
|
|
3349
|
+
* @memberof DNSZoneApi
|
|
3350
|
+
*/
|
|
3351
|
+
public validateZoneRecordsV1(domain: string, dNSV1ZoneUpdateRequest: DNSV1ZoneUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
3352
|
+
return DNSZoneApiFp(this.configuration).validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3353
|
+
}
|
|
2984
3354
|
}
|
|
2985
3355
|
|
|
2986
3356
|
|
package/base.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 0.0.
|
|
6
|
+
* API Version: 0.0.16
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/common.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 0.0.
|
|
6
|
+
* API Version: 0.0.16
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/configuration.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 0.0.
|
|
6
|
+
* API Version: 0.0.16
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -48,7 +48,7 @@ export class Configuration {
|
|
|
48
48
|
this.baseOptions = {
|
|
49
49
|
...param.baseOptions,
|
|
50
50
|
headers: {
|
|
51
|
-
'User-Agent': "hostinger-api-sdk-typescript/0.0.
|
|
51
|
+
'User-Agent': "hostinger-api-sdk-typescript/0.0.3",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|