@opusdns/api 1.4.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 +1 -1
- package/src/helpers/constants.ts +69 -260
- package/src/helpers/keys.ts +46 -57
- package/src/helpers/requests.d.ts +9 -12
- package/src/helpers/responses.d.ts +13 -19
- package/src/helpers/schemas.d.ts +7 -6
- package/src/openapi.yaml +76 -237
- package/src/schema.d.ts +50 -130
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}/
|
|
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
|
|
2448
|
-
* @description Get the
|
|
2427
|
+
* Get user role
|
|
2428
|
+
* @description Get the role for a user
|
|
2449
2429
|
*/
|
|
2450
|
-
get: operations["
|
|
2451
|
-
|
|
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_api_keys" | "delete_contacts" | "delete_dns_zones" | "delete_domains" | "delete_domain_forwards" | "delete_email_forwards" | "delete_events" | "delete_hosts" | "delete_jobs" | "delete_parking" | "delete_registrar_credentials" | "delete_tags" | "delete_users" | "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_api_keys" | "view_audit_logs" | "view_billing" | "view_contacts" | "view_dns_zones" | "view_domains" | "view_domain_forwards" | "view_email_forwards" | "view_events" | "view_hosts" | "view_jobs" | "view_parking" | "view_registrar_credentials" | "view_tags" | "view_users" | "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" | "root_admin" | "owner" | "parent" | "admin" | "member" | "client_api_key" | "opusdns_internal_api_key" | "reseller_manager" | "chat_manager" | "domain_view" | "domain_manage" | "domain_delete" | "contact_view" | "contact_manage" | "contact_delete" | "dns_zone_view" | "dns_zone_manage" | "dns_zone_delete" | "host_view" | "host_manage" | "host_delete" | "email_forward_view" | "email_forward_manage" | "email_forward_delete" | "domain_forward_view" | "domain_forward_manage" | "domain_forward_delete" | "parking_view" | "parking_manage" | "parking_delete" | "events_view" | "events_manage" | "events_delete" | "jobs_view" | "jobs_manage" | "jobs_delete" | "tag_view" | "tag_manage" | "tag_delete" | "registrar_credential_view" | "registrar_credential_manage" | "registrar_credential_delete" | "user_view" | "user_manage" | "user_delete" | "api_key_view" | "api_key_manage" | "api_key_delete" | "billing_view" | "billing_manage" | "audit_log_view";
|
|
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
|
-
/**
|
|
9838
|
-
|
|
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"]["
|
|
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"]["
|
|
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"]["
|
|
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
|
-
|
|
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"]["
|
|
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
|
-
|
|
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"]["
|
|
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"]["
|
|
20662
|
+
"application/json": components["schemas"]["PublicRoleAssignment"];
|
|
20743
20663
|
};
|
|
20744
20664
|
};
|
|
20745
20665
|
/** @description Validation Error */
|