doomain 0.1.22 → 0.1.24
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/README.md +1 -1
- package/dist/commands/auth/clerk.js +3 -2
- package/dist/commands/auth/logout/clerk.js +3 -2
- package/dist/commands/auth/logout/vercel.js +3 -2
- package/dist/commands/auth/vercel.js +5 -4
- package/dist/commands/clerk/domains/add.js +3 -2
- package/dist/commands/dns/diagnose.js +3 -2
- package/dist/commands/dns/point.js +7 -3
- package/dist/commands/dns/remove.js +3 -2
- package/dist/commands/domains/find.js +3 -2
- package/dist/commands/domains/list.js +46 -33
- package/dist/commands/link.js +4 -3
- package/dist/commands/projects/list.js +5 -2
- package/dist/commands/providers/connect.js +14 -23
- package/dist/commands/providers/disconnect.js +3 -2
- package/dist/commands/providers/status.js +2 -1
- package/dist/commands/providers/verify.js +3 -2
- package/dist/commands/schema.js +2 -1
- package/dist/commands/update.js +2 -1
- package/dist/commands/verify.js +5 -2
- package/dist/commands/version.d.ts +5 -0
- package/dist/commands/version.js +8 -0
- package/dist/commands/wizard.js +45 -46
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/clerk-domain.d.ts +2 -1
- package/dist/lib/clerk-domain.js +122 -110
- package/dist/lib/clerk.d.ts +9 -5
- package/dist/lib/clerk.js +45 -36
- package/dist/lib/command-schema.d.ts +2 -1
- package/dist/lib/command-schema.js +16 -9
- package/dist/lib/config.d.ts +6 -4
- package/dist/lib/config.js +29 -27
- package/dist/lib/diagnose-dns.d.ts +8 -5
- package/dist/lib/diagnose-dns.js +90 -92
- package/dist/lib/dns-propagation.d.ts +5 -4
- package/dist/lib/dns-propagation.js +80 -54
- package/dist/lib/dns-reconciliation.d.ts +4 -3
- package/dist/lib/dns-reconciliation.js +52 -47
- package/dist/lib/domain-provider.d.ts +5 -1
- package/dist/lib/domain-provider.js +136 -131
- package/dist/lib/effect.d.ts +6 -0
- package/dist/lib/effect.js +20 -0
- package/dist/lib/link-domain.d.ts +3 -2
- package/dist/lib/link-domain.js +239 -218
- package/dist/lib/point-domain.d.ts +7 -4
- package/dist/lib/point-domain.js +92 -90
- package/dist/lib/providers/cloudflare/index.d.ts +9 -8
- package/dist/lib/providers/cloudflare/index.js +93 -87
- package/dist/lib/providers/core/config.d.ts +4 -1
- package/dist/lib/providers/core/config.js +17 -13
- package/dist/lib/providers/core/http.d.ts +4 -1
- package/dist/lib/providers/core/http.js +28 -18
- package/dist/lib/providers/core/pagination.d.ts +3 -2
- package/dist/lib/providers/core/pagination.js +17 -14
- package/dist/lib/providers/core/planner.d.ts +5 -4
- package/dist/lib/providers/core/planner.js +18 -15
- package/dist/lib/providers/core/types.d.ts +11 -8
- package/dist/lib/providers/hostinger/index.d.ts +9 -8
- package/dist/lib/providers/hostinger/index.js +74 -72
- package/dist/lib/providers/namecheap/index.d.ts +10 -8
- package/dist/lib/providers/namecheap/index.js +134 -109
- package/dist/lib/providers/registry.d.ts +3 -3
- package/dist/lib/providers/registry.js +7 -3
- package/dist/lib/providers/spaceship/index.d.ts +9 -8
- package/dist/lib/providers/spaceship/index.js +48 -47
- package/dist/lib/providers/status.d.ts +2 -1
- package/dist/lib/providers/status.js +41 -34
- package/dist/lib/public-ip.d.ts +2 -0
- package/dist/lib/public-ip.js +14 -0
- package/dist/lib/remove-domain.d.ts +6 -3
- package/dist/lib/remove-domain.js +83 -77
- package/dist/lib/self-update.d.ts +3 -2
- package/dist/lib/self-update.js +15 -23
- package/dist/lib/vercel-auth.d.ts +2 -1
- package/dist/lib/vercel-auth.js +21 -24
- package/dist/lib/vercel.d.ts +16 -12
- package/dist/lib/vercel.js +174 -114
- package/oclif.manifest.json +21 -1
- package/package.json +8 -1
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
export function paginateBySkip(input) {
|
|
3
|
+
return Effect.gen(function* () {
|
|
4
|
+
const items = [];
|
|
5
|
+
const maxPages = input.maxPages ?? 100;
|
|
6
|
+
let skip = 0;
|
|
7
|
+
let total = Number.POSITIVE_INFINITY;
|
|
8
|
+
for (let page = 0; skip < total && page < maxPages; page += 1) {
|
|
9
|
+
const result = yield* input.fetchPage({ skip, take: input.take });
|
|
10
|
+
items.push(...result.items);
|
|
11
|
+
total = result.total;
|
|
12
|
+
if (result.items.length === 0)
|
|
13
|
+
break;
|
|
14
|
+
skip += result.items.length;
|
|
15
|
+
}
|
|
16
|
+
return items;
|
|
17
|
+
});
|
|
15
18
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DoomainEffect } from '../../effect.js';
|
|
1
2
|
import type { DnsChange, DnsChangePlan, DnsRecord, DnsRecordInput, DnsZone, PlanOptions } from './types.js';
|
|
2
3
|
export declare function planDnsChanges(input: {
|
|
3
4
|
desired: DnsRecordInput[];
|
|
@@ -6,14 +7,14 @@ export declare function planDnsChanges(input: {
|
|
|
6
7
|
providerId: string;
|
|
7
8
|
zone: DnsZone;
|
|
8
9
|
}): DnsChangePlan;
|
|
9
|
-
export declare function assertNoConflicts(providerId: string, plan: DnsChangePlan): void
|
|
10
|
+
export declare function assertNoConflicts(providerId: string, plan: DnsChangePlan): DoomainEffect<void>;
|
|
10
11
|
export declare function applyDnsChanges(input: {
|
|
11
|
-
deleteRecord(record: DnsRecord):
|
|
12
|
+
deleteRecord(record: DnsRecord): DoomainEffect<void>;
|
|
12
13
|
plan: DnsChangePlan;
|
|
13
14
|
providerId: string;
|
|
14
|
-
upsertRecord(record: DnsRecordInput):
|
|
15
|
+
upsertRecord(record: DnsRecordInput): DoomainEffect<DnsRecord>;
|
|
15
16
|
opts?: PlanOptions;
|
|
16
|
-
}):
|
|
17
|
+
}): DoomainEffect<{
|
|
17
18
|
applied: DnsChange[];
|
|
18
19
|
skipped: DnsRecordInput[];
|
|
19
20
|
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
1
2
|
import { ProviderError } from './errors.js';
|
|
2
3
|
function cleanDnsValue(value) {
|
|
3
4
|
return value.toLowerCase().replace(/\.$/, '');
|
|
@@ -60,22 +61,24 @@ export function planDnsChanges(input) {
|
|
|
60
61
|
}
|
|
61
62
|
export function assertNoConflicts(providerId, plan) {
|
|
62
63
|
if (plan.conflicts.length === 0)
|
|
63
|
-
return;
|
|
64
|
-
|
|
64
|
+
return Effect.void;
|
|
65
|
+
return Effect.fail(new ProviderError(providerId, 'PROVIDER_RECORD_CONFLICT', 'DNS record conflicts must be resolved before applying changes.', {
|
|
65
66
|
conflicts: plan.conflicts,
|
|
66
|
-
});
|
|
67
|
+
}));
|
|
67
68
|
}
|
|
68
|
-
export
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
export function applyDnsChanges(input) {
|
|
70
|
+
return Effect.gen(function* () {
|
|
71
|
+
yield* assertNoConflicts(input.providerId, input.plan);
|
|
72
|
+
const applied = [];
|
|
73
|
+
const skipped = [];
|
|
74
|
+
for (const change of input.plan.changes) {
|
|
75
|
+
if (change.action === 'skip') {
|
|
76
|
+
skipped.push(change.record);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
yield* change.action === 'delete' ? input.deleteRecord(change.existing) : input.upsertRecord(change.record);
|
|
80
|
+
applied.push(change);
|
|
76
81
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
return { applied, skipped };
|
|
82
|
+
return { applied, skipped };
|
|
83
|
+
});
|
|
81
84
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { DoomainEffect } from '../../effect.js';
|
|
2
|
+
import type { DoomainErrorCode } from '../../errors.js';
|
|
1
3
|
export type DnsRecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT';
|
|
2
4
|
export interface CredentialDefinition {
|
|
3
5
|
description?: string;
|
|
@@ -97,19 +99,20 @@ export interface ProviderContext {
|
|
|
97
99
|
credentials: Record<string, string>;
|
|
98
100
|
debug?: boolean;
|
|
99
101
|
signal?: AbortSignal;
|
|
102
|
+
transportErrorCode?: DoomainErrorCode;
|
|
100
103
|
}
|
|
101
104
|
export interface DnsProvider {
|
|
102
105
|
capabilities: ProviderCapabilities;
|
|
103
106
|
id: string;
|
|
104
107
|
name: string;
|
|
105
|
-
applyChanges(zone: DnsZone, plan: DnsChangePlan, opts?: ApplyOptions):
|
|
106
|
-
deleteRecord(zone: DnsZone, record: DnsRecord):
|
|
107
|
-
getZone(domain: string):
|
|
108
|
-
listRecords(zone: DnsZone):
|
|
109
|
-
listZones(input?: ListZonesInput):
|
|
110
|
-
planChanges(zone: DnsZone, desired: DnsRecordInput[], opts?: PlanOptions):
|
|
111
|
-
upsertRecord(zone: DnsZone, record: DnsRecordInput):
|
|
112
|
-
verifyCredentials():
|
|
108
|
+
applyChanges(zone: DnsZone, plan: DnsChangePlan, opts?: ApplyOptions): DoomainEffect<DnsChangeResult>;
|
|
109
|
+
deleteRecord(zone: DnsZone, record: DnsRecord): DoomainEffect<void>;
|
|
110
|
+
getZone(domain: string): DoomainEffect<DnsZone | null>;
|
|
111
|
+
listRecords(zone: DnsZone): DoomainEffect<DnsRecord[]>;
|
|
112
|
+
listZones(input?: ListZonesInput): DoomainEffect<DnsZone[]>;
|
|
113
|
+
planChanges(zone: DnsZone, desired: DnsRecordInput[], opts?: PlanOptions): DoomainEffect<DnsChangePlan>;
|
|
114
|
+
upsertRecord(zone: DnsZone, record: DnsRecordInput): DoomainEffect<DnsRecord>;
|
|
115
|
+
verifyCredentials(): DoomainEffect<ProviderHealth>;
|
|
113
116
|
}
|
|
114
117
|
export interface DnsProviderDefinition {
|
|
115
118
|
capabilities: ProviderCapabilities;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DoomainEffect } from '../../effect.js';
|
|
1
2
|
import type { DnsChange, DnsChangePlan, DnsProvider, DnsProviderDefinition, DnsRecord, DnsRecordInput, DnsZone, ProviderCapabilities, ProviderContext, ProviderHealth } from '../types.js';
|
|
2
3
|
export declare class HostingerProvider implements DnsProvider {
|
|
3
4
|
readonly capabilities: ProviderCapabilities;
|
|
@@ -5,19 +6,19 @@ export declare class HostingerProvider implements DnsProvider {
|
|
|
5
6
|
readonly name = "Hostinger";
|
|
6
7
|
private readonly http;
|
|
7
8
|
constructor(context: ProviderContext);
|
|
8
|
-
verifyCredentials():
|
|
9
|
-
listZones():
|
|
10
|
-
getZone(domain: string):
|
|
11
|
-
listRecords(zone: DnsZone):
|
|
9
|
+
verifyCredentials(): DoomainEffect<ProviderHealth>;
|
|
10
|
+
listZones(): DoomainEffect<DnsZone[]>;
|
|
11
|
+
getZone(domain: string): DoomainEffect<DnsZone | null>;
|
|
12
|
+
listRecords(zone: DnsZone): DoomainEffect<DnsRecord[]>;
|
|
12
13
|
planChanges(zone: DnsZone, desired: DnsRecordInput[], opts?: {
|
|
13
14
|
force?: boolean;
|
|
14
|
-
}):
|
|
15
|
-
applyChanges(zone: DnsZone, plan: DnsChangePlan):
|
|
15
|
+
}): DoomainEffect<DnsChangePlan>;
|
|
16
|
+
applyChanges(zone: DnsZone, plan: DnsChangePlan): DoomainEffect<{
|
|
16
17
|
applied: DnsChange[];
|
|
17
18
|
skipped: DnsRecordInput[];
|
|
18
19
|
}>;
|
|
19
|
-
upsertRecord(zone: DnsZone, record: DnsRecordInput):
|
|
20
|
-
deleteRecord(zone: DnsZone, record: DnsRecord):
|
|
20
|
+
upsertRecord(zone: DnsZone, record: DnsRecordInput): DoomainEffect<DnsRecord>;
|
|
21
|
+
deleteRecord(zone: DnsZone, record: DnsRecord): DoomainEffect<void>;
|
|
21
22
|
private putRecords;
|
|
22
23
|
private putHostingerRecordSets;
|
|
23
24
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { trySync } from '../../effect.js';
|
|
1
3
|
import { normalizeDomain } from '../../validate.js';
|
|
2
4
|
import { createProviderHttpClient } from '../core/http.js';
|
|
3
5
|
import { assertNoConflicts, planDnsChanges } from '../core/planner.js';
|
|
@@ -107,91 +109,89 @@ export class HostingerProvider {
|
|
|
107
109
|
headers: { Authorization: `Bearer ${context.credentials.apiToken}` },
|
|
108
110
|
providerId: this.id,
|
|
109
111
|
signal: context.signal,
|
|
112
|
+
transportErrorCode: context.transportErrorCode,
|
|
110
113
|
});
|
|
111
114
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return { ok: true };
|
|
115
|
+
verifyCredentials() {
|
|
116
|
+
return this.listZones().pipe(Effect.as({ ok: true }));
|
|
115
117
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return domains.flatMap((domain) => {
|
|
118
|
+
listZones() {
|
|
119
|
+
return this.http.request('/api/domains/v1/portfolio').pipe(Effect.map((domains) => domains.flatMap((domain) => {
|
|
119
120
|
const zone = toZone(domain);
|
|
120
121
|
return zone ? [zone] : [];
|
|
121
|
-
});
|
|
122
|
+
})));
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
getZone(domain) {
|
|
125
|
+
return Effect.gen(this, function* () {
|
|
126
|
+
const normalized = yield* trySync(() => normalizeDomain(domain), 'INVALID_INPUT');
|
|
127
|
+
const zones = yield* this.listZones();
|
|
128
|
+
return zones.find((zone) => zone.name === normalized) ?? null;
|
|
129
|
+
});
|
|
127
130
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
listRecords(zone) {
|
|
132
|
+
return this.http
|
|
133
|
+
.request(`/api/dns/v1/zones/${encodeURIComponent(zone.name)}`)
|
|
134
|
+
.pipe(Effect.map((records) => records.flatMap((record) => toDnsRecords(record, zone))));
|
|
131
135
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
desired,
|
|
135
|
-
existing: await this.listRecords(zone),
|
|
136
|
-
force: opts.force,
|
|
137
|
-
providerId: this.id,
|
|
138
|
-
zone,
|
|
139
|
-
});
|
|
140
|
-
return collapseRecordSetWrites(plan);
|
|
136
|
+
planChanges(zone, desired, opts = {}) {
|
|
137
|
+
return this.listRecords(zone).pipe(Effect.map((existing) => collapseRecordSetWrites(planDnsChanges({ desired, existing, force: opts.force, providerId: this.id, zone }))));
|
|
141
138
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
for (const deleted of deletionSets.values()) {
|
|
156
|
-
const sample = deleted[0];
|
|
157
|
-
const source = sample.metadata?.hostinger;
|
|
158
|
-
const deletedValues = new Set(deleted.map((record) => record.value));
|
|
159
|
-
const sourceRecords = source?.records?.filter((record) => record.is_disabled || !record.content || !deletedValues.has(record.content));
|
|
160
|
-
if (source && sourceRecords && sourceRecords.length > 0) {
|
|
161
|
-
await this.putHostingerRecordSets(zone, [{ ...source, records: sourceRecords }], true);
|
|
139
|
+
applyChanges(zone, plan) {
|
|
140
|
+
return Effect.gen(this, function* () {
|
|
141
|
+
yield* assertNoConflicts(this.id, plan);
|
|
142
|
+
const applied = [];
|
|
143
|
+
const skipped = [];
|
|
144
|
+
const deletionSets = new Map();
|
|
145
|
+
for (const change of plan.changes) {
|
|
146
|
+
if (change.action !== 'delete')
|
|
147
|
+
continue;
|
|
148
|
+
const key = `${change.existing.type}\0${change.existing.name}`;
|
|
149
|
+
const records = deletionSets.get(key) ?? [];
|
|
150
|
+
records.push(change.existing);
|
|
151
|
+
deletionSets.set(key, records);
|
|
162
152
|
}
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
153
|
+
for (const deleted of deletionSets.values()) {
|
|
154
|
+
const sample = deleted[0];
|
|
155
|
+
const source = sample.metadata?.hostinger;
|
|
156
|
+
const deletedValues = new Set(deleted.map((record) => record.value));
|
|
157
|
+
const sourceRecords = source?.records?.filter((record) => record.is_disabled || !record.content || !deletedValues.has(record.content));
|
|
158
|
+
if (source && sourceRecords && sourceRecords.length > 0) {
|
|
159
|
+
yield* this.putHostingerRecordSets(zone, [{ ...source, records: sourceRecords }], true);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
const remaining = plan.existing.filter((record) => sameRecordSet(record, sample) && !deleted.includes(record));
|
|
163
|
+
if (remaining.length > 0)
|
|
164
|
+
yield* this.putRecords(zone, remaining, true);
|
|
165
|
+
else
|
|
166
|
+
yield* this.deleteRecord(zone, sample);
|
|
167
|
+
}
|
|
168
|
+
applied.push(...plan.changes.filter((change) => change.action === 'delete' && deleted.includes(change.existing)));
|
|
169
169
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
170
|
+
for (const change of plan.changes) {
|
|
171
|
+
if (change.action === 'skip') {
|
|
172
|
+
skipped.push(change.record);
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
if (change.action === 'delete')
|
|
176
|
+
continue;
|
|
177
|
+
yield* this.putRecords(zone, [change.record], change.action === 'update');
|
|
178
|
+
applied.push(change);
|
|
176
179
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
await this.putRecords(zone, [change.record], change.action === 'update');
|
|
180
|
-
applied.push(change);
|
|
181
|
-
}
|
|
182
|
-
return { applied, skipped };
|
|
180
|
+
return { applied, skipped };
|
|
181
|
+
});
|
|
183
182
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
return { ...record, ttl: record.ttl ?? capabilities.defaultTtl };
|
|
183
|
+
upsertRecord(zone, record) {
|
|
184
|
+
return this.putRecords(zone, [record], true).pipe(Effect.as({ ...record, ttl: record.ttl ?? capabilities.defaultTtl }));
|
|
187
185
|
}
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
deleteRecord(zone, record) {
|
|
187
|
+
return this.http
|
|
188
|
+
.request(`/api/dns/v1/zones/${encodeURIComponent(zone.name)}`, {
|
|
190
189
|
body: { filters: [deleteFilter(record)] },
|
|
191
190
|
method: 'DELETE',
|
|
192
|
-
})
|
|
191
|
+
})
|
|
192
|
+
.pipe(Effect.asVoid);
|
|
193
193
|
}
|
|
194
|
-
|
|
194
|
+
putRecords(zone, records, overwrite) {
|
|
195
195
|
const recordSets = new Map();
|
|
196
196
|
for (const record of records) {
|
|
197
197
|
const key = `${record.type}\0${record.name}`;
|
|
@@ -199,13 +199,15 @@ export class HostingerProvider {
|
|
|
199
199
|
values.push(record);
|
|
200
200
|
recordSets.set(key, values);
|
|
201
201
|
}
|
|
202
|
-
|
|
202
|
+
return this.putHostingerRecordSets(zone, [...recordSets.values()].map(toHostingerRecordSet), overwrite);
|
|
203
203
|
}
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
putHostingerRecordSets(zone, recordSets, overwrite) {
|
|
205
|
+
return this.http
|
|
206
|
+
.request(`/api/dns/v1/zones/${encodeURIComponent(zone.name)}`, {
|
|
206
207
|
body: { overwrite, zone: recordSets },
|
|
207
208
|
method: 'PUT',
|
|
208
|
-
})
|
|
209
|
+
})
|
|
210
|
+
.pipe(Effect.asVoid);
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
export const hostingerProviderDefinition = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DoomainEffect } from '../../effect.js';
|
|
1
2
|
import type { DnsChange, DnsChangePlan, DnsProvider, DnsProviderDefinition, DnsRecord, DnsRecordInput, DnsZone, ProviderCapabilities, ProviderContext, ProviderHealth } from '../types.js';
|
|
2
3
|
export declare class NamecheapProvider implements DnsProvider {
|
|
3
4
|
readonly capabilities: ProviderCapabilities;
|
|
@@ -7,21 +8,22 @@ export declare class NamecheapProvider implements DnsProvider {
|
|
|
7
8
|
private readonly apiUser;
|
|
8
9
|
private readonly baseUrl;
|
|
9
10
|
private readonly clientIp;
|
|
11
|
+
private readonly transportErrorCode;
|
|
10
12
|
private readonly username;
|
|
11
13
|
constructor(context: ProviderContext);
|
|
12
|
-
verifyCredentials():
|
|
13
|
-
listZones():
|
|
14
|
-
getZone(domain: string):
|
|
15
|
-
listRecords(zone: DnsZone):
|
|
14
|
+
verifyCredentials(): DoomainEffect<ProviderHealth>;
|
|
15
|
+
listZones(): DoomainEffect<DnsZone[]>;
|
|
16
|
+
getZone(domain: string): DoomainEffect<DnsZone | null>;
|
|
17
|
+
listRecords(zone: DnsZone): DoomainEffect<DnsRecord[]>;
|
|
16
18
|
planChanges(zone: DnsZone, desired: DnsRecordInput[], opts?: {
|
|
17
19
|
force?: boolean;
|
|
18
|
-
}):
|
|
19
|
-
applyChanges(zone: DnsZone, plan: DnsChangePlan):
|
|
20
|
+
}): DoomainEffect<DnsChangePlan>;
|
|
21
|
+
applyChanges(zone: DnsZone, plan: DnsChangePlan): DoomainEffect<{
|
|
20
22
|
applied: DnsChange[];
|
|
21
23
|
skipped: DnsRecordInput[];
|
|
22
24
|
}>;
|
|
23
|
-
upsertRecord(zone: DnsZone, record: DnsRecordInput):
|
|
24
|
-
deleteRecord(zone: DnsZone, record: DnsRecord):
|
|
25
|
+
upsertRecord(zone: DnsZone, record: DnsRecordInput): DoomainEffect<DnsRecord>;
|
|
26
|
+
deleteRecord(zone: DnsZone, record: DnsRecord): DoomainEffect<void>;
|
|
25
27
|
private setHosts;
|
|
26
28
|
private request;
|
|
27
29
|
}
|