@shipstatic/ship 2.0.0-beta.4 → 2.0.0-beta.5

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/browser.d.ts CHANGED
@@ -57,8 +57,6 @@ 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 @@ 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 @@ 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 @@ declare const AccountPlan: {
234
228
  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
  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 @@ interface DeploymentUploadOptions {
814
832
  captcha?: string;
815
833
  }
816
834
  /**
817
- * Pagination options for the paginated list endpoints (`GET /deployments`,
818
- * `GET /domains`). The response's `cursor` feeds the next request; a `null`
819
- * cursor on the response means the last page. Omitting both returns the
820
- * server's default first page.
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
  interface ListOptions {
823
851
  /** Maximum number of items to return in one page. */
@@ -978,8 +1006,6 @@ 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