@superdurable/connector-dropbox 0.0.0-stage → 0.2.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.
@@ -0,0 +1,196 @@
1
+ import { SecretString, RefreshingCredentialProvider, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
2
+ import { z } from 'zod';
3
+
4
+ /** Connector configuration; omitted fields use manifest defaults. */
5
+ interface Config {
6
+ /** Dropbox RPC API root. Blank uses the displayed public endpoint; override only for an approved compatible gateway or local provider test. */
7
+ baseUrl?: string;
8
+ /** Dropbox content API root for downloads and uploads. Blank uses the displayed public endpoint; override only for an approved compatible gateway or local provider test. */
9
+ contentBaseUrl?: string;
10
+ /** Positive duration for one provider request in Go units such as 15s or 1m. Blank uses the displayed default; increase for slow network paths. Runtime value in milliseconds. */
11
+ timeoutMs?: number;
12
+ /** Positive maximum complete JSON response size in bytes. Blank uses the displayed default; increase for larger folder pages. Oversized responses select invalidResponse. */
13
+ maxResponseBytes?: number;
14
+ /** Positive maximum downloaded file content in bytes. Blank uses the displayed default; increase only for bounded files your Flow can safely persist. Larger content selects tooLarge. */
15
+ maxDownloadBytes?: number;
16
+ /** Positive maximum decoded upload content in bytes, at most 157286400. Blank uses the displayed default; increase only for bounded files your Flow can safely carry. */
17
+ maxUploadBytes?: number;
18
+ }
19
+ /** Runtime schema for manifest configuration. */
20
+ declare const ConfigSchema: z.ZodObject<{
21
+ baseUrl: z.ZodOptional<z.ZodString>;
22
+ contentBaseUrl: z.ZodOptional<z.ZodString>;
23
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
24
+ maxResponseBytes: z.ZodOptional<z.ZodNumber>;
25
+ maxDownloadBytes: z.ZodOptional<z.ZodNumber>;
26
+ maxUploadBytes: z.ZodOptional<z.ZodNumber>;
27
+ }, z.core.$strip>;
28
+ /** Private connector credentials resolved by the host. */
29
+ interface Credentials {
30
+ /** Secret short-lived user access token returned after Dropbox consent and refreshed by Dex. Never enter it manually; blank means authorization is required. */
31
+ accessToken: SecretString;
32
+ /** Non-secret app key copied from https://www.dropbox.com/developers/apps > select the app > Settings > App key. Blank means authorization or refresh cannot start. */
33
+ oauthClientId: string;
34
+ /** Secret app secret copied from https://www.dropbox.com/developers/apps > select the app > Settings > App secret > Show. Store only in this credential field; blank means authorization or refresh cannot start. */
35
+ oauthClientSecret: SecretString;
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
+ refreshToken: SecretString;
38
+ }
39
+ /** Decode private credential fields for the connector. */
40
+ declare function decodeCredentials(value: unknown): Credentials;
41
+ /** Decode shared credential fields for the connector. */
42
+ declare function decodeSharedCredentials(value: unknown): Credentials;
43
+ /** Host-owned source of private connector credentials. */
44
+ type CredentialSource = RefreshingCredentialProvider<Credentials>;
45
+ /** ListFolderInput selects one bounded page of a Dropbox folder. */
46
+ interface ListFolderInput {
47
+ /** Path is an empty string for the root or a Dropbox folder path or ID. */
48
+ "path"?: string | undefined;
49
+ /** Limit is the approximate number of entries per page, from 1 to 2000. */
50
+ "limit": number;
51
+ }
52
+ /** EntryMetadata contains a stable Dropbox entry identity without file contents. */
53
+ interface EntryMetadata {
54
+ /** ID is the Dropbox file or folder ID. */
55
+ "id": string;
56
+ /** Name is the entry's current file or folder name. */
57
+ "name": string;
58
+ /** PathDisplay is the provider's human-readable path. */
59
+ "pathDisplay": string;
60
+ /** Kind is file or folder. */
61
+ "kind": string;
62
+ }
63
+ /** FolderPage contains a bounded folder listing and its continuation cursor. */
64
+ interface FolderPage {
65
+ /** Entries contains the page's file and folder identities. */
66
+ "entries": Array<EntryMetadata> | null;
67
+ /** Cursor is passed to a future continuation request when HasMore is true. */
68
+ "cursor": string;
69
+ /** HasMore reports whether Dropbox has more entries for this cursor. */
70
+ "hasMore": boolean;
71
+ }
72
+ /** GetMetadataInput selects one Dropbox file or folder. */
73
+ interface GetMetadataInput {
74
+ /** Path is an absolute Dropbox path or a stable id: or rev: identifier. */
75
+ "path": string;
76
+ }
77
+ /** ContinueFolderInput selects the page or changes after a Dropbox cursor. */
78
+ interface ContinueFolderInput {
79
+ /** Cursor is returned by a previous folder listing or continuation. */
80
+ "cursor": string;
81
+ }
82
+ /** DownloadFileInput selects one Dropbox file by path, ID, or revision. */
83
+ interface DownloadFileInput {
84
+ /** Path is an absolute Dropbox path or a stable id: or rev: identifier. */
85
+ "path": string;
86
+ }
87
+ /** DownloadedFile contains bounded Base64 content and provider file identity. */
88
+ interface DownloadedFile {
89
+ /** File is Dropbox's metadata for the downloaded file. */
90
+ "file": EntryMetadata;
91
+ /** ContentBase64 is the downloaded byte sequence encoded as Base64. */
92
+ "contentBase64": string;
93
+ /** ContentBytes is the number of decoded bytes in ContentBase64. */
94
+ "contentBytes": number;
95
+ }
96
+ /** UploadFileInput replaces one Dropbox path with Base64-decoded content. */
97
+ interface UploadFileInput {
98
+ /** Path is the absolute destination path, including the file name. */
99
+ "path": string;
100
+ /** ContentBase64 contains the complete replacement file content. */
101
+ "contentBase64": string;
102
+ }
103
+ /** UploadedFile identifies the stored replacement without returning its content. */
104
+ interface UploadedFile {
105
+ /** File is the stored Dropbox file identity. */
106
+ "file": EntryMetadata;
107
+ }
108
+ /** Runtime validator for ListFolderInput. */
109
+ declare const ListFolderInputSchema: z.ZodObject<{
110
+ path: z.ZodOptional<z.ZodString>;
111
+ limit: z.ZodNumber;
112
+ }, z.core.$strict>;
113
+ /** Runtime validator for EntryMetadata. */
114
+ declare const EntryMetadataSchema: z.ZodObject<{
115
+ id: z.ZodString;
116
+ name: z.ZodString;
117
+ pathDisplay: z.ZodString;
118
+ kind: z.ZodString;
119
+ }, z.core.$strict>;
120
+ /** Runtime validator for FolderPage. */
121
+ declare const FolderPageSchema: z.ZodObject<{
122
+ entries: z.ZodNullable<z.ZodArray<z.ZodObject<{
123
+ id: z.ZodString;
124
+ name: z.ZodString;
125
+ pathDisplay: z.ZodString;
126
+ kind: z.ZodString;
127
+ }, z.core.$strict>>>;
128
+ cursor: z.ZodString;
129
+ hasMore: z.ZodBoolean;
130
+ }, z.core.$strict>;
131
+ /** Runtime validator for GetMetadataInput. */
132
+ declare const GetMetadataInputSchema: z.ZodObject<{
133
+ path: z.ZodString;
134
+ }, z.core.$strict>;
135
+ /** Runtime validator for ContinueFolderInput. */
136
+ declare const ContinueFolderInputSchema: z.ZodObject<{
137
+ cursor: z.ZodString;
138
+ }, z.core.$strict>;
139
+ /** Runtime validator for DownloadFileInput. */
140
+ declare const DownloadFileInputSchema: z.ZodObject<{
141
+ path: z.ZodString;
142
+ }, z.core.$strict>;
143
+ /** Runtime validator for DownloadedFile. */
144
+ declare const DownloadedFileSchema: z.ZodObject<{
145
+ file: z.ZodObject<{
146
+ id: z.ZodString;
147
+ name: z.ZodString;
148
+ pathDisplay: z.ZodString;
149
+ kind: z.ZodString;
150
+ }, z.core.$strict>;
151
+ contentBase64: z.ZodString;
152
+ contentBytes: z.ZodNumber;
153
+ }, z.core.$strict>;
154
+ /** Runtime validator for UploadFileInput. */
155
+ declare const UploadFileInputSchema: z.ZodObject<{
156
+ path: z.ZodString;
157
+ contentBase64: z.ZodString;
158
+ }, z.core.$strict>;
159
+ /** Runtime validator for UploadedFile. */
160
+ declare const UploadedFileSchema: z.ZodObject<{
161
+ file: z.ZodObject<{
162
+ id: z.ZodString;
163
+ name: z.ZodString;
164
+ pathDisplay: z.ZodString;
165
+ kind: z.ZodString;
166
+ }, z.core.$strict>;
167
+ }, z.core.$strict>;
168
+
169
+ /** Typed operations supplied by a client or mock. */
170
+ interface Operations {
171
+ /** Invoke listFolder through this connection. */
172
+ listFolder(): Query<ListFolderInput, FolderPage>;
173
+ /** Invoke getMetadata through this connection. */
174
+ getMetadata(): Query<GetMetadataInput, EntryMetadata>;
175
+ /** Invoke continueFolder through this connection. */
176
+ continueFolder(): Query<ContinueFolderInput, FolderPage>;
177
+ /** Invoke downloadFile through this connection. */
178
+ downloadFile(): Query<DownloadFileInput, DownloadedFile>;
179
+ /** Invoke uploadFile through this connection. */
180
+ uploadFile(): Mutation<UploadFileInput, UploadedFile>;
181
+ }
182
+ /** Named connector connection kept outside Flow state. */
183
+ declare class Connection<BoundOperations = Operations> {
184
+ /** Stable provider and connection name. */
185
+ readonly reference: ConnectionRef;
186
+ /** Bound provider operations. */
187
+ readonly operations: BoundOperations;
188
+ /** Validate a reference and bind operations. */
189
+ constructor(reference: ConnectionRef, operations: BoundOperations);
190
+ }
191
+ /** Bind a client to a named connection. */
192
+ declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
193
+ /** Bind scripted operations to a named connection. */
194
+ declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
195
+
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 Config as c, type Credentials as d, Connection as e, ConfigSchema as f, ContinueFolderInputSchema as g, type CredentialSource as h, DownloadFileInputSchema as i, DownloadedFileSchema as j, EntryMetadataSchema as k, FolderPageSchema as l, GetMetadataInputSchema as m, ListFolderInputSchema as n, UploadFileInputSchema as o, UploadedFileSchema as p, decodeCredentials as q, decodeSharedCredentials as r, newConnection as s, newConnectionWithOperations as t };
@@ -0,0 +1,340 @@
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 Config, d as Credentials, e as Connection, O as Operations } from './connection-CufXPwNo.js';
2
+ export { f as ConfigSchema, g as ContinueFolderInputSchema, h as CredentialSource, i as DownloadFileInputSchema, j as DownloadedFileSchema, k as EntryMetadataSchema, l as FolderPageSchema, m as GetMetadataInputSchema, n as ListFolderInputSchema, o as UploadFileInputSchema, p as UploadedFileSchema, q as decodeCredentials, r as decodeSharedCredentials, s as newConnection, t as newConnectionWithOperations } from './connection-CufXPwNo.js';
3
+ import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
4
+ import { QueryDefinition, MutationDefinition, Query, Call, QueryAttempt, Mutation, MutationAttempt, CredentialProvider, CredentialRefreshDriver, QueryStepConfig, QueryResult, MutationStepConfig, MutationResult, QueryStep, MutationStep } from '@superdurable/connectors-sdk';
5
+ import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
6
+ import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
7
+ import { StepTarget } from '@superdurable/dex';
8
+ import 'zod';
9
+
10
+ /** Stable connector identity. */
11
+ declare const ConnectorID = "dropbox";
12
+ /** Provider identity for named connections. */
13
+ declare const ProviderID = "dropbox";
14
+ /** Branch IDs for listFolder. */
15
+ declare const ListFolderBranch: {
16
+ readonly Listed: "listed";
17
+ readonly NotFound: "notFound";
18
+ readonly ProviderRejected: "providerRejected";
19
+ readonly InvalidResponse: "invalidResponse";
20
+ readonly Defect: "defect";
21
+ };
22
+ /** Dropbox returned a folder page. */
23
+ declare const ListFolderBranchListed: "listed";
24
+ /** Dropbox did not find this folder. */
25
+ declare const ListFolderBranchNotFound: "notFound";
26
+ /** Dropbox conclusively rejected the request. */
27
+ declare const ListFolderBranchProviderRejected: "providerRejected";
28
+ /** Dropbox returned malformed or oversized JSON. */
29
+ declare const ListFolderBranchInvalidResponse: "invalidResponse";
30
+ /** Local input or connection credentials are invalid. */
31
+ declare const ListFolderBranchDefect: "defect";
32
+ /** Manifest definition for listFolder. */
33
+ declare const ListFolderDefinition: QueryDefinition;
34
+ /** Manifest metadata for listFolder. */
35
+ declare const ListFolderMetadata: {
36
+ readonly kind: "query";
37
+ readonly idempotency: "none";
38
+ readonly authorization: "required";
39
+ };
40
+ /** Branch IDs for getMetadata. */
41
+ declare const GetMetadataBranch: {
42
+ readonly Found: "found";
43
+ readonly NotFound: "notFound";
44
+ readonly ProviderRejected: "providerRejected";
45
+ readonly InvalidResponse: "invalidResponse";
46
+ readonly Defect: "defect";
47
+ };
48
+ /** Dropbox returned the selected entry. */
49
+ declare const GetMetadataBranchFound: "found";
50
+ /** Dropbox did not find this path or ID. */
51
+ declare const GetMetadataBranchNotFound: "notFound";
52
+ /** Dropbox conclusively rejected the request. */
53
+ declare const GetMetadataBranchProviderRejected: "providerRejected";
54
+ /** Dropbox returned malformed or oversized JSON. */
55
+ declare const GetMetadataBranchInvalidResponse: "invalidResponse";
56
+ /** Local input or connection credentials are invalid. */
57
+ declare const GetMetadataBranchDefect: "defect";
58
+ /** Manifest definition for getMetadata. */
59
+ declare const GetMetadataDefinition: QueryDefinition;
60
+ /** Manifest metadata for getMetadata. */
61
+ declare const GetMetadataMetadata: {
62
+ readonly kind: "query";
63
+ readonly idempotency: "none";
64
+ readonly authorization: "required";
65
+ };
66
+ /** Branch IDs for continueFolder. */
67
+ declare const ContinueFolderBranch: {
68
+ readonly Listed: "listed";
69
+ readonly CursorExpired: "cursorExpired";
70
+ readonly ProviderRejected: "providerRejected";
71
+ readonly InvalidResponse: "invalidResponse";
72
+ readonly Defect: "defect";
73
+ };
74
+ /** Dropbox returned another folder page or change set. */
75
+ declare const ContinueFolderBranchListed: "listed";
76
+ /** Dropbox requires a new listFolder call to reset this cursor. */
77
+ declare const ContinueFolderBranchCursorExpired: "cursorExpired";
78
+ /** Dropbox conclusively rejected the request. */
79
+ declare const ContinueFolderBranchProviderRejected: "providerRejected";
80
+ /** Dropbox returned malformed or oversized JSON. */
81
+ declare const ContinueFolderBranchInvalidResponse: "invalidResponse";
82
+ /** Local cursor or connection credentials are invalid. */
83
+ declare const ContinueFolderBranchDefect: "defect";
84
+ /** Manifest definition for continueFolder. */
85
+ declare const ContinueFolderDefinition: QueryDefinition;
86
+ /** Manifest metadata for continueFolder. */
87
+ declare const ContinueFolderMetadata: {
88
+ readonly kind: "query";
89
+ readonly idempotency: "none";
90
+ readonly authorization: "required";
91
+ };
92
+ /** Branch IDs for downloadFile. */
93
+ declare const DownloadFileBranch: {
94
+ readonly Downloaded: "downloaded";
95
+ readonly NotFound: "notFound";
96
+ readonly TooLarge: "tooLarge";
97
+ readonly ProviderRejected: "providerRejected";
98
+ readonly InvalidResponse: "invalidResponse";
99
+ readonly Defect: "defect";
100
+ };
101
+ /** Dropbox returned the selected file content. */
102
+ declare const DownloadFileBranchDownloaded: "downloaded";
103
+ /** Dropbox did not find this file. */
104
+ declare const DownloadFileBranchNotFound: "notFound";
105
+ /** The file exceeds the configured download limit. */
106
+ declare const DownloadFileBranchTooLarge: "tooLarge";
107
+ /** Dropbox conclusively rejected the request. */
108
+ declare const DownloadFileBranchProviderRejected: "providerRejected";
109
+ /** Dropbox returned missing or malformed file metadata. */
110
+ declare const DownloadFileBranchInvalidResponse: "invalidResponse";
111
+ /** Local input or connection credentials are invalid. */
112
+ declare const DownloadFileBranchDefect: "defect";
113
+ /** Manifest definition for downloadFile. */
114
+ declare const DownloadFileDefinition: QueryDefinition;
115
+ /** Manifest metadata for downloadFile. */
116
+ declare const DownloadFileMetadata: {
117
+ readonly kind: "query";
118
+ readonly idempotency: "none";
119
+ readonly authorization: "required";
120
+ };
121
+ /** Branch IDs for uploadFile. */
122
+ declare const UploadFileBranch: {
123
+ readonly Uploaded: "uploaded";
124
+ readonly ProviderRejected: "providerRejected";
125
+ readonly InvalidResponse: "invalidResponse";
126
+ readonly Defect: "defect";
127
+ };
128
+ /** Dropbox stored the replacement file content. */
129
+ declare const UploadFileBranchUploaded: "uploaded";
130
+ /** Dropbox conclusively rejected the upload. */
131
+ declare const UploadFileBranchProviderRejected: "providerRejected";
132
+ /** Dropbox returned malformed or oversized upload metadata. */
133
+ declare const UploadFileBranchInvalidResponse: "invalidResponse";
134
+ /** Local input or connection credentials are invalid. */
135
+ declare const UploadFileBranchDefect: "defect";
136
+ /** Manifest definition for uploadFile. */
137
+ declare const UploadFileDefinition: MutationDefinition;
138
+ /** Manifest metadata for uploadFile. */
139
+ declare const UploadFileMetadata: {
140
+ readonly kind: "mutation";
141
+ readonly idempotency: "required";
142
+ readonly authorization: "required";
143
+ };
144
+
145
+ /** One bounded Dropbox folder-page Query. */
146
+ declare class ListFolderOperation implements Query<ListFolderInput, FolderPage> {
147
+ private readonly client;
148
+ /** Bind the provider client. */ constructor(client: DropboxClient);
149
+ /** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
150
+ /** List one folder page. */
151
+ invoke(call: Call, input: ListFolderInput): Promise<QueryAttempt<FolderPage>>;
152
+ }
153
+ /** One Dropbox entry-metadata Query. */
154
+ declare class GetMetadataOperation implements Query<GetMetadataInput, EntryMetadata> {
155
+ private readonly client;
156
+ /** Bind the provider client. */ constructor(client: DropboxClient);
157
+ /** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
158
+ /** Read one file or folder identity. */
159
+ invoke(call: Call, input: GetMetadataInput): Promise<QueryAttempt<EntryMetadata>>;
160
+ }
161
+ /** One Dropbox cursor-continuation Query. */
162
+ declare class ContinueFolderOperation implements Query<ContinueFolderInput, FolderPage> {
163
+ private readonly client;
164
+ /** Bind the provider client. */ constructor(client: DropboxClient);
165
+ /** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
166
+ /** Read the next folder page or change set. */
167
+ invoke(call: Call, input: ContinueFolderInput): Promise<QueryAttempt<FolderPage>>;
168
+ }
169
+ /** One bounded Dropbox content Query. */
170
+ declare class DownloadFileOperation implements Query<DownloadFileInput, DownloadedFile> {
171
+ private readonly client;
172
+ /** Bind the provider client. */ constructor(client: DropboxClient);
173
+ /** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
174
+ /** Return one file identity and Base64 content. */
175
+ invoke(call: Call, input: DownloadFileInput): Promise<QueryAttempt<DownloadedFile>>;
176
+ }
177
+ /** One bounded Dropbox replacement Mutation. */
178
+ declare class UploadFileOperation implements Mutation<UploadFileInput, UploadedFile> {
179
+ private readonly client;
180
+ /** Bind the provider client. */ constructor(client: DropboxClient);
181
+ /** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
182
+ /** Record stable call identity; Dropbox uses absolute overwrite rather than a request key. */ idempotencyKey(callID: string, input: UploadFileInput): string;
183
+ /** Overwrite the same path with the same bytes on every retry. */
184
+ invoke(call: Call, input: UploadFileInput): Promise<MutationAttempt<UploadedFile>>;
185
+ }
186
+
187
+ /** One response or sanitized credential and transport failure. */
188
+ interface DropboxExchange {
189
+ /** HTTP status, or zero before a response arrives. */ status: number;
190
+ /** Bounded body; never returned directly to Flow state. */ body: Uint8Array;
191
+ /** Download metadata header, if returned. */ metadata: string;
192
+ /** Retry-After delay in milliseconds. */ retryAfterMs: number;
193
+ /** Local failure classification. */ error?: 'credential' | 'refresh' | 'request' | 'read' | 'tooLarge';
194
+ }
195
+ /** Injectable provider sender and renewable credential driver. */
196
+ interface DropboxClientOptions {
197
+ /** Omit for the SDK's redirect-safe transport. */ send?: (request: ProviderRequest) => Promise<ProviderResponse>;
198
+ /** Omit for the manifest-generated OAuth refresh driver. */ refreshDriver?: CredentialRefreshDriver<Credentials>;
199
+ /** Clock for Retry-After HTTP dates. */ now?: () => Date;
200
+ }
201
+ /** Dropbox RPC and content transport bound to one named credential source. */
202
+ declare class DropboxClient {
203
+ /** Validated RPC endpoint root. */ readonly baseURL: string;
204
+ /** Validated content endpoint root. */ readonly contentBaseURL: string;
205
+ /** Per-request timeout in milliseconds. */ readonly timeoutMs: number;
206
+ /** Maximum JSON response bytes. */ readonly maxResponseBytes: number;
207
+ /** Maximum downloaded file bytes. */ readonly maxDownloadBytes: number;
208
+ /** Maximum decoded upload file bytes. */ readonly maxUploadBytes: number;
209
+ private readonly credentials;
210
+ private readonly refreshDriver;
211
+ private readonly send;
212
+ private readonly now;
213
+ /** Validate settings and inject provider dependencies before any network call. */
214
+ constructor(config: Config, credentials: CredentialProvider<Credentials>, options?: DropboxClientOptions);
215
+ /** Bind the folder listing Query. */ listFolder(): ListFolderOperation;
216
+ /** Bind the metadata Query. */ getMetadata(): GetMetadataOperation;
217
+ /** Bind the cursor continuation Query. */ continueFolder(): ContinueFolderOperation;
218
+ /** Bind the bounded download Query. */ downloadFile(): DownloadFileOperation;
219
+ /** Bind the bounded replacement Mutation. */ uploadFile(): UploadFileOperation;
220
+ /** Post one JSON request to the Dropbox RPC API. */
221
+ postJSON(call: Call, path: string, payload: object): Promise<DropboxExchange>;
222
+ /** Download one file using Dropbox's content endpoint. */
223
+ download(call: Call, path: string): Promise<DropboxExchange>;
224
+ /** Overwrite one file using Dropbox's content endpoint. */
225
+ upload(call: Call, path: string, content: Uint8Array): Promise<DropboxExchange>;
226
+ private post;
227
+ }
228
+ /** Read a case-insensitive response header. */
229
+ declare function header(headers: ProviderResponse['headers'], name: string): string;
230
+
231
+ /** Open one statically named renewable Dropbox connection from Dex project configuration. */
232
+ declare function newProjectConnection(project: LoadedProject, connectionName: string, options?: DropboxClientOptions): Connection<Operations>;
233
+
234
+ /** Configuration for the listFolder connector Step. */
235
+ interface ListFolderStepConfig<StepInput, OperationInput = ListFolderInput, OperationOutput = FolderPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
236
+ /** Named connection supplying this operation. */
237
+ connection: Connection<{
238
+ listFolder(): Query<OperationInput, OperationOutput>;
239
+ }>;
240
+ /** Name matching the bound connection. */
241
+ connectionName: string;
242
+ /** Dropbox returned a folder page. */
243
+ listed: StepTarget<QueryResult<OperationOutput>>;
244
+ /** Dropbox did not find this folder. */
245
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
246
+ /** Dropbox conclusively rejected the request. */
247
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
248
+ /** Dropbox returned malformed or oversized JSON. */
249
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
250
+ /** Local input or connection credentials are invalid. */
251
+ defect?: StepTarget<QueryResult<OperationOutput>>;
252
+ }
253
+ /** Build the listFolder Step from a named connection. */
254
+ declare function newListFolderStep<StepInput, OperationInput = ListFolderInput, OperationOutput = FolderPage>(configuration: ListFolderStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
255
+ /** Configuration for the getMetadata connector Step. */
256
+ interface GetMetadataStepConfig<StepInput, OperationInput = GetMetadataInput, OperationOutput = EntryMetadata> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
257
+ /** Named connection supplying this operation. */
258
+ connection: Connection<{
259
+ getMetadata(): Query<OperationInput, OperationOutput>;
260
+ }>;
261
+ /** Name matching the bound connection. */
262
+ connectionName: string;
263
+ /** Dropbox returned the selected entry. */
264
+ found: StepTarget<QueryResult<OperationOutput>>;
265
+ /** Dropbox did not find this path or ID. */
266
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
267
+ /** Dropbox conclusively rejected the request. */
268
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
269
+ /** Dropbox returned malformed or oversized JSON. */
270
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
271
+ /** Local input or connection credentials are invalid. */
272
+ defect?: StepTarget<QueryResult<OperationOutput>>;
273
+ }
274
+ /** Build the getMetadata Step from a named connection. */
275
+ declare function newGetMetadataStep<StepInput, OperationInput = GetMetadataInput, OperationOutput = EntryMetadata>(configuration: GetMetadataStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
276
+ /** Configuration for the continueFolder connector Step. */
277
+ interface ContinueFolderStepConfig<StepInput, OperationInput = ContinueFolderInput, OperationOutput = FolderPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
278
+ /** Named connection supplying this operation. */
279
+ connection: Connection<{
280
+ continueFolder(): Query<OperationInput, OperationOutput>;
281
+ }>;
282
+ /** Name matching the bound connection. */
283
+ connectionName: string;
284
+ /** Dropbox returned another folder page or change set. */
285
+ listed: StepTarget<QueryResult<OperationOutput>>;
286
+ /** Dropbox requires a new listFolder call to reset this cursor. */
287
+ cursorExpired?: StepTarget<QueryResult<OperationOutput>>;
288
+ /** Dropbox conclusively rejected the request. */
289
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
290
+ /** Dropbox returned malformed or oversized JSON. */
291
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
292
+ /** Local cursor or connection credentials are invalid. */
293
+ defect?: StepTarget<QueryResult<OperationOutput>>;
294
+ }
295
+ /** Build the continueFolder Step from a named connection. */
296
+ declare function newContinueFolderStep<StepInput, OperationInput = ContinueFolderInput, OperationOutput = FolderPage>(configuration: ContinueFolderStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
297
+ /** Configuration for the downloadFile connector Step. */
298
+ interface DownloadFileStepConfig<StepInput, OperationInput = DownloadFileInput, OperationOutput = DownloadedFile> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
299
+ /** Named connection supplying this operation. */
300
+ connection: Connection<{
301
+ downloadFile(): Query<OperationInput, OperationOutput>;
302
+ }>;
303
+ /** Name matching the bound connection. */
304
+ connectionName: string;
305
+ /** Dropbox returned the selected file content. */
306
+ downloaded: StepTarget<QueryResult<OperationOutput>>;
307
+ /** Dropbox did not find this file. */
308
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
309
+ /** The file exceeds the configured download limit. */
310
+ tooLarge?: StepTarget<QueryResult<OperationOutput>>;
311
+ /** Dropbox conclusively rejected the request. */
312
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
313
+ /** Dropbox returned missing or malformed file metadata. */
314
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
315
+ /** Local input or connection credentials are invalid. */
316
+ defect?: StepTarget<QueryResult<OperationOutput>>;
317
+ }
318
+ /** Build the downloadFile Step from a named connection. */
319
+ declare function newDownloadFileStep<StepInput, OperationInput = DownloadFileInput, OperationOutput = DownloadedFile>(configuration: DownloadFileStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
320
+ /** Configuration for the uploadFile connector Step. */
321
+ interface UploadFileStepConfig<StepInput, OperationInput = UploadFileInput, OperationOutput = UploadedFile> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
322
+ /** Named connection supplying this operation. */
323
+ connection: Connection<{
324
+ uploadFile(): Mutation<OperationInput, OperationOutput>;
325
+ }>;
326
+ /** Name matching the bound connection. */
327
+ connectionName: string;
328
+ /** Dropbox stored the replacement file content. */
329
+ uploaded: StepTarget<MutationResult<OperationOutput>>;
330
+ /** Dropbox conclusively rejected the upload. */
331
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
332
+ /** Dropbox returned malformed or oversized upload metadata. */
333
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
334
+ /** Local input or connection credentials are invalid. */
335
+ defect?: StepTarget<MutationResult<OperationOutput>>;
336
+ }
337
+ /** Build the uploadFile Step from a named connection. */
338
+ declare function newUploadFileStep<StepInput, OperationInput = UploadFileInput, OperationOutput = UploadedFile>(configuration: UploadFileStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
339
+
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 };