@opusdns/api 0.60.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 +85 -33
- package/src/helpers/schemas.d.ts +16 -0
- package/src/openapi.yaml +19 -11
- package/src/schema.d.ts +12 -10
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';
|
|
@@ -14317,55 +14318,30 @@ export const KEYS_PREMIUM_DOMAINS_BASE = [
|
|
|
14317
14318
|
*/
|
|
14318
14319
|
export const KEY_PRICE_INFO_CURRENCY = 'currency' as keyof PriceInfo;
|
|
14319
14320
|
/**
|
|
14320
|
-
*
|
|
14321
|
-
*
|
|
14322
|
-
* Period unit: 'y' (year), 'm' (month), 'd' (day)
|
|
14323
|
-
*
|
|
14324
|
-
*
|
|
14325
|
-
*
|
|
14326
|
-
* @remarks
|
|
14327
|
-
* This key constant provides type-safe access to the `period_unit` property of PriceInfo objects.
|
|
14328
|
-
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14329
|
-
*
|
|
14330
|
-
* @example
|
|
14331
|
-
* ```typescript
|
|
14332
|
-
* // Direct property access
|
|
14333
|
-
* const value = priceinfo[KEY_PRICE_INFO_PERIOD_UNIT];
|
|
14334
|
-
*
|
|
14335
|
-
* // Dynamic property access
|
|
14336
|
-
* const propertyName = KEY_PRICE_INFO_PERIOD_UNIT;
|
|
14337
|
-
* const value = priceinfo[propertyName];
|
|
14338
|
-
* ```
|
|
14339
|
-
*
|
|
14340
|
-
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14341
|
-
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14342
|
-
*/
|
|
14343
|
-
export const KEY_PRICE_INFO_PERIOD_UNIT = 'period_unit' as keyof PriceInfo;
|
|
14344
|
-
/**
|
|
14345
|
-
* Period Value
|
|
14321
|
+
* period property
|
|
14346
14322
|
*
|
|
14347
|
-
*
|
|
14323
|
+
* Pricing period (e.g., 1 year, 2 months)
|
|
14348
14324
|
*
|
|
14349
14325
|
*
|
|
14350
14326
|
*
|
|
14351
14327
|
* @remarks
|
|
14352
|
-
* This key constant provides type-safe access to the `
|
|
14328
|
+
* This key constant provides type-safe access to the `period` property of PriceInfo objects.
|
|
14353
14329
|
* Use this constant when you need to access properties dynamically or ensure type safety.
|
|
14354
14330
|
*
|
|
14355
14331
|
* @example
|
|
14356
14332
|
* ```typescript
|
|
14357
14333
|
* // Direct property access
|
|
14358
|
-
* const value = priceinfo[
|
|
14334
|
+
* const value = priceinfo[KEY_PRICE_INFO_PERIOD];
|
|
14359
14335
|
*
|
|
14360
14336
|
* // Dynamic property access
|
|
14361
|
-
* const propertyName =
|
|
14337
|
+
* const propertyName = KEY_PRICE_INFO_PERIOD;
|
|
14362
14338
|
* const value = priceinfo[propertyName];
|
|
14363
14339
|
* ```
|
|
14364
14340
|
*
|
|
14365
14341
|
* @see {@link PriceInfo} - The TypeScript type definition
|
|
14366
14342
|
* @see {@link KEYS_PRICE_INFO} - Array of all keys for this type
|
|
14367
14343
|
*/
|
|
14368
|
-
export const
|
|
14344
|
+
export const KEY_PRICE_INFO_PERIOD = 'period' as keyof PriceInfo;
|
|
14369
14345
|
/**
|
|
14370
14346
|
* Price
|
|
14371
14347
|
*
|
|
@@ -14487,14 +14463,90 @@ export const KEY_PRICE_INFO_PRODUCT_TYPE = 'product_type' as keyof PriceInfo;
|
|
|
14487
14463
|
*/
|
|
14488
14464
|
export const KEYS_PRICE_INFO = [
|
|
14489
14465
|
KEY_PRICE_INFO_CURRENCY,
|
|
14490
|
-
|
|
14491
|
-
KEY_PRICE_INFO_PERIOD_VALUE,
|
|
14466
|
+
KEY_PRICE_INFO_PERIOD,
|
|
14492
14467
|
KEY_PRICE_INFO_PRICE,
|
|
14493
14468
|
KEY_PRICE_INFO_PRODUCT_ACTION,
|
|
14494
14469
|
KEY_PRICE_INFO_PRODUCT_CLASS,
|
|
14495
14470
|
KEY_PRICE_INFO_PRODUCT_TYPE,
|
|
14496
14471
|
] as const satisfies (keyof PriceInfo)[];
|
|
14497
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
|
+
|
|
14498
14550
|
/**
|
|
14499
14551
|
* Problem detail
|
|
14500
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,18 +3756,11 @@ components:
|
|
|
3756
3756
|
currency:
|
|
3757
3757
|
title: Currency
|
|
3758
3758
|
type: string
|
|
3759
|
-
|
|
3760
|
-
anyOf:
|
|
3761
|
-
- type: string
|
|
3762
|
-
- type: 'null'
|
|
3763
|
-
description: 'Period unit: ''y'' (year), ''m'' (month), ''d'' (day)'
|
|
3764
|
-
title: Period Unit
|
|
3765
|
-
period_value:
|
|
3759
|
+
period:
|
|
3766
3760
|
anyOf:
|
|
3767
|
-
-
|
|
3761
|
+
- $ref: '#/components/schemas/PricingPeriod'
|
|
3768
3762
|
- type: 'null'
|
|
3769
|
-
description:
|
|
3770
|
-
title: Period Value
|
|
3763
|
+
description: Pricing period (e.g., 1 year, 2 months)
|
|
3771
3764
|
price:
|
|
3772
3765
|
title: Price
|
|
3773
3766
|
type: string
|
|
@@ -3790,6 +3783,21 @@ components:
|
|
|
3790
3783
|
- currency
|
|
3791
3784
|
title: PriceInfo
|
|
3792
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
|
|
3793
3801
|
Problem:
|
|
3794
3802
|
properties:
|
|
3795
3803
|
detail:
|
|
@@ -4920,7 +4928,7 @@ info:
|
|
|
4920
4928
|
'
|
|
4921
4929
|
summary: OpusDNS - your gateway to a seamless domain management experience.
|
|
4922
4930
|
title: OpusDNS API
|
|
4923
|
-
version: 2025-09-22-
|
|
4931
|
+
version: 2025-09-22-215413
|
|
4924
4932
|
x-logo:
|
|
4925
4933
|
altText: OpusDNS API Reference
|
|
4926
4934
|
url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
|
package/src/schema.d.ts
CHANGED
|
@@ -3545,16 +3545,8 @@ export interface components {
|
|
|
3545
3545
|
PriceInfo: {
|
|
3546
3546
|
/** Currency */
|
|
3547
3547
|
currency: string;
|
|
3548
|
-
/**
|
|
3549
|
-
|
|
3550
|
-
* @description Period unit: 'y' (year), 'm' (month), 'd' (day)
|
|
3551
|
-
*/
|
|
3552
|
-
period_unit?: string | null;
|
|
3553
|
-
/**
|
|
3554
|
-
* Period Value
|
|
3555
|
-
* @description Period value (e.g., 1 for 1 year)
|
|
3556
|
-
*/
|
|
3557
|
-
period_value?: number | null;
|
|
3548
|
+
/** @description Pricing period (e.g., 1 year, 2 months) */
|
|
3549
|
+
period?: components["schemas"]["PricingPeriod"] | null;
|
|
3558
3550
|
/** Price */
|
|
3559
3551
|
price: string;
|
|
3560
3552
|
/** Product Action */
|
|
@@ -3564,6 +3556,16 @@ export interface components {
|
|
|
3564
3556
|
/** Product Type */
|
|
3565
3557
|
product_type: string;
|
|
3566
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
|
+
};
|
|
3567
3569
|
/** Problem */
|
|
3568
3570
|
Problem: {
|
|
3569
3571
|
/** Problem detail */
|