@shipstatic/types 2.5.0-beta.7 → 2.5.0-beta.9
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 +70 -28
- package/package.json +1 -1
- package/src/index.ts +71 -28
package/dist/index.d.ts
CHANGED
|
@@ -49,14 +49,33 @@ export interface DeploymentCreateResponse extends Deployment {
|
|
|
49
49
|
/** Claim URL for public deployments. Present when deployed without credentials. */
|
|
50
50
|
readonly claim?: string;
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* The half of a list response that is identical on every list.
|
|
54
|
+
*
|
|
55
|
+
* `GET /<collection>` answers exactly two fields — the collection under its
|
|
56
|
+
* own plural noun, and this cursor — so the cursor is declared once here and
|
|
57
|
+
* each response below adds only its noun. `cursor: null` means last page and
|
|
58
|
+
* is the ENTIRE has-more signal, which is why there is no `has_more`.
|
|
59
|
+
*
|
|
60
|
+
* There is deliberately no `total`. A count is an aggregate over a
|
|
61
|
+
* collection, not a property of a page; producing one would cost a COUNT
|
|
62
|
+
* beside every page read, which is precisely what keyset pagination exists
|
|
63
|
+
* to avoid. Counts live on the resource that summarises the collection —
|
|
64
|
+
* `GET /account`'s `usage` for one caller, `GET /admin/stats` platform-wide.
|
|
65
|
+
*
|
|
66
|
+
* The operator lists (`/admin/*`) answer this same shape behind the prefix;
|
|
67
|
+
* their types live in `web/my`, not here — see `CLAUDE.md`, "Admin types".
|
|
68
|
+
*/
|
|
69
|
+
export interface ListResponse {
|
|
70
|
+
/** Opaque cursor from this page; `null` on the last page. */
|
|
71
|
+
cursor: string | null;
|
|
72
|
+
}
|
|
52
73
|
/**
|
|
53
74
|
* Response for listing deployments
|
|
54
75
|
*/
|
|
55
|
-
export interface DeploymentListResponse {
|
|
76
|
+
export interface DeploymentListResponse extends ListResponse {
|
|
56
77
|
/** Array of deployments */
|
|
57
78
|
deployments: Deployment[];
|
|
58
|
-
/** Cursor for pagination, null if no more pages */
|
|
59
|
-
cursor: string | null;
|
|
60
79
|
}
|
|
61
80
|
/**
|
|
62
81
|
* Domain status constants
|
|
@@ -89,7 +108,7 @@ export interface Domain {
|
|
|
89
108
|
labels: string[];
|
|
90
109
|
/** Unix timestamp (seconds) when domain was created */
|
|
91
110
|
readonly created: number;
|
|
92
|
-
/**
|
|
111
|
+
/** Unix timestamp (seconds) when deployment was last linked, null if never linked */
|
|
93
112
|
linked: number | null;
|
|
94
113
|
/** Total deployment links */
|
|
95
114
|
links: number;
|
|
@@ -111,11 +130,9 @@ export interface DomainSetResult extends Domain {
|
|
|
111
130
|
/**
|
|
112
131
|
* Response for listing domains
|
|
113
132
|
*/
|
|
114
|
-
export interface DomainListResponse {
|
|
133
|
+
export interface DomainListResponse extends ListResponse {
|
|
115
134
|
/** Array of domains */
|
|
116
135
|
domains: Domain[];
|
|
117
|
-
/** Cursor for pagination, null if no more pages */
|
|
118
|
-
cursor: string | null;
|
|
119
136
|
}
|
|
120
137
|
/**
|
|
121
138
|
* DNS record types supported for domain configuration
|
|
@@ -175,11 +192,19 @@ export interface DomainValidateResponse {
|
|
|
175
192
|
error: string | null;
|
|
176
193
|
}
|
|
177
194
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
195
|
+
* Core deploy token object - used in both API responses and SDK.
|
|
196
|
+
*
|
|
197
|
+
* A single noun, like every other entity here: the platform's unit types are
|
|
198
|
+
* `Deployment`, `Domain`, `Account`, `Activity` and this. It was once called
|
|
199
|
+
* `TokenListItem`, named for the surface that returned it rather than for
|
|
200
|
+
* what it is, which is exactly why {@link TokenCreateResponse} used to
|
|
201
|
+
* restate its fields instead of extending it.
|
|
202
|
+
*
|
|
203
|
+
* The token itself is never here. The secret is shown once at creation
|
|
204
|
+
* ({@link TokenCreateResponse.secret}) and never again, so an entity read
|
|
205
|
+
* carries only the management identifier and lifecycle metadata.
|
|
181
206
|
*/
|
|
182
|
-
export interface
|
|
207
|
+
export interface Token {
|
|
183
208
|
/** 7-char management identifier (e.g., "a1b2c3d") */
|
|
184
209
|
readonly token: string;
|
|
185
210
|
/** Labels for categorization and filtering. Always present, empty array when none. */
|
|
@@ -194,24 +219,19 @@ export interface TokenListItem {
|
|
|
194
219
|
/**
|
|
195
220
|
* Response for listing tokens
|
|
196
221
|
*/
|
|
197
|
-
export interface TokenListResponse {
|
|
198
|
-
/** Array of tokens (
|
|
199
|
-
tokens:
|
|
200
|
-
/** Cursor for pagination, null if no more pages */
|
|
201
|
-
cursor: string | null;
|
|
222
|
+
export interface TokenListResponse extends ListResponse {
|
|
223
|
+
/** Array of tokens (the secret is never among them) */
|
|
224
|
+
tokens: Token[];
|
|
202
225
|
}
|
|
203
226
|
/**
|
|
204
|
-
* Response
|
|
227
|
+
* Response from token creation. Extends Token with the one field that
|
|
228
|
+
* exists only on creation — the same shape as
|
|
229
|
+
* {@link DeploymentCreateResponse}, because a 201 returns the resource it
|
|
230
|
+
* created plus whatever is knowable only once.
|
|
205
231
|
*/
|
|
206
|
-
export interface TokenCreateResponse {
|
|
207
|
-
/** 7-char management identifier */
|
|
208
|
-
token: string;
|
|
232
|
+
export interface TokenCreateResponse extends Token {
|
|
209
233
|
/** The raw credential value (shown once at creation, then never again) */
|
|
210
|
-
secret: string;
|
|
211
|
-
/** Labels for categorization and filtering. Always present, empty array when none. */
|
|
212
|
-
labels: string[];
|
|
213
|
-
/** Unix timestamp (seconds) when token expires, null for never */
|
|
214
|
-
expires: number | null;
|
|
234
|
+
readonly secret: string;
|
|
215
235
|
}
|
|
216
236
|
/**
|
|
217
237
|
* Account plan constants
|
|
@@ -228,10 +248,34 @@ export declare const AccountPlan: {
|
|
|
228
248
|
export type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
229
249
|
/**
|
|
230
250
|
* Account usage metrics — always available regardless of billing provider.
|
|
251
|
+
*
|
|
252
|
+
* This is where a caller's own totals live. Lists answer pages and carry no
|
|
253
|
+
* `total` (see {@link ListOptions}); a count is an aggregate over a
|
|
254
|
+
* collection, so it belongs to the summary resource that owns the
|
|
255
|
+
* collection. `GET /account` is that resource for one caller, `GET
|
|
256
|
+
* /admin/stats` for the platform.
|
|
257
|
+
*
|
|
258
|
+
* The counted dimensions are the ones the plan caps — deployments and
|
|
259
|
+
* domains (`PlatformLimits`) — plus the billable custom-domain subset, so a
|
|
260
|
+
* surface can render "3 of 10" without a second request.
|
|
231
261
|
*/
|
|
232
262
|
export interface AccountUsage {
|
|
233
263
|
/** Number of active custom domains (excludes paused) */
|
|
234
264
|
customDomains: number;
|
|
265
|
+
/**
|
|
266
|
+
* Deployments counted against the plan's deployment cap — every row
|
|
267
|
+
* whatever its status, because that is what the cap counts, so a surface
|
|
268
|
+
* renders "3 of 10" against the denominator the 403 divides by. (`GET
|
|
269
|
+
* /deployments` lists successful ones only; that is a different question
|
|
270
|
+
* asked of a different resource.) Optional by the additive-evolution law:
|
|
271
|
+
* an API predating this field omits it.
|
|
272
|
+
*/
|
|
273
|
+
deployments?: number;
|
|
274
|
+
/**
|
|
275
|
+
* Domains counted against the plan's domain cap — every domain, platform
|
|
276
|
+
* and custom alike, unlike `customDomains`. Optional for the same reason.
|
|
277
|
+
*/
|
|
278
|
+
domains?: number;
|
|
235
279
|
}
|
|
236
280
|
/**
|
|
237
281
|
* Core account object - used in both API responses and SDK
|
|
@@ -977,11 +1021,9 @@ export interface ActivityMeta {
|
|
|
977
1021
|
/**
|
|
978
1022
|
* Response from GET /activities endpoint
|
|
979
1023
|
*/
|
|
980
|
-
export interface ActivityListResponse {
|
|
1024
|
+
export interface ActivityListResponse extends ListResponse {
|
|
981
1025
|
/** Array of activities */
|
|
982
1026
|
activities: Activity[];
|
|
983
|
-
/** Cursor for pagination, null if no more pages */
|
|
984
|
-
cursor: string | null;
|
|
985
1027
|
}
|
|
986
1028
|
/**
|
|
987
1029
|
* File status constants for validation state tracking
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -58,14 +58,34 @@ export interface DeploymentCreateResponse extends Deployment {
|
|
|
58
58
|
readonly claim?: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* The half of a list response that is identical on every list.
|
|
63
|
+
*
|
|
64
|
+
* `GET /<collection>` answers exactly two fields — the collection under its
|
|
65
|
+
* own plural noun, and this cursor — so the cursor is declared once here and
|
|
66
|
+
* each response below adds only its noun. `cursor: null` means last page and
|
|
67
|
+
* is the ENTIRE has-more signal, which is why there is no `has_more`.
|
|
68
|
+
*
|
|
69
|
+
* There is deliberately no `total`. A count is an aggregate over a
|
|
70
|
+
* collection, not a property of a page; producing one would cost a COUNT
|
|
71
|
+
* beside every page read, which is precisely what keyset pagination exists
|
|
72
|
+
* to avoid. Counts live on the resource that summarises the collection —
|
|
73
|
+
* `GET /account`'s `usage` for one caller, `GET /admin/stats` platform-wide.
|
|
74
|
+
*
|
|
75
|
+
* The operator lists (`/admin/*`) answer this same shape behind the prefix;
|
|
76
|
+
* their types live in `web/my`, not here — see `CLAUDE.md`, "Admin types".
|
|
77
|
+
*/
|
|
78
|
+
export interface ListResponse {
|
|
79
|
+
/** Opaque cursor from this page; `null` on the last page. */
|
|
80
|
+
cursor: string | null;
|
|
81
|
+
}
|
|
82
|
+
|
|
61
83
|
/**
|
|
62
84
|
* Response for listing deployments
|
|
63
85
|
*/
|
|
64
|
-
export interface DeploymentListResponse {
|
|
86
|
+
export interface DeploymentListResponse extends ListResponse {
|
|
65
87
|
/** Array of deployments */
|
|
66
88
|
deployments: Deployment[];
|
|
67
|
-
/** Cursor for pagination, null if no more pages */
|
|
68
|
-
cursor: string | null;
|
|
69
89
|
}
|
|
70
90
|
|
|
71
91
|
// =============================================================================
|
|
@@ -105,7 +125,7 @@ export interface Domain {
|
|
|
105
125
|
labels: string[];
|
|
106
126
|
/** Unix timestamp (seconds) when domain was created */
|
|
107
127
|
readonly created: number;
|
|
108
|
-
/**
|
|
128
|
+
/** Unix timestamp (seconds) when deployment was last linked, null if never linked */
|
|
109
129
|
linked: number | null;
|
|
110
130
|
/** Total deployment links */
|
|
111
131
|
links: number;
|
|
@@ -129,11 +149,9 @@ export interface DomainSetResult extends Domain {
|
|
|
129
149
|
/**
|
|
130
150
|
* Response for listing domains
|
|
131
151
|
*/
|
|
132
|
-
export interface DomainListResponse {
|
|
152
|
+
export interface DomainListResponse extends ListResponse {
|
|
133
153
|
/** Array of domains */
|
|
134
154
|
domains: Domain[];
|
|
135
|
-
/** Cursor for pagination, null if no more pages */
|
|
136
|
-
cursor: string | null;
|
|
137
155
|
}
|
|
138
156
|
|
|
139
157
|
/**
|
|
@@ -202,11 +220,19 @@ export interface DomainValidateResponse {
|
|
|
202
220
|
// =============================================================================
|
|
203
221
|
|
|
204
222
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
223
|
+
* Core deploy token object - used in both API responses and SDK.
|
|
224
|
+
*
|
|
225
|
+
* A single noun, like every other entity here: the platform's unit types are
|
|
226
|
+
* `Deployment`, `Domain`, `Account`, `Activity` and this. It was once called
|
|
227
|
+
* `TokenListItem`, named for the surface that returned it rather than for
|
|
228
|
+
* what it is, which is exactly why {@link TokenCreateResponse} used to
|
|
229
|
+
* restate its fields instead of extending it.
|
|
230
|
+
*
|
|
231
|
+
* The token itself is never here. The secret is shown once at creation
|
|
232
|
+
* ({@link TokenCreateResponse.secret}) and never again, so an entity read
|
|
233
|
+
* carries only the management identifier and lifecycle metadata.
|
|
208
234
|
*/
|
|
209
|
-
export interface
|
|
235
|
+
export interface Token {
|
|
210
236
|
/** 7-char management identifier (e.g., "a1b2c3d") */
|
|
211
237
|
readonly token: string;
|
|
212
238
|
/** Labels for categorization and filtering. Always present, empty array when none. */
|
|
@@ -222,25 +248,20 @@ export interface TokenListItem {
|
|
|
222
248
|
/**
|
|
223
249
|
* Response for listing tokens
|
|
224
250
|
*/
|
|
225
|
-
export interface TokenListResponse {
|
|
226
|
-
/** Array of tokens (
|
|
227
|
-
tokens:
|
|
228
|
-
/** Cursor for pagination, null if no more pages */
|
|
229
|
-
cursor: string | null;
|
|
251
|
+
export interface TokenListResponse extends ListResponse {
|
|
252
|
+
/** Array of tokens (the secret is never among them) */
|
|
253
|
+
tokens: Token[];
|
|
230
254
|
}
|
|
231
255
|
|
|
232
256
|
/**
|
|
233
|
-
* Response
|
|
257
|
+
* Response from token creation. Extends Token with the one field that
|
|
258
|
+
* exists only on creation — the same shape as
|
|
259
|
+
* {@link DeploymentCreateResponse}, because a 201 returns the resource it
|
|
260
|
+
* created plus whatever is knowable only once.
|
|
234
261
|
*/
|
|
235
|
-
export interface TokenCreateResponse {
|
|
236
|
-
/** 7-char management identifier */
|
|
237
|
-
token: string;
|
|
262
|
+
export interface TokenCreateResponse extends Token {
|
|
238
263
|
/** The raw credential value (shown once at creation, then never again) */
|
|
239
|
-
secret: string;
|
|
240
|
-
/** Labels for categorization and filtering. Always present, empty array when none. */
|
|
241
|
-
labels: string[];
|
|
242
|
-
/** Unix timestamp (seconds) when token expires, null for never */
|
|
243
|
-
expires: number | null;
|
|
264
|
+
readonly secret: string;
|
|
244
265
|
}
|
|
245
266
|
|
|
246
267
|
// =============================================================================
|
|
@@ -264,10 +285,34 @@ export type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
|
264
285
|
|
|
265
286
|
/**
|
|
266
287
|
* Account usage metrics — always available regardless of billing provider.
|
|
288
|
+
*
|
|
289
|
+
* This is where a caller's own totals live. Lists answer pages and carry no
|
|
290
|
+
* `total` (see {@link ListOptions}); a count is an aggregate over a
|
|
291
|
+
* collection, so it belongs to the summary resource that owns the
|
|
292
|
+
* collection. `GET /account` is that resource for one caller, `GET
|
|
293
|
+
* /admin/stats` for the platform.
|
|
294
|
+
*
|
|
295
|
+
* The counted dimensions are the ones the plan caps — deployments and
|
|
296
|
+
* domains (`PlatformLimits`) — plus the billable custom-domain subset, so a
|
|
297
|
+
* surface can render "3 of 10" without a second request.
|
|
267
298
|
*/
|
|
268
299
|
export interface AccountUsage {
|
|
269
300
|
/** Number of active custom domains (excludes paused) */
|
|
270
301
|
customDomains: number;
|
|
302
|
+
/**
|
|
303
|
+
* Deployments counted against the plan's deployment cap — every row
|
|
304
|
+
* whatever its status, because that is what the cap counts, so a surface
|
|
305
|
+
* renders "3 of 10" against the denominator the 403 divides by. (`GET
|
|
306
|
+
* /deployments` lists successful ones only; that is a different question
|
|
307
|
+
* asked of a different resource.) Optional by the additive-evolution law:
|
|
308
|
+
* an API predating this field omits it.
|
|
309
|
+
*/
|
|
310
|
+
deployments?: number;
|
|
311
|
+
/**
|
|
312
|
+
* Domains counted against the plan's domain cap — every domain, platform
|
|
313
|
+
* and custom alike, unlike `customDomains`. Optional for the same reason.
|
|
314
|
+
*/
|
|
315
|
+
domains?: number;
|
|
271
316
|
}
|
|
272
317
|
|
|
273
318
|
/**
|
|
@@ -1553,11 +1598,9 @@ export interface ActivityMeta {
|
|
|
1553
1598
|
/**
|
|
1554
1599
|
* Response from GET /activities endpoint
|
|
1555
1600
|
*/
|
|
1556
|
-
export interface ActivityListResponse {
|
|
1601
|
+
export interface ActivityListResponse extends ListResponse {
|
|
1557
1602
|
/** Array of activities */
|
|
1558
1603
|
activities: Activity[];
|
|
1559
|
-
/** Cursor for pagination, null if no more pages */
|
|
1560
|
-
cursor: string | null;
|
|
1561
1604
|
}
|
|
1562
1605
|
|
|
1563
1606
|
// =============================================================================
|