@composio/core 0.32.0 → 0.33.1-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{CustomTool-CBx9kzea.d.mts → CustomTool-BI7pmomm.d.mts} +1 -1
  2. package/dist/{Telemetry-BWKZmDxM.mjs → Telemetry-CcCuFVUb.mjs} +1 -1
  3. package/dist/{composio-CPf6NHnB.d.mts → composio-xb_x1ykP.d.mts} +88 -57
  4. package/dist/{customTool.types-BSbIG1OG.d.mts → customTool.types-CneGTXg4.d.mts} +310 -56
  5. package/dist/docs/reference/sdk-reference/typescript/connected-accounts.mdx +52 -8
  6. package/dist/experimental/index.d.mts +2 -2
  7. package/dist/{fileUtils.node-BJUYMEph.mjs → fileUtils.node-DPMtE0ER.mjs} +1 -65
  8. package/dist/index.d.mts +5 -238
  9. package/dist/index.mjs +52 -23
  10. package/dist/jsonSchema-CDHLYm7d.d.mts +237 -0
  11. package/dist/{jsonSchema-BZoXGUCr.mjs → jsonSchema-CfZwBS13.mjs} +5 -1
  12. package/dist/models/Files.node.mjs +3 -3
  13. package/dist/{sensitiveFileUploadPaths-CcbMAYCC.mjs → sensitiveFileUploadPaths-6NcnFSyX.mjs} +61 -70
  14. package/dist/{types-ns3Q_WrP.d.mts → types-B6qJOxJX.d.mts} +2 -2
  15. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
  16. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
  17. package/dist/utils/json-schema.d.mts +2 -1
  18. package/dist/utils/json-schema.mjs +2 -1
  19. package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
  20. package/dist/utils/modifiers/FileToolModifier.node.mjs +3 -3
  21. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
  22. package/package.json +6 -6
  23. package/src/models/ConnectedAccounts.ts +71 -11
  24. package/src/types/connectedAccounts.types.ts +59 -1
  25. package/src/types/toolRouter.types.ts +2 -1
  26. package/src/utils/fileUtils.node.ts +1 -83
  27. package/src/utils/json-schema.ts +6 -0
  28. package/src/utils/jsonSchema.ts +17 -4
  29. package/src/utils/mime.ts +25 -385
  30. package/src/utils/mimeTables.generated.ts +356 -0
