@opusdns/api 1.15.0 → 1.16.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/src/schema.d.ts CHANGED
@@ -1903,6 +1903,78 @@ export interface paths {
1903
1903
  patch: operations["update_ip_restriction_v1_organizations_ip_restrictions__ip_restriction_id__patch"];
1904
1904
  trace?: never;
1905
1905
  };
1906
+ "/v1/organizations/role-permissions": {
1907
+ parameters: {
1908
+ query?: never;
1909
+ header?: never;
1910
+ path?: never;
1911
+ cookie?: never;
1912
+ };
1913
+ /**
1914
+ * List grantable role permissions
1915
+ * @description Retrieves the catalog of `resource:scope` permissions a custom role may grant
1916
+ */
1917
+ get: operations["list_role_permissions_v1_organizations_role_permissions_get"];
1918
+ put?: never;
1919
+ post?: never;
1920
+ delete?: never;
1921
+ options?: never;
1922
+ head?: never;
1923
+ patch?: never;
1924
+ trace?: never;
1925
+ };
1926
+ "/v1/organizations/roles": {
1927
+ parameters: {
1928
+ query?: never;
1929
+ header?: never;
1930
+ path?: never;
1931
+ cookie?: never;
1932
+ };
1933
+ /**
1934
+ * List roles
1935
+ * @description Retrieves all roles assignable in the current organization: the built-in roles plus the organization's custom roles
1936
+ */
1937
+ get: operations["list_roles_v1_organizations_roles_get"];
1938
+ put?: never;
1939
+ /**
1940
+ * Create a custom role
1941
+ * @description Creates an organization-owned custom role granting the requested permissions. The escalation-bearing admin/owner permissions cannot be granted.
1942
+ */
1943
+ post: operations["create_role_v1_organizations_roles_post"];
1944
+ delete?: never;
1945
+ options?: never;
1946
+ head?: never;
1947
+ patch?: never;
1948
+ trace?: never;
1949
+ };
1950
+ "/v1/organizations/roles/{label}": {
1951
+ parameters: {
1952
+ query?: never;
1953
+ header?: never;
1954
+ path?: never;
1955
+ cookie?: never;
1956
+ };
1957
+ /**
1958
+ * Get a role
1959
+ * @description Retrieves a single role (built-in or custom) by its name
1960
+ */
1961
+ get: operations["get_role_v1_organizations_roles__label__get"];
1962
+ put?: never;
1963
+ post?: never;
1964
+ /**
1965
+ * Delete a custom role
1966
+ * @description Deletes a custom role. Refused while the role is still assigned to any subject, and for built-in roles.
1967
+ */
1968
+ delete: operations["delete_role_v1_organizations_roles__label__delete"];
1969
+ options?: never;
1970
+ head?: never;
1971
+ /**
1972
+ * Update a custom role
1973
+ * @description Updates a custom role's name, description and/or permission set. Permission changes apply to every subject holding the role instantly. Built-in roles are immutable.
1974
+ */
1975
+ patch: operations["update_role_v1_organizations_roles__label__patch"];
1976
+ trace?: never;
1977
+ };
1906
1978
  "/v1/organizations/users": {
1907
1979
  parameters: {
1908
1980
  query?: never;
@@ -3994,6 +4066,49 @@ export interface components {
3994
4066
  * @enum {string}
3995
4067
  */
3996
4068
  Currency: "USD" | "EUR";
4069
+ /**
4070
+ * CustomRoleCreate
4071
+ * @description Request body for creating a custom role.
4072
+ */
4073
+ CustomRoleCreate: {
4074
+ /**
4075
+ * Description
4076
+ * @description Description of the custom role.
4077
+ */
4078
+ description?: string | null;
4079
+ /**
4080
+ * Name
4081
+ * @description Display name of the custom role as provided by the user (e.g. 'Support Staff').
4082
+ */
4083
+ name: string;
4084
+ /**
4085
+ * Permissions
4086
+ * @description Permissions the role grants, as `resource:scope` (e.g. `domains:read`). The escalation-bearing admin/owner permissions cannot be granted.
4087
+ */
4088
+ permissions: components["schemas"]["PublicPermission"][];
4089
+ };
4090
+ /**
4091
+ * CustomRoleUpdate
4092
+ * @description Request body for updating a custom role. Omitted fields are left unchanged; `permissions`
4093
+ * is a full replacement set when provided.
4094
+ */
4095
+ CustomRoleUpdate: {
4096
+ /**
4097
+ * Description
4098
+ * @description New description.
4099
+ */
4100
+ description?: string | null;
4101
+ /**
4102
+ * Name
4103
+ * @description New display name.
4104
+ */
4105
+ name?: string | null;
4106
+ /**
4107
+ * Permissions
4108
+ * @description Full replacement set of `resource:scope` permissions the role grants.
4109
+ */
4110
+ permissions?: components["schemas"]["PublicPermission"][] | null;
4111
+ };
3997
4112
  /**
3998
4113
  * DeletePolicyType
3999
4114
  * @enum {string}
@@ -9070,7 +9185,7 @@ export interface components {
9070
9185
  * PublicResource
9071
9186
  * @enum {string}
9072
9187
  */
9073
- PublicResource: "domains" | "contacts" | "dns" | "hosts" | "email_forwards" | "domain_forwards" | "parking" | "events" | "jobs" | "billing" | "users" | "api_keys" | "registrar_credentials" | "tags" | "audit_logs" | "vanity_ns";
9188
+ PublicResource: "organization" | "domains" | "contacts" | "dns" | "hosts" | "email_forwards" | "domain_forwards" | "parking" | "events" | "jobs" | "billing" | "users" | "api_keys" | "registrar_credentials" | "tags" | "audit_logs" | "vanity_ns";
9074
9189
  /**
9075
9190
  * PublicRole
9076
9191
  * @enum {string}
@@ -9084,6 +9199,47 @@ export interface components {
9084
9199
  PublicRoleAssignmentRequest: {
9085
9200
  role?: components["schemas"]["AssignablePublicRole"] | null;
9086
9201
  };
9202
+ /**
9203
+ * PublicRoleDefinition
9204
+ * @description A role as listed/read through the public API — built-in or custom.
9205
+ */
9206
+ PublicRoleDefinition: {
9207
+ /**
9208
+ * Built In
9209
+ * @description Built-in roles are immutable; custom roles are organization-owned.
9210
+ */
9211
+ built_in: boolean;
9212
+ /**
9213
+ * Created On
9214
+ * @description Creation time (custom roles only).
9215
+ */
9216
+ created_on?: Date | null;
9217
+ /**
9218
+ * Description
9219
+ * @description Description of the role.
9220
+ */
9221
+ description?: string | null;
9222
+ /**
9223
+ * Label
9224
+ * @description Per-organization unique identifier (snake_case, e.g. 'support_staff'). Used as the URL path parameter.
9225
+ */
9226
+ label: string;
9227
+ /**
9228
+ * Name
9229
+ * @description Display name of the role (e.g. 'Support Staff').
9230
+ */
9231
+ name: string;
9232
+ /**
9233
+ * Permissions
9234
+ * @description Permissions the role grants, as `resource:scope` strings.
9235
+ */
9236
+ permissions: components["schemas"]["PublicPermission"][];
9237
+ /**
9238
+ * Updated On
9239
+ * @description Last update time (custom roles only).
9240
+ */
9241
+ updated_on?: Date | null;
9242
+ };
9087
9243
  /**
9088
9244
  * PublicScope
9089
9245
  * @enum {string}
@@ -19456,6 +19612,486 @@ export interface operations {
19456
19612
  };
19457
19613
  };
19458
19614
  };
19615
+ list_role_permissions_v1_organizations_role_permissions_get: {
19616
+ parameters: {
19617
+ query?: never;
19618
+ header?: never;
19619
+ path?: never;
19620
+ cookie?: never;
19621
+ };
19622
+ requestBody?: never;
19623
+ responses: {
19624
+ /** @description Successful Response */
19625
+ 200: {
19626
+ headers: {
19627
+ [name: string]: unknown;
19628
+ };
19629
+ content: {
19630
+ "application/json": components["schemas"]["PublicPermissionSet"];
19631
+ };
19632
+ };
19633
+ /** @description Unauthorized */
19634
+ 401: {
19635
+ headers: {
19636
+ [name: string]: unknown;
19637
+ };
19638
+ content: {
19639
+ /** @example {
19640
+ * "code": "ERROR_AUTHENTICATION",
19641
+ * "detail": "Additional error context.",
19642
+ * "status": 401,
19643
+ * "title": "Authentication Error",
19644
+ * "type": "authentication"
19645
+ * } */
19646
+ "application/problem+json": components["schemas"]["Problem"];
19647
+ };
19648
+ };
19649
+ /** @description Forbidden */
19650
+ 403: {
19651
+ headers: {
19652
+ [name: string]: unknown;
19653
+ };
19654
+ content: {
19655
+ /** @example {
19656
+ * "code": "ERROR_PERMISSION_DENIED",
19657
+ * "detail": "Insufficient permissions to perform this action",
19658
+ * "status": 403,
19659
+ * "title": "Permission Denied",
19660
+ * "type": "permission-denied"
19661
+ * } */
19662
+ "application/problem+json": components["schemas"]["Problem"];
19663
+ };
19664
+ };
19665
+ /** @description Validation Error */
19666
+ 422: {
19667
+ headers: {
19668
+ [name: string]: unknown;
19669
+ };
19670
+ content: {
19671
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
19672
+ };
19673
+ };
19674
+ };
19675
+ };
19676
+ list_roles_v1_organizations_roles_get: {
19677
+ parameters: {
19678
+ query?: never;
19679
+ header?: never;
19680
+ path?: never;
19681
+ cookie?: never;
19682
+ };
19683
+ requestBody?: never;
19684
+ responses: {
19685
+ /** @description Successful Response */
19686
+ 200: {
19687
+ headers: {
19688
+ [name: string]: unknown;
19689
+ };
19690
+ content: {
19691
+ "application/json": components["schemas"]["PublicRoleDefinition"][];
19692
+ };
19693
+ };
19694
+ /** @description Unauthorized */
19695
+ 401: {
19696
+ headers: {
19697
+ [name: string]: unknown;
19698
+ };
19699
+ content: {
19700
+ /** @example {
19701
+ * "code": "ERROR_AUTHENTICATION",
19702
+ * "detail": "Additional error context.",
19703
+ * "status": 401,
19704
+ * "title": "Authentication Error",
19705
+ * "type": "authentication"
19706
+ * } */
19707
+ "application/problem+json": components["schemas"]["Problem"];
19708
+ };
19709
+ };
19710
+ /** @description Forbidden */
19711
+ 403: {
19712
+ headers: {
19713
+ [name: string]: unknown;
19714
+ };
19715
+ content: {
19716
+ /** @example {
19717
+ * "code": "ERROR_PERMISSION_DENIED",
19718
+ * "detail": "Insufficient permissions to perform this action",
19719
+ * "status": 403,
19720
+ * "title": "Permission Denied",
19721
+ * "type": "permission-denied"
19722
+ * } */
19723
+ "application/problem+json": components["schemas"]["Problem"];
19724
+ };
19725
+ };
19726
+ /** @description Validation Error */
19727
+ 422: {
19728
+ headers: {
19729
+ [name: string]: unknown;
19730
+ };
19731
+ content: {
19732
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
19733
+ };
19734
+ };
19735
+ };
19736
+ };
19737
+ create_role_v1_organizations_roles_post: {
19738
+ parameters: {
19739
+ query?: never;
19740
+ header?: never;
19741
+ path?: never;
19742
+ cookie?: never;
19743
+ };
19744
+ requestBody: {
19745
+ content: {
19746
+ "application/json": components["schemas"]["CustomRoleCreate"];
19747
+ };
19748
+ };
19749
+ responses: {
19750
+ /** @description Successful Response */
19751
+ 201: {
19752
+ headers: {
19753
+ [name: string]: unknown;
19754
+ };
19755
+ content: {
19756
+ "application/json": components["schemas"]["PublicRoleDefinition"];
19757
+ };
19758
+ };
19759
+ /** @description Unauthorized */
19760
+ 401: {
19761
+ headers: {
19762
+ [name: string]: unknown;
19763
+ };
19764
+ content: {
19765
+ /** @example {
19766
+ * "code": "ERROR_AUTHENTICATION",
19767
+ * "detail": "Additional error context.",
19768
+ * "status": 401,
19769
+ * "title": "Authentication Error",
19770
+ * "type": "authentication"
19771
+ * } */
19772
+ "application/problem+json": components["schemas"]["Problem"];
19773
+ };
19774
+ };
19775
+ /** @description Forbidden */
19776
+ 403: {
19777
+ headers: {
19778
+ [name: string]: unknown;
19779
+ };
19780
+ content: {
19781
+ /** @example {
19782
+ * "code": "ERROR_PERMISSION_DENIED",
19783
+ * "detail": "Insufficient permissions to perform this action",
19784
+ * "status": 403,
19785
+ * "title": "Permission Denied",
19786
+ * "type": "permission-denied"
19787
+ * } */
19788
+ "application/problem+json": components["schemas"]["Problem"];
19789
+ };
19790
+ };
19791
+ /** @description Conflict */
19792
+ 409: {
19793
+ headers: {
19794
+ [name: string]: unknown;
19795
+ };
19796
+ content: {
19797
+ /** @example {
19798
+ * "code": "ERROR_DUPLICATE_ROLE_NAME",
19799
+ * "detail": "A role named 'support' already exists in this organization",
19800
+ * "status": 409,
19801
+ * "title": "Role Management Error",
19802
+ * "type": "duplicate-role-name"
19803
+ * } */
19804
+ "application/problem+json": components["schemas"]["Problem"];
19805
+ };
19806
+ };
19807
+ /** @description Validation Error */
19808
+ 422: {
19809
+ headers: {
19810
+ [name: string]: unknown;
19811
+ };
19812
+ content: {
19813
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
19814
+ };
19815
+ };
19816
+ };
19817
+ };
19818
+ get_role_v1_organizations_roles__label__get: {
19819
+ parameters: {
19820
+ query?: never;
19821
+ header?: never;
19822
+ path: {
19823
+ label: string;
19824
+ };
19825
+ cookie?: never;
19826
+ };
19827
+ requestBody?: never;
19828
+ responses: {
19829
+ /** @description Successful Response */
19830
+ 200: {
19831
+ headers: {
19832
+ [name: string]: unknown;
19833
+ };
19834
+ content: {
19835
+ "application/json": components["schemas"]["PublicRoleDefinition"];
19836
+ };
19837
+ };
19838
+ /** @description Unauthorized */
19839
+ 401: {
19840
+ headers: {
19841
+ [name: string]: unknown;
19842
+ };
19843
+ content: {
19844
+ /** @example {
19845
+ * "code": "ERROR_AUTHENTICATION",
19846
+ * "detail": "Additional error context.",
19847
+ * "status": 401,
19848
+ * "title": "Authentication Error",
19849
+ * "type": "authentication"
19850
+ * } */
19851
+ "application/problem+json": components["schemas"]["Problem"];
19852
+ };
19853
+ };
19854
+ /** @description Forbidden */
19855
+ 403: {
19856
+ headers: {
19857
+ [name: string]: unknown;
19858
+ };
19859
+ content: {
19860
+ /** @example {
19861
+ * "code": "ERROR_PERMISSION_DENIED",
19862
+ * "detail": "Insufficient permissions to perform this action",
19863
+ * "status": 403,
19864
+ * "title": "Permission Denied",
19865
+ * "type": "permission-denied"
19866
+ * } */
19867
+ "application/problem+json": components["schemas"]["Problem"];
19868
+ };
19869
+ };
19870
+ /** @description Not Found */
19871
+ 404: {
19872
+ headers: {
19873
+ [name: string]: unknown;
19874
+ };
19875
+ content: {
19876
+ /** @example {
19877
+ * "code": "ERROR_ROLE_NOT_FOUND",
19878
+ * "detail": "Role not found",
19879
+ * "role_name": "support",
19880
+ * "status": 404,
19881
+ * "title": "Role Management Error",
19882
+ * "type": "role-not-found"
19883
+ * } */
19884
+ "application/problem+json": components["schemas"]["Problem"];
19885
+ };
19886
+ };
19887
+ /** @description Validation Error */
19888
+ 422: {
19889
+ headers: {
19890
+ [name: string]: unknown;
19891
+ };
19892
+ content: {
19893
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
19894
+ };
19895
+ };
19896
+ };
19897
+ };
19898
+ delete_role_v1_organizations_roles__label__delete: {
19899
+ parameters: {
19900
+ query?: never;
19901
+ header?: never;
19902
+ path: {
19903
+ label: string;
19904
+ };
19905
+ cookie?: never;
19906
+ };
19907
+ requestBody?: never;
19908
+ responses: {
19909
+ /** @description Successful Response */
19910
+ 204: {
19911
+ headers: {
19912
+ [name: string]: unknown;
19913
+ };
19914
+ content?: never;
19915
+ };
19916
+ /** @description Unauthorized */
19917
+ 401: {
19918
+ headers: {
19919
+ [name: string]: unknown;
19920
+ };
19921
+ content: {
19922
+ /** @example {
19923
+ * "code": "ERROR_AUTHENTICATION",
19924
+ * "detail": "Additional error context.",
19925
+ * "status": 401,
19926
+ * "title": "Authentication Error",
19927
+ * "type": "authentication"
19928
+ * } */
19929
+ "application/problem+json": components["schemas"]["Problem"];
19930
+ };
19931
+ };
19932
+ /** @description Forbidden */
19933
+ 403: {
19934
+ headers: {
19935
+ [name: string]: unknown;
19936
+ };
19937
+ content: {
19938
+ /** @example {
19939
+ * "code": "ERROR_PERMISSION_DENIED",
19940
+ * "detail": "Insufficient permissions to perform this action",
19941
+ * "status": 403,
19942
+ * "title": "Permission Denied",
19943
+ * "type": "permission-denied"
19944
+ * } */
19945
+ "application/problem+json": components["schemas"]["Problem"];
19946
+ };
19947
+ };
19948
+ /** @description Not Found */
19949
+ 404: {
19950
+ headers: {
19951
+ [name: string]: unknown;
19952
+ };
19953
+ content: {
19954
+ /** @example {
19955
+ * "code": "ERROR_ROLE_NOT_FOUND",
19956
+ * "detail": "Role not found",
19957
+ * "role_name": "support",
19958
+ * "status": 404,
19959
+ * "title": "Role Management Error",
19960
+ * "type": "role-not-found"
19961
+ * } */
19962
+ "application/problem+json": components["schemas"]["Problem"];
19963
+ };
19964
+ };
19965
+ /** @description Conflict */
19966
+ 409: {
19967
+ headers: {
19968
+ [name: string]: unknown;
19969
+ };
19970
+ content: {
19971
+ /** @example {
19972
+ * "binding_count": 1,
19973
+ * "code": "ERROR_ROLE_IN_USE",
19974
+ * "detail": "Role is still assigned to one or more subjects and cannot be deleted",
19975
+ * "role_name": "support",
19976
+ * "status": 409,
19977
+ * "title": "Role Management Error",
19978
+ * "type": "role-in-use"
19979
+ * } */
19980
+ "application/problem+json": components["schemas"]["Problem"];
19981
+ };
19982
+ };
19983
+ /** @description Validation Error */
19984
+ 422: {
19985
+ headers: {
19986
+ [name: string]: unknown;
19987
+ };
19988
+ content: {
19989
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
19990
+ };
19991
+ };
19992
+ };
19993
+ };
19994
+ update_role_v1_organizations_roles__label__patch: {
19995
+ parameters: {
19996
+ query?: never;
19997
+ header?: never;
19998
+ path: {
19999
+ label: string;
20000
+ };
20001
+ cookie?: never;
20002
+ };
20003
+ requestBody: {
20004
+ content: {
20005
+ "application/json": components["schemas"]["CustomRoleUpdate"];
20006
+ };
20007
+ };
20008
+ responses: {
20009
+ /** @description Successful Response */
20010
+ 200: {
20011
+ headers: {
20012
+ [name: string]: unknown;
20013
+ };
20014
+ content: {
20015
+ "application/json": components["schemas"]["PublicRoleDefinition"];
20016
+ };
20017
+ };
20018
+ /** @description Unauthorized */
20019
+ 401: {
20020
+ headers: {
20021
+ [name: string]: unknown;
20022
+ };
20023
+ content: {
20024
+ /** @example {
20025
+ * "code": "ERROR_AUTHENTICATION",
20026
+ * "detail": "Additional error context.",
20027
+ * "status": 401,
20028
+ * "title": "Authentication Error",
20029
+ * "type": "authentication"
20030
+ * } */
20031
+ "application/problem+json": components["schemas"]["Problem"];
20032
+ };
20033
+ };
20034
+ /** @description Forbidden */
20035
+ 403: {
20036
+ headers: {
20037
+ [name: string]: unknown;
20038
+ };
20039
+ content: {
20040
+ /** @example {
20041
+ * "code": "ERROR_PERMISSION_DENIED",
20042
+ * "detail": "Insufficient permissions to perform this action",
20043
+ * "status": 403,
20044
+ * "title": "Permission Denied",
20045
+ * "type": "permission-denied"
20046
+ * } */
20047
+ "application/problem+json": components["schemas"]["Problem"];
20048
+ };
20049
+ };
20050
+ /** @description Not Found */
20051
+ 404: {
20052
+ headers: {
20053
+ [name: string]: unknown;
20054
+ };
20055
+ content: {
20056
+ /** @example {
20057
+ * "code": "ERROR_ROLE_NOT_FOUND",
20058
+ * "detail": "Role not found",
20059
+ * "role_name": "support",
20060
+ * "status": 404,
20061
+ * "title": "Role Management Error",
20062
+ * "type": "role-not-found"
20063
+ * } */
20064
+ "application/problem+json": components["schemas"]["Problem"];
20065
+ };
20066
+ };
20067
+ /** @description Conflict */
20068
+ 409: {
20069
+ headers: {
20070
+ [name: string]: unknown;
20071
+ };
20072
+ content: {
20073
+ /** @example {
20074
+ * "code": "ERROR_BUILT_IN_ROLE_IMMUTABLE",
20075
+ * "detail": "Built-in roles cannot be modified or deleted",
20076
+ * "role_name": "viewer",
20077
+ * "status": 409,
20078
+ * "title": "Role Management Error",
20079
+ * "type": "built-in-role-immutable"
20080
+ * } */
20081
+ "application/problem+json": components["schemas"]["Problem"];
20082
+ };
20083
+ };
20084
+ /** @description Validation Error */
20085
+ 422: {
20086
+ headers: {
20087
+ [name: string]: unknown;
20088
+ };
20089
+ content: {
20090
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
20091
+ };
20092
+ };
20093
+ };
20094
+ };
19459
20095
  list_users_v1_organizations_users_get: {
19460
20096
  parameters: {
19461
20097
  query?: {