@shipstatic/ship 2.0.0-beta.6 → 2.0.0-beta.8
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 +8 -8
- package/dist/browser.d.ts +94 -18
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/cli.cjs +29 -30
- package/dist/cli.cjs.map +1 -1
- package/dist/completions/ship.bash +6 -6
- package/dist/completions/ship.fish +3 -3
- package/dist/completions/ship.zsh +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -18
- package/dist/index.d.ts +94 -18
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -276,6 +276,10 @@ 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
|
interface DomainDnsResponse {
|
|
280
284
|
/** The domain name */
|
|
281
285
|
domain: string;
|
|
@@ -288,6 +292,9 @@ 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
|
interface DomainShareResponse {
|
|
293
300
|
/** The domain the setup link is for */
|
|
@@ -297,6 +304,9 @@ 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
|
interface DomainRecordsResponse {
|
|
302
312
|
/** The domain name */
|
|
@@ -332,6 +342,9 @@ declare function validateIdempotencyKey(value: unknown): string | undefined;
|
|
|
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
|
interface LabelsResponse {
|
|
337
350
|
readonly labels: string[];
|
|
@@ -342,8 +355,13 @@ 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
|
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 @@ 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
|
interface DomainValidateResponse {
|
|
360
385
|
/** Whether the domain is valid */
|
|
@@ -363,8 +388,8 @@ 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 @@ 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
|
interface AccountKeyResponse {
|
|
526
554
|
/** The raw API key (shown once at mint, then never again) */
|
|
@@ -552,7 +580,15 @@ interface AccountOverrides {
|
|
|
552
580
|
* (`DeploymentStatus`, `DomainStatus`, `AccountPlan`, `AuthMethod`) follow.
|
|
553
581
|
*/
|
|
554
582
|
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 @@ 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
|
interface PlatformLimits {
|
|
708
747
|
/** Maximum size in bytes for a single file. */
|
|
@@ -773,13 +812,20 @@ declare const UNBUILT_PROJECT_MARKERS: ReadonlySet<string>;
|
|
|
773
812
|
*/
|
|
774
813
|
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
|
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 @@ 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
|
interface SPACheckResponse {
|
|
988
1038
|
/** Whether the project is detected as a Single Page Application */
|
|
989
1039
|
isSPA: boolean;
|
|
@@ -1142,7 +1192,7 @@ interface DeploymentResource<UploadOptions extends DeploymentUploadOptions = Dep
|
|
|
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 @@ 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 @@ 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 @@ 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
|
+
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
|
*/
|
|
@@ -1715,11 +1784,11 @@ declare class ApiHttp extends SimpleEvents {
|
|
|
1715
1784
|
listDeployments(options?: ListOptions): Promise<DeploymentListResponse>;
|
|
1716
1785
|
getDeployment(id: string): Promise<Deployment>;
|
|
1717
1786
|
updateDeploymentLabels(id: string, labels: string[]): Promise<Deployment>;
|
|
1718
|
-
|
|
1787
|
+
deleteDeployment(id: string): Promise<DeploymentDeleteResponse>;
|
|
1719
1788
|
setDomain(name: string, deployment?: string, labels?: string[]): Promise<DomainSetResult>;
|
|
1720
1789
|
listDomains(options?: ListOptions): Promise<DomainListResponse>;
|
|
1721
1790
|
getDomain(name: string): Promise<Domain>;
|
|
1722
|
-
|
|
1791
|
+
deleteDomain(name: string): Promise<DomainDeleteResponse>;
|
|
1723
1792
|
verifyDomain(name: string): Promise<DomainVerifyResponse>;
|
|
1724
1793
|
getDomainDns(name: string): Promise<DomainDnsResponse>;
|
|
1725
1794
|
getDomainRecords(name: string): Promise<DomainRecordsResponse>;
|
|
@@ -1727,11 +1796,11 @@ declare class ApiHttp extends SimpleEvents {
|
|
|
1727
1796
|
validateDomain(name: string): Promise<DomainValidateResponse>;
|
|
1728
1797
|
createToken(ttl?: number, labels?: string[]): Promise<TokenCreateResponse>;
|
|
1729
1798
|
listTokens(options?: ListOptions): Promise<TokenListResponse>;
|
|
1730
|
-
|
|
1799
|
+
deleteToken(token: string): Promise<TokenDeleteResponse>;
|
|
1731
1800
|
getToken(token: string): Promise<Token>;
|
|
1732
1801
|
getAccount(): Promise<AccountGetResponse>;
|
|
1733
1802
|
getLimits(): Promise<PlatformLimits>;
|
|
1734
|
-
ping(): Promise<
|
|
1803
|
+
ping(): Promise<PingResponse>;
|
|
1735
1804
|
checkSPA(files: StaticFile[], _options?: ApiDeployOptions): Promise<boolean>;
|
|
1736
1805
|
}
|
|
1737
1806
|
|
|
@@ -1801,9 +1870,16 @@ declare abstract class Ship$1 {
|
|
|
1801
1870
|
protected ensureInitialized(): Promise<void>;
|
|
1802
1871
|
private fetchPlatformLimits;
|
|
1803
1872
|
/**
|
|
1804
|
-
* Ping the API server
|
|
1873
|
+
* Ping the API server, resolving its answer: `{ success, timestamp }`, where
|
|
1874
|
+
* `timestamp` is the server clock in unix SECONDS.
|
|
1875
|
+
*
|
|
1876
|
+
* It resolves the response rather than a bare `true` because every other
|
|
1877
|
+
* method here does — narrowing to a boolean discarded the one thing ping
|
|
1878
|
+
* carries beyond liveness, and made `success` mean a boolean on the wire and
|
|
1879
|
+
* something else by the time it reached a caller. A non-OK response throws in
|
|
1880
|
+
* transport, so a resolved value always means the API answered.
|
|
1805
1881
|
*/
|
|
1806
|
-
ping(): Promise<
|
|
1882
|
+
ping(): Promise<PingResponse>;
|
|
1807
1883
|
/**
|
|
1808
1884
|
* Deploy project (convenience shortcut to `ship.deployments.upload()`).
|
|
1809
1885
|
*/
|
|
@@ -2164,6 +2240,6 @@ declare class Ship extends Ship$1 {
|
|
|
2164
2240
|
}
|
|
2165
2241
|
|
|
2166
2242
|
declare namespace Ship {
|
|
2167
|
-
export { API_KEY, API_PATHS, AUTH_BASE_PATH, Account, AccountDeleteResponse, AccountGetResponse, AccountKeyResponse, AccountOverrides, AccountPlan, AccountPlanType, AccountResource, AccountUsage, Activity, ActivityEvent, ActivityListResponse, ActivityMeta, ApiDeployOptions, ApiHttp, ApiHttpOptions, AuthMethod, AuthMethodType, BLOCKED_EXTENSIONS, BillingStatus, CALLER, CheckoutSession, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_TOKEN, DeployBody, DeployBodyContext, DeployBodyCreator, DeployFile, DeployInput, Deployment, DeploymentCreateResponse, DeploymentDeleteResponse, DeploymentListResponse, DeploymentOptions, DeploymentResource, DeploymentResourceContext, DeploymentSetOptions, DeploymentStatus, DeploymentStatusType, DeploymentUploadOptions, DnsLookup, DnsProvider, DnsRecord, DnsRecordType, Domain, DomainDeleteResponse, DomainDnsResponse, DomainListResponse, DomainRecordsResponse, DomainResource, DomainSetOptions, DomainSetResult, DomainShareResponse, DomainStatus, DomainStatusType, DomainValidateResponse, DomainVerifyResponse, ErrorResponse, ErrorType, ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, Fetch, FileValidationResult, FileValidationStatus, FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, LabelsResponse, ListOptions, ListResponse, MD5Result, OAuthScope, OAuthScopeType, PASSWORD_CONSTRAINTS, PingResponse, PlatformLimits, ResourceContext, SPACheckDebug, SPACheckRequest, SPACheckResponse, SPA_DEFAULT_CONFIG, SetupInstructionsResponse, ShipClientOptions, ShipError, ShipEvents, StaticFile, Token, TokenCreateOptions, TokenCreateResponse, TokenDeleteResponse, TokenKind, TokenKindType, TokenListResponse, TokenProvider, TokenResource, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, UploadedFile, UserVisibleActivityEvent, ValidatableFile, ValidationIssue, __setTestEnvironment, allValidFilesReady, assertShipJsonSyntax, calculateMD5, classifyToken, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, deserializeLabels, extractSubdomain, filterJunk, formatFileSize, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isCustomDomain, isDeployment, isPlatformDomain, isShipError, optimizeDeployPaths, pluralize, processFilesForNode, serializeLabels, validateApiKey, validateApiUrl, validateCaller, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validatePassword, validateToken };
|
|
2243
|
+
export { API_KEY, API_PATHS, AUTH_BASE_PATH, Account, AccountDeleteResponse, AccountGetResponse, AccountKeyResponse, AccountOverrides, AccountPlan, AccountPlanType, AccountResource, AccountUsage, Activity, ActivityEvent, ActivityListResponse, ActivityMeta, ApiDeployOptions, ApiHttp, ApiHttpOptions, AuthMethod, AuthMethodType, BLOCKED_EXTENSIONS, BillingCancelResponse, BillingStatus, CALLER, CheckoutSession, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_TOKEN, DeployBody, DeployBodyContext, DeployBodyCreator, DeployFile, DeployInput, Deployment, DeploymentCreateResponse, DeploymentDeleteResponse, DeploymentListResponse, DeploymentOptions, DeploymentResource, DeploymentResourceContext, DeploymentSetOptions, DeploymentStatus, DeploymentStatusType, DeploymentUploadOptions, DnsLookup, DnsProvider, DnsRecord, DnsRecordType, Domain, DomainDeleteResponse, DomainDnsResponse, DomainListResponse, DomainRecordsResponse, DomainResource, DomainSetOptions, DomainSetResult, DomainShareResponse, DomainStatus, DomainStatusType, DomainValidateResponse, DomainVerifyResponse, ErrorResponse, ErrorType, ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, Fetch, FileValidationResult, FileValidationStatus, FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, LabelsResponse, ListOptions, ListResponse, MD5Result, OAuthScope, OAuthScopeType, PASSWORD_CONSTRAINTS, PingResponse, PlatformLimits, ResourceContext, SPACheckDebug, SPACheckRequest, SPACheckResponse, SPA_DEFAULT_CONFIG, SetupInstructionsResponse, ShipClientOptions, ShipError, ShipEvents, StaticFile, Token, TokenCreateOptions, TokenCreateResponse, TokenDeleteResponse, TokenKind, TokenKindType, TokenListResponse, TokenProvider, TokenResource, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, UploadedFile, UserVisibleActivityEvent, ValidatableFile, ValidationIssue, __setTestEnvironment, allValidFilesReady, assertShipJsonSyntax, calculateMD5, classifyToken, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, deserializeLabels, extractSubdomain, filterJunk, formatFileSize, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isCustomDomain, isDeployment, isPlatformDomain, isShipError, optimizeDeployPaths, pluralize, processFilesForNode, serializeLabels, validateApiKey, validateApiUrl, validateCaller, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validatePassword, validateToken };
|
|
2168
2244
|
}
|
|
2169
2245
|
export = Ship;
|
package/dist/index.d.ts
CHANGED
|
@@ -276,6 +276,10 @@ 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
|
interface DomainDnsResponse {
|
|
280
284
|
/** The domain name */
|
|
281
285
|
domain: string;
|
|
@@ -288,6 +292,9 @@ 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
|
interface DomainShareResponse {
|
|
293
300
|
/** The domain the setup link is for */
|
|
@@ -297,6 +304,9 @@ 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
|
interface DomainRecordsResponse {
|
|
302
312
|
/** The domain name */
|
|
@@ -332,6 +342,9 @@ declare function validateIdempotencyKey(value: unknown): string | undefined;
|
|
|
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
|
interface LabelsResponse {
|
|
337
350
|
readonly labels: string[];
|
|
@@ -342,8 +355,13 @@ 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
|
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 @@ 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
|
interface DomainValidateResponse {
|
|
360
385
|
/** Whether the domain is valid */
|
|
@@ -363,8 +388,8 @@ 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 @@ 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
|
interface AccountKeyResponse {
|
|
526
554
|
/** The raw API key (shown once at mint, then never again) */
|
|
@@ -552,7 +580,15 @@ interface AccountOverrides {
|
|
|
552
580
|
* (`DeploymentStatus`, `DomainStatus`, `AccountPlan`, `AuthMethod`) follow.
|
|
553
581
|
*/
|
|
554
582
|
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 @@ 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
|
interface PlatformLimits {
|
|
708
747
|
/** Maximum size in bytes for a single file. */
|
|
@@ -773,13 +812,20 @@ declare const UNBUILT_PROJECT_MARKERS: ReadonlySet<string>;
|
|
|
773
812
|
*/
|
|
774
813
|
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
|
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 @@ 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
|
interface SPACheckResponse {
|
|
988
1038
|
/** Whether the project is detected as a Single Page Application */
|
|
989
1039
|
isSPA: boolean;
|
|
@@ -1142,7 +1192,7 @@ interface DeploymentResource<UploadOptions extends DeploymentUploadOptions = Dep
|
|
|
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 @@ 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 @@ 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 @@ 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
|
+
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
|
*/
|
|
@@ -1715,11 +1784,11 @@ declare class ApiHttp extends SimpleEvents {
|
|
|
1715
1784
|
listDeployments(options?: ListOptions): Promise<DeploymentListResponse>;
|
|
1716
1785
|
getDeployment(id: string): Promise<Deployment>;
|
|
1717
1786
|
updateDeploymentLabels(id: string, labels: string[]): Promise<Deployment>;
|
|
1718
|
-
|
|
1787
|
+
deleteDeployment(id: string): Promise<DeploymentDeleteResponse>;
|
|
1719
1788
|
setDomain(name: string, deployment?: string, labels?: string[]): Promise<DomainSetResult>;
|
|
1720
1789
|
listDomains(options?: ListOptions): Promise<DomainListResponse>;
|
|
1721
1790
|
getDomain(name: string): Promise<Domain>;
|
|
1722
|
-
|
|
1791
|
+
deleteDomain(name: string): Promise<DomainDeleteResponse>;
|
|
1723
1792
|
verifyDomain(name: string): Promise<DomainVerifyResponse>;
|
|
1724
1793
|
getDomainDns(name: string): Promise<DomainDnsResponse>;
|
|
1725
1794
|
getDomainRecords(name: string): Promise<DomainRecordsResponse>;
|
|
@@ -1727,11 +1796,11 @@ declare class ApiHttp extends SimpleEvents {
|
|
|
1727
1796
|
validateDomain(name: string): Promise<DomainValidateResponse>;
|
|
1728
1797
|
createToken(ttl?: number, labels?: string[]): Promise<TokenCreateResponse>;
|
|
1729
1798
|
listTokens(options?: ListOptions): Promise<TokenListResponse>;
|
|
1730
|
-
|
|
1799
|
+
deleteToken(token: string): Promise<TokenDeleteResponse>;
|
|
1731
1800
|
getToken(token: string): Promise<Token>;
|
|
1732
1801
|
getAccount(): Promise<AccountGetResponse>;
|
|
1733
1802
|
getLimits(): Promise<PlatformLimits>;
|
|
1734
|
-
ping(): Promise<
|
|
1803
|
+
ping(): Promise<PingResponse>;
|
|
1735
1804
|
checkSPA(files: StaticFile[], _options?: ApiDeployOptions): Promise<boolean>;
|
|
1736
1805
|
}
|
|
1737
1806
|
|
|
@@ -1801,9 +1870,16 @@ declare abstract class Ship$1 {
|
|
|
1801
1870
|
protected ensureInitialized(): Promise<void>;
|
|
1802
1871
|
private fetchPlatformLimits;
|
|
1803
1872
|
/**
|
|
1804
|
-
* Ping the API server
|
|
1873
|
+
* Ping the API server, resolving its answer: `{ success, timestamp }`, where
|
|
1874
|
+
* `timestamp` is the server clock in unix SECONDS.
|
|
1875
|
+
*
|
|
1876
|
+
* It resolves the response rather than a bare `true` because every other
|
|
1877
|
+
* method here does — narrowing to a boolean discarded the one thing ping
|
|
1878
|
+
* carries beyond liveness, and made `success` mean a boolean on the wire and
|
|
1879
|
+
* something else by the time it reached a caller. A non-OK response throws in
|
|
1880
|
+
* transport, so a resolved value always means the API answered.
|
|
1805
1881
|
*/
|
|
1806
|
-
ping(): Promise<
|
|
1882
|
+
ping(): Promise<PingResponse>;
|
|
1807
1883
|
/**
|
|
1808
1884
|
* Deploy project (convenience shortcut to `ship.deployments.upload()`).
|
|
1809
1885
|
*/
|
|
@@ -2163,4 +2239,4 @@ declare class Ship extends Ship$1 {
|
|
|
2163
2239
|
protected getDeployBodyCreator(): DeployBodyCreator;
|
|
2164
2240
|
}
|
|
2165
2241
|
|
|
2166
|
-
export { API_KEY, API_PATHS, AUTH_BASE_PATH, type Account, type AccountDeleteResponse, type AccountGetResponse, type AccountKeyResponse, type AccountOverrides, AccountPlan, type AccountPlanType, type AccountResource, type AccountUsage, type Activity, type ActivityEvent, type ActivityListResponse, type ActivityMeta, type ApiDeployOptions, ApiHttp, type ApiHttpOptions, AuthMethod, type AuthMethodType, BLOCKED_EXTENSIONS, type BillingStatus, CALLER, type CheckoutSession, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_TOKEN, type DeployBody, type DeployBodyContext, type DeployBodyCreator, type DeployFile, type DeployInput, type Deployment, type DeploymentCreateResponse, type DeploymentDeleteResponse, type DeploymentListResponse, type DeploymentOptions, type DeploymentResource, type DeploymentResourceContext, type DeploymentSetOptions, DeploymentStatus, type DeploymentStatusType, type DeploymentUploadOptions, type DnsLookup, type DnsProvider, type DnsRecord, type DnsRecordType, type Domain, type DomainDeleteResponse, type DomainDnsResponse, type DomainListResponse, type DomainRecordsResponse, type DomainResource, type DomainSetOptions, type DomainSetResult, type DomainShareResponse, DomainStatus, type DomainStatusType, type DomainValidateResponse, type DomainVerifyResponse, type ErrorResponse, ErrorType, type ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, type Fetch, type FileValidationResult, FileValidationStatus, type FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, type LabelsResponse, type ListOptions, type ListResponse, type MD5Result, OAuthScope, type OAuthScopeType, PASSWORD_CONSTRAINTS, type PingResponse, type PlatformLimits, type ResourceContext, type SPACheckDebug, type SPACheckRequest, type SPACheckResponse, SPA_DEFAULT_CONFIG, type SetupInstructionsResponse, Ship, type ShipClientOptions, ShipError, type ShipEvents, type StaticFile, type Token, type TokenCreateOptions, type TokenCreateResponse, type TokenDeleteResponse, TokenKind, type TokenKindType, type TokenListResponse, type TokenProvider, type TokenResource, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, type UploadedFile, type UserVisibleActivityEvent, type ValidatableFile, type ValidationIssue, __setTestEnvironment, allValidFilesReady, assertShipJsonSyntax, calculateMD5, classifyToken, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, deserializeLabels, extractSubdomain, filterJunk, formatFileSize, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isCustomDomain, isDeployment, isPlatformDomain, isShipError, optimizeDeployPaths, pluralize, processFilesForNode, serializeLabels, validateApiKey, validateApiUrl, validateCaller, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validatePassword, validateToken };
|
|
2242
|
+
export { API_KEY, API_PATHS, AUTH_BASE_PATH, type Account, type AccountDeleteResponse, type AccountGetResponse, type AccountKeyResponse, type AccountOverrides, AccountPlan, type AccountPlanType, type AccountResource, type AccountUsage, type Activity, type ActivityEvent, type ActivityListResponse, type ActivityMeta, type ApiDeployOptions, ApiHttp, type ApiHttpOptions, AuthMethod, type AuthMethodType, BLOCKED_EXTENSIONS, type BillingCancelResponse, type BillingStatus, CALLER, type CheckoutSession, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_TOKEN, type DeployBody, type DeployBodyContext, type DeployBodyCreator, type DeployFile, type DeployInput, type Deployment, type DeploymentCreateResponse, type DeploymentDeleteResponse, type DeploymentListResponse, type DeploymentOptions, type DeploymentResource, type DeploymentResourceContext, type DeploymentSetOptions, DeploymentStatus, type DeploymentStatusType, type DeploymentUploadOptions, type DnsLookup, type DnsProvider, type DnsRecord, type DnsRecordType, type Domain, type DomainDeleteResponse, type DomainDnsResponse, type DomainListResponse, type DomainRecordsResponse, type DomainResource, type DomainSetOptions, type DomainSetResult, type DomainShareResponse, DomainStatus, type DomainStatusType, type DomainValidateResponse, type DomainVerifyResponse, type ErrorResponse, ErrorType, type ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, type Fetch, type FileValidationResult, FileValidationStatus, type FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, type LabelsResponse, type ListOptions, type ListResponse, type MD5Result, OAuthScope, type OAuthScopeType, PASSWORD_CONSTRAINTS, type PingResponse, type PlatformLimits, type ResourceContext, type SPACheckDebug, type SPACheckRequest, type SPACheckResponse, SPA_DEFAULT_CONFIG, type SetupInstructionsResponse, Ship, type ShipClientOptions, ShipError, type ShipEvents, type StaticFile, type Token, type TokenCreateOptions, type TokenCreateResponse, type TokenDeleteResponse, TokenKind, type TokenKindType, type TokenListResponse, type TokenProvider, type TokenResource, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, type UploadedFile, type UserVisibleActivityEvent, type ValidatableFile, type ValidationIssue, __setTestEnvironment, allValidFilesReady, assertShipJsonSyntax, calculateMD5, classifyToken, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, deserializeLabels, extractSubdomain, filterJunk, formatFileSize, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isCustomDomain, isDeployment, isPlatformDomain, isShipError, optimizeDeployPaths, pluralize, processFilesForNode, serializeLabels, validateApiKey, validateApiUrl, validateCaller, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validatePassword, validateToken };
|