@@ -0,0 +1,356 @@
1
+ // Generated from test/fixtures/mime/contract.json. Do not edit: change the contract and run
2
+ // `node test/fixtures/mime/generate-mime-tables.mjs`.
3
+
4
+ export const DEFAULT_MIME_TYPE = 'application/octet-stream';
5
+
6
+ export const EXTENSION_BY_MIME_TYPE: Readonly<Record<string, string>> = {
7
+ 'text/plain': 'txt',
8
+ 'text/html': 'html',
9
+ 'text/css': 'css',
10
+ 'text/csv': 'csv',
11
+ 'text/javascript': 'js',
12
+ 'application/json': 'json',
13
+ 'application/xml': 'xml',
14
+ 'application/pdf': 'pdf',
15
+ 'application/zip': 'zip',
16
+ 'application/x-zip-compressed': 'zip',
17
+ 'application/gzip': 'gz',
18
+ 'application/octet-stream': 'bin',
19
+ 'application/x-tar': 'tar',
20
+ 'application/msword': 'doc',
21
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'docx',
22
+ 'application/vnd.ms-excel': 'xls',
23
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx',
24
+ 'application/vnd.ms-powerpoint': 'ppt',
25
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'pptx',
26
+ 'image/jpeg': 'jpg',
27
+ 'image/jpg': 'jpg',
28
+ 'image/png': 'png',
29
+ 'image/gif': 'gif',
30
+ 'image/svg+xml': 'svg',
31
+ 'image/webp': 'webp',
32
+ 'image/bmp': 'bmp',
33
+ 'image/tiff': 'tiff',
34
+ 'audio/mpeg': 'mp3',
35
+ 'audio/wav': 'wav',
36
+ 'audio/ogg': 'ogg',
37
+ 'video/mp4': 'mp4',
38
+ 'video/mpeg': 'mpeg',
39
+ 'video/quicktime': 'mov',
40
+ 'video/x-msvideo': 'avi',
41
+ 'video/webm': 'webm',
42
+ };
43
+
44
+ export const MIME_TYPES_BY_EXTENSION: Readonly<Record<string, string>> = {
45
+ '3g2': 'video/3gpp2',
46
+ '3gp': 'video/3gpp',
47
+ '3gpp': 'video/3gpp',
48
+ '7z': 'application/x-7z-compressed',
49
+ aab: 'application/x-authorware-bin',
50
+ aac: 'audio/aac',
51
+ aam: 'application/x-authorware-map',
52
+ aas: 'application/x-authorware-seg',
53
+ adts: 'audio/aac',
54
+ ai: 'application/postscript',
55
+ aif: 'audio/x-aiff',
56
+ aifc: 'audio/x-aiff',
57
+ aiff: 'audio/x-aiff',
58
+ arc: 'application/x-freearc',
59
+ arj: 'application/x-arj',
60
+ asf: 'video/x-ms-asf',
61
+ asm: 'text/x-asm',
62
+ asx: 'video/x-ms-asf',
63
+ au: 'audio/basic',
64
+ avi: 'video/x-msvideo',
65
+ avif: 'image/avif',
66
+ bat: 'application/x-msdownload',
67
+ bcpio: 'application/x-bcpio',
68
+ bmp: 'image/bmp',
69
+ book: 'application/vnd.framemaker',
70
+ boz: 'application/x-bzip2',
71
+ bz: 'application/x-bzip',
72
+ bz2: 'application/x-bzip2',
73
+ c: 'text/x-c',
74
+ cat: 'application/vnd.ms-pki.seccat',
75
+ cc: 'text/x-c',
76
+ cco: 'application/x-cocoa',
77
+ cdf: 'application/x-netcdf',
78
+ cer: 'application/pkix-cert',
79
+ chat: 'application/x-chat',
80
+ class: 'application/java-vm',
81
+ com: 'application/x-msdownload',
82
+ conf: 'text/plain',
83
+ cpio: 'application/x-cpio',
84
+ cpp: 'text/x-c',
85
+ cpt: 'application/mac-compactpro',
86
+ crl: 'application/pkix-crl',
87
+ crt: 'application/x-x509-ca-cert',
88
+ csh: 'application/x-csh',
89
+ css: 'text/css',
90
+ csv: 'text/csv',
91
+ cxx: 'text/x-c',
92
+ dcr: 'application/x-director',
93
+ def: 'text/plain',
94
+ der: 'application/x-x509-ca-cert',
95
+ dir: 'application/x-director',
96
+ doc: 'application/msword',
97
+ docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
98
+ dot: 'application/msword',
99
+ dp: 'application/vnd.osgi.dp',
100
+ dvi: 'application/x-dvi',
101
+ dwf: 'model/vnd.dwf',
102
+ dwg: 'image/vnd.dwg',
103
+ dxf: 'image/vnd.dxf',
104
+ dxr: 'application/x-director',
105
+ eml: 'message/rfc822',
106
+ eot: 'application/vnd.ms-fontobject',
107
+ eps: 'application/postscript',
108
+ epub: 'application/epub+zip',
109
+ etx: 'text/x-setext',
110
+ evy: 'application/x-envoy',
111
+ f: 'text/x-fortran',
112
+ f77: 'text/x-fortran',
113
+ f90: 'text/x-fortran',
114
+ fdf: 'application/fdf',
115
+ flac: 'audio/x-flac',
116
+ fli: 'video/x-fli',
117
+ flo: 'application/vnd.micrografx.flo',
118
+ flx: 'text/vnd.fmi.flexstor',
119
+ for: 'text/x-fortran',
120
+ fpx: 'image/vnd.fpx',
121
+ g3: 'image/g3fax',
122
+ gif: 'image/gif',
123
+ gtar: 'application/x-gtar',
124
+ gz: 'application/gzip',
125
+ h: 'text/x-c',
126
+ hdf: 'application/x-hdf',
127
+ heic: 'image/heic',
128
+ heif: 'image/heif',
129
+ hh: 'text/x-c',
130
+ hlp: 'application/winhlp',
131
+ hpgl: 'application/vnd.hp-hpgl',
132
+ hqx: 'application/mac-binhex40',
133
+ htc: 'text/x-component',
134
+ htm: 'text/html',
135
+ html: 'text/html',
136
+ ice: 'x-conference/x-cooltalk',
137
+ ico: 'image/vnd.microsoft.icon',
138
+ ics: 'text/calendar',
139
+ ief: 'image/ief',
140
+ iges: 'model/iges',
141
+ igs: 'model/iges',
142
+ jam: 'application/vnd.jam',
143
+ java: 'text/x-java-source',
144
+ jfif: 'image/pjpeg',
145
+ jpe: 'image/jpeg',
146
+ jpeg: 'image/jpeg',
147
+ jpg: 'image/jpeg',
148
+ js: 'text/javascript',
149
+ json: 'application/json',
150
+ kar: 'audio/midi',
151
+ key: 'application/vnd.apple.keynote',
152
+ latex: 'application/x-latex',
153
+ lha: 'application/x-lzh-compressed',
154
+ list: 'text/plain',
155
+ log: 'text/plain',
156
+ lzh: 'application/x-lzh-compressed',
157
+ m1v: 'video/mpeg',
158
+ m2a: 'audio/mpeg',
159
+ m2v: 'video/mpeg',
160
+ m3u: 'audio/x-mpegurl',
161
+ m3u8: 'application/vnd.apple.mpegurl',
162
+ m4a: 'audio/mp4',
163
+ man: 'text/troff',
164
+ map: 'application/json',
165
+ mcd: 'application/vnd.mcd',
166
+ md: 'text/markdown',
167
+ me: 'text/troff',
168
+ mht: 'message/rfc822',
169
+ mhtml: 'message/rfc822',
170
+ mid: 'audio/midi',
171
+ midi: 'audio/midi',
172
+ mif: 'application/vnd.mif',
173
+ mime: 'message/rfc822',
174
+ mjs: 'text/javascript',
175
+ mka: 'audio/x-matroska',
176
+ mkv: 'video/x-matroska',
177
+ mov: 'video/quicktime',
178
+ movie: 'video/x-sgi-movie',
179
+ mp2: 'audio/mpeg',
180
+ mp3: 'audio/mpeg',
181
+ mp4: 'video/mp4',
182
+ mpc: 'application/vnd.mophun.certificate',
183
+ mpe: 'video/mpeg',
184
+ mpeg: 'video/mpeg',
185
+ mpg: 'video/mpeg',
186
+ mpga: 'audio/mpeg',
187
+ mpp: 'application/dash-patch+xml',
188
+ mpt: 'application/vnd.ms-project',
189
+ mrc: 'application/marc',
190
+ ms: 'text/troff',
191
+ nc: 'application/x-netcdf',
192
+ nsc: 'application/x-conference',
193
+ numbers: 'application/vnd.apple.numbers',
194
+ obj: 'model/obj',
195
+ oda: 'application/oda',
196
+ odg: 'application/vnd.oasis.opendocument.graphics',
197
+ odp: 'application/vnd.oasis.opendocument.presentation',
198
+ ods: 'application/vnd.oasis.opendocument.spreadsheet',
199
+ odt: 'application/vnd.oasis.opendocument.text',
200
+ ogg: 'audio/ogg',
201
+ opus: 'audio/ogg',
202
+ otf: 'font/otf',
203
+ p: 'text/x-pascal',
204
+ p10: 'application/pkcs10',
205
+ p12: 'application/x-pkcs12',
206
+ p7c: 'application/pkcs7-mime',
207
+ p7m: 'application/pkcs7-mime',
208
+ p7r: 'application/x-pkcs7-certreqresp',
209
+ p7s: 'application/pkcs7-signature',
210
+ pages: 'application/vnd.apple.pages',
211
+ pas: 'text/x-pascal',
212
+ pbm: 'image/x-portable-bitmap',
213
+ pcl: 'application/vnd.hp-pcl',
214
+ pct: 'image/x-pict',
215
+ pcx: 'image/vnd.zbrush.pcx',
216
+ pdb: 'application/vnd.palm',
217
+ pdf: 'application/pdf',
218
+ pfx: 'application/x-pkcs12',
219
+ pgm: 'image/x-portable-graymap',
220
+ pic: 'image/x-pict',
221
+ pl: 'application/x-perl',
222
+ pm: 'application/x-perl',
223
+ png: 'image/png',
224
+ pnm: 'image/x-portable-anymap',
225
+ pot: 'application/vnd.ms-powerpoint',
226
+ ppm: 'image/x-portable-pixmap',
227
+ pps: 'application/vnd.ms-powerpoint',
228
+ ppt: 'application/vnd.ms-powerpoint',
229
+ pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
230
+ pre: 'application/vnd.lotus-freelance',
231
+ ps: 'application/postscript',
232
+ psd: 'image/vnd.adobe.photoshop',
233
+ pyo: 'model/vnd.pytha.pyox',
234
+ qt: 'video/quicktime',
235
+ ra: 'audio/x-pn-realaudio',
236
+ ram: 'audio/x-pn-realaudio',
237
+ rar: 'application/vnd.rar',
238
+ ras: 'image/x-cmu-raster',
239
+ rdf: 'application/rdf+xml',
240
+ rgb: 'image/x-rgb',
241
+ rm: 'application/vnd.rn-realmedia',
242
+ rmi: 'audio/midi',
243
+ rmp: 'audio/x-pn-realaudio-plugin',
244
+ rng: 'application/xml',
245
+ roff: 'text/troff',
246
+ rpm: 'application/x-redhat-package-manager',
247
+ rtf: 'application/rtf',
248
+ rtx: 'text/richtext',
249
+ s: 'text/x-asm',
250
+ s3m: 'audio/s3m',
251
+ scm: 'application/vnd.lotus-screencam',
252
+ sdp: 'application/sdp',
253
+ sea: 'application/x-sea',
254
+ sgm: 'text/sgml',
255
+ sgml: 'text/sgml',
256
+ sh: 'application/x-sh',
257
+ shar: 'application/x-shar',
258
+ shtml: 'text/html',
259
+ sid: 'image/x-mrsid-image',
260
+ sit: 'application/x-stuffit',
261
+ skd: 'application/vnd.koan',
262
+ skm: 'application/vnd.koan',
263
+ skp: 'application/vnd.koan',
264
+ skt: 'application/vnd.koan',
265
+ smi: 'application/smil+xml',
266
+ smil: 'application/smil+xml',
267
+ snd: 'audio/basic',
268
+ spc: 'application/x-pkcs7-certificates',
269
+ spl: 'application/x-futuresplash',
270
+ src: 'application/x-wais-source',
271
+ step: 'model/step',
272
+ stl: 'model/stl',
273
+ stp: 'model/step',
274
+ sv4cpio: 'application/x-sv4cpio',
275
+ sv4crc: 'application/x-sv4crc',
276
+ svg: 'image/svg+xml',
277
+ swf: 'application/x-shockwave-flash',
278
+ t: 'text/troff',
279
+ tar: 'application/x-tar',
280
+ tcl: 'application/x-tcl',
281
+ tex: 'application/x-tex',
282
+ texi: 'application/x-texinfo',
283
+ texinfo: 'application/x-texinfo',
284
+ text: 'text/plain',
285
+ tif: 'image/tiff',
286
+ tiff: 'image/tiff',
287
+ tr: 'text/troff',
288
+ ts: 'video/mp2t',
289
+ tsv: 'text/tab-separated-values',
290
+ txt: 'text/plain',
291
+ uri: 'text/uri-list',
292
+ uris: 'text/uri-list',
293
+ ustar: 'application/x-ustar',
294
+ uu: 'text/x-uuencode',
295
+ vcd: 'application/x-cdlink',
296
+ vcf: 'text/x-vcard',
297
+ vcs: 'text/x-vcalendar',
298
+ viv: 'video/vnd.vivo',
299
+ vox: 'application/x-authorware-bin',
300
+ vrml: 'model/vrml',
301
+ vsd: 'application/vnd.visio',
302
+ vst: 'application/vnd.visio',
303
+ vsw: 'application/vnd.visio',
304
+ wasm: 'application/wasm',
305
+ wav: 'audio/wav',
306
+ wbmp: 'image/vnd.wap.wbmp',
307
+ webm: 'video/webm',
308
+ webmanifest: 'application/manifest+json',
309
+ webp: 'image/webp',
310
+ wmf: 'image/wmf',
311
+ wml: 'text/vnd.wap.wml',
312
+ wmlc: 'application/vnd.wap.wmlc',
313
+ wmls: 'text/vnd.wap.wmlscript',
314
+ wmlsc: 'application/vnd.wap.wmlscriptc',
315
+ woff: 'font/woff',
316
+ woff2: 'font/woff2',
317
+ wpd: 'application/vnd.wordperfect',
318
+ wri: 'application/x-mswrite',
319
+ wrl: 'model/vrml',
320
+ wsc: 'message/vnd.wfa.wsc',
321
+ wsdl: 'application/wsdl+xml',
322
+ xbm: 'image/x-xbitmap',
323
+ xif: 'image/vnd.xiff',
324
+ xla: 'application/vnd.ms-excel',
325
+ xlc: 'application/vnd.ms-excel',
326
+ xlm: 'application/vnd.ms-excel',
327
+ xls: 'application/vnd.ms-excel',
328
+ xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
329
+ xlt: 'application/vnd.ms-excel',
330
+ xlw: 'application/vnd.ms-excel',
331
+ xm: 'audio/xm',
332
+ xml: 'application/xml',
333
+ xpm: 'image/x-xpixmap',
334
+ xsl: 'application/xml',
335
+ xul: 'application/vnd.mozilla.xul+xml',
336
+ xwd: 'image/x-xwindowdump',
337
+ xyz: 'chemical/x-xyz',
338
+ yaml: 'text/yaml',
339
+ yml: 'text/yaml',
340
+ zip: 'application/zip',
341
+ '3gpp2': 'audio/3gpp2',
342
+ ass: 'audio/aac',
343
+ h5: 'application/x-hdf5',
344
+ ksh: 'text/plain',
345
+ loas: 'audio/aac',
346
+ mpa: 'video/mpeg',
347
+ nws: 'message/rfc822',
348
+ ppa: 'application/vnd.ms-powerpoint',
349
+ pwz: 'application/vnd.ms-powerpoint',
350
+ py: 'text/x-python',
351
+ pyc: 'application/x-python-code',
352
+ tgz: 'application/gzip',
353
+ wiz: 'application/msword',
354
+ xlb: 'application/vnd.ms-excel',
355
+ xpdl: 'application/xml',
356
+ };