@opusdns/api 0.282.0 → 0.284.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/README.md +33 -0
- package/package.json +3 -2
- package/src/helpers/constants.ts +163 -1
- package/src/helpers/keys.ts +10189 -8422
- package/src/helpers/requests.d.ts +682 -4
- package/src/helpers/responses.d.ts +1652 -5
- package/src/helpers/schemas-arrays.d.ts +57 -1
- package/src/helpers/schemas.d.ts +272 -0
- package/src/openapi.yaml +1636 -22
- package/src/schema.d.ts +1666 -14
package/README.md
CHANGED
|
@@ -59,6 +59,39 @@ import {
|
|
|
59
59
|
- `User` - User type
|
|
60
60
|
- `Contact` - Contact type
|
|
61
61
|
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
There are two documentation setups in this repository:
|
|
65
|
+
|
|
66
|
+
### Legacy: GitHub Pages API Reference (production)
|
|
67
|
+
|
|
68
|
+
The `docs/` folder is a static site that embeds
|
|
69
|
+
[`@scalar/api-reference`](https://github.com/scalar/scalar) and is published
|
|
70
|
+
via GitHub Pages on [developers.opusdns.com](https://developers.opusdns.com/).
|
|
71
|
+
Source of truth: [`docs/index.html`](./docs/index.html). Do **not** put
|
|
72
|
+
guides/Markdown content here.
|
|
73
|
+
|
|
74
|
+
### Scalar Docs 2.0 (local preview)
|
|
75
|
+
|
|
76
|
+
A more sophisticated documentation setup using
|
|
77
|
+
[Scalar Docs 2.0](https://scalar.com/products/docs/getting-started) is
|
|
78
|
+
contained in [`scalar/`](./scalar/). The Scalar project config lives at
|
|
79
|
+
[`scalar/scalar.config.json`](./scalar/scalar.config.json), guide content lives
|
|
80
|
+
under [`scalar/content/`](./scalar/content/), and the API reference is
|
|
81
|
+
fetched from the raw GitHub copy of [`src/openapi.yaml`](./src/openapi.yaml).
|
|
82
|
+
|
|
83
|
+
To preview locally:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install
|
|
87
|
+
npm --prefix scalar install
|
|
88
|
+
npm run docs:preview
|
|
89
|
+
# → http://localhost:7970
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
> Deployment of the Scalar Docs 2.0 site is intentionally not wired up yet —
|
|
93
|
+
> the legacy GitHub Pages site continues to serve production.
|
|
94
|
+
|
|
62
95
|
### Links
|
|
63
96
|
|
|
64
97
|
- [Main website](https://www.opusdns.com/)
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"@opusdns/api-spec-ts-generator": "^0.19.0"
|
|
4
4
|
},
|
|
5
5
|
"name": "@opusdns/api",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.284.0",
|
|
7
7
|
"description": "TypeScript types for the OpusDNS OpenAPI specification",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"generate:schema": "tsx scripts/generate-schema.ts",
|
|
34
|
-
"generate:helpers": "tsx scripts/generate-all-helpers.ts"
|
|
34
|
+
"generate:helpers": "tsx scripts/generate-all-helpers.ts",
|
|
35
|
+
"docs:preview": "npm --prefix scalar run preview --"
|
|
35
36
|
},
|
|
36
37
|
"homepage": "https://github.com/OpusDNS/api-spec#readme",
|
|
37
38
|
"files": [
|
package/src/helpers/constants.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
import { AllocationMethodType, AttributeType, BatchSortField, BatchStatus, BillingTransactionAction, BillingTransactionProductType, BillingTransactionSortField, BillingTransactionStatus, ComplianceStatus, ConditionOperator, ContactAttributeSetSortField, ContactIncludeField, ContactSortField, Currency, DeletePolicyType, DnsChangeAction, DnsProtectedReason, DnsRrsetType, DnssecAlgorithm, DnssecDigestType, DnssecModeType, DnssecRecordType, DnssecStatus, DomainAttributeKey, DomainAvailabilityStatus, DomainClientStatus, DomainContactType, DomainForwardSortField, DomainForwardZoneSortField, DomainIncludeField, DomainSortField, DomainStatus, EmailForwardLogSortField, EmailForwardLogStatus, EmailForwardSortField, EmailForwardZoneSortField, EmailVerificationStatus, EventObjectType, EventSortField, EventSubtype, EventType, ExecutingEntity, HTTPMethod, HostStatus, HttpProtocol, InvoiceResponsePaymentStatus, InvoiceResponseStatus, InvoiceResponseType, JobStatus, LaunchPhaseType, LegalRequirementOperationType, LegalRequirementType, LocalPresenceRequirementType, MetricsGrouping, ObjectEventType, ObjectLogSortField, OrganizationSortField, OrganizationStatus, ParkingSortField, PatchOp, PeriodUnit, Permission, PostTransferRequirements, PostalAddressType, PremiumAffectsType, PremiumSourceType, Protocol, RedirectCode, RegistrantChangeType, RegistryHandleAttributeType, Relation, RenewalMode, ReportStatus, ReportTriggerType, ReportType, RequestHistorySortField, ReservedSourceType, SortOrder, SyncOperationType, TLDType, TagColor, TagFilterMode, TagSortField, TagType, TimeRange, TransferAckType, UserSortField, UserStatus, VerificationType, ZoneIncludeField, ZoneSortField } from './schemas';
|
|
24
|
+
import { AllocationMethodType, AttributeType, BatchSortField, BatchStatus, BillingTransactionAction, BillingTransactionProductType, BillingTransactionSortField, BillingTransactionStatus, ComplianceStatus, ConditionOperator, ContactAttributeSetSortField, ContactIncludeField, ContactSortField, Currency, DeletePolicyType, DnsChangeAction, DnsProtectedReason, DnsRrsetType, DnssecAlgorithm, DnssecDigestType, DnssecModeType, DnssecRecordType, DnssecStatus, DomainAttributeKey, DomainAvailabilityStatus, DomainClientStatus, DomainContactType, DomainForwardSortField, DomainForwardZoneSortField, DomainIncludeField, DomainSortField, DomainStatus, EmailForwardLogSortField, EmailForwardLogStatus, EmailForwardSortField, EmailForwardZoneSortField, EmailVerificationStatus, EventObjectType, EventSortField, EventSubtype, EventType, ExecutingEntity, HTTPMethod, HostStatus, HttpProtocol, InvoiceResponsePaymentStatus, InvoiceResponseStatus, InvoiceResponseType, JobStatus, LaunchPhaseType, LegalRequirementOperationType, LegalRequirementType, LocalPresenceRequirementType, MemoryFactKind, MessageContextKind, MessageRole, MetricsGrouping, ObjectEventType, ObjectLogSortField, OrganizationSortField, OrganizationStatus, ParkingSortField, PatchOp, PeriodUnit, Permission, PostTransferRequirements, PostalAddressType, PremiumAffectsType, PremiumSourceType, Protocol, RedirectCode, RegistrantChangeType, RegistryHandleAttributeType, Relation, RenewalMode, ReportStatus, ReportTriggerType, ReportType, RequestHistorySortField, ReservedSourceType, SortOrder, SyncOperationType, TLDType, TagColor, TagFilterMode, TagSortField, TagType, TimeRange, TransferAckType, UserSortField, UserStatus, VerificationType, ZoneIncludeField, ZoneSortField } from './schemas';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* AllocationMethodType. Auto-generated enum for AllocationMethodType
|
|
@@ -2934,6 +2934,168 @@ export const LOCAL_PRESENCE_REQUIREMENT_TYPE_VALUES = [
|
|
|
2934
2934
|
'business_entity'
|
|
2935
2935
|
] as const satisfies [string, ...string[]] | LocalPresenceRequirementType[];
|
|
2936
2936
|
|
|
2937
|
+
/**
|
|
2938
|
+
* MemoryFactKind. Auto-generated enum for MemoryFactKind
|
|
2939
|
+
*
|
|
2940
|
+
* @remarks
|
|
2941
|
+
* This constant provides both object and array forms for the MemoryFactKind enum.
|
|
2942
|
+
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
2943
|
+
*
|
|
2944
|
+
* @example
|
|
2945
|
+
* ```typescript
|
|
2946
|
+
* // Using the object form for key-value access
|
|
2947
|
+
* const status = MEMORY_FACT_KIND.SUCCESS;
|
|
2948
|
+
*
|
|
2949
|
+
* // Using the array form for iteration
|
|
2950
|
+
* const allStatuses = MEMORY_FACT_KIND_VALUES;
|
|
2951
|
+
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
2952
|
+
* ```
|
|
2953
|
+
*
|
|
2954
|
+
* @see {@link MemoryFactKind} - The TypeScript type definition
|
|
2955
|
+
*/
|
|
2956
|
+
export const MEMORY_FACT_KIND = {
|
|
2957
|
+
PREFERENCE: "preference",
|
|
2958
|
+
NOTE: "note",
|
|
2959
|
+
OTHER: "other",
|
|
2960
|
+
} as const satisfies Record<string, MemoryFactKind>;
|
|
2961
|
+
|
|
2962
|
+
/**
|
|
2963
|
+
* Array of all MemoryFactKind enum values
|
|
2964
|
+
*
|
|
2965
|
+
* @remarks
|
|
2966
|
+
* This constant provides a array containing all valid MemoryFactKind enum values.
|
|
2967
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
2968
|
+
*
|
|
2969
|
+
* @example
|
|
2970
|
+
* ```typescript
|
|
2971
|
+
* // Iterating through all values
|
|
2972
|
+
* for (const value of MEMORY_FACT_KIND_VALUES) {
|
|
2973
|
+
* console.log(`Processing: ${value}`);
|
|
2974
|
+
* }
|
|
2975
|
+
*
|
|
2976
|
+
* // Validation
|
|
2977
|
+
* const isValid = MEMORY_FACT_KIND_VALUES.includes(someValue);
|
|
2978
|
+
* ```
|
|
2979
|
+
*
|
|
2980
|
+
* @see {@link MemoryFactKind} - The TypeScript type definition
|
|
2981
|
+
* @see {@link MEMORY_FACT_KIND} - The object form of this enum
|
|
2982
|
+
*/
|
|
2983
|
+
export const MEMORY_FACT_KIND_VALUES = [
|
|
2984
|
+
'preference',
|
|
2985
|
+
'note',
|
|
2986
|
+
'other'
|
|
2987
|
+
] as const satisfies [string, ...string[]] | MemoryFactKind[];
|
|
2988
|
+
|
|
2989
|
+
/**
|
|
2990
|
+
* MessageContextKind. Auto-generated enum for MessageContextKind
|
|
2991
|
+
*
|
|
2992
|
+
* @remarks
|
|
2993
|
+
* This constant provides both object and array forms for the MessageContextKind enum.
|
|
2994
|
+
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
2995
|
+
*
|
|
2996
|
+
* @example
|
|
2997
|
+
* ```typescript
|
|
2998
|
+
* // Using the object form for key-value access
|
|
2999
|
+
* const status = MESSAGE_CONTEXT_KIND.SUCCESS;
|
|
3000
|
+
*
|
|
3001
|
+
* // Using the array form for iteration
|
|
3002
|
+
* const allStatuses = MESSAGE_CONTEXT_KIND_VALUES;
|
|
3003
|
+
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
3004
|
+
* ```
|
|
3005
|
+
*
|
|
3006
|
+
* @see {@link MessageContextKind} - The TypeScript type definition
|
|
3007
|
+
*/
|
|
3008
|
+
export const MESSAGE_CONTEXT_KIND = {
|
|
3009
|
+
ZONES: "zones",
|
|
3010
|
+
CONTACTS: "contacts",
|
|
3011
|
+
DOMAINS: "domains",
|
|
3012
|
+
BATCH_IDS: "batch_ids",
|
|
3013
|
+
OTHER: "other",
|
|
3014
|
+
} as const satisfies Record<string, MessageContextKind>;
|
|
3015
|
+
|
|
3016
|
+
/**
|
|
3017
|
+
* Array of all MessageContextKind enum values
|
|
3018
|
+
*
|
|
3019
|
+
* @remarks
|
|
3020
|
+
* This constant provides a array containing all valid MessageContextKind enum values.
|
|
3021
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
3022
|
+
*
|
|
3023
|
+
* @example
|
|
3024
|
+
* ```typescript
|
|
3025
|
+
* // Iterating through all values
|
|
3026
|
+
* for (const value of MESSAGE_CONTEXT_KIND_VALUES) {
|
|
3027
|
+
* console.log(`Processing: ${value}`);
|
|
3028
|
+
* }
|
|
3029
|
+
*
|
|
3030
|
+
* // Validation
|
|
3031
|
+
* const isValid = MESSAGE_CONTEXT_KIND_VALUES.includes(someValue);
|
|
3032
|
+
* ```
|
|
3033
|
+
*
|
|
3034
|
+
* @see {@link MessageContextKind} - The TypeScript type definition
|
|
3035
|
+
* @see {@link MESSAGE_CONTEXT_KIND} - The object form of this enum
|
|
3036
|
+
*/
|
|
3037
|
+
export const MESSAGE_CONTEXT_KIND_VALUES = [
|
|
3038
|
+
'zones',
|
|
3039
|
+
'contacts',
|
|
3040
|
+
'domains',
|
|
3041
|
+
'batch_ids',
|
|
3042
|
+
'other'
|
|
3043
|
+
] as const satisfies [string, ...string[]] | MessageContextKind[];
|
|
3044
|
+
|
|
3045
|
+
/**
|
|
3046
|
+
* MessageRole. Auto-generated enum for MessageRole
|
|
3047
|
+
*
|
|
3048
|
+
* @remarks
|
|
3049
|
+
* This constant provides both object and array forms for the MessageRole enum.
|
|
3050
|
+
* The object form allows key-value access, while the array form enables iteration and validation.
|
|
3051
|
+
*
|
|
3052
|
+
* @example
|
|
3053
|
+
* ```typescript
|
|
3054
|
+
* // Using the object form for key-value access
|
|
3055
|
+
* const status = MESSAGE_ROLE.SUCCESS;
|
|
3056
|
+
*
|
|
3057
|
+
* // Using the array form for iteration
|
|
3058
|
+
* const allStatuses = MESSAGE_ROLE_VALUES;
|
|
3059
|
+
* console.log(`Available statuses: ${allStatuses.join(', ')}`);
|
|
3060
|
+
* ```
|
|
3061
|
+
*
|
|
3062
|
+
* @see {@link MessageRole} - The TypeScript type definition
|
|
3063
|
+
*/
|
|
3064
|
+
export const MESSAGE_ROLE = {
|
|
3065
|
+
USER: "user",
|
|
3066
|
+
ASSISTANT: "assistant",
|
|
3067
|
+
SYSTEM: "system",
|
|
3068
|
+
TOOL: "tool",
|
|
3069
|
+
} as const satisfies Record<string, MessageRole>;
|
|
3070
|
+
|
|
3071
|
+
/**
|
|
3072
|
+
* Array of all MessageRole enum values
|
|
3073
|
+
*
|
|
3074
|
+
* @remarks
|
|
3075
|
+
* This constant provides a array containing all valid MessageRole enum values.
|
|
3076
|
+
* Useful for iteration, validation, and generating dynamic UI components.
|
|
3077
|
+
*
|
|
3078
|
+
* @example
|
|
3079
|
+
* ```typescript
|
|
3080
|
+
* // Iterating through all values
|
|
3081
|
+
* for (const value of MESSAGE_ROLE_VALUES) {
|
|
3082
|
+
* console.log(`Processing: ${value}`);
|
|
3083
|
+
* }
|
|
3084
|
+
*
|
|
3085
|
+
* // Validation
|
|
3086
|
+
* const isValid = MESSAGE_ROLE_VALUES.includes(someValue);
|
|
3087
|
+
* ```
|
|
3088
|
+
*
|
|
3089
|
+
* @see {@link MessageRole} - The TypeScript type definition
|
|
3090
|
+
* @see {@link MESSAGE_ROLE} - The object form of this enum
|
|
3091
|
+
*/
|
|
3092
|
+
export const MESSAGE_ROLE_VALUES = [
|
|
3093
|
+
'user',
|
|
3094
|
+
'assistant',
|
|
3095
|
+
'system',
|
|
3096
|
+
'tool'
|
|
3097
|
+
] as const satisfies [string, ...string[]] | MessageRole[];
|
|
3098
|
+
|
|
2937
3099
|
/**
|
|
2938
3100
|
* MetricsGrouping. Auto-generated enum for MetricsGrouping
|
|
2939
3101
|
*
|