@dropthis/cli 0.35.0 → 0.37.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.
@@ -1,5 +1,5 @@
1
- import { a4 as Transport, x as DropthisResult, E as EmailOtpResponse, a2 as SessionResponse, C as CreateUploadSessionRequest, f as CreateUploadSessionResponse, a8 as UploadSessionResponse, v as DropthisClientOptions, e as ApiKeysResource, A as AccountResource, u as DropsResource, Y as PublishInput, i as DeploymentsResource, n as DomainsResource, ac as WorkspacesResource, S as MembersResource, K as InvitationsResource, Z as PublishOptions, V as PreparedPublishRequest } from './workspaces-Cq705UM6.cjs';
2
- export { a as AccountResponse, b as AccountUsage, c as AccountWorkspace, d as ActionResolve, g as CursorPage, D as DeploymentContentFile, h as DeploymentContentManifest, j as DnsRecord, k as DomainDeletedResponse, l as DomainListResponse, m as DomainResponse, o as DropAction, p as DropContentFile, q as DropDeploymentResponse, r as DropOptions, s as DropResponse, t as DropWorkspace, w as DropthisErrorResponse, y as EntitlementLimits, z as Entitlements, G as GetContentOptions, I as ImageTransform, B as InMemoryPublishInput, F as InvitableRole, H as Invitation, J as InvitationListResponse, L as KeyType, M as Limitations, N as ListDeploymentsParams, O as ListDeploymentsResponse, P as ListPage, Q as Member, R as MemberListResponse, T as NextHint, U as PrepareOptions, W as PreparedUploadFile, X as PublishFileInput, _ as RequestControls, $ as RequestOptions, a0 as RevokeImpact, a1 as SHARED_POOL, a3 as TierInfo, a5 as UpdateContentOptions, a6 as UploadManifestFile, a7 as UploadSessionFileResponse, a9 as UploadTarget, aa as Workspace, ab as WorkspaceRole } from './workspaces-Cq705UM6.cjs';
1
+ import { a7 as Transport, B as DropthisResult, E as EmailOtpResponse, a5 as SessionResponse, C as CreateUploadSessionRequest, h as CreateUploadSessionResponse, ab as UploadSessionResponse, y as DropthisClientOptions, g as ApiKeysResource, A as AccountResource, x as DropsResource, $ as PublishInput, k as DeploymentsResource, p as DomainsResource, af as WorkspacesResource, V as MembersResource, N as InvitationsResource, a0 as PublishOptions, Y as PreparedPublishRequest } from './workspaces-CfwVerjp.cjs';
2
+ export { a as AccountResponse, b as AccountUsage, c as AccountWorkspace, d as ActionResolve, e as AnalyticsBreakdownItem, f as AnalyticsDailyPoint, i as CursorPage, D as DeploymentContentFile, j as DeploymentContentManifest, l as DnsRecord, m as DomainDeletedResponse, n as DomainListResponse, o as DomainResponse, q as DropAction, r as DropAnalyticsResponse, s as DropContentFile, t as DropDeploymentResponse, u as DropOptions, v as DropResponse, w as DropWorkspace, z as DropthisErrorResponse, F as EntitlementLimits, G as Entitlements, H as GetContentOptions, I as ImageTransform, J as InMemoryPublishInput, K as InvitableRole, L as Invitation, M as InvitationListResponse, O as KeyType, P as Limitations, Q as ListDeploymentsParams, R as ListDeploymentsResponse, S as ListPage, T as Member, U as MemberListResponse, W as NextHint, X as PrepareOptions, Z as PreparedUploadFile, _ as PublishFileInput, a1 as RequestControls, a2 as RequestOptions, a3 as RevokeImpact, a4 as SHARED_POOL, a6 as TierInfo, a8 as UpdateContentOptions, a9 as UploadManifestFile, aa as UploadSessionFileResponse, ac as UploadTarget, ad as Workspace, ae as WorkspaceRole } from './workspaces-CfwVerjp.cjs';
3
3
 
