@opusdns/api 1.11.0 → 1.13.0
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/package.json +1 -1
- package/src/helpers/constants.ts +2 -0
- package/src/helpers/keys.ts +4 -0
- package/src/openapi.yaml +85 -45
- package/src/schema.d.ts +8 -1
package/package.json
CHANGED
package/src/helpers/constants.ts
CHANGED
|
@@ -1549,6 +1549,7 @@ export const REPORT_TYPE = {
|
|
|
1549
1549
|
DOMAIN_FORWARDS: "domain_forwards",
|
|
1550
1550
|
EXPIRING_DOMAINS: "expiring_domains",
|
|
1551
1551
|
EMAIL_FORWARDS: "email_forwards",
|
|
1552
|
+
REGISTRAR_PORTFOLIO_PDF: "registrar_portfolio_pdf",
|
|
1552
1553
|
BILLING_TRANSACTIONS: "billing_transactions",
|
|
1553
1554
|
BILLING_TRANSACTIONS_MONTHLY: "billing_transactions_monthly",
|
|
1554
1555
|
} as const satisfies Record<string, ReportType>;
|
|
@@ -1560,6 +1561,7 @@ export const REPORT_TYPE_VALUES = [
|
|
|
1560
1561
|
'domain_forwards',
|
|
1561
1562
|
'expiring_domains',
|
|
1562
1563
|
'email_forwards',
|
|
1564
|
+
'registrar_portfolio_pdf',
|
|
1563
1565
|
'billing_transactions',
|
|
1564
1566
|
'billing_transactions_monthly',
|
|
1565
1567
|
] as const satisfies ReadonlyArray<ReportType>;
|
package/src/helpers/keys.ts
CHANGED
|
@@ -1048,9 +1048,11 @@ export const KEYS_CREATE_JOB_BATCH = [
|
|
|
1048
1048
|
KEY_CREATE_JOB_BATCH_TOTAL_COMMANDS,
|
|
1049
1049
|
] as const satisfies (keyof CreateJobBatch)[];
|
|
1050
1050
|
|
|
1051
|
+
export const KEY_CREATE_REPORT_REQ_REGISTRAR_CREDENTIAL_ID = 'registrar_credential_id' satisfies keyof CreateReportReq;
|
|
1051
1052
|
export const KEY_CREATE_REPORT_REQ_REPORT_TYPE = 'report_type' satisfies keyof CreateReportReq;
|
|
1052
1053
|
|
|
1053
1054
|
export const KEYS_CREATE_REPORT_REQ = [
|
|
1055
|
+
KEY_CREATE_REPORT_REQ_REGISTRAR_CREDENTIAL_ID,
|
|
1054
1056
|
KEY_CREATE_REPORT_REQ_REPORT_TYPE,
|
|
1055
1057
|
] as const satisfies (keyof CreateReportReq)[];
|
|
1056
1058
|
|
|
@@ -1364,6 +1366,7 @@ export const KEY_DNS_ZONE_NAME = 'name' satisfies keyof DnsZone;
|
|
|
1364
1366
|
export const KEY_DNS_ZONE_RRSETS = 'rrsets' satisfies keyof DnsZone;
|
|
1365
1367
|
export const KEY_DNS_ZONE_TAGS = 'tags' satisfies keyof DnsZone;
|
|
1366
1368
|
export const KEY_DNS_ZONE_UPDATED_ON = 'updated_on' satisfies keyof DnsZone;
|
|
1369
|
+
export const KEY_DNS_ZONE_VANITY_NAMESERVER_SET_ID = 'vanity_nameserver_set_id' satisfies keyof DnsZone;
|
|
1367
1370
|
|
|
1368
1371
|
export const KEYS_DNS_ZONE = [
|
|
1369
1372
|
KEY_DNS_ZONE_CREATED_ON,
|
|
@@ -1374,6 +1377,7 @@ export const KEYS_DNS_ZONE = [
|
|
|
1374
1377
|
KEY_DNS_ZONE_RRSETS,
|
|
1375
1378
|
KEY_DNS_ZONE_TAGS,
|
|
1376
1379
|
KEY_DNS_ZONE_UPDATED_ON,
|
|
1380
|
+
KEY_DNS_ZONE_VANITY_NAMESERVER_SET_ID,
|
|
1377
1381
|
] as const satisfies (keyof DnsZone)[];
|
|
1378
1382
|
|
|
1379
1383
|
export const KEY_DNS_ZONE_RRSETS_CREATE_RRSETS = 'rrsets' satisfies keyof DnsZoneRrsetsCreate;
|
package/src/openapi.yaml
CHANGED
|
@@ -2125,6 +2125,16 @@ components:
|
|
|
2125
2125
|
type: object
|
|
2126
2126
|
CreateReportReq:
|
|
2127
2127
|
properties:
|
|
2128
|
+
registrar_credential_id:
|
|
2129
|
+
anyOf:
|
|
2130
|
+
- examples:
|
|
2131
|
+
- registrar_credential_01h45ytscbebyvny4gc8cr8ma2
|
|
2132
|
+
format: typeid
|
|
2133
|
+
pattern: ^registrar_credential_[0-7][0-9a-hjkmnpq-tv-z]{25}$
|
|
2134
|
+
type: string
|
|
2135
|
+
x-typeid-prefix: registrar_credential
|
|
2136
|
+
- type: 'null'
|
|
2137
|
+
title: Registrar Credential Id
|
|
2128
2138
|
report_type:
|
|
2129
2139
|
$ref: '#/components/schemas/ReportType'
|
|
2130
2140
|
default: domain_inventory
|
|
@@ -2842,6 +2852,18 @@ components:
|
|
|
2842
2852
|
format: date-time
|
|
2843
2853
|
title: Updated On
|
|
2844
2854
|
type: string
|
|
2855
|
+
vanity_nameserver_set_id:
|
|
2856
|
+
anyOf:
|
|
2857
|
+
- examples:
|
|
2858
|
+
- vns_01h45ytscbebyvny4gc8cr8ma2
|
|
2859
|
+
format: typeid
|
|
2860
|
+
pattern: ^vns_[0-7][0-9a-hjkmnpq-tv-z]{25}$
|
|
2861
|
+
type: string
|
|
2862
|
+
x-typeid-prefix: vns
|
|
2863
|
+
- type: 'null'
|
|
2864
|
+
description: Vanity NS set whose apex NS + SOA brand this zone, or null
|
|
2865
|
+
when the zone uses the system default nameservers.
|
|
2866
|
+
title: Vanity Nameserver Set Id
|
|
2845
2867
|
required:
|
|
2846
2868
|
- name
|
|
2847
2869
|
- dns_zone_id
|
|
@@ -9977,6 +9999,7 @@ components:
|
|
|
9977
9999
|
- domain_forwards
|
|
9978
10000
|
- expiring_domains
|
|
9979
10001
|
- email_forwards
|
|
10002
|
+
- registrar_portfolio_pdf
|
|
9980
10003
|
- billing_transactions
|
|
9981
10004
|
- billing_transactions_monthly
|
|
9982
10005
|
title: ReportType
|
|
@@ -11989,7 +12012,7 @@ info:
|
|
|
11989
12012
|
\n\n"
|
|
11990
12013
|
summary: OpusDNS - your gateway to a seamless domain management experience.
|
|
11991
12014
|
title: OpusDNS API
|
|
11992
|
-
version: 2026-06-
|
|
12015
|
+
version: 2026-06-12-154603
|
|
11993
12016
|
x-logo:
|
|
11994
12017
|
altText: OpusDNS API Reference
|
|
11995
12018
|
url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
|
|
@@ -26582,50 +26605,67 @@ tags:
|
|
|
26582
26605
|
\ | Summary of all DNS zones and their configuration |\n| `dns_zone_records` |\
|
|
26583
26606
|
\ Detailed export of all DNS records across zones |\n| `billing_transactions`\
|
|
26584
26607
|
\ | Billing transactions for the current month to date |\n| `billing_transactions_monthly`\
|
|
26585
|
-
\ | Billing transactions for the previous calendar month |\n
|
|
26586
|
-
\
|
|
26587
|
-
\
|
|
26588
|
-
\
|
|
26589
|
-
\
|
|
26590
|
-
|
|
26591
|
-
\ the
|
|
26592
|
-
\
|
|
26593
|
-
\
|
|
26594
|
-
\
|
|
26595
|
-
\
|
|
26596
|
-
\
|
|
26597
|
-
\
|
|
26598
|
-
\
|
|
26599
|
-
\
|
|
26600
|
-
\
|
|
26601
|
-
\
|
|
26602
|
-
\
|
|
26603
|
-
\
|
|
26604
|
-
\
|
|
26605
|
-
\
|
|
26606
|
-
\
|
|
26607
|
-
\
|
|
26608
|
-
\
|
|
26609
|
-
\
|
|
26610
|
-
\
|
|
26611
|
-
\
|
|
26612
|
-
\
|
|
26613
|
-
\
|
|
26614
|
-
|
|
26615
|
-
\
|
|
26616
|
-
\ \
|
|
26617
|
-
\
|
|
26618
|
-
\
|
|
26619
|
-
\
|
|
26620
|
-
\
|
|
26621
|
-
\
|
|
26622
|
-
\
|
|
26623
|
-
\
|
|
26624
|
-
|
|
26625
|
-
|
|
26626
|
-
\
|
|
26627
|
-
|
|
26628
|
-
\
|
|
26608
|
+
\ | Billing transactions for the previous calendar month |\n| `registrar_portfolio_pdf`\
|
|
26609
|
+
\ | Credential-scoped registrar portfolio report as a PDF inside the ZIP download\
|
|
26610
|
+
\ |\n\n### Billing Transaction Reports\n\nBilling transaction reports export all\
|
|
26611
|
+
\ completed transactions as a CSV with the following columns: `product_reference`,\
|
|
26612
|
+
\ `action`, `period`, `product_type`, `amount`, `currency`, `completed_on`.\n\n\
|
|
26613
|
+
There are two billing report types:\n\n- **`billing_transactions`** \u2014 On-demand\
|
|
26614
|
+
\ report covering the current month to date (1st of the month through the time\
|
|
26615
|
+
\ of the request). Request this via the API like any other report type.\n- **`billing_transactions_monthly`**\
|
|
26616
|
+
\ \u2014 Automatically generated on the 1st of each month at 5 AM UTC, covering\
|
|
26617
|
+
\ the full previous calendar month. These are scheduled reports and do not need\
|
|
26618
|
+
\ to be manually requested.\n\nBoth types maintain their own retention of 30 reports\
|
|
26619
|
+
\ each, so requesting on-demand reports will not displace the monthly archive.\n\
|
|
26620
|
+
\n### Registrar Portfolio PDF Reports\n\nRegistrar portfolio reports are requested\
|
|
26621
|
+
\ with `POST /v1/reports` and require `registrar_credential_id`:\n\n```json\n\
|
|
26622
|
+
{\n \"report_type\": \"registrar_portfolio_pdf\",\n \"registrar_credential_id\"\
|
|
26623
|
+
: \"registrar_credential_...\"\n}\n```\n\nThe report uses registrar data from\
|
|
26624
|
+
\ the registrar-elements OpenSearch index, populated by the scheduled daily registrar\
|
|
26625
|
+
\ syncs. Report generation does not trigger a sync; it uses the most recently\
|
|
26626
|
+
\ synced data as-is. If the credential has no portfolio data yet (for example,\
|
|
26627
|
+
\ a credential created since the last sync), generation fails with an error indicating\
|
|
26628
|
+
\ the credential is too new to report on.\n\nThe downloaded ZIP contains `registrar-portfolio-{report_typeid}.pdf`.\
|
|
26629
|
+
\ Before each PDF generation, the report service loads the organization's current\
|
|
26630
|
+
\ available TLD list from the backend and uses it to mark TLDs in the portfolio\
|
|
26631
|
+
\ as available or unavailable. The first version includes the sections backed\
|
|
26632
|
+
\ by indexed data: portfolio overview, domains/statuses/TLDs/nameservers, TLD\
|
|
26633
|
+
\ availability, expiry summaries, contact validation summary, and DNS record summaries.\
|
|
26634
|
+
\ Additional sections that require new OpenSearch fields will be added explicitly\
|
|
26635
|
+
\ when those fields are indexed.\n\n### Report Lifecycle\n\nA report transitions\
|
|
26636
|
+
\ through the following statuses:\n\n1. **pending** \u2014 Report has been queued\
|
|
26637
|
+
\ for generation\n2. **generating** \u2014 Report is being built\n3. **completed**\
|
|
26638
|
+
\ \u2014 Report is ready for download\n4. **failed** \u2014 Generation failed\n\
|
|
26639
|
+
\n### Usage Pattern\n\n1. **Request a report** \u2014 `POST /v1/reports` with\
|
|
26640
|
+
\ the desired `report_type`\n2. **Poll for completion** \u2014 `GET /v1/reports/{report_id}`\
|
|
26641
|
+
\ until `status` is `completed`\n3. **Download** \u2014 `GET /v1/reports/{report_id}/download`\
|
|
26642
|
+
\ returns the report as a streamed ZIP file\n\n### Downloading Reports\n\n`GET\
|
|
26643
|
+
\ /v1/reports/{report_id}/download` streams the report file directly to the client.\
|
|
26644
|
+
\ The report **must** have status `completed` before it can be downloaded \u2014\
|
|
26645
|
+
\ calling this endpoint on a report that is still `pending` or `generating` returns\
|
|
26646
|
+
\ `409 Conflict`.\n\n**Response details:**\n\n| Header | Value |\n|--------|-------|\n\
|
|
26647
|
+
| `Content-Type` | `application/zip` |\n| `Content-Disposition` | `attachment;\
|
|
26648
|
+
\ filename={report_type}-{report_id}.zip` |\n| `Content-Length` | File size in\
|
|
26649
|
+
\ bytes (included when known) |\n\nThe response body is streamed in chunks, so\
|
|
26650
|
+
\ clients should read the body incrementally rather than buffering it entirely\
|
|
26651
|
+
\ in memory. When `Content-Length` is present, it can be used to display download\
|
|
26652
|
+
\ progress.\n\n### Trigger Types\n\n| Type | Description |\n|------|-------------|\n\
|
|
26653
|
+
| `on_demand` | Manually requested via the API |\n| `scheduled` | Automatically\
|
|
26654
|
+
\ generated on a recurring schedule |\n\n### Rate Limiting\n\nReport creation\
|
|
26655
|
+
\ is rate-limited at two levels:\n\n- **Cooldown** \u2014 After creating a report,\
|
|
26656
|
+
\ you must wait **5 minutes** before requesting another report of the same type.\
|
|
26657
|
+
\ Requests during the cooldown return `429 Too Many Requests` with a `Retry-After`\
|
|
26658
|
+
\ header.\n- **Hourly limit** \u2014 Only **one report per type per organization\
|
|
26659
|
+
\ per clock hour** (UTC) can be generated. Duplicate requests within the same\
|
|
26660
|
+
\ hour will not produce an additional report.\n\n### Retention\n\nThe **30 most\
|
|
26661
|
+
\ recent reports** of each type are kept per organization. Older reports and their\
|
|
26662
|
+
\ associated files are automatically deleted when a new report is generated.\n\
|
|
26663
|
+
\n### Listing Reports\n\nUse `GET /v1/reports` to list reports with optional filters:\n\
|
|
26664
|
+
\n| Parameter | Description |\n|-----------|-------------|\n| `report_type` |\
|
|
26665
|
+
\ Filter by report type (repeatable) |\n| `status` | Filter by report status (repeatable)\
|
|
26666
|
+
\ |\n| `trigger_type` | Filter by trigger type |\n| `created_after` | Only reports\
|
|
26667
|
+
\ created after this timestamp |\n| `created_before` | Only reports created before\
|
|
26668
|
+
\ this timestamp |\n"
|
|
26629
26669
|
name: report
|
|
26630
26670
|
x-displayName: Reports
|
|
26631
26671
|
- description: Endpoints for creating new Tags
|
package/src/schema.d.ts
CHANGED
|
@@ -3936,6 +3936,8 @@ export interface components {
|
|
|
3936
3936
|
};
|
|
3937
3937
|
/** CreateReportReq */
|
|
3938
3938
|
CreateReportReq: {
|
|
3939
|
+
/** Registrar Credential Id */
|
|
3940
|
+
registrar_credential_id?: TypeId<"registrar_credential"> | null;
|
|
3939
3941
|
/** @default domain_inventory */
|
|
3940
3942
|
report_type: components["schemas"]["ReportType"];
|
|
3941
3943
|
};
|
|
@@ -4364,6 +4366,11 @@ export interface components {
|
|
|
4364
4366
|
* @description The date/time the entry was last updated on
|
|
4365
4367
|
*/
|
|
4366
4368
|
updated_on?: Date;
|
|
4369
|
+
/**
|
|
4370
|
+
* Vanity Nameserver Set Id
|
|
4371
|
+
* @description Vanity NS set whose apex NS + SOA brand this zone, or null when the zone uses the system default nameservers.
|
|
4372
|
+
*/
|
|
4373
|
+
vanity_nameserver_set_id?: TypeId<"vns"> | null;
|
|
4367
4374
|
};
|
|
4368
4375
|
/** DnsZoneRrsetsCreate */
|
|
4369
4376
|
DnsZoneRrsetsCreate: {
|
|
@@ -9005,7 +9012,7 @@ export interface components {
|
|
|
9005
9012
|
* ReportType
|
|
9006
9013
|
* @enum {string}
|
|
9007
9014
|
*/
|
|
9008
|
-
ReportType: "domain_inventory" | "dns_zone_summary" | "dns_zone_records" | "domain_forwards" | "expiring_domains" | "email_forwards" | "billing_transactions" | "billing_transactions_monthly";
|
|
9015
|
+
ReportType: "domain_inventory" | "dns_zone_summary" | "dns_zone_records" | "domain_forwards" | "expiring_domains" | "email_forwards" | "registrar_portfolio_pdf" | "billing_transactions" | "billing_transactions_monthly";
|
|
9009
9016
|
/** RequestHistory */
|
|
9010
9017
|
RequestHistory: {
|
|
9011
9018
|
/**
|