-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
100 lines (93 loc) · 2.35 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
namespace Provider {
interface Godaddy {
name: 'godaddy',
baseUrl: string,
key: string,
secret: string
}
export type Provider = Godaddy
export type ProviderNames = 'godaddy'
export interface DNSRecord {
name: string;
type: string;
data?: string;
ttl?: number;
}
}
namespace Config {
// Generated with "https://bcherny.github.io/json-schema-to-typescript-browser/"
/**
* Configuration of the ddns-client.
*/
export interface ConfigJson {
/**
* The schema to verify this document against.
*/
$schema?: string;
/**
* Defines one or more providers to add or update records at.
*/
providers: {
/**
* Provider GoDaddy.
*/
godaddy?: {
/**
* The url to the providers API.
*/
apiUrl: string;
/**
* The API key you get from https://developer.godaddy.com/keys. Or add '_ENV' at the end of the string to use the string as a name for an env variable containing the key.
*/
key: string;
/**
* The API secret you get from https://developer.godaddy.com/keys. Or add '_ENV' at the end of the string to use the string as a name for an env variable containing the secret.
*/
secret: string;
/**
* All records to add or update at this provider
*/
records: {
/**
* The domain to add or update this record to.
*/
domainName: string;
/**
* The name of the record. '@' is replaced with the 'domainName'
*/
recordName: string;
/**
* The type of record to add or update.
*/
recordType: "A" | "AAAA" | "CNAME" | "MX" | "NS" | "SOA" | "TXT";
/**
* The data to put in the record. Use '!ip' to automatically get your external IP.
*/
recordData: string;
/**
* The TTL (time to live) in seconds for the record.
*/
recordTTL: number;
}[];
};
};
/**
* Object for storing properties.
*/
storage?: {
/**
* The last external IP for this client.
*/
lastIp?: string;
[k: string]: unknown;
};
}
export interface SchemaError {
field: string,
message: string
}
}
export {
Provider,
Config
}