@en-solutions/tgm-client-sdk 1.6.21 → 1.7.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.
- package/esm2022/lib/models/admin/erp.models.mjs +1 -1
- package/esm2022/lib/models/api/company.models.mjs +1 -1
- package/esm2022/lib/services/admin/erp-admin.service.mjs +39 -1
- package/fesm2022/en-solutions-tgm-client-sdk.mjs +38 -0
- package/fesm2022/en-solutions-tgm-client-sdk.mjs.map +1 -1
- package/lib/models/admin/erp.models.d.ts +81 -0
- package/lib/models/api/company.models.d.ts +0 -1
- package/lib/services/admin/erp-admin.service.d.ts +26 -1
- package/package.json +1 -1
|
@@ -186,3 +186,84 @@ export interface ErpDashboardResponse {
|
|
|
186
186
|
connectionHealth?: any[];
|
|
187
187
|
upcomingSyncs?: any[];
|
|
188
188
|
}
|
|
189
|
+
export interface ErpEntitySchema {
|
|
190
|
+
entityName: string;
|
|
191
|
+
displayName: string;
|
|
192
|
+
odataPath?: string;
|
|
193
|
+
fields: ErpFieldSchema[];
|
|
194
|
+
keyFields: string[];
|
|
195
|
+
isReadOnly: boolean;
|
|
196
|
+
}
|
|
197
|
+
export interface ErpFieldSchema {
|
|
198
|
+
fieldName: string;
|
|
199
|
+
displayName: string;
|
|
200
|
+
dataType: 'STRING' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'ENUM' | string;
|
|
201
|
+
maxLength?: number;
|
|
202
|
+
isNullable: boolean;
|
|
203
|
+
isKey: boolean;
|
|
204
|
+
enumValues?: string[];
|
|
205
|
+
}
|
|
206
|
+
export interface SchemaDiscoveryResponse {
|
|
207
|
+
connectionId: number;
|
|
208
|
+
entities: ErpEntitySchema[];
|
|
209
|
+
discoveredAt: string;
|
|
210
|
+
}
|
|
211
|
+
export interface ConnectorInfo {
|
|
212
|
+
connectorName: string;
|
|
213
|
+
supportedErpTypes: string[];
|
|
214
|
+
supportedAuthTypes: string[];
|
|
215
|
+
capabilities: string[];
|
|
216
|
+
description: string;
|
|
217
|
+
}
|
|
218
|
+
export interface MappingTemplateDefinition {
|
|
219
|
+
templateId: string;
|
|
220
|
+
name: string;
|
|
221
|
+
description: string;
|
|
222
|
+
erpType: string;
|
|
223
|
+
version: string;
|
|
224
|
+
entityMappings: EntityMappingTemplate[];
|
|
225
|
+
}
|
|
226
|
+
export interface EntityMappingTemplate {
|
|
227
|
+
tgmEntityType: string;
|
|
228
|
+
tgmEntityDisplayName: string;
|
|
229
|
+
erpEntityName: string;
|
|
230
|
+
erpEntityDisplayName: string;
|
|
231
|
+
defaultDirection: 'INBOUND' | 'OUTBOUND' | 'BIDIRECTIONAL';
|
|
232
|
+
fieldMappings: FieldMappingTemplate[];
|
|
233
|
+
}
|
|
234
|
+
export interface FieldMappingTemplate {
|
|
235
|
+
tgmField: string;
|
|
236
|
+
tgmFieldDisplayName: string;
|
|
237
|
+
erpField: string;
|
|
238
|
+
erpFieldDisplayName: string;
|
|
239
|
+
dataType: string;
|
|
240
|
+
syncDirection: 'INBOUND' | 'OUTBOUND' | 'BIDIRECTIONAL';
|
|
241
|
+
isKeyField: boolean;
|
|
242
|
+
transformation?: Record<string, any>;
|
|
243
|
+
defaultValue?: string;
|
|
244
|
+
required: boolean;
|
|
245
|
+
}
|
|
246
|
+
export interface ApplyTemplateRequest {
|
|
247
|
+
templateId: string;
|
|
248
|
+
overwriteExisting?: boolean;
|
|
249
|
+
}
|
|
250
|
+
export interface SandboxSyncRequest {
|
|
251
|
+
entityType?: string;
|
|
252
|
+
maxRecords?: number;
|
|
253
|
+
}
|
|
254
|
+
export interface SandboxSyncResult {
|
|
255
|
+
jobId: number;
|
|
256
|
+
status: string;
|
|
257
|
+
preview: SandboxPreviewRecord[];
|
|
258
|
+
totalFetched: number;
|
|
259
|
+
totalTransformed: number;
|
|
260
|
+
errors: string[];
|
|
261
|
+
}
|
|
262
|
+
export interface SandboxPreviewRecord {
|
|
263
|
+
erpId: string;
|
|
264
|
+
erpEntityName: string;
|
|
265
|
+
tgmEntityType: string;
|
|
266
|
+
action: 'CREATE' | 'UPDATE' | 'SKIP';
|
|
267
|
+
transformedData: Record<string, any>;
|
|
268
|
+
originalData: Record<string, any>;
|
|
269
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { TgmHttpClient } from '../../core/http-client.service';
|
|
3
3
|
import { ApiResponse } from '../../models/base.models';
|
|
4
|
-
import { ErpConnectionRequest, ErpConnectionResponse, ErpEntityMappingRequest, ErpEntityMappingResponse, ErpSyncJobResponse, SyncScheduleConfigRequest, SyncScheduleConfigResponse, ErpDashboardResponse } from '../../models/admin/erp.models';
|
|
4
|
+
import { ErpConnectionRequest, ErpConnectionResponse, ErpEntityMappingRequest, ErpEntityMappingResponse, ErpSyncJobResponse, SyncScheduleConfigRequest, SyncScheduleConfigResponse, ErpDashboardResponse, ConnectorInfo, ErpEntitySchema, MappingTemplateDefinition, ApplyTemplateRequest, SandboxSyncRequest, SandboxSyncResult } from '../../models/admin/erp.models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class ErpAdminService {
|
|
7
7
|
private http;
|
|
@@ -36,6 +36,31 @@ export declare class ErpAdminService {
|
|
|
36
36
|
getDashboard(): Observable<ErpDashboardResponse>;
|
|
37
37
|
getSupportedErpTypes(): Observable<any[]>;
|
|
38
38
|
getSyncableEntities(): Observable<any[]>;
|
|
39
|
+
getAvailableConnectors(): Observable<ConnectorInfo[]>;
|
|
40
|
+
discoverSchema(connectionId: number): Observable<ErpEntitySchema[]>;
|
|
41
|
+
discoverEntitySchema(connectionId: number, entityName: string): Observable<ErpEntitySchema>;
|
|
42
|
+
getTemplates(): Observable<MappingTemplateDefinition[]>;
|
|
43
|
+
getTemplate(templateId: string): Observable<MappingTemplateDefinition>;
|
|
44
|
+
applyTemplate(connectionId: number, request: ApplyTemplateRequest): Observable<any>;
|
|
45
|
+
runSandboxSync(connectionId: number, request?: SandboxSyncRequest): Observable<SandboxSyncResult>;
|
|
46
|
+
listFieldMappings(mappingId: number): Observable<any[]>;
|
|
47
|
+
addFieldMapping(mappingId: number, fieldMapping: {
|
|
48
|
+
erpField: string;
|
|
49
|
+
tgmField: string;
|
|
50
|
+
syncDirection: string;
|
|
51
|
+
isKeyField: boolean;
|
|
52
|
+
transformation?: any;
|
|
53
|
+
defaultValue?: string;
|
|
54
|
+
}): Observable<any>;
|
|
55
|
+
updateFieldMapping(mappingId: number, fieldId: number, updates: Partial<{
|
|
56
|
+
erpField: string;
|
|
57
|
+
tgmField: string;
|
|
58
|
+
syncDirection: string;
|
|
59
|
+
isKeyField: boolean;
|
|
60
|
+
transformation: any;
|
|
61
|
+
defaultValue: string;
|
|
62
|
+
}>): Observable<any>;
|
|
63
|
+
deleteFieldMapping(mappingId: number, fieldId: number): Observable<any>;
|
|
39
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<ErpAdminService, never>;
|
|
40
65
|
static ɵprov: i0.ɵɵInjectableDeclaration<ErpAdminService>;
|
|
41
66
|
}
|
package/package.json
CHANGED