@opusdns/api 1.3.0 → 1.5.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 CHANGED
@@ -3,7 +3,7 @@
3
3
  "@opusdns/api-spec-ts-generator": "^1.2.0"
4
4
  },
5
5
  "name": "@opusdns/api",
6
- "version": "1.3.0",
6
+ "version": "1.5.0",
7
7
  "description": "TypeScript types for the OpusDNS OpenAPI specification",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -70,16 +70,17 @@ import type {
70
70
  ParkingSortField,
71
71
  PatchOp,
72
72
  PeriodUnit,
73
- Permission,
74
73
  PostTransferRequirements,
75
74
  PostalAddressType,
76
75
  PremiumAffectsType,
77
76
  PremiumSourceType,
78
77
  Protocol,
78
+ PublicResource,
79
+ PublicRole,
80
+ PublicScope,
79
81
  RedirectCode,
80
82
  RegistrantChangeType,
81
83
  RegistryHandleAttributeType,
82
- Relation,
83
84
  RenewalMode,
84
85
  ReportStatus,
85
86
  ReportTriggerType,
@@ -1251,110 +1252,6 @@ export const PERIOD_UNIT_VALUES = [
1251
1252
  'd',
1252
1253
  ] as const satisfies ReadonlyArray<PeriodUnit>;
1253
1254
 
1254
- export const PERMISSION = {
1255
- BULK_CREATE: "bulk_create",
1256
- BULK_DELETE: "bulk_delete",
1257
- BULK_RENEW_EXPIRE: "bulk_renew_expire",
1258
- BULK_TRANSFER_TRADE: "bulk_transfer_trade",
1259
- BULK_UPDATE: "bulk_update",
1260
- CORPORATE_PLAN: "corporate_plan",
1261
- CREATE: "create",
1262
- CREATE_VANITY_NS: "create_vanity_ns",
1263
- DELETE: "delete",
1264
- DELETE_DOMAIN_FORWARDS: "delete_domain_forwards",
1265
- ENTERPRISE_PLAN: "enterprise_plan",
1266
- HAS_ACCEPTED_TOS: "has_accepted_tos",
1267
- MANAGE_API_KEYS: "manage_api_keys",
1268
- MANAGE_BILLING: "manage_billing",
1269
- MANAGE_CHATS: "manage_chats",
1270
- MANAGE_CMS_CONTENT: "manage_cms_content",
1271
- MANAGE_CONTACTS: "manage_contacts",
1272
- MANAGE_DNS_ZONES: "manage_dns_zones",
1273
- MANAGE_DOMAINS: "manage_domains",
1274
- MANAGE_DOMAIN_FORWARDS: "manage_domain_forwards",
1275
- MANAGE_EMAIL_FORWARDS: "manage_email_forwards",
1276
- MANAGE_EVENTS: "manage_events",
1277
- MANAGE_HOSTS: "manage_hosts",
1278
- MANAGE_JOBS: "manage_jobs",
1279
- MANAGE_OPUSDNS_API_KEYS: "manage_opusdns_api_keys",
1280
- MANAGE_PARKING: "manage_parking",
1281
- MANAGE_PRODUCTS: "manage_products",
1282
- MANAGE_REGISTRAR_CREDENTIALS: "manage_registrar_credentials",
1283
- MANAGE_RESELLER: "manage_reseller",
1284
- MANAGE_SUB_ZONES: "manage_sub_zones",
1285
- MANAGE_TAGS: "manage_tags",
1286
- MANAGE_USERS: "manage_users",
1287
- MANAGE_USER_RELATIONS: "manage_user_relations",
1288
- MANAGE_VANITY_NS: "manage_vanity_ns",
1289
- PLAN_MANAGER: "plan_manager",
1290
- PREMIUM_PLAN: "premium_plan",
1291
- RENEW_EXPIRE: "renew_expire",
1292
- STARTER_PLAN: "starter_plan",
1293
- TRANSFER_TRADE: "transfer_trade",
1294
- UPDATE: "update",
1295
- UPDATE_DOMAIN_FORWARDS: "update_domain_forwards",
1296
- VERIFY: "verify",
1297
- VIEW: "view",
1298
- VIEW_AUDIT_LOGS: "view_audit_logs",
1299
- VIEW_DOMAIN_FORWARDS: "view_domain_forwards",
1300
- VIEW_EMAIL_FORWARDS: "view_email_forwards",
1301
- VIEW_EVENTS: "view_events",
1302
- VIEW_PARKING: "view_parking",
1303
- VIEW_VANITY_NS: "view_vanity_ns",
1304
- } as const satisfies Record<string, Permission>;
1305
-
1306
- export const PERMISSION_VALUES = [
1307
- 'bulk_create',
1308
- 'bulk_delete',
1309
- 'bulk_renew_expire',
1310
- 'bulk_transfer_trade',
1311
- 'bulk_update',
1312
- 'corporate_plan',
1313
- 'create',
1314
- 'create_vanity_ns',
1315
- 'delete',
1316
- 'delete_domain_forwards',
1317
- 'enterprise_plan',
1318
- 'has_accepted_tos',
1319
- 'manage_api_keys',
1320
- 'manage_billing',
1321
- 'manage_chats',
1322
- 'manage_cms_content',
1323
- 'manage_contacts',
1324
- 'manage_dns_zones',
1325
- 'manage_domains',
1326
- 'manage_domain_forwards',
1327
- 'manage_email_forwards',
1328
- 'manage_events',
1329
- 'manage_hosts',
1330
- 'manage_jobs',
1331
- 'manage_opusdns_api_keys',
1332
- 'manage_parking',
1333
- 'manage_products',
1334
- 'manage_registrar_credentials',
1335
- 'manage_reseller',
1336
- 'manage_sub_zones',
1337
- 'manage_tags',
1338
- 'manage_users',
1339
- 'manage_user_relations',
1340
- 'manage_vanity_ns',
1341
- 'plan_manager',
1342
- 'premium_plan',
1343
- 'renew_expire',
1344
- 'starter_plan',
1345
- 'transfer_trade',
1346
- 'update',
1347
- 'update_domain_forwards',
1348
- 'verify',
1349
- 'view',
1350
- 'view_audit_logs',
1351
- 'view_domain_forwards',
1352
- 'view_email_forwards',
1353
- 'view_events',
1354
- 'view_parking',
1355
- 'view_vanity_ns',
1356
- ] as const satisfies ReadonlyArray<Permission>;
1357
-
1358
1255
  export const POST_TRANSFER_REQUIREMENTS = {
1359
1256
  UPDATE_CONTACTS: "update_contacts",
1360
1257
  TLD_SPECIFIC: "tld_specific",
@@ -1419,6 +1316,72 @@ export const PROTOCOL_VALUES = [
1419
1316
  'https',
1420
1317
  ] as const satisfies ReadonlyArray<Protocol>;
1421
1318
 
1319
+ export const PUBLIC_RESOURCE = {
1320
+ DOMAINS: "domains",
1321
+ CONTACTS: "contacts",
1322
+ DNS: "dns",
1323
+ HOSTS: "hosts",
1324
+ EMAIL_FORWARDS: "email_forwards",
1325
+ DOMAIN_FORWARDS: "domain_forwards",
1326
+ PARKING: "parking",
1327
+ EVENTS: "events",
1328
+ JOBS: "jobs",
1329
+ BILLING: "billing",
1330
+ USERS: "users",
1331
+ API_KEYS: "api_keys",
1332
+ REGISTRAR_CREDENTIALS: "registrar_credentials",
1333
+ TAGS: "tags",
1334
+ AUDIT_LOGS: "audit_logs",
1335
+ VANITY_NS: "vanity_ns",
1336
+ } as const satisfies Record<string, PublicResource>;
1337
+
1338
+ export const PUBLIC_RESOURCE_VALUES = [
1339
+ 'domains',
1340
+ 'contacts',
1341
+ 'dns',
1342
+ 'hosts',
1343
+ 'email_forwards',
1344
+ 'domain_forwards',
1345
+ 'parking',
1346
+ 'events',
1347
+ 'jobs',
1348
+ 'billing',
1349
+ 'users',
1350
+ 'api_keys',
1351
+ 'registrar_credentials',
1352
+ 'tags',
1353
+ 'audit_logs',
1354
+ 'vanity_ns',
1355
+ ] as const satisfies ReadonlyArray<PublicResource>;
1356
+
1357
+ export const PUBLIC_ROLE = {
1358
+ ADMIN: "admin",
1359
+ VIEWER: "viewer",
1360
+ DOMAIN_MANAGER: "domain_manager",
1361
+ DNS_MANAGER: "dns_manager",
1362
+ BILLING_MANAGER: "billing_manager",
1363
+ } as const satisfies Record<string, PublicRole>;
1364
+
1365
+ export const PUBLIC_ROLE_VALUES = [
1366
+ 'admin',
1367
+ 'viewer',
1368
+ 'domain_manager',
1369
+ 'dns_manager',
1370
+ 'billing_manager',
1371
+ ] as const satisfies ReadonlyArray<PublicRole>;
1372
+
1373
+ export const PUBLIC_SCOPE = {
1374
+ READ: "read",
1375
+ MANAGE: "manage",
1376
+ DELETE: "delete",
1377
+ } as const satisfies Record<string, PublicScope>;
1378
+
1379
+ export const PUBLIC_SCOPE_VALUES = [
1380
+ 'read',
1381
+ 'manage',
1382
+ 'delete',
1383
+ ] as const satisfies ReadonlyArray<PublicScope>;
1384
+
1422
1385
  export const REDIRECT_CODE = [
1423
1386
  301,
1424
1387
  302,
@@ -1526,58 +1489,6 @@ export const REGISTRY_HANDLE_ATTRIBUTE_TYPE_VALUES = [
1526
1489
  'DNS_LU_CONTACT_ROLE',
1527
1490
  ] as const satisfies ReadonlyArray<RegistryHandleAttributeType>;
1528
1491
 
1529
- export const RELATION = {
1530
- ACCEPTED_TOS: "accepted_tos",
1531
- ADMIN: "admin",
1532
- API_ADMIN: "api_admin",
1533
- BILLING_MANAGER: "billing_manager",
1534
- CHAT_MANAGER: "chat_manager",
1535
- CLIENT_API_KEY: "client_api_key",
1536
- CMS_CONTENT_EDITOR: "cms_content_editor",
1537
- CONTACT_MANAGER: "contact_manager",
1538
- DOMAIN_FORWARD_MANAGER: "domain_forward_manager",
1539
- DOMAIN_MANAGER: "domain_manager",
1540
- EMAIL_FORWARD_MANAGER: "email_forward_manager",
1541
- EVENTS_MANAGER: "events_manager",
1542
- HOST_MANAGER: "host_manager",
1543
- MEMBER: "member",
1544
- OPUSDNS_INTERNAL_API_KEY: "opusdns_internal_api_key",
1545
- ORGANIZATION_MANAGER: "organization_manager",
1546
- OWNER: "owner",
1547
- PARENT: "parent",
1548
- PRODUCT_MANAGER: "product_manager",
1549
- REGISTRAR_CREDENTIAL_MANAGER: "registrar_credential_manager",
1550
- RESELLER_MANAGER: "reseller_manager",
1551
- ROOT_ADMIN: "root_admin",
1552
- SELF: "self",
1553
- } as const satisfies Record<string, Relation>;
1554
-
1555
- export const RELATION_VALUES = [
1556
- 'accepted_tos',
1557
- 'admin',
1558
- 'api_admin',
1559
- 'billing_manager',
1560
- 'chat_manager',
1561
- 'client_api_key',
1562
- 'cms_content_editor',
1563
- 'contact_manager',
1564
- 'domain_forward_manager',
1565
- 'domain_manager',
1566
- 'email_forward_manager',
1567
- 'events_manager',
1568
- 'host_manager',
1569
- 'member',
1570
- 'opusdns_internal_api_key',
1571
- 'organization_manager',
1572
- 'owner',
1573
- 'parent',
1574
- 'product_manager',
1575
- 'registrar_credential_manager',
1576
- 'reseller_manager',
1577
- 'root_admin',
1578
- 'self',
1579
- ] as const satisfies ReadonlyArray<Relation>;
1580
-
1581
1492
  export const RENEWAL_MODE = {
1582
1493
  RENEW: "renew",
1583
1494
  EXPIRE: "expire",
@@ -251,7 +251,6 @@ import type {
251
251
  ParkingTotalMetrics,
252
252
  PasswordUpdate,
253
253
  Period,
254
- PermissionSet,
255
254
  PlatformStatsBucket,
256
255
  PremiumDomainsBase,
257
256
  PremiumPriceEntryRes,
@@ -262,17 +261,17 @@ import type {
262
261
  PricingPeriod,
263
262
  Problem,
264
263
  PublicAuthRequestForm,
264
+ PublicPermissionSet,
265
265
  PublicReportListRes,
266
266
  PublicReportRes,
267
+ PublicRoleAssignment,
267
268
  RdapBase,
268
269
  ReferrerStatsBucket,
269
270
  RegistryLockBase,
270
- RelationSet,
271
271
  RequestHistory,
272
272
  ReservedDomainsBase,
273
273
  RgpOperations,
274
274
  SldLength,
275
- SpiceDbRelationshipUpdate,
276
275
  StatusChanges,
277
276
  StatusCodeStatsBucket,
278
277
  StatusTag,
@@ -305,7 +304,7 @@ import type {
305
304
  UserPublicWithAttributes,
306
305
  UserToken,
307
306
  UserUpdate,
308
- UserWithRelationPermissions,
307
+ UserWithPermissions,
309
308
  ValidationError,
310
309
  VerificationDeadline,
311
310
  VerificationRegistrantDetails,
@@ -3584,12 +3583,6 @@ export const KEYS_PERIOD = [
3584
3583
  KEY_PERIOD_VALUE,
3585
3584
  ] as const satisfies (keyof Period)[];
3586
3585
 
3587
- export const KEY_PERMISSION_SET_PERMISSIONS = 'permissions' satisfies keyof PermissionSet;
3588
-
3589
- export const KEYS_PERMISSION_SET = [
3590
- KEY_PERMISSION_SET_PERMISSIONS,
3591
- ] as const satisfies (keyof PermissionSet)[];
3592
-
3593
3586
  export const KEY_PLATFORM_STATS_BUCKET_KEY = 'key' satisfies keyof PlatformStatsBucket;
3594
3587
  export const KEY_PLATFORM_STATS_BUCKET_TOTAL = 'total' satisfies keyof PlatformStatsBucket;
3595
3588
  export const KEY_PLATFORM_STATS_BUCKET_UNIQUE = 'unique' satisfies keyof PlatformStatsBucket;
@@ -3688,6 +3681,12 @@ export const KEYS_PUBLIC_AUTH_REQUEST_FORM = [
3688
3681
  KEY_PUBLIC_AUTH_REQUEST_FORM_GRANT_TYPE,
3689
3682
  ] as const satisfies (keyof PublicAuthRequestForm)[];
3690
3683
 
3684
+ export const KEY_PUBLIC_PERMISSION_SET_PERMISSIONS = 'permissions' satisfies keyof PublicPermissionSet;
3685
+
3686
+ export const KEYS_PUBLIC_PERMISSION_SET = [
3687
+ KEY_PUBLIC_PERMISSION_SET_PERMISSIONS,
3688
+ ] as const satisfies (keyof PublicPermissionSet)[];
3689
+
3691
3690
  export const KEY_PUBLIC_REPORT_LIST_RES_PAGINATION = 'pagination' satisfies keyof PublicReportListRes;
3692
3691
  export const KEY_PUBLIC_REPORT_LIST_RES_RESULTS = 'results' satisfies keyof PublicReportListRes;
3693
3692
 
@@ -3720,6 +3719,12 @@ export const KEYS_PUBLIC_REPORT_RES = [
3720
3719
  KEY_PUBLIC_REPORT_RES_UPDATED_ON,
3721
3720
  ] as const satisfies (keyof PublicReportRes)[];
3722
3721
 
3722
+ export const KEY_PUBLIC_ROLE_ASSIGNMENT_ROLE = 'role' satisfies keyof PublicRoleAssignment;
3723
+
3724
+ export const KEYS_PUBLIC_ROLE_ASSIGNMENT = [
3725
+ KEY_PUBLIC_ROLE_ASSIGNMENT_ROLE,
3726
+ ] as const satisfies (keyof PublicRoleAssignment)[];
3727
+
3723
3728
  export const KEY_RDAP_BASE_RDAP_SERVER = 'rdap_server' satisfies keyof RdapBase;
3724
3729
 
3725
3730
  export const KEYS_RDAP_BASE = [
@@ -3748,12 +3753,6 @@ export const KEYS_REGISTRY_LOCK_BASE = [
3748
3753
  KEY_REGISTRY_LOCK_BASE_SUPPORTED,
3749
3754
  ] as const satisfies (keyof RegistryLockBase)[];
3750
3755
 
3751
- export const KEY_RELATION_SET_RELATIONS = 'relations' satisfies keyof RelationSet;
3752
-
3753
- export const KEYS_RELATION_SET = [
3754
- KEY_RELATION_SET_RELATIONS,
3755
- ] as const satisfies (keyof RelationSet)[];
3756
-
3757
3756
  export const KEY_REQUEST_HISTORY_CLIENT_IP = 'client_ip' satisfies keyof RequestHistory;
3758
3757
  export const KEY_REQUEST_HISTORY_DURATION = 'duration' satisfies keyof RequestHistory;
3759
3758
  export const KEY_REQUEST_HISTORY_METHOD = 'method' satisfies keyof RequestHistory;
@@ -3808,14 +3807,6 @@ export const KEYS_SLD_LENGTH = [
3808
3807
  KEY_SLD_LENGTH_MIN,
3809
3808
  ] as const satisfies (keyof SldLength)[];
3810
3809
 
3811
- export const KEY_SPICE_DB_RELATIONSHIP_UPDATE_ADD = 'add' satisfies keyof SpiceDbRelationshipUpdate;
3812
- export const KEY_SPICE_DB_RELATIONSHIP_UPDATE_REMOVE = 'remove' satisfies keyof SpiceDbRelationshipUpdate;
3813
-
3814
- export const KEYS_SPICE_DB_RELATIONSHIP_UPDATE = [
3815
- KEY_SPICE_DB_RELATIONSHIP_UPDATE_ADD,
3816
- KEY_SPICE_DB_RELATIONSHIP_UPDATE_REMOVE,
3817
- ] as const satisfies (keyof SpiceDbRelationshipUpdate)[];
3818
-
3819
3810
  export const KEY_STATUS_CHANGES_ADD = 'add' satisfies keyof StatusChanges;
3820
3811
  export const KEY_STATUS_CHANGES_REMOVE = 'remove' satisfies keyof StatusChanges;
3821
3812
 
@@ -4298,39 +4289,37 @@ export const KEYS_USER_UPDATE = [
4298
4289
  KEY_USER_UPDATE_USERNAME,
4299
4290
  ] as const satisfies (keyof UserUpdate)[];
4300
4291
 
4301
- export const KEY_USER_WITH_RELATION_PERMISSIONS_CREATED_ON = 'created_on' satisfies keyof UserWithRelationPermissions;
4302
- export const KEY_USER_WITH_RELATION_PERMISSIONS_DELETED_ON = 'deleted_on' satisfies keyof UserWithRelationPermissions;
4303
- export const KEY_USER_WITH_RELATION_PERMISSIONS_EMAIL = 'email' satisfies keyof UserWithRelationPermissions;
4304
- export const KEY_USER_WITH_RELATION_PERMISSIONS_FIRST_NAME = 'first_name' satisfies keyof UserWithRelationPermissions;
4305
- export const KEY_USER_WITH_RELATION_PERMISSIONS_LAST_NAME = 'last_name' satisfies keyof UserWithRelationPermissions;
4306
- export const KEY_USER_WITH_RELATION_PERMISSIONS_LOCALE = 'locale' satisfies keyof UserWithRelationPermissions;
4307
- export const KEY_USER_WITH_RELATION_PERMISSIONS_ORGANIZATION_ID = 'organization_id' satisfies keyof UserWithRelationPermissions;
4308
- export const KEY_USER_WITH_RELATION_PERMISSIONS_PERMISSIONS = 'permissions' satisfies keyof UserWithRelationPermissions;
4309
- export const KEY_USER_WITH_RELATION_PERMISSIONS_PHONE = 'phone' satisfies keyof UserWithRelationPermissions;
4310
- export const KEY_USER_WITH_RELATION_PERMISSIONS_RELATIONS = 'relations' satisfies keyof UserWithRelationPermissions;
4311
- export const KEY_USER_WITH_RELATION_PERMISSIONS_STATUS = 'status' satisfies keyof UserWithRelationPermissions;
4312
- export const KEY_USER_WITH_RELATION_PERMISSIONS_UPDATED_ON = 'updated_on' satisfies keyof UserWithRelationPermissions;
4313
- export const KEY_USER_WITH_RELATION_PERMISSIONS_USER_ATTRIBUTES = 'user_attributes' satisfies keyof UserWithRelationPermissions;
4314
- export const KEY_USER_WITH_RELATION_PERMISSIONS_USER_ID = 'user_id' satisfies keyof UserWithRelationPermissions;
4315
- export const KEY_USER_WITH_RELATION_PERMISSIONS_USERNAME = 'username' satisfies keyof UserWithRelationPermissions;
4316
-
4317
- export const KEYS_USER_WITH_RELATION_PERMISSIONS = [
4318
- KEY_USER_WITH_RELATION_PERMISSIONS_CREATED_ON,
4319
- KEY_USER_WITH_RELATION_PERMISSIONS_DELETED_ON,
4320
- KEY_USER_WITH_RELATION_PERMISSIONS_EMAIL,
4321
- KEY_USER_WITH_RELATION_PERMISSIONS_FIRST_NAME,
4322
- KEY_USER_WITH_RELATION_PERMISSIONS_LAST_NAME,
4323
- KEY_USER_WITH_RELATION_PERMISSIONS_LOCALE,
4324
- KEY_USER_WITH_RELATION_PERMISSIONS_ORGANIZATION_ID,
4325
- KEY_USER_WITH_RELATION_PERMISSIONS_PERMISSIONS,
4326
- KEY_USER_WITH_RELATION_PERMISSIONS_PHONE,
4327
- KEY_USER_WITH_RELATION_PERMISSIONS_RELATIONS,
4328
- KEY_USER_WITH_RELATION_PERMISSIONS_STATUS,
4329
- KEY_USER_WITH_RELATION_PERMISSIONS_UPDATED_ON,
4330
- KEY_USER_WITH_RELATION_PERMISSIONS_USER_ATTRIBUTES,
4331
- KEY_USER_WITH_RELATION_PERMISSIONS_USER_ID,
4332
- KEY_USER_WITH_RELATION_PERMISSIONS_USERNAME,
4333
- ] as const satisfies (keyof UserWithRelationPermissions)[];
4292
+ export const KEY_USER_WITH_PERMISSIONS_CREATED_ON = 'created_on' satisfies keyof UserWithPermissions;
4293
+ export const KEY_USER_WITH_PERMISSIONS_DELETED_ON = 'deleted_on' satisfies keyof UserWithPermissions;
4294
+ export const KEY_USER_WITH_PERMISSIONS_EMAIL = 'email' satisfies keyof UserWithPermissions;
4295
+ export const KEY_USER_WITH_PERMISSIONS_FIRST_NAME = 'first_name' satisfies keyof UserWithPermissions;
4296
+ export const KEY_USER_WITH_PERMISSIONS_LAST_NAME = 'last_name' satisfies keyof UserWithPermissions;
4297
+ export const KEY_USER_WITH_PERMISSIONS_LOCALE = 'locale' satisfies keyof UserWithPermissions;
4298
+ export const KEY_USER_WITH_PERMISSIONS_ORGANIZATION_ID = 'organization_id' satisfies keyof UserWithPermissions;
4299
+ export const KEY_USER_WITH_PERMISSIONS_PERMISSIONS = 'permissions' satisfies keyof UserWithPermissions;
4300
+ export const KEY_USER_WITH_PERMISSIONS_PHONE = 'phone' satisfies keyof UserWithPermissions;
4301
+ export const KEY_USER_WITH_PERMISSIONS_STATUS = 'status' satisfies keyof UserWithPermissions;
4302
+ export const KEY_USER_WITH_PERMISSIONS_UPDATED_ON = 'updated_on' satisfies keyof UserWithPermissions;
4303
+ export const KEY_USER_WITH_PERMISSIONS_USER_ATTRIBUTES = 'user_attributes' satisfies keyof UserWithPermissions;
4304
+ export const KEY_USER_WITH_PERMISSIONS_USER_ID = 'user_id' satisfies keyof UserWithPermissions;
4305
+ export const KEY_USER_WITH_PERMISSIONS_USERNAME = 'username' satisfies keyof UserWithPermissions;
4306
+
4307
+ export const KEYS_USER_WITH_PERMISSIONS = [
4308
+ KEY_USER_WITH_PERMISSIONS_CREATED_ON,
4309
+ KEY_USER_WITH_PERMISSIONS_DELETED_ON,
4310
+ KEY_USER_WITH_PERMISSIONS_EMAIL,
4311
+ KEY_USER_WITH_PERMISSIONS_FIRST_NAME,
4312
+ KEY_USER_WITH_PERMISSIONS_LAST_NAME,
4313
+ KEY_USER_WITH_PERMISSIONS_LOCALE,
4314
+ KEY_USER_WITH_PERMISSIONS_ORGANIZATION_ID,
4315
+ KEY_USER_WITH_PERMISSIONS_PERMISSIONS,
4316
+ KEY_USER_WITH_PERMISSIONS_PHONE,
4317
+ KEY_USER_WITH_PERMISSIONS_STATUS,
4318
+ KEY_USER_WITH_PERMISSIONS_UPDATED_ON,
4319
+ KEY_USER_WITH_PERMISSIONS_USER_ATTRIBUTES,
4320
+ KEY_USER_WITH_PERMISSIONS_USER_ID,
4321
+ KEY_USER_WITH_PERMISSIONS_USERNAME,
4322
+ ] as const satisfies (keyof UserWithPermissions)[];
4334
4323
 
4335
4324
  export const KEY_VALIDATION_ERROR_CTX = 'ctx' satisfies keyof ValidationError;
4336
4325
  export const KEY_VALIDATION_ERROR_INPUT = 'input' satisfies keyof ValidationError;
@@ -42,7 +42,7 @@ import type {
42
42
  ParkingSignupRequest,
43
43
  PasswordUpdate,
44
44
  PublicAuthRequestForm,
45
- SpiceDbRelationshipUpdate,
45
+ PublicRoleAssignment,
46
46
  TagCreate,
47
47
  TagUpdate,
48
48
  UserCreate,
@@ -819,9 +819,6 @@ export type PATCH_OrganizationsIpRestrictionsByIpRestrictionId_Request = {
819
819
  export type PATCH_OrganizationsIpRestrictionsByIpRestrictionId_Request_Path = PATCH_OrganizationsIpRestrictionsByIpRestrictionId_Request['parameters']['path'];
820
820
  export type PATCH_OrganizationsIpRestrictionsByIpRestrictionId_Request_Body = PATCH_OrganizationsIpRestrictionsByIpRestrictionId_Request['requestBody'];
821
821
 
822
- export type GET_OrganizationsRoles_Request = {
823
- };
824
-
825
822
  export type GET_OrganizationsUsers_Request = {
826
823
  parameters: operations['list_users_v1_organizations_users_get']['parameters'];
827
824
  };
@@ -949,17 +946,17 @@ export type GET_UsersByUserIdPermissions_Request = {
949
946
  };
950
947
  export type GET_UsersByUserIdPermissions_Request_Path = GET_UsersByUserIdPermissions_Request['parameters']['path'];
951
948
 
952
- export type GET_UsersByUserIdRoles_Request = {
953
- parameters: operations['list_roles_v1_users__user_id__roles_get']['parameters'];
949
+ export type GET_UsersByUserIdRole_Request = {
950
+ parameters: operations['get_role_v1_users__user_id__role_get']['parameters'];
954
951
  };
955
- export type GET_UsersByUserIdRoles_Request_Path = GET_UsersByUserIdRoles_Request['parameters']['path'];
952
+ export type GET_UsersByUserIdRole_Request_Path = GET_UsersByUserIdRole_Request['parameters']['path'];
956
953
 
957
- export type PATCH_UsersByUserIdRoles_Request = {
958
- parameters: operations['update_user_relations_v1_users__user_id__roles_patch']['parameters'];
959
- requestBody: SpiceDbRelationshipUpdate;
954
+ export type PUT_UsersByUserIdRole_Request = {
955
+ parameters: operations['set_user_role_v1_users__user_id__role_put']['parameters'];
956
+ requestBody: PublicRoleAssignment;
960
957
  };
961
- export type PATCH_UsersByUserIdRoles_Request_Path = PATCH_UsersByUserIdRoles_Request['parameters']['path'];
962
- export type PATCH_UsersByUserIdRoles_Request_Body = PATCH_UsersByUserIdRoles_Request['requestBody'];
958
+ export type PUT_UsersByUserIdRole_Request_Path = PUT_UsersByUserIdRole_Request['parameters']['path'];
959
+ export type PUT_UsersByUserIdRole_Request_Body = PUT_UsersByUserIdRole_Request['requestBody'];
963
960
 
964
961
  export type GET_UsersMe_Request = {
965
962
  parameters: operations['get_current_user_v1_users_me_get']['parameters'];
@@ -80,11 +80,11 @@ import type {
80
80
  ParkingSignup,
81
81
  ParkingSignupStatus,
82
82
  ParkingTotalMetrics,
83
- PermissionSet,
84
83
  Problem,
84
+ PublicPermissionSet,
85
85
  PublicReportListRes,
86
86
  PublicReportRes,
87
- RelationSet,
87
+ PublicRoleAssignment,
88
88
  RequestAuthcode,
89
89
  RequestAuthcode2,
90
90
  Tag,
@@ -92,7 +92,7 @@ import type {
92
92
  TldSpecification,
93
93
  UserPublic,
94
94
  UserPublicWithAttributes,
95
- UserWithRelationPermissions,
95
+ UserWithPermissions,
96
96
  } from './schemas';
97
97
 
98
98
  export type DELETE_AiConciergeConversationsByConversationId_Response = DELETE_AiConciergeConversationsByConversationId_Response_401 | DELETE_AiConciergeConversationsByConversationId_Response_404 | DELETE_AiConciergeConversationsByConversationId_Response_422 | DELETE_AiConciergeConversationsByConversationId_Response_502;
@@ -640,12 +640,6 @@ export type GET_OrganizationsIpRestrictionsByIpRestrictionId_Response_401 = Prob
640
640
  export type GET_OrganizationsIpRestrictionsByIpRestrictionId_Response_403 = Problem;
641
641
  export type GET_OrganizationsIpRestrictionsByIpRestrictionId_Response_422 = HTTPValidationError;
642
642
 
643
- export type GET_OrganizationsRoles_Response = GET_OrganizationsRoles_Response_401 | GET_OrganizationsRoles_Response_403 | GET_OrganizationsRoles_Response_422;
644
-
645
- export type GET_OrganizationsRoles_Response_401 = Problem;
646
- export type GET_OrganizationsRoles_Response_403 = Problem;
647
- export type GET_OrganizationsRoles_Response_422 = HTTPValidationError;
648
-
649
643
  export type GET_OrganizationsUsers_Response = GET_OrganizationsUsers_Response_200 | GET_OrganizationsUsers_Response_401 | GET_OrganizationsUsers_Response_403 | GET_OrganizationsUsers_Response_422;
650
644
 
651
645
  export type GET_OrganizationsUsers_Response_200 = Pagination_UserPublic;
@@ -731,17 +725,17 @@ export type GET_UsersByUserId_Response_422 = HTTPValidationError;
731
725
 
732
726
  export type GET_UsersByUserIdPermissions_Response = GET_UsersByUserIdPermissions_Response_200 | GET_UsersByUserIdPermissions_Response_422;
733
727
 
734
- export type GET_UsersByUserIdPermissions_Response_200 = PermissionSet;
728
+ export type GET_UsersByUserIdPermissions_Response_200 = PublicPermissionSet;
735
729
  export type GET_UsersByUserIdPermissions_Response_422 = HTTPValidationError;
736
730
 
737
- export type GET_UsersByUserIdRoles_Response = GET_UsersByUserIdRoles_Response_200 | GET_UsersByUserIdRoles_Response_422;
731
+ export type GET_UsersByUserIdRole_Response = GET_UsersByUserIdRole_Response_200 | GET_UsersByUserIdRole_Response_422;
738
732
 
739
- export type GET_UsersByUserIdRoles_Response_200 = RelationSet;
740
- export type GET_UsersByUserIdRoles_Response_422 = HTTPValidationError;
733
+ export type GET_UsersByUserIdRole_Response_200 = PublicRoleAssignment;
734
+ export type GET_UsersByUserIdRole_Response_422 = HTTPValidationError;
741
735
 
742
736
  export type GET_UsersMe_Response = GET_UsersMe_Response_200 | GET_UsersMe_Response_422;
743
737
 
744
- export type GET_UsersMe_Response_200 = UserWithRelationPermissions;
738
+ export type GET_UsersMe_Response_200 = UserWithPermissions;
745
739
  export type GET_UsersMe_Response_422 = HTTPValidationError;
746
740
 
747
741
  export type PATCH_AiConciergeConversationsByConversationId_Response = PATCH_AiConciergeConversationsByConversationId_Response_200 | PATCH_AiConciergeConversationsByConversationId_Response_401 | PATCH_AiConciergeConversationsByConversationId_Response_404 | PATCH_AiConciergeConversationsByConversationId_Response_422 | PATCH_AiConciergeConversationsByConversationId_Response_502;
@@ -870,11 +864,6 @@ export type PATCH_UsersByUserId_Response = PATCH_UsersByUserId_Response_200 | PA
870
864
  export type PATCH_UsersByUserId_Response_200 = UserPublicWithAttributes;
871
865
  export type PATCH_UsersByUserId_Response_422 = HTTPValidationError;
872
866
 
873
- export type PATCH_UsersByUserIdRoles_Response = PATCH_UsersByUserIdRoles_Response_200 | PATCH_UsersByUserIdRoles_Response_422;
874
-
875
- export type PATCH_UsersByUserIdRoles_Response_200 = RelationSet;
876
- export type PATCH_UsersByUserIdRoles_Response_422 = HTTPValidationError;
877
-
878
867
  export type PATCH_UsersMePasswordReset_Response = PATCH_UsersMePasswordReset_Response_401 | PATCH_UsersMePasswordReset_Response_422;
879
868
 
880
869
  export type PATCH_UsersMePasswordReset_Response_401 = Problem;
@@ -1207,3 +1196,8 @@ export type PUT_EmailForwardsByEmailForwardIdAliasesByAliasId_Response_401 = Pro
1207
1196
  export type PUT_EmailForwardsByEmailForwardIdAliasesByAliasId_Response_403 = Problem;
1208
1197
  export type PUT_EmailForwardsByEmailForwardIdAliasesByAliasId_Response_404 = Problem;
1209
1198
  export type PUT_EmailForwardsByEmailForwardIdAliasesByAliasId_Response_422 = HTTPValidationError;
1199
+
1200
+ export type PUT_UsersByUserIdRole_Response = PUT_UsersByUserIdRole_Response_200 | PUT_UsersByUserIdRole_Response_422;
1201
+
1202
+ export type PUT_UsersByUserIdRole_Response_200 = PublicRoleAssignment;
1203
+ export type PUT_UsersByUserIdRole_Response_422 = HTTPValidationError;
@@ -348,8 +348,6 @@ export type Period = components['schemas']['Period'];
348
348
  export type PeriodList = components['schemas']['PeriodList'];
349
349
  export type PeriodStr = components['schemas']['PeriodStr'];
350
350
  export type PeriodUnit = components['schemas']['PeriodUnit'];
351
- export type Permission = components['schemas']['Permission'];
352
- export type PermissionSet = components['schemas']['PermissionSet'];
353
351
  export type PlatformStatsBucket = components['schemas']['PlatformStatsBucket'];
354
352
  export type PostTransferRequirements = components['schemas']['PostTransferRequirements'];
355
353
  export type PostalAddressType = components['schemas']['PostalAddressType'];
@@ -365,16 +363,20 @@ export type PricingPeriod = components['schemas']['PricingPeriod'];
365
363
  export type Problem = components['schemas']['Problem'];
366
364
  export type Protocol = components['schemas']['Protocol'];
367
365
  export type PublicAuthRequestForm = components['schemas']['PublicAuthRequestForm'];
366
+ export type PublicPermission = components['schemas']['PublicPermission'];
367
+ export type PublicPermissionSet = components['schemas']['PublicPermissionSet'];
368
368
  export type PublicReportListRes = components['schemas']['PublicReportListRes'];
369
369
  export type PublicReportRes = components['schemas']['PublicReportRes'];
370
+ export type PublicResource = components['schemas']['PublicResource'];
371
+ export type PublicRole = components['schemas']['PublicRole'];
372
+ export type PublicRoleAssignment = components['schemas']['PublicRoleAssignment'];
373
+ export type PublicScope = components['schemas']['PublicScope'];
370
374
  export type RdapBase = components['schemas']['RdapBase'];
371
375
  export type RedirectCode = components['schemas']['RedirectCode'];
372
376
  export type ReferrerStatsBucket = components['schemas']['ReferrerStatsBucket'];
373
377
  export type RegistrantChangeType = components['schemas']['RegistrantChangeType'];
374
378
  export type RegistryHandleAttributeType = components['schemas']['RegistryHandleAttributeType'];
375
379
  export type RegistryLockBase = components['schemas']['RegistryLockBase'];
376
- export type Relation = components['schemas']['Relation'];
377
- export type RelationSet = components['schemas']['RelationSet'];
378
380
  export type RenewalMode = components['schemas']['RenewalMode'];
379
381
  export type ReportStatus = components['schemas']['ReportStatus'];
380
382
  export type ReportTriggerType = components['schemas']['ReportTriggerType'];
@@ -386,7 +388,6 @@ export type ReservedSourceType = components['schemas']['ReservedSourceType'];
386
388
  export type RgpOperations = components['schemas']['RgpOperations'];
387
389
  export type SldLength = components['schemas']['SldLength'];
388
390
  export type SortOrder = components['schemas']['SortOrder'];
389
- export type SpiceDbRelationshipUpdate = components['schemas']['SpiceDbRelationshipUpdate'];
390
391
  export type StatusChanges = components['schemas']['StatusChanges'];
391
392
  export type StatusCodeStatsBucket = components['schemas']['StatusCodeStatsBucket'];
392
393
  export type StatusTag = components['schemas']['StatusTagResponse'];
@@ -431,7 +432,7 @@ export type UserSortField = components['schemas']['UserSortField'];
431
432
  export type UserStatus = components['schemas']['UserStatus'];
432
433
  export type UserToken = components['schemas']['UserTokenResponse'];
433
434
  export type UserUpdate = components['schemas']['UserUpdate'];
434
- export type UserWithRelationPermissions = components['schemas']['UserWithRelationPermissions'];
435
+ export type UserWithPermissions = components['schemas']['UserWithPermissions'];
435
436
  export type ValidationError = components['schemas']['ValidationError'];
436
437
  export type VerificationClaimType = components['schemas']['VerificationClaimType'];
437
438
  export type VerificationDeadline = components['schemas']['VerificationDeadline'];
package/src/openapi.yaml CHANGED
@@ -9090,68 +9090,6 @@ components:
9090
9090
  - d
9091
9091
  title: PeriodUnit
9092
9092
  type: string
9093
- Permission:
9094
- enum:
9095
- - bulk_create
9096
- - bulk_delete
9097
- - bulk_renew_expire
9098
- - bulk_transfer_trade
9099
- - bulk_update
9100
- - corporate_plan
9101
- - create
9102
- - create_vanity_ns
9103
- - delete
9104
- - delete_domain_forwards
9105
- - enterprise_plan
9106
- - has_accepted_tos
9107
- - manage_api_keys
9108
- - manage_billing
9109
- - manage_chats
9110
- - manage_cms_content
9111
- - manage_contacts
9112
- - manage_dns_zones
9113
- - manage_domains
9114
- - manage_domain_forwards
9115
- - manage_email_forwards
9116
- - manage_events
9117
- - manage_hosts
9118
- - manage_jobs
9119
- - manage_opusdns_api_keys
9120
- - manage_parking
9121
- - manage_products
9122
- - manage_registrar_credentials
9123
- - manage_reseller
9124
- - manage_sub_zones
9125
- - manage_tags
9126
- - manage_users
9127
- - manage_user_relations
9128
- - manage_vanity_ns
9129
- - plan_manager
9130
- - premium_plan
9131
- - renew_expire
9132
- - starter_plan
9133
- - transfer_trade
9134
- - update
9135
- - update_domain_forwards
9136
- - verify
9137
- - view
9138
- - view_audit_logs
9139
- - view_domain_forwards
9140
- - view_email_forwards
9141
- - view_events
9142
- - view_parking
9143
- - view_vanity_ns
9144
- title: Permission
9145
- type: string
9146
- PermissionSet:
9147
- properties:
9148
- permissions:
9149
- items:
9150
- $ref: '#/components/schemas/Permission'
9151
- title: Permissions
9152
- type: array
9153
- title: PermissionSet
9154
- type: object
9155
9093
  PlatformStatsBucket:
9156
9094
  properties:
9157
9095
  key:
@@ -9402,6 +9340,21 @@ components:
9402
9340
  - client_secret
9403
9341
  title: PublicAuthRequestForm
9404
9342
  type: object
9343
+ PublicPermission:
9344
+ examples:
9345
+ - domains:read
9346
+ - domains:manage
9347
+ - domains:delete
9348
+ type: string
9349
+ PublicPermissionSet:
9350
+ properties:
9351
+ permissions:
9352
+ items:
9353
+ $ref: '#/components/schemas/PublicPermission'
9354
+ title: Permissions
9355
+ type: array
9356
+ title: PublicPermissionSet
9357
+ type: object
9405
9358
  PublicReportListRes:
9406
9359
  properties:
9407
9360
  pagination:
@@ -9474,6 +9427,50 @@ components:
9474
9427
  - updated_on
9475
9428
  title: PublicReportRes
9476
9429
  type: object
9430
+ PublicResource:
9431
+ enum:
9432
+ - domains
9433
+ - contacts
9434
+ - dns
9435
+ - hosts
9436
+ - email_forwards
9437
+ - domain_forwards
9438
+ - parking
9439
+ - events
9440
+ - jobs
9441
+ - billing
9442
+ - users
9443
+ - api_keys
9444
+ - registrar_credentials
9445
+ - tags
9446
+ - audit_logs
9447
+ - vanity_ns
9448
+ title: PublicResource
9449
+ type: string
9450
+ PublicRole:
9451
+ enum:
9452
+ - admin
9453
+ - viewer
9454
+ - domain_manager
9455
+ - dns_manager
9456
+ - billing_manager
9457
+ title: PublicRole
9458
+ type: string
9459
+ PublicRoleAssignment:
9460
+ properties:
9461
+ role:
9462
+ anyOf:
9463
+ - $ref: '#/components/schemas/PublicRole'
9464
+ - type: 'null'
9465
+ title: PublicRoleAssignment
9466
+ type: object
9467
+ PublicScope:
9468
+ enum:
9469
+ - read
9470
+ - manage
9471
+ - delete
9472
+ title: PublicScope
9473
+ type: string
9477
9474
  RdapBase:
9478
9475
  properties:
9479
9476
  rdap_server:
@@ -9595,42 +9592,6 @@ components:
9595
9592
  - supported
9596
9593
  title: RegistryLockBase
9597
9594
  type: object
9598
- Relation:
9599
- enum:
9600
- - accepted_tos
9601
- - admin
9602
- - api_admin
9603
- - billing_manager
9604
- - chat_manager
9605
- - client_api_key
9606
- - cms_content_editor
9607
- - contact_manager
9608
- - domain_forward_manager
9609
- - domain_manager
9610
- - email_forward_manager
9611
- - events_manager
9612
- - host_manager
9613
- - member
9614
- - opusdns_internal_api_key
9615
- - organization_manager
9616
- - owner
9617
- - parent
9618
- - product_manager
9619
- - registrar_credential_manager
9620
- - reseller_manager
9621
- - root_admin
9622
- - self
9623
- title: Relation
9624
- type: string
9625
- RelationSet:
9626
- properties:
9627
- relations:
9628
- items:
9629
- $ref: '#/components/schemas/Relation'
9630
- title: Relations
9631
- type: array
9632
- title: RelationSet
9633
- type: object
9634
9595
  RenewalMode:
9635
9596
  enum:
9636
9597
  - renew
@@ -9821,24 +9782,6 @@ components:
9821
9782
  - desc
9822
9783
  title: SortOrder
9823
9784
  type: string
9824
- SpiceDbRelationshipUpdate:
9825
- properties:
9826
- add:
9827
- anyOf:
9828
- - items:
9829
- $ref: '#/components/schemas/Relation'
9830
- type: array
9831
- - type: 'null'
9832
- title: Add
9833
- remove:
9834
- anyOf:
9835
- - items:
9836
- $ref: '#/components/schemas/Relation'
9837
- type: array
9838
- - type: 'null'
9839
- title: Remove
9840
- title: SpiceDbRelationshipUpdate
9841
- type: object
9842
9785
  StatusChanges:
9843
9786
  properties:
9844
9787
  add:
@@ -11162,7 +11105,7 @@ components:
11162
11105
  title: Username
11163
11106
  title: UserUpdate
11164
11107
  type: object
11165
- UserWithRelationPermissions:
11108
+ UserWithPermissions:
11166
11109
  properties:
11167
11110
  created_on:
11168
11111
  description: The date/time the entry was created on
@@ -11211,7 +11154,7 @@ components:
11211
11154
  permissions:
11212
11155
  anyOf:
11213
11156
  - items:
11214
- $ref: '#/components/schemas/Permission'
11157
+ $ref: '#/components/schemas/PublicPermission'
11215
11158
  type: array
11216
11159
  - type: 'null'
11217
11160
  title: Permissions
@@ -11224,13 +11167,6 @@ components:
11224
11167
  examples:
11225
11168
  - '+1.2125552368'
11226
11169
  title: Phone
11227
- relations:
11228
- anyOf:
11229
- - items:
11230
- $ref: '#/components/schemas/Relation'
11231
- type: array
11232
- - type: 'null'
11233
- title: Relations
11234
11170
  status:
11235
11171
  $ref: '#/components/schemas/UserStatus'
11236
11172
  readOnly: true
@@ -11275,7 +11211,7 @@ components:
11275
11211
  - email
11276
11212
  - locale
11277
11213
  - status
11278
- title: UserWithRelationPermissions
11214
+ title: UserWithPermissions
11279
11215
  type: object
11280
11216
  ValidationError:
11281
11217
  properties:
@@ -11601,7 +11537,7 @@ info:
11601
11537
  \n\n"
11602
11538
  summary: OpusDNS - your gateway to a seamless domain management experience.
11603
11539
  title: OpusDNS API
11604
- version: 2026-06-06-214907
11540
+ version: 2026-06-10-074321
11605
11541
  x-logo:
11606
11542
  altText: OpusDNS API Reference
11607
11543
  url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
@@ -23310,52 +23246,6 @@ paths:
23310
23246
  summary: Update an IP restriction
23311
23247
  tags:
23312
23248
  - organization
23313
- /v1/organizations/roles:
23314
- get:
23315
- description: Retrieves a list of roles for the current organization
23316
- operationId: list_roles_v1_organizations_roles_get
23317
- responses:
23318
- '200':
23319
- content:
23320
- application/json:
23321
- schema: {}
23322
- description: Successful Response
23323
- '401':
23324
- content:
23325
- application/problem+json:
23326
- example:
23327
- code: ERROR_AUTHENTICATION
23328
- detail: Additional error context.
23329
- status: 401
23330
- title: Authentication Error
23331
- type: authentication
23332
- schema:
23333
- $ref: '#/components/schemas/Problem'
23334
- description: Unauthorized
23335
- '403':
23336
- content:
23337
- application/problem+json:
23338
- example:
23339
- code: ERROR_PERMISSION_DENIED
23340
- detail: Insufficient permissions to perform this action
23341
- status: 403
23342
- title: Permission Denied
23343
- type: permission-denied
23344
- schema:
23345
- $ref: '#/components/schemas/Problem'
23346
- description: Forbidden
23347
- '422':
23348
- content:
23349
- application/problem+json:
23350
- schema:
23351
- $ref: '#/components/schemas/HTTPValidationError'
23352
- description: Validation Error
23353
- security:
23354
- - OAuth2PasswordBearer: []
23355
- - APIKeyHeader: []
23356
- summary: List all roles
23357
- tags:
23358
- - organization
23359
23249
  /v1/organizations/users:
23360
23250
  get:
23361
23251
  description: Retrieves a paginated list of users under the current organization
@@ -25285,7 +25175,7 @@ paths:
25285
25175
  content:
25286
25176
  application/json:
25287
25177
  schema:
25288
- $ref: '#/components/schemas/UserWithRelationPermissions'
25178
+ $ref: '#/components/schemas/UserWithPermissions'
25289
25179
  description: Successful Response
25290
25180
  '422':
25291
25181
  content:
@@ -25493,7 +25383,7 @@ paths:
25493
25383
  content:
25494
25384
  application/json:
25495
25385
  schema:
25496
- $ref: '#/components/schemas/PermissionSet'
25386
+ $ref: '#/components/schemas/PublicPermissionSet'
25497
25387
  description: Successful Response
25498
25388
  '422':
25499
25389
  content:
@@ -25507,10 +25397,10 @@ paths:
25507
25397
  summary: Get user permissions
25508
25398
  tags:
25509
25399
  - user
25510
- /v1/users/{user_id}/roles:
25400
+ /v1/users/{user_id}/role:
25511
25401
  get:
25512
- description: Get the roles for a user
25513
- operationId: list_roles_v1_users__user_id__roles_get
25402
+ description: Get the role for a user
25403
+ operationId: get_role_v1_users__user_id__role_get
25514
25404
  parameters:
25515
25405
  - in: path
25516
25406
  name: user_id
@@ -25528,7 +25418,7 @@ paths:
25528
25418
  content:
25529
25419
  application/json:
25530
25420
  schema:
25531
- $ref: '#/components/schemas/RelationSet'
25421
+ $ref: '#/components/schemas/PublicRoleAssignment'
25532
25422
  description: Successful Response
25533
25423
  '422':
25534
25424
  content:
@@ -25539,12 +25429,12 @@ paths:
25539
25429
  security:
25540
25430
  - OAuth2PasswordBearer: []
25541
25431
  - APIKeyHeader: []
25542
- summary: Get user roles
25432
+ summary: Get user role
25543
25433
  tags:
25544
25434
  - user
25545
- patch:
25546
- description: Update the roles for a user
25547
- operationId: update_user_relations_v1_users__user_id__roles_patch
25435
+ put:
25436
+ description: Set the role for a user, replacing any existing role
25437
+ operationId: set_user_role_v1_users__user_id__role_put
25548
25438
  parameters:
25549
25439
  - in: path
25550
25440
  name: user_id
@@ -25561,14 +25451,14 @@ paths:
25561
25451
  content:
25562
25452
  application/json:
25563
25453
  schema:
25564
- $ref: '#/components/schemas/SpiceDbRelationshipUpdate'
25454
+ $ref: '#/components/schemas/PublicRoleAssignment'
25565
25455
  required: true
25566
25456
  responses:
25567
25457
  '200':
25568
25458
  content:
25569
25459
  application/json:
25570
25460
  schema:
25571
- $ref: '#/components/schemas/RelationSet'
25461
+ $ref: '#/components/schemas/PublicRoleAssignment'
25572
25462
  description: Successful Response
25573
25463
  '422':
25574
25464
  content:
@@ -25579,7 +25469,7 @@ paths:
25579
25469
  security:
25580
25470
  - OAuth2PasswordBearer: []
25581
25471
  - APIKeyHeader: []
25582
- summary: Update user roles
25472
+ summary: Set user role
25583
25473
  tags:
25584
25474
  - user
25585
25475
  servers:
package/src/schema.d.ts CHANGED
@@ -1855,26 +1855,6 @@ export interface paths {
1855
1855
  patch: operations["update_ip_restriction_v1_organizations_ip_restrictions__ip_restriction_id__patch"];
1856
1856
  trace?: never;
1857
1857
  };
1858
- "/v1/organizations/roles": {
1859
- parameters: {
1860
- query?: never;
1861
- header?: never;
1862
- path?: never;
1863
- cookie?: never;
1864
- };
1865
- /**
1866
- * List all roles
1867
- * @description Retrieves a list of roles for the current organization
1868
- */
1869
- get: operations["list_roles_v1_organizations_roles_get"];
1870
- put?: never;
1871
- post?: never;
1872
- delete?: never;
1873
- options?: never;
1874
- head?: never;
1875
- patch?: never;
1876
- trace?: never;
1877
- };
1878
1858
  "/v1/organizations/users": {
1879
1859
  parameters: {
1880
1860
  query?: never;
@@ -2436,7 +2416,7 @@ export interface paths {
2436
2416
  patch?: never;
2437
2417
  trace?: never;
2438
2418
  };
2439
- "/v1/users/{user_id}/roles": {
2419
+ "/v1/users/{user_id}/role": {
2440
2420
  parameters: {
2441
2421
  query?: never;
2442
2422
  header?: never;
@@ -2444,20 +2424,20 @@ export interface paths {
2444
2424
  cookie?: never;
2445
2425
  };
2446
2426
  /**
2447
- * Get user roles
2448
- * @description Get the roles for a user
2427
+ * Get user role
2428
+ * @description Get the role for a user
2449
2429
  */
2450
- get: operations["list_roles_v1_users__user_id__roles_get"];
2451
- put?: never;
2430
+ get: operations["get_role_v1_users__user_id__role_get"];
2431
+ /**
2432
+ * Set user role
2433
+ * @description Set the role for a user, replacing any existing role
2434
+ */
2435
+ put: operations["set_user_role_v1_users__user_id__role_put"];
2452
2436
  post?: never;
2453
2437
  delete?: never;
2454
2438
  options?: never;
2455
2439
  head?: never;
2456
- /**
2457
- * Update user roles
2458
- * @description Update the roles for a user
2459
- */
2460
- patch: operations["update_user_relations_v1_users__user_id__roles_patch"];
2440
+ patch?: never;
2461
2441
  trace?: never;
2462
2442
  };
2463
2443
  }
@@ -8465,16 +8445,6 @@ export interface components {
8465
8445
  * @enum {string}
8466
8446
  */
8467
8447
  PeriodUnit: "y" | "m" | "d";
8468
- /**
8469
- * Permission
8470
- * @enum {string}
8471
- */
8472
- Permission: "bulk_create" | "bulk_delete" | "bulk_renew_expire" | "bulk_transfer_trade" | "bulk_update" | "corporate_plan" | "create" | "create_vanity_ns" | "delete" | "delete_domain_forwards" | "enterprise_plan" | "has_accepted_tos" | "manage_api_keys" | "manage_billing" | "manage_chats" | "manage_cms_content" | "manage_contacts" | "manage_dns_zones" | "manage_domains" | "manage_domain_forwards" | "manage_email_forwards" | "manage_events" | "manage_hosts" | "manage_jobs" | "manage_opusdns_api_keys" | "manage_parking" | "manage_products" | "manage_registrar_credentials" | "manage_reseller" | "manage_sub_zones" | "manage_tags" | "manage_users" | "manage_user_relations" | "manage_vanity_ns" | "plan_manager" | "premium_plan" | "renew_expire" | "starter_plan" | "transfer_trade" | "update" | "update_domain_forwards" | "verify" | "view" | "view_audit_logs" | "view_domain_forwards" | "view_email_forwards" | "view_events" | "view_parking" | "view_vanity_ns";
8473
- /** PermissionSet */
8474
- PermissionSet: {
8475
- /** Permissions */
8476
- permissions?: components["schemas"]["Permission"][];
8477
- };
8478
8448
  /** PlatformStatsBucket */
8479
8449
  PlatformStatsBucket: {
8480
8450
  /** Key */
@@ -8643,6 +8613,17 @@ export interface components {
8643
8613
  */
8644
8614
  grant_type: string;
8645
8615
  };
8616
+ /**
8617
+ * @example domains:read
8618
+ * @example domains:manage
8619
+ * @example domains:delete
8620
+ */
8621
+ PublicPermission: string;
8622
+ /** PublicPermissionSet */
8623
+ PublicPermissionSet: {
8624
+ /** Permissions */
8625
+ permissions?: components["schemas"]["PublicPermission"][];
8626
+ };
8646
8627
  /** PublicReportListRes */
8647
8628
  PublicReportListRes: {
8648
8629
  pagination: components["schemas"]["PaginationMetadata"];
@@ -8683,6 +8664,25 @@ export interface components {
8683
8664
  */
8684
8665
  updated_on: Date;
8685
8666
  };
8667
+ /**
8668
+ * PublicResource
8669
+ * @enum {string}
8670
+ */
8671
+ PublicResource: "domains" | "contacts" | "dns" | "hosts" | "email_forwards" | "domain_forwards" | "parking" | "events" | "jobs" | "billing" | "users" | "api_keys" | "registrar_credentials" | "tags" | "audit_logs" | "vanity_ns";
8672
+ /**
8673
+ * PublicRole
8674
+ * @enum {string}
8675
+ */
8676
+ PublicRole: "admin" | "viewer" | "domain_manager" | "dns_manager" | "billing_manager";
8677
+ /** PublicRoleAssignment */
8678
+ PublicRoleAssignment: {
8679
+ role?: components["schemas"]["PublicRole"] | null;
8680
+ };
8681
+ /**
8682
+ * PublicScope
8683
+ * @enum {string}
8684
+ */
8685
+ PublicScope: "read" | "manage" | "delete";
8686
8686
  /** RdapBase */
8687
8687
  RdapBase: {
8688
8688
  /**
@@ -8739,16 +8739,6 @@ export interface components {
8739
8739
  */
8740
8740
  supported: boolean;
8741
8741
  };
8742
- /**
8743
- * Relation
8744
- * @enum {string}
8745
- */
8746
- Relation: "accepted_tos" | "admin" | "api_admin" | "billing_manager" | "chat_manager" | "client_api_key" | "cms_content_editor" | "contact_manager" | "domain_forward_manager" | "domain_manager" | "email_forward_manager" | "events_manager" | "host_manager" | "member" | "opusdns_internal_api_key" | "organization_manager" | "owner" | "parent" | "product_manager" | "registrar_credential_manager" | "reseller_manager" | "root_admin" | "self";
8747
- /** RelationSet */
8748
- RelationSet: {
8749
- /** Relations */
8750
- relations?: components["schemas"]["Relation"][];
8751
- };
8752
8742
  /**
8753
8743
  * RenewalMode
8754
8744
  * @enum {string}
@@ -8891,13 +8881,6 @@ export interface components {
8891
8881
  * @enum {string}
8892
8882
  */
8893
8883
  SortOrder: "asc" | "desc";
8894
- /** SpiceDbRelationshipUpdate */
8895
- SpiceDbRelationshipUpdate: {
8896
- /** Add */
8897
- add?: components["schemas"]["Relation"][] | null;
8898
- /** Remove */
8899
- remove?: components["schemas"]["Relation"][] | null;
8900
- };
8901
8884
  /** StatusChanges */
8902
8885
  StatusChanges: {
8903
8886
  /**
@@ -9834,8 +9817,8 @@ export interface components {
9834
9817
  */
9835
9818
  username?: string | null;
9836
9819
  };
9837
- /** UserWithRelationPermissions */
9838
- UserWithRelationPermissions: {
9820
+ /** UserWithPermissions */
9821
+ UserWithPermissions: {
9839
9822
  /**
9840
9823
  * Created On
9841
9824
  * Format: date-time
@@ -9877,15 +9860,13 @@ export interface components {
9877
9860
  */
9878
9861
  organization_id: TypeId<"organization">;
9879
9862
  /** Permissions */
9880
- permissions?: components["schemas"]["Permission"][] | null;
9863
+ permissions?: components["schemas"]["PublicPermission"][] | null;
9881
9864
  /**
9882
9865
  * Phone
9883
9866
  * @description The user's phone number
9884
9867
  * @example +1.2125552368
9885
9868
  */
9886
9869
  phone?: string | null;
9887
- /** Relations */
9888
- relations?: components["schemas"]["Relation"][] | null;
9889
9870
  readonly status: components["schemas"]["UserStatus"];
9890
9871
  /**
9891
9872
  * Updated On
@@ -18657,67 +18638,6 @@ export interface operations {
18657
18638
  };
18658
18639
  };
18659
18640
  };
18660
- list_roles_v1_organizations_roles_get: {
18661
- parameters: {
18662
- query?: never;
18663
- header?: never;
18664
- path?: never;
18665
- cookie?: never;
18666
- };
18667
- requestBody?: never;
18668
- responses: {
18669
- /** @description Successful Response */
18670
- 200: {
18671
- headers: {
18672
- [name: string]: unknown;
18673
- };
18674
- content: {
18675
- "application/json": unknown;
18676
- };
18677
- };
18678
- /** @description Unauthorized */
18679
- 401: {
18680
- headers: {
18681
- [name: string]: unknown;
18682
- };
18683
- content: {
18684
- /** @example {
18685
- * "code": "ERROR_AUTHENTICATION",
18686
- * "detail": "Additional error context.",
18687
- * "status": 401,
18688
- * "title": "Authentication Error",
18689
- * "type": "authentication"
18690
- * } */
18691
- "application/problem+json": components["schemas"]["Problem"];
18692
- };
18693
- };
18694
- /** @description Forbidden */
18695
- 403: {
18696
- headers: {
18697
- [name: string]: unknown;
18698
- };
18699
- content: {
18700
- /** @example {
18701
- * "code": "ERROR_PERMISSION_DENIED",
18702
- * "detail": "Insufficient permissions to perform this action",
18703
- * "status": 403,
18704
- * "title": "Permission Denied",
18705
- * "type": "permission-denied"
18706
- * } */
18707
- "application/problem+json": components["schemas"]["Problem"];
18708
- };
18709
- };
18710
- /** @description Validation Error */
18711
- 422: {
18712
- headers: {
18713
- [name: string]: unknown;
18714
- };
18715
- content: {
18716
- "application/problem+json": components["schemas"]["HTTPValidationError"];
18717
- };
18718
- };
18719
- };
18720
- };
18721
18641
  list_users_v1_organizations_users_get: {
18722
18642
  parameters: {
18723
18643
  query?: {
@@ -20466,7 +20386,7 @@ export interface operations {
20466
20386
  [name: string]: unknown;
20467
20387
  };
20468
20388
  content: {
20469
- "application/json": components["schemas"]["UserWithRelationPermissions"];
20389
+ "application/json": components["schemas"]["UserWithPermissions"];
20470
20390
  };
20471
20391
  };
20472
20392
  /** @description Validation Error */
@@ -20673,7 +20593,7 @@ export interface operations {
20673
20593
  [name: string]: unknown;
20674
20594
  };
20675
20595
  content: {
20676
- "application/json": components["schemas"]["PermissionSet"];
20596
+ "application/json": components["schemas"]["PublicPermissionSet"];
20677
20597
  };
20678
20598
  };
20679
20599
  /** @description Validation Error */
@@ -20687,7 +20607,7 @@ export interface operations {
20687
20607
  };
20688
20608
  };
20689
20609
  };
20690
- list_roles_v1_users__user_id__roles_get: {
20610
+ get_role_v1_users__user_id__role_get: {
20691
20611
  parameters: {
20692
20612
  query?: never;
20693
20613
  header?: never;
@@ -20704,7 +20624,7 @@ export interface operations {
20704
20624
  [name: string]: unknown;
20705
20625
  };
20706
20626
  content: {
20707
- "application/json": components["schemas"]["RelationSet"];
20627
+ "application/json": components["schemas"]["PublicRoleAssignment"];
20708
20628
  };
20709
20629
  };
20710
20630
  /** @description Validation Error */
@@ -20718,7 +20638,7 @@ export interface operations {
20718
20638
  };
20719
20639
  };
20720
20640
  };
20721
- update_user_relations_v1_users__user_id__roles_patch: {
20641
+ set_user_role_v1_users__user_id__role_put: {
20722
20642
  parameters: {
20723
20643
  query?: never;
20724
20644
  header?: never;
@@ -20729,7 +20649,7 @@ export interface operations {
20729
20649
  };
20730
20650
  requestBody: {
20731
20651
  content: {
20732
- "application/json": components["schemas"]["SpiceDbRelationshipUpdate"];
20652
+ "application/json": components["schemas"]["PublicRoleAssignment"];
20733
20653
  };
20734
20654
  };
20735
20655
  responses: {
@@ -20739,7 +20659,7 @@ export interface operations {
20739
20659
  [name: string]: unknown;
20740
20660
  };
20741
20661
  content: {
20742
- "application/json": components["schemas"]["RelationSet"];
20662
+ "application/json": components["schemas"]["PublicRoleAssignment"];
20743
20663
  };
20744
20664
  };
20745
20665
  /** @description Validation Error */