@opusdns/api 0.11.0 → 0.12.1

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 CHANGED
@@ -1,8 +1,65 @@
1
- ### OpusDNS OpenAPI specification and types
1
+ # OpusDNS API Types, Specification and Constants
2
2
 
3
- This repository contains the [OpenAPI specification](https://swagger.io/specification/) for the backend API of [OpusDNS](https://www.opusdns.com/).
3
+ This repository contains the [OpenAPI specification](https://swagger.io/specification/) for the backend API of [OpusDNS](https://www.opusdns.com/) along with generated TypeScript types and constants.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @opusdns/api
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Import the types, constants, and schemas you need directly from the package:
14
+
15
+ ```typescript
16
+ import {
17
+ Domain,
18
+ DOMAIN_AVAILABILITY_STATUS,
19
+ paths,
20
+ operations,
21
+ components,
22
+ GET_Domains_Request,
23
+ POST_Domains_Request_Body,
24
+ ALLOCATION_METHOD_TYPE
25
+ } from '@opusdns/api';
26
+ ```
27
+
28
+ ### Available Exports
29
+
30
+ #### Schema Types
31
+ - `paths` - OpenAPI paths interface
32
+ - `operations` - OpenAPI operations interface
33
+ - `components` - OpenAPI components interface
34
+
35
+ #### Domain Types
36
+ - `Domain` - Domain object type
37
+ - `DomainCreate` - Domain creation type
38
+ - `DomainUpdate` - Domain update type
39
+ - `DomainRenewRequest` - Domain renewal type
40
+
41
+ #### Request/Response Types
42
+ - `GET_Domains_Request` - GET domains request type
43
+ - `POST_Domains_Request_Body` - POST domains request body type
44
+ - `GET_Domains_Response` - GET domains response type
45
+
46
+ #### Constants
47
+ - `DOMAIN_AVAILABILITY_STATUS` - Domain availability status enum
48
+ - `ALLOCATION_METHOD_TYPE` - Allocation method type enum
49
+ - `DOMAIN_STATUS` - Domain status enum
50
+ - `CONTACT_ROLE_TYPE` - Contact role type enum
51
+
52
+ #### DNS Types
53
+ - `DnsZone` - DNS zone type
54
+ - `DnsRecord` - DNS record type
55
+ - `DnsRrset` - DNS RRset type
56
+
57
+ #### Organization Types
58
+ - `Organization` - Organization type
59
+ - `User` - User type
60
+ - `Contact` - Contact type
4
61
 
5
62
  ### Links
6
63
 
7
- - [Main website](https://www.opusdns.com/).
8
- - [Developer docs](https://developers.opusdns.com/).
64
+ - [Main website](https://www.opusdns.com/)
65
+ - [Developer docs](https://developers.opusdns.com/)
package/package.json CHANGED
@@ -8,11 +8,20 @@
8
8
  "typescript": "^5.8.2"
9
9
  },
10
10
  "name": "@opusdns/api",
11
- "version": "0.11.0",
11
+ "version": "0.12.1",
12
12
  "description": "TypeScript types for the OpusDNS OpenAPI specification",
13
- "main": "src/index.d.ts",
14
- "types": "src/index.d.ts",
13
+ "main": "./src/index.ts",
14
+ "module": "./src/index.ts",
15
+ "types": "./src/index.d.ts",
15
16
  "type": "module",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./src/index.d.ts",
20
+ "import": "./src/index.ts"
21
+ },
22
+ "./helpers": "./src/helpers/index.ts",
23
+ "./types": "./src/index.d.ts"
24
+ },
16
25
  "dependencies": {
17
26
  "typeid-js": "^1.2.0"
18
27
  },
@@ -25,13 +34,15 @@
25
34
  "bugs": {
26
35
  "url": "https://github.com/OpusDNS/api-spec/issues"
27
36
  },
28
- "homepage": "https://github.com/OpusDNS/api-spec#readme",
29
37
  "scripts": {
30
38
  "generate:schema": "tsx scripts/generate-schema.ts",
31
39
  "generate:helpers": "tsx scripts/helpers/generate-all.ts"
32
40
  },
41
+ "homepage": "https://github.com/OpusDNS/api-spec#readme",
33
42
  "files": [
34
43
  "package.json",
35
- "src/"
44
+ "src/",
45
+ "README.md",
46
+ "LICENSE"
36
47
  ]
37
48
  }
@@ -14,7 +14,7 @@
14
14
 
15
15
  export * from './keys';
16
16
  export * from './requests';
17
- export * from './schemas';
18
- export * from './schemas-arrays';
19
- export * from './constants';
20
- export * from './responses';
17
+ export * from './schemas.d';
18
+ export * from './schemas-arrays.d';
19
+ export * from './constants.d';
20
+ export * from './responses.d';
@@ -32,9 +32,9 @@
32
32
 
33
33
  import { operations } from '../schema';
34
34
 
35
- import { DomainDnssecDataCreateArray, OrganizationAttributeUpdateArray } from './schemas-arrays';
35
+ import { DomainDnssecDataCreateArray, OrganizationAttributeUpdateArray } from './schemas-arrays.d';
36
36
 
37
- import { OrganizationCredentialExtra, SignupCreate, ContactCreate, DnsZoneCreate, DnsZoneRecordsPatchOps, DnsZoneRrsetsPatchOps, DnsZoneRrsetsCreate, DomainCreate, DomainUpdate, DomainRenewRequest, DomainTransferIn, EmailForwardCreate, EmailForwardBulkDelete, EmailForwardBulkUpdate, EmailForwardUpdate, NotificationCreate, NotificationUpdate, OrganizationCreate, IpRestrictionCreate, IpRestrictionUpdate, OrganizationUpdate, PlanUpdate, UserCreate, TermsOfServiceAccept, UserUpdate, SpiceDbRelationshipUpdate } from './schemas';
37
+ import { OrganizationCredentialExtra, SignupCreate, ContactCreate, DnsZoneCreate, DnsZoneRecordsPatchOps, DnsZoneRrsetsPatchOps, DnsZoneRrsetsCreate, DomainCreate, DomainUpdate, DomainRenewRequest, DomainTransferIn, EmailForwardCreate, EmailForwardBulkDelete, EmailForwardBulkUpdate, EmailForwardUpdate, NotificationCreate, NotificationUpdate, OrganizationCreate, IpRestrictionCreate, IpRestrictionUpdate, OrganizationUpdate, PlanUpdate, UserCreate, TermsOfServiceAccept, UserUpdate, SpiceDbRelationshipUpdate } from './schemas.d';
38
38
 
39
39
  /**
40
40
  * Request type for GET AuthClientCredentials endpoint
@@ -150,6 +150,42 @@ export type DELETE_AuthClientCredentialsApiKeyId_Request = {
150
150
  */
151
151
  export type DELETE_AuthClientCredentialsApiKeyId_Request_Path = DELETE_AuthClientCredentialsApiKeyId_Request['parameters']['path'];
152
152
 
153
+ /**
154
+ * Request type for POST AuthInternalClientCredentials endpoint
155
+ *
156
+ * Issue Opusdns Internal Api Key
157
+ *
158
+ * @remarks
159
+ * This type defines the complete request structure for the POST AuthInternalClientCredentials endpoint.
160
+ * It includes all parameters (query, path) and request body types as defined in the OpenAPI specification.
161
+ * Use this type to ensure type safety when making API requests to this endpoint.
162
+ *
163
+ * @example
164
+ * Use this type to ensure type safety when making API requests to this endpoint.
165
+ *
166
+ * @path /v1/auth/internal_client_credentials
167
+ *
168
+ * @see {@link POST_AuthInternalClientCredentials_Request_Query} - Query parameters type
169
+ * @see {@link POST_AuthInternalClientCredentials_Request_Path} - Path parameters type
170
+ * @see {@link POST_AuthInternalClientCredentials_Request_Body} - Request body type
171
+ */
172
+ export type POST_AuthInternalClientCredentials_Request = {
173
+ requestBody: OrganizationCredentialExtra;
174
+ }
175
+ /**
176
+ * Request body for POST /v1/auth/internal_client_credentials
177
+ *
178
+ * @remarks
179
+ * This type defines the request body structure for the POST /v1/auth/internal_client_credentials endpoint.
180
+ * It provides type safety for the request body as defined in the OpenAPI specification.
181
+ *
182
+ * @example
183
+ * Use this type to ensure type safety for request body structure.
184
+ *
185
+ * @path /v1/auth/internal_client_credentials
186
+ */
187
+ export type POST_AuthInternalClientCredentials_Request_Body = POST_AuthInternalClientCredentials_Request['requestBody'];
188
+
153
189
  /**
154
190
  * Request type for POST AuthLogout endpoint
155
191
  *
@@ -32,9 +32,9 @@
32
32
 
33
33
 
34
34
 
35
- import { DomainDnssecDataArray, OrganizationAttribute2Array, IpRestrictionArray, TldResponseShortArray } from './schemas-arrays';
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';
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';
38
38
 
39
39
  /**
40
40
  * Response types for GET AuthClientCredentials endpoint
@@ -259,6 +259,61 @@ export type DELETE_AuthClientCredentialsByApiKeyId_Response_404 = Problem
259
259
  */
260
260
  export type DELETE_AuthClientCredentialsByApiKeyId_Response_422 = HTTPValidationError
261
261
 
262
+ /**
263
+ * Response types for POST AuthInternalClientCredentials endpoint
264
+ *
265
+ * Issue Opusdns Internal Api Key
266
+ *
267
+ * @remarks
268
+ * This type defines all possible response structures for the POST AuthInternalClientCredentials endpoint.
269
+ * Each response code maps to a specific response type as defined in the OpenAPI specification.
270
+ * Use this type to ensure type safety when handling API responses from this endpoint.
271
+ *
272
+
273
+ *
274
+ * @path /v1/auth/internal_client_credentials
275
+ *
276
+ * @see {@link POST_AuthInternalClientCredentials_Response_200} - 200 response type
277
+ * @see {@link POST_AuthInternalClientCredentials_Response_422} - 422 response type
278
+ *
279
+
280
+ */
281
+ export type POST_AuthInternalClientCredentials_Response = POST_AuthInternalClientCredentials_Response_200 | POST_AuthInternalClientCredentials_Response_422;
282
+
283
+ /**
284
+ * 200 response for POST AuthInternalClientCredentials endpoint
285
+ *
286
+ * @remarks
287
+ * This type defines the response structure for the 200 status code
288
+ * of the POST AuthInternalClientCredentials endpoint.
289
+ * It provides type safety for handling this specific response as defined in the OpenAPI specification.
290
+ *
291
+
292
+ *
293
+ * @path /v1/auth/internal_client_credentials
294
+ *
295
+ * @see {@link POST_AuthInternalClientCredentials_Response} - The main response type definition
296
+ * @see {@link OrganizationCredentialCreated} - The actual schema type definition
297
+ */
298
+ export type POST_AuthInternalClientCredentials_Response_200 = OrganizationCredentialCreated
299
+
300
+ /**
301
+ * 422 response for POST AuthInternalClientCredentials endpoint
302
+ *
303
+ * @remarks
304
+ * This type defines the response structure for the 422 status code
305
+ * of the POST AuthInternalClientCredentials endpoint.
306
+ * It provides type safety for handling this specific response as defined in the OpenAPI specification.
307
+ *
308
+
309
+ *
310
+ * @path /v1/auth/internal_client_credentials
311
+ *
312
+ * @see {@link POST_AuthInternalClientCredentials_Response} - The main response type definition
313
+ * @see {@link HTTPValidationError} - The actual schema type definition
314
+ */
315
+ export type POST_AuthInternalClientCredentials_Response_422 = HTTPValidationError
316
+
262
317
  /**
263
318
  * Response types for POST AuthLogout endpoint
264
319
  *
@@ -21,7 +21,7 @@
21
21
  * This file is auto-generated from the OpenAPI specification.
22
22
  * Do not edit manually.
23
23
  */
24
- import { DomainDnssecData, DomainDnssecDataCreate, OrganizationAttribute, OrganizationAttributeUpdate, IpRestriction, TldResponseShort, BulkOperationResult, PostalAddressType, ContactConfigBase, DnsChange, DnsRecordCreate, DnsRecord, DnsRrsetCreate, DnsRecordPatchOp, DnsRrset, DnsRrsetPatchOp, DomainAvailabilityCheck, Nameserver, DeletePolicyType, SyncOperationType, DomainContact, DomainStatus, DomainSearchSuggestion, DomainClientStatus, EmailForwardBulkUpdateItem, ValidationError, LaunchPhaseBase, LocalPresenceRequirementType, ContactRoleType, OrganizationAttribute2, User, OrganizationAttributeCreate, UserCreate, ContactSchema, DnsZone, Domain, EmailForward, EventResponse, OrganizationCredential, Organization, UserNotificationSummary, Period, Permission, PremiumAffectsType, Relation, TldBase, PostTransferRequirements, UserAttributeUpdate, DomainAvailability } from './schemas';
24
+ import { DomainDnssecData, DomainDnssecDataCreate, OrganizationAttribute, OrganizationAttributeUpdate, IpRestriction, TldResponseShort, BulkOperationResult, PostalAddressType, ContactConfigBase, DnsChange, DnsRecordCreate, DnsRecord, DnsRrsetCreate, DnsRecordPatchOp, DnsRrset, DnsRrsetPatchOp, DomainAvailabilityCheck, Nameserver, DeletePolicyType, SyncOperationType, DomainContact, DomainStatus, DomainSearchSuggestion, DomainClientStatus, EmailForwardBulkUpdateItem, ValidationError, LaunchPhaseBase, LocalPresenceRequirementType, ContactRoleType, OrganizationAttribute2, User, OrganizationAttributeCreate, UserCreate, ContactSchema, DnsZone, Domain, EmailForward, EventResponse, OrganizationCredential, Organization, UserNotificationSummary, Period, Permission, PremiumAffectsType, Relation, TldBase, PostTransferRequirements, UserAttributeUpdate, DomainAvailability } from './schemas.d';
25
25
 
26
26
  /**
27
27
  * DomainDnssecDataResponse
package/src/index.ts ADDED
@@ -0,0 +1,10 @@
1
+ // Runtime exports (constants and keys)
2
+ export * from './helpers/keys';
3
+ export * from './helpers/constants';
4
+
5
+ // Export all types including schema types
6
+ export type * from './helpers/responses.d';
7
+ export type * from './helpers/requests.d';
8
+ export type * from './helpers/schemas.d';
9
+ export type * from './helpers/schemas-arrays.d';
10
+ export type * from './schema.d';
package/src/openapi.yaml CHANGED
@@ -4953,7 +4953,7 @@ info:
4953
4953
  '
4954
4954
  summary: OpusDNS - your gateway to a seamless domain management experience.
4955
4955
  title: OpusDNS API
4956
- version: 2025-07-31-173148
4956
+ version: 2025-07-31-235405
4957
4957
  x-logo:
4958
4958
  altText: OpusDNS API Reference
4959
4959
  url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
@@ -5113,6 +5113,33 @@ paths:
5113
5113
  summary: Delete Api Key
5114
5114
  tags:
5115
5115
  - authentication
5116
+ /v1/auth/internal_client_credentials:
5117
+ post:
5118
+ operationId: issue_opusdns_internal_api_key_v1_auth_internal_client_credentials_post
5119
+ requestBody:
5120
+ content:
5121
+ application/json:
5122
+ schema:
5123
+ $ref: '#/components/schemas/OrganizationCredentialExtra'
5124
+ required: true
5125
+ responses:
5126
+ '200':
5127
+ content:
5128
+ application/json:
5129
+ schema:
5130
+ $ref: '#/components/schemas/OrganizationCredentialCreated'
5131
+ description: Successful Response
5132
+ '422':
5133
+ content:
5134
+ application/problem+json:
5135
+ schema:
5136
+ $ref: '#/components/schemas/HTTPValidationError'
5137
+ description: Validation Error
5138
+ security:
5139
+ - OAuth2PasswordBearer: []
5140
+ summary: Issue Opusdns Internal Api Key
5141
+ tags:
5142
+ - authentication
5116
5143
  /v1/auth/logout:
5117
5144
  post:
5118
5145
  operationId: logout_v1_auth_logout_post
package/src/schema.d.ts CHANGED
@@ -35,6 +35,23 @@ export interface paths {
35
35
  patch?: never;
36
36
  trace?: never;
37
37
  };
38
+ "/v1/auth/internal_client_credentials": {
39
+ parameters: {
40
+ query?: never;
41
+ header?: never;
42
+ path?: never;
43
+ cookie?: never;
44
+ };
45
+ get?: never;
46
+ put?: never;
47
+ /** Issue Opusdns Internal Api Key */
48
+ post: operations["issue_opusdns_internal_api_key_v1_auth_internal_client_credentials_post"];
49
+ delete?: never;
50
+ options?: never;
51
+ head?: never;
52
+ patch?: never;
53
+ trace?: never;
54
+ };
38
55
  "/v1/auth/logout": {
39
56
  parameters: {
40
57
  query?: never;
@@ -4419,6 +4436,39 @@ export interface operations {
4419
4436
  };
4420
4437
  };
4421
4438
  };
4439
+ issue_opusdns_internal_api_key_v1_auth_internal_client_credentials_post: {
4440
+ parameters: {
4441
+ query?: never;
4442
+ header?: never;
4443
+ path?: never;
4444
+ cookie?: never;
4445
+ };
4446
+ requestBody: {
4447
+ content: {
4448
+ "application/json": components["schemas"]["OrganizationCredentialExtra"];
4449
+ };
4450
+ };
4451
+ responses: {
4452
+ /** @description Successful Response */
4453
+ 200: {
4454
+ headers: {
4455
+ [name: string]: unknown;
4456
+ };
4457
+ content: {
4458
+ "application/json": components["schemas"]["OrganizationCredentialCreated"];
4459
+ };
4460
+ };
4461
+ /** @description Validation Error */
4462
+ 422: {
4463
+ headers: {
4464
+ [name: string]: unknown;
4465
+ };
4466
+ content: {
4467
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
4468
+ };
4469
+ };
4470
+ };
4471
+ };
4422
4472
  logout_v1_auth_logout_post: {
4423
4473
  parameters: {
4424
4474
  query?: never;
@@ -7,5 +7,4 @@
7
7
 
8
8
  export * from './constants';
9
9
  export * from './keys';
10
- export * from './paths';
11
10
  export * from './types';
@@ -3,7 +3,7 @@
3
3
  * All types have moved to the helpers directory (see src/helpers/schemas.ts and related files). Please update your imports.
4
4
  */
5
5
 
6
- import { components, operations } from '../schema';
6
+ import type { components, operations } from '../schema.d.ts';
7
7
 
8
8
 
9
9
  /**
package/src/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './helpers';
2
- export * from './schema';
File without changes