@shipstatic/types 2.5.0-beta.6 → 2.5.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/dist/index.d.ts +38 -12
- package/package.json +1 -1
- package/src/index.ts +38 -12
package/dist/index.d.ts
CHANGED
|
@@ -57,8 +57,6 @@ export interface DeploymentListResponse {
|
|
|
57
57
|
deployments: Deployment[];
|
|
58
58
|
/** Cursor for pagination, null if no more pages */
|
|
59
59
|
cursor: string | null;
|
|
60
|
-
/** Total number of deployments */
|
|
61
|
-
total: number;
|
|
62
60
|
}
|
|
63
61
|
/**
|
|
64
62
|
* Domain status constants
|
|
@@ -118,8 +116,6 @@ export interface DomainListResponse {
|
|
|
118
116
|
domains: Domain[];
|
|
119
117
|
/** Cursor for pagination, null if no more pages */
|
|
120
118
|
cursor: string | null;
|
|
121
|
-
/** Total number of domains */
|
|
122
|
-
total: number;
|
|
123
119
|
}
|
|
124
120
|
/**
|
|
125
121
|
* DNS record types supported for domain configuration
|
|
@@ -203,8 +199,6 @@ export interface TokenListResponse {
|
|
|
203
199
|
tokens: TokenListItem[];
|
|
204
200
|
/** Cursor for pagination, null if no more pages */
|
|
205
201
|
cursor: string | null;
|
|
206
|
-
/** Total number of tokens */
|
|
207
|
-
total: number;
|
|
208
202
|
}
|
|
209
203
|
/**
|
|
210
204
|
* Response for token creation
|
|
@@ -234,10 +228,34 @@ export declare const AccountPlan: {
|
|
|
234
228
|
export type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
235
229
|
/**
|
|
236
230
|
* Account usage metrics — always available regardless of billing provider.
|
|
231
|
+
*
|
|
232
|
+
* This is where a caller's own totals live. Lists answer pages and carry no
|
|
233
|
+
* `total` (see {@link ListOptions}); a count is an aggregate over a
|
|
234
|
+
* collection, so it belongs to the summary resource that owns the
|
|
235
|
+
* collection. `GET /account` is that resource for one caller, `GET
|
|
236
|
+
* /admin/stats` for the platform.
|
|
237
|
+
*
|
|
238
|
+
* The counted dimensions are the ones the plan caps — deployments and
|
|
239
|
+
* domains (`PlatformLimits`) — plus the billable custom-domain subset, so a
|
|
240
|
+
* surface can render "3 of 10" without a second request.
|
|
237
241
|
*/
|
|
238
242
|
export interface AccountUsage {
|
|
239
243
|
/** Number of active custom domains (excludes paused) */
|
|
240
244
|
customDomains: number;
|
|
245
|
+
/**
|
|
246
|
+
* Deployments counted against the plan's deployment cap — every row
|
|
247
|
+
* whatever its status, because that is what the cap counts, so a surface
|
|
248
|
+
* renders "3 of 10" against the denominator the 403 divides by. (`GET
|
|
249
|
+
* /deployments` lists successful ones only; that is a different question
|
|
250
|
+
* asked of a different resource.) Optional by the additive-evolution law:
|
|
251
|
+
* an API predating this field omits it.
|
|
252
|
+
*/
|
|
253
|
+
deployments?: number;
|
|
254
|
+
/**
|
|
255
|
+
* Domains counted against the plan's domain cap — every domain, platform
|
|
256
|
+
* and custom alike, unlike `customDomains`. Optional for the same reason.
|
|
257
|
+
*/
|
|
258
|
+
domains?: number;
|
|
241
259
|
}
|
|
242
260
|
/**
|
|
243
261
|
* Core account object - used in both API responses and SDK
|
|
@@ -814,10 +832,20 @@ export interface DeploymentUploadOptions {
|
|
|
814
832
|
captcha?: string;
|
|
815
833
|
}
|
|
816
834
|
/**
|
|
817
|
-
* Pagination options for
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
835
|
+
* Pagination options for every list endpoint. The response's `cursor` feeds
|
|
836
|
+
* the next request; a `null` cursor means the last page. Omitting both
|
|
837
|
+
* returns the server's default first page.
|
|
838
|
+
*
|
|
839
|
+
* A list answers `{ <collection>, cursor }` and nothing else — `cursor`
|
|
840
|
+
* carries the entire has-more signal, so no redundant boolean, and no
|
|
841
|
+
* `total`. **A count is an aggregate over a collection, not a property of a
|
|
842
|
+
* page:** including one makes every read pay for a full scan it did not ask
|
|
843
|
+
* for, which is precisely the cost keyset pagination exists to avoid.
|
|
844
|
+
*
|
|
845
|
+
* Counts therefore live on the summary resource that owns them —
|
|
846
|
+
* `GET /account` (`usage`) for a caller's own totals, `GET /admin/stats` for
|
|
847
|
+
* platform-wide ones. Ask for a count when you want a count; ask for a page
|
|
848
|
+
* when you want a page.
|
|
821
849
|
*/
|
|
822
850
|
export interface ListOptions {
|
|
823
851
|
/** Maximum number of items to return in one page. */
|
|
@@ -978,8 +1006,6 @@ export interface ActivityListResponse {
|
|
|
978
1006
|
activities: Activity[];
|
|
979
1007
|
/** Cursor for pagination, null if no more pages */
|
|
980
1008
|
cursor: string | null;
|
|
981
|
-
/** Total number of activities */
|
|
982
|
-
total: number;
|
|
983
1009
|
}
|
|
984
1010
|
/**
|
|
985
1011
|
* File status constants for validation state tracking
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -66,8 +66,6 @@ export interface DeploymentListResponse {
|
|
|
66
66
|
deployments: Deployment[];
|
|
67
67
|
/** Cursor for pagination, null if no more pages */
|
|
68
68
|
cursor: string | null;
|
|
69
|
-
/** Total number of deployments */
|
|
70
|
-
total: number;
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
// =============================================================================
|
|
@@ -136,8 +134,6 @@ export interface DomainListResponse {
|
|
|
136
134
|
domains: Domain[];
|
|
137
135
|
/** Cursor for pagination, null if no more pages */
|
|
138
136
|
cursor: string | null;
|
|
139
|
-
/** Total number of domains */
|
|
140
|
-
total: number;
|
|
141
137
|
}
|
|
142
138
|
|
|
143
139
|
/**
|
|
@@ -231,8 +227,6 @@ export interface TokenListResponse {
|
|
|
231
227
|
tokens: TokenListItem[];
|
|
232
228
|
/** Cursor for pagination, null if no more pages */
|
|
233
229
|
cursor: string | null;
|
|
234
|
-
/** Total number of tokens */
|
|
235
|
-
total: number;
|
|
236
230
|
}
|
|
237
231
|
|
|
238
232
|
/**
|
|
@@ -270,10 +264,34 @@ export type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
|
|
|
270
264
|
|
|
271
265
|
/**
|
|
272
266
|
* Account usage metrics — always available regardless of billing provider.
|
|
267
|
+
*
|
|
268
|
+
* This is where a caller's own totals live. Lists answer pages and carry no
|
|
269
|
+
* `total` (see {@link ListOptions}); a count is an aggregate over a
|
|
270
|
+
* collection, so it belongs to the summary resource that owns the
|
|
271
|
+
* collection. `GET /account` is that resource for one caller, `GET
|
|
272
|
+
* /admin/stats` for the platform.
|
|
273
|
+
*
|
|
274
|
+
* The counted dimensions are the ones the plan caps — deployments and
|
|
275
|
+
* domains (`PlatformLimits`) — plus the billable custom-domain subset, so a
|
|
276
|
+
* surface can render "3 of 10" without a second request.
|
|
273
277
|
*/
|
|
274
278
|
export interface AccountUsage {
|
|
275
279
|
/** Number of active custom domains (excludes paused) */
|
|
276
280
|
customDomains: number;
|
|
281
|
+
/**
|
|
282
|
+
* Deployments counted against the plan's deployment cap — every row
|
|
283
|
+
* whatever its status, because that is what the cap counts, so a surface
|
|
284
|
+
* renders "3 of 10" against the denominator the 403 divides by. (`GET
|
|
285
|
+
* /deployments` lists successful ones only; that is a different question
|
|
286
|
+
* asked of a different resource.) Optional by the additive-evolution law:
|
|
287
|
+
* an API predating this field omits it.
|
|
288
|
+
*/
|
|
289
|
+
deployments?: number;
|
|
290
|
+
/**
|
|
291
|
+
* Domains counted against the plan's domain cap — every domain, platform
|
|
292
|
+
* and custom alike, unlike `customDomains`. Optional for the same reason.
|
|
293
|
+
*/
|
|
294
|
+
domains?: number;
|
|
277
295
|
}
|
|
278
296
|
|
|
279
297
|
/**
|
|
@@ -1305,10 +1323,20 @@ export interface DeploymentUploadOptions {
|
|
|
1305
1323
|
}
|
|
1306
1324
|
|
|
1307
1325
|
/**
|
|
1308
|
-
* Pagination options for
|
|
1309
|
-
*
|
|
1310
|
-
*
|
|
1311
|
-
*
|
|
1326
|
+
* Pagination options for every list endpoint. The response's `cursor` feeds
|
|
1327
|
+
* the next request; a `null` cursor means the last page. Omitting both
|
|
1328
|
+
* returns the server's default first page.
|
|
1329
|
+
*
|
|
1330
|
+
* A list answers `{ <collection>, cursor }` and nothing else — `cursor`
|
|
1331
|
+
* carries the entire has-more signal, so no redundant boolean, and no
|
|
1332
|
+
* `total`. **A count is an aggregate over a collection, not a property of a
|
|
1333
|
+
* page:** including one makes every read pay for a full scan it did not ask
|
|
1334
|
+
* for, which is precisely the cost keyset pagination exists to avoid.
|
|
1335
|
+
*
|
|
1336
|
+
* Counts therefore live on the summary resource that owns them —
|
|
1337
|
+
* `GET /account` (`usage`) for a caller's own totals, `GET /admin/stats` for
|
|
1338
|
+
* platform-wide ones. Ask for a count when you want a count; ask for a page
|
|
1339
|
+
* when you want a page.
|
|
1312
1340
|
*/
|
|
1313
1341
|
export interface ListOptions {
|
|
1314
1342
|
/** Maximum number of items to return in one page. */
|
|
@@ -1554,8 +1582,6 @@ export interface ActivityListResponse {
|
|
|
1554
1582
|
activities: Activity[];
|
|
1555
1583
|
/** Cursor for pagination, null if no more pages */
|
|
1556
1584
|
cursor: string | null;
|
|
1557
|
-
/** Total number of activities */
|
|
1558
|
-
total: number;
|
|
1559
1585
|
}
|
|
1560
1586
|
|
|
1561
1587
|
// =============================================================================
|