ts / dist / cjs / dns.d.ts
2,316 words
  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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
/**
 * Hosted DNS: put registered domains on ird nameservers, manage the hosted
 * zones' records, DNSSEC and nameserver set, and bring domains held at other
 * registrars onto ird DNS through claims. Mutations are subject to the
 * client's domain gate when configured.
 */
import type { Client } from './client.js';
import type { Body, Query } from './types.js';
/** POST /domains/registrations/{id}/dns — Put a domain on ird nameservers (202). */
export declare const enableHosting: (client: Client, id: string, body?: Body<"/domains/registrations/{id}/dns", "post">) => Promise<{
    nameservers: string[];
    nameservers_mode: "shared" | "labels";
    nameservers_ready: boolean;
    origin: string;
    registry_action: {
        [key: string]: unknown;
    } | null;
    registry_error?: string;
    zones: {
        created_at: string;
        default_ttl: number;
        nameservers: string[];
        node: string;
        origin: string;
    }[];
}>;
/** DELETE /domains/registrations/{id}/dns — Take a domain off ird DNS. */
export declare const disableHosting: (client: Client, id: string, body?: Body<"/domains/registrations/{id}/dns", "delete">) => Promise<{
    decommissioned: boolean;
    snapshot_id: string;
    zones_deleted: number;
}>;
/** GET /domains/registrations/{id}/dns/dnssec — DNSSEC state of the hosted zone. */
export declare const getDnssec: (client: Client, id: string) => Promise<{
    dnssec: {
        ds?: {
            alg: number;
            digest: string;
            digest_type: number;
            keytag: number;
        };
        not_before?: string;
        state: "pending-nodes" | "awaiting-ds" | "ds-published" | "removing-ds" | "unsigning-hold" | "disabled";
    };
}>;
/** POST /domains/registrations/{id}/dns/dnssec — Enable DNSSEC on the hosted zone (202). */
export declare const enableDnssec: (client: Client, id: string, body?: Body<"/domains/registrations/{id}/dns/dnssec", "post">) => Promise<{
    dnssec: {
        ds?: {
            alg: number;
            digest: string;
            digest_type: number;
            keytag: number;
        };
        not_before?: string;
        state: "pending-nodes" | "awaiting-ds" | "ds-published" | "removing-ds" | "unsigning-hold" | "disabled";
    };
}>;
/** DELETE /domains/registrations/{id}/dns/dnssec — Disable DNSSEC on the hosted zone (202). */
export declare const disableDnssec: (client: Client, id: string, body?: Body<"/domains/registrations/{id}/dns/dnssec", "delete">) => Promise<{
    dnssec: {
        ds?: {
            alg: number;
            digest: string;
            digest_type: number;
            keytag: number;
        };
        not_before?: string;
        state: "pending-nodes" | "awaiting-ds" | "ds-published" | "removing-ds" | "unsigning-hold" | "disabled";
    };
}>;
/**
 * GET /domains/registrations/{id}/dns/nameservers — The nameserver set the
 * hosted zone is published under: `mode` "shared" (ird's public nameservers)
 * or "labels" (private nameservers unique to the domain), with
 * `nameservers`, `nameservers_ready` and `available_modes`. Free.
 */
export declare const hostedNameservers: (client: Client, id: string) => Promise<{
    available_modes: ("shared" | "labels")[];
    mode: "shared" | "labels";
    nameservers: string[];
    nameservers_ready: boolean;
    origin: string;
}>;
/**
 * POST /domains/registrations/{id}/dns/nameservers — Move the hosted zone
 * between nameserver sets: `mode` "shared" or "labels" (labels are offered
 * for .ro domains only). Answers 200 when nothing had to change, 202 with a
 * `registry_action` when a registrar nameserver change was enqueued — poll
 * `hostedNameservers` for `nameservers_ready`. Free.
 */
