@solidstarters/solid-core 1.2.107 → 1.2.109
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/controllers/import-transaction.controller.d.ts +1 -1
- package/dist/controllers/import-transaction.controller.js +1 -1
- package/dist/services/import-transaction.service.d.ts +5 -1
- package/dist/services/import-transaction.service.d.ts.map +1 -1
- package/dist/services/import-transaction.service.js +1 -1
- package/dist/services/import-transaction.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/services/import-transaction.service.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidstarters/solid-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.109",
|
|
4
4
|
"description": "This module is a NestJS module containing all the required core providers required by a Solid application",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -58,6 +58,11 @@ interface ImportMapping {
|
|
|
58
58
|
fieldName: string; // The name of the field in the model metadata to which the imported field is mapped
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
export interface ImportSyncResult {
|
|
62
|
+
status: string; // The status of the import transaction
|
|
63
|
+
importedIds: Array<number>; // The IDs of the records created during the import
|
|
64
|
+
}
|
|
65
|
+
|
|
61
66
|
@Injectable()
|
|
62
67
|
export class ImportTransactionService extends CRUDService<ImportTransaction> {
|
|
63
68
|
constructor(
|
|
@@ -227,7 +232,7 @@ export class ImportTransactionService extends CRUDService<ImportTransaction> {
|
|
|
227
232
|
};
|
|
228
233
|
}
|
|
229
234
|
|
|
230
|
-
async startImportSync(importTransactionId: number): Promise<
|
|
235
|
+
async startImportSync(importTransactionId: number): Promise<ImportSyncResult> {
|
|
231
236
|
// Load the import transaction for the given ID
|
|
232
237
|
const importTransaction = await this.loadImportTransaction(importTransactionId);
|
|
233
238
|
|
|
@@ -243,7 +248,7 @@ export class ImportTransactionService extends CRUDService<ImportTransaction> {
|
|
|
243
248
|
JSON.parse(importTransaction.mapping) as ImportMapping[], // Parse the mapping from the import transaction
|
|
244
249
|
importTransaction.modelMetadata,
|
|
245
250
|
);
|
|
246
|
-
return ids; // Return the IDs of the created records
|
|
251
|
+
return {status: importTransaction.status, importedIds: ids}; // Return the IDs of the created records
|
|
247
252
|
}
|
|
248
253
|
|
|
249
254
|
startImportAsync(importTransactionId: number): Promise<void> {
|