@dropthis/cli 0.1.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.
Files changed (236) hide show
  1. package/README.md +171 -0
  2. package/dist/cli.cjs +1489 -0
  3. package/dist/cli.cjs.map +1 -0
  4. package/node_modules/@dropthis/node/README.md +90 -0
  5. package/node_modules/@dropthis/node/dist/index.cjs +1010 -0
  6. package/node_modules/@dropthis/node/dist/index.cjs.map +1 -0
  7. package/node_modules/@dropthis/node/dist/index.d.cts +408 -0
  8. package/node_modules/@dropthis/node/dist/index.d.ts +408 -0
  9. package/node_modules/@dropthis/node/dist/index.mjs +969 -0
  10. package/node_modules/@dropthis/node/dist/index.mjs.map +1 -0
  11. package/node_modules/@dropthis/node/package.json +55 -0
  12. package/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
  13. package/node_modules/@nodelib/fs.scandir/README.md +171 -0
  14. package/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
  15. package/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
  16. package/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
  17. package/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
  18. package/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
  19. package/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
  20. package/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
  21. package/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
  22. package/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
  23. package/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
  24. package/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
  25. package/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
  26. package/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
  27. package/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
  28. package/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
  29. package/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
  30. package/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
  31. package/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
  32. package/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
  33. package/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
  34. package/node_modules/@nodelib/fs.scandir/package.json +44 -0
  35. package/node_modules/@nodelib/fs.stat/LICENSE +21 -0
  36. package/node_modules/@nodelib/fs.stat/README.md +126 -0
  37. package/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
  38. package/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
  39. package/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
  40. package/node_modules/@nodelib/fs.stat/out/index.js +26 -0
  41. package/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
  42. package/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
  43. package/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
  44. package/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
  45. package/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
  46. package/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
  47. package/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
  48. package/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
  49. package/node_modules/@nodelib/fs.stat/package.json +37 -0
  50. package/node_modules/@nodelib/fs.walk/LICENSE +21 -0
  51. package/node_modules/@nodelib/fs.walk/README.md +215 -0
  52. package/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
  53. package/node_modules/@nodelib/fs.walk/out/index.js +34 -0
  54. package/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
  55. package/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
  56. package/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
  57. package/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
  58. package/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
  59. package/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
  60. package/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
  61. package/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
  62. package/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
  63. package/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
  64. package/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
  65. package/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
  66. package/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
  67. package/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
  68. package/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
  69. package/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
  70. package/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
  71. package/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
  72. package/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
  73. package/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
  74. package/node_modules/@nodelib/fs.walk/package.json +44 -0
  75. package/node_modules/braces/LICENSE +21 -0
  76. package/node_modules/braces/README.md +586 -0
  77. package/node_modules/braces/index.js +170 -0
  78. package/node_modules/braces/lib/compile.js +60 -0
  79. package/node_modules/braces/lib/constants.js +57 -0
  80. package/node_modules/braces/lib/expand.js +113 -0
  81. package/node_modules/braces/lib/parse.js +331 -0
  82. package/node_modules/braces/lib/stringify.js +32 -0
  83. package/node_modules/braces/lib/utils.js +122 -0
  84. package/node_modules/braces/package.json +77 -0
  85. package/node_modules/fast-glob/LICENSE +21 -0
  86. package/node_modules/fast-glob/README.md +830 -0
  87. package/node_modules/fast-glob/out/index.d.ts +40 -0
  88. package/node_modules/fast-glob/out/index.js +102 -0
  89. package/node_modules/fast-glob/out/managers/tasks.d.ts +22 -0
  90. package/node_modules/fast-glob/out/managers/tasks.js +110 -0
  91. package/node_modules/fast-glob/out/providers/async.d.ts +9 -0
  92. package/node_modules/fast-glob/out/providers/async.js +23 -0
  93. package/node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0
  94. package/node_modules/fast-glob/out/providers/filters/deep.js +62 -0
  95. package/node_modules/fast-glob/out/providers/filters/entry.d.ts +17 -0
  96. package/node_modules/fast-glob/out/providers/filters/entry.js +85 -0
  97. package/node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0
  98. package/node_modules/fast-glob/out/providers/filters/error.js +15 -0
  99. package/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0
  100. package/node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0
  101. package/node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0
  102. package/node_modules/fast-glob/out/providers/matchers/partial.js +38 -0
  103. package/node_modules/fast-glob/out/providers/provider.d.ts +19 -0
  104. package/node_modules/fast-glob/out/providers/provider.js +48 -0
  105. package/node_modules/fast-glob/out/providers/stream.d.ts +11 -0
  106. package/node_modules/fast-glob/out/providers/stream.js +31 -0
  107. package/node_modules/fast-glob/out/providers/sync.d.ts +9 -0
  108. package/node_modules/fast-glob/out/providers/sync.js +23 -0
  109. package/node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0
  110. package/node_modules/fast-glob/out/providers/transformers/entry.js +26 -0
  111. package/node_modules/fast-glob/out/readers/async.d.ts +10 -0
  112. package/node_modules/fast-glob/out/readers/async.js +35 -0
  113. package/node_modules/fast-glob/out/readers/reader.d.ts +15 -0
  114. package/node_modules/fast-glob/out/readers/reader.js +33 -0
  115. package/node_modules/fast-glob/out/readers/stream.d.ts +14 -0
  116. package/node_modules/fast-glob/out/readers/stream.js +55 -0
  117. package/node_modules/fast-glob/out/readers/sync.d.ts +12 -0
  118. package/node_modules/fast-glob/out/readers/sync.js +43 -0
  119. package/node_modules/fast-glob/out/settings.d.ts +164 -0
  120. package/node_modules/fast-glob/out/settings.js +59 -0
  121. package/node_modules/fast-glob/out/types/index.d.ts +31 -0
  122. package/node_modules/fast-glob/out/types/index.js +2 -0
  123. package/node_modules/fast-glob/out/utils/array.d.ts +2 -0
  124. package/node_modules/fast-glob/out/utils/array.js +22 -0
  125. package/node_modules/fast-glob/out/utils/errno.d.ts +2 -0
  126. package/node_modules/fast-glob/out/utils/errno.js +7 -0
  127. package/node_modules/fast-glob/out/utils/fs.d.ts +4 -0
  128. package/node_modules/fast-glob/out/utils/fs.js +19 -0
  129. package/node_modules/fast-glob/out/utils/index.d.ts +8 -0
  130. package/node_modules/fast-glob/out/utils/index.js +17 -0
  131. package/node_modules/fast-glob/out/utils/path.d.ts +13 -0
  132. package/node_modules/fast-glob/out/utils/path.js +68 -0
  133. package/node_modules/fast-glob/out/utils/pattern.d.ts +49 -0
  134. package/node_modules/fast-glob/out/utils/pattern.js +206 -0
  135. package/node_modules/fast-glob/out/utils/stream.d.ts +4 -0
  136. package/node_modules/fast-glob/out/utils/stream.js +17 -0
  137. package/node_modules/fast-glob/out/utils/string.d.ts +2 -0
  138. package/node_modules/fast-glob/out/utils/string.js +11 -0
  139. package/node_modules/fast-glob/package.json +81 -0
  140. package/node_modules/fastq/LICENSE +13 -0
  141. package/node_modules/fastq/README.md +310 -0
  142. package/node_modules/fastq/SECURITY.md +15 -0
  143. package/node_modules/fastq/bench.js +66 -0
  144. package/node_modules/fastq/eslint.config.js +11 -0
  145. package/node_modules/fastq/example.js +14 -0
  146. package/node_modules/fastq/example.mjs +9 -0
  147. package/node_modules/fastq/index.d.ts +59 -0
  148. package/node_modules/fastq/package.json +49 -0
  149. package/node_modules/fastq/queue.js +346 -0
  150. package/node_modules/fastq/test/example.ts +83 -0
  151. package/node_modules/fastq/test/promise.js +325 -0
  152. package/node_modules/fastq/test/test.js +733 -0
  153. package/node_modules/fastq/test/tsconfig.json +11 -0
  154. package/node_modules/fill-range/LICENSE +21 -0
  155. package/node_modules/fill-range/README.md +237 -0
  156. package/node_modules/fill-range/index.js +248 -0
  157. package/node_modules/fill-range/package.json +74 -0
  158. package/node_modules/glob-parent/LICENSE +15 -0
  159. package/node_modules/glob-parent/README.md +137 -0
  160. package/node_modules/glob-parent/index.js +42 -0
  161. package/node_modules/glob-parent/package.json +48 -0
  162. package/node_modules/ignore/LICENSE-MIT +21 -0
  163. package/node_modules/ignore/README.md +452 -0
  164. package/node_modules/ignore/index.d.ts +81 -0
  165. package/node_modules/ignore/index.js +784 -0
  166. package/node_modules/ignore/legacy.js +681 -0
  167. package/node_modules/ignore/package.json +87 -0
  168. package/node_modules/is-extglob/LICENSE +21 -0
  169. package/node_modules/is-extglob/README.md +107 -0
  170. package/node_modules/is-extglob/index.js +20 -0
  171. package/node_modules/is-extglob/package.json +69 -0
  172. package/node_modules/is-glob/LICENSE +21 -0
  173. package/node_modules/is-glob/README.md +206 -0
  174. package/node_modules/is-glob/index.js +150 -0
  175. package/node_modules/is-glob/package.json +81 -0
  176. package/node_modules/is-number/LICENSE +21 -0
  177. package/node_modules/is-number/README.md +187 -0
  178. package/node_modules/is-number/index.js +18 -0
  179. package/node_modules/is-number/package.json +82 -0
  180. package/node_modules/merge2/LICENSE +21 -0
  181. package/node_modules/merge2/README.md +144 -0
  182. package/node_modules/merge2/index.js +144 -0
  183. package/node_modules/merge2/package.json +43 -0
  184. package/node_modules/micromatch/LICENSE +21 -0
  185. package/node_modules/micromatch/README.md +1024 -0
  186. package/node_modules/micromatch/index.js +474 -0
  187. package/node_modules/micromatch/package.json +119 -0
  188. package/node_modules/mime-db/HISTORY.md +541 -0
  189. package/node_modules/mime-db/LICENSE +23 -0
  190. package/node_modules/mime-db/README.md +109 -0
  191. package/node_modules/mime-db/db.json +9342 -0
  192. package/node_modules/mime-db/index.js +12 -0
  193. package/node_modules/mime-db/package.json +56 -0
  194. package/node_modules/mime-types/HISTORY.md +421 -0
  195. package/node_modules/mime-types/LICENSE +23 -0
  196. package/node_modules/mime-types/README.md +126 -0
  197. package/node_modules/mime-types/index.js +211 -0
  198. package/node_modules/mime-types/mimeScore.js +52 -0
  199. package/node_modules/mime-types/package.json +45 -0
  200. package/node_modules/picomatch/LICENSE +21 -0
  201. package/node_modules/picomatch/README.md +716 -0
  202. package/node_modules/picomatch/index.js +3 -0
  203. package/node_modules/picomatch/lib/constants.js +184 -0
  204. package/node_modules/picomatch/lib/parse.js +1392 -0
  205. package/node_modules/picomatch/lib/picomatch.js +342 -0
  206. package/node_modules/picomatch/lib/scan.js +391 -0
  207. package/node_modules/picomatch/lib/utils.js +64 -0
  208. package/node_modules/picomatch/package.json +81 -0
  209. package/node_modules/queue-microtask/LICENSE +20 -0
  210. package/node_modules/queue-microtask/README.md +90 -0
  211. package/node_modules/queue-microtask/index.d.ts +2 -0
  212. package/node_modules/queue-microtask/index.js +9 -0
  213. package/node_modules/queue-microtask/package.json +55 -0
  214. package/node_modules/reusify/.github/dependabot.yml +7 -0
  215. package/node_modules/reusify/.github/workflows/ci.yml +96 -0
  216. package/node_modules/reusify/LICENSE +22 -0
  217. package/node_modules/reusify/README.md +139 -0
  218. package/node_modules/reusify/SECURITY.md +15 -0
  219. package/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
  220. package/node_modules/reusify/benchmarks/fib.js +13 -0
  221. package/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
  222. package/node_modules/reusify/eslint.config.js +14 -0
  223. package/node_modules/reusify/package.json +50 -0
  224. package/node_modules/reusify/reusify.d.ts +14 -0
  225. package/node_modules/reusify/reusify.js +33 -0
  226. package/node_modules/reusify/test.js +66 -0
  227. package/node_modules/reusify/tsconfig.json +11 -0
  228. package/node_modules/run-parallel/LICENSE +20 -0
  229. package/node_modules/run-parallel/README.md +85 -0
  230. package/node_modules/run-parallel/index.js +51 -0
  231. package/node_modules/run-parallel/package.json +58 -0
  232. package/node_modules/to-regex-range/LICENSE +21 -0
  233. package/node_modules/to-regex-range/README.md +305 -0
  234. package/node_modules/to-regex-range/index.js +288 -0
  235. package/node_modules/to-regex-range/package.json +88 -0
  236. package/package.json +53 -0
