@opusdns/api 0.12.1 → 0.14.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/keys.ts +79 -0
- package/src/helpers/requests.d.ts +22 -0
- package/src/helpers/responses.d.ts +38 -1
- package/src/helpers/schemas.d.ts +16 -0
- package/src/openapi.yaml +58 -1
- package/src/schema.d.ts +55 -0
package/package.json
CHANGED
package/src/helpers/keys.ts
CHANGED
|
@@ -59,6 +59,7 @@ import { DnsZoneRecordsPatchOps } from './schemas';
|
|
|
59
59
|
import { DnsZone } from './schemas';
|
|
60
60
|
import { DnsZoneRrsetsCreate } from './schemas';
|
|
61
61
|
import { DnsZoneRrsetsPatchOps } from './schemas';
|
|
62
|
+
import { DnsZoneSummary } from './schemas';
|
|
62
63
|
import { DomainAvailability } from './schemas';
|
|
63
64
|
import { DomainAvailabilityMeta } from './schemas';
|
|
64
65
|
import { DomainCheck } from './schemas';
|
|
@@ -4589,6 +4590,84 @@ export const KEYS_DNS_ZONE_RRSETS_PATCH_OPS = [
|
|
|
4589
4590
|
KEY_DNS_ZONE_RRSETS_PATCH_OPS_OPS,
|
|
4590
4591
|
] as const satisfies (keyof DnsZoneRrsetsPatchOps)[];
|
|
4591
4592
|
|
|
4593
|
+
/**
|
|
4594
|
+
* Total Zones
|
|
4595
|
+
*
|
|
4596
|
+
* Total number of DNS zones
|
|
4597
|
+
*
|
|
4598
|
+
* @type {integer}
|
|
4599
|
+
*
|
|
4600
|
+
*
|
|
4601
|
+
* @remarks
|
|
4602
|
+
* This key constant provides type-safe access to the `total_zones` property of DnsZoneSummary objects.
|
|
4603
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
4604
|
+
*
|
|
4605
|
+
* @example
|
|
4606
|
+
* ```typescript
|
|
4607
|
+
* // Direct property access
|
|
4608
|
+
* const value = dnszonesummary[KEY_DNS_ZONE_SUMMARY_TOTAL_ZONES];
|
|
4609
|
+
*
|
|
4610
|
+
* // Dynamic property access
|
|
4611
|
+
* const propertyName = KEY_DNS_ZONE_SUMMARY_TOTAL_ZONES;
|
|
4612
|
+
* const value = dnszonesummary[propertyName];
|
|
4613
|
+
* ```
|
|
4614
|
+
*
|
|
4615
|
+
* @see {@link DnsZoneSummary} - The TypeScript type definition
|
|
4616
|
+
* @see {@link KEYS_DNS_ZONE_SUMMARY} - Array of all keys for this type
|
|
4617
|
+
*/
|
|
4618
|
+
export const KEY_DNS_ZONE_SUMMARY_TOTAL_ZONES = 'total_zones' as keyof DnsZoneSummary;
|
|
4619
|
+
/**
|
|
4620
|
+
* Zones By Dnssec
|
|
4621
|
+
*
|
|
4622
|
+
* Count of zones by DNSSEC status
|
|
4623
|
+
*
|
|
4624
|
+
* @type {object}
|
|
4625
|
+
*
|
|
4626
|
+
*
|
|
4627
|
+
* @remarks
|
|
4628
|
+
* This key constant provides type-safe access to the `zones_by_dnssec` property of DnsZoneSummary objects.
|
|
4629
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
4630
|
+
*
|
|
4631
|
+
* @example
|
|
4632
|
+
* ```typescript
|
|
4633
|
+
* // Direct property access
|
|
4634
|
+
* const value = dnszonesummary[KEY_DNS_ZONE_SUMMARY_ZONES_BY_DNSSEC];
|
|
4635
|
+
*
|
|
4636
|
+
* // Dynamic property access
|
|
4637
|
+
* const propertyName = KEY_DNS_ZONE_SUMMARY_ZONES_BY_DNSSEC;
|
|
4638
|
+
* const value = dnszonesummary[propertyName];
|
|
4639
|
+
* ```
|
|
4640
|
+
*
|
|
4641
|
+
* @see {@link DnsZoneSummary} - The TypeScript type definition
|
|
4642
|
+
* @see {@link KEYS_DNS_ZONE_SUMMARY} - Array of all keys for this type
|
|
4643
|
+
*/
|
|
4644
|
+
export const KEY_DNS_ZONE_SUMMARY_ZONES_BY_DNSSEC = 'zones_by_dnssec' as keyof DnsZoneSummary;
|
|
4645
|
+
|
|
4646
|
+
/**
|
|
4647
|
+
* Array of all DnsZoneSummary property keys
|
|
4648
|
+
*
|
|
4649
|
+
* @remarks
|
|
4650
|
+
* This constant provides a readonly array containing all valid property keys for DnsZoneSummary objects.
|
|
4651
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
4652
|
+
*
|
|
4653
|
+
* @example
|
|
4654
|
+
* ```typescript
|
|
4655
|
+
* // Iterating through all keys
|
|
4656
|
+
* for (const key of KEYS_DNS_ZONE_SUMMARY) {
|
|
4657
|
+
* console.log(`Property: ${key}, Value: ${dnszonesummary[key]}`);
|
|
4658
|
+
* }
|
|
4659
|
+
*
|
|
4660
|
+
* // Validation
|
|
4661
|
+
* const isValidKey = KEYS_DNS_ZONE_SUMMARY.includes(someKey);
|
|
4662
|
+
* ```
|
|
4663
|
+
*
|
|
4664
|
+
* @see {@link DnsZoneSummary} - The TypeScript type definition
|
|
4665
|
+
*/
|
|
4666
|
+
export const KEYS_DNS_ZONE_SUMMARY = [
|
|
4667
|
+
KEY_DNS_ZONE_SUMMARY_TOTAL_ZONES,
|
|
4668
|
+
KEY_DNS_ZONE_SUMMARY_ZONES_BY_DNSSEC,
|
|
4669
|
+
] as const satisfies (keyof DnsZoneSummary)[];
|
|
4670
|
+
|
|
4592
4671
|
/**
|
|
4593
4672
|
* Domain
|
|
4594
4673
|
*
|
|
@@ -884,6 +884,28 @@ export type POST_Dns_Request = {
|
|
|
884
884
|
*/
|
|
885
885
|
export type POST_Dns_Request_Body = POST_Dns_Request['requestBody'];
|
|
886
886
|
|
|
887
|
+
/**
|
|
888
|
+
* Request type for GET DnsSummary endpoint
|
|
889
|
+
*
|
|
890
|
+
* Get Zones Summary
|
|
891
|
+
*
|
|
892
|
+
* @remarks
|
|
893
|
+
* This type defines the complete request structure for the GET DnsSummary endpoint.
|
|
894
|
+
* It includes all parameters (query, path) and request body types as defined in the OpenAPI specification.
|
|
895
|
+
* Use this type to ensure type safety when making API requests to this endpoint.
|
|
896
|
+
*
|
|
897
|
+
* @example
|
|
898
|
+
* Use this type to ensure type safety when making API requests to this endpoint.
|
|
899
|
+
*
|
|
900
|
+
* @path /v1/dns/summary
|
|
901
|
+
*
|
|
902
|
+
* @see {@link GET_DnsSummary_Request_Query} - Query parameters type
|
|
903
|
+
* @see {@link GET_DnsSummary_Request_Path} - Path parameters type
|
|
904
|
+
* @see {@link GET_DnsSummary_Request_Body} - Request body type
|
|
905
|
+
*/
|
|
906
|
+
export type GET_DnsSummary_Request = {
|
|
907
|
+
}
|
|
908
|
+
|
|
887
909
|
/**
|
|
888
910
|
* Request type for DELETE DnsZoneName endpoint
|
|
889
911
|
*
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
import { DomainDnssecDataArray, OrganizationAttribute2Array, IpRestrictionArray, TldResponseShortArray } from './schemas-arrays.d';
|
|
36
36
|
|
|
37
|
-
import { Pagination_OrganizationCredential, Problem, HTTPValidationError, OrganizationCredentialCreated, DomainAvailabilityList, Pagination_ContactSchema, ContactSchema, ContactVerification, Contact, Pagination_DnsZone, DnsZone, DnsChanges, DomainSearch, Pagination_Domain, Domain, DomainRenew, DomainCheck, DomainSummary, Pagination_EmailForward, EmailForward, EmailForwardBulkDeleteResult, EmailForwardBulkUpdateResult, Pagination_Event, EventSchema, Pagination_UserNotificationSummary, Notification, UserNotification, Pagination_Organization, Organization, OrganizationWithPlan, IpRestriction, Pagination_User, TldSpecification, User, UserWithAttributes, PermissionSet, RelationSet, UserWithRelationPermissions } from './schemas.d';
|
|
37
|
+
import { Pagination_OrganizationCredential, Problem, HTTPValidationError, OrganizationCredentialCreated, DomainAvailabilityList, Pagination_ContactSchema, ContactSchema, ContactVerification, Contact, Pagination_DnsZone, DnsZone, DnsChanges, DnsZoneSummary, DomainSearch, Pagination_Domain, Domain, DomainRenew, DomainCheck, DomainSummary, Pagination_EmailForward, EmailForward, EmailForwardBulkDeleteResult, EmailForwardBulkUpdateResult, Pagination_Event, EventSchema, Pagination_UserNotificationSummary, Notification, UserNotification, Pagination_Organization, Organization, OrganizationWithPlan, IpRestriction, Pagination_User, TldSpecification, User, UserWithAttributes, PermissionSet, RelationSet, UserWithRelationPermissions } from './schemas.d';
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Response types for GET AuthClientCredentials endpoint
|
|
@@ -1925,6 +1925,43 @@ export type PUT_DnsByZoneNameRrsets_Response = PUT_DnsByZoneNameRrsets_Response_
|
|
|
1925
1925
|
*/
|
|
1926
1926
|
export type PUT_DnsByZoneNameRrsets_Response_422 = HTTPValidationError
|
|
1927
1927
|
|
|
1928
|
+
/**
|
|
1929
|
+
* Response types for GET DnsSummary endpoint
|
|
1930
|
+
*
|
|
1931
|
+
* Get Zones Summary
|
|
1932
|
+
*
|
|
1933
|
+
* @remarks
|
|
1934
|
+
* This type defines all possible response structures for the GET DnsSummary endpoint.
|
|
1935
|
+
* Each response code maps to a specific response type as defined in the OpenAPI specification.
|
|
1936
|
+
* Use this type to ensure type safety when handling API responses from this endpoint.
|
|
1937
|
+
*
|
|
1938
|
+
|
|
1939
|
+
*
|
|
1940
|
+
* @path /v1/dns/summary
|
|
1941
|
+
*
|
|
1942
|
+
* @see {@link GET_DnsSummary_Response_200} - 200 response type
|
|
1943
|
+
*
|
|
1944
|
+
|
|
1945
|
+
*/
|
|
1946
|
+
export type GET_DnsSummary_Response = GET_DnsSummary_Response_200;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* 200 response for GET DnsSummary endpoint
|
|
1950
|
+
*
|
|
1951
|
+
* @remarks
|
|
1952
|
+
* This type defines the response structure for the 200 status code
|
|
1953
|
+
* of the GET DnsSummary endpoint.
|
|
1954
|
+
* It provides type safety for handling this specific response as defined in the OpenAPI specification.
|
|
1955
|
+
*
|
|
1956
|
+
|
|
1957
|
+
*
|
|
1958
|
+
* @path /v1/dns/summary
|
|
1959
|
+
*
|
|
1960
|
+
* @see {@link GET_DnsSummary_Response} - The main response type definition
|
|
1961
|
+
* @see {@link DnsZoneSummary} - The actual schema type definition
|
|
1962
|
+
*/
|
|
1963
|
+
export type GET_DnsSummary_Response_200 = DnsZoneSummary
|
|
1964
|
+
|
|
1928
1965
|
/**
|
|
1929
1966
|
* Response types for GET DomainSearchSuggest endpoint
|
|
1930
1967
|
*
|
package/src/helpers/schemas.d.ts
CHANGED
|
@@ -650,6 +650,22 @@ export type DnsZoneRrsetsCreate = components['schemas']['DnsZoneRrsetsCreate'];
|
|
|
650
650
|
* @see {@link components} - The OpenAPI components schema definition
|
|
651
651
|
*/
|
|
652
652
|
export type DnsZoneRrsetsPatchOps = components['schemas']['DnsZoneRrsetsPatchOps'];
|
|
653
|
+
/**
|
|
654
|
+
* DnsZoneSummary
|
|
655
|
+
*
|
|
656
|
+
* @remarks
|
|
657
|
+
* Type alias for the `DnsZoneSummary` OpenAPI schema.
|
|
658
|
+
* This type represents dnszonesummary data structures used in API requests and responses.
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```typescript
|
|
662
|
+
* const response = await api.getDnsZoneSummary();
|
|
663
|
+
* const item: DnsZoneSummary = response.results;
|
|
664
|
+
* ```
|
|
665
|
+
*
|
|
666
|
+
* @see {@link components} - The OpenAPI components schema definition
|
|
667
|
+
*/
|
|
668
|
+
export type DnsZoneSummary = components['schemas']['DnsZoneSummary'];
|
|
653
669
|
/**
|
|
654
670
|
* DnssecAlgorithm
|
|
655
671
|
*
|
package/src/openapi.yaml
CHANGED
|
@@ -1030,6 +1030,24 @@ components:
|
|
|
1030
1030
|
- ops
|
|
1031
1031
|
title: DnsZoneRrsetsPatchOps
|
|
1032
1032
|
type: object
|
|
1033
|
+
DnsZoneSummary:
|
|
1034
|
+
properties:
|
|
1035
|
+
total_zones:
|
|
1036
|
+
description: Total number of DNS zones
|
|
1037
|
+
title: Total Zones
|
|
1038
|
+
type: integer
|
|
1039
|
+
zones_by_dnssec:
|
|
1040
|
+
additionalProperties:
|
|
1041
|
+
type: integer
|
|
1042
|
+
description: Count of zones by DNSSEC status
|
|
1043
|
+
propertyNames:
|
|
1044
|
+
$ref: '#/components/schemas/DnssecStatus'
|
|
1045
|
+
title: Zones By Dnssec
|
|
1046
|
+
type: object
|
|
1047
|
+
required:
|
|
1048
|
+
- total_zones
|
|
1049
|
+
title: DnsZoneSummary
|
|
1050
|
+
type: object
|
|
1033
1051
|
DnssecAlgorithm:
|
|
1034
1052
|
enum:
|
|
1035
1053
|
- 1
|
|
@@ -4953,7 +4971,7 @@ info:
|
|
|
4953
4971
|
'
|
|
4954
4972
|
summary: OpusDNS - your gateway to a seamless domain management experience.
|
|
4955
4973
|
title: OpusDNS API
|
|
4956
|
-
version: 2025-
|
|
4974
|
+
version: 2025-08-01-144457
|
|
4957
4975
|
x-logo:
|
|
4958
4976
|
altText: OpusDNS API Reference
|
|
4959
4977
|
url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
|
|
@@ -6229,6 +6247,21 @@ paths:
|
|
|
6229
6247
|
summary: Create Zone
|
|
6230
6248
|
tags:
|
|
6231
6249
|
- dns
|
|
6250
|
+
/v1/dns/summary:
|
|
6251
|
+
get:
|
|
6252
|
+
operationId: get_zones_summary_v1_dns_summary_get
|
|
6253
|
+
responses:
|
|
6254
|
+
'200':
|
|
6255
|
+
content:
|
|
6256
|
+
application/json:
|
|
6257
|
+
schema:
|
|
6258
|
+
$ref: '#/components/schemas/DnsZoneSummary'
|
|
6259
|
+
description: Successful Response
|
|
6260
|
+
security:
|
|
6261
|
+
- OAuth2PasswordBearer: []
|
|
6262
|
+
summary: Get Zones Summary
|
|
6263
|
+
tags:
|
|
6264
|
+
- dns
|
|
6232
6265
|
/v1/dns/{zone_name}:
|
|
6233
6266
|
delete:
|
|
6234
6267
|
operationId: delete_zone_v1_dns__zone_name__delete
|
|
@@ -6670,6 +6703,30 @@ paths:
|
|
|
6670
6703
|
type: string
|
|
6671
6704
|
- type: 'null'
|
|
6672
6705
|
title: Expires Before
|
|
6706
|
+
- in: query
|
|
6707
|
+
name: expires_in_30_days
|
|
6708
|
+
required: false
|
|
6709
|
+
schema:
|
|
6710
|
+
anyOf:
|
|
6711
|
+
- type: boolean
|
|
6712
|
+
- type: 'null'
|
|
6713
|
+
title: Expires In 30 Days
|
|
6714
|
+
- in: query
|
|
6715
|
+
name: expires_in_60_days
|
|
6716
|
+
required: false
|
|
6717
|
+
schema:
|
|
6718
|
+
anyOf:
|
|
6719
|
+
- type: boolean
|
|
6720
|
+
- type: 'null'
|
|
6721
|
+
title: Expires In 60 Days
|
|
6722
|
+
- in: query
|
|
6723
|
+
name: expires_in_90_days
|
|
6724
|
+
required: false
|
|
6725
|
+
schema:
|
|
6726
|
+
anyOf:
|
|
6727
|
+
- type: boolean
|
|
6728
|
+
- type: 'null'
|
|
6729
|
+
title: Expires In 90 Days
|
|
6673
6730
|
- in: query
|
|
6674
6731
|
name: registered_after
|
|
6675
6732
|
required: false
|
package/src/schema.d.ts
CHANGED
|
@@ -282,6 +282,23 @@ export interface paths {
|
|
|
282
282
|
patch?: never;
|
|
283
283
|
trace?: never;
|
|
284
284
|
};
|
|
285
|
+
"/v1/dns/summary": {
|
|
286
|
+
parameters: {
|
|
287
|
+
query?: never;
|
|
288
|
+
header?: never;
|
|
289
|
+
path?: never;
|
|
290
|
+
cookie?: never;
|
|
291
|
+
};
|
|
292
|
+
/** Get Zones Summary */
|
|
293
|
+
get: operations["get_zones_summary_v1_dns_summary_get"];
|
|
294
|
+
put?: never;
|
|
295
|
+
post?: never;
|
|
296
|
+
delete?: never;
|
|
297
|
+
options?: never;
|
|
298
|
+
head?: never;
|
|
299
|
+
patch?: never;
|
|
300
|
+
trace?: never;
|
|
301
|
+
};
|
|
285
302
|
"/v1/dns/{zone_name}": {
|
|
286
303
|
parameters: {
|
|
287
304
|
query?: never;
|
|
@@ -1740,6 +1757,21 @@ export interface components {
|
|
|
1740
1757
|
/** Ops */
|
|
1741
1758
|
ops: components["schemas"]["DnsRrsetPatchOp"][];
|
|
1742
1759
|
};
|
|
1760
|
+
/** DnsZoneSummary */
|
|
1761
|
+
DnsZoneSummary: {
|
|
1762
|
+
/**
|
|
1763
|
+
* Total Zones
|
|
1764
|
+
* @description Total number of DNS zones
|
|
1765
|
+
*/
|
|
1766
|
+
total_zones: number;
|
|
1767
|
+
/**
|
|
1768
|
+
* Zones By Dnssec
|
|
1769
|
+
* @description Count of zones by DNSSEC status
|
|
1770
|
+
*/
|
|
1771
|
+
zones_by_dnssec?: {
|
|
1772
|
+
[key: string]: number;
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1743
1775
|
/**
|
|
1744
1776
|
* DnssecAlgorithm
|
|
1745
1777
|
* @enum {integer}
|
|
@@ -5483,6 +5515,26 @@ export interface operations {
|
|
|
5483
5515
|
};
|
|
5484
5516
|
};
|
|
5485
5517
|
};
|
|
5518
|
+
get_zones_summary_v1_dns_summary_get: {
|
|
5519
|
+
parameters: {
|
|
5520
|
+
query?: never;
|
|
5521
|
+
header?: never;
|
|
5522
|
+
path?: never;
|
|
5523
|
+
cookie?: never;
|
|
5524
|
+
};
|
|
5525
|
+
requestBody?: never;
|
|
5526
|
+
responses: {
|
|
5527
|
+
/** @description Successful Response */
|
|
5528
|
+
200: {
|
|
5529
|
+
headers: {
|
|
5530
|
+
[name: string]: unknown;
|
|
5531
|
+
};
|
|
5532
|
+
content: {
|
|
5533
|
+
"application/json": components["schemas"]["DnsZoneSummary"];
|
|
5534
|
+
};
|
|
5535
|
+
};
|
|
5536
|
+
};
|
|
5537
|
+
};
|
|
5486
5538
|
get_zone_v1_dns__zone_name__get: {
|
|
5487
5539
|
parameters: {
|
|
5488
5540
|
query?: never;
|
|
@@ -5801,6 +5853,9 @@ export interface operations {
|
|
|
5801
5853
|
updated_before?: Date | null;
|
|
5802
5854
|
expires_after?: Date | null;
|
|
5803
5855
|
expires_before?: Date | null;
|
|
5856
|
+
expires_in_30_days?: boolean | null;
|
|
5857
|
+
expires_in_60_days?: boolean | null;
|
|
5858
|
+
expires_in_90_days?: boolean | null;
|
|
5804
5859
|
registered_after?: Date | null;
|
|
5805
5860
|
registered_before?: Date | null;
|
|
5806
5861
|
};
|