@shipstatic/types 0.4.13 → 0.4.14
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/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -512,6 +512,11 @@ export interface DomainResource {
|
|
|
512
512
|
verify: (name: string) => Promise<{
|
|
513
513
|
message: string;
|
|
514
514
|
}>;
|
|
515
|
+
validate: (name: string) => Promise<{
|
|
516
|
+
valid: boolean;
|
|
517
|
+
normalized?: string;
|
|
518
|
+
error?: string;
|
|
519
|
+
}>;
|
|
515
520
|
dns: (name: string) => Promise<DomainDnsResponse>;
|
|
516
521
|
records: (name: string) => Promise<DomainRecordsResponse>;
|
|
517
522
|
share: (name: string) => Promise<{
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -589,7 +589,7 @@ export function validateApiUrl(apiUrl: string): void {
|
|
|
589
589
|
throw ShipError.validation('API URL must not contain query parameters or fragments');
|
|
590
590
|
}
|
|
591
591
|
} catch (error) {
|
|
592
|
-
if (error
|
|
592
|
+
if (isShipError(error)) {
|
|
593
593
|
throw error;
|
|
594
594
|
}
|
|
595
595
|
throw ShipError.validation('API URL must be a valid URL');
|
|
@@ -764,6 +764,7 @@ export interface DomainResource {
|
|
|
764
764
|
get: (name: string) => Promise<Domain>;
|
|
765
765
|
remove: (name: string) => Promise<void>;
|
|
766
766
|
verify: (name: string) => Promise<{ message: string }>;
|
|
767
|
+
validate: (name: string) => Promise<{ valid: boolean; normalized?: string; error?: string }>;
|
|
767
768
|
dns: (name: string) => Promise<DomainDnsResponse>;
|
|
768
769
|
records: (name: string) => Promise<DomainRecordsResponse>;
|
|
769
770
|
share: (name: string) => Promise<{ domain: string; hash: string }>;
|