@@ -0,0 +1,408 @@
1
+ type DropthisClientOptions = {
2
+ apiKey?: string;
3
+ baseUrl?: string;
4
+ timeoutMs?: number;
5
+ fetch?: typeof globalThis.fetch;
6
+ };
7
+ type RequestOptions = {
8
+ authenticated?: boolean;
9
+ idempotencyKey?: string;
10
+ ifRevision?: number;
11
+ timeoutMs?: number;
12
+ };
13
+ type DropthisErrorResponse = {
14
+ code: string;
15
+ message: string;
16
+ statusCode: number | null;
17
+ type?: string;
18
+ detail?: unknown;
19
+ param?: string | null;
20
+ currentRevision?: number;
21
+ requestId?: string | null;
22
+ };
23
+ type DropthisResult<T> = {
24
+ data: T;
25
+ error: null;
26
+ headers: Record<string, string>;
27
+ } | {
28
+ data: null;
29
+ error: DropthisErrorResponse;
30
+ headers: Record<string, string>;
31
+ };
32
+ type DropResponse = {
33
+ id: string;
34
+ slug: string;
35
+ url: string;
36
+ canonicalHost: string;
37
+ deploymentId: string | null;
38
+ title: string;
39
+ contentType: string;
40
+ visibility: string;
41
+ status: string;
42
+ revision: number;
43
+ contentRevision: number;
44
+ accessRevision: number;
45
+ sizeBytes: number;
46
+ renderMode: string;
47
+ warnings: Array<Record<string, unknown>>;
48
+ createdAt: string;
49
+ expiresAt: string | null;
50
+ };
51
+ type DropDeploymentResponse = {
52
+ id: string;
53
+ dropId: string;
54
+ revision: number;
55
+ status: string;
56
+ storagePrefix: string;
57
+ entry: string | null;
58
+ contentType: string;
59
+ renderMode: string;
60
+ files: Array<Record<string, unknown>>;
61
+ warnings: Array<Record<string, unknown>>;
62
+ sizeBytes: number;
63
+ classificationVersion: number;
64
+ classificationReason: string;
65
+ errorCode: string | null;
66
+ errorMessage: string | null;
67
+ createdAt: string;
68
+ readyAt: string | null;
69
+ publishedAt: string | null;
70
+ };
71
+ type ListDeploymentsParams = {
72
+ cursor?: string | null;
73
+ limit?: number;
74
+ };
75
+ type ListDeploymentsResponse = {
76
+ deployments: DropDeploymentResponse[];
77
+ nextCursor: string | null;
78
+ };
79
+ type ListPage<T> = {
80
+ object: "list";
81
+ data: T[];
82
+ hasMore: boolean;
83
+ nextCursor: string | null;
84
+ autoPagingToArray(options?: {
85
+ limit?: number;
86
+ }): Promise<T[]>;
87
+ [Symbol.asyncIterator](): AsyncIterableIterator<T>;
88
+ };
89
+ type EmailOtpResponse = {
90
+ ok: true;
91
+ expiresIn: number;
92
+ };
93
+ type SessionResponse = {
94
+ object: "session";
95
+ token: string;
96
+ accountId: string;
97
+ isNewAccount: boolean;
98
+ expiresIn: number;
99
+ };
100
+ type ApiKeyResponse = {
101
+ object: "api_key";
102
+ id: string;
103
+ keyLast4: string;
104
+ label: string;
105
+ createdAt: string;
106
+ };
107
+ type ApiKeyCreatedResponse = ApiKeyResponse & {
108
+ key: string;
109
+ accountId?: string | null;
110
+ isNewAccount?: boolean;
111
+ };
112
+ type AccountResponse = {
113
+ id: string;
114
+ email: string;
115
+ displayName: string | null;
116
+ plan: string;
117
+ status: string;
118
+ createdAt: string;
119
+ };
120
+ type ListDropsParams = {
121
+ cursor?: string | null;
122
+ limit?: number;
123
+ };
124
+ type UploadManifestFile = {
125
+ path: string;
126
+ contentType: string;
127
+ sizeBytes: number;
128
+ checksumSha256?: string | null;
129
+ };
130
+ type CreateUploadSessionRequest = {
131
+ schemaVersion?: 1;
132
+ files: UploadManifestFile[];
133
+ entry?: string | null;
134
+ };
135
+ type UploadTarget = {
136
+ strategy: "single_put" | "multipart";
137
+ url: string;
138
+ headers: Record<string, string>;
139
+ expiresAt: string;
140
+ partSize?: number;
141
+ partCount?: number;
142
+ };
143
+ type CreateUploadSessionFileResponse = {
144
+ fileId: string;
145
+ path: string;
146
+ objectKey: string;
147
+ upload: UploadTarget;
148
+ };
149
+ type UploadSessionFileResponse = {
150
+ fileId: string;
151
+ path: string;
152
+ contentType: string;
153
+ sizeBytes: number;
154
+ objectKey: string;
155
+ verified: boolean;
156
+ };
157
+ type UploadSessionResponse = {
158
+ uploadId: string;
159
+ status: string;
160
+ expiresAt: string;
161
+ entry?: string | null;
162
+ files: UploadSessionFileResponse[];
163
+ };
164
+ type CreateUploadSessionResponse = {
165
+ uploadId: string;
166
+ expiresAt: string;
167
+ files: CreateUploadSessionFileResponse[];
168
+ };
169
+ type CreateUploadPartTargetsRequest = {
170
+ fileId: string;
171
+ partNumbers: number[];
172
+ };
173
+ type UploadPartTarget = {
174
+ partNumber: number;
175
+ url: string;
176
+ headers: Record<string, string>;
177
+ expiresAt: string;
178
+ };
179
+ type CreateUploadPartTargetsResponse = {
180
+ fileId: string;
181
+ urlExpiresAt?: string | null;
182
+ parts: UploadPartTarget[];
183
+ };
184
+ type CompleteUploadSessionRequest = {
185
+ files?: Record<string, {
186
+ parts?: Array<{
187
+ partNumber: number;
188
+ etag: string;
189
+ }> | null;
190
+ }>;
191
+ };
192
+ declare class CursorPage<T> implements ListPage<T> {
193
+ readonly object: "list";
194
+ readonly data: T[];
195
+ readonly hasMore: boolean;
196
+ readonly nextCursor: string | null;
197
+ private readonly fetchNextPage;
198
+ constructor(input: {
199
+ data: T[];
200
+ hasMore: boolean;
201
+ nextCursor: string | null;
202
+ fetchNextPage?: (() => Promise<DropthisResult<CursorPage<T>>>) | undefined;
203
+ });
204
+ autoPagingToArray(options?: {
205
+ limit?: number;
206
+ }): Promise<T[]>;
207
+ [Symbol.asyncIterator](): AsyncIterableIterator<T>;
208
+ }
209
+ type PublishOptions = {
210
+ slug?: string;
211
+ title?: string;
212
+ visibility?: "public" | "unlisted";
213
+ password?: string | null;
214
+ noindex?: boolean | null;
215
+ expiresAt?: string | Date | null;
216
+ entry?: string;
217
+ metadata?: Record<string, unknown>;
218
+ idempotencyKey?: string;
219
+ ifRevision?: number;
220
+ ignore?: string[];
221
+ ignoreDefaults?: boolean;
222
+ contentType?: string;
223
+ path?: string;
224
+ };
225
+ type ExplicitPublishInput = {
226
+ content: string;
227
+ contentType?: string;
228
+ title?: string;
229
+ visibility?: "public" | "unlisted";
230
+ metadata?: Record<string, unknown>;
231
+ entry?: string;
232
+ } | {
233
+ files: Array<{
234
+ path: string;
235
+ content?: string;
236
+ contentBase64?: string;
237
+ bytes?: Uint8Array;
238
+ contentType: string;
239
+ }>;
240
+ title?: string;
241
+ visibility?: "public" | "unlisted";
242
+ metadata?: Record<string, unknown>;
243
+ entry?: string;
244
+ };
245
+ type PublishInput = string | Uint8Array | ExplicitPublishInput;
246
+
247
+ type PreparedUploadFile = {
248
+ path: string;
249
+ contentType: string;
250
+ sizeBytes: number;
251
+ checksumSha256?: string;
252
+ source: {
253
+ kind: "path";
254
+ path: string;
255
+ } | {
256
+ kind: "bytes";
257
+ bytes: Uint8Array;
258
+ };
259
+ };
260
+ type PreparedPublishRequest = {
261
+ kind: "staged";
262
+ manifest: CreateUploadSessionRequest;
263
+ files: PreparedUploadFile[];
264
+ options: Record<string, unknown>;
265
+ metadata?: Record<string, unknown>;
266
+ };
267
+
268
+ declare class Transport {
269
+ readonly apiKey: string | undefined;
270
+ readonly baseUrl: string;
271
+ readonly timeoutMs: number;
272
+ readonly fetchImpl: typeof globalThis.fetch;
273
+ constructor(options?: DropthisClientOptions | string);
274
+ multipart<T>(method: string, path: string, form: FormData, options?: RequestOptions): Promise<DropthisResult<T>>;
275
+ putSignedUrl(url: string, body: Uint8Array | Blob | ReadableStream, headers: Record<string, string>): Promise<DropthisResult<{
276
+ etag: string | null;
277
+ }>>;
278
+ request<T>(method: string, path: string, options?: RequestOptions & {
279
+ body?: unknown;
280
+ params?: Record<string, string | number | boolean | null | undefined>;
281
+ }): Promise<DropthisResult<T>>;
282
+ }
283
+
284
+ declare class AccountResource {
285
+ private readonly transport;
286
+ constructor(transport: Transport);
287
+ get(): Promise<DropthisResult<AccountResponse>>;
288
+ update(input: {
289
+ displayName: string | null;
290
+ }): Promise<DropthisResult<AccountResponse>>;
291
+ delete(): Promise<DropthisResult<null>>;
292
+ }
293
+
294
+ declare class ApiKeysResource {
295
+ private readonly transport;
296
+ constructor(transport: Transport);
297
+ list(): Promise<DropthisResult<{
298
+ object: "list";
299
+ data: ApiKeyResponse[];
300
+ }>>;
301
+ create(input: {
302
+ label: string;
303
+ }): Promise<DropthisResult<ApiKeyCreatedResponse>>;
304
+ delete(keyId: string): Promise<DropthisResult<{
305
+ ok: true;
306
+ }>>;
307
+ }
308
+
309
+ declare class AuthResource {
310
+ private readonly transport;
311
+ constructor(transport: Transport);
312
+ requestEmailOtp(input: {
313
+ email: string;
314
+ }): Promise<DropthisResult<EmailOtpResponse>>;
315
+ verifyEmailOtp(input: {
316
+ email: string;
317
+ code: string;
318
+ }): Promise<DropthisResult<SessionResponse>>;
319
+ logout(): Promise<DropthisResult<{
320
+ ok: true;
321
+ }>>;
322
+ }
323
+
324
+ declare class DeploymentsResource {
325
+ private readonly transport;
326
+ constructor(transport: Transport);
327
+ create(dropId: string, body: Record<string, unknown>, options?: {
328
+ idempotencyKey?: string;
329
+ ifRevision?: number;
330
+ }): Promise<DropthisResult<DropResponse>>;
331
+ createRaw(dropId: string, body: unknown, options?: {
332
+ idempotencyKey?: string;
333
+ ifRevision?: number;
334
+ }): Promise<DropthisResult<DropResponse>>;
335
+ list(dropId: string, params?: ListDeploymentsParams): Promise<DropthisResult<ListDeploymentsResponse>>;
336
+ get(dropId: string, deploymentId: string): Promise<DropthisResult<DropDeploymentResponse>>;
337
+ }
338
+
339
+ declare class DropsResource {
340
+ private readonly transport;
341
+ constructor(transport: Transport);
342
+ create(body: unknown, options?: {
343
+ idempotencyKey?: string;
344
+ }): Promise<DropthisResult<DropResponse>>;
345
+ createRaw(body: unknown, options?: {
346
+ idempotencyKey?: string;
347
+ }): Promise<DropthisResult<DropResponse>>;
348
+ list(params?: ListDropsParams): Promise<DropthisResult<CursorPage<DropResponse>>>;
349
+ get(dropId: string): Promise<DropthisResult<DropResponse>>;
350
+ update(dropId: string, body: PublishOptions | Record<string, unknown>, options?: {
351
+ idempotencyKey?: string;
352
+ ifRevision?: number;
353
+ }): Promise<DropthisResult<DropResponse>>;
354
+ delete(dropId: string): Promise<DropthisResult<null>>;
355
+ }
356
+
357
+ declare class UploadsResource {
358
+ private readonly transport;
359
+ constructor(transport: Transport);
360
+ create(body: CreateUploadSessionRequest, options?: {
361
+ idempotencyKey?: string;
362
+ }): Promise<DropthisResult<CreateUploadSessionResponse>>;
363
+ get(uploadId: string): Promise<DropthisResult<UploadSessionResponse>>;
364
+ createPartTargets(uploadId: string, body: CreateUploadPartTargetsRequest): Promise<DropthisResult<CreateUploadPartTargetsResponse>>;
365
+ complete(uploadId: string, body: CompleteUploadSessionRequest, options?: {
366
+ idempotencyKey?: string;
367
+ }): Promise<DropthisResult<UploadSessionResponse>>;
368
+ cancel(uploadId: string): Promise<DropthisResult<null>>;
369
+ }
370
+
371
+ declare class Dropthis {
372
+ private readonly transport;
373
+ private authResource?;
374
+ private apiKeysResource?;
375
+ private accountResource?;
376
+ private dropsResource?;
377
+ private deploymentsResource?;
378
+ private uploadsResource?;
379
+ constructor(options?: DropthisClientOptions | string);
380
+ get auth(): AuthResource;
381
+ get apiKeys(): ApiKeysResource;
382
+ get account(): AccountResource;
383
+ get drops(): DropsResource;
384
+ get deployments(): DeploymentsResource;
385
+ get uploads(): UploadsResource;
386
+ prepare(input: PublishInput, options?: PublishOptions): Promise<PreparedPublishRequest>;
387
+ publish(input: PublishInput, options?: PublishOptions): Promise<DropthisResult<DropResponse>>;
388
+ update(dropId: string, inputOrOptions?: PublishInput | PublishOptions, options?: PublishOptions): Promise<DropthisResult<DropResponse>>;
389
+ request<T>(method: string, path: string, options?: RequestOptions & {
390
+ body?: unknown;
391
+ params?: Record<string, string | number | boolean | null | undefined>;
392
+ }): Promise<DropthisResult<T>>;
393
+ requestSignedUpload(url: string, bytes: Uint8Array | Blob | ReadableStream, headers: Record<string, string>): Promise<DropthisResult<{
394
+ etag: string | null;
395
+ }>>;
396
+ }
397
+
398
+ declare function redactSecrets(message: string): string;
399
+ declare function createErrorResult<T>(code: string, message: string, statusCode: number | null, extra?: {
400
+ type?: string;
401
+ detail?: unknown;
402
+ param?: string | null;
403
+ currentRevision?: number;
404
+ requestId?: string | null;
405
+ headers?: Record<string, string>;
406
+ }): DropthisResult<T>;
407
+
408
+ export { type CompleteUploadSessionRequest, type CreateUploadPartTargetsRequest, type CreateUploadPartTargetsResponse, type CreateUploadSessionRequest, type CreateUploadSessionResponse, DeploymentsResource, type DropDeploymentResponse, type DropResponse, Dropthis, type DropthisClientOptions, type DropthisErrorResponse, type DropthisResult, type ListDeploymentsParams, type ListDeploymentsResponse, type ListPage, type PreparedPublishRequest, type PreparedUploadFile, type RequestOptions, type UploadManifestFile, type UploadPartTarget, type UploadSessionFileResponse, type UploadSessionResponse, type UploadTarget, UploadsResource, createErrorResult, redactSecrets };