@opusdns/api 1.6.0 → 1.7.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 +19 -0
- package/src/helpers/keys.ts +7 -0
- package/src/helpers/requests.d.ts +2 -2
- package/src/helpers/responses.d.ts +2 -1
- package/src/helpers/schemas.d.ts +2 -0
- package/src/openapi.yaml +32 -3
- package/src/schema.d.ts +27 -2
package/package.json
CHANGED
package/src/helpers/constants.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AllocationMethodType,
|
|
3
|
+
AssignablePublicRole,
|
|
3
4
|
AttributeType,
|
|
4
5
|
BatchSortField,
|
|
5
6
|
BatchStatus,
|
|
@@ -118,6 +119,22 @@ export const ALLOCATION_METHOD_TYPE_VALUES = [
|
|
|
118
119
|
'lottery',
|
|
119
120
|
] as const satisfies ReadonlyArray<AllocationMethodType>;
|
|
120
121
|
|
|
122
|
+
export const ASSIGNABLE_PUBLIC_ROLE = {
|
|
123
|
+
ADMIN: "admin",
|
|
124
|
+
VIEWER: "viewer",
|
|
125
|
+
DOMAIN_MANAGER: "domain_manager",
|
|
126
|
+
DNS_MANAGER: "dns_manager",
|
|
127
|
+
BILLING_MANAGER: "billing_manager",
|
|
128
|
+
} as const satisfies Record<string, AssignablePublicRole>;
|
|
129
|
+
|
|
130
|
+
export const ASSIGNABLE_PUBLIC_ROLE_VALUES = [
|
|
131
|
+
'admin',
|
|
132
|
+
'viewer',
|
|
133
|
+
'domain_manager',
|
|
134
|
+
'dns_manager',
|
|
135
|
+
'billing_manager',
|
|
136
|
+
] as const satisfies ReadonlyArray<AssignablePublicRole>;
|
|
137
|
+
|
|
121
138
|
export const ATTRIBUTE_TYPE = {
|
|
122
139
|
ENUM: "enum",
|
|
123
140
|
STRING: "string",
|
|
@@ -1355,6 +1372,7 @@ export const PUBLIC_RESOURCE_VALUES = [
|
|
|
1355
1372
|
] as const satisfies ReadonlyArray<PublicResource>;
|
|
1356
1373
|
|
|
1357
1374
|
export const PUBLIC_ROLE = {
|
|
1375
|
+
OWNER: "owner",
|
|
1358
1376
|
ADMIN: "admin",
|
|
1359
1377
|
VIEWER: "viewer",
|
|
1360
1378
|
DOMAIN_MANAGER: "domain_manager",
|
|
@@ -1363,6 +1381,7 @@ export const PUBLIC_ROLE = {
|
|
|
1363
1381
|
} as const satisfies Record<string, PublicRole>;
|
|
1364
1382
|
|
|
1365
1383
|
export const PUBLIC_ROLE_VALUES = [
|
|
1384
|
+
'owner',
|
|
1366
1385
|
'admin',
|
|
1367
1386
|
'viewer',
|
|
1368
1387
|
'domain_manager',
|
package/src/helpers/keys.ts
CHANGED
|
@@ -265,6 +265,7 @@ import type {
|
|
|
265
265
|
PublicReportListRes,
|
|
266
266
|
PublicReportRes,
|
|
267
267
|
PublicRoleAssignment,
|
|
268
|
+
PublicRoleAssignmentRequest,
|
|
268
269
|
RdapBase,
|
|
269
270
|
ReferrerStatsBucket,
|
|
270
271
|
RegistryLockBase,
|
|
@@ -3725,6 +3726,12 @@ export const KEYS_PUBLIC_ROLE_ASSIGNMENT = [
|
|
|
3725
3726
|
KEY_PUBLIC_ROLE_ASSIGNMENT_ROLE,
|
|
3726
3727
|
] as const satisfies (keyof PublicRoleAssignment)[];
|
|
3727
3728
|
|
|
3729
|
+
export const KEY_PUBLIC_ROLE_ASSIGNMENT_REQUEST_ROLE = 'role' satisfies keyof PublicRoleAssignmentRequest;
|
|
3730
|
+
|
|
3731
|
+
export const KEYS_PUBLIC_ROLE_ASSIGNMENT_REQUEST = [
|
|
3732
|
+
KEY_PUBLIC_ROLE_ASSIGNMENT_REQUEST_ROLE,
|
|
3733
|
+
] as const satisfies (keyof PublicRoleAssignmentRequest)[];
|
|
3734
|
+
|
|
3728
3735
|
export const KEY_RDAP_BASE_RDAP_SERVER = 'rdap_server' satisfies keyof RdapBase;
|
|
3729
3736
|
|
|
3730
3737
|
export const KEYS_RDAP_BASE = [
|
|
@@ -42,7 +42,7 @@ import type {
|
|
|
42
42
|
ParkingSignupRequest,
|
|
43
43
|
PasswordUpdate,
|
|
44
44
|
PublicAuthRequestForm,
|
|
45
|
-
|
|
45
|
+
PublicRoleAssignmentRequest,
|
|
46
46
|
TagCreate,
|
|
47
47
|
TagUpdate,
|
|
48
48
|
UserCreate,
|
|
@@ -953,7 +953,7 @@ export type GET_UsersByUserIdRole_Request_Path = GET_UsersByUserIdRole_Request['
|
|
|
953
953
|
|
|
954
954
|
export type PUT_UsersByUserIdRole_Request = {
|
|
955
955
|
parameters: operations['set_user_role_v1_users__user_id__role_put']['parameters'];
|
|
956
|
-
requestBody:
|
|
956
|
+
requestBody: PublicRoleAssignmentRequest;
|
|
957
957
|
};
|
|
958
958
|
export type PUT_UsersByUserIdRole_Request_Path = PUT_UsersByUserIdRole_Request['parameters']['path'];
|
|
959
959
|
export type PUT_UsersByUserIdRole_Request_Body = PUT_UsersByUserIdRole_Request['requestBody'];
|
|
@@ -1197,7 +1197,8 @@ export type PUT_EmailForwardsByEmailForwardIdAliasesByAliasId_Response_403 = Pro
|
|
|
1197
1197
|
export type PUT_EmailForwardsByEmailForwardIdAliasesByAliasId_Response_404 = Problem;
|
|
1198
1198
|
export type PUT_EmailForwardsByEmailForwardIdAliasesByAliasId_Response_422 = HTTPValidationError;
|
|
1199
1199
|
|
|
1200
|
-
export type PUT_UsersByUserIdRole_Response = PUT_UsersByUserIdRole_Response_200 | PUT_UsersByUserIdRole_Response_422;
|
|
1200
|
+
export type PUT_UsersByUserIdRole_Response = PUT_UsersByUserIdRole_Response_200 | PUT_UsersByUserIdRole_Response_403 | PUT_UsersByUserIdRole_Response_422;
|
|
1201
1201
|
|
|
1202
1202
|
export type PUT_UsersByUserIdRole_Response_200 = PublicRoleAssignment;
|
|
1203
|
+
export type PUT_UsersByUserIdRole_Response_403 = Problem;
|
|
1203
1204
|
export type PUT_UsersByUserIdRole_Response_422 = HTTPValidationError;
|
package/src/helpers/schemas.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { components } from '../schema';
|
|
|
2
2
|
|
|
3
3
|
export type AllocationMethodType = components['schemas']['AllocationMethodType'];
|
|
4
4
|
export type AllowedNumberOfNameserverBase = components['schemas']['AllowedNumberOfNameserverBase'];
|
|
5
|
+
export type AssignablePublicRole = components['schemas']['AssignablePublicRole'];
|
|
5
6
|
export type AttributeCondition = components['schemas']['AttributeCondition'];
|
|
6
7
|
export type AttributeType = components['schemas']['AttributeType'];
|
|
7
8
|
export type BatchSortField = components['schemas']['BatchSortField'];
|
|
@@ -370,6 +371,7 @@ export type PublicReportRes = components['schemas']['PublicReportRes'];
|
|
|
370
371
|
export type PublicResource = components['schemas']['PublicResource'];
|
|
371
372
|
export type PublicRole = components['schemas']['PublicRole'];
|
|
372
373
|
export type PublicRoleAssignment = components['schemas']['PublicRoleAssignment'];
|
|
374
|
+
export type PublicRoleAssignmentRequest = components['schemas']['PublicRoleAssignmentRequest'];
|
|
373
375
|
export type PublicScope = components['schemas']['PublicScope'];
|
|
374
376
|
export type RdapBase = components['schemas']['RdapBase'];
|
|
375
377
|
export type RedirectCode = components['schemas']['RedirectCode'];
|
package/src/openapi.yaml
CHANGED
|
@@ -23,6 +23,15 @@ components:
|
|
|
23
23
|
- max
|
|
24
24
|
title: AllowedNumberOfNameserverBase
|
|
25
25
|
type: object
|
|
26
|
+
AssignablePublicRole:
|
|
27
|
+
enum:
|
|
28
|
+
- admin
|
|
29
|
+
- viewer
|
|
30
|
+
- domain_manager
|
|
31
|
+
- dns_manager
|
|
32
|
+
- billing_manager
|
|
33
|
+
title: AssignablePublicRole
|
|
34
|
+
type: string
|
|
26
35
|
AttributeCondition:
|
|
27
36
|
properties:
|
|
28
37
|
field:
|
|
@@ -9449,6 +9458,7 @@ components:
|
|
|
9449
9458
|
type: string
|
|
9450
9459
|
PublicRole:
|
|
9451
9460
|
enum:
|
|
9461
|
+
- owner
|
|
9452
9462
|
- admin
|
|
9453
9463
|
- viewer
|
|
9454
9464
|
- domain_manager
|
|
@@ -9464,6 +9474,14 @@ components:
|
|
|
9464
9474
|
- type: 'null'
|
|
9465
9475
|
title: PublicRoleAssignment
|
|
9466
9476
|
type: object
|
|
9477
|
+
PublicRoleAssignmentRequest:
|
|
9478
|
+
properties:
|
|
9479
|
+
role:
|
|
9480
|
+
anyOf:
|
|
9481
|
+
- $ref: '#/components/schemas/AssignablePublicRole'
|
|
9482
|
+
- type: 'null'
|
|
9483
|
+
title: PublicRoleAssignmentRequest
|
|
9484
|
+
type: object
|
|
9467
9485
|
PublicScope:
|
|
9468
9486
|
enum:
|
|
9469
9487
|
- read
|
|
@@ -11537,7 +11555,7 @@ info:
|
|
|
11537
11555
|
\n\n"
|
|
11538
11556
|
summary: OpusDNS - your gateway to a seamless domain management experience.
|
|
11539
11557
|
title: OpusDNS API
|
|
11540
|
-
version: 2026-06-10-
|
|
11558
|
+
version: 2026-06-10-102008
|
|
11541
11559
|
x-logo:
|
|
11542
11560
|
altText: OpusDNS API Reference
|
|
11543
11561
|
url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
|
|
@@ -25696,7 +25714,7 @@ paths:
|
|
|
25696
25714
|
content:
|
|
25697
25715
|
application/json:
|
|
25698
25716
|
schema:
|
|
25699
|
-
$ref: '#/components/schemas/
|
|
25717
|
+
$ref: '#/components/schemas/PublicRoleAssignmentRequest'
|
|
25700
25718
|
required: true
|
|
25701
25719
|
responses:
|
|
25702
25720
|
'200':
|
|
@@ -25705,6 +25723,18 @@ paths:
|
|
|
25705
25723
|
schema:
|
|
25706
25724
|
$ref: '#/components/schemas/PublicRoleAssignment'
|
|
25707
25725
|
description: Successful Response
|
|
25726
|
+
'403':
|
|
25727
|
+
content:
|
|
25728
|
+
application/problem+json:
|
|
25729
|
+
example:
|
|
25730
|
+
code: ERROR_ONLY_OWNER_CAN_MANAGE_ADMIN_ROLE
|
|
25731
|
+
detail: Additional error context.
|
|
25732
|
+
status: 403
|
|
25733
|
+
title: User Management Error
|
|
25734
|
+
type: only-owner-can-manage-admin-role
|
|
25735
|
+
schema:
|
|
25736
|
+
$ref: '#/components/schemas/Problem'
|
|
25737
|
+
description: Forbidden
|
|
25708
25738
|
'422':
|
|
25709
25739
|
content:
|
|
25710
25740
|
application/problem+json:
|
|
@@ -25713,7 +25743,6 @@ paths:
|
|
|
25713
25743
|
description: Validation Error
|
|
25714
25744
|
security:
|
|
25715
25745
|
- OAuth2PasswordBearer: []
|
|
25716
|
-
- APIKeyHeader: []
|
|
25717
25746
|
summary: Set user role
|
|
25718
25747
|
tags:
|
|
25719
25748
|
- user
|
package/src/schema.d.ts
CHANGED
|
@@ -2462,6 +2462,11 @@ export interface components {
|
|
|
2462
2462
|
*/
|
|
2463
2463
|
min: number;
|
|
2464
2464
|
};
|
|
2465
|
+
/**
|
|
2466
|
+
* AssignablePublicRole
|
|
2467
|
+
* @enum {string}
|
|
2468
|
+
*/
|
|
2469
|
+
AssignablePublicRole: "admin" | "viewer" | "domain_manager" | "dns_manager" | "billing_manager";
|
|
2465
2470
|
/** AttributeCondition */
|
|
2466
2471
|
AttributeCondition: {
|
|
2467
2472
|
/** @description The attribute key to evaluate */
|
|
@@ -8673,11 +8678,15 @@ export interface components {
|
|
|
8673
8678
|
* PublicRole
|
|
8674
8679
|
* @enum {string}
|
|
8675
8680
|
*/
|
|
8676
|
-
PublicRole: "admin" | "viewer" | "domain_manager" | "dns_manager" | "billing_manager";
|
|
8681
|
+
PublicRole: "owner" | "admin" | "viewer" | "domain_manager" | "dns_manager" | "billing_manager";
|
|
8677
8682
|
/** PublicRoleAssignment */
|
|
8678
8683
|
PublicRoleAssignment: {
|
|
8679
8684
|
role?: components["schemas"]["PublicRole"] | null;
|
|
8680
8685
|
};
|
|
8686
|
+
/** PublicRoleAssignmentRequest */
|
|
8687
|
+
PublicRoleAssignmentRequest: {
|
|
8688
|
+
role?: components["schemas"]["AssignablePublicRole"] | null;
|
|
8689
|
+
};
|
|
8681
8690
|
/**
|
|
8682
8691
|
* PublicScope
|
|
8683
8692
|
* @enum {string}
|
|
@@ -20649,7 +20658,7 @@ export interface operations {
|
|
|
20649
20658
|
};
|
|
20650
20659
|
requestBody: {
|
|
20651
20660
|
content: {
|
|
20652
|
-
"application/json": components["schemas"]["
|
|
20661
|
+
"application/json": components["schemas"]["PublicRoleAssignmentRequest"];
|
|
20653
20662
|
};
|
|
20654
20663
|
};
|
|
20655
20664
|
responses: {
|
|
@@ -20662,6 +20671,22 @@ export interface operations {
|
|
|
20662
20671
|
"application/json": components["schemas"]["PublicRoleAssignment"];
|
|
20663
20672
|
};
|
|
20664
20673
|
};
|
|
20674
|
+
/** @description Forbidden */
|
|
20675
|
+
403: {
|
|
20676
|
+
headers: {
|
|
20677
|
+
[name: string]: unknown;
|
|
20678
|
+
};
|
|
20679
|
+
content: {
|
|
20680
|
+
/** @example {
|
|
20681
|
+
* "code": "ERROR_ONLY_OWNER_CAN_MANAGE_ADMIN_ROLE",
|
|
20682
|
+
* "detail": "Additional error context.",
|
|
20683
|
+
* "status": 403,
|
|
20684
|
+
* "title": "User Management Error",
|
|
20685
|
+
* "type": "only-owner-can-manage-admin-role"
|
|
20686
|
+
* } */
|
|
20687
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
20688
|
+
};
|
|
20689
|
+
};
|
|
20665
20690
|
/** @description Validation Error */
|
|
20666
20691
|
422: {
|
|
20667
20692
|
headers: {
|