@dropthis/cli 0.30.1 → 0.31.0

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.
@@ -30,6 +30,20 @@ type DropthisErrorResponse = {
30
30
  requestId?: string | null;
31
31
  suggestion?: string | null;
32
32
  retryable?: boolean | null;
33
+ /** The gated capability (on `feature_not_in_plan`), e.g. `password_protect`. */
34
+ feature?: string | null;
35
+ /** The caller's current plan (on `feature_not_in_plan` / `quota_exceeded`). */
36
+ currentPlan?: string | null;
37
+ /** The lowest plan that unlocks the feature (on `feature_not_in_plan`). */
38
+ requiredPlan?: string | null;
39
+ /** The pricing/upgrade URL to hand a human (on a plan gate). */
40
+ upgradeUrl?: string | null;
41
+ /** Numeric ceiling that was hit (on `quota_exceeded`). */
42
+ limit?: number | null;
43
+ /** Amount already used toward the ceiling (on `quota_exceeded`). */
44
+ used?: number | null;
45
+ /** Amount the request asked for (on `quota_exceeded`). */
46
+ requested?: number | null;
33
47
  body?: unknown;
34
48
  };
35
49
  type DropthisResult<T> = {
@@ -211,25 +225,48 @@ type ApiKeyCreatedResponse = ApiKeyResponse & {
211
225
  accountId?: string | null;
212
226
  isNewAccount?: boolean;
213
227
  };
214
- /** Active plan tier limits — use these to size a publish before uploading. */
215
- type AccountLimits = {
216
- /** Plan tier the limits apply to. */
217
- name: string;
228
+ /** Numeric limits for the active plan — use these to size a publish before uploading. */
229
+ type EntitlementLimits = {
218
230
  /** Maximum size of a single drop in bytes. */
219
231
  maxSizeBytes: number;
220
- /** Drop lifetime in seconds before expiry; null means drops are permanent. */
221
- defaultTtlSeconds: number | null;
222
232
  /** Total account storage cap in bytes; null means no account-level cap. */
223
233
  maxStorageBytes: number | null;
224
- /** Maximum number of custom hostnames allowed on this plan. */
234
+ /** Drop lifetime in seconds before expiry; null means drops are permanent. */
235
+ defaultTtlSeconds: number | null;
236
+ /** Maximum number of custom hostnames the workspace may connect. */
225
237
  maxCustomHostnames: number;
238
+ /** Maximum members the workspace may hold (owner included). */
239
+ seatLimit: number;
240
+ /** Maximum concurrent in-flight upload sessions (a transient concurrency cap). */
241
+ maxActiveUploadSessions: number;
242
+ };
243
+ /**
244
+ * The full capability matrix for the active plan — the single read to pre-check a
245
+ * feature gate before attempting an operation.
246
+ */
247
+ type Entitlements = {
248
+ /**
249
+ * Per-capability state for the active plan. Boolean caps are `true`/`false`;
250
+ * enum caps (`ogPreview`, `analytics`) carry a value — compare by value, never
251
+ * truthiness (`"none"` is truthy).
252
+ */
253
+ capabilities: Record<string, boolean | string>;
254
+ /**
255
+ * The lowest plan that unlocks each gated capability — drives the upgrade nudge.
256
+ * Enum sub-values are keyed `ogPreview.customImage` / `analytics.full`.
257
+ */
258
+ requiredPlan: Record<string, string>;
259
+ /** Numeric limits for the active plan. */
260
+ limits: EntitlementLimits;
226
261
  };
227
- /** Current resource usage for the account. */
262
+ /** Current resource usage for the account's active workspace. */
228
263
  type AccountUsage = {
229
264
  /** Total bytes consumed across all active drops. */
230
265
  storageUsedBytes: number;
231
266
  /** Number of custom domain hostnames currently in use. */
232
267
  customDomainsUsed: number;
268
+ /** Members currently in the workspace (owner included). */
269
+ seatsUsed: number;
233
270
  };
234
271
  /** The workspace a principal acts within (ADR 0066). For an sk_ API key, the workspace the key is bound to. */
235
272
  type AccountWorkspace = {
@@ -265,10 +302,11 @@ type AccountResponse = {
265
302
  plan: string;
266
303
  status: string;
267
304
  createdAt: string;
268
- limits: AccountLimits;
305
+ /** The full capability matrix + numeric limits for the active plan. */
306
+ entitlements: Entitlements;
269
307
  usage: AccountUsage;
270
308
  workspace: AccountWorkspace;
271
- /** URL to upgrade the account; null if already on the highest tier. */
309
+ /** URL to upgrade; present on every plan below Business, null on the top tier. */
272
310
  upgradeUrl: string | null;
273
311
  };
274
312
  type ListDropsParams = {
@@ -924,4 +962,4 @@ declare class WorkspacesResource {
924
962
  active(): Promise<DropthisResult<Workspace | null>>;
925
963
  }
926
964
 
927
- export { type UploadTarget as $, type AccountLimits as A, type ListPage as B, type CreateUploadSessionRequest as C, type DeploymentContentFile as D, type EmailOtpResponse as E, type PreparedPublishRequest as F, type GetContentOptions as G, type PreparedUploadFile as H, type InMemoryPublishInput as I, type PublishFileInput as J, type KeyType as K, type Limitations as L, type PublishInput as M, type NextHint as N, type PublishOptions as O, type PrepareOptions as P, type RequestOptions as Q, type RequestControls as R, type RevokeImpact as S, SHARED_POOL as T, type SessionResponse as U, type TierInfo as V, Transport as W, type UpdateContentOptions as X, type UploadManifestFile as Y, type UploadSessionFileResponse as Z, type UploadSessionResponse as _, AccountResource as a, type Workspace as a0, WorkspacesResource as a1, type AccountResponse as b, type AccountWorkspace as c, type ActionResolve as d, ApiKeysResource as e, type CreateUploadSessionResponse as f, CursorPage as g, type DeploymentContentManifest as h, DeploymentsResource as i, type DnsRecord as j, type DomainDeletedResponse as k, type DomainListResponse as l, type DomainResponse as m, DomainsResource as n, type DropAction as o, type DropContentFile as p, type DropDeploymentResponse as q, type DropOptions as r, type DropResponse as s, type DropWorkspace as t, DropsResource as u, type DropthisClientOptions as v, type DropthisErrorResponse as w, type DropthisResult as x, type ListDeploymentsParams as y, type ListDeploymentsResponse as z };
965
+ export { type UploadSessionFileResponse as $, AccountResource as A, type ListDeploymentsParams as B, type CreateUploadSessionRequest as C, type DeploymentContentFile as D, type EmailOtpResponse as E, type ListDeploymentsResponse as F, type GetContentOptions as G, type ListPage as H, type InMemoryPublishInput as I, type PreparedPublishRequest as J, type KeyType as K, type Limitations as L, type PreparedUploadFile as M, type NextHint as N, type PublishFileInput as O, type PrepareOptions as P, type PublishInput as Q, type PublishOptions as R, type RequestControls as S, type RequestOptions as T, type RevokeImpact as U, SHARED_POOL as V, type SessionResponse as W, type TierInfo as X, Transport as Y, type UpdateContentOptions as Z, type UploadManifestFile as _, type AccountResponse as a, type UploadSessionResponse as a0, type UploadTarget as a1, type Workspace as a2, WorkspacesResource as a3, type AccountUsage as b, type AccountWorkspace as c, type ActionResolve as d, ApiKeysResource as e, type CreateUploadSessionResponse as f, CursorPage as g, type DeploymentContentManifest as h, DeploymentsResource as i, type DnsRecord as j, type DomainDeletedResponse as k, type DomainListResponse as l, type DomainResponse as m, DomainsResource as n, type DropAction as o, type DropContentFile as p, type DropDeploymentResponse as q, type DropOptions as r, type DropResponse as s, type DropWorkspace as t, DropsResource as u, type DropthisClientOptions as v, type DropthisErrorResponse as w, type DropthisResult as x, type EntitlementLimits as y, type Entitlements as z };
@@ -30,6 +30,20 @@ type DropthisErrorResponse = {
30
30
  requestId?: string | null;
31
31
  suggestion?: string | null;
32
32
  retryable?: boolean | null;
33
+ /** The gated capability (on `feature_not_in_plan`), e.g. `password_protect`. */
34
+ feature?: string | null;
35
+ /** The caller's current plan (on `feature_not_in_plan` / `quota_exceeded`). */
36
+ currentPlan?: string | null;
37
+ /** The lowest plan that unlocks the feature (on `feature_not_in_plan`). */
38
+ requiredPlan?: string | null;
39
+ /** The pricing/upgrade URL to hand a human (on a plan gate). */
40
+ upgradeUrl?: string | null;
41
+ /** Numeric ceiling that was hit (on `quota_exceeded`). */
42
+ limit?: number | null;
43
+ /** Amount already used toward the ceiling (on `quota_exceeded`). */
44
+ used?: number | null;
45
+ /** Amount the request asked for (on `quota_exceeded`). */
46
+ requested?: number | null;
33
47
  body?: unknown;
34
48
  };
35
49
  type DropthisResult<T> = {
@@ -211,25 +225,48 @@ type ApiKeyCreatedResponse = ApiKeyResponse & {
211
225
  accountId?: string | null;
212
226
  isNewAccount?: boolean;
213
227
  };
214
- /** Active plan tier limits — use these to size a publish before uploading. */
215
- type AccountLimits = {
216
- /** Plan tier the limits apply to. */
217
- name: string;
228
+ /** Numeric limits for the active plan — use these to size a publish before uploading. */
229
+ type EntitlementLimits = {
218
230
  /** Maximum size of a single drop in bytes. */
219
231
  maxSizeBytes: number;
220
- /** Drop lifetime in seconds before expiry; null means drops are permanent. */
221
- defaultTtlSeconds: number | null;
222
232
  /** Total account storage cap in bytes; null means no account-level cap. */
223
233
  maxStorageBytes: number | null;
224
- /** Maximum number of custom hostnames allowed on this plan. */
234
+ /** Drop lifetime in seconds before expiry; null means drops are permanent. */
235
+ defaultTtlSeconds: number | null;
236
+ /** Maximum number of custom hostnames the workspace may connect. */
225
237
  maxCustomHostnames: number;
238
+ /** Maximum members the workspace may hold (owner included). */
239
+ seatLimit: number;
240
+ /** Maximum concurrent in-flight upload sessions (a transient concurrency cap). */
241
+ maxActiveUploadSessions: number;
242
+ };
243
+ /**
244
+ * The full capability matrix for the active plan — the single read to pre-check a
245
+ * feature gate before attempting an operation.
246
+ */
247
+ type Entitlements = {
248
+ /**
249
+ * Per-capability state for the active plan. Boolean caps are `true`/`false`;
250
+ * enum caps (`ogPreview`, `analytics`) carry a value — compare by value, never
251
+ * truthiness (`"none"` is truthy).
252
+ */
253
+ capabilities: Record<string, boolean | string>;
254
+ /**
255
+ * The lowest plan that unlocks each gated capability — drives the upgrade nudge.
256
+ * Enum sub-values are keyed `ogPreview.customImage` / `analytics.full`.
257
+ */
258
+ requiredPlan: Record<string, string>;
259
+ /** Numeric limits for the active plan. */
260
+ limits: EntitlementLimits;
226
261
  };
227
- /** Current resource usage for the account. */
262
+ /** Current resource usage for the account's active workspace. */
228
263
  type AccountUsage = {
229
264
  /** Total bytes consumed across all active drops. */
230
265
  storageUsedBytes: number;
231
266
  /** Number of custom domain hostnames currently in use. */
232
267
  customDomainsUsed: number;
268
+ /** Members currently in the workspace (owner included). */
269
+ seatsUsed: number;
233
270
  };
234
271
  /** The workspace a principal acts within (ADR 0066). For an sk_ API key, the workspace the key is bound to. */
235
272
  type AccountWorkspace = {
@@ -265,10 +302,11 @@ type AccountResponse = {
265
302
  plan: string;
266
303
  status: string;
267
304
  createdAt: string;
268
- limits: AccountLimits;
305
+ /** The full capability matrix + numeric limits for the active plan. */
306
+ entitlements: Entitlements;
269
307
  usage: AccountUsage;
270
308
  workspace: AccountWorkspace;
271
- /** URL to upgrade the account; null if already on the highest tier. */
309
+ /** URL to upgrade; present on every plan below Business, null on the top tier. */
272
310
  upgradeUrl: string | null;
273
311
  };
274
312
  type ListDropsParams = {
@@ -924,4 +962,4 @@ declare class WorkspacesResource {
924
962
  active(): Promise<DropthisResult<Workspace | null>>;
925
963
  }
926
964
 
927
- export { type UploadTarget as $, type AccountLimits as A, type ListPage as B, type CreateUploadSessionRequest as C, type DeploymentContentFile as D, type EmailOtpResponse as E, type PreparedPublishRequest as F, type GetContentOptions as G, type PreparedUploadFile as H, type InMemoryPublishInput as I, type PublishFileInput as J, type KeyType as K, type Limitations as L, type PublishInput as M, type NextHint as N, type PublishOptions as O, type PrepareOptions as P, type RequestOptions as Q, type RequestControls as R, type RevokeImpact as S, SHARED_POOL as T, type SessionResponse as U, type TierInfo as V, Transport as W, type UpdateContentOptions as X, type UploadManifestFile as Y, type UploadSessionFileResponse as Z, type UploadSessionResponse as _, AccountResource as a, type Workspace as a0, WorkspacesResource as a1, type AccountResponse as b, type AccountWorkspace as c, type ActionResolve as d, ApiKeysResource as e, type CreateUploadSessionResponse as f, CursorPage as g, type DeploymentContentManifest as h, DeploymentsResource as i, type DnsRecord as j, type DomainDeletedResponse as k, type DomainListResponse as l, type DomainResponse as m, DomainsResource as n, type DropAction as o, type DropContentFile as p, type DropDeploymentResponse as q, type DropOptions as r, type DropResponse as s, type DropWorkspace as t, DropsResource as u, type DropthisClientOptions as v, type DropthisErrorResponse as w, type DropthisResult as x, type ListDeploymentsParams as y, type ListDeploymentsResponse as z };
965
+ export { type UploadSessionFileResponse as $, AccountResource as A, type ListDeploymentsParams as B, type CreateUploadSessionRequest as C, type DeploymentContentFile as D, type EmailOtpResponse as E, type ListDeploymentsResponse as F, type GetContentOptions as G, type ListPage as H, type InMemoryPublishInput as I, type PreparedPublishRequest as J, type KeyType as K, type Limitations as L, type PreparedUploadFile as M, type NextHint as N, type PublishFileInput as O, type PrepareOptions as P, type PublishInput as Q, type PublishOptions as R, type RequestControls as S, type RequestOptions as T, type RevokeImpact as U, SHARED_POOL as V, type SessionResponse as W, type TierInfo as X, Transport as Y, type UpdateContentOptions as Z, type UploadManifestFile as _, type AccountResponse as a, type UploadSessionResponse as a0, type UploadTarget as a1, type Workspace as a2, WorkspacesResource as a3, type AccountUsage as b, type AccountWorkspace as c, type ActionResolve as d, ApiKeysResource as e, type CreateUploadSessionResponse as f, CursorPage as g, type DeploymentContentManifest as h, DeploymentsResource as i, type DnsRecord as j, type DomainDeletedResponse as k, type DomainListResponse as l, type DomainResponse as m, DomainsResource as n, type DropAction as o, type DropContentFile as p, type DropDeploymentResponse as q, type DropOptions as r, type DropResponse as s, type DropWorkspace as t, DropsResource as u, type DropthisClientOptions as v, type DropthisErrorResponse as w, type DropthisResult as x, type EntitlementLimits as y, type Entitlements as z };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dropthis/node",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Official Node.js SDK for Dropthis.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dropthis/cli",
3
- "version": "0.30.1",
3
+ "version": "0.31.0",
4
4
  "description": "Official CLI for Dropthis.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@clack/prompts": "1.4.0",
35
- "@dropthis/node": "^0.26.0",
35
+ "@dropthis/node": "^0.27.0",
36
36
  "@napi-rs/keyring": "1.3.0",
37
37
  "commander": "14.0.3",
38
38
  "picocolors": "1.1.1"