Skip to content

Commit 142a646

Browse files
authored
Remove record type enumerations (#266)
1 parent e892b51 commit 142a646

File tree

3 files changed

+8
-45
lines changed

3 files changed

+8
-45
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
## main
44

5+
### Changed
6+
7+
- `ZoneRecord.type`, `TemplateRecord.type`, and `createZoneRecord` type parameter changed from enum to `string`
8+
59
### Removed
610

11+
- Removed `ZoneRecordType` and `TemplateRecordType` type enumerations
712
- Removed deprecated `getWhoisPrivacy` (dnsimple/dnsimple-developer#919)
813
- Removed deprecated `renewWhoisPrivacy` (dnsimple/dnsimple-developer#919)
914

lib/types.ts

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -291,27 +291,6 @@ export type ZoneFile = { zone: string };
291291

292292
export type ZoneDistribution = { distributed: boolean };
293293

294-
export type ZoneRecordType =
295-
| "A"
296-
| "AAAA"
297-
| "ALIAS"
298-
| "CAA"
299-
| "CNAME"
300-
| "DNSKEY"
301-
| "DS"
302-
| "HINFO"
303-
| "MX"
304-
| "NAPTR"
305-
| "NS"
306-
| "POOL"
307-
| "PTR"
308-
| "SOA"
309-
| "SPF"
310-
| "SRV"
311-
| "SSHFP"
312-
| "TXT"
313-
| "URL";
314-
315294
export type ZoneRecordRegion =
316295
| "global"
317296
| "SV1"
@@ -331,7 +310,7 @@ export type ZoneRecord = {
331310
content: string;
332311
ttl: number;
333312
priority?: number | null;
334-
type: ZoneRecordType;
313+
type: string;
335314
regions: Array<ZoneRecordRegion>;
336315
system_record: boolean;
337316
created_at: string;
@@ -391,35 +370,14 @@ export type Template = {
391370
updated_at: string;
392371
};
393372

394-
export type TemplateRecordType =
395-
| "A"
396-
| "AAAA"
397-
| "ALIAS"
398-
| "CAA"
399-
| "CNAME"
400-
| "DNSKEY"
401-
| "DS"
402-
| "HINFO"
403-
| "MX"
404-
| "NAPTR"
405-
| "NS"
406-
| "POOL"
407-
| "PTR"
408-
| "SOA"
409-
| "SPF"
410-
| "SRV"
411-
| "SSHFP"
412-
| "TXT"
413-
| "URL";
414-
415373
export type TemplateRecord = {
416374
id: number;
417375
template_id: number;
418376
name: string;
419377
content: string;
420378
ttl: number;
421379
priority: number | null;
422-
type: TemplateRecordType;
380+
type: string;
423381
created_at: string;
424382
updated_at: string;
425383
};

lib/zones.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export class Zones {
308308
zone: string,
309309
data: Partial<{
310310
name: string;
311-
type: types.ZoneRecordType;
311+
type: string;
312312
content: string;
313313
ttl: number;
314314
priority: number;

0 commit comments

Comments
 (0)