@opusdns/api 1.12.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 +2 -0
- package/src/openapi.yaml +73 -45
- package/src/schema.d.ts +3 -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
|
|
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
|
|
@@ -9989,6 +9999,7 @@ components:
|
|
|
9989
9999
|
- domain_forwards
|
|
9990
10000
|
- expiring_domains
|
|
9991
10001
|
- email_forwards
|
|
10002
|
+
- registrar_portfolio_pdf
|
|
9992
10003
|
- billing_transactions
|
|
9993
10004
|
- billing_transactions_monthly
|
|
9994
10005
|
title: ReportType
|
|
@@ -12001,7 +12012,7 @@ info:
|
|
|
12001
12012
|
\n\n"
|
|
12002
12013
|
summary: OpusDNS - your gateway to a seamless domain management experience.
|
|
12003
12014
|
title: OpusDNS API
|
|
12004
|
-
version: 2026-06-
|
|
12015
|
+
version: 2026-06-12-154603
|
|
12005
12016
|
x-logo:
|
|
12006
12017
|
altText: OpusDNS API Reference
|
|
12007
12018
|
url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
|
|
@@ -26594,50 +26605,67 @@ tags:
|
|
|
26594
26605
|
\ | Summary of all DNS zones and their configuration |\n| `dns_zone_records` |\
|
|
26595
26606
|
\ Detailed export of all DNS records across zones |\n| `billing_transactions`\
|
|
26596
26607
|
\ | Billing transactions for the current month to date |\n| `billing_transactions_monthly`\
|
|
26597
|
-
\ | Billing transactions for the previous calendar month |\n
|
|
26598
|
-
\
|
|
26599
|
-
\
|
|
26600
|
-
\
|
|
26601
|
-
\
|
|
26602
|
-
|
|
26603
|
-
\ the
|
|
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
|
-
\ \
|
|
26629
|
-
\
|
|
26630
|
-
\
|
|
26631
|
-
\
|
|
26632
|
-
\
|
|
26633
|
-
\
|
|
26634
|
-
\
|
|
26635
|
-
\
|
|
26636
|
-
|
|
26637
|
-
|
|
26638
|
-
\
|
|
26639
|
-
|
|
26640
|
-
\
|
|
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"
|
|
26641
26669
|
name: report
|
|
26642
26670
|
x-displayName: Reports
|
|
26643
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
|
};
|
|
@@ -9010,7 +9012,7 @@ export interface components {
|
|
|
9010
9012
|
* ReportType
|
|
9011
9013
|
* @enum {string}
|
|
9012
9014
|
*/
|
|
9013
|
-
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";
|
|
9014
9016
|
/** RequestHistory */
|
|
9015
9017
|
RequestHistory: {
|
|
9016
9018
|
/**
|