4
4
  declare class AuthResource {
5
5
  private readonly transport;
@@ -1,5 +1,5 @@
1
- import { a4 as Transport, x as DropthisResult, E as EmailOtpResponse, a2 as SessionResponse, C as CreateUploadSessionRequest, f as CreateUploadSessionResponse, a8 as UploadSessionResponse, v as DropthisClientOptions, e as ApiKeysResource, A as AccountResource, u as DropsResource, Y as PublishInput, i as DeploymentsResource, n as DomainsResource, ac as WorkspacesResource, S as MembersResource, K as InvitationsResource, Z as PublishOptions, V as PreparedPublishRequest } from './workspaces-Cq705UM6.js';
2
- export { a as AccountResponse, b as AccountUsage, c as AccountWorkspace, d as ActionResolve, g as CursorPage, D as DeploymentContentFile, h as DeploymentContentManifest, j as DnsRecord, k as DomainDeletedResponse, l as DomainListResponse, m as DomainResponse, o as DropAction, p as DropContentFile, q as DropDeploymentResponse, r as DropOptions, s as DropResponse, t as DropWorkspace, w as DropthisErrorResponse, y as EntitlementLimits, z as Entitlements, G as GetContentOptions, I as ImageTransform, B as InMemoryPublishInput, F as InvitableRole, H as Invitation, J as InvitationListResponse, L as KeyType, M as Limitations, N as ListDeploymentsParams, O as ListDeploymentsResponse, P as ListPage, Q as Member, R as MemberListResponse, T as NextHint, U as PrepareOptions, W as PreparedUploadFile, X as PublishFileInput, _ as RequestControls, $ as RequestOptions, a0 as RevokeImpact, a1 as SHARED_POOL, a3 as TierInfo, a5 as UpdateContentOptions, a6 as UploadManifestFile, a7 as UploadSessionFileResponse, a9 as UploadTarget, aa as Workspace, ab as WorkspaceRole } from './workspaces-Cq705UM6.js';
1
+ import { a7 as Transport, B as DropthisResult, E as EmailOtpResponse, a5 as SessionResponse, C as CreateUploadSessionRequest, h as CreateUploadSessionResponse, ab as UploadSessionResponse, y as DropthisClientOptions, g as ApiKeysResource, A as AccountResource, x as DropsResource, $ as PublishInput, k as DeploymentsResource, p as DomainsResource, af as WorkspacesResource, V as MembersResource, N as InvitationsResource, a0 as PublishOptions, Y as PreparedPublishRequest } from './workspaces-CfwVerjp.js';
2
+ export { a as AccountResponse, b as AccountUsage, c as AccountWorkspace, d as ActionResolve, e as AnalyticsBreakdownItem, f as AnalyticsDailyPoint, i as CursorPage, D as DeploymentContentFile, j as DeploymentContentManifest, l as DnsRecord, m as DomainDeletedResponse, n as DomainListResponse, o as DomainResponse, q as DropAction, r as DropAnalyticsResponse, s as DropContentFile, t as DropDeploymentResponse, u as DropOptions, v as DropResponse, w as DropWorkspace, z as DropthisErrorResponse, F as EntitlementLimits, G as Entitlements, H as GetContentOptions, I as ImageTransform, J as InMemoryPublishInput, K as InvitableRole, L as Invitation, M as InvitationListResponse, O as KeyType, P as Limitations, Q as ListDeploymentsParams, R as ListDeploymentsResponse, S as ListPage, T as Member, U as MemberListResponse, W as NextHint, X as PrepareOptions, Z as PreparedUploadFile, _ as PublishFileInput, a1 as RequestControls, a2 as RequestOptions, a3 as RevokeImpact, a4 as SHARED_POOL, a6 as TierInfo, a8 as UpdateContentOptions, a9 as UploadManifestFile, aa as UploadSessionFileResponse, ac as UploadTarget, ad as Workspace, ae as WorkspaceRole } from './workspaces-CfwVerjp.js';
3
3
 
4
4
  declare class AuthResource {
5
5
  private readonly transport;
@@ -775,6 +775,26 @@ var DeploymentsResource = class {
775
775
  `/drops/${encodeURIComponent(dropId)}/deployments/${encodeURIComponent(deploymentId)}`
776
776
  );
777
777
  }
778
+ /**
779
+ * Roll a drop back to a prior deployment's content (Pro+ version-history feature). Mints a
780
+ * NEW deployment whose content is copied from `deploymentId` and makes it current — the drop's
781
+ * URL and settings are unchanged. Restoring the deployment that is already current is a 200
782
+ * no-op. Below Pro returns `feature_not_in_plan` (carrying `upgradeUrl`). Returns the updated
783
+ * parent drop (with its `url` and bumped `revision`). Pass `idempotencyKey` to make a retry
784
+ * safe. POST /drops/{id}/deployments/{deploymentId}/restore.
785
+ */
786
+ restore(dropId, deploymentId, options = {}) {
787
+ const requestOptions = {};
788
+ if (options.idempotencyKey)
789
+ requestOptions.idempotencyKey = options.idempotencyKey;
790
+ if (options.ifRevision !== void 0)
791
+ requestOptions.ifRevision = options.ifRevision;
792
+ return this.transport.request(
793
+ "POST",
794
+ `/drops/${encodeURIComponent(dropId)}/deployments/${encodeURIComponent(deploymentId)}/restore`,
795
+ requestOptions
796
+ );
797
+ }
778
798
  };
779
799
 
780
800
  // src/resources/domains.ts
@@ -971,6 +991,19 @@ var DropsResource = class {
971
991
  `/drops/${encodeURIComponent(dropId)}`
972
992
  );
973
993
  }
994
+ /**
995
+ * Approximate view analytics for one drop, by its `drop_…` id. Gated by the `analytics`
996
+ * capability: Free returns `feature_not_in_plan` (needs Keep); Keep (`view_count`) returns
997
+ * `views`/`truncated` with breakdowns null; Pro+ (`full`) also returns `byCountry`/
998
+ * `byReferer`/`daily`. Counts are best-effort (captured fire-and-forget at the edge) — an
999
+ * approximate signal, not exact human visits. GET /drops/{id}/analytics.
1000
+ */
1001
+ analytics(dropId) {
1002
+ return this.transport.request(
1003
+ "GET",
1004
+ `/drops/${encodeURIComponent(dropId)}/analytics`
1005
+ );
1006
+ }
974
1007
  /**
975
1008
  * Resolve a public locator (a drop URL, a custom-domain URL, or a bare vanity/shared
976
1009
  * slug) back to the drop — the way to recover a lost `drop_…` id. Sends the raw target
@@ -1252,7 +1285,7 @@ function toSnakeCase(value) {
1252
1285
 
1253
1286
  // src/transport.ts
1254
1287
  var DEFAULT_BASE_URL = "https://api.dropthis.app";
1255
- var SDK_VERSION = true ? "0.32.0" : "0.0.0-dev";
1288
+ var SDK_VERSION = true ? "0.33.0" : "0.0.0-dev";
1256
1289
  var Transport = class {
1257
1290
  apiKey;
1258
1291
  baseUrl;