@shipstatic/types 2.5.0-beta.8 → 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 +46 -28
- package/package.json +1 -1
- package/src/index.ts +47 -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
|
|
@@ -1001,11 +1021,9 @@ export interface ActivityMeta {
|
|
|
1001
1021
|
/**
|
|
1002
1022
|
* Response from GET /activities endpoint
|
|
1003
1023
|
*/
|
|
1004
|
-
export interface ActivityListResponse {
|
|
1024
|
+
export interface ActivityListResponse extends ListResponse {
|
|
1005
1025
|
/** Array of activities */
|
|
1006
1026
|
activities: Activity[];
|
|
1007
|
-
/** Cursor for pagination, null if no more pages */
|
|
1008
|
-
cursor: string | null;
|
|
1009
1027
|
}
|
|
1010
1028
|
/**
|
|
1011
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
|
// =============================================================================
|
|
@@ -1577,11 +1598,9 @@ export interface ActivityMeta {
|
|
|
1577
1598
|
/**
|
|
1578
1599
|
* Response from GET /activities endpoint
|
|
1579
1600
|
*/
|
|
1580
|
-
export interface ActivityListResponse {
|
|
1601
|
+
export interface ActivityListResponse extends ListResponse {
|
|
1581
1602
|
/** Array of activities */
|
|
1582
1603
|
activities: Activity[];
|
|
1583
|
-
/** Cursor for pagination, null if no more pages */
|
|
1584
|
-
cursor: string | null;
|
|
1585
1604
|
}
|
|
1586
1605
|
|
|
1587
1606
|
// =============================================================================
|