export declare const setHostedNameservers: (client: Client, id: string, body: Body<"/domains/registrations/{id}/dns/nameservers", "post">) => Promise<{
    available_modes: ("shared" | "labels")[];
    mode: "shared" | "labels";
    nameservers: string[];
    nameservers_ready: boolean;
    origin: string;
    registry_action: null;
} | {
    available_modes: ("shared" | "labels")[];
    mode: "shared" | "labels";
    nameservers: string[];
    nameservers_ready: boolean;
    origin: string;
    registry_action: {
        [key: string]: unknown;
    } | null;
    registry_error?: string;
}>;
/** GET /dns/domains — Your hosted DNS domains. */
export declare const listZones: (client: Client) => Promise<{
    domains: {
        default_ttl: number;
        delegated?: boolean;
        nodes: string[];
        origin: string;
    }[];
}>;
/** GET /dns/domains/{domain} — A hosted domain's zone. */
export declare const getZone: (client: Client, domain: string) => Promise<{
    default_ttl: number;
    nameservers: string[];
    nameservers_mode: "shared" | "labels";
    nodes: string[];
    origin: string;
    records: {
        class: string;
        connection_id?: string;
        data: {
            [key: string]: unknown;
        };
        deployment_id?: string;
        instance_id?: string;
        managed_by?: "tunnel" | "app" | "vps" | "platform";
        name: string;
        purpose?: string;
        ttl: number | null;
        tunnel_id?: string;
        type: string;
    }[];
}>;
/** PUT /dns/domains/{domain}/records — Set a DNS record or RRset. */
export declare const setRecord: (client: Client, domain: string, body: Body<"/dns/domains/{domain}/records", "put">) => Promise<{
    record: {
        class: string;
        data: {
            [key: string]: unknown;
        };
        name: string;
        ttl: number | null;
        type: string;
    };
    records: {
        class: string;
        data: {
            [key: string]: unknown;
        };
        name: string;
        ttl: number | null;
        type: string;
    }[];
}>;
/** DELETE /dns/domains/{domain}/records — Delete a DNS record (carries a JSON body). */
export declare const deleteRecord: (client: Client, domain: string, body: Body<"/dns/domains/{domain}/records", "delete">) => Promise<{
    deleted: boolean;
}>;
/**
 * GET /dns/claims — Domains you hold at another registrar and host (or are
 * about to host) on ird DNS: every live claim plus those ended in the last
 * 30 days, newest first. Optional `state` (pending / verified / active /
 * lapsed / revoked / expired) and `limit` (1..500, default 50).
 */
export declare const listClaims: (client: Client, query?: Query<"/dns/claims", "get">) => Promise<{
    claims: {
        activated_at: string | null;
        created_at: string;
        delegation: {
            checked_at: string | null;
            deadline_at: string | null;
            ds_present: boolean;
            lost_at: string | null;
            names: string[];
            ok: boolean;
            partial: boolean;
        };
        domain: string;
        domain_unicode: string;
        end_reason: ("released" | "superseded" | "registered" | "admin" | "not-verified" | "not-delegated" | "delegation-lost" | "grace-expired" | "registry-gone") | null;
        ended_at: string | null;
        expires_at: string | null;
        id: string;
        last_check: {
            ds_present?: boolean;
            error?: string;
            message?: string;
            missing?: string[];
            names?: string[];
            nameserver_count?: number;
            ok: boolean;
            reason?: ("parent-unreachable" | "not-delegated" | "partial" | "delegated-to-ird" | "elsewhere" | "expired" | "activation-refused") | null;
        } | null;
        nameservers: string[];
        registry: {
            checked_at: string | null;
            expires_at: string | null;
            status: {
                [key: string]: unknown;
            } | null;
        };
        seed?: {
            meta?: {
                [key: string]: unknown;
            } | null;
            nameservers: string[];
            record_count: number;
            records: {
                [key: string]: unknown;
            }[];
            snapshot_id: string;
            taken_at: string | null;
        } | null;
        seed_snapshot_id: string | null;
        sensitive: boolean;
        state: "pending" | "verified" | "active" | "lapsed" | "revoked" | "expired";
        verified_at: string | null;
    }[];
}>;
/**
 * POST /dns/claims — Claim a registrable domain registered elsewhere so ird
 * can be its DNS (201). The response's `claim` carries the `nameservers` to
 * set at your registrar; the claim activates once the parent zone lists
 * exactly those (checked every few minutes, or now via `verifyClaim`).
 * Gated on `domain`.
 */
