@opusdns/api 0.59.0 → 0.61.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/keys.ts +104 -0
- package/src/helpers/schemas.d.ts +16 -0
- package/src/openapi.yaml +21 -1
- package/src/schema.d.ts +12 -0
package/package.json
CHANGED
package/src/helpers/keys.ts
CHANGED
|
@@ -120,6 +120,7 @@ import { PlanInfo } from './schemas';
|
|
|
120
120
|
import { PlanUpdate } from './schemas';
|
|
121
121
|
import { PremiumDomainsBase } from './schemas';
|
|
122
122
|
import { PriceInfo } from './schemas';
|
|
123
|
+
import { PricingPeriod } from './schemas';
|
|
123
124
|
import { Problem } from './schemas';
|
|
124
125
|
import { RdapBase } from './schemas';
|
|
125
126
|
import { RegistryLockBase } from './schemas';
|
|
@@ -14316,6 +14317,31 @@ export const KEYS_PREMIUM_DOMAINS_BASE = [
|
|
|
14316
14317
|
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14317
14318
|
*/
|
|
14318
14319
|
export const KEY_PRICE_INFO_CURRENCY = 'currency' as keyof PriceInfo;
|
|
14320
|
+
/**
|
|
14321
|
+
* period property
|
|
14322
|
+
*
|
|
14323
|
+
* Pricing period (e.g., 1 year, 2 months)
|
|
14324
|
+
*
|
|
14325
|
+
*
|
|
14326
|
+
*
|
|
14327
|
+
* @remarks
|
|
14328
|
+
* This key constant provides type-safe access to the `period` property of PriceInfo objects.
|
|
14329
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14330
|
+
*
|
|
14331
|
+
* @example
|
|
14332
|
+
* ```typescript
|
|
14333
|
+
* // Direct property access
|
|
14334
|
+
* const value = priceinfo[KEY_PRICE_INFO_PERIOD];
|
|
14335
|
+
*
|
|
14336
|
+
* // Dynamic property access
|
|
14337
|
+
* const propertyName = KEY_PRICE_INFO_PERIOD;
|
|
14338
|
+
* const value = priceinfo[propertyName];
|
|
14339
|
+
* ```
|
|
14340
|
+
*
|
|
14341
|
+
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14342
|
+
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14343
|
+
*/
|
|
14344
|
+
export const KEY_PRICE_INFO_PERIOD = 'period' as keyof PriceInfo;
|
|
14319
14345
|
/**
|
|
14320
14346
|
* Price
|
|
14321
14347
|
*
|
|
@@ -14437,12 +14463,90 @@ export const KEY_PRICE_INFO_PRODUCT_TYPE = 'product_type' as keyof PriceInfo;
|
|
|
14437
14463
|
*/
|
|
14438
14464
|
export const KEYS_PRICE_INFO = [
|
|
14439
14465
|
KEY_PRICE_INFO_CURRENCY,
|
|
14466
|
+
KEY_PRICE_INFO_PERIOD,
|
|
14440
14467
|
KEY_PRICE_INFO_PRICE,
|
|
14441
14468
|
KEY_PRICE_INFO_PRODUCT_ACTION,
|
|
14442
14469
|
KEY_PRICE_INFO_PRODUCT_CLASS,
|
|
14443
14470
|
KEY_PRICE_INFO_PRODUCT_TYPE,
|
|
14444
14471
|
] as const satisfies (keyof PriceInfo)[];
|
|
14445
14472
|
|
|
14473
|
+
/**
|
|
14474
|
+
* unit property
|
|
14475
|
+
*
|
|
14476
|
+
* The unit of the period
|
|
14477
|
+
*
|
|
14478
|
+
*
|
|
14479
|
+
*
|
|
14480
|
+
* @remarks
|
|
14481
|
+
* This key constant provides type-safe access to the `unit` property of PricingPeriod objects.
|
|
14482
|
+
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14483
|
+
*
|
|
14484
|
+
* @example
|
|
14485
|
+
* ```typescript
|
|
14486
|
+
* // Direct property access
|
|
14487
|
+
* const value = pricingperiod[KEY_PRICING_PERIOD_UNIT];
|
|
14488
|
+
*
|
|
14489
|
+
* // Dynamic property access
|
|
14490
|
+
* const propertyName = KEY_PRICING_PERIOD_UNIT;
|
|
14491
|
+
* const value = pricingperiod[propertyName];
|
|
14492
|
+
* ```
|
|
14493
|
+
*
|
|
14494
|
+
* @see {@link PricingPeriod} - The TypeScript type definition
|
|
14495
|
+
* @see {@link KEYS_PRICING_PERIOD} - Array of all keys for this type
|
|
14496
|
+
*/
|
|
14497
|
+
export const KEY_PRICING_PERIOD_UNIT = 'unit' as keyof PricingPeriod;
|
|
14498
|
+
/**
|
|
14499
|
+
* Value
|
|
14500
|
+
*
|
|
14501
|
+
* Amount of time in the unit
|
|
14502
|
+
*
|
|
14503
|
+
* @type {integer}
|
|
14504
|
+
*
|
|
14505
|
+
*
|
|
14506
|
+
* @remarks
|
|
14507
|
+
* This key constant provides type-safe access to the `value` property of PricingPeriod 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 = pricingperiod[KEY_PRICING_PERIOD_VALUE];
|
|
14514
|
+
*
|
|
14515
|
+
* // Dynamic property access
|
|
14516
|
+
* const propertyName = KEY_PRICING_PERIOD_VALUE;
|
|
14517
|
+
* const value = pricingperiod[propertyName];
|
|
14518
|
+
* ```
|
|
14519
|
+
*
|
|
14520
|
+
* @see {@link PricingPeriod} - The TypeScript type definition
|
|
14521
|
+
* @see {@link KEYS_PRICING_PERIOD} - Array of all keys for this type
|
|
14522
|
+
*/
|
|
14523
|
+
export const KEY_PRICING_PERIOD_VALUE = 'value' as keyof PricingPeriod;
|
|
14524
|
+
|
|
14525
|
+
/**
|
|
14526
|
+
* Array of all PricingPeriod property keys
|
|
14527
|
+
*
|
|
14528
|
+
* @remarks
|
|
14529
|
+
* This constant provides a readonly array containing all valid property keys for PricingPeriod 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_PRICING_PERIOD) {
|
|
14536
|
+
* console.log(`Property: ${key}, Value: ${pricingperiod[key]}`);
|
|
14537
|
+
* }
|
|
14538
|
+
*
|
|
14539
|
+
* // Validation
|
|
14540
|
+
* const isValidKey = KEYS_PRICING_PERIOD.includes(someKey);
|
|
14541
|
+
* ```
|
|
14542
|
+
*
|
|
14543
|
+
* @see {@link PricingPeriod} - The TypeScript type definition
|
|
14544
|
+
*/
|
|
14545
|
+
export const KEYS_PRICING_PERIOD = [
|
|
14546
|
+
KEY_PRICING_PERIOD_UNIT,
|
|
14547
|
+
KEY_PRICING_PERIOD_VALUE,
|
|
14548
|
+
] as const satisfies (keyof PricingPeriod)[];
|
|
14549
|
+
|
|
14446
14550
|
/**
|
|
14447
14551
|
* Problem detail
|
|
14448
14552
|
*
|
package/src/helpers/schemas.d.ts
CHANGED
|
@@ -2287,6 +2287,22 @@ export type PremiumSourceType = components['schemas']['PremiumSourceType'];
|
|
|
2287
2287
|
* @see {@link components} - The OpenAPI components schema definition
|
|
2288
2288
|
*/
|
|
2289
2289
|
export type PriceInfo = components['schemas']['PriceInfo'];
|
|
2290
|
+
/**
|
|
2291
|
+
* PricingPeriod
|
|
2292
|
+
*
|
|
2293
|
+
* @remarks
|
|
2294
|
+
* Type alias for the `PricingPeriod` OpenAPI schema.
|
|
2295
|
+
* This type represents pricingperiod data structures used in API requests and responses.
|
|
2296
|
+
*
|
|
2297
|
+
* @example
|
|
2298
|
+
* ```typescript
|
|
2299
|
+
* const response = await api.getPricingPeriod();
|
|
2300
|
+
* const item: PricingPeriod = response.results;
|
|
2301
|
+
* ```
|
|
2302
|
+
*
|
|
2303
|
+
* @see {@link components} - The OpenAPI components schema definition
|
|
2304
|
+
*/
|
|
2305
|
+
export type PricingPeriod = components['schemas']['PricingPeriod'];
|
|
2290
2306
|
/**
|
|
2291
2307
|
* Problem
|
|
2292
2308
|
*
|
package/src/openapi.yaml
CHANGED
|
@@ -3756,6 +3756,11 @@ components:
|
|
|
3756
3756
|
currency:
|
|
3757
3757
|
title: Currency
|
|
3758
3758
|
type: string
|
|
3759
|
+
period:
|
|
3760
|
+
anyOf:
|
|
3761
|
+
- $ref: '#/components/schemas/PricingPeriod'
|
|
3762
|
+
- type: 'null'
|
|
3763
|
+
description: Pricing period (e.g., 1 year, 2 months)
|
|
3759
3764
|
price:
|
|
3760
3765
|
title: Price
|
|
3761
3766
|
type: string
|
|
@@ -3778,6 +3783,21 @@ components:
|
|
|
3778
3783
|
- currency
|
|
3779
3784
|
title: PriceInfo
|
|
3780
3785
|
type: object
|
|
3786
|
+
PricingPeriod:
|
|
3787
|
+
properties:
|
|
3788
|
+
unit:
|
|
3789
|
+
$ref: '#/components/schemas/PeriodUnit'
|
|
3790
|
+
description: The unit of the period
|
|
3791
|
+
value:
|
|
3792
|
+
description: Amount of time in the unit
|
|
3793
|
+
exclusiveMinimum: 0.0
|
|
3794
|
+
title: Value
|
|
3795
|
+
type: integer
|
|
3796
|
+
required:
|
|
3797
|
+
- value
|
|
3798
|
+
- unit
|
|
3799
|
+
title: PricingPeriod
|
|
3800
|
+
type: object
|
|
3781
3801
|
Problem:
|
|
3782
3802
|
properties:
|
|
3783
3803
|
detail:
|
|
@@ -4908,7 +4928,7 @@ info:
|
|
|
4908
4928
|
'
|
|
4909
4929
|
summary: OpusDNS - your gateway to a seamless domain management experience.
|
|
4910
4930
|
title: OpusDNS API
|
|
4911
|
-
version: 2025-09-22-
|
|
4931
|
+
version: 2025-09-22-215413
|
|
4912
4932
|
x-logo:
|
|
4913
4933
|
altText: OpusDNS API Reference
|
|
4914
4934
|
url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
|
package/src/schema.d.ts
CHANGED
|
@@ -3545,6 +3545,8 @@ export interface components {
|
|
|
3545
3545
|
PriceInfo: {
|
|
3546
3546
|
/** Currency */
|
|
3547
3547
|
currency: string;
|
|
3548
|
+
/** @description Pricing period (e.g., 1 year, 2 months) */
|
|
3549
|
+
period?: components["schemas"]["PricingPeriod"] | null;
|
|
3548
3550
|
/** Price */
|
|
3549
3551
|
price: string;
|
|
3550
3552
|
/** Product Action */
|
|
@@ -3554,6 +3556,16 @@ export interface components {
|
|
|
3554
3556
|
/** Product Type */
|
|
3555
3557
|
product_type: string;
|
|
3556
3558
|
};
|
|
3559
|
+
/** PricingPeriod */
|
|
3560
|
+
PricingPeriod: {
|
|
3561
|
+
/** @description The unit of the period */
|
|
3562
|
+
unit: components["schemas"]["PeriodUnit"];
|
|
3563
|
+
/**
|
|
3564
|
+
* Value
|
|
3565
|
+
* @description Amount of time in the unit
|
|
3566
|
+
*/
|
|
3567
|
+
value: number;
|
|
3568
|
+
};
|
|
3557
3569
|
/** Problem */
|
|
3558
3570
|
Problem: {
|
|
3559
3571
|
/** Problem detail */
|