@opusdns/api 0.29.0 → 0.30.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 +113 -1
- package/src/helpers/keys.ts +467 -0
- package/src/helpers/requests.d.ts +90 -0
- package/src/helpers/responses.d.ts +111 -1
- package/src/helpers/schemas-arrays.d.ts +29 -1
- package/src/helpers/schemas.d.ts +96 -0
- package/src/openapi.yaml +200 -1
- package/src/schema.d.ts +174 -0
package/package.json
CHANGED
package/src/helpers/constants.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
import { AllocationMethodType, 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, PlanRelation, PostTransferRequirements, PostalAddressType, PremiumAffectsType, PremiumSourceType, RegistrantChangeType, Relation, RenewalMode, ReservedSourceType, SortOrder, SyncOperationType, TLDType, TransferAckType, UserNotificationStatus, UserStatus, VerificationType, ZoneSortField } from './schemas';
|
|
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, PlanRelation, 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
|
|
@@ -75,6 +75,118 @@ export const ALLOCATION_METHOD_TYPE_VALUES = [
|
|
|
75
75
|
'lottery'
|
|
76
76
|
] as const satisfies [string, ...string[]] | AllocationMethodType[];
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* BillingTransactionAction. Auto-generated enum for BillingTransactionAction
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* This constant provides both object and array forms for the BillingTransactionAction enum.
|
|
83
|
+
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* // Using the object form for key-value access
|
|
88
|
+
* const status = BILLING_TRANSACTION_ACTION.SUCCESS;
|
|
89
|
+
*
|
|
90
|
+
* // Using the array form for iteration
|
|
91
|
+
* const allStatuses = BILLING_TRANSACTION_ACTION_VALUES;
|
|
92
|
+
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* @see {@link BillingTransactionAction} - The TypeScript type definition
|
|
96
|
+
*/
|
|
97
|
+
export const BILLING_TRANSACTION_ACTION = {
|
|
98
|
+
CREATE: "create",
|
|
99
|
+
TRANSFER: "transfer",
|
|
100
|
+
RENEW: "renew",
|
|
101
|
+
RESTORE: "restore",
|
|
102
|
+
TRADE: "trade",
|
|
103
|
+
APPLICATION: "application",
|
|
104
|
+
} as const satisfies Record<string, BillingTransactionAction>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Array of all BillingTransactionAction enum values
|
|
108
|
+
*
|
|
109
|
+
* @remarks
|
|
110
|
+
* This constant provides a array containing all valid BillingTransactionAction enum values.
|
|
111
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* // Iterating through all values
|
|
116
|
+
* for (const value of BILLING_TRANSACTION_ACTION_VALUES) {
|
|
117
|
+
* console.log(`Processing: ${value}`);
|
|
118
|
+
* }
|
|
119
|
+
*
|
|
120
|
+
* // Validation
|
|
121
|
+
* const isValid = BILLING_TRANSACTION_ACTION_VALUES.includes(someValue);
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* @see {@link BillingTransactionAction} - The TypeScript type definition
|
|
125
|
+
* @see {@link BILLING_TRANSACTION_ACTION} - The object form of this enum
|
|
126
|
+
*/
|
|
127
|
+
export const BILLING_TRANSACTION_ACTION_VALUES = [
|
|
128
|
+
'create',
|
|
129
|
+
'transfer',
|
|
130
|
+
'renew',
|
|
131
|
+
'restore',
|
|
132
|
+
'trade',
|
|
133
|
+
'application'
|
|
134
|
+
] as const satisfies [string, ...string[]] | BillingTransactionAction[];
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* BillingTransactionProductType. Auto-generated enum for BillingTransactionProductType
|
|
138
|
+
*
|
|
139
|
+
* @remarks
|
|
140
|
+
* This constant provides both object and array forms for the BillingTransactionProductType enum.
|
|
141
|
+
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* // Using the object form for key-value access
|
|
146
|
+
* const status = BILLING_TRANSACTION_PRODUCT_TYPE.SUCCESS;
|
|
147
|
+
*
|
|
148
|
+
* // Using the array form for iteration
|
|
149
|
+
* const allStatuses = BILLING_TRANSACTION_PRODUCT_TYPE_VALUES;
|
|
150
|
+
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
* @see {@link BillingTransactionProductType} - The TypeScript type definition
|
|
154
|
+
*/
|
|
155
|
+
export const BILLING_TRANSACTION_PRODUCT_TYPE = {
|
|
156
|
+
DOMAIN: "domain",
|
|
157
|
+
ZONE: "zone",
|
|
158
|
+
EMAIL_FORWARD: "email_forward",
|
|
159
|
+
DOMAIN_FORWARD: "domain_forward",
|
|
160
|
+
} as const satisfies Record<string, BillingTransactionProductType>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Array of all BillingTransactionProductType enum values
|
|
164
|
+
*
|
|
165
|
+
* @remarks
|
|
166
|
+
* This constant provides a array containing all valid BillingTransactionProductType enum values.
|
|
167
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```typescript
|
|
171
|
+
* // Iterating through all values
|
|
172
|
+
* for (const value of BILLING_TRANSACTION_PRODUCT_TYPE_VALUES) {
|
|
173
|
+
* console.log(`Processing: ${value}`);
|
|
174
|
+
* }
|
|
175
|
+
*
|
|
176
|
+
* // Validation
|
|
177
|
+
* const isValid = BILLING_TRANSACTION_PRODUCT_TYPE_VALUES.includes(someValue);
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* @see {@link BillingTransactionProductType} - The TypeScript type definition
|
|
181
|
+
* @see {@link BILLING_TRANSACTION_PRODUCT_TYPE} - The object form of this enum
|
|
182
|
+
*/
|
|
183
|
+
export const BILLING_TRANSACTION_PRODUCT_TYPE_VALUES = [
|
|
184
|
+
'domain',
|
|
185
|
+
'zone',
|
|
186
|
+
'email_forward',
|
|
187
|
+
'domain_forward'
|
|
188
|
+
] as const satisfies [string, ...string[]] | BillingTransactionProductType[];
|
|
189
|
+
|
|
78
190
|
/**
|
|
79
191
|
* ContactRoleType. Auto-generated enum for ContactRoleType
|
|
80
192
|
*
|
package/src/helpers/keys.ts
CHANGED
|
@@ -83,6 +83,8 @@ import { EmailForwardAliasUpdate } from './schemas';
|
|
|
83
83
|
import { EventResponse } from './schemas';
|
|
84
84
|
import { EventSchema } from './schemas';
|
|
85
85
|
import { GeneralAvailabilityBase } from './schemas';
|
|
86
|
+
import { GetCurrentAvailablePlans } from './schemas';
|
|
87
|
+
import { GetPrices } from './schemas';
|
|
86
88
|
import { HTTPValidationError } from './schemas';
|
|
87
89
|
import { IdnBase } from './schemas';
|
|
88
90
|
import { IpRestrictionCreate } from './schemas';
|
|
@@ -111,8 +113,10 @@ import { OrganizationWithPlan } from './schemas';
|
|
|
111
113
|
import { PaginationMetadata } from './schemas';
|
|
112
114
|
import { Period } from './schemas';
|
|
113
115
|
import { PermissionSet } from './schemas';
|
|
116
|
+
import { PlanInfo } from './schemas';
|
|
114
117
|
import { PlanUpdate } from './schemas';
|
|
115
118
|
import { PremiumDomainsBase } from './schemas';
|
|
119
|
+
import { PriceInfo } from './schemas';
|
|
116
120
|
import { Problem } from './schemas';
|
|
117
121
|
import { RdapBase } from './schemas';
|
|
118
122
|
import { RegistryLockBase } from './schemas';
|
|
@@ -8414,6 +8418,134 @@ export const KEYS_GENERAL_AVAILABILITY_BASE = [
|
|
|
8414
8418
|
KEY_GENERAL_AVAILABILITY_BASE_START_DATE,
|
|
8415
8419
|
] as const satisfies (keyof GeneralAvailabilityBase)[];
|
|
8416
8420
|
|
|
8421
|
+
/**
|
|
8422
|
+
* current_plan property
|
|
8423
|
+
*
|
|
8424
|
+
* Current active plan for the customer
|
|
8425
|
+
*
|
|
8426
|
+
*
|
|
8427
|
+
*
|
|
8428
|
+
* @remarks
|
|
8429
|
+
* This key constant provides type-safe access to the `current_plan` property of GetCurrentAvailablePlans objects.
|
|
8430
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
8431
|
+
*
|
|
8432
|
+
* @example
|
|
8433
|
+
* ```typescript
|
|
8434
|
+
* // Direct property access
|
|
8435
|
+
* const value = getcurrentavailableplans[KEY_GET_CURRENT_AVAILABLE_PLANS_CURRENT_PLAN];
|
|
8436
|
+
*
|
|
8437
|
+
* // Dynamic property access
|
|
8438
|
+
* const propertyName = KEY_GET_CURRENT_AVAILABLE_PLANS_CURRENT_PLAN;
|
|
8439
|
+
* const value = getcurrentavailableplans[propertyName];
|
|
8440
|
+
* ```
|
|
8441
|
+
*
|
|
8442
|
+
* @see {@link GetCurrentAvailablePlans} - The TypeScript type definition
|
|
8443
|
+
* @see {@link KEYS_GET_CURRENT_AVAILABLE_PLANS} - Array of all keys for this type
|
|
8444
|
+
*/
|
|
8445
|
+
export const KEY_GET_CURRENT_AVAILABLE_PLANS_CURRENT_PLAN = 'current_plan' as keyof GetCurrentAvailablePlans;
|
|
8446
|
+
/**
|
|
8447
|
+
* Plans
|
|
8448
|
+
*
|
|
8449
|
+
* List of available plans
|
|
8450
|
+
*
|
|
8451
|
+
* @type {array}
|
|
8452
|
+
*
|
|
8453
|
+
*
|
|
8454
|
+
* @remarks
|
|
8455
|
+
* This key constant provides type-safe access to the `plans` property of GetCurrentAvailablePlans objects.
|
|
8456
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
8457
|
+
*
|
|
8458
|
+
* @example
|
|
8459
|
+
* ```typescript
|
|
8460
|
+
* // Direct property access
|
|
8461
|
+
* const value = getcurrentavailableplans[KEY_GET_CURRENT_AVAILABLE_PLANS_PLANS];
|
|
8462
|
+
*
|
|
8463
|
+
* // Dynamic property access
|
|
8464
|
+
* const propertyName = KEY_GET_CURRENT_AVAILABLE_PLANS_PLANS;
|
|
8465
|
+
* const value = getcurrentavailableplans[propertyName];
|
|
8466
|
+
* ```
|
|
8467
|
+
*
|
|
8468
|
+
* @see {@link GetCurrentAvailablePlans} - The TypeScript type definition
|
|
8469
|
+
* @see {@link KEYS_GET_CURRENT_AVAILABLE_PLANS} - Array of all keys for this type
|
|
8470
|
+
*/
|
|
8471
|
+
export const KEY_GET_CURRENT_AVAILABLE_PLANS_PLANS = 'plans' as keyof GetCurrentAvailablePlans;
|
|
8472
|
+
|
|
8473
|
+
/**
|
|
8474
|
+
* Array of all GetCurrentAvailablePlans property keys
|
|
8475
|
+
*
|
|
8476
|
+
* @remarks
|
|
8477
|
+
* This constant provides a readonly array containing all valid property keys for GetCurrentAvailablePlans objects.
|
|
8478
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
8479
|
+
*
|
|
8480
|
+
* @example
|
|
8481
|
+
* ```typescript
|
|
8482
|
+
* // Iterating through all keys
|
|
8483
|
+
* for (const key of KEYS_GET_CURRENT_AVAILABLE_PLANS) {
|
|
8484
|
+
* console.log(`Property: ${key}, Value: ${getcurrentavailableplans[key]}`);
|
|
8485
|
+
* }
|
|
8486
|
+
*
|
|
8487
|
+
* // Validation
|
|
8488
|
+
* const isValidKey = KEYS_GET_CURRENT_AVAILABLE_PLANS.includes(someKey);
|
|
8489
|
+
* ```
|
|
8490
|
+
*
|
|
8491
|
+
* @see {@link GetCurrentAvailablePlans} - The TypeScript type definition
|
|
8492
|
+
*/
|
|
8493
|
+
export const KEYS_GET_CURRENT_AVAILABLE_PLANS = [
|
|
8494
|
+
KEY_GET_CURRENT_AVAILABLE_PLANS_CURRENT_PLAN,
|
|
8495
|
+
KEY_GET_CURRENT_AVAILABLE_PLANS_PLANS,
|
|
8496
|
+
] as const satisfies (keyof GetCurrentAvailablePlans)[];
|
|
8497
|
+
|
|
8498
|
+
/**
|
|
8499
|
+
* Prices
|
|
8500
|
+
*
|
|
8501
|
+
* List of prices
|
|
8502
|
+
*
|
|
8503
|
+
* @type {array}
|
|
8504
|
+
*
|
|
8505
|
+
*
|
|
8506
|
+
* @remarks
|
|
8507
|
+
* This key constant provides type-safe access to the `prices` property of GetPrices objects.
|
|
8508
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
8509
|
+
*
|
|
8510
|
+
* @example
|
|
8511
|
+
* ```typescript
|
|
8512
|
+
* // Direct property access
|
|
8513
|
+
* const value = getprices[KEY_GET_PRICES_PRICES];
|
|
8514
|
+
*
|
|
8515
|
+
* // Dynamic property access
|
|
8516
|
+
* const propertyName = KEY_GET_PRICES_PRICES;
|
|
8517
|
+
* const value = getprices[propertyName];
|
|
8518
|
+
* ```
|
|
8519
|
+
*
|
|
8520
|
+
* @see {@link GetPrices} - The TypeScript type definition
|
|
8521
|
+
* @see {@link KEYS_GET_PRICES} - Array of all keys for this type
|
|
8522
|
+
*/
|
|
8523
|
+
export const KEY_GET_PRICES_PRICES = 'prices' as keyof GetPrices;
|
|
8524
|
+
|
|
8525
|
+
/**
|
|
8526
|
+
* Array of all GetPrices property keys
|
|
8527
|
+
*
|
|
8528
|
+
* @remarks
|
|
8529
|
+
* This constant provides a readonly array containing all valid property keys for GetPrices objects.
|
|
8530
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
8531
|
+
*
|
|
8532
|
+
* @example
|
|
8533
|
+
* ```typescript
|
|
8534
|
+
* // Iterating through all keys
|
|
8535
|
+
* for (const key of KEYS_GET_PRICES) {
|
|
8536
|
+
* console.log(`Property: ${key}, Value: ${getprices[key]}`);
|
|
8537
|
+
* }
|
|
8538
|
+
*
|
|
8539
|
+
* // Validation
|
|
8540
|
+
* const isValidKey = KEYS_GET_PRICES.includes(someKey);
|
|
8541
|
+
* ```
|
|
8542
|
+
*
|
|
8543
|
+
* @see {@link GetPrices} - The TypeScript type definition
|
|
8544
|
+
*/
|
|
8545
|
+
export const KEYS_GET_PRICES = [
|
|
8546
|
+
KEY_GET_PRICES_PRICES,
|
|
8547
|
+
] as const satisfies (keyof GetPrices)[];
|
|
8548
|
+
|
|
8417
8549
|
/**
|
|
8418
8550
|
* errors property
|
|
8419
8551
|
*
|
|
@@ -13931,6 +14063,189 @@ export const KEYS_PERMISSION_SET = [
|
|
|
13931
14063
|
KEY_PERMISSION_SET_PERMISSIONS,
|
|
13932
14064
|
] as const satisfies (keyof PermissionSet)[];
|
|
13933
14065
|
|
|
14066
|
+
/**
|
|
14067
|
+
* Amount
|
|
14068
|
+
*
|
|
14069
|
+
* Base price
|
|
14070
|
+
*
|
|
14071
|
+
* @type {number}
|
|
14072
|
+
*
|
|
14073
|
+
*
|
|
14074
|
+
* @remarks
|
|
14075
|
+
* This key constant provides type-safe access to the `amount` property of PlanInfo objects.
|
|
14076
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14077
|
+
*
|
|
14078
|
+
* @example
|
|
14079
|
+
* ```typescript
|
|
14080
|
+
* // Direct property access
|
|
14081
|
+
* const value = planinfo[KEY_PLAN_INFO_AMOUNT];
|
|
14082
|
+
*
|
|
14083
|
+
* // Dynamic property access
|
|
14084
|
+
* const propertyName = KEY_PLAN_INFO_AMOUNT;
|
|
14085
|
+
* const value = planinfo[propertyName];
|
|
14086
|
+
* ```
|
|
14087
|
+
*
|
|
14088
|
+
* @see {@link PlanInfo} - The TypeScript type definition
|
|
14089
|
+
* @see {@link KEYS_PLAN_INFO} - Array of all keys for this type
|
|
14090
|
+
*/
|
|
14091
|
+
export const KEY_PLAN_INFO_AMOUNT = 'amount' as keyof PlanInfo;
|
|
14092
|
+
/**
|
|
14093
|
+
* Currency
|
|
14094
|
+
*
|
|
14095
|
+
* Currency code
|
|
14096
|
+
*
|
|
14097
|
+
* @type {string}
|
|
14098
|
+
*
|
|
14099
|
+
*
|
|
14100
|
+
* @remarks
|
|
14101
|
+
* This key constant provides type-safe access to the `currency` property of PlanInfo objects.
|
|
14102
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14103
|
+
*
|
|
14104
|
+
* @example
|
|
14105
|
+
* ```typescript
|
|
14106
|
+
* // Direct property access
|
|
14107
|
+
* const value = planinfo[KEY_PLAN_INFO_CURRENCY];
|
|
14108
|
+
*
|
|
14109
|
+
* // Dynamic property access
|
|
14110
|
+
* const propertyName = KEY_PLAN_INFO_CURRENCY;
|
|
14111
|
+
* const value = planinfo[propertyName];
|
|
14112
|
+
* ```
|
|
14113
|
+
*
|
|
14114
|
+
* @see {@link PlanInfo} - The TypeScript type definition
|
|
14115
|
+
* @see {@link KEYS_PLAN_INFO} - Array of all keys for this type
|
|
14116
|
+
*/
|
|
14117
|
+
export const KEY_PLAN_INFO_CURRENCY = 'currency' as keyof PlanInfo;
|
|
14118
|
+
/**
|
|
14119
|
+
* Name
|
|
14120
|
+
*
|
|
14121
|
+
* Plan display name
|
|
14122
|
+
*
|
|
14123
|
+
*
|
|
14124
|
+
*
|
|
14125
|
+
* @remarks
|
|
14126
|
+
* This key constant provides type-safe access to the `name` property of PlanInfo objects.
|
|
14127
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14128
|
+
*
|
|
14129
|
+
* @example
|
|
14130
|
+
* ```typescript
|
|
14131
|
+
* // Direct property access
|
|
14132
|
+
* const value = planinfo[KEY_PLAN_INFO_NAME];
|
|
14133
|
+
*
|
|
14134
|
+
* // Dynamic property access
|
|
14135
|
+
* const propertyName = KEY_PLAN_INFO_NAME;
|
|
14136
|
+
* const value = planinfo[propertyName];
|
|
14137
|
+
* ```
|
|
14138
|
+
*
|
|
14139
|
+
* @see {@link PlanInfo} - The TypeScript type definition
|
|
14140
|
+
* @see {@link KEYS_PLAN_INFO} - Array of all keys for this type
|
|
14141
|
+
*/
|
|
14142
|
+
export const KEY_PLAN_INFO_NAME = 'name' as keyof PlanInfo;
|
|
14143
|
+
/**
|
|
14144
|
+
* Plan Id
|
|
14145
|
+
*
|
|
14146
|
+
* Unique plan identifier
|
|
14147
|
+
*
|
|
14148
|
+
* @type {string}
|
|
14149
|
+
*
|
|
14150
|
+
*
|
|
14151
|
+
* @remarks
|
|
14152
|
+
* This key constant provides type-safe access to the `plan_id` property of PlanInfo objects.
|
|
14153
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14154
|
+
*
|
|
14155
|
+
* @example
|
|
14156
|
+
* ```typescript
|
|
14157
|
+
* // Direct property access
|
|
14158
|
+
* const value = planinfo[KEY_PLAN_INFO_PLAN_ID];
|
|
14159
|
+
*
|
|
14160
|
+
* // Dynamic property access
|
|
14161
|
+
* const propertyName = KEY_PLAN_INFO_PLAN_ID;
|
|
14162
|
+
* const value = planinfo[propertyName];
|
|
14163
|
+
* ```
|
|
14164
|
+
*
|
|
14165
|
+
* @see {@link PlanInfo} - The TypeScript type definition
|
|
14166
|
+
* @see {@link KEYS_PLAN_INFO} - Array of all keys for this type
|
|
14167
|
+
*/
|
|
14168
|
+
export const KEY_PLAN_INFO_PLAN_ID = 'plan_id' as keyof PlanInfo;
|
|
14169
|
+
/**
|
|
14170
|
+
* Plan Level
|
|
14171
|
+
*
|
|
14172
|
+
* Plan level such as 'premium' or 'starter'
|
|
14173
|
+
*
|
|
14174
|
+
*
|
|
14175
|
+
*
|
|
14176
|
+
* @remarks
|
|
14177
|
+
* This key constant provides type-safe access to the `plan_level` property of PlanInfo objects.
|
|
14178
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14179
|
+
*
|
|
14180
|
+
* @example
|
|
14181
|
+
* ```typescript
|
|
14182
|
+
* // Direct property access
|
|
14183
|
+
* const value = planinfo[KEY_PLAN_INFO_PLAN_LEVEL];
|
|
14184
|
+
*
|
|
14185
|
+
* // Dynamic property access
|
|
14186
|
+
* const propertyName = KEY_PLAN_INFO_PLAN_LEVEL;
|
|
14187
|
+
* const value = planinfo[propertyName];
|
|
14188
|
+
* ```
|
|
14189
|
+
*
|
|
14190
|
+
* @see {@link PlanInfo} - The TypeScript type definition
|
|
14191
|
+
* @see {@link KEYS_PLAN_INFO} - Array of all keys for this type
|
|
14192
|
+
*/
|
|
14193
|
+
export const KEY_PLAN_INFO_PLAN_LEVEL = 'plan_level' as keyof PlanInfo;
|
|
14194
|
+
/**
|
|
14195
|
+
* Plan Type
|
|
14196
|
+
*
|
|
14197
|
+
* Plan type or billing interval
|
|
14198
|
+
*
|
|
14199
|
+
*
|
|
14200
|
+
*
|
|
14201
|
+
* @remarks
|
|
14202
|
+
* This key constant provides type-safe access to the `plan_type` property of PlanInfo objects.
|
|
14203
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14204
|
+
*
|
|
14205
|
+
* @example
|
|
14206
|
+
* ```typescript
|
|
14207
|
+
* // Direct property access
|
|
14208
|
+
* const value = planinfo[KEY_PLAN_INFO_PLAN_TYPE];
|
|
14209
|
+
*
|
|
14210
|
+
* // Dynamic property access
|
|
14211
|
+
* const propertyName = KEY_PLAN_INFO_PLAN_TYPE;
|
|
14212
|
+
* const value = planinfo[propertyName];
|
|
14213
|
+
* ```
|
|
14214
|
+
*
|
|
14215
|
+
* @see {@link PlanInfo} - The TypeScript type definition
|
|
14216
|
+
* @see {@link KEYS_PLAN_INFO} - Array of all keys for this type
|
|
14217
|
+
*/
|
|
14218
|
+
export const KEY_PLAN_INFO_PLAN_TYPE = 'plan_type' as keyof PlanInfo;
|
|
14219
|
+
|
|
14220
|
+
/**
|
|
14221
|
+
* Array of all PlanInfo property keys
|
|
14222
|
+
*
|
|
14223
|
+
* @remarks
|
|
14224
|
+
* This constant provides a readonly array containing all valid property keys for PlanInfo objects.
|
|
14225
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
14226
|
+
*
|
|
14227
|
+
* @example
|
|
14228
|
+
* ```typescript
|
|
14229
|
+
* // Iterating through all keys
|
|
14230
|
+
* for (const key of KEYS_PLAN_INFO) {
|
|
14231
|
+
* console.log(`Property: ${key}, Value: ${planinfo[key]}`);
|
|
14232
|
+
* }
|
|
14233
|
+
*
|
|
14234
|
+
* // Validation
|
|
14235
|
+
* const isValidKey = KEYS_PLAN_INFO.includes(someKey);
|
|
14236
|
+
* ```
|
|
14237
|
+
*
|
|
14238
|
+
* @see {@link PlanInfo} - The TypeScript type definition
|
|
14239
|
+
*/
|
|
14240
|
+
export const KEYS_PLAN_INFO = [
|
|
14241
|
+
KEY_PLAN_INFO_AMOUNT,
|
|
14242
|
+
KEY_PLAN_INFO_CURRENCY,
|
|
14243
|
+
KEY_PLAN_INFO_NAME,
|
|
14244
|
+
KEY_PLAN_INFO_PLAN_ID,
|
|
14245
|
+
KEY_PLAN_INFO_PLAN_LEVEL,
|
|
14246
|
+
KEY_PLAN_INFO_PLAN_TYPE,
|
|
14247
|
+
] as const satisfies (keyof PlanInfo)[];
|
|
14248
|
+
|
|
13934
14249
|
/**
|
|
13935
14250
|
* plan property
|
|
13936
14251
|
*
|
|
@@ -14083,6 +14398,158 @@ export const KEYS_PREMIUM_DOMAINS_BASE = [
|
|
|
14083
14398
|
KEY_PREMIUM_DOMAINS_BASE_SUPPORTED,
|
|
14084
14399
|
] as const satisfies (keyof PremiumDomainsBase)[];
|
|
14085
14400
|
|
|
14401
|
+
/**
|
|
14402
|
+
* Currency
|
|
14403
|
+
*
|
|
14404
|
+
*
|
|
14405
|
+
* @type {string}
|
|
14406
|
+
*
|
|
14407
|
+
*
|
|
14408
|
+
* @remarks
|
|
14409
|
+
* This key constant provides type-safe access to the `currency` property of PriceInfo objects.
|
|
14410
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14411
|
+
*
|
|
14412
|
+
* @example
|
|
14413
|
+
* ```typescript
|
|
14414
|
+
* // Direct property access
|
|
14415
|
+
* const value = priceinfo[KEY_PRICE_INFO_CURRENCY];
|
|
14416
|
+
*
|
|
14417
|
+
* // Dynamic property access
|
|
14418
|
+
* const propertyName = KEY_PRICE_INFO_CURRENCY;
|
|
14419
|
+
* const value = priceinfo[propertyName];
|
|
14420
|
+
* ```
|
|
14421
|
+
*
|
|
14422
|
+
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14423
|
+
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14424
|
+
*/
|
|
14425
|
+
export const KEY_PRICE_INFO_CURRENCY = 'currency' as keyof PriceInfo;
|
|
14426
|
+
/**
|
|
14427
|
+
* Price
|
|
14428
|
+
*
|
|
14429
|
+
*
|
|
14430
|
+
* @type {string}
|
|
14431
|
+
*
|
|
14432
|
+
*
|
|
14433
|
+
* @remarks
|
|
14434
|
+
* This key constant provides type-safe access to the `price` property of PriceInfo objects.
|
|
14435
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14436
|
+
*
|
|
14437
|
+
* @example
|
|
14438
|
+
* ```typescript
|
|
14439
|
+
* // Direct property access
|
|
14440
|
+
* const value = priceinfo[KEY_PRICE_INFO_PRICE];
|
|
14441
|
+
*
|
|
14442
|
+
* // Dynamic property access
|
|
14443
|
+
* const propertyName = KEY_PRICE_INFO_PRICE;
|
|
14444
|
+
* const value = priceinfo[propertyName];
|
|
14445
|
+
* ```
|
|
14446
|
+
*
|
|
14447
|
+
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14448
|
+
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14449
|
+
*/
|
|
14450
|
+
export const KEY_PRICE_INFO_PRICE = 'price' as keyof PriceInfo;
|
|
14451
|
+
/**
|
|
14452
|
+
* Product Action
|
|
14453
|
+
*
|
|
14454
|
+
*
|
|
14455
|
+
*
|
|
14456
|
+
*
|
|
14457
|
+
* @remarks
|
|
14458
|
+
* This key constant provides type-safe access to the `product_action` property of PriceInfo objects.
|
|
14459
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14460
|
+
*
|
|
14461
|
+
* @example
|
|
14462
|
+
* ```typescript
|
|
14463
|
+
* // Direct property access
|
|
14464
|
+
* const value = priceinfo[KEY_PRICE_INFO_PRODUCT_ACTION];
|
|
14465
|
+
*
|
|
14466
|
+
* // Dynamic property access
|
|
14467
|
+
* const propertyName = KEY_PRICE_INFO_PRODUCT_ACTION;
|
|
14468
|
+
* const value = priceinfo[propertyName];
|
|
14469
|
+
* ```
|
|
14470
|
+
*
|
|
14471
|
+
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14472
|
+
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14473
|
+
*/
|
|
14474
|
+
export const KEY_PRICE_INFO_PRODUCT_ACTION = 'product_action' as keyof PriceInfo;
|
|
14475
|
+
/**
|
|
14476
|
+
* Product Class
|
|
14477
|
+
*
|
|
14478
|
+
*
|
|
14479
|
+
*
|
|
14480
|
+
*
|
|
14481
|
+
* @remarks
|
|
14482
|
+
* This key constant provides type-safe access to the `product_class` property of PriceInfo objects.
|
|
14483
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14484
|
+
*
|
|
14485
|
+
* @example
|
|
14486
|
+
* ```typescript
|
|
14487
|
+
* // Direct property access
|
|
14488
|
+
* const value = priceinfo[KEY_PRICE_INFO_PRODUCT_CLASS];
|
|
14489
|
+
*
|
|
14490
|
+
* // Dynamic property access
|
|
14491
|
+
* const propertyName = KEY_PRICE_INFO_PRODUCT_CLASS;
|
|
14492
|
+
* const value = priceinfo[propertyName];
|
|
14493
|
+
* ```
|
|
14494
|
+
*
|
|
14495
|
+
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14496
|
+
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14497
|
+
*/
|
|
14498
|
+
export const KEY_PRICE_INFO_PRODUCT_CLASS = 'product_class' as keyof PriceInfo;
|
|
14499
|
+
/**
|
|
14500
|
+
* Product Type
|
|
14501
|
+
*
|
|
14502
|
+
*
|
|
14503
|
+
* @type {string}
|
|
14504
|
+
*
|
|
14505
|
+
*
|
|
14506
|
+
* @remarks
|
|
14507
|
+
* This key constant provides type-safe access to the `product_type` property of PriceInfo objects.
|
|
14508
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14509
|
+
*
|
|
14510
|
+
* @example
|
|
14511
|
+
* ```typescript
|
|
14512
|
+
* // Direct property access
|
|
14513
|
+
* const value = priceinfo[KEY_PRICE_INFO_PRODUCT_TYPE];
|
|
14514
|
+
*
|
|
14515
|
+
* // Dynamic property access
|
|
14516
|
+
* const propertyName = KEY_PRICE_INFO_PRODUCT_TYPE;
|
|
14517
|
+
* const value = priceinfo[propertyName];
|
|
14518
|
+
* ```
|
|
14519
|
+
*
|
|
14520
|
+
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14521
|
+
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14522
|
+
*/
|
|
14523
|
+
export const KEY_PRICE_INFO_PRODUCT_TYPE = 'product_type' as keyof PriceInfo;
|
|
14524
|
+
|
|
14525
|
+
/**
|
|
14526
|
+
* Array of all PriceInfo property keys
|
|
14527
|
+
*
|
|
14528
|
+
* @remarks
|
|
14529
|
+
* This constant provides a readonly array containing all valid property keys for PriceInfo objects.
|
|
14530
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
14531
|
+
*
|
|
14532
|
+
* @example
|
|
14533
|
+
* ```typescript
|
|
14534
|
+
* // Iterating through all keys
|
|
14535
|
+
* for (const key of KEYS_PRICE_INFO) {
|
|
14536
|
+
* console.log(`Property: ${key}, Value: ${priceinfo[key]}`);
|
|
14537
|
+
* }
|
|
14538
|
+
*
|
|
14539
|
+
* // Validation
|
|
14540
|
+
* const isValidKey = KEYS_PRICE_INFO.includes(someKey);
|
|
14541
|
+
* ```
|
|
14542
|
+
*
|
|
14543
|
+
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14544
|
+
*/
|
|
14545
|
+
export const KEYS_PRICE_INFO = [
|
|
14546
|
+
KEY_PRICE_INFO_CURRENCY,
|
|
14547
|
+
KEY_PRICE_INFO_PRICE,
|
|
14548
|
+
KEY_PRICE_INFO_PRODUCT_ACTION,
|
|
14549
|
+
KEY_PRICE_INFO_PRODUCT_CLASS,
|
|
14550
|
+
KEY_PRICE_INFO_PRODUCT_TYPE,
|
|
14551
|
+
] as const satisfies (keyof PriceInfo)[];
|
|
14552
|
+
|
|
14086
14553
|
/**
|
|
14087
14554
|
* Problem detail
|
|
14088
14555
|
*
|