export declare const createClaim: (client: Client, body: Body<"/dns/claims", "post">) => Promise<{
    claim: {
        activated_at: string | null;
        created_at: string;
        delegation: {
            checked_at: string | null;
            deadline_at: string | null;
            ds_present: boolean;
            lost_at: string | null;
            names: string[];
            ok: boolean;
            partial: boolean;
        };
        domain: string;
        domain_unicode: string;
        end_reason: ("released" | "superseded" | "registered" | "admin" | "not-verified" | "not-delegated" | "delegation-lost" | "grace-expired" | "registry-gone") | null;
        ended_at: string | null;
        expires_at: string | null;
        id: string;
        last_check: {
            ds_present?: boolean;
            error?: string;
            message?: string;
            missing?: string[];
            names?: string[];
            nameserver_count?: number;
            ok: boolean;
            reason?: ("parent-unreachable" | "not-delegated" | "partial" | "delegated-to-ird" | "elsewhere" | "expired" | "activation-refused") | null;
        } | null;
        nameservers: string[];
        registry: {
            checked_at: string | null;
            expires_at: string | null;
            status: {
                [key: string]: unknown;
            } | null;
        };
        seed?: {
            meta?: {
                [key: string]: unknown;
            } | null;
            nameservers: string[];
            record_count: number;
            records: {
                [key: string]: unknown;
            }[];
            snapshot_id: string;
            taken_at: string | null;
        } | null;
        seed_snapshot_id: string | null;
        sensitive: boolean;
        state: "pending" | "verified" | "active" | "lapsed" | "revoked" | "expired";
        verified_at: string | null;
    };
}>;
/**
 * GET /dns/claims/{id} — A claim: nameservers to set, its window while
 * pending, the latest delegation read and registry facts.
 */
export declare const getClaim: (client: Client, id: string) => Promise<{
    claim: {
        activated_at: string | null;
        created_at: string;
        delegation: {
            checked_at: string | null;
            deadline_at: string | null;
            ds_present: boolean;
            lost_at: string | null;
            names: string[];
            ok: boolean;
            partial: boolean;
        };
        domain: string;
        domain_unicode: string;
        end_reason: ("released" | "superseded" | "registered" | "admin" | "not-verified" | "not-delegated" | "delegation-lost" | "grace-expired" | "registry-gone") | null;
        ended_at: string | null;
        expires_at: string | null;
        id: string;
        last_check: {
            ds_present?: boolean;
            error?: string;
            message?: string;
            missing?: string[];
            names?: string[];
            nameserver_count?: number;
            ok: boolean;
            reason?: ("parent-unreachable" | "not-delegated" | "partial" | "delegated-to-ird" | "elsewhere" | "expired" | "activation-refused") | null;
        } | null;
        nameservers: string[];
        registry: {
            checked_at: string | null;
            expires_at: string | null;
            status: {
                [key: string]: unknown;
            } | null;
        };
        seed?: {
            meta?: {
                [key: string]: unknown;
            } | null;
            nameservers: string[];
            record_count: number;
            records: {
                [key: string]: unknown;
            }[];
            snapshot_id: string;
            taken_at: string | null;
        } | null;
        seed_snapshot_id: string | null;
        sensitive: boolean;
        state: "pending" | "verified" | "active" | "lapsed" | "revoked" | "expired";
        verified_at: string | null;
    };
}>;
/**
 * DELETE /dns/claims/{id} — Release a claim: it ends (state revoked) and the
 * hosted zone goes out of service, a snapshot of its records kept. Point the
 * domain's nameservers elsewhere first. Gated on the claim's domain
 * (resolved via `getClaim` when a gate is set).
 */
