@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 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
@@ -261,7 +261,7 @@ export function validateApiUrl(apiUrl) {
261
261
  }
262
262
  }
263
263
  catch (error) {
264
- if (error instanceof ShipError) {
264
+ if (isShipError(error)) {
265
265
  throw error;
266
266
  }
267
267
  throw ShipError.validation('API URL must be a valid URL');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "description": "Shared types for Shipstatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
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 instanceof ShipError) {
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 }>;