@opusdns/api 0.33.0 → 0.35.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 +9 -63
- package/src/helpers/keys.ts +480 -247
- package/src/helpers/requests.d.ts +1 -53
- package/src/helpers/responses.d.ts +3 -58
- package/src/helpers/schemas.d.ts +38 -38
- package/src/openapi.yaml +65 -76
- package/src/schema.d.ts +47 -68
package/package.json
CHANGED
package/src/helpers/constants.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
import { AllocationMethodType, BillingTransactionAction, BillingTransactionProductType, ContactRoleType, ContactSortField, Currency, DeletePolicyType, DnsChangeAction, DnsRrsetType, DnssecAlgorithm, DnssecDigestType, DnssecModeType, DnssecRecordType, DnssecStatus, DomainAvailabilityStatus, DomainClientStatus, DomainContactType, DomainSortField, DomainStatus, EmailVerificationStatus, EventObjectType, EventSubtype, EventType, GrantType, LaunchPhaseType, LocalPresenceRequirementType, OrganizationCredentialStatus, OrganizationStatus, PatchOp, PeriodUnit, Permission,
|
|
24
|
+
import { AllocationMethodType, BillingTransactionAction, BillingTransactionProductType, ContactRoleType, ContactSortField, Currency, DeletePolicyType, DnsChangeAction, DnsRrsetType, DnssecAlgorithm, DnssecDigestType, DnssecModeType, DnssecRecordType, DnssecStatus, DomainAvailabilityStatus, DomainClientStatus, DomainContactType, DomainSortField, DomainStatus, EmailVerificationStatus, EventObjectType, EventSubtype, EventType, GrantType, LaunchPhaseType, LocalPresenceRequirementType, OrganizationCredentialStatus, OrganizationStatus, PatchOp, PeriodUnit, Permission, PostTransferRequirements, PostalAddressType, PremiumAffectsType, PremiumSourceType, RegistrantChangeType, Relation, RenewalMode, ReservedSourceType, SortOrder, SyncOperationType, TLDType, TransferAckType, UserNotificationStatus, UserStatus, VerificationType, ZoneSortField } from './schemas';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* AllocationMethodType. Auto-generated enum for AllocationMethodType
|
|
@@ -1663,9 +1663,10 @@ export const PERMISSION = {
|
|
|
1663
1663
|
BULK_RENEW_EXPIRE: "bulk_renew_expire",
|
|
1664
1664
|
BULK_TRANSFER_TRADE: "bulk_transfer_trade",
|
|
1665
1665
|
BULK_UPDATE: "bulk_update",
|
|
1666
|
+
CORPORATE_PLAN: "corporate_plan",
|
|
1666
1667
|
CREATE: "create",
|
|
1667
1668
|
DELETE: "delete",
|
|
1668
|
-
|
|
1669
|
+
ENTERPRISE_PLAN: "enterprise_plan",
|
|
1669
1670
|
HAS_ACCEPTED_TOS: "has_accepted_tos",
|
|
1670
1671
|
MANAGE_API_KEYS: "manage_api_keys",
|
|
1671
1672
|
MANAGE_BILLING: "manage_billing",
|
|
@@ -1680,10 +1681,9 @@ export const PERMISSION = {
|
|
|
1680
1681
|
MANAGE_USER_RELATIONS: "manage_user_relations",
|
|
1681
1682
|
MANAGE_USERS: "manage_users",
|
|
1682
1683
|
PLAN_MANAGER: "plan_manager",
|
|
1683
|
-
|
|
1684
|
-
PREMIUM_RESELLER: "premium_reseller",
|
|
1684
|
+
PREMIUM_PLAN: "premium_plan",
|
|
1685
1685
|
RENEW_EXPIRE: "renew_expire",
|
|
1686
|
-
|
|
1686
|
+
STARTER_PLAN: "starter_plan",
|
|
1687
1687
|
TRANSFER_TRADE: "transfer_trade",
|
|
1688
1688
|
UPDATE: "update",
|
|
1689
1689
|
VERIFY: "verify",
|
|
@@ -1719,9 +1719,10 @@ export const PERMISSION_VALUES = [
|
|
|
1719
1719
|
'bulk_renew_expire',
|
|
1720
1720
|
'bulk_transfer_trade',
|
|
1721
1721
|
'bulk_update',
|
|
1722
|
+
'corporate_plan',
|
|
1722
1723
|
'create',
|
|
1723
1724
|
'delete',
|
|
1724
|
-
'
|
|
1725
|
+
'enterprise_plan',
|
|
1725
1726
|
'has_accepted_tos',
|
|
1726
1727
|
'manage_api_keys',
|
|
1727
1728
|
'manage_billing',
|
|
@@ -1736,10 +1737,9 @@ export const PERMISSION_VALUES = [
|
|
|
1736
1737
|
'manage_user_relations',
|
|
1737
1738
|
'manage_users',
|
|
1738
1739
|
'plan_manager',
|
|
1739
|
-
'
|
|
1740
|
-
'premium_reseller',
|
|
1740
|
+
'premium_plan',
|
|
1741
1741
|
'renew_expire',
|
|
1742
|
-
'
|
|
1742
|
+
'starter_plan',
|
|
1743
1743
|
'transfer_trade',
|
|
1744
1744
|
'update',
|
|
1745
1745
|
'verify',
|
|
@@ -1747,60 +1747,6 @@ export const PERMISSION_VALUES = [
|
|
|
1747
1747
|
'view_audit_logs'
|
|
1748
1748
|
] as const satisfies [string, ...string[]] | Permission[];
|
|
1749
1749
|
|
|
1750
|
-
/**
|
|
1751
|
-
* PlanRelation. Auto-generated enum for PlanRelation
|
|
1752
|
-
*
|
|
1753
|
-
* @remarks
|
|
1754
|
-
* This constant provides both object and array forms for the PlanRelation enum.
|
|
1755
|
-
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
1756
|
-
*
|
|
1757
|
-
* @example
|
|
1758
|
-
* ```typescript
|
|
1759
|
-
* // Using the object form for key-value access
|
|
1760
|
-
* const status = PLAN_RELATION.SUCCESS;
|
|
1761
|
-
*
|
|
1762
|
-
* // Using the array form for iteration
|
|
1763
|
-
* const allStatuses = PLAN_RELATION_VALUES;
|
|
1764
|
-
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
1765
|
-
* ```
|
|
1766
|
-
*
|
|
1767
|
-
* @see {@link PlanRelation} - The TypeScript type definition
|
|
1768
|
-
*/
|
|
1769
|
-
export const PLAN_RELATION = {
|
|
1770
|
-
BASIC_PLAN: "basic_plan",
|
|
1771
|
-
ENTERPRISE_PLAN: "enterprise_plan",
|
|
1772
|
-
PREMIUM_PLAN: "premium_plan",
|
|
1773
|
-
STARTER_PLAN: "starter_plan",
|
|
1774
|
-
} as const satisfies Record<string, PlanRelation>;
|
|
1775
|
-
|
|
1776
|
-
/**
|
|
1777
|
-
* Array of all PlanRelation enum values
|
|
1778
|
-
*
|
|
1779
|
-
* @remarks
|
|
1780
|
-
* This constant provides a array containing all valid PlanRelation enum values.
|
|
1781
|
-
* Useful for iteration, validation, and generating dynamic UI components.
|
|
1782
|
-
*
|
|
1783
|
-
* @example
|
|
1784
|
-
* ```typescript
|
|
1785
|
-
* // Iterating through all values
|
|
1786
|
-
* for (const value of PLAN_RELATION_VALUES) {
|
|
1787
|
-
* console.log(`Processing: ${value}`);
|
|
1788
|
-
* }
|
|
1789
|
-
*
|
|
1790
|
-
* // Validation
|
|
1791
|
-
* const isValid = PLAN_RELATION_VALUES.includes(someValue);
|
|
1792
|
-
* ```
|
|
1793
|
-
*
|
|
1794
|
-
* @see {@link PlanRelation} - The TypeScript type definition
|
|
1795
|
-
* @see {@link PLAN_RELATION} - The object form of this enum
|
|
1796
|
-
*/
|
|
1797
|
-
export const PLAN_RELATION_VALUES = [
|
|
1798
|
-
'basic_plan',
|
|
1799
|
-
'enterprise_plan',
|
|
1800
|
-
'premium_plan',
|
|
1801
|
-
'starter_plan'
|
|
1802
|
-
] as const satisfies [string, ...string[]] | PlanRelation[];
|
|
1803
|
-
|
|
1804
1750
|
/**
|
|
1805
1751
|
* PostTransferRequirements. Auto-generated enum for PostTransferRequirements
|
|
1806
1752
|
*
|