export declare const releaseClaim: (client: Client, id: string) => Promise<{
    claim: {
        activated_at: string | null;
        created_at: string;
        delegation: {
            checked_at: string | null;
            deadline_at: string | null;
            ds_present: boolean;
            lost_at: string | null;
            names: string[];
            ok: boolean;
            partial: boolean;
        };
        domain: string;
        domain_unicode: string;
        end_reason: ("released" | "superseded" | "registered" | "admin" | "not-verified" | "not-delegated" | "delegation-lost" | "grace-expired" | "registry-gone") | null;
        ended_at: string | null;
        expires_at: string | null;
        id: string;
        last_check: {
            ds_present?: boolean;
            error?: string;
            message?: string;
            missing?: string[];
            names?: string[];
            nameserver_count?: number;
            ok: boolean;
            reason?: ("parent-unreachable" | "not-delegated" | "partial" | "delegated-to-ird" | "elsewhere" | "expired" | "activation-refused") | null;
        } | null;
        nameservers: string[];
        registry: {
            checked_at: string | null;
            expires_at: string | null;
            status: {
                [key: string]: unknown;
            } | null;
        };
        seed?: {
            meta?: {
                [key: string]: unknown;
            } | null;
            nameservers: string[];
            record_count: number;
            records: {
                [key: string]: unknown;
            }[];
            snapshot_id: string;
            taken_at: string | null;
        } | null;
        seed_snapshot_id: string | null;
        sensitive: boolean;
        state: "pending" | "verified" | "active" | "lapsed" | "revoked" | "expired";
        verified_at: string | null;
    };
}>;
/**
 * PUT /dns/claims/{id}/seed — Attach a copy of the domain's current records
 * to a pending claim, so the zone ird creates at activation starts from them
 * instead of empty. `snapshot_id` comes from `domains.dnsSnapshot`, taken
 * while the domain still resolves at its previous host. Gated on the
 * claim's domain (resolved via `getClaim` when a gate is set).
 */
export declare const seedClaim: (client: Client, id: string, body: Body<"/dns/claims/{id}/seed", "put">) => Promise<{
    claim: {
        activated_at: string | null;
        created_at: string;
        delegation: {
            checked_at: string | null;
            deadline_at: string | null;
            ds_present: boolean;
            lost_at: string | null;
            names: string[];
            ok: boolean;
            partial: boolean;
        };
        domain: string;
        domain_unicode: string;
        end_reason: ("released" | "superseded" | "registered" | "admin" | "not-verified" | "not-delegated" | "delegation-lost" | "grace-expired" | "registry-gone") | null;
        ended_at: string | null;
        expires_at: string | null;
        id: string;
        last_check: {
            ds_present?: boolean;
            error?: string;
            message?: string;
            missing?: string[];
            names?: string[];
            nameserver_count?: number;
            ok: boolean;
            reason?: ("parent-unreachable" | "not-delegated" | "partial" | "delegated-to-ird" | "elsewhere" | "expired" | "activation-refused") | null;
        } | null;
        nameservers: string[];
        registry: {
            checked_at: string | null;
            expires_at: string | null;
            status: {
                [key: string]: unknown;
            } | null;
        };
        seed?: {
            meta?: {
                [key: string]: unknown;
            } | null;
            nameservers: string[];
            record_count: number;
            records: {
                [key: string]: unknown;
            }[];
            snapshot_id: string;
            taken_at: string | null;
        } | null;
        seed_snapshot_id: string | null;
        sensitive: boolean;
        state: "pending" | "verified" | "active" | "lapsed" | "revoked" | "expired";
        verified_at: string | null;
    };
}>;
/**
 * DELETE /dns/claims/{id}/seed — Drop the attached copy; the zone then
 * starts empty at activation. Gated on the claim's domain (resolved via
 * `getClaim` when a gate is set).
 */
