@shipstatic/types 2.5.0-beta.14 → 2.5.0-beta.16
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 +80 -11
- package/dist/index.js +19 -4
- package/package.json +1 -1
- package/src/index.ts +91 -14
package/dist/index.d.ts
CHANGED
|
@@ -276,6 +276,10 @@ export interface DnsLookup {
|
|
|
276
276
|
/** The provider serving this domain's DNS, absent when unidentified */
|
|
277
277
|
provider?: DnsProvider;
|
|
278
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
281
|
+
* "A report answers a question").
|
|
282
|
+
*/
|
|
279
283
|
export interface DomainDnsResponse {
|
|
280
284
|
/** The domain name */
|
|
281
285
|
domain: string;
|
|
@@ -288,6 +292,9 @@ export interface DomainDnsResponse {
|
|
|
288
292
|
*
|
|
289
293
|
* `/admin/domains/:domain/share` answers the same shape, which is the admin
|
|
290
294
|
* law working: the operator surface is the public grammar with a prefix.
|
|
295
|
+
*
|
|
296
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
297
|
+
* "A report answers a question").
|
|
291
298
|
*/
|
|
292
299
|
export interface DomainShareResponse {
|
|
293
300
|
/** The domain the setup link is for */
|
|
@@ -297,6 +304,9 @@ export interface DomainShareResponse {
|
|
|
297
304
|
}
|
|
298
305
|
/**
|
|
299
306
|
* Response for domain DNS records
|
|
307
|
+
*
|
|
308
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
309
|
+
* "A report answers a question").
|
|
300
310
|
*/
|
|
301
311
|
export interface DomainRecordsResponse {
|
|
302
312
|
/** The domain name */
|
|
@@ -332,6 +342,9 @@ export declare function validateIdempotencyKey(value: unknown): string | undefin
|
|
|
332
342
|
* no identity, no row and no `created`, so there is nothing for a keyset
|
|
333
343
|
* cursor to resume after, and its consumer is an autocomplete that wants the
|
|
334
344
|
* whole set. Bounded by `PAGINATION.GLOBAL_LIMIT` rather than paginated.
|
|
345
|
+
*
|
|
346
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
347
|
+
* "A report answers a question").
|
|
335
348
|
*/
|
|
336
349
|
export interface LabelsResponse {
|
|
337
350
|
readonly labels: string[];
|
|
@@ -342,8 +355,13 @@ export interface LabelsResponse {
|
|
|
342
355
|
*
|
|
343
356
|
* `custom` is the provider-specific walkthrough when the provider is known;
|
|
344
357
|
* `generic` always answers, so a caller never has nothing to show.
|
|
358
|
+
*
|
|
359
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
360
|
+
* "A report answers a question").
|
|
345
361
|
*/
|
|
346
362
|
export interface SetupInstructionsResponse {
|
|
363
|
+
/** The domain the instructions are for — a report names its subject */
|
|
364
|
+
readonly domain: string;
|
|
347
365
|
/** One-line summary of what to do */
|
|
348
366
|
readonly tldr: string;
|
|
349
367
|
/** Provider-specific instructions, null when the provider is unknown */
|
|
@@ -354,7 +372,14 @@ export interface SetupInstructionsResponse {
|
|
|
354
372
|
readonly provider: string | null;
|
|
355
373
|
}
|
|
356
374
|
/**
|
|
357
|
-
*
|
|
375
|
+
* `POST /domains/validate` — a report answering "is this name usable, and if
|
|
376
|
+
* not, why".
|
|
377
|
+
*
|
|
378
|
+
* An unusable name is a legitimate ANSWER, not a failure, so this is a 200 and
|
|
379
|
+
* the verdict rides the body. `reason` was named `error` until 2026-07-29,
|
|
380
|
+
* which collided with {@link ErrorResponse}'s reserved key — there `error` is
|
|
381
|
+
* an `ErrorType` a client branches on, here it is prose a client displays, and
|
|
382
|
+
* one key cannot mean both. See {@link DeploymentDeleteResponse} for the law.
|
|
358
383
|
*/
|
|
359
384
|
export interface DomainValidateResponse {
|
|
360
385
|
/** Whether the domain is valid */
|
|
@@ -363,8 +388,8 @@ export interface DomainValidateResponse {
|
|
|
363
388
|
normalized: string | null;
|
|
364
389
|
/** Whether the domain is available, null when invalid */
|
|
365
390
|
available: boolean | null;
|
|
366
|
-
/**
|
|
367
|
-
|
|
391
|
+
/** Why the name is unusable, null when valid — displayed verbatim. */
|
|
392
|
+
reason: string | null;
|
|
368
393
|
}
|
|
369
394
|
/**
|
|
370
395
|
* Core deploy token object - used in both API responses and SDK.
|
|
@@ -521,6 +546,9 @@ export interface AccountDeleteResponse {
|
|
|
521
546
|
* (`Account.hint`), and the plaintext exists exactly once, in this response.
|
|
522
547
|
* The raw credential is `secret` on every surface that mints one — the same
|
|
523
548
|
* field `TokenCreateResponse` carries — because one concept gets one name.
|
|
549
|
+
*
|
|
550
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
551
|
+
* "A report answers a question").
|
|
524
552
|
*/
|
|
525
553
|
export interface AccountKeyResponse {
|
|
526
554
|
/** The raw API key (shown once at mint, then never again) */
|
|
@@ -552,7 +580,15 @@ export interface AccountOverrides {
|
|
|
552
580
|
* (`DeploymentStatus`, `DomainStatus`, `AccountPlan`, `AuthMethod`) follow.
|
|
553
581
|
*/
|
|
554
582
|
export declare const ErrorType: {
|
|
555
|
-
/**
|
|
583
|
+
/**
|
|
584
|
+
* Validation failed. Input shape is wrong.
|
|
585
|
+
*
|
|
586
|
+
* Carries 400 when an API judged it — including a client-side pre-check of a
|
|
587
|
+
* rule the server enforces too, which keeps the error identical wherever it
|
|
588
|
+
* was caught. **Statusless** when a client rejects something no API judges,
|
|
589
|
+
* such as a CLI's own command grammar: `status` is documented "(API
|
|
590
|
+
* contexts)" on `ErrorResponse`, so there is none to report.
|
|
591
|
+
*/
|
|
556
592
|
readonly Validation: "validation_failed";
|
|
557
593
|
/** Resource not found (404). */
|
|
558
594
|
readonly NotFound: "not_found";
|
|
@@ -703,6 +739,9 @@ export declare function isShipError(error: unknown): error is ShipError;
|
|
|
703
739
|
*
|
|
704
740
|
* These are the *platform's* posted caps for the current account — server
|
|
705
741
|
* truth delivered at runtime, never hard-coded on the client.
|
|
742
|
+
*
|
|
743
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
744
|
+
* "A report answers a question").
|
|
706
745
|
*/
|
|
707
746
|
export interface PlatformLimits {
|
|
708
747
|
/** Maximum size in bytes for a single file. */
|
|
@@ -773,13 +812,20 @@ export declare const UNBUILT_PROJECT_MARKERS: ReadonlySet<string>;
|
|
|
773
812
|
*/
|
|
774
813
|
export declare function hasUnbuiltMarker(filePath: string): boolean;
|
|
775
814
|
/**
|
|
776
|
-
*
|
|
815
|
+
* `GET /ping` — a report of the server clock.
|
|
816
|
+
*
|
|
817
|
+
* Liveness is the STATUS CODE's answer, not a field's: a 200 means reachable,
|
|
818
|
+
* and any other outcome throws before a body is read. So the body carries the
|
|
819
|
+
* one thing a status code cannot — the server's own clock, which is what lets a
|
|
820
|
+
* client detect skew against a token expiry. It read `{ success: true,
|
|
821
|
+
* timestamp? }` until 2026-07-29, where `success` was a literal constant in the
|
|
822
|
+
* route (zero bits, and the platform's own named anti-pattern) while the field
|
|
823
|
+
* that IS the payload was optional. See {@link DeploymentDeleteResponse} for
|
|
824
|
+
* the law, and `tests/response-shapes.test.ts` for the fence that holds it.
|
|
777
825
|
*/
|
|
778
826
|
export interface PingResponse {
|
|
779
|
-
/** Always true if service is healthy */
|
|
780
|
-
success: boolean;
|
|
781
827
|
/** Server time in unix seconds — the one wire unit for timestamps. */
|
|
782
|
-
timestamp
|
|
828
|
+
readonly timestamp: number;
|
|
783
829
|
}
|
|
784
830
|
/**
|
|
785
831
|
* Where human identity is mounted on the API host. The API mounts Better
|
|
@@ -984,6 +1030,10 @@ export interface SPACheckDebug {
|
|
|
984
1030
|
/** The reason for the detection result */
|
|
985
1031
|
reason: string;
|
|
986
1032
|
}
|
|
1033
|
+
/**
|
|
1034
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
1035
|
+
* "A report answers a question").
|
|
1036
|
+
*/
|
|
987
1037
|
export interface SPACheckResponse {
|
|
988
1038
|
/** Whether the project is detected as a Single Page Application */
|
|
989
1039
|
isSPA: boolean;
|
|
@@ -1142,7 +1192,7 @@ export interface DeploymentResource<UploadOptions extends DeploymentUploadOption
|
|
|
1142
1192
|
list: (options?: ListOptions) => Promise<DeploymentListResponse>;
|
|
1143
1193
|
get: (id: string) => Promise<Deployment>;
|
|
1144
1194
|
set: (id: string, options: DeploymentSetOptions) => Promise<Deployment>;
|
|
1145
|
-
|
|
1195
|
+
delete: (id: string) => Promise<DeploymentDeleteResponse>;
|
|
1146
1196
|
}
|
|
1147
1197
|
/**
|
|
1148
1198
|
* Domain resource interface - the contract all implementations must follow
|
|
@@ -1151,7 +1201,7 @@ export interface DomainResource {
|
|
|
1151
1201
|
set: (name: string, options?: DomainSetOptions) => Promise<DomainSetResult>;
|
|
1152
1202
|
list: (options?: ListOptions) => Promise<DomainListResponse>;
|
|
1153
1203
|
get: (name: string) => Promise<Domain>;
|
|
1154
|
-
|
|
1204
|
+
delete: (name: string) => Promise<DomainDeleteResponse>;
|
|
1155
1205
|
verify: (name: string) => Promise<DomainVerifyResponse>;
|
|
1156
1206
|
validate: (name: string) => Promise<DomainValidateResponse>;
|
|
1157
1207
|
dns: (name: string) => Promise<DomainDnsResponse>;
|
|
@@ -1171,7 +1221,7 @@ export interface TokenResource {
|
|
|
1171
1221
|
create: (options?: TokenCreateOptions) => Promise<TokenCreateResponse>;
|
|
1172
1222
|
list: (options?: ListOptions) => Promise<TokenListResponse>;
|
|
1173
1223
|
get: (token: string) => Promise<Token>;
|
|
1174
|
-
|
|
1224
|
+
delete: (token: string) => Promise<TokenDeleteResponse>;
|
|
1175
1225
|
}
|
|
1176
1226
|
/**
|
|
1177
1227
|
* Billing status response from GET /billing/status
|
|
@@ -1191,6 +1241,25 @@ export interface BillingStatus {
|
|
|
1191
1241
|
/** Link to Creem customer portal for billing management, null if unavailable */
|
|
1192
1242
|
portal: string | null;
|
|
1193
1243
|
}
|
|
1244
|
+
/**
|
|
1245
|
+
* Acknowledgement of `POST /billing/cancel`.
|
|
1246
|
+
*
|
|
1247
|
+
* Cancelling leaves no billing entity to return, so it answers with the
|
|
1248
|
+
* account and the one field of the account the call changed — the plan it
|
|
1249
|
+
* landed on. See {@link DeploymentDeleteResponse} for the law.
|
|
1250
|
+
*
|
|
1251
|
+
* This read `{ success: true, message: 'Subscription canceled successfully…' }`
|
|
1252
|
+
* until 2026-07-29, an anonymous shape that `web/my` redeclared inline and
|
|
1253
|
+
* whose prose no surface ever displayed: both callers await the promise and
|
|
1254
|
+
* discard the body, then compose their own toast. The message was written,
|
|
1255
|
+
* serialized, and thrown away on every cancellation.
|
|
1256
|
+
*/
|
|
1257
|
+
export interface BillingCancelResponse {
|
|
1258
|
+
/** The account whose subscription was cancelled */
|
|
1259
|
+
readonly account: string;
|
|
1260
|
+
/** The plan the account now holds — `free` on a successful cancellation */
|
|
1261
|
+
readonly plan: AccountPlanType;
|
|
1262
|
+
}
|
|
1194
1263
|
/**
|
|
1195
1264
|
* Checkout session response from POST /billing/checkout
|
|
1196
1265
|
*/
|
package/dist/index.js
CHANGED
|
@@ -147,7 +147,15 @@ export const AccountPlan = {
|
|
|
147
147
|
* (`DeploymentStatus`, `DomainStatus`, `AccountPlan`, `AuthMethod`) follow.
|
|
148
148
|
*/
|
|
149
149
|
export const ErrorType = {
|
|
150
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Validation failed. Input shape is wrong.
|
|
152
|
+
*
|
|
153
|
+
* Carries 400 when an API judged it — including a client-side pre-check of a
|
|
154
|
+
* rule the server enforces too, which keeps the error identical wherever it
|
|
155
|
+
* was caught. **Statusless** when a client rejects something no API judges,
|
|
156
|
+
* such as a CLI's own command grammar: `status` is documented "(API
|
|
157
|
+
* contexts)" on `ErrorResponse`, so there is none to report.
|
|
158
|
+
*/
|
|
151
159
|
Validation: 'validation_failed',
|
|
152
160
|
/** Resource not found (404). */
|
|
153
161
|
NotFound: 'not_found',
|
|
@@ -190,12 +198,19 @@ const CLIENT_ONLY_ERROR_TYPES = new Set([
|
|
|
190
198
|
const ERROR_CATEGORIES = {
|
|
191
199
|
/**
|
|
192
200
|
* Client-attributable types. Exhaustive over the 4xx-carrying types, and
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
201
|
+
* over the statusless ones too — those are raised locally and have no
|
|
202
|
+
* status for `isClientError`'s second arm to read, so omitting one makes it
|
|
203
|
+
* read as a server fault. The rule is the membership test: every type in
|
|
204
|
+
* `CLIENT_ONLY_ERROR_TYPES` except `Network` (which `isNetworkError` owns)
|
|
205
|
+
* belongs here.
|
|
206
|
+
*
|
|
207
|
+
* `Cancelled` was missing until 2026-07-29, which is exactly that failure:
|
|
208
|
+
* a caller who aborted their own deploy was told "server error: please try
|
|
209
|
+
* again" — the CLI's fallback for everything this set does not claim.
|
|
196
210
|
*/
|
|
197
211
|
client: new Set([
|
|
198
212
|
ErrorType.Business,
|
|
213
|
+
ErrorType.Cancelled,
|
|
199
214
|
ErrorType.Config,
|
|
200
215
|
ErrorType.File,
|
|
201
216
|
ErrorType.Forbidden,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -304,6 +304,10 @@ export interface DnsLookup {
|
|
|
304
304
|
provider?: DnsProvider;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
+
/**
|
|
308
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
309
|
+
* "A report answers a question").
|
|
310
|
+
*/
|
|
307
311
|
export interface DomainDnsResponse {
|
|
308
312
|
/** The domain name */
|
|
309
313
|
domain: string;
|
|
@@ -317,6 +321,9 @@ export interface DomainDnsResponse {
|
|
|
317
321
|
*
|
|
318
322
|
* `/admin/domains/:domain/share` answers the same shape, which is the admin
|
|
319
323
|
* law working: the operator surface is the public grammar with a prefix.
|
|
324
|
+
*
|
|
325
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
326
|
+
* "A report answers a question").
|
|
320
327
|
*/
|
|
321
328
|
export interface DomainShareResponse {
|
|
322
329
|
/** The domain the setup link is for */
|
|
@@ -327,6 +334,9 @@ export interface DomainShareResponse {
|
|
|
327
334
|
|
|
328
335
|
/**
|
|
329
336
|
* Response for domain DNS records
|
|
337
|
+
*
|
|
338
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
339
|
+
* "A report answers a question").
|
|
330
340
|
*/
|
|
331
341
|
export interface DomainRecordsResponse {
|
|
332
342
|
/** The domain name */
|
|
@@ -380,6 +390,9 @@ export function validateIdempotencyKey(value: unknown): string | undefined {
|
|
|
380
390
|
* no identity, no row and no `created`, so there is nothing for a keyset
|
|
381
391
|
* cursor to resume after, and its consumer is an autocomplete that wants the
|
|
382
392
|
* whole set. Bounded by `PAGINATION.GLOBAL_LIMIT` rather than paginated.
|
|
393
|
+
*
|
|
394
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
395
|
+
* "A report answers a question").
|
|
383
396
|
*/
|
|
384
397
|
export interface LabelsResponse {
|
|
385
398
|
readonly labels: string[];
|
|
@@ -391,8 +404,13 @@ export interface LabelsResponse {
|
|
|
391
404
|
*
|
|
392
405
|
* `custom` is the provider-specific walkthrough when the provider is known;
|
|
393
406
|
* `generic` always answers, so a caller never has nothing to show.
|
|
407
|
+
*
|
|
408
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
409
|
+
* "A report answers a question").
|
|
394
410
|
*/
|
|
395
411
|
export interface SetupInstructionsResponse {
|
|
412
|
+
/** The domain the instructions are for — a report names its subject */
|
|
413
|
+
readonly domain: string;
|
|
396
414
|
/** One-line summary of what to do */
|
|
397
415
|
readonly tldr: string;
|
|
398
416
|
/** Provider-specific instructions, null when the provider is unknown */
|
|
@@ -404,7 +422,14 @@ export interface SetupInstructionsResponse {
|
|
|
404
422
|
}
|
|
405
423
|
|
|
406
424
|
/**
|
|
407
|
-
*
|
|
425
|
+
* `POST /domains/validate` — a report answering "is this name usable, and if
|
|
426
|
+
* not, why".
|
|
427
|
+
*
|
|
428
|
+
* An unusable name is a legitimate ANSWER, not a failure, so this is a 200 and
|
|
429
|
+
* the verdict rides the body. `reason` was named `error` until 2026-07-29,
|
|
430
|
+
* which collided with {@link ErrorResponse}'s reserved key — there `error` is
|
|
431
|
+
* an `ErrorType` a client branches on, here it is prose a client displays, and
|
|
432
|
+
* one key cannot mean both. See {@link DeploymentDeleteResponse} for the law.
|
|
408
433
|
*/
|
|
409
434
|
export interface DomainValidateResponse {
|
|
410
435
|
/** Whether the domain is valid */
|
|
@@ -413,8 +438,8 @@ export interface DomainValidateResponse {
|
|
|
413
438
|
normalized: string | null;
|
|
414
439
|
/** Whether the domain is available, null when invalid */
|
|
415
440
|
available: boolean | null;
|
|
416
|
-
/**
|
|
417
|
-
|
|
441
|
+
/** Why the name is unusable, null when valid — displayed verbatim. */
|
|
442
|
+
reason: string | null;
|
|
418
443
|
}
|
|
419
444
|
|
|
420
445
|
// =============================================================================
|
|
@@ -590,6 +615,9 @@ export interface AccountDeleteResponse {
|
|
|
590
615
|
* (`Account.hint`), and the plaintext exists exactly once, in this response.
|
|
591
616
|
* The raw credential is `secret` on every surface that mints one — the same
|
|
592
617
|
* field `TokenCreateResponse` carries — because one concept gets one name.
|
|
618
|
+
*
|
|
619
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
620
|
+
* "A report answers a question").
|
|
593
621
|
*/
|
|
594
622
|
export interface AccountKeyResponse {
|
|
595
623
|
/** The raw API key (shown once at mint, then never again) */
|
|
@@ -627,7 +655,15 @@ export interface AccountOverrides {
|
|
|
627
655
|
* (`DeploymentStatus`, `DomainStatus`, `AccountPlan`, `AuthMethod`) follow.
|
|
628
656
|
*/
|
|
629
657
|
export const ErrorType = {
|
|
630
|
-
/**
|
|
658
|
+
/**
|
|
659
|
+
* Validation failed. Input shape is wrong.
|
|
660
|
+
*
|
|
661
|
+
* Carries 400 when an API judged it — including a client-side pre-check of a
|
|
662
|
+
* rule the server enforces too, which keeps the error identical wherever it
|
|
663
|
+
* was caught. **Statusless** when a client rejects something no API judges,
|
|
664
|
+
* such as a CLI's own command grammar: `status` is documented "(API
|
|
665
|
+
* contexts)" on `ErrorResponse`, so there is none to report.
|
|
666
|
+
*/
|
|
631
667
|
Validation: 'validation_failed',
|
|
632
668
|
/** Resource not found (404). */
|
|
633
669
|
NotFound: 'not_found',
|
|
@@ -674,12 +710,19 @@ const CLIENT_ONLY_ERROR_TYPES = new Set<string>([
|
|
|
674
710
|
const ERROR_CATEGORIES = {
|
|
675
711
|
/**
|
|
676
712
|
* Client-attributable types. Exhaustive over the 4xx-carrying types, and
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
*
|
|
713
|
+
* over the statusless ones too — those are raised locally and have no
|
|
714
|
+
* status for `isClientError`'s second arm to read, so omitting one makes it
|
|
715
|
+
* read as a server fault. The rule is the membership test: every type in
|
|
716
|
+
* `CLIENT_ONLY_ERROR_TYPES` except `Network` (which `isNetworkError` owns)
|
|
717
|
+
* belongs here.
|
|
718
|
+
*
|
|
719
|
+
* `Cancelled` was missing until 2026-07-29, which is exactly that failure:
|
|
720
|
+
* a caller who aborted their own deploy was told "server error: please try
|
|
721
|
+
* again" — the CLI's fallback for everything this set does not claim.
|
|
680
722
|
*/
|
|
681
723
|
client: new Set<ErrorType>([
|
|
682
724
|
ErrorType.Business,
|
|
725
|
+
ErrorType.Cancelled,
|
|
683
726
|
ErrorType.Config,
|
|
684
727
|
ErrorType.File,
|
|
685
728
|
ErrorType.Forbidden,
|
|
@@ -1013,6 +1056,9 @@ export function isShipError(error: unknown): error is ShipError {
|
|
|
1013
1056
|
*
|
|
1014
1057
|
* These are the *platform's* posted caps for the current account — server
|
|
1015
1058
|
* truth delivered at runtime, never hard-coded on the client.
|
|
1059
|
+
*
|
|
1060
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
1061
|
+
* "A report answers a question").
|
|
1016
1062
|
*/
|
|
1017
1063
|
export interface PlatformLimits {
|
|
1018
1064
|
/** Maximum size in bytes for a single file. */
|
|
@@ -1163,13 +1209,20 @@ export function hasUnbuiltMarker(filePath: string): boolean {
|
|
|
1163
1209
|
// =============================================================================
|
|
1164
1210
|
|
|
1165
1211
|
/**
|
|
1166
|
-
*
|
|
1212
|
+
* `GET /ping` — a report of the server clock.
|
|
1213
|
+
*
|
|
1214
|
+
* Liveness is the STATUS CODE's answer, not a field's: a 200 means reachable,
|
|
1215
|
+
* and any other outcome throws before a body is read. So the body carries the
|
|
1216
|
+
* one thing a status code cannot — the server's own clock, which is what lets a
|
|
1217
|
+
* client detect skew against a token expiry. It read `{ success: true,
|
|
1218
|
+
* timestamp? }` until 2026-07-29, where `success` was a literal constant in the
|
|
1219
|
+
* route (zero bits, and the platform's own named anti-pattern) while the field
|
|
1220
|
+
* that IS the payload was optional. See {@link DeploymentDeleteResponse} for
|
|
1221
|
+
* the law, and `tests/response-shapes.test.ts` for the fence that holds it.
|
|
1167
1222
|
*/
|
|
1168
1223
|
export interface PingResponse {
|
|
1169
|
-
/** Always true if service is healthy */
|
|
1170
|
-
success: boolean;
|
|
1171
1224
|
/** Server time in unix seconds — the one wire unit for timestamps. */
|
|
1172
|
-
timestamp
|
|
1225
|
+
readonly timestamp: number;
|
|
1173
1226
|
}
|
|
1174
1227
|
|
|
1175
1228
|
// =============================================================================
|
|
@@ -1508,6 +1561,10 @@ export interface SPACheckDebug {
|
|
|
1508
1561
|
reason: string;
|
|
1509
1562
|
}
|
|
1510
1563
|
|
|
1564
|
+
/**
|
|
1565
|
+
* A report: it answers a question and carries only the answer (`CLAUDE.md`,
|
|
1566
|
+
* "A report answers a question").
|
|
1567
|
+
*/
|
|
1511
1568
|
export interface SPACheckResponse {
|
|
1512
1569
|
/** Whether the project is detected as a Single Page Application */
|
|
1513
1570
|
isSPA: boolean;
|
|
@@ -1689,7 +1746,7 @@ export interface DeploymentResource<
|
|
|
1689
1746
|
list: (options?: ListOptions) => Promise<DeploymentListResponse>;
|
|
1690
1747
|
get: (id: string) => Promise<Deployment>;
|
|
1691
1748
|
set: (id: string, options: DeploymentSetOptions) => Promise<Deployment>;
|
|
1692
|
-
|
|
1749
|
+
delete: (id: string) => Promise<DeploymentDeleteResponse>;
|
|
1693
1750
|
}
|
|
1694
1751
|
|
|
1695
1752
|
/**
|
|
@@ -1699,7 +1756,7 @@ export interface DomainResource {
|
|
|
1699
1756
|
set: (name: string, options?: DomainSetOptions) => Promise<DomainSetResult>;
|
|
1700
1757
|
list: (options?: ListOptions) => Promise<DomainListResponse>;
|
|
1701
1758
|
get: (name: string) => Promise<Domain>;
|
|
1702
|
-
|
|
1759
|
+
delete: (name: string) => Promise<DomainDeleteResponse>;
|
|
1703
1760
|
verify: (name: string) => Promise<DomainVerifyResponse>;
|
|
1704
1761
|
validate: (name: string) => Promise<DomainValidateResponse>;
|
|
1705
1762
|
dns: (name: string) => Promise<DomainDnsResponse>;
|
|
@@ -1721,7 +1778,7 @@ export interface TokenResource {
|
|
|
1721
1778
|
create: (options?: TokenCreateOptions) => Promise<TokenCreateResponse>;
|
|
1722
1779
|
list: (options?: ListOptions) => Promise<TokenListResponse>;
|
|
1723
1780
|
get: (token: string) => Promise<Token>;
|
|
1724
|
-
|
|
1781
|
+
delete: (token: string) => Promise<TokenDeleteResponse>;
|
|
1725
1782
|
}
|
|
1726
1783
|
|
|
1727
1784
|
// =============================================================================
|
|
@@ -1747,6 +1804,26 @@ export interface BillingStatus {
|
|
|
1747
1804
|
portal: string | null;
|
|
1748
1805
|
}
|
|
1749
1806
|
|
|
1807
|
+
/**
|
|
1808
|
+
* Acknowledgement of `POST /billing/cancel`.
|
|
1809
|
+
*
|
|
1810
|
+
* Cancelling leaves no billing entity to return, so it answers with the
|
|
1811
|
+
* account and the one field of the account the call changed — the plan it
|
|
1812
|
+
* landed on. See {@link DeploymentDeleteResponse} for the law.
|
|
1813
|
+
*
|
|
1814
|
+
* This read `{ success: true, message: 'Subscription canceled successfully…' }`
|
|
1815
|
+
* until 2026-07-29, an anonymous shape that `web/my` redeclared inline and
|
|
1816
|
+
* whose prose no surface ever displayed: both callers await the promise and
|
|
1817
|
+
* discard the body, then compose their own toast. The message was written,
|
|
1818
|
+
* serialized, and thrown away on every cancellation.
|
|
1819
|
+
*/
|
|
1820
|
+
export interface BillingCancelResponse {
|
|
1821
|
+
/** The account whose subscription was cancelled */
|
|
1822
|
+
readonly account: string;
|
|
1823
|
+
/** The plan the account now holds — `free` on a successful cancellation */
|
|
1824
|
+
readonly plan: AccountPlanType;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1750
1827
|
/**
|
|
1751
1828
|
* Checkout session response from POST /billing/checkout
|
|
1752
1829
|
*/
|