retold-facto 0.0.4
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/.claude/launch.json +11 -0
- package/.dockerignore +8 -0
- package/.quackage.json +19 -0
- package/Dockerfile +26 -0
- package/bin/retold-facto.js +909 -0
- package/examples/facto-government-data.sqlite +0 -0
- package/examples/government-data-catalog.json +137 -0
- package/examples/government-data-loader.js +1432 -0
- package/package.json +91 -0
- package/scripts/facto-download.js +425 -0
- package/source/Retold-Facto.js +1042 -0
- package/source/services/Retold-Facto-BeaconProvider.js +511 -0
- package/source/services/Retold-Facto-CatalogManager.js +1252 -0
- package/source/services/Retold-Facto-DataLakeService.js +1642 -0
- package/source/services/Retold-Facto-DatasetManager.js +417 -0
- package/source/services/Retold-Facto-IngestEngine.js +1315 -0
- package/source/services/Retold-Facto-ProjectionEngine.js +3960 -0
- package/source/services/Retold-Facto-RecordManager.js +360 -0
- package/source/services/Retold-Facto-SchemaManager.js +1110 -0
- package/source/services/Retold-Facto-SourceFolderScanner.js +2243 -0
- package/source/services/Retold-Facto-SourceManager.js +730 -0
- package/source/services/Retold-Facto-StoreConnectionManager.js +441 -0
- package/source/services/Retold-Facto-ThroughputMonitor.js +478 -0
- package/source/services/web-app/codemirror-entry.js +7 -0
- package/source/services/web-app/pict-app/Pict-Application-Facto-Configuration.json +9 -0
- package/source/services/web-app/pict-app/Pict-Application-Facto.js +70 -0
- package/source/services/web-app/pict-app/Pict-Facto-Bundle.js +11 -0
- package/source/services/web-app/pict-app/providers/Pict-Provider-Facto-UI.js +66 -0
- package/source/services/web-app/pict-app/providers/Pict-Provider-Facto.js +69 -0
- package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Catalog.js +93 -0
- package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Connections.js +42 -0
- package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Datasets.js +605 -0
- package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Projections.js +188 -0
- package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Scanner.js +80 -0
- package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Schema.js +116 -0
- package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Sources.js +104 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Catalog.js +526 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Datasets.js +173 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Ingest.js +259 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Layout.js +191 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Projections.js +231 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Records.js +326 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Scanner.js +624 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Sources.js +201 -0
- package/source/services/web-app/pict-app/views/PictView-Facto-Throughput.js +456 -0
- package/source/services/web-app/pict-app-full/Pict-Application-Facto-Full-Configuration.json +14 -0
- package/source/services/web-app/pict-app-full/Pict-Application-Facto-Full.js +391 -0
- package/source/services/web-app/pict-app-full/providers/PictRouter-Facto-Configuration.json +56 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-BottomBar.js +68 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Connections.js +340 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Dashboard.js +149 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Dashboards.js +819 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Datasets.js +178 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-IngestJobs.js +99 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Layout.js +62 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-MappingEditor.js +158 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-ProjectionDetail.js +1120 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Projections.js +172 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-QueryPanel.js +119 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-RecordViewer.js +663 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Records.js +648 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Scanner.js +1017 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SchemaDetail.js +1404 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SchemaDocEditor.js +1036 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SchemaEditor.js +636 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SchemaResearch.js +357 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SourceDetail.js +822 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SourceEditor.js +1036 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SourceResearch.js +487 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Sources.js +165 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Throughput.js +439 -0
- package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-TopBar.js +335 -0
- package/source/services/web-app/pict-app-full/views/projections/Facto-Projections-Constants.js +71 -0
- package/source/services/web-app/web/chart.min.js +20 -0
- package/source/services/web-app/web/codemirror-bundle.js +30099 -0
- package/source/services/web-app/web/css/facto-themes.css +467 -0
- package/source/services/web-app/web/css/facto.css +502 -0
- package/source/services/web-app/web/index.html +28 -0
- package/source/services/web-app/web/retold-facto.js +12138 -0
- package/source/services/web-app/web/retold-facto.js.map +1 -0
- package/source/services/web-app/web/retold-facto.min.js +2 -0
- package/source/services/web-app/web/retold-facto.min.js.map +1 -0
- package/source/services/web-app/web/simple/index.html +17 -0
- package/test/Facto_Browser_Integration_tests.js +798 -0
- package/test/RetoldFacto_tests.js +4117 -0
- package/test/fixtures/weather-readings.csv +17 -0
- package/test/fixtures/weather-stations.csv +9 -0
- package/test/model/MeadowModel-Extended.json +8497 -0
- package/test/model/MeadowModel-PICT.json +1 -0
- package/test/model/MeadowModel.json +1355 -0
- package/test/model/ddl/Facto.ddl +225 -0
- package/test/model/fable-configuration.json +14 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
{
|
|
3
|
+
// ================================================================
|
|
4
|
+
// Projection Operations
|
|
5
|
+
// ================================================================
|
|
6
|
+
|
|
7
|
+
loadProjections: function()
|
|
8
|
+
{
|
|
9
|
+
return this.api('GET', '/facto/projections').then(
|
|
10
|
+
(pResponse) =>
|
|
11
|
+
{
|
|
12
|
+
this.pict.AppData.Facto.Projections = (pResponse && pResponse.Projections) ? pResponse.Projections : [];
|
|
13
|
+
return pResponse;
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
deleteProjection: function(pIDDataset)
|
|
18
|
+
{
|
|
19
|
+
return this.api('DELETE', `/1.0/Dataset/${pIDDataset}`);
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
loadDatasetsByType: function(pType)
|
|
23
|
+
{
|
|
24
|
+
return this.api('GET', `/facto/datasets/by-type/${pType}`).then(
|
|
25
|
+
(pResponse) =>
|
|
26
|
+
{
|
|
27
|
+
return pResponse;
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
queryRecords: function(pParams)
|
|
32
|
+
{
|
|
33
|
+
return this.api('POST', '/facto/projections/query', pParams).then(
|
|
34
|
+
(pResponse) =>
|
|
35
|
+
{
|
|
36
|
+
return pResponse;
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
aggregateRecords: function(pParams)
|
|
41
|
+
{
|
|
42
|
+
return this.api('POST', '/facto/projections/aggregate', pParams).then(
|
|
43
|
+
(pResponse) =>
|
|
44
|
+
{
|
|
45
|
+
return pResponse;
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
queryCertainty: function(pParams)
|
|
50
|
+
{
|
|
51
|
+
return this.api('POST', '/facto/projections/certainty', pParams).then(
|
|
52
|
+
(pResponse) =>
|
|
53
|
+
{
|
|
54
|
+
return pResponse;
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
compareDatasets: function(pDatasetIDs)
|
|
59
|
+
{
|
|
60
|
+
return this.api('POST', '/facto/projections/compare', { DatasetIDs: pDatasetIDs }).then(
|
|
61
|
+
(pResponse) =>
|
|
62
|
+
{
|
|
63
|
+
return pResponse;
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
loadProjectionSummary: function()
|
|
68
|
+
{
|
|
69
|
+
return this.api('GET', '/facto/projections/summary').then(
|
|
70
|
+
(pResponse) =>
|
|
71
|
+
{
|
|
72
|
+
return pResponse;
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
uploadSourceFile: function(pIDSource, pFilename, pContentType, pBase64Data)
|
|
77
|
+
{
|
|
78
|
+
return this.api('POST', `/facto/source/${pIDSource}/documentation/upload`,
|
|
79
|
+
{
|
|
80
|
+
Filename: pFilename,
|
|
81
|
+
ContentType: pContentType,
|
|
82
|
+
Data: pBase64Data
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
ingestFileContent: function(pIDDataset, pIDSource, pContent, pFormat, pType)
|
|
87
|
+
{
|
|
88
|
+
return this.api('POST', '/facto/ingest/file',
|
|
89
|
+
{
|
|
90
|
+
IDDataset: pIDDataset || 0,
|
|
91
|
+
IDSource: pIDSource || 0,
|
|
92
|
+
Content: pContent,
|
|
93
|
+
Format: pFormat || 'Auto',
|
|
94
|
+
Type: pType || 'data'
|
|
95
|
+
}).then(
|
|
96
|
+
(pResponse) =>
|
|
97
|
+
{
|
|
98
|
+
return pResponse;
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// ================================================================
|
|
103
|
+
// Projection Schema Operations
|
|
104
|
+
// ================================================================
|
|
105
|
+
|
|
106
|
+
compileMicroDDL: function(pDDLText)
|
|
107
|
+
{
|
|
108
|
+
return this.api('POST', '/facto/projection/compile', { DDL: pDDLText });
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
loadProjectionSchema: function(pIDDataset)
|
|
112
|
+
{
|
|
113
|
+
return this.api('GET', `/facto/projection/${pIDDataset}/schema`);
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
saveProjectionSchema: function(pIDDataset, pSchemaDefinition)
|
|
117
|
+
{
|
|
118
|
+
return this.api('POST', `/facto/projection/${pIDDataset}/save-schema`, { SchemaDefinition: pSchemaDefinition });
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
loadProjectionStores: function(pIDDataset)
|
|
122
|
+
{
|
|
123
|
+
return this.api('GET', `/facto/projection/${pIDDataset}/stores`);
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
deployProjection: function(pIDDataset, pIDStoreConnection, pTargetTableName)
|
|
127
|
+
{
|
|
128
|
+
return this.api('POST', `/facto/projection/${pIDDataset}/deploy`,
|
|
129
|
+
{
|
|
130
|
+
IDStoreConnection: pIDStoreConnection,
|
|
131
|
+
TargetTableName: pTargetTableName
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
deleteProjectionStore: function(pIDProjectionStore)
|
|
136
|
+
{
|
|
137
|
+
return this.api('DELETE', `/facto/projection/store/${pIDProjectionStore}`);
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
// ======================================================================
|
|
141
|
+
// Projection Mapping Operations
|
|
142
|
+
// ======================================================================
|
|
143
|
+
|
|
144
|
+
loadProjectionMappings: function(pIDDataset)
|
|
145
|
+
{
|
|
146
|
+
return this.api('GET', `/facto/projection/${pIDDataset}/mappings`);
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
loadProjectionMapping: function(pID)
|
|
150
|
+
{
|
|
151
|
+
return this.api('GET', `/facto/projection/mapping/${pID}`);
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
createProjectionMapping: function(pIDDataset, pData)
|
|
155
|
+
{
|
|
156
|
+
return this.api('POST', `/facto/projection/${pIDDataset}/mapping`, pData);
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
updateProjectionMapping: function(pID, pData)
|
|
160
|
+
{
|
|
161
|
+
return this.api('POST', `/facto/projection/mapping/${pID}/update`, pData);
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
deleteProjectionMapping: function(pID)
|
|
165
|
+
{
|
|
166
|
+
return this.api('DELETE', `/facto/projection/mapping/${pID}`);
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
discoverFields: function(pIDDataset, pIDSource, pSampleSize)
|
|
170
|
+
{
|
|
171
|
+
return this.api('POST', `/facto/projection/${pIDDataset}/discover-fields`,
|
|
172
|
+
{
|
|
173
|
+
IDSource: pIDSource,
|
|
174
|
+
SampleSize: pSampleSize || 50
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
executeImport: function(pIDDataset, pIDProjectionMapping, pIDProjectionStore, pBatchSize, pStageComprehension)
|
|
179
|
+
{
|
|
180
|
+
return this.api('POST', `/facto/projection/${pIDDataset}/import`,
|
|
181
|
+
{
|
|
182
|
+
IDProjectionMapping: pIDProjectionMapping,
|
|
183
|
+
IDProjectionStore: pIDProjectionStore,
|
|
184
|
+
BatchSize: pBatchSize || 100,
|
|
185
|
+
StageComprehension: !!pStageComprehension
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
{
|
|
3
|
+
loadScannerPaths: function()
|
|
4
|
+
{
|
|
5
|
+
return this.api('GET', '/facto/scanner/paths').then(
|
|
6
|
+
(pResponse) =>
|
|
7
|
+
{
|
|
8
|
+
this.pict.AppData.Facto.ScannerPaths = (pResponse && pResponse.Paths) ? pResponse.Paths : [];
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
loadScannerDatasets: function(pFilter)
|
|
13
|
+
{
|
|
14
|
+
let tmpQuery = '/facto/scanner/datasets';
|
|
15
|
+
let tmpParams = [];
|
|
16
|
+
if (pFilter)
|
|
17
|
+
{
|
|
18
|
+
if (pFilter.status) tmpParams.push('status=' + encodeURIComponent(pFilter.status));
|
|
19
|
+
if (pFilter.search) tmpParams.push('search=' + encodeURIComponent(pFilter.search));
|
|
20
|
+
}
|
|
21
|
+
if (tmpParams.length > 0) tmpQuery += '?' + tmpParams.join('&');
|
|
22
|
+
|
|
23
|
+
return this.api('GET', tmpQuery).then(
|
|
24
|
+
(pResponse) =>
|
|
25
|
+
{
|
|
26
|
+
this.pict.AppData.Facto.ScannerDatasets = (pResponse && pResponse.Datasets) ? pResponse.Datasets : [];
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
loadScannerDatasetDetail: function(pFolderName)
|
|
31
|
+
{
|
|
32
|
+
return this.api('GET', '/facto/scanner/dataset/' + encodeURIComponent(pFolderName));
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
addScannerPath: function(pPath)
|
|
36
|
+
{
|
|
37
|
+
return this.api('POST', '/facto/scanner/path', { Path: pPath });
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
removeScannerPath: function(pPath)
|
|
41
|
+
{
|
|
42
|
+
return this.api('DELETE', '/facto/scanner/path', { Path: pPath });
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
rescanPaths: function(pPath)
|
|
46
|
+
{
|
|
47
|
+
let tmpBody = pPath ? { Path: pPath } : {};
|
|
48
|
+
return this.api('POST', '/facto/scanner/rescan', tmpBody);
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
provisionScannerDataset: function(pFolderName)
|
|
52
|
+
{
|
|
53
|
+
return this.api('POST', '/facto/scanner/dataset/' + encodeURIComponent(pFolderName) + '/provision');
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
ingestScannerDataset: function(pFolderName, pOptions)
|
|
57
|
+
{
|
|
58
|
+
return this.api('POST', '/facto/scanner/dataset/' + encodeURIComponent(pFolderName) + '/ingest', pOptions || {});
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
downloadScannerDataset: function(pFolderName)
|
|
62
|
+
{
|
|
63
|
+
return this.api('POST', '/facto/scanner/dataset/' + encodeURIComponent(pFolderName) + '/download');
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
provisionAllScannerDatasets: function()
|
|
67
|
+
{
|
|
68
|
+
return this.api('POST', '/facto/scanner/provision-all');
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
loadIngestionPlan: function(pFolderName)
|
|
72
|
+
{
|
|
73
|
+
return this.api('GET', '/facto/scanner/dataset/' + encodeURIComponent(pFolderName) + '/ingestion-plan');
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
saveIngestionPlan: function(pFolderName, pPlan)
|
|
77
|
+
{
|
|
78
|
+
return this.api('PUT', '/facto/scanner/dataset/' + encodeURIComponent(pFolderName) + '/ingestion-plan', pPlan);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
{
|
|
3
|
+
// ================================================================
|
|
4
|
+
// Schema Operations
|
|
5
|
+
// ================================================================
|
|
6
|
+
|
|
7
|
+
loadSchemas: function()
|
|
8
|
+
{
|
|
9
|
+
return this.api('GET', '/1.0/FactoSchemas/0/100').then(
|
|
10
|
+
(pResponse) =>
|
|
11
|
+
{
|
|
12
|
+
this.pict.AppData.Facto.Schemas = Array.isArray(pResponse) ? pResponse : [];
|
|
13
|
+
return this.pict.AppData.Facto.Schemas;
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
createSchema: function(pSchemaData)
|
|
18
|
+
{
|
|
19
|
+
return this.api('POST', '/1.0/FactoSchema', pSchemaData).then(
|
|
20
|
+
(pResponse) =>
|
|
21
|
+
{
|
|
22
|
+
return pResponse;
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
loadSchemaSummary: function(pIDSchema)
|
|
27
|
+
{
|
|
28
|
+
return this.api('GET', `/facto/schema/${pIDSchema}/summary`).then(
|
|
29
|
+
(pResponse) =>
|
|
30
|
+
{
|
|
31
|
+
return pResponse;
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// ================================================================
|
|
36
|
+
// Schema Documentation Operations
|
|
37
|
+
// ================================================================
|
|
38
|
+
|
|
39
|
+
loadSchemaDocumentation: function(pIDSchema)
|
|
40
|
+
{
|
|
41
|
+
return this.api('GET', `/facto/schema/${pIDSchema}/documentation`);
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
loadSchemaDocument: function(pIDSchema, pIDDoc)
|
|
45
|
+
{
|
|
46
|
+
return this.api('GET', `/facto/schema/${pIDSchema}/documentation/${pIDDoc}`);
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
createSchemaDocument: function(pIDSchema, pData)
|
|
50
|
+
{
|
|
51
|
+
return this.api('POST', `/facto/schema/${pIDSchema}/documentation`, pData);
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
updateSchemaDocument: function(pIDSchema, pIDDoc, pData)
|
|
55
|
+
{
|
|
56
|
+
return this.api('PUT', `/facto/schema/${pIDSchema}/documentation/${pIDDoc}`, pData);
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
deleteSchemaDocument: function(pIDSchema, pIDDoc)
|
|
60
|
+
{
|
|
61
|
+
return this.api('DELETE', `/facto/schema/${pIDSchema}/documentation/${pIDDoc}`);
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
uploadSchemaFile: function(pIDSchema, pFilename, pContentType, pBase64Data)
|
|
65
|
+
{
|
|
66
|
+
return this.api('POST', `/facto/schema/${pIDSchema}/documentation/upload`,
|
|
67
|
+
{
|
|
68
|
+
Filename: pFilename,
|
|
69
|
+
ContentType: pContentType,
|
|
70
|
+
Data: pBase64Data
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
// ================================================================
|
|
75
|
+
// Schema Version Operations
|
|
76
|
+
// ================================================================
|
|
77
|
+
|
|
78
|
+
loadSchemaVersions: function(pIDSchema)
|
|
79
|
+
{
|
|
80
|
+
return this.api('GET', `/facto/schema/${pIDSchema}/versions`);
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
saveSchema: function(pIDSchema, pData)
|
|
84
|
+
{
|
|
85
|
+
return this.api('POST', `/facto/schema/${pIDSchema}/save`, pData);
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
compileSchemaDefinition: function(pIDSchema, pDDL)
|
|
89
|
+
{
|
|
90
|
+
return this.api('PUT', `/facto/schema/${pIDSchema}/compile`, { DDL: pDDL });
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// ================================================================
|
|
94
|
+
// Schema-Dataset Link Operations
|
|
95
|
+
// ================================================================
|
|
96
|
+
|
|
97
|
+
linkSchemaToDataset: function(pIDSchema, pIDDataset)
|
|
98
|
+
{
|
|
99
|
+
return this.api('PUT', `/facto/schema/${pIDSchema}/link-dataset/${pIDDataset}`);
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
unlinkSchemaFromDataset: function(pIDSchema, pIDDataset)
|
|
103
|
+
{
|
|
104
|
+
return this.api('PUT', `/facto/schema/${pIDSchema}/unlink-dataset/${pIDDataset}`);
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
analyzeRecords: function(pIDDataset, pIDSource, pSampleSize)
|
|
108
|
+
{
|
|
109
|
+
return this.api('POST', '/facto/schemas/analyze-records',
|
|
110
|
+
{
|
|
111
|
+
IDDataset: pIDDataset || 0,
|
|
112
|
+
IDSource: pIDSource || 0,
|
|
113
|
+
SampleSize: pSampleSize || 50
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
{
|
|
3
|
+
// ================================================================
|
|
4
|
+
// Source Operations
|
|
5
|
+
// ================================================================
|
|
6
|
+
|
|
7
|
+
loadSources: function()
|
|
8
|
+
{
|
|
9
|
+
return this.api('GET', '/1.0/Sources/0/100').then(
|
|
10
|
+
(pResponse) =>
|
|
11
|
+
{
|
|
12
|
+
this.pict.AppData.Facto.Sources = Array.isArray(pResponse) ? pResponse : [];
|
|
13
|
+
return this.pict.AppData.Facto.Sources;
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
loadActiveSources: function()
|
|
18
|
+
{
|
|
19
|
+
return this.api('GET', '/facto/sources/active').then(
|
|
20
|
+
(pResponse) =>
|
|
21
|
+
{
|
|
22
|
+
return pResponse;
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
createSource: function(pSourceData)
|
|
27
|
+
{
|
|
28
|
+
return this.api('POST', '/1.0/Source', pSourceData).then(
|
|
29
|
+
(pResponse) =>
|
|
30
|
+
{
|
|
31
|
+
return pResponse;
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
activateSource: function(pIDSource)
|
|
36
|
+
{
|
|
37
|
+
return this.api('PUT', `/facto/source/${pIDSource}/activate`).then(
|
|
38
|
+
(pResponse) =>
|
|
39
|
+
{
|
|
40
|
+
return pResponse;
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
deactivateSource: function(pIDSource)
|
|
45
|
+
{
|
|
46
|
+
return this.api('PUT', `/facto/source/${pIDSource}/deactivate`).then(
|
|
47
|
+
(pResponse) =>
|
|
48
|
+
{
|
|
49
|
+
return pResponse;
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
loadSourceSummary: function(pIDSource)
|
|
54
|
+
{
|
|
55
|
+
return this.api('GET', `/facto/source/${pIDSource}/summary`).then(
|
|
56
|
+
(pResponse) =>
|
|
57
|
+
{
|
|
58
|
+
return pResponse;
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
// ================================================================
|
|
63
|
+
// Source Documentation Operations
|
|
64
|
+
// ================================================================
|
|
65
|
+
|
|
66
|
+
loadSourceDocumentation: function(pIDSource)
|
|
67
|
+
{
|
|
68
|
+
return this.api('GET', `/facto/source/${pIDSource}/documentation`);
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
loadSourceDocument: function(pIDSource, pIDDoc)
|
|
72
|
+
{
|
|
73
|
+
return this.api('GET', `/facto/source/${pIDSource}/documentation/${pIDDoc}`);
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
createSourceDocument: function(pIDSource, pData)
|
|
77
|
+
{
|
|
78
|
+
return this.api('POST', `/facto/source/${pIDSource}/documentation`, pData);
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
updateSourceDocument: function(pIDSource, pIDDoc, pData)
|
|
82
|
+
{
|
|
83
|
+
return this.api('PUT', `/facto/source/${pIDSource}/documentation/${pIDDoc}`, pData);
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
deleteSourceDocument: function(pIDSource, pIDDoc)
|
|
87
|
+
{
|
|
88
|
+
return this.api('DELETE', `/facto/source/${pIDSource}/documentation/${pIDDoc}`);
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// ================================================================
|
|
92
|
+
// Source Catalog Context
|
|
93
|
+
// ================================================================
|
|
94
|
+
|
|
95
|
+
loadSourceCatalogContext: function(pIDSource)
|
|
96
|
+
{
|
|
97
|
+
return this.api('GET', `/facto/source/${pIDSource}/catalog-context`);
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
loadCatalogSourceLinks: function()
|
|
101
|
+
{
|
|
102
|
+
return this.api('GET', '/facto/catalog/source-links');
|
|
103
|
+
}
|
|
104
|
+
};
|