@shipstatic/types 2.26.0-beta.2 → 2.26.0-beta.3

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
@@ -479,13 +479,28 @@ export interface SetupInstructionsResponse {
479
479
  * one key cannot mean both. See {@link DeploymentDeleteResponse} for the law.
480
480
  */
481
481
  export interface DomainValidateResponse {
482
- /** Whether the domain is valid */
482
+ /** Whether the domain's SHAPE is usable: format, and the caller's own rules. */
483
483
  valid: boolean;
484
484
  /** Normalized domain name, null when invalid */
485
485
  normalized: string | null;
486
- /** Whether the domain is available, null when invalid */
486
+ /**
487
+ * Whether nobody has registered the name yet; null when invalid.
488
+ *
489
+ * It answers "would creating this be new", not "would a write succeed": `PUT
490
+ * /domains/:domain` is an upsert, which is how a domain is re-pointed, so a
491
+ * caller's OWN domain is unavailable here and writable there. Availability
492
+ * does not depend on the kind of name; a custom domain answered `true`
493
+ * whoever owned it until 2026-09-17.
494
+ */
487
495
  available: boolean | null;
488
- /** Why the name is unusable, null when valid — displayed verbatim. */
496
+ /**
497
+ * Why the name is unusable, null when it IS usable — displayed verbatim.
498
+ *
499
+ * A name is unusable when it is invalid OR unavailable, and both carry a
500
+ * reason. This said "null when valid" until 2026-09-17, which was already
501
+ * untrue of the endpoint it described: a registered name is valid, is
502
+ * unusable, and had no reason at all, which is why every client invented one.
503
+ */
489
504
  reason: string | null;
490
505
  }
491
506
  /**
package/dist/schemas.js CHANGED
@@ -165,10 +165,16 @@ export const DomainShareResponseSchema = z.object({
165
165
  .describe('The shareable DNS setup URL; whoever opens it sees the records to configure, with no API key.'),
166
166
  });
167
167
  export const DomainValidateResponseSchema = z.object({
168
- valid: z.boolean().describe('Whether the domain name is valid.'),
168
+ valid: z.boolean().describe("Whether the domain's shape is usable."),
169
169
  normalized: z.string().nullable().describe('The normalized domain name; null when invalid.'),
170
- available: z.boolean().nullable().describe('Whether the domain is available; null when invalid.'),
171
- reason: z.string().nullable().describe('Why the name is unusable, for display; null when valid.'),
170
+ available: z
171
+ .boolean()
172
+ .nullable()
173
+ .describe('Whether nobody has registered the name yet; null when invalid. Creating it would be new; re-pointing your own domain is a write, not a create.'),
174
+ reason: z
175
+ .string()
176
+ .nullable()
177
+ .describe('Why the name is unusable, for display; null when it is usable.'),
172
178
  });
173
179
  // =============================================================================
174
180
  // ACCOUNT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "2.26.0-beta.2",
3
+ "version": "2.26.0-beta.3",
4
4
  "description": "Shared TypeScript types for the ShipStatic platform.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -538,13 +538,28 @@ export interface SetupInstructionsResponse {
538
538
  * one key cannot mean both. See {@link DeploymentDeleteResponse} for the law.
539
539
  */
540
540
  export interface DomainValidateResponse {
541
- /** Whether the domain is valid */
541
+ /** Whether the domain's SHAPE is usable: format, and the caller's own rules. */
542
542
  valid: boolean;
543
543
  /** Normalized domain name, null when invalid */
544
544
  normalized: string | null;
545
- /** Whether the domain is available, null when invalid */
545
+ /**
546
+ * Whether nobody has registered the name yet; null when invalid.
547
+ *
548
+ * It answers "would creating this be new", not "would a write succeed": `PUT
549
+ * /domains/:domain` is an upsert, which is how a domain is re-pointed, so a
550
+ * caller's OWN domain is unavailable here and writable there. Availability
551
+ * does not depend on the kind of name; a custom domain answered `true`
552
+ * whoever owned it until 2026-09-17.
553
+ */
546
554
  available: boolean | null;
547
- /** Why the name is unusable, null when valid — displayed verbatim. */
555
+ /**
556
+ * Why the name is unusable, null when it IS usable — displayed verbatim.
557
+ *
558
+ * A name is unusable when it is invalid OR unavailable, and both carry a
559
+ * reason. This said "null when valid" until 2026-09-17, which was already
560
+ * untrue of the endpoint it described: a registered name is valid, is
561
+ * unusable, and had no reason at all, which is why every client invented one.
562
+ */
548
563
  reason: string | null;
549
564
  }
550
565
 
package/src/schemas.ts CHANGED
@@ -218,10 +218,18 @@ export const DomainShareResponseSchema = z.object({
218
218
  });
219
219
 
220
220
  export const DomainValidateResponseSchema = z.object({
221
- valid: z.boolean().describe('Whether the domain name is valid.'),
221
+ valid: z.boolean().describe("Whether the domain's shape is usable."),
222
222
  normalized: z.string().nullable().describe('The normalized domain name; null when invalid.'),
223
- available: z.boolean().nullable().describe('Whether the domain is available; null when invalid.'),
224
- reason: z.string().nullable().describe('Why the name is unusable, for display; null when valid.'),
223
+ available: z
224
+ .boolean()
225
+ .nullable()
226
+ .describe(
227
+ 'Whether nobody has registered the name yet; null when invalid. Creating it would be new; re-pointing your own domain is a write, not a create.',
228
+ ),
229
+ reason: z
230
+ .string()
231
+ .nullable()
232
+ .describe('Why the name is unusable, for display; null when it is usable.'),
225
233
  });
226
234
 
227
235
  // =============================================================================