@sinoia/hubdoc-tools 1.3.4 → 1.3.6
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/dist/plugins/alfresco/index.d.ts +26 -0
- package/dist/plugins/alfresco/index.d.ts.map +1 -0
- package/dist/plugins/alfresco/index.js +405 -0
- package/dist/plugins/alfresco/index.js.map +1 -0
- package/dist/plugins/aws-s3/index.d.ts +23 -0
- package/dist/plugins/aws-s3/index.d.ts.map +1 -0
- package/dist/plugins/aws-s3/index.js +383 -0
- package/dist/plugins/aws-s3/index.js.map +1 -0
- package/dist/plugins/azure-blob/index.d.ts +23 -0
- package/dist/plugins/azure-blob/index.d.ts.map +1 -0
- package/dist/plugins/azure-blob/index.js +340 -0
- package/dist/plugins/azure-blob/index.js.map +1 -0
- package/dist/plugins/box/index.d.ts +26 -0
- package/dist/plugins/box/index.d.ts.map +1 -0
- package/dist/plugins/box/index.js +387 -0
- package/dist/plugins/box/index.js.map +1 -0
- package/dist/plugins/dropbox/index.d.ts +27 -0
- package/dist/plugins/dropbox/index.d.ts.map +1 -0
- package/dist/plugins/dropbox/index.js +375 -0
- package/dist/plugins/dropbox/index.js.map +1 -0
- package/dist/plugins/googledrive/index.d.ts +27 -0
- package/dist/plugins/googledrive/index.d.ts.map +1 -0
- package/dist/plugins/googledrive/index.js +383 -0
- package/dist/plugins/googledrive/index.js.map +1 -0
- package/dist/plugins/nuxeo/index.d.ts +24 -0
- package/dist/plugins/nuxeo/index.d.ts.map +1 -0
- package/dist/plugins/nuxeo/index.js +405 -0
- package/dist/plugins/nuxeo/index.js.map +1 -0
- package/dist/plugins/onedrive/index.d.ts +25 -0
- package/dist/plugins/onedrive/index.d.ts.map +1 -0
- package/dist/plugins/onedrive/index.js +362 -0
- package/dist/plugins/onedrive/index.js.map +1 -0
- package/dist/plugins/opentext/index.d.ts +26 -0
- package/dist/plugins/opentext/index.d.ts.map +1 -0
- package/dist/plugins/opentext/index.js +440 -0
- package/dist/plugins/opentext/index.js.map +1 -0
- package/dist/plugins/sharepoint/index.d.ts +27 -0
- package/dist/plugins/sharepoint/index.d.ts.map +1 -0
- package/dist/plugins/sharepoint/index.js +397 -0
- package/dist/plugins/sharepoint/index.js.map +1 -0
- package/package.json +7 -2
- package/plugins/aws-s3/index.ts +2 -2
- package/plugins/sharepoint/index.ts +1 -1
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const googleapis_1 = require("googleapis");
|
|
7
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
class GoogleDrivePlugin {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.name = 'googledrive';
|
|
12
|
+
this.version = '1.0.0';
|
|
13
|
+
this.description = 'Google Drive document source';
|
|
14
|
+
this.supportedOperations = ['import', 'export', 'both'];
|
|
15
|
+
}
|
|
16
|
+
async testConnection(config) {
|
|
17
|
+
try {
|
|
18
|
+
const driveConfig = config;
|
|
19
|
+
const auth = await this.createAuth(driveConfig);
|
|
20
|
+
const drive = googleapis_1.google.drive({ version: 'v3', auth });
|
|
21
|
+
const response = await drive.about.get({ fields: 'user' });
|
|
22
|
+
return !!response.data.user;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
console.error(`Google Drive connection test failed: ${error.message}`);
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async scan(config, options) {
|
|
30
|
+
this.config = config;
|
|
31
|
+
this.auth = await this.createAuth(this.config);
|
|
32
|
+
this.drive = googleapis_1.google.drive({ version: 'v3', auth: this.auth });
|
|
33
|
+
const sources = [];
|
|
34
|
+
const errors = [];
|
|
35
|
+
let totalSize = 0;
|
|
36
|
+
try {
|
|
37
|
+
const rootFolderId = this.config.rootFolderId || 'root';
|
|
38
|
+
const files = await this.scanFolder(rootFolderId, '', options);
|
|
39
|
+
for (const file of files) {
|
|
40
|
+
if (file.mimeType && !file.mimeType.includes('folder')) {
|
|
41
|
+
const source = {
|
|
42
|
+
id: file.id,
|
|
43
|
+
name: file.name,
|
|
44
|
+
path: file.path,
|
|
45
|
+
size: parseInt(file.size || '0'),
|
|
46
|
+
mimeType: file.mimeType,
|
|
47
|
+
lastModified: new Date(file.modifiedTime),
|
|
48
|
+
metadata: {
|
|
49
|
+
googleDriveId: file.id,
|
|
50
|
+
parents: file.parents,
|
|
51
|
+
webViewLink: file.webViewLink
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
// Apply filters
|
|
55
|
+
if (this.shouldIncludeSource(source, options)) {
|
|
56
|
+
sources.push(source);
|
|
57
|
+
totalSize += source.size;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
sources,
|
|
63
|
+
totalCount: sources.length,
|
|
64
|
+
totalSize,
|
|
65
|
+
errors
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
return {
|
|
70
|
+
sources: [],
|
|
71
|
+
totalCount: 0,
|
|
72
|
+
totalSize: 0,
|
|
73
|
+
errors: [`Google Drive scan failed: ${error.message}`]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async scanFolder(folderId, parentPath, options) {
|
|
78
|
+
if (!this.drive)
|
|
79
|
+
throw new Error('Drive client not initialized');
|
|
80
|
+
const allFiles = [];
|
|
81
|
+
let pageToken;
|
|
82
|
+
do {
|
|
83
|
+
try {
|
|
84
|
+
const response = await this.drive.files.list({
|
|
85
|
+
q: `'${folderId}' in parents and trashed=false`,
|
|
86
|
+
fields: 'nextPageToken, files(id, name, mimeType, size, modifiedTime, parents, webViewLink)',
|
|
87
|
+
pageSize: 1000,
|
|
88
|
+
pageToken
|
|
89
|
+
});
|
|
90
|
+
const files = response.data.files || [];
|
|
91
|
+
for (const file of files) {
|
|
92
|
+
const filePath = parentPath ? `${parentPath}/${file.name}` : file.name;
|
|
93
|
+
file.path = filePath;
|
|
94
|
+
if (file.mimeType === 'application/vnd.google-apps.folder') {
|
|
95
|
+
// Recursively scan subfolders
|
|
96
|
+
const subFiles = await this.scanFolder(file.id, filePath, options);
|
|
97
|
+
allFiles.push(...subFiles);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
allFiles.push(file);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
pageToken = response.data.nextPageToken || undefined;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.warn(`Warning: Failed to scan folder ${folderId}: ${error.message}`);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
} while (pageToken);
|
|
110
|
+
return allFiles;
|
|
111
|
+
}
|
|
112
|
+
async import(config, sources, targetDir, options) {
|
|
113
|
+
this.config = config;
|
|
114
|
+
this.auth = await this.createAuth(this.config);
|
|
115
|
+
this.drive = googleapis_1.google.drive({ version: 'v3', auth: this.auth });
|
|
116
|
+
const results = [];
|
|
117
|
+
const batchSize = options?.batchSize || 5; // Google Drive has rate limits
|
|
118
|
+
// Process in batches
|
|
119
|
+
for (let i = 0; i < sources.length; i += batchSize) {
|
|
120
|
+
const batch = sources.slice(i, i + batchSize);
|
|
121
|
+
for (const source of batch) {
|
|
122
|
+
const result = await this.importSingle(source, targetDir);
|
|
123
|
+
results.push(result);
|
|
124
|
+
// Small delay to respect rate limits
|
|
125
|
+
await this.sleep(200);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return results;
|
|
129
|
+
}
|
|
130
|
+
async importSingle(source, targetDir) {
|
|
131
|
+
try {
|
|
132
|
+
if (!this.drive)
|
|
133
|
+
throw new Error('Drive client not initialized');
|
|
134
|
+
const targetPath = path_1.default.join(targetDir, source.path);
|
|
135
|
+
const targetDirectory = path_1.default.dirname(targetPath);
|
|
136
|
+
await fs_extra_1.default.ensureDir(targetDirectory);
|
|
137
|
+
// Handle Google Workspace documents (export to common formats)
|
|
138
|
+
if (this.isGoogleWorkspaceDoc(source.mimeType)) {
|
|
139
|
+
const exportMimeType = this.getExportMimeType(source.mimeType);
|
|
140
|
+
const exportExt = this.getExportExtension(exportMimeType);
|
|
141
|
+
const exportPath = targetPath.replace(path_1.default.extname(targetPath), exportExt);
|
|
142
|
+
const response = await this.drive.files.export({
|
|
143
|
+
fileId: source.id,
|
|
144
|
+
mimeType: exportMimeType
|
|
145
|
+
}, { responseType: 'stream' });
|
|
146
|
+
const writer = fs_extra_1.default.createWriteStream(exportPath);
|
|
147
|
+
response.data.pipe(writer);
|
|
148
|
+
return new Promise((resolve) => {
|
|
149
|
+
writer.on('finish', async () => {
|
|
150
|
+
const stats = await fs_extra_1.default.stat(exportPath);
|
|
151
|
+
resolve({
|
|
152
|
+
success: true,
|
|
153
|
+
source,
|
|
154
|
+
localPath: exportPath,
|
|
155
|
+
bytesTransferred: stats.size
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
writer.on('error', (error) => {
|
|
159
|
+
resolve({
|
|
160
|
+
success: false,
|
|
161
|
+
source,
|
|
162
|
+
error: error.message
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
// Regular file download
|
|
169
|
+
const response = await this.drive.files.get({
|
|
170
|
+
fileId: source.id,
|
|
171
|
+
alt: 'media'
|
|
172
|
+
}, { responseType: 'stream' });
|
|
173
|
+
const writer = fs_extra_1.default.createWriteStream(targetPath);
|
|
174
|
+
response.data.pipe(writer);
|
|
175
|
+
return new Promise((resolve) => {
|
|
176
|
+
writer.on('finish', () => {
|
|
177
|
+
resolve({
|
|
178
|
+
success: true,
|
|
179
|
+
source,
|
|
180
|
+
localPath: targetPath,
|
|
181
|
+
bytesTransferred: source.size
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
writer.on('error', (error) => {
|
|
185
|
+
resolve({
|
|
186
|
+
success: false,
|
|
187
|
+
source,
|
|
188
|
+
error: error.message
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
return {
|
|
196
|
+
success: false,
|
|
197
|
+
source,
|
|
198
|
+
error: error.message
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async export(config, localSources, options) {
|
|
203
|
+
this.config = config;
|
|
204
|
+
this.auth = await this.createAuth(this.config);
|
|
205
|
+
this.drive = googleapis_1.google.drive({ version: 'v3', auth: this.auth });
|
|
206
|
+
const results = [];
|
|
207
|
+
const rootFolderId = this.config.rootFolderId || 'root';
|
|
208
|
+
for (const source of localSources) {
|
|
209
|
+
try {
|
|
210
|
+
// Determine target folder
|
|
211
|
+
let targetFolderId = rootFolderId;
|
|
212
|
+
if (options?.preserveStructure && source.path.includes('/')) {
|
|
213
|
+
const folderPath = path_1.default.dirname(source.path);
|
|
214
|
+
targetFolderId = await this.createFolderStructure(folderPath, rootFolderId);
|
|
215
|
+
}
|
|
216
|
+
// Upload file
|
|
217
|
+
const fileContent = await fs_extra_1.default.readFile(source.id);
|
|
218
|
+
const response = await this.drive.files.create({
|
|
219
|
+
requestBody: {
|
|
220
|
+
name: source.name,
|
|
221
|
+
parents: [targetFolderId]
|
|
222
|
+
},
|
|
223
|
+
media: {
|
|
224
|
+
mimeType: source.mimeType,
|
|
225
|
+
body: fileContent
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
const targetPath = options?.preserveStructure ? source.path : source.name;
|
|
229
|
+
results.push({
|
|
230
|
+
success: true,
|
|
231
|
+
targetPath,
|
|
232
|
+
source,
|
|
233
|
+
bytesTransferred: source.size
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
results.push({
|
|
238
|
+
success: false,
|
|
239
|
+
targetPath: options?.targetPath || '',
|
|
240
|
+
source,
|
|
241
|
+
error: error.message
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return results;
|
|
246
|
+
}
|
|
247
|
+
async createFolderStructure(folderPath, parentId) {
|
|
248
|
+
if (!this.drive)
|
|
249
|
+
throw new Error('Drive client not initialized');
|
|
250
|
+
const parts = folderPath.split('/').filter(part => part.length > 0);
|
|
251
|
+
let currentParentId = parentId;
|
|
252
|
+
for (const folderName of parts) {
|
|
253
|
+
// Check if folder already exists
|
|
254
|
+
const existingFolder = await this.drive.files.list({
|
|
255
|
+
q: `name='${folderName}' and '${currentParentId}' in parents and mimeType='application/vnd.google-apps.folder' and trashed=false`,
|
|
256
|
+
fields: 'files(id)'
|
|
257
|
+
});
|
|
258
|
+
if (existingFolder.data.files && existingFolder.data.files.length > 0) {
|
|
259
|
+
currentParentId = existingFolder.data.files[0].id;
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
// Create new folder
|
|
263
|
+
const newFolder = await this.drive.files.create({
|
|
264
|
+
requestBody: {
|
|
265
|
+
name: folderName,
|
|
266
|
+
mimeType: 'application/vnd.google-apps.folder',
|
|
267
|
+
parents: [currentParentId]
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
currentParentId = newFolder.data.id;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return currentParentId;
|
|
274
|
+
}
|
|
275
|
+
getConfigSchema() {
|
|
276
|
+
return {
|
|
277
|
+
type: 'object',
|
|
278
|
+
properties: {
|
|
279
|
+
clientId: {
|
|
280
|
+
type: 'string',
|
|
281
|
+
description: 'Google OAuth2 Client ID',
|
|
282
|
+
required: true
|
|
283
|
+
},
|
|
284
|
+
clientSecret: {
|
|
285
|
+
type: 'string',
|
|
286
|
+
description: 'Google OAuth2 Client Secret',
|
|
287
|
+
required: true
|
|
288
|
+
},
|
|
289
|
+
redirectUri: {
|
|
290
|
+
type: 'string',
|
|
291
|
+
description: 'OAuth2 Redirect URI',
|
|
292
|
+
required: true
|
|
293
|
+
},
|
|
294
|
+
accessToken: {
|
|
295
|
+
type: 'string',
|
|
296
|
+
description: 'OAuth2 Access Token (will be obtained automatically)',
|
|
297
|
+
required: false
|
|
298
|
+
},
|
|
299
|
+
refreshToken: {
|
|
300
|
+
type: 'string',
|
|
301
|
+
description: 'OAuth2 Refresh Token (will be obtained automatically)',
|
|
302
|
+
required: false
|
|
303
|
+
},
|
|
304
|
+
rootFolderId: {
|
|
305
|
+
type: 'string',
|
|
306
|
+
description: 'Root folder ID to scan (defaults to root)',
|
|
307
|
+
default: 'root'
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
required: ['clientId', 'clientSecret', 'redirectUri']
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
async initialize(config) {
|
|
314
|
+
this.config = config;
|
|
315
|
+
if (!this.config.accessToken) {
|
|
316
|
+
throw new Error('Google Drive authentication required. Please run authentication flow first.');
|
|
317
|
+
}
|
|
318
|
+
this.auth = await this.createAuth(this.config);
|
|
319
|
+
}
|
|
320
|
+
async destroy() {
|
|
321
|
+
this.config = undefined;
|
|
322
|
+
this.drive = undefined;
|
|
323
|
+
this.auth = undefined;
|
|
324
|
+
}
|
|
325
|
+
async createAuth(config) {
|
|
326
|
+
const auth = new googleapis_1.google.auth.OAuth2(config.clientId, config.clientSecret, config.redirectUri);
|
|
327
|
+
if (config.accessToken) {
|
|
328
|
+
auth.setCredentials({
|
|
329
|
+
access_token: config.accessToken,
|
|
330
|
+
refresh_token: config.refreshToken
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
return auth;
|
|
334
|
+
}
|
|
335
|
+
isGoogleWorkspaceDoc(mimeType) {
|
|
336
|
+
return [
|
|
337
|
+
'application/vnd.google-apps.document',
|
|
338
|
+
'application/vnd.google-apps.spreadsheet',
|
|
339
|
+
'application/vnd.google-apps.presentation'
|
|
340
|
+
].includes(mimeType);
|
|
341
|
+
}
|
|
342
|
+
getExportMimeType(googleMimeType) {
|
|
343
|
+
const exportMap = {
|
|
344
|
+
'application/vnd.google-apps.document': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
345
|
+
'application/vnd.google-apps.spreadsheet': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
346
|
+
'application/vnd.google-apps.presentation': 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
|
|
347
|
+
};
|
|
348
|
+
return exportMap[googleMimeType] || 'application/pdf';
|
|
349
|
+
}
|
|
350
|
+
getExportExtension(mimeType) {
|
|
351
|
+
const extensionMap = {
|
|
352
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx',
|
|
353
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': '.xlsx',
|
|
354
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation': '.pptx',
|
|
355
|
+
'application/pdf': '.pdf'
|
|
356
|
+
};
|
|
357
|
+
return extensionMap[mimeType] || '.pdf';
|
|
358
|
+
}
|
|
359
|
+
shouldIncludeSource(source, options) {
|
|
360
|
+
// Apply size filter
|
|
361
|
+
if (options?.filters?.maxSize && source.size > options.filters.maxSize) {
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
// Apply date range filter
|
|
365
|
+
if (options?.filters?.dateRange) {
|
|
366
|
+
const { from, to } = options.filters.dateRange;
|
|
367
|
+
if (from && source.lastModified < from)
|
|
368
|
+
return false;
|
|
369
|
+
if (to && source.lastModified > to)
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
// Apply MIME type filter
|
|
373
|
+
if (options?.filters?.mimeTypes && !options.filters.mimeTypes.includes(source.mimeType)) {
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
sleep(ms) {
|
|
379
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
exports.default = GoogleDrivePlugin;
|
|
383
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../plugins/googledrive/index.ts"],"names":[],"mappings":";;;;;AAAA,2CAA8C;AAC9C,wDAA0B;AAC1B,gDAAwB;AAqBxB,MAAqB,iBAAiB;IAAtC;QACW,SAAI,GAAG,aAAa,CAAC;QACrB,YAAO,GAAG,OAAO,CAAC;QAClB,gBAAW,GAAG,8BAA8B,CAAC;QAC7C,wBAAmB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;IAmbvE,CAAC;IA7aC,KAAK,CAAC,cAAc,CAAC,MAAoB;QACvC,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,MAA2B,CAAC;YAChD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,mBAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAEpD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAC3D,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,wCAAwC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACvE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,MAAoB,EAAE,OAA6B;QAC5D,IAAI,CAAC,MAAM,GAAG,MAA2B,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC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AAE,OAAO,KAAK,CAAC;QACnD,CAAC;QAED,yBAAyB;QACzB,IAAI,OAAO,EAAE,OAAO,EAAE,SAAS,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxF,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,EAAU;QACtB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IACzD,CAAC;CACF;AAvbD,oCAubC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DocumentSourcePlugin, DocumentSource, PluginConfig, ScanResult, PluginImportOptions, PluginExportOptions, ImportResult, ExportResult } from '../../src/types/plugins';
|
|
2
|
+
export default class NuxeoPlugin implements DocumentSourcePlugin {
|
|
3
|
+
readonly name = "nuxeo";
|
|
4
|
+
readonly version = "1.0.0";
|
|
5
|
+
readonly description = "Nuxeo ECM document source";
|
|
6
|
+
readonly supportedOperations: readonly ["import", "export", "both"];
|
|
7
|
+
private config?;
|
|
8
|
+
private apiClient?;
|
|
9
|
+
testConnection(config: PluginConfig): Promise<boolean>;
|
|
10
|
+
scan(config: PluginConfig, options?: PluginImportOptions): Promise<ScanResult>;
|
|
11
|
+
private scanPath;
|
|
12
|
+
import(config: PluginConfig, sources: DocumentSource[], targetDir: string, options?: PluginImportOptions): Promise<ImportResult[]>;
|
|
13
|
+
private importSingle;
|
|
14
|
+
export?(config: PluginConfig, localSources: DocumentSource[], options?: PluginExportOptions): Promise<ExportResult[]>;
|
|
15
|
+
private createFolderStructure;
|
|
16
|
+
getConfigSchema(): Record<string, any>;
|
|
17
|
+
initialize(config: PluginConfig): Promise<void>;
|
|
18
|
+
destroy(): Promise<void>;
|
|
19
|
+
private createApiClient;
|
|
20
|
+
private getDocumentPath;
|
|
21
|
+
private shouldIncludeSource;
|
|
22
|
+
private sleep;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../plugins/nuxeo/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACb,MAAM,yBAAyB,CAAC;AAwCjC,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,oBAAoB;IAC9D,QAAQ,CAAC,IAAI,WAAW;IACxB,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,WAAW,+BAA+B;IACnD,QAAQ,CAAC,mBAAmB,wCAAyC;IAErE,OAAO,CAAC,MAAM,CAAC,CAAc;IAC7B,OAAO,CAAC,SAAS,CAAC,CAAgB;IAE5B,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtD,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;YA0EtE,QAAQ;IAqDhB,MAAM,CACV,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,cAAc,EAAE,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,YAAY,EAAE,CAAC;YAuBZ,YAAY;IA4CpB,MAAM,CAAC,CACX,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,cAAc,EAAE,EAC9B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,YAAY,EAAE,CAAC;YA+EZ,qBAAqB;IA+CnC,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAuChC,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,C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