@superdurable/connector-dropbox 0.2.0 → 0.3.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.
- package/README.md +4 -2
- package/dex-connector.json +265 -2
- package/dist/{chunk-SWXGPJ62.js → chunk-RMQLFGNQ.js} +422 -21
- package/dist/{connection-CufXPwNo.d.ts → connection-Csm3tCeA.d.ts} +100 -1
- package/dist/index.d.ts +272 -7
- package/dist/index.js +493 -21
- package/dist/mock.d.ts +91 -2
- package/dist/mock.js +85 -1
- package/package.json +2 -2
|
@@ -36,6 +36,12 @@ interface Credentials {
|
|
|
36
36
|
/** Secret refresh token returned because offline access is requested. Dex stores it for automatic renewal; blank means reauthorization is required after access-token expiry. */
|
|
37
37
|
refreshToken: SecretString;
|
|
38
38
|
}
|
|
39
|
+
/** Stored credential material that fails the connector credential checks, so no retry can succeed. */
|
|
40
|
+
declare class CredentialMaterialError extends TypeError {
|
|
41
|
+
constructor(message: string);
|
|
42
|
+
}
|
|
43
|
+
/** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
|
|
44
|
+
declare function isCredentialMaterialError(error: unknown): boolean;
|
|
39
45
|
/** Decode private credential fields for the connector. */
|
|
40
46
|
declare function decodeCredentials(value: unknown): Credentials;
|
|
41
47
|
/** Decode shared credential fields for the connector. */
|
|
@@ -105,6 +111,51 @@ interface UploadedFile {
|
|
|
105
111
|
/** File is the stored Dropbox file identity. */
|
|
106
112
|
"file": EntryMetadata;
|
|
107
113
|
}
|
|
114
|
+
/** SearchFilesInput selects one bounded search page by name. */
|
|
115
|
+
interface SearchFilesInput {
|
|
116
|
+
/** Query is a nonempty name fragment, up to 1000 characters. */
|
|
117
|
+
"query": string;
|
|
118
|
+
/** Path limits the search to one folder; blank searches the connected root. */
|
|
119
|
+
"path"?: string | undefined;
|
|
120
|
+
/** MaxResults is the requested page size, from 1 to 1000; zero selects 20. */
|
|
121
|
+
"maxResults"?: number | undefined;
|
|
122
|
+
}
|
|
123
|
+
/** SearchFilesPage contains one page of matching file and folder identities. */
|
|
124
|
+
interface SearchFilesPage {
|
|
125
|
+
/** Entries contains the file and folder matches. */
|
|
126
|
+
"entries": Array<EntryMetadata> | null;
|
|
127
|
+
/** Cursor continues the search when HasMore is true. */
|
|
128
|
+
"cursor"?: string | undefined;
|
|
129
|
+
/** HasMore reports whether another page is available. */
|
|
130
|
+
"hasMore": boolean;
|
|
131
|
+
}
|
|
132
|
+
/** EnsureFolderInput selects an absolute folder path to create if absent. */
|
|
133
|
+
interface EnsureFolderInput {
|
|
134
|
+
/** Path is the absolute Dropbox folder path. */
|
|
135
|
+
"path": string;
|
|
136
|
+
}
|
|
137
|
+
/** EnsuredFolder confirms that the selected folder exists. */
|
|
138
|
+
interface EnsuredFolder {
|
|
139
|
+
/** Path is the absolute folder path. */
|
|
140
|
+
"path": string;
|
|
141
|
+
}
|
|
142
|
+
/** DeletePathInput selects a file or folder to delete if present. */
|
|
143
|
+
interface DeletePathInput {
|
|
144
|
+
/** Path is an absolute Dropbox path or stable file or folder ID. */
|
|
145
|
+
"path": string;
|
|
146
|
+
}
|
|
147
|
+
/** DeletedPath confirms that the selected path is absent. */
|
|
148
|
+
interface DeletedPath {
|
|
149
|
+
/** Path is the requested file or folder path or ID. */
|
|
150
|
+
"path": string;
|
|
151
|
+
}
|
|
152
|
+
/** TransferPathInput identifies a source file or folder and a fixed destination path. */
|
|
153
|
+
interface TransferPathInput {
|
|
154
|
+
/** FromPath is an absolute Dropbox path or stable file or folder ID. */
|
|
155
|
+
"fromPath": string;
|
|
156
|
+
/** ToPath is an absolute destination path; autorename is disabled. */
|
|
157
|
+
"toPath": string;
|
|
158
|
+
}
|
|
108
159
|
/** Runtime validator for ListFolderInput. */
|
|
109
160
|
declare const ListFolderInputSchema: z.ZodObject<{
|
|
110
161
|
path: z.ZodOptional<z.ZodString>;
|
|
@@ -165,6 +216,44 @@ declare const UploadedFileSchema: z.ZodObject<{
|
|
|
165
216
|
kind: z.ZodString;
|
|
166
217
|
}, z.core.$strict>;
|
|
167
218
|
}, z.core.$strict>;
|
|
219
|
+
/** Runtime validator for SearchFilesInput. */
|
|
220
|
+
declare const SearchFilesInputSchema: z.ZodObject<{
|
|
221
|
+
query: z.ZodString;
|
|
222
|
+
path: z.ZodOptional<z.ZodString>;
|
|
223
|
+
maxResults: z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
}, z.core.$strict>;
|
|
225
|
+
/** Runtime validator for SearchFilesPage. */
|
|
226
|
+
declare const SearchFilesPageSchema: z.ZodObject<{
|
|
227
|
+
entries: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
name: z.ZodString;
|
|
230
|
+
pathDisplay: z.ZodString;
|
|
231
|
+
kind: z.ZodString;
|
|
232
|
+
}, z.core.$strict>>>;
|
|
233
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
234
|
+
hasMore: z.ZodBoolean;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
/** Runtime validator for EnsureFolderInput. */
|
|
237
|
+
declare const EnsureFolderInputSchema: z.ZodObject<{
|
|
238
|
+
path: z.ZodString;
|
|
239
|
+
}, z.core.$strict>;
|
|
240
|
+
/** Runtime validator for EnsuredFolder. */
|
|
241
|
+
declare const EnsuredFolderSchema: z.ZodObject<{
|
|
242
|
+
path: z.ZodString;
|
|
243
|
+
}, z.core.$strict>;
|
|
244
|
+
/** Runtime validator for DeletePathInput. */
|
|
245
|
+
declare const DeletePathInputSchema: z.ZodObject<{
|
|
246
|
+
path: z.ZodString;
|
|
247
|
+
}, z.core.$strict>;
|
|
248
|
+
/** Runtime validator for DeletedPath. */
|
|
249
|
+
declare const DeletedPathSchema: z.ZodObject<{
|
|
250
|
+
path: z.ZodString;
|
|
251
|
+
}, z.core.$strict>;
|
|
252
|
+
/** Runtime validator for TransferPathInput. */
|
|
253
|
+
declare const TransferPathInputSchema: z.ZodObject<{
|
|
254
|
+
fromPath: z.ZodString;
|
|
255
|
+
toPath: z.ZodString;
|
|
256
|
+
}, z.core.$strict>;
|
|
168
257
|
|
|
169
258
|
/** Typed operations supplied by a client or mock. */
|
|
170
259
|
interface Operations {
|
|
@@ -178,6 +267,16 @@ interface Operations {
|
|
|
178
267
|
downloadFile(): Query<DownloadFileInput, DownloadedFile>;
|
|
179
268
|
/** Invoke uploadFile through this connection. */
|
|
180
269
|
uploadFile(): Mutation<UploadFileInput, UploadedFile>;
|
|
270
|
+
/** Invoke searchFiles through this connection. */
|
|
271
|
+
searchFiles(): Query<SearchFilesInput, SearchFilesPage>;
|
|
272
|
+
/** Invoke ensureFolder through this connection. */
|
|
273
|
+
ensureFolder(): Mutation<EnsureFolderInput, EnsuredFolder>;
|
|
274
|
+
/** Invoke deletePath through this connection. */
|
|
275
|
+
deletePath(): Mutation<DeletePathInput, DeletedPath>;
|
|
276
|
+
/** Invoke copyPath through this connection. */
|
|
277
|
+
copyPath(): Mutation<TransferPathInput, EntryMetadata>;
|
|
278
|
+
/** Invoke movePath through this connection. */
|
|
279
|
+
movePath(): Mutation<TransferPathInput, EntryMetadata>;
|
|
181
280
|
}
|
|
182
281
|
/** Named connector connection kept outside Flow state. */
|
|
183
282
|
declare class Connection<BoundOperations = Operations> {
|
|
@@ -193,4 +292,4 @@ declare function newConnection(client: Operations, reference: ConnectionRef): Co
|
|
|
193
292
|
/** Bind scripted operations to a named connection. */
|
|
194
293
|
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
195
294
|
|
|
196
|
-
export { type ContinueFolderInput as C, type DownloadFileInput as D, type EntryMetadata as E, type FolderPage as F, type GetMetadataInput as G, type ListFolderInput as L, type Operations as O, type UploadFileInput as U, type DownloadedFile as a, type UploadedFile as b, type
|
|
295
|
+
export { TransferPathInputSchema as A, UploadFileInputSchema as B, type ContinueFolderInput as C, type DownloadFileInput as D, type EntryMetadata as E, type FolderPage as F, type GetMetadataInput as G, UploadedFileSchema as H, decodeCredentials as I, decodeSharedCredentials as J, isCredentialMaterialError as K, type ListFolderInput as L, newConnection as M, newConnectionWithOperations as N, type Operations as O, type SearchFilesInput as S, type TransferPathInput as T, type UploadFileInput as U, type DownloadedFile as a, type UploadedFile as b, type SearchFilesPage as c, type EnsureFolderInput as d, type EnsuredFolder as e, type DeletePathInput as f, type DeletedPath as g, type Config as h, type Credentials as i, Connection as j, ConfigSchema as k, ContinueFolderInputSchema as l, CredentialMaterialError as m, type CredentialSource as n, DeletePathInputSchema as o, DeletedPathSchema as p, DownloadFileInputSchema as q, DownloadedFileSchema as r, EnsureFolderInputSchema as s, EnsuredFolderSchema as t, EntryMetadataSchema as u, FolderPageSchema as v, GetMetadataInputSchema as w, ListFolderInputSchema as x, SearchFilesInputSchema as y, SearchFilesPageSchema as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ContinueFolderInput, F as FolderPage, L as ListFolderInput, G as GetMetadataInput, E as EntryMetadata, D as DownloadFileInput, a as DownloadedFile, U as UploadFileInput, b as UploadedFile, c as
|
|
2
|
-
export {
|
|
1
|
+
import { C as ContinueFolderInput, F as FolderPage, L as ListFolderInput, G as GetMetadataInput, E as EntryMetadata, D as DownloadFileInput, a as DownloadedFile, U as UploadFileInput, b as UploadedFile, S as SearchFilesInput, c as SearchFilesPage, d as EnsureFolderInput, e as EnsuredFolder, f as DeletePathInput, g as DeletedPath, T as TransferPathInput, h as Config, i as Credentials, j as Connection, O as Operations } from './connection-Csm3tCeA.js';
|
|
2
|
+
export { k as ConfigSchema, l as ContinueFolderInputSchema, m as CredentialMaterialError, n as CredentialSource, o as DeletePathInputSchema, p as DeletedPathSchema, q as DownloadFileInputSchema, r as DownloadedFileSchema, s as EnsureFolderInputSchema, t as EnsuredFolderSchema, u as EntryMetadataSchema, v as FolderPageSchema, w as GetMetadataInputSchema, x as ListFolderInputSchema, y as SearchFilesInputSchema, z as SearchFilesPageSchema, A as TransferPathInputSchema, B as UploadFileInputSchema, H as UploadedFileSchema, I as decodeCredentials, J as decodeSharedCredentials, K as isCredentialMaterialError, M as newConnection, N as newConnectionWithOperations } from './connection-Csm3tCeA.js';
|
|
3
3
|
import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
|
|
4
4
|
import { QueryDefinition, MutationDefinition, Query, Call, QueryAttempt, Mutation, MutationAttempt, CredentialProvider, CredentialRefreshDriver, QueryStepConfig, QueryResult, MutationStepConfig, MutationResult, QueryStep, MutationStep } from '@superdurable/connectors-sdk';
|
|
5
5
|
import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
|
|
@@ -129,7 +129,7 @@ declare const UploadFileBranch: {
|
|
|
129
129
|
declare const UploadFileBranchUploaded: "uploaded";
|
|
130
130
|
/** Dropbox conclusively rejected the upload. */
|
|
131
131
|
declare const UploadFileBranchProviderRejected: "providerRejected";
|
|
132
|
-
/**
|
|
132
|
+
/** Retained for compatibility and no longer selected: malformed or oversized upload metadata now retries the overwrite. */
|
|
133
133
|
declare const UploadFileBranchInvalidResponse: "invalidResponse";
|
|
134
134
|
/** Local input or connection credentials are invalid. */
|
|
135
135
|
declare const UploadFileBranchDefect: "defect";
|
|
@@ -141,6 +141,121 @@ declare const UploadFileMetadata: {
|
|
|
141
141
|
readonly idempotency: "required";
|
|
142
142
|
readonly authorization: "required";
|
|
143
143
|
};
|
|
144
|
+
/** Branch IDs for searchFiles. */
|
|
145
|
+
declare const SearchFilesBranch: {
|
|
146
|
+
readonly Found: "found";
|
|
147
|
+
readonly ProviderRejected: "providerRejected";
|
|
148
|
+
readonly InvalidResponse: "invalidResponse";
|
|
149
|
+
readonly Defect: "defect";
|
|
150
|
+
};
|
|
151
|
+
/** Dropbox returned a search page. */
|
|
152
|
+
declare const SearchFilesBranchFound: "found";
|
|
153
|
+
/** Dropbox conclusively rejected the search. */
|
|
154
|
+
declare const SearchFilesBranchProviderRejected: "providerRejected";
|
|
155
|
+
/** Dropbox returned malformed or oversized search results. */
|
|
156
|
+
declare const SearchFilesBranchInvalidResponse: "invalidResponse";
|
|
157
|
+
/** Local input or connection credentials are invalid. */
|
|
158
|
+
declare const SearchFilesBranchDefect: "defect";
|
|
159
|
+
/** Manifest definition for searchFiles. */
|
|
160
|
+
declare const SearchFilesDefinition: QueryDefinition;
|
|
161
|
+
/** Manifest metadata for searchFiles. */
|
|
162
|
+
declare const SearchFilesMetadata: {
|
|
163
|
+
readonly kind: "query";
|
|
164
|
+
readonly idempotency: "none";
|
|
165
|
+
readonly authorization: "required";
|
|
166
|
+
};
|
|
167
|
+
/** Branch IDs for ensureFolder. */
|
|
168
|
+
declare const EnsureFolderBranch: {
|
|
169
|
+
readonly Ensured: "ensured";
|
|
170
|
+
readonly ProviderRejected: "providerRejected";
|
|
171
|
+
readonly InvalidResponse: "invalidResponse";
|
|
172
|
+
readonly Defect: "defect";
|
|
173
|
+
};
|
|
174
|
+
/** Dropbox created the folder or confirmed it already exists. */
|
|
175
|
+
declare const EnsureFolderBranchEnsured: "ensured";
|
|
176
|
+
/** Dropbox conclusively rejected the folder request. */
|
|
177
|
+
declare const EnsureFolderBranchProviderRejected: "providerRejected";
|
|
178
|
+
/** Dropbox returned malformed or oversized folder metadata. */
|
|
179
|
+
declare const EnsureFolderBranchInvalidResponse: "invalidResponse";
|
|
180
|
+
/** Local input or connection credentials are invalid. */
|
|
181
|
+
declare const EnsureFolderBranchDefect: "defect";
|
|
182
|
+
/** Manifest definition for ensureFolder. */
|
|
183
|
+
declare const EnsureFolderDefinition: MutationDefinition;
|
|
184
|
+
/** Manifest metadata for ensureFolder. */
|
|
185
|
+
declare const EnsureFolderMetadata: {
|
|
186
|
+
readonly kind: "mutation";
|
|
187
|
+
readonly idempotency: "required";
|
|
188
|
+
readonly authorization: "required";
|
|
189
|
+
};
|
|
190
|
+
/** Branch IDs for deletePath. */
|
|
191
|
+
declare const DeletePathBranch: {
|
|
192
|
+
readonly Deleted: "deleted";
|
|
193
|
+
readonly ProviderRejected: "providerRejected";
|
|
194
|
+
readonly InvalidResponse: "invalidResponse";
|
|
195
|
+
readonly Defect: "defect";
|
|
196
|
+
};
|
|
197
|
+
/** Dropbox deleted the path or confirmed it was already absent. */
|
|
198
|
+
declare const DeletePathBranchDeleted: "deleted";
|
|
199
|
+
/** Dropbox conclusively rejected the deletion. */
|
|
200
|
+
declare const DeletePathBranchProviderRejected: "providerRejected";
|
|
201
|
+
/** Dropbox returned malformed or oversized deletion metadata. */
|
|
202
|
+
declare const DeletePathBranchInvalidResponse: "invalidResponse";
|
|
203
|
+
/** Local input or connection credentials are invalid. */
|
|
204
|
+
declare const DeletePathBranchDefect: "defect";
|
|
205
|
+
/** Manifest definition for deletePath. */
|
|
206
|
+
declare const DeletePathDefinition: MutationDefinition;
|
|
207
|
+
/** Manifest metadata for deletePath. */
|
|
208
|
+
declare const DeletePathMetadata: {
|
|
209
|
+
readonly kind: "mutation";
|
|
210
|
+
readonly idempotency: "required";
|
|
211
|
+
readonly authorization: "required";
|
|
212
|
+
};
|
|
213
|
+
/** Branch IDs for copyPath. */
|
|
214
|
+
declare const CopyPathBranch: {
|
|
215
|
+
readonly Copied: "copied";
|
|
216
|
+
readonly ProviderRejected: "providerRejected";
|
|
217
|
+
readonly Uncertain: "uncertain";
|
|
218
|
+
readonly Defect: "defect";
|
|
219
|
+
};
|
|
220
|
+
/** Dropbox confirmed the destination entry. */
|
|
221
|
+
declare const CopyPathBranchCopied: "copied";
|
|
222
|
+
/** Dropbox conclusively rejected the copy. */
|
|
223
|
+
declare const CopyPathBranchProviderRejected: "providerRejected";
|
|
224
|
+
/** A copy may have completed but its destination cannot be attributed to this call. */
|
|
225
|
+
declare const CopyPathBranchUncertain: "uncertain";
|
|
226
|
+
/** Local paths, credentials, or dispatch checkpoint are invalid. */
|
|
227
|
+
declare const CopyPathBranchDefect: "defect";
|
|
228
|
+
/** Manifest definition for copyPath. */
|
|
229
|
+
declare const CopyPathDefinition: MutationDefinition;
|
|
230
|
+
/** Manifest metadata for copyPath. */
|
|
231
|
+
declare const CopyPathMetadata: {
|
|
232
|
+
readonly kind: "mutation";
|
|
233
|
+
readonly idempotency: "required";
|
|
234
|
+
readonly authorization: "required";
|
|
235
|
+
};
|
|
236
|
+
/** Branch IDs for movePath. */
|
|
237
|
+
declare const MovePathBranch: {
|
|
238
|
+
readonly Moved: "moved";
|
|
239
|
+
readonly ProviderRejected: "providerRejected";
|
|
240
|
+
readonly Uncertain: "uncertain";
|
|
241
|
+
readonly Defect: "defect";
|
|
242
|
+
};
|
|
243
|
+
/** Dropbox confirmed the destination entry. */
|
|
244
|
+
declare const MovePathBranchMoved: "moved";
|
|
245
|
+
/** Dropbox conclusively rejected the move. */
|
|
246
|
+
declare const MovePathBranchProviderRejected: "providerRejected";
|
|
247
|
+
/** A move may have completed but its destination cannot be attributed to this call. */
|
|
248
|
+
declare const MovePathBranchUncertain: "uncertain";
|
|
249
|
+
/** Local paths, credentials, or dispatch checkpoint are invalid. */
|
|
250
|
+
declare const MovePathBranchDefect: "defect";
|
|
251
|
+
/** Manifest definition for movePath. */
|
|
252
|
+
declare const MovePathDefinition: MutationDefinition;
|
|
253
|
+
/** Manifest metadata for movePath. */
|
|
254
|
+
declare const MovePathMetadata: {
|
|
255
|
+
readonly kind: "mutation";
|
|
256
|
+
readonly idempotency: "required";
|
|
257
|
+
readonly authorization: "required";
|
|
258
|
+
};
|
|
144
259
|
|
|
145
260
|
/** One bounded Dropbox folder-page Query. */
|
|
146
261
|
declare class ListFolderOperation implements Query<ListFolderInput, FolderPage> {
|
|
@@ -178,11 +293,55 @@ declare class DownloadFileOperation implements Query<DownloadFileInput, Download
|
|
|
178
293
|
declare class UploadFileOperation implements Mutation<UploadFileInput, UploadedFile> {
|
|
179
294
|
private readonly client;
|
|
180
295
|
/** Bind the provider client. */ constructor(client: DropboxClient);
|
|
181
|
-
/** Return stable manifest metadata. */ definition():
|
|
296
|
+
/** Return stable manifest metadata. */ definition(): MutationDefinition;
|
|
182
297
|
/** Record stable call identity; Dropbox uses absolute overwrite rather than a request key. */ idempotencyKey(callID: string, input: UploadFileInput): string;
|
|
183
298
|
/** Overwrite the same path with the same bytes on every retry. */
|
|
184
299
|
invoke(call: Call, input: UploadFileInput): Promise<MutationAttempt<UploadedFile>>;
|
|
185
300
|
}
|
|
301
|
+
/** Read a bounded page of matches for one file or folder name fragment. */
|
|
302
|
+
declare class SearchFilesOperation implements Query<SearchFilesInput, SearchFilesPage> {
|
|
303
|
+
private readonly client;
|
|
304
|
+
/** Bind the Dropbox client. */ constructor(client: DropboxClient);
|
|
305
|
+
/** Return the generated search contract. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
|
|
306
|
+
/** Search once with a validated path and page size. */
|
|
307
|
+
invoke(call: Call, input: SearchFilesInput): Promise<QueryAttempt<SearchFilesPage>>;
|
|
308
|
+
}
|
|
309
|
+
/** Create one absolute folder path if it is absent. */
|
|
310
|
+
declare class EnsureFolderOperation implements Mutation<EnsureFolderInput, EnsuredFolder> {
|
|
311
|
+
private readonly client;
|
|
312
|
+
/** Bind the Dropbox client. */ constructor(client: DropboxClient);
|
|
313
|
+
/** Return the generated folder contract. */ definition(): MutationDefinition;
|
|
314
|
+
/** Use the stable call ID for the receipt. */ idempotencyKey(callId: string): string;
|
|
315
|
+
/** Ensure the folder without autorenaming. */
|
|
316
|
+
invoke(call: Call, input: EnsureFolderInput): Promise<MutationAttempt<EnsuredFolder>>;
|
|
317
|
+
}
|
|
318
|
+
/** Delete one file or folder, accepting a provider-confirmed absence. */
|
|
319
|
+
declare class DeletePathOperation implements Mutation<DeletePathInput, DeletedPath> {
|
|
320
|
+
private readonly client;
|
|
321
|
+
/** Bind the Dropbox client. */ constructor(client: DropboxClient);
|
|
322
|
+
/** Return the generated deletion contract. */ definition(): MutationDefinition;
|
|
323
|
+
/** Use the stable call ID for the receipt. */ idempotencyKey(callId: string): string;
|
|
324
|
+
/** Delete the selected path or ID. */
|
|
325
|
+
invoke(call: Call, input: DeletePathInput): Promise<MutationAttempt<DeletedPath>>;
|
|
326
|
+
}
|
|
327
|
+
/** Copy to a fixed destination, checking it before a permitted resend. */
|
|
328
|
+
declare class CopyPathOperation implements Mutation<TransferPathInput, EntryMetadata> {
|
|
329
|
+
private readonly client;
|
|
330
|
+
/** Bind the Dropbox client. */ constructor(client: DropboxClient);
|
|
331
|
+
/** Return the generated copy contract. */ definition(): MutationDefinition;
|
|
332
|
+
/** Use the stable call ID for dispatch and receipts. */ idempotencyKey(callId: string): string;
|
|
333
|
+
/** Copy without autorenaming the destination. */
|
|
334
|
+
invoke(call: Call, input: TransferPathInput): Promise<MutationAttempt<EntryMetadata>>;
|
|
335
|
+
}
|
|
336
|
+
/** Move to a fixed destination, checking it before a permitted resend. */
|
|
337
|
+
declare class MovePathOperation implements Mutation<TransferPathInput, EntryMetadata> {
|
|
338
|
+
private readonly client;
|
|
339
|
+
/** Bind the Dropbox client. */ constructor(client: DropboxClient);
|
|
340
|
+
/** Return the generated move contract. */ definition(): MutationDefinition;
|
|
341
|
+
/** Use the stable call ID for dispatch and receipts. */ idempotencyKey(callId: string): string;
|
|
342
|
+
/** Move or rename without autorenaming the destination. */
|
|
343
|
+
invoke(call: Call, input: TransferPathInput): Promise<MutationAttempt<EntryMetadata>>;
|
|
344
|
+
}
|
|
186
345
|
|
|
187
346
|
/** One response or sanitized credential and transport failure. */
|
|
188
347
|
interface DropboxExchange {
|
|
@@ -217,8 +376,13 @@ declare class DropboxClient {
|
|
|
217
376
|
/** Bind the cursor continuation Query. */ continueFolder(): ContinueFolderOperation;
|
|
218
377
|
/** Bind the bounded download Query. */ downloadFile(): DownloadFileOperation;
|
|
219
378
|
/** Bind the bounded replacement Mutation. */ uploadFile(): UploadFileOperation;
|
|
379
|
+
/** Bind the searchFiles operation. */ searchFiles(): SearchFilesOperation;
|
|
380
|
+
/** Bind the ensureFolder operation. */ ensureFolder(): EnsureFolderOperation;
|
|
381
|
+
/** Bind the deletePath operation. */ deletePath(): DeletePathOperation;
|
|
382
|
+
/** Bind the copyPath operation. */ copyPath(): CopyPathOperation;
|
|
383
|
+
/** Bind the movePath operation. */ movePath(): MovePathOperation;
|
|
220
384
|
/** Post one JSON request to the Dropbox RPC API. */
|
|
221
|
-
postJSON(call: Call, path: string, payload: object): Promise<DropboxExchange>;
|
|
385
|
+
postJSON(call: Call, path: string, payload: object, signal?: AbortSignal): Promise<DropboxExchange>;
|
|
222
386
|
/** Download one file using Dropbox's content endpoint. */
|
|
223
387
|
download(call: Call, path: string): Promise<DropboxExchange>;
|
|
224
388
|
/** Overwrite one file using Dropbox's content endpoint. */
|
|
@@ -329,12 +493,113 @@ interface UploadFileStepConfig<StepInput, OperationInput = UploadFileInput, Oper
|
|
|
329
493
|
uploaded: StepTarget<MutationResult<OperationOutput>>;
|
|
330
494
|
/** Dropbox conclusively rejected the upload. */
|
|
331
495
|
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
332
|
-
/**
|
|
496
|
+
/** Retained for compatibility and no longer selected: malformed or oversized upload metadata now retries the overwrite. */
|
|
333
497
|
invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
|
|
334
498
|
/** Local input or connection credentials are invalid. */
|
|
335
499
|
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
500
|
+
/** Accepted for compatibility; ignored because the operation is safe to repeat. */
|
|
501
|
+
maxSends?: number;
|
|
336
502
|
}
|
|
337
503
|
/** Build the uploadFile Step from a named connection. */
|
|
338
504
|
declare function newUploadFileStep<StepInput, OperationInput = UploadFileInput, OperationOutput = UploadedFile>(configuration: UploadFileStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
505
|
+
/** Configuration for the searchFiles connector Step. */
|
|
506
|
+
interface SearchFilesStepConfig<StepInput, OperationInput = SearchFilesInput, OperationOutput = SearchFilesPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
507
|
+
/** Named connection supplying this operation. */
|
|
508
|
+
connection: Connection<{
|
|
509
|
+
searchFiles(): Query<OperationInput, OperationOutput>;
|
|
510
|
+
}>;
|
|
511
|
+
/** Name matching the bound connection. */
|
|
512
|
+
connectionName: string;
|
|
513
|
+
/** Dropbox returned a search page. */
|
|
514
|
+
found: StepTarget<QueryResult<OperationOutput>>;
|
|
515
|
+
/** Dropbox conclusively rejected the search. */
|
|
516
|
+
providerRejected?: StepTarget<QueryResult<OperationOutput>>;
|
|
517
|
+
/** Dropbox returned malformed or oversized search results. */
|
|
518
|
+
invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
|
|
519
|
+
/** Local input or connection credentials are invalid. */
|
|
520
|
+
defect?: StepTarget<QueryResult<OperationOutput>>;
|
|
521
|
+
}
|
|
522
|
+
/** Build the searchFiles Step from a named connection. */
|
|
523
|
+
declare function newSearchFilesStep<StepInput, OperationInput = SearchFilesInput, OperationOutput = SearchFilesPage>(configuration: SearchFilesStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
|
|
524
|
+
/** Configuration for the ensureFolder connector Step. */
|
|
525
|
+
interface EnsureFolderStepConfig<StepInput, OperationInput = EnsureFolderInput, OperationOutput = EnsuredFolder> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
526
|
+
/** Named connection supplying this operation. */
|
|
527
|
+
connection: Connection<{
|
|
528
|
+
ensureFolder(): Mutation<OperationInput, OperationOutput>;
|
|
529
|
+
}>;
|
|
530
|
+
/** Name matching the bound connection. */
|
|
531
|
+
connectionName: string;
|
|
532
|
+
/** Dropbox created the folder or confirmed it already exists. */
|
|
533
|
+
ensured: StepTarget<MutationResult<OperationOutput>>;
|
|
534
|
+
/** Dropbox conclusively rejected the folder request. */
|
|
535
|
+
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
536
|
+
/** Dropbox returned malformed or oversized folder metadata. */
|
|
537
|
+
invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
|
|
538
|
+
/** Local input or connection credentials are invalid. */
|
|
539
|
+
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
540
|
+
/** Accepted for compatibility; ignored because the operation is safe to repeat. */
|
|
541
|
+
maxSends?: number;
|
|
542
|
+
}
|
|
543
|
+
/** Build the ensureFolder Step from a named connection. */
|
|
544
|
+
declare function newEnsureFolderStep<StepInput, OperationInput = EnsureFolderInput, OperationOutput = EnsuredFolder>(configuration: EnsureFolderStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
545
|
+
/** Configuration for the deletePath connector Step. */
|
|
546
|
+
interface DeletePathStepConfig<StepInput, OperationInput = DeletePathInput, OperationOutput = DeletedPath> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
547
|
+
/** Named connection supplying this operation. */
|
|
548
|
+
connection: Connection<{
|
|
549
|
+
deletePath(): Mutation<OperationInput, OperationOutput>;
|
|
550
|
+
}>;
|
|
551
|
+
/** Name matching the bound connection. */
|
|
552
|
+
connectionName: string;
|
|
553
|
+
/** Dropbox deleted the path or confirmed it was already absent. */
|
|
554
|
+
deleted: StepTarget<MutationResult<OperationOutput>>;
|
|
555
|
+
/** Dropbox conclusively rejected the deletion. */
|
|
556
|
+
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
557
|
+
/** Dropbox returned malformed or oversized deletion metadata. */
|
|
558
|
+
invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
|
|
559
|
+
/** Local input or connection credentials are invalid. */
|
|
560
|
+
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
561
|
+
/** Accepted for compatibility; ignored because the operation is safe to repeat. */
|
|
562
|
+
maxSends?: number;
|
|
563
|
+
}
|
|
564
|
+
/** Build the deletePath Step from a named connection. */
|
|
565
|
+
declare function newDeletePathStep<StepInput, OperationInput = DeletePathInput, OperationOutput = DeletedPath>(configuration: DeletePathStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
566
|
+
/** Configuration for the copyPath connector Step. */
|
|
567
|
+
interface CopyPathStepConfig<StepInput, OperationInput = TransferPathInput, OperationOutput = EntryMetadata> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
568
|
+
/** Named connection supplying this operation. */
|
|
569
|
+
connection: Connection<{
|
|
570
|
+
copyPath(): Mutation<OperationInput, OperationOutput>;
|
|
571
|
+
}>;
|
|
572
|
+
/** Name matching the bound connection. */
|
|
573
|
+
connectionName: string;
|
|
574
|
+
/** Dropbox confirmed the destination entry. */
|
|
575
|
+
copied: StepTarget<MutationResult<OperationOutput>>;
|
|
576
|
+
/** Dropbox conclusively rejected the copy. */
|
|
577
|
+
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
578
|
+
/** A copy may have completed but its destination cannot be attributed to this call. */
|
|
579
|
+
uncertain?: StepTarget<MutationResult<OperationOutput>>;
|
|
580
|
+
/** Local paths, credentials, or dispatch checkpoint are invalid. */
|
|
581
|
+
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
582
|
+
}
|
|
583
|
+
/** Build the copyPath Step from a named connection. */
|
|
584
|
+
declare function newCopyPathStep<StepInput, OperationInput = TransferPathInput, OperationOutput = EntryMetadata>(configuration: CopyPathStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
585
|
+
/** Configuration for the movePath connector Step. */
|
|
586
|
+
interface MovePathStepConfig<StepInput, OperationInput = TransferPathInput, OperationOutput = EntryMetadata> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
587
|
+
/** Named connection supplying this operation. */
|
|
588
|
+
connection: Connection<{
|
|
589
|
+
movePath(): Mutation<OperationInput, OperationOutput>;
|
|
590
|
+
}>;
|
|
591
|
+
/** Name matching the bound connection. */
|
|
592
|
+
connectionName: string;
|
|
593
|
+
/** Dropbox confirmed the destination entry. */
|
|
594
|
+
moved: StepTarget<MutationResult<OperationOutput>>;
|
|
595
|
+
/** Dropbox conclusively rejected the move. */
|
|
596
|
+
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
597
|
+
/** A move may have completed but its destination cannot be attributed to this call. */
|
|
598
|
+
uncertain?: StepTarget<MutationResult<OperationOutput>>;
|
|
599
|
+
/** Local paths, credentials, or dispatch checkpoint are invalid. */
|
|
600
|
+
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
601
|
+
}
|
|
602
|
+
/** Build the movePath Step from a named connection. */
|
|
603
|
+
declare function newMovePathStep<StepInput, OperationInput = TransferPathInput, OperationOutput = EntryMetadata>(configuration: MovePathStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
339
604
|
|
|
340
|
-
export { Config, Connection, ConnectorID, ContinueFolderBranch, ContinueFolderBranchCursorExpired, ContinueFolderBranchDefect, ContinueFolderBranchInvalidResponse, ContinueFolderBranchListed, ContinueFolderBranchProviderRejected, ContinueFolderDefinition, ContinueFolderInput, ContinueFolderMetadata, ContinueFolderOperation, type ContinueFolderStepConfig, Credentials, DownloadFileBranch, DownloadFileBranchDefect, DownloadFileBranchDownloaded, DownloadFileBranchInvalidResponse, DownloadFileBranchNotFound, DownloadFileBranchProviderRejected, DownloadFileBranchTooLarge, DownloadFileDefinition, DownloadFileInput, DownloadFileMetadata, DownloadFileOperation, type DownloadFileStepConfig, DownloadedFile, DropboxClient, type DropboxClientOptions, type DropboxExchange, EntryMetadata, FolderPage, GetMetadataBranch, GetMetadataBranchDefect, GetMetadataBranchFound, GetMetadataBranchInvalidResponse, GetMetadataBranchNotFound, GetMetadataBranchProviderRejected, GetMetadataDefinition, GetMetadataInput, GetMetadataMetadata, GetMetadataOperation, type GetMetadataStepConfig, ListFolderBranch, ListFolderBranchDefect, ListFolderBranchInvalidResponse, ListFolderBranchListed, ListFolderBranchNotFound, ListFolderBranchProviderRejected, ListFolderDefinition, ListFolderInput, ListFolderMetadata, ListFolderOperation, type ListFolderStepConfig, ProviderID, UploadFileBranch, UploadFileBranchDefect, UploadFileBranchInvalidResponse, UploadFileBranchProviderRejected, UploadFileBranchUploaded, UploadFileDefinition, UploadFileInput, UploadFileMetadata, UploadFileOperation, type UploadFileStepConfig, UploadedFile, header, newContinueFolderStep, newDownloadFileStep, newGetMetadataStep, newListFolderStep, newProjectConnection, newUploadFileStep };
|
|
605
|
+
export { Config, Connection, ConnectorID, ContinueFolderBranch, ContinueFolderBranchCursorExpired, ContinueFolderBranchDefect, ContinueFolderBranchInvalidResponse, ContinueFolderBranchListed, ContinueFolderBranchProviderRejected, ContinueFolderDefinition, ContinueFolderInput, ContinueFolderMetadata, ContinueFolderOperation, type ContinueFolderStepConfig, CopyPathBranch, CopyPathBranchCopied, CopyPathBranchDefect, CopyPathBranchProviderRejected, CopyPathBranchUncertain, CopyPathDefinition, CopyPathMetadata, CopyPathOperation, type CopyPathStepConfig, Credentials, DeletePathBranch, DeletePathBranchDefect, DeletePathBranchDeleted, DeletePathBranchInvalidResponse, DeletePathBranchProviderRejected, DeletePathDefinition, DeletePathInput, DeletePathMetadata, DeletePathOperation, type DeletePathStepConfig, DeletedPath, DownloadFileBranch, DownloadFileBranchDefect, DownloadFileBranchDownloaded, DownloadFileBranchInvalidResponse, DownloadFileBranchNotFound, DownloadFileBranchProviderRejected, DownloadFileBranchTooLarge, DownloadFileDefinition, DownloadFileInput, DownloadFileMetadata, DownloadFileOperation, type DownloadFileStepConfig, DownloadedFile, DropboxClient, type DropboxClientOptions, type DropboxExchange, EnsureFolderBranch, EnsureFolderBranchDefect, EnsureFolderBranchEnsured, EnsureFolderBranchInvalidResponse, EnsureFolderBranchProviderRejected, EnsureFolderDefinition, EnsureFolderInput, EnsureFolderMetadata, EnsureFolderOperation, type EnsureFolderStepConfig, EnsuredFolder, EntryMetadata, FolderPage, GetMetadataBranch, GetMetadataBranchDefect, GetMetadataBranchFound, GetMetadataBranchInvalidResponse, GetMetadataBranchNotFound, GetMetadataBranchProviderRejected, GetMetadataDefinition, GetMetadataInput, GetMetadataMetadata, GetMetadataOperation, type GetMetadataStepConfig, ListFolderBranch, ListFolderBranchDefect, ListFolderBranchInvalidResponse, ListFolderBranchListed, ListFolderBranchNotFound, ListFolderBranchProviderRejected, ListFolderDefinition, ListFolderInput, ListFolderMetadata, ListFolderOperation, type ListFolderStepConfig, MovePathBranch, MovePathBranchDefect, MovePathBranchMoved, MovePathBranchProviderRejected, MovePathBranchUncertain, MovePathDefinition, MovePathMetadata, MovePathOperation, type MovePathStepConfig, ProviderID, SearchFilesBranch, SearchFilesBranchDefect, SearchFilesBranchFound, SearchFilesBranchInvalidResponse, SearchFilesBranchProviderRejected, SearchFilesDefinition, SearchFilesInput, SearchFilesMetadata, SearchFilesOperation, SearchFilesPage, type SearchFilesStepConfig, TransferPathInput, UploadFileBranch, UploadFileBranchDefect, UploadFileBranchInvalidResponse, UploadFileBranchProviderRejected, UploadFileBranchUploaded, UploadFileDefinition, UploadFileInput, UploadFileMetadata, UploadFileOperation, type UploadFileStepConfig, UploadedFile, header, newContinueFolderStep, newCopyPathStep, newDeletePathStep, newDownloadFileStep, newEnsureFolderStep, newGetMetadataStep, newListFolderStep, newMovePathStep, newProjectConnection, newSearchFilesStep, newUploadFileStep };
|