@superdurable/connector-box 0.1.1 → 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,509 @@
1
+ import { SecretString, RefreshingCredentialProvider, Mutation, Query, ConnectionRef } from '@superdurable/connectors-sdk';
2
+ import { z } from 'zod';
3
+ import { Codec } from '@superdurable/dex';
4
+
5
+ /** A signed 64-bit JSON integer. Values outside the safe number range retain their decimal token. */
6
+ type SignedInteger = number | Readonly<{
7
+ rawJSON: string;
8
+ }>;
9
+ /** Decode one signed Go integer from a safe number or a native raw JSON number token. */
10
+ declare function decodeSignedInteger(value: unknown): SignedInteger;
11
+ /** Read provider JSON with the original syntax of every numeric token for typed field validation. */
12
+ declare function parseJSONNumberTokens(text: string): unknown;
13
+ /** Decode JSON while retaining exact decimal tokens for integers outside JavaScript's safe range. */
14
+ declare function parseExactIntegerJSON(text: string): unknown;
15
+ /** JSON-wire codec for records with signed integer fields. An optional decoder validates the application type. */
16
+ declare function exactIntegerJSONCodec<T>(decode?: (value: unknown) => T): Codec<T>;
17
+ /** Connector configuration; omitted fields use manifest defaults. */
18
+ interface Config {
19
+ /** Box API root. Blank uses the displayed public endpoint; override only for an approved compatible gateway or local provider test. */
20
+ baseUrl?: string;
21
+ /** 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. */
22
+ timeoutMs?: number;
23
+ /** Positive maximum provider error response size in bytes. Blank uses the displayed default; increase only for an approved gateway. */
24
+ maxResponseBytes?: number;
25
+ /** Positive maximum downloaded file content in bytes. Blank uses the displayed default; increase only for bounded files the Flow can safely persist. */
26
+ maxDownloadBytes?: number;
27
+ /** Box upload API root. Blank uses the displayed public endpoint; override only for an approved compatible gateway or local provider test. */
28
+ uploadBaseUrl?: string;
29
+ /** Positive maximum decoded upload size in bytes, at most 52428800. Blank uses the displayed default; increase only for bounded files the Flow can safely carry. */
30
+ maxUploadBytes?: number;
31
+ }
32
+ /** Runtime schema for manifest configuration. */
33
+ declare const ConfigSchema: z.ZodObject<{
34
+ baseUrl: z.ZodOptional<z.ZodString>;
35
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
36
+ maxResponseBytes: z.ZodOptional<z.ZodNumber>;
37
+ maxDownloadBytes: z.ZodOptional<z.ZodNumber>;
38
+ uploadBaseUrl: z.ZodOptional<z.ZodString>;
39
+ maxUploadBytes: z.ZodOptional<z.ZodNumber>;
40
+ }, z.core.$strip>;
41
+ /** Private connector credentials resolved by the host. */
42
+ interface Credentials {
43
+ /** Secret access token returned after Box consent and refreshed by Dex. Never enter it manually; blank requires authorization. */
44
+ accessToken: SecretString;
45
+ /** Non-secret Client ID from https://app.box.com/developers/console > select the OAuth 2.0 Platform App > Configuration > OAuth 2.0 Credentials. Blank prevents authorization or refresh. */
46
+ oauthClientId: string;
47
+ /** Secret Client Secret from https://app.box.com/developers/console > select the OAuth 2.0 Platform App > Configuration > OAuth 2.0 Credentials. Store only here; blank prevents authorization or refresh. */
48
+ oauthClientSecret: SecretString;
49
+ /** Secret single-use refresh token returned after Box consent. Dex replaces it on every refresh; blank requires reauthorization. */
50
+ refreshToken: SecretString;
51
+ }
52
+ /** Stored credential material that fails the connector credential checks, so no retry can succeed. */
53
+ declare class CredentialMaterialError extends TypeError {
54
+ constructor(message: string);
55
+ }
56
+ /** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
57
+ declare function isCredentialMaterialError(error: unknown): boolean;
58
+ /** Decode private credential fields for the connector. */
59
+ declare function decodeCredentials(value: unknown): Credentials;
60
+ /** Decode shared credential fields for the connector. */
61
+ declare function decodeSharedCredentials(value: unknown): Credentials;
62
+ /** Host-owned source of private connector credentials. */
63
+ type CredentialSource = RefreshingCredentialProvider<Credentials>;
64
+ /** CreateBoxFolderInput creates one named folder under a parent. */
65
+ interface CreateBoxFolderInput {
66
+ /** ParentID is a decimal Box folder ID; 0 is root. */
67
+ "parentId": string;
68
+ /** Name is the new folder name, unique within the parent. */
69
+ "name": string;
70
+ }
71
+ /** CreatedBoxItem identifies a created or copied item. */
72
+ interface CreatedBoxItem {
73
+ /** ID is the stable Box item ID. */
74
+ "id": string;
75
+ /** Type is file or folder. */
76
+ "type": string;
77
+ /** Name is the created item's name. */
78
+ "name": string;
79
+ /** ParentID is the destination folder ID. */
80
+ "parentId": string;
81
+ }
82
+ /** CopyBoxFileInput copies one file under an explicit destination name. */
83
+ interface CopyBoxFileInput {
84
+ /** FileID is the source file's decimal ID. */
85
+ "fileId": string;
86
+ /** ParentID is the destination folder ID; 0 is root. */
87
+ "parentId": string;
88
+ /** Name is the destination file name, unique within the parent. */
89
+ "name": string;
90
+ }
91
+ /** CopyBoxFolderInput copies one folder under an explicit destination name. */
92
+ interface CopyBoxFolderInput {
93
+ /** FolderID is the source folder's decimal ID; root cannot be copied. */
94
+ "folderId": string;
95
+ /** ParentID is the destination folder ID; 0 is root. */
96
+ "parentId": string;
97
+ /** Name is the destination folder name, unique within the parent. */
98
+ "name": string;
99
+ }
100
+ /** UpdateBoxFileInput selects a file and absolute fields to replace. */
101
+ interface UpdateBoxFileInput {
102
+ /** FileID appears in Box Web's /files/<ID> URL. */
103
+ "fileId": string;
104
+ /** Name is the desired file name; blank leaves it unchanged. */
105
+ "name"?: string | undefined;
106
+ /** ParentID is the destination folder ID; blank leaves the parent unchanged and 0 selects root. */
107
+ "parentId"?: string | undefined;
108
+ /** SharedLinkAccess is open, company, or collaborators; blank leaves sharing unchanged. */
109
+ "sharedLinkAccess"?: string | undefined;
110
+ }
111
+ /** UpdatedBoxItem contains the selected Box metadata after an update. */
112
+ interface UpdatedBoxItem {
113
+ /** ID is the stable file or folder ID. */
114
+ "id": string;
115
+ /** Type is file or folder. */
116
+ "type": string;
117
+ /** Name is the current item name. */
118
+ "name": string;
119
+ /** ParentID is the current parent folder ID, when returned by Box. */
120
+ "parentId"?: string | undefined;
121
+ }
122
+ /** UpdateBoxFolderInput selects a folder and absolute fields to replace. */
123
+ interface UpdateBoxFolderInput {
124
+ /** FolderID appears in Box Web's /folders/<ID> URL; root cannot be updated. */
125
+ "folderId": string;
126
+ /** Name is the desired folder name; blank leaves it unchanged. */
127
+ "name"?: string | undefined;
128
+ /** ParentID is the destination folder ID; blank leaves the parent unchanged and 0 selects root. */
129
+ "parentId"?: string | undefined;
130
+ /** SharedLinkAccess is open, company, or collaborators; blank leaves sharing unchanged. */
131
+ "sharedLinkAccess"?: string | undefined;
132
+ }
133
+ /** ShareBoxFileInput selects a file and desired shared link access. */
134
+ interface ShareBoxFileInput {
135
+ /** FileID is the decimal ID from Box Web's /files/<ID> URL. */
136
+ "fileId": string;
137
+ /** Access is open, company, or collaborators. */
138
+ "access": string;
139
+ }
140
+ /** ShareBoxFolderInput selects a folder and desired shared link access. */
141
+ interface ShareBoxFolderInput {
142
+ /** FolderID is the decimal ID from Box Web's /folders/<ID> URL. */
143
+ "folderId": string;
144
+ /** Access is open, company, or collaborators. */
145
+ "access": string;
146
+ }
147
+ /** CreateBoxFileInput uploads one new bounded file under a parent folder. */
148
+ interface CreateBoxFileInput {
149
+ /** ParentID is a decimal Box folder ID; 0 is root. */
150
+ "parentId": string;
151
+ /** Name is the new file name, unique within the parent. */
152
+ "name": string;
153
+ /** ContentBase64 holds the complete file bytes encoded as Base64. */
154
+ "contentBase64": string;
155
+ }
156
+ /** CreatedBoxFile identifies a newly uploaded file without retaining its bytes. */
157
+ interface CreatedBoxFile {
158
+ /** FileID is the new Box file ID. */
159
+ "fileId": string;
160
+ /** Name is the file name. */
161
+ "name": string;
162
+ /** SHA1 is Box's hexadecimal digest of the content. */
163
+ "sha1": string;
164
+ /** ParentID is the destination folder ID. */
165
+ "parentId": string;
166
+ }
167
+ /** DownloadFileInput selects one Box file by its numeric ID. */
168
+ interface DownloadFileInput {
169
+ /** FileID appears in Box Web's /files/<ID> URL. */
170
+ "fileId": string;
171
+ }
172
+ /** DownloadedFile contains bounded Base64 content and its Box file ID. */
173
+ interface DownloadedFile {
174
+ /** FileID is the Box file ID requested by the Flow. */
175
+ "fileId": string;
176
+ /** ContentBase64 is the downloaded byte sequence encoded as Base64. */
177
+ "contentBase64": string;
178
+ /** ContentBytes is the number of decoded bytes in ContentBase64. */
179
+ "contentBytes": number;
180
+ }
181
+ /** UploadFileInput replaces an existing Box file's current content. */
182
+ interface UploadFileInput {
183
+ /** FileID appears in Box Web's /files/<ID> URL. */
184
+ "fileId": string;
185
+ /** ContentBase64 holds the complete replacement bytes. */
186
+ "contentBase64": string;
187
+ }
188
+ /** UploadedFile identifies the file with the requested current content. */
189
+ interface UploadedFile {
190
+ /** FileID is the existing Box file ID. */
191
+ "fileId": string;
192
+ /** Name is the existing Box file name, preserved during replacement. */
193
+ "name": string;
194
+ /** SHA1 is Box's hexadecimal digest of current content. */
195
+ "sha1": string;
196
+ }
197
+ /** GetFileInput selects one Box file by its decimal ID. */
198
+ interface GetFileInput {
199
+ /** FileID appears in Box Web's /files/<ID> URL. */
200
+ "fileId": string;
201
+ }
202
+ /** BoxFile contains selected metadata for one Box file. */
203
+ interface BoxFile {
204
+ /** ID is the stable Box file ID. */
205
+ "id": string;
206
+ /** Type is always file. */
207
+ "type": string;
208
+ /** Name is the current file name. */
209
+ "name": string;
210
+ /** Size is the file size in bytes. */
211
+ "size": SignedInteger;
212
+ /** SHA1 is the provider content digest when available. */
213
+ "sha1": string;
214
+ }
215
+ /** GetFolderInput selects one Box folder by its decimal ID. */
216
+ interface GetFolderInput {
217
+ /** FolderID appears in Box Web's /folders/<ID> URL; 0 is the root folder. */
218
+ "folderId": string;
219
+ }
220
+ /** BoxFolder contains selected metadata for one Box folder. */
221
+ interface BoxFolder {
222
+ /** ID is the stable Box folder ID. */
223
+ "id": string;
224
+ /** Type is always folder. */
225
+ "type": string;
226
+ /** Name is the current folder name. */
227
+ "name": string;
228
+ }
229
+ /** ListFolderItemsInput selects one offset page in a Box folder. */
230
+ interface ListFolderItemsInput {
231
+ /** FolderID appears in Box Web's /folders/<ID> URL; 0 is the root folder. */
232
+ "folderId": string;
233
+ /** Limit is 1 through 1000 items; zero uses Box's default. */
234
+ "limit"?: number | undefined;
235
+ /** Offset is the zero-based page offset. */
236
+ "offset"?: number | undefined;
237
+ }
238
+ /** BoxItem contains selected metadata for one folder or search result. */
239
+ interface BoxItem {
240
+ /** ID is the stable Box item ID. */
241
+ "id": string;
242
+ /** Type is file, folder, or web_link. */
243
+ "type": string;
244
+ /** Name is the current item name. */
245
+ "name": string;
246
+ }
247
+ /** BoxItemPage contains one offset page of Box items. */
248
+ interface BoxItemPage {
249
+ /** Entries are the items in this page. */
250
+ "entries": Array<BoxItem> | null;
251
+ /** Limit is the provider page size. */
252
+ "limit": SignedInteger;
253
+ /** Offset is the zero-based provider page offset. */
254
+ "offset": SignedInteger;
255
+ /** TotalCount is Box's total-count bound for this listing. */
256
+ "total_count": SignedInteger;
257
+ }
258
+ /** SearchFilesInput searches accessible files by name or content. */
259
+ interface SearchFilesInput {
260
+ /** Query is Box search text; blank is invalid. */
261
+ "query": string;
262
+ /** Limit is 1 through 200 results; zero uses Box's default. */
263
+ "limit"?: number | undefined;
264
+ /** Offset is the zero-based result offset. */
265
+ "offset"?: number | undefined;
266
+ }
267
+ /** SearchFoldersInput searches accessible folders by name. */
268
+ interface SearchFoldersInput {
269
+ /** Query is Box search text; blank is invalid. */
270
+ "query": string;
271
+ /** Limit is 1 through 200 results; zero uses Box's default. */
272
+ "limit"?: number | undefined;
273
+ /** Offset is the zero-based result offset. */
274
+ "offset"?: number | undefined;
275
+ }
276
+ /** DeleteFileInput selects one Box file for deletion. */
277
+ interface DeleteFileInput {
278
+ /** FileID appears in Box Web's /files/<ID> URL. */
279
+ "fileId": string;
280
+ }
281
+ /** DeletedBoxItem records an item ID after Box accepts deletion. */
282
+ interface DeletedBoxItem {
283
+ /** ID is the file or folder ID accepted by Box. */
284
+ "id": string;
285
+ }
286
+ /** DeleteFolderInput selects one empty Box folder for deletion. */
287
+ interface DeleteFolderInput {
288
+ /** FolderID appears in Box Web's /folders/<ID> URL; root is not deletable. */
289
+ "folderId": string;
290
+ }
291
+ /** Runtime validator for CreateBoxFolderInput. */
292
+ declare const CreateBoxFolderInputSchema: z.ZodObject<{
293
+ parentId: z.ZodString;
294
+ name: z.ZodString;
295
+ }, z.core.$strict>;
296
+ /** Runtime validator for CreatedBoxItem. */
297
+ declare const CreatedBoxItemSchema: z.ZodObject<{
298
+ id: z.ZodString;
299
+ type: z.ZodString;
300
+ name: z.ZodString;
301
+ parentId: z.ZodString;
302
+ }, z.core.$strict>;
303
+ /** Runtime validator for CopyBoxFileInput. */
304
+ declare const CopyBoxFileInputSchema: z.ZodObject<{
305
+ fileId: z.ZodString;
306
+ parentId: z.ZodString;
307
+ name: z.ZodString;
308
+ }, z.core.$strict>;
309
+ /** Runtime validator for CopyBoxFolderInput. */
310
+ declare const CopyBoxFolderInputSchema: z.ZodObject<{
311
+ folderId: z.ZodString;
312
+ parentId: z.ZodString;
313
+ name: z.ZodString;
314
+ }, z.core.$strict>;
315
+ /** Runtime validator for UpdateBoxFileInput. */
316
+ declare const UpdateBoxFileInputSchema: z.ZodObject<{
317
+ fileId: z.ZodString;
318
+ name: z.ZodOptional<z.ZodString>;
319
+ parentId: z.ZodOptional<z.ZodString>;
320
+ sharedLinkAccess: z.ZodOptional<z.ZodString>;
321
+ }, z.core.$strict>;
322
+ /** Runtime validator for UpdatedBoxItem. */
323
+ declare const UpdatedBoxItemSchema: z.ZodObject<{
324
+ id: z.ZodString;
325
+ type: z.ZodString;
326
+ name: z.ZodString;
327
+ parentId: z.ZodOptional<z.ZodString>;
328
+ }, z.core.$strict>;
329
+ /** Runtime validator for UpdateBoxFolderInput. */
330
+ declare const UpdateBoxFolderInputSchema: z.ZodObject<{
331
+ folderId: z.ZodString;
332
+ name: z.ZodOptional<z.ZodString>;
333
+ parentId: z.ZodOptional<z.ZodString>;
334
+ sharedLinkAccess: z.ZodOptional<z.ZodString>;
335
+ }, z.core.$strict>;
336
+ /** Runtime validator for ShareBoxFileInput. */
337
+ declare const ShareBoxFileInputSchema: z.ZodObject<{
338
+ fileId: z.ZodString;
339
+ access: z.ZodString;
340
+ }, z.core.$strict>;
341
+ /** Runtime validator for ShareBoxFolderInput. */
342
+ declare const ShareBoxFolderInputSchema: z.ZodObject<{
343
+ folderId: z.ZodString;
344
+ access: z.ZodString;
345
+ }, z.core.$strict>;
346
+ /** Runtime validator for CreateBoxFileInput. */
347
+ declare const CreateBoxFileInputSchema: z.ZodObject<{
348
+ parentId: z.ZodString;
349
+ name: z.ZodString;
350
+ contentBase64: z.ZodString;
351
+ }, z.core.$strict>;
352
+ /** Runtime validator for CreatedBoxFile. */
353
+ declare const CreatedBoxFileSchema: z.ZodObject<{
354
+ fileId: z.ZodString;
355
+ name: z.ZodString;
356
+ sha1: z.ZodString;
357
+ parentId: z.ZodString;
358
+ }, z.core.$strict>;
359
+ /** Runtime validator for DownloadFileInput. */
360
+ declare const DownloadFileInputSchema: z.ZodObject<{
361
+ fileId: z.ZodString;
362
+ }, z.core.$strict>;
363
+ /** Runtime validator for DownloadedFile. */
364
+ declare const DownloadedFileSchema: z.ZodObject<{
365
+ fileId: z.ZodString;
366
+ contentBase64: z.ZodString;
367
+ contentBytes: z.ZodNumber;
368
+ }, z.core.$strict>;
369
+ /** Runtime validator for UploadFileInput. */
370
+ declare const UploadFileInputSchema: z.ZodObject<{
371
+ fileId: z.ZodString;
372
+ contentBase64: z.ZodString;
373
+ }, z.core.$strict>;
374
+ /** Runtime validator for UploadedFile. */
375
+ declare const UploadedFileSchema: z.ZodObject<{
376
+ fileId: z.ZodString;
377
+ name: z.ZodString;
378
+ sha1: z.ZodString;
379
+ }, z.core.$strict>;
380
+ /** Runtime validator for GetFileInput. */
381
+ declare const GetFileInputSchema: z.ZodObject<{
382
+ fileId: z.ZodString;
383
+ }, z.core.$strict>;
384
+ /** Runtime validator for BoxFile. */
385
+ declare const BoxFileSchema: z.ZodObject<{
386
+ id: z.ZodString;
387
+ type: z.ZodString;
388
+ name: z.ZodString;
389
+ size: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
390
+ rawJSON: string;
391
+ }>, unknown>>;
392
+ sha1: z.ZodString;
393
+ }, z.core.$strict>;
394
+ /** Runtime validator for GetFolderInput. */
395
+ declare const GetFolderInputSchema: z.ZodObject<{
396
+ folderId: z.ZodString;
397
+ }, z.core.$strict>;
398
+ /** Runtime validator for BoxFolder. */
399
+ declare const BoxFolderSchema: z.ZodObject<{
400
+ id: z.ZodString;
401
+ type: z.ZodString;
402
+ name: z.ZodString;
403
+ }, z.core.$strict>;
404
+ /** Runtime validator for ListFolderItemsInput. */
405
+ declare const ListFolderItemsInputSchema: z.ZodObject<{
406
+ folderId: z.ZodString;
407
+ limit: z.ZodOptional<z.ZodNumber>;
408
+ offset: z.ZodOptional<z.ZodNumber>;
409
+ }, z.core.$strict>;
410
+ /** Runtime validator for BoxItem. */
411
+ declare const BoxItemSchema: z.ZodObject<{
412
+ id: z.ZodString;
413
+ type: z.ZodString;
414
+ name: z.ZodString;
415
+ }, z.core.$strict>;
416
+ /** Runtime validator for BoxItemPage. */
417
+ declare const BoxItemPageSchema: z.ZodObject<{
418
+ entries: z.ZodNullable<z.ZodArray<z.ZodObject<{
419
+ id: z.ZodString;
420
+ type: z.ZodString;
421
+ name: z.ZodString;
422
+ }, z.core.$strict>>>;
423
+ limit: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
424
+ rawJSON: string;
425
+ }>, unknown>>;
426
+ offset: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
427
+ rawJSON: string;
428
+ }>, unknown>>;
429
+ total_count: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
430
+ rawJSON: string;
431
+ }>, unknown>>;
432
+ }, z.core.$strict>;
433
+ /** Runtime validator for SearchFilesInput. */
434
+ declare const SearchFilesInputSchema: z.ZodObject<{
435
+ query: z.ZodString;
436
+ limit: z.ZodOptional<z.ZodNumber>;
437
+ offset: z.ZodOptional<z.ZodNumber>;
438
+ }, z.core.$strict>;
439
+ /** Runtime validator for SearchFoldersInput. */
440
+ declare const SearchFoldersInputSchema: z.ZodObject<{
441
+ query: z.ZodString;
442
+ limit: z.ZodOptional<z.ZodNumber>;
443
+ offset: z.ZodOptional<z.ZodNumber>;
444
+ }, z.core.$strict>;
445
+ /** Runtime validator for DeleteFileInput. */
446
+ declare const DeleteFileInputSchema: z.ZodObject<{
447
+ fileId: z.ZodString;
448
+ }, z.core.$strict>;
449
+ /** Runtime validator for DeletedBoxItem. */
450
+ declare const DeletedBoxItemSchema: z.ZodObject<{
451
+ id: z.ZodString;
452
+ }, z.core.$strict>;
453
+ /** Runtime validator for DeleteFolderInput. */
454
+ declare const DeleteFolderInputSchema: z.ZodObject<{
455
+ folderId: z.ZodString;
456
+ }, z.core.$strict>;
457
+
458
+ /** Typed operations supplied by a client or mock. */
459
+ interface Operations {
460
+ /** Invoke createFolder through this connection. */
461
+ createFolder(): Mutation<CreateBoxFolderInput, CreatedBoxItem>;
462
+ /** Invoke copyFile through this connection. */
463
+ copyFile(): Mutation<CopyBoxFileInput, CreatedBoxItem>;
464
+ /** Invoke copyFolder through this connection. */
465
+ copyFolder(): Mutation<CopyBoxFolderInput, CreatedBoxItem>;
466
+ /** Invoke updateFile through this connection. */
467
+ updateFile(): Mutation<UpdateBoxFileInput, UpdatedBoxItem>;
468
+ /** Invoke updateFolder through this connection. */
469
+ updateFolder(): Mutation<UpdateBoxFolderInput, UpdatedBoxItem>;
470
+ /** Invoke shareFile through this connection. */
471
+ shareFile(): Mutation<ShareBoxFileInput, UpdatedBoxItem>;
472
+ /** Invoke shareFolder through this connection. */
473
+ shareFolder(): Mutation<ShareBoxFolderInput, UpdatedBoxItem>;
474
+ /** Invoke createFile through this connection. */
475
+ createFile(): Mutation<CreateBoxFileInput, CreatedBoxFile>;
476
+ /** Invoke downloadFile through this connection. */
477
+ downloadFile(): Query<DownloadFileInput, DownloadedFile>;
478
+ /** Invoke uploadFile through this connection. */
479
+ uploadFile(): Mutation<UploadFileInput, UploadedFile>;
480
+ /** Invoke getFile through this connection. */
481
+ getFile(): Query<GetFileInput, BoxFile>;
482
+ /** Invoke getFolder through this connection. */
483
+ getFolder(): Query<GetFolderInput, BoxFolder>;
484
+ /** Invoke listFolderItems through this connection. */
485
+ listFolderItems(): Query<ListFolderItemsInput, BoxItemPage>;
486
+ /** Invoke searchFiles through this connection. */
487
+ searchFiles(): Query<SearchFilesInput, BoxItemPage>;
488
+ /** Invoke searchFolders through this connection. */
489
+ searchFolders(): Query<SearchFoldersInput, BoxItemPage>;
490
+ /** Invoke deleteFile through this connection. */
491
+ deleteFile(): Mutation<DeleteFileInput, DeletedBoxItem>;
492
+ /** Invoke deleteFolder through this connection. */
493
+ deleteFolder(): Mutation<DeleteFolderInput, DeletedBoxItem>;
494
+ }
495
+ /** Named connector connection kept outside Flow state. */
496
+ declare class Connection<BoundOperations = Operations> {
497
+ /** Stable provider and connection name. */
498
+ readonly reference: ConnectionRef;
499
+ /** Bound provider operations. */
500
+ readonly operations: BoundOperations;
501
+ /** Validate a reference and bind operations. */
502
+ constructor(reference: ConnectionRef, operations: BoundOperations);
503
+ }
504
+ /** Bind a client to a named connection. */
505
+ declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
506
+ /** Bind scripted operations to a named connection. */
507
+ declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
508
+
509
+ export { SearchFoldersInputSchema as $, BoxItemSchema as A, type BoxFile as B, type CreateBoxFolderInput as C, type DownloadFileInput as D, ConfigSchema as E, CopyBoxFileInputSchema as F, type GetFileInput as G, CopyBoxFolderInputSchema as H, CreateBoxFileInputSchema as I, CreateBoxFolderInputSchema as J, CreatedBoxFileSchema as K, type ListFolderItemsInput as L, CreatedBoxItemSchema as M, CredentialMaterialError as N, type Operations as O, type CredentialSource as P, DeleteFileInputSchema as Q, DeleteFolderInputSchema as R, type ShareBoxFileInput as S, DeletedBoxItemSchema as T, type UploadFileInput as U, DownloadFileInputSchema as V, DownloadedFileSchema as W, GetFileInputSchema as X, GetFolderInputSchema as Y, ListFolderItemsInputSchema as Z, SearchFilesInputSchema as _, type DownloadedFile as a, ShareBoxFileInputSchema as a0, ShareBoxFolderInputSchema as a1, type SignedInteger as a2, UpdateBoxFileInputSchema as a3, UpdateBoxFolderInputSchema as a4, UpdatedBoxItemSchema as a5, UploadFileInputSchema as a6, UploadedFileSchema as a7, decodeCredentials as a8, decodeSharedCredentials as a9, decodeSignedInteger as aa, exactIntegerJSONCodec as ab, isCredentialMaterialError as ac, newConnection as ad, newConnectionWithOperations as ae, parseExactIntegerJSON as af, parseJSONNumberTokens as ag, type UploadedFile as b, type CreatedBoxItem as c, type CopyBoxFileInput as d, type CopyBoxFolderInput as e, type UpdatedBoxItem as f, type UpdateBoxFileInput as g, type UpdateBoxFolderInput as h, type ShareBoxFolderInput as i, type CreateBoxFileInput as j, type CreatedBoxFile as k, type GetFolderInput as l, type BoxFolder as m, type BoxItemPage as n, type SearchFilesInput as o, type SearchFoldersInput as p, type DeleteFileInput as q, type DeletedBoxItem as r, type DeleteFolderInput as s, type Config as t, type Credentials as u, Connection as v, BoxFileSchema as w, BoxFolderSchema as x, type BoxItem as y, BoxItemPageSchema as z };