export declare const unseedClaim: (client: Client, id: string) => Promise<{
    claim: {
        activated_at: string | null;
        created_at: string;
        delegation: {
            checked_at: string | null;
            deadline_at: string | null;
            ds_present: boolean;
            lost_at: string | null;
            names: string[];
            ok: boolean;
            partial: boolean;
        };
        domain: string;
        domain_unicode: string;
        end_reason: ("released" | "superseded" | "registered" | "admin" | "not-verified" | "not-delegated" | "delegation-lost" | "grace-expired" | "registry-gone") | null;
        ended_at: string | null;
        expires_at: string | null;
        id: string;
        last_check: {
            ds_present?: boolean;
            error?: string;
            message?: string;
            missing?: string[];
            names?: string[];
            nameserver_count?: number;
            ok: boolean;
            reason?: ("parent-unreachable" | "not-delegated" | "partial" | "delegated-to-ird" | "elsewhere" | "expired" | "activation-refused") | null;
        } | null;
        nameservers: string[];
        registry: {
            checked_at: string | null;
            expires_at: string | null;
            status: {
                [key: string]: unknown;
            } | null;
        };
        seed?: {
            meta?: {
                [key: string]: unknown;
            } | null;
            nameservers: string[];
            record_count: number;
            records: {
                [key: string]: unknown;
            }[];
            snapshot_id: string;
            taken_at: string | null;
        } | null;
        seed_snapshot_id: string | null;
        sensitive: boolean;
        state: "pending" | "verified" | "active" | "lapsed" | "revoked" | "expired";
        verified_at: string | null;
    };
}>;
/**
 * POST /dns/claims/{id}/verify — Read the domain's delegation at its parent
 * zone now and activate the claim when it lists the claim's nameservers.
 * Anything else is not an error: the response is 200 with `check.ok` false
 * and a `reason`.
 */
export declare const verifyClaim: (client: Client, id: string) => Promise<{
    check: {
        ds_present?: boolean;
        error?: string;
        message?: string;
        missing?: string[];
        names?: string[];
        nameserver_count?: number;
        ok: boolean;
        reason?: ("parent-unreachable" | "not-delegated" | "partial" | "delegated-to-ird" | "elsewhere" | "expired" | "activation-refused") | null;
    };
    claim: {
        activated_at: string | null;
        created_at: string;
        delegation: {
            checked_at: string | null;
            deadline_at: string | null;
            ds_present: boolean;
            lost_at: string | null;
            names: string[];
            ok: boolean;
            partial: boolean;
        };
        domain: string;
        domain_unicode: string;
        end_reason: ("released" | "superseded" | "registered" | "admin" | "not-verified" | "not-delegated" | "delegation-lost" | "grace-expired" | "registry-gone") | null;
        ended_at: string | null;
        expires_at: string | null;
        id: string;
        last_check: {
            ds_present?: boolean;
            error?: string;
            message?: string;
            missing?: string[];
            names?: string[];
            nameserver_count?: number;
            ok: boolean;
            reason?: ("parent-unreachable" | "not-delegated" | "partial" | "delegated-to-ird" | "elsewhere" | "expired" | "activation-refused") | null;
        } | null;
        nameservers: string[];
        registry: {
            checked_at: string | null;
            expires_at: string | null;
            status: {
                [key: string]: unknown;
            } | null;
        };
        seed?: {
            meta?: {
                [key: string]: unknown;
            } | null;
            nameservers: string[];
            record_count: number;
            records: {
                [key: string]: unknown;
            }[];
            snapshot_id: string;
            taken_at: string | null;
        } | null;
        seed_snapshot_id: string | null;
        sensitive: boolean;
        state: "pending" | "verified" | "active" | "lapsed" | "revoked" | "expired";
        verified_at: string | null;
    };
}>;

static mirror of HEAD · about · clone: git clone https://ird.cod-sursa.ro/ts.git