@opusdns/api 0.99.0 → 0.101.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 +207 -3
- package/src/helpers/keys.ts +608 -0
- package/src/helpers/requests.d.ts +131 -0
- package/src/helpers/responses.d.ts +169 -1
- package/src/helpers/schemas-arrays.d.ts +29 -1
- package/src/helpers/schemas.d.ts +112 -0
- package/src/openapi.yaml +613 -1
- package/src/schema.d.ts +334 -2
package/package.json
CHANGED
package/src/helpers/constants.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
import { AllocationMethodType, AttributeType, BillingTransactionAction, BillingTransactionProductType, BillingTransactionSortField, BillingTransactionStatus, ContactRoleType, ContactSortField, Currency, DeletePolicyType, DnsChangeAction, DnsRrsetType, DnssecAlgorithm, DnssecDigestType, DnssecModeType, DnssecRecordType, DnssecStatus, DomainAttributeKey, DomainAvailabilityStatus, DomainClientStatus, DomainContactType, DomainForwardSortField, DomainForwardZoneSortField, DomainSortField, DomainStatus, EmailVerificationStatus, EventObjectType, EventSortField, EventSubtype, EventType, GrantType, HttpProtocol, InvoiceResponsePaymentStatus, InvoiceResponseStatus, InvoiceResponseType, LaunchPhaseType, LocalPresenceRequirementType, OrganizationStatus, PatchOp, PeriodUnit, Permission, PostTransferRequirements, PostalAddressType, PremiumAffectsType, PremiumSourceType, RedirectCode, RegistrantChangeType, RegistryHandleAttributeType, Relation, RenewalMode, ReservedSourceType, SortOrder, SyncOperationType, TLDType, TransferAckType, UserStatus, VerificationType, ZoneSortField } from './schemas';
|
|
24
|
+
import { AllocationMethodType, AttributeType, BillingTransactionAction, BillingTransactionProductType, BillingTransactionSortField, BillingTransactionStatus, ContactRoleType, ContactSortField, Currency, DeletePolicyType, DnsChangeAction, DnsRrsetType, DnssecAlgorithm, DnssecDigestType, DnssecModeType, DnssecRecordType, DnssecStatus, DomainAttributeKey, DomainAvailabilityStatus, DomainClientStatus, DomainContactType, DomainForwardSortField, DomainForwardZoneSortField, DomainSortField, DomainStatus, EmailVerificationStatus, EventObjectType, EventSortField, EventSubtype, EventType, GrantType, HttpProtocol, InvoiceResponsePaymentStatus, InvoiceResponseStatus, InvoiceResponseType, LaunchPhaseType, LocalPresenceRequirementType, ObjectEventType, ObjectLogSortField, OrganizationStatus, PatchOp, PeriodUnit, Permission, PostTransferRequirements, PostalAddressType, PremiumAffectsType, PremiumSourceType, RedirectCode, RegistrantChangeType, RegistryHandleAttributeType, Relation, RenewalMode, RequestHistorySortField, ReservedSourceType, SortOrder, SyncOperationType, TLDType, TransferAckType, UserStatus, VerificationType, ZoneSortField } from './schemas';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* AllocationMethodType. Auto-generated enum for AllocationMethodType
|
|
@@ -1148,6 +1148,7 @@ export const DOMAIN_FORWARD_SORT_FIELD = {
|
|
|
1148
1148
|
HOSTNAME: "hostname",
|
|
1149
1149
|
ENABLED: "enabled",
|
|
1150
1150
|
CREATED_ON: "created_on",
|
|
1151
|
+
UPDATED_ON: "updated_on",
|
|
1151
1152
|
} as const satisfies Record<string, DomainForwardSortField>;
|
|
1152
1153
|
|
|
1153
1154
|
/**
|
|
@@ -1174,7 +1175,8 @@ export const DOMAIN_FORWARD_SORT_FIELD = {
|
|
|
1174
1175
|
export const DOMAIN_FORWARD_SORT_FIELD_VALUES = [
|
|
1175
1176
|
'hostname',
|
|
1176
1177
|
'enabled',
|
|
1177
|
-
'created_on'
|
|
1178
|
+
'created_on',
|
|
1179
|
+
'updated_on'
|
|
1178
1180
|
] as const satisfies [string, ...string[]] | DomainForwardSortField[];
|
|
1179
1181
|
|
|
1180
1182
|
/**
|
|
@@ -1199,6 +1201,7 @@ export const DOMAIN_FORWARD_SORT_FIELD_VALUES = [
|
|
|
1199
1201
|
export const DOMAIN_FORWARD_ZONE_SORT_FIELD = {
|
|
1200
1202
|
NAME: "name",
|
|
1201
1203
|
CREATED_ON: "created_on",
|
|
1204
|
+
UPDATED_ON: "updated_on",
|
|
1202
1205
|
} as const satisfies Record<string, DomainForwardZoneSortField>;
|
|
1203
1206
|
|
|
1204
1207
|
/**
|
|
@@ -1224,7 +1227,8 @@ export const DOMAIN_FORWARD_ZONE_SORT_FIELD = {
|
|
|
1224
1227
|
*/
|
|
1225
1228
|
export const DOMAIN_FORWARD_ZONE_SORT_FIELD_VALUES = [
|
|
1226
1229
|
'name',
|
|
1227
|
-
'created_on'
|
|
1230
|
+
'created_on',
|
|
1231
|
+
'updated_on'
|
|
1228
1232
|
] as const satisfies [string, ...string[]] | DomainForwardZoneSortField[];
|
|
1229
1233
|
|
|
1230
1234
|
/**
|
|
@@ -2027,6 +2031,140 @@ export const LOCAL_PRESENCE_REQUIREMENT_TYPE_VALUES = [
|
|
|
2027
2031
|
'business_entity'
|
|
2028
2032
|
] as const satisfies [string, ...string[]] | LocalPresenceRequirementType[];
|
|
2029
2033
|
|
|
2034
|
+
/**
|
|
2035
|
+
* ObjectEventType. Auto-generated enum for ObjectEventType
|
|
2036
|
+
*
|
|
2037
|
+
* @remarks
|
|
2038
|
+
* This constant provides both object and array forms for the ObjectEventType enum.
|
|
2039
|
+
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
2040
|
+
*
|
|
2041
|
+
* @example
|
|
2042
|
+
* ```typescript
|
|
2043
|
+
* // Using the object form for key-value access
|
|
2044
|
+
* const status = OBJECT_EVENT_TYPE.SUCCESS;
|
|
2045
|
+
*
|
|
2046
|
+
* // Using the array form for iteration
|
|
2047
|
+
* const allStatuses = OBJECT_EVENT_TYPE_VALUES;
|
|
2048
|
+
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
2049
|
+
* ```
|
|
2050
|
+
*
|
|
2051
|
+
* @see {@link ObjectEventType} - The TypeScript type definition
|
|
2052
|
+
*/
|
|
2053
|
+
export const OBJECT_EVENT_TYPE = {
|
|
2054
|
+
CREATED: "CREATED",
|
|
2055
|
+
UPDATED: "UPDATED",
|
|
2056
|
+
DELETED: "DELETED",
|
|
2057
|
+
TRANSFER_STARTED: "TRANSFER_STARTED",
|
|
2058
|
+
TRANSFER_COMPLETED: "TRANSFER_COMPLETED",
|
|
2059
|
+
TRANSFER_OUT_STARTED: "TRANSFER_OUT_STARTED",
|
|
2060
|
+
TRANSFER_OUT_COMPLETED: "TRANSFER_OUT_COMPLETED",
|
|
2061
|
+
RENEWED: "RENEWED",
|
|
2062
|
+
RESTORED: "RESTORED",
|
|
2063
|
+
BILLING_TRANSACTION_RESERVED: "BILLING_TRANSACTION_RESERVED",
|
|
2064
|
+
BILLING_TRANSACTION_SUCCEEDED: "BILLING_TRANSACTION_SUCCEEDED",
|
|
2065
|
+
BILLING_TRANSACTION_FAILED: "BILLING_TRANSACTION_FAILED",
|
|
2066
|
+
BILLING_TRANSACTION_CANCELLED: "BILLING_TRANSACTION_CANCELLED",
|
|
2067
|
+
} as const satisfies Record<string, ObjectEventType>;
|
|
2068
|
+
|
|
2069
|
+
/**
|
|
2070
|
+
* Array of all ObjectEventType enum values
|
|
2071
|
+
*
|
|
2072
|
+
* @remarks
|
|
2073
|
+
* This constant provides a array containing all valid ObjectEventType enum values.
|
|
2074
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
2075
|
+
*
|
|
2076
|
+
* @example
|
|
2077
|
+
* ```typescript
|
|
2078
|
+
* // Iterating through all values
|
|
2079
|
+
* for (const value of OBJECT_EVENT_TYPE_VALUES) {
|
|
2080
|
+
* console.log(`Processing: ${value}`);
|
|
2081
|
+
* }
|
|
2082
|
+
*
|
|
2083
|
+
* // Validation
|
|
2084
|
+
* const isValid = OBJECT_EVENT_TYPE_VALUES.includes(someValue);
|
|
2085
|
+
* ```
|
|
2086
|
+
*
|
|
2087
|
+
* @see {@link ObjectEventType} - The TypeScript type definition
|
|
2088
|
+
* @see {@link OBJECT_EVENT_TYPE} - The object form of this enum
|
|
2089
|
+
*/
|
|
2090
|
+
export const OBJECT_EVENT_TYPE_VALUES = [
|
|
2091
|
+
'CREATED',
|
|
2092
|
+
'UPDATED',
|
|
2093
|
+
'DELETED',
|
|
2094
|
+
'TRANSFER_STARTED',
|
|
2095
|
+
'TRANSFER_COMPLETED',
|
|
2096
|
+
'TRANSFER_OUT_STARTED',
|
|
2097
|
+
'TRANSFER_OUT_COMPLETED',
|
|
2098
|
+
'RENEWED',
|
|
2099
|
+
'RESTORED',
|
|
2100
|
+
'BILLING_TRANSACTION_RESERVED',
|
|
2101
|
+
'BILLING_TRANSACTION_SUCCEEDED',
|
|
2102
|
+
'BILLING_TRANSACTION_FAILED',
|
|
2103
|
+
'BILLING_TRANSACTION_CANCELLED'
|
|
2104
|
+
] as const satisfies [string, ...string[]] | ObjectEventType[];
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* ObjectLogSortField. Auto-generated enum for ObjectLogSortField
|
|
2108
|
+
*
|
|
2109
|
+
* @remarks
|
|
2110
|
+
* This constant provides both object and array forms for the ObjectLogSortField enum.
|
|
2111
|
+
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
2112
|
+
*
|
|
2113
|
+
* @example
|
|
2114
|
+
* ```typescript
|
|
2115
|
+
* // Using the object form for key-value access
|
|
2116
|
+
* const status = OBJECT_LOG_SORT_FIELD.SUCCESS;
|
|
2117
|
+
*
|
|
2118
|
+
* // Using the array form for iteration
|
|
2119
|
+
* const allStatuses = OBJECT_LOG_SORT_FIELD_VALUES;
|
|
2120
|
+
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
2121
|
+
* ```
|
|
2122
|
+
*
|
|
2123
|
+
* @see {@link ObjectLogSortField} - The TypeScript type definition
|
|
2124
|
+
*/
|
|
2125
|
+
export const OBJECT_LOG_SORT_FIELD = {
|
|
2126
|
+
OBJECT_LOG_ID: "object_log_id",
|
|
2127
|
+
OBJECT_ID: "object_id",
|
|
2128
|
+
OBJECT_TYPE: "object_type",
|
|
2129
|
+
ACTION: "action",
|
|
2130
|
+
CREATED_ON: "created_on",
|
|
2131
|
+
SERVER_REQUEST_ID: "server_request_id",
|
|
2132
|
+
PERFORMED_BY_TYPE: "performed_by_type",
|
|
2133
|
+
PERFORMED_BY_ID: "performed_by_id",
|
|
2134
|
+
} as const satisfies Record<string, ObjectLogSortField>;
|
|
2135
|
+
|
|
2136
|
+
/**
|
|
2137
|
+
* Array of all ObjectLogSortField enum values
|
|
2138
|
+
*
|
|
2139
|
+
* @remarks
|
|
2140
|
+
* This constant provides a array containing all valid ObjectLogSortField enum values.
|
|
2141
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
2142
|
+
*
|
|
2143
|
+
* @example
|
|
2144
|
+
* ```typescript
|
|
2145
|
+
* // Iterating through all values
|
|
2146
|
+
* for (const value of OBJECT_LOG_SORT_FIELD_VALUES) {
|
|
2147
|
+
* console.log(`Processing: ${value}`);
|
|
2148
|
+
* }
|
|
2149
|
+
*
|
|
2150
|
+
* // Validation
|
|
2151
|
+
* const isValid = OBJECT_LOG_SORT_FIELD_VALUES.includes(someValue);
|
|
2152
|
+
* ```
|
|
2153
|
+
*
|
|
2154
|
+
* @see {@link ObjectLogSortField} - The TypeScript type definition
|
|
2155
|
+
* @see {@link OBJECT_LOG_SORT_FIELD} - The object form of this enum
|
|
2156
|
+
*/
|
|
2157
|
+
export const OBJECT_LOG_SORT_FIELD_VALUES = [
|
|
2158
|
+
'object_log_id',
|
|
2159
|
+
'object_id',
|
|
2160
|
+
'object_type',
|
|
2161
|
+
'action',
|
|
2162
|
+
'created_on',
|
|
2163
|
+
'server_request_id',
|
|
2164
|
+
'performed_by_type',
|
|
2165
|
+
'performed_by_id'
|
|
2166
|
+
] as const satisfies [string, ...string[]] | ObjectLogSortField[];
|
|
2167
|
+
|
|
2030
2168
|
/**
|
|
2031
2169
|
* OrganizationStatus. Auto-generated enum for OrganizationStatus
|
|
2032
2170
|
*
|
|
@@ -2758,6 +2896,72 @@ export const RENEWAL_MODE_VALUES = [
|
|
|
2758
2896
|
'delete'
|
|
2759
2897
|
] as const satisfies [string, ...string[]] | RenewalMode[];
|
|
2760
2898
|
|
|
2899
|
+
/**
|
|
2900
|
+
* RequestHistorySortField. Auto-generated enum for RequestHistorySortField
|
|
2901
|
+
*
|
|
2902
|
+
* @remarks
|
|
2903
|
+
* This constant provides both object and array forms for the RequestHistorySortField enum.
|
|
2904
|
+
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
2905
|
+
*
|
|
2906
|
+
* @example
|
|
2907
|
+
* ```typescript
|
|
2908
|
+
* // Using the object form for key-value access
|
|
2909
|
+
* const status = REQUEST_HISTORY_SORT_FIELD.SUCCESS;
|
|
2910
|
+
*
|
|
2911
|
+
* // Using the array form for iteration
|
|
2912
|
+
* const allStatuses = REQUEST_HISTORY_SORT_FIELD_VALUES;
|
|
2913
|
+
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
2914
|
+
* ```
|
|
2915
|
+
*
|
|
2916
|
+
* @see {@link RequestHistorySortField} - The TypeScript type definition
|
|
2917
|
+
*/
|
|
2918
|
+
export const REQUEST_HISTORY_SORT_FIELD = {
|
|
2919
|
+
METHOD: "method",
|
|
2920
|
+
PATH: "path",
|
|
2921
|
+
STATUS_CODE: "status_code",
|
|
2922
|
+
DURATION: "duration",
|
|
2923
|
+
SERVER_REQUEST_ID: "server_request_id",
|
|
2924
|
+
PERFORMED_BY_TYPE: "performed_by_type",
|
|
2925
|
+
PERFORMED_BY_ID: "performed_by_id",
|
|
2926
|
+
CREATED_ON: "created_on",
|
|
2927
|
+
REQUEST_STARTED_AT: "request_started_at",
|
|
2928
|
+
REQUEST_COMPLETED_AT: "request_completed_at",
|
|
2929
|
+
} as const satisfies Record<string, RequestHistorySortField>;
|
|
2930
|
+
|
|
2931
|
+
/**
|
|
2932
|
+
* Array of all RequestHistorySortField enum values
|
|
2933
|
+
*
|
|
2934
|
+
* @remarks
|
|
2935
|
+
* This constant provides a array containing all valid RequestHistorySortField enum values.
|
|
2936
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
2937
|
+
*
|
|
2938
|
+
* @example
|
|
2939
|
+
* ```typescript
|
|
2940
|
+
* // Iterating through all values
|
|
2941
|
+
* for (const value of REQUEST_HISTORY_SORT_FIELD_VALUES) {
|
|
2942
|
+
* console.log(`Processing: ${value}`);
|
|
2943
|
+
* }
|
|
2944
|
+
*
|
|
2945
|
+
* // Validation
|
|
2946
|
+
* const isValid = REQUEST_HISTORY_SORT_FIELD_VALUES.includes(someValue);
|
|
2947
|
+
* ```
|
|
2948
|
+
*
|
|
2949
|
+
* @see {@link RequestHistorySortField} - The TypeScript type definition
|
|
2950
|
+
* @see {@link REQUEST_HISTORY_SORT_FIELD} - The object form of this enum
|
|
2951
|
+
*/
|
|
2952
|
+
export const REQUEST_HISTORY_SORT_FIELD_VALUES = [
|
|
2953
|
+
'method',
|
|
2954
|
+
'path',
|
|
2955
|
+
'status_code',
|
|
2956
|
+
'duration',
|
|
2957
|
+
'server_request_id',
|
|
2958
|
+
'performed_by_type',
|
|
2959
|
+
'performed_by_id',
|
|
2960
|
+
'created_on',
|
|
2961
|
+
'request_started_at',
|
|
2962
|
+
'request_completed_at'
|
|
2963
|
+
] as const satisfies [string, ...string[]] | RequestHistorySortField[];
|
|
2964
|
+
|
|
2761
2965
|
/**
|
|
2762
2966
|
* ReservedSourceType. Auto-generated enum for ReservedSourceType
|
|
2763
2967
|
*
|