sodas-sdk 1.1.1 → 1.1.12
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/SODAS_SDK_CLASS/DCAT/dataset.d.ts +2 -0
- package/dist/SODAS_SDK_CLASS/DCAT/datasetSeries.d.ts +21 -1
- package/dist/SODAS_SDK_CLASS/DCAT/distribution.d.ts +6 -0
- package/dist/SODAS_SDK_CLASS/dcatClass.d.ts +7 -0
- package/dist/__tests__/SODAS_SDK_CLASS/DCAT/dataset/interoperation.medium.test.d.ts +1 -0
- package/dist/__tests__/SODAS_SDK_CLASS/DCAT/dataset/populateToSync.small.test.d.ts +1 -0
- package/dist/__tests__/SODAS_SDK_CLASS/DCAT/datasetSeries/interoperation.medium.test.d.ts +1 -0
- package/dist/__tests__/SODAS_SDK_CLASS/DCAT/datasetSeries/populateToSync.small.test.d.ts +1 -0
- package/dist/__tests__/SODAS_SDK_CLASS/DCAT/distribution/populateToSync.small.test.d.ts +1 -0
- package/dist/__tests__/setting/testEnvironmentConfig.d.ts +2 -3
- package/dist/core/auth.d.ts +7 -6
- package/dist/core/init.d.ts +2 -1
- package/dist/index.browser.js +293 -56
- package/dist/index.browser.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.legacy.browser.js +290 -54
- package/dist/index.legacy.browser.js.map +1 -1
- package/dist/index.legacy.node.cjs +290 -54
- package/dist/index.legacy.node.cjs.map +1 -1
- package/dist/index.node.js +293 -56
- package/dist/index.node.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import Dataset from "./SODAS_SDK_CLASS/DCAT/dataset";
|
|
|
3
3
|
import DatasetSeries from "./SODAS_SDK_CLASS/DCAT/datasetSeries";
|
|
4
4
|
import Distribution from "./SODAS_SDK_CLASS/DCAT/distribution";
|
|
5
5
|
import Config from "./core/auth";
|
|
6
|
-
import {
|
|
6
|
+
import { setGovernanceBearerToken, setLegacyDatahubBearerToken } from "./core/init";
|
|
7
7
|
import { ArtifactType, IDType, IRIType, ProfileType, ResourceDescriptorRole, SortOrder, TemplateDetailFunctionality, asID, asIRI } from "./core/type";
|
|
8
8
|
import { BASIC_TYPE_VALUES, CONVERSION_VALUES, MEASURE_VALUES, ORIGIN_VALUES } from "./core/values";
|
|
9
|
-
export { ArtifactType, BASIC_TYPE_VALUES, CONVERSION_VALUES, Config, DataService, Dataset, DatasetSeries, Distribution, IDType, IRIType, MEASURE_VALUES, ORIGIN_VALUES, ProfileType, ResourceDescriptorRole, SortOrder, TemplateDetailFunctionality, asID, asIRI,
|
|
9
|
+
export { ArtifactType, BASIC_TYPE_VALUES, CONVERSION_VALUES, Config, DataService, Dataset, DatasetSeries, Distribution, IDType, IRIType, MEASURE_VALUES, ORIGIN_VALUES, ProfileType, ResourceDescriptorRole, SortOrder, TemplateDetailFunctionality, asID, asIRI, setGovernanceBearerToken, setLegacyDatahubBearerToken, };
|
|
10
10
|
declare const sdk: {
|
|
11
11
|
ArtifactType: typeof ArtifactType;
|
|
12
12
|
BASIC_TYPE_VALUES: typeof BASIC_TYPE_VALUES;
|
|
@@ -22,6 +22,7 @@ declare const sdk: {
|
|
|
22
22
|
SortOrder: typeof SortOrder;
|
|
23
23
|
TemplateDetailFunctionality: typeof TemplateDetailFunctionality;
|
|
24
24
|
Config: typeof Config;
|
|
25
|
-
|
|
25
|
+
setGovernanceBearerToken: typeof setGovernanceBearerToken;
|
|
26
|
+
setLegacyDatahubBearerToken: typeof setLegacyDatahubBearerToken;
|
|
26
27
|
};
|
|
27
28
|
export default sdk;
|
|
@@ -1975,6 +1975,70 @@ class Dataset extends _dcatResource__WEBPACK_IMPORTED_MODULE_4__["default"] {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
});
|
|
1977
1977
|
}
|
|
1978
|
+
static syncToCurrentHub(dataset) {
|
|
1979
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1980
|
+
var _a;
|
|
1981
|
+
try {
|
|
1982
|
+
const checkExisting = yield Dataset.getDBRecordByAssetID((0,_core_type__WEBPACK_IMPORTED_MODULE_1__.asID)(dataset.assetID));
|
|
1983
|
+
if (checkExisting) {
|
|
1984
|
+
checkExisting.populateToSync(dataset);
|
|
1985
|
+
yield checkExisting.updateDBRecord();
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
catch (error) {
|
|
1989
|
+
if (axios__WEBPACK_IMPORTED_MODULE_6__["default"].isAxiosError(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
|
|
1990
|
+
const newDataset = new Dataset();
|
|
1991
|
+
newDataset.populateToSync(dataset);
|
|
1992
|
+
yield newDataset.createDBRecord();
|
|
1993
|
+
}
|
|
1994
|
+
else {
|
|
1995
|
+
throw error;
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
2000
|
+
populateToSync(source) {
|
|
2001
|
+
const excludedKeys = new Set([
|
|
2002
|
+
"ID",
|
|
2003
|
+
"DatasetID",
|
|
2004
|
+
"IsVersionOf",
|
|
2005
|
+
"PreviousVersionID",
|
|
2006
|
+
"NextVersionID",
|
|
2007
|
+
"VersionInfos",
|
|
2008
|
+
"InSeriesID",
|
|
2009
|
+
"FirstID",
|
|
2010
|
+
"PreviousID",
|
|
2011
|
+
"NextID",
|
|
2012
|
+
"LastID",
|
|
2013
|
+
"DistributionIDs",
|
|
2014
|
+
]);
|
|
2015
|
+
for (const key in source) {
|
|
2016
|
+
if (!Object.prototype.hasOwnProperty.call(source, key))
|
|
2017
|
+
continue;
|
|
2018
|
+
if (key === "Distributions")
|
|
2019
|
+
continue;
|
|
2020
|
+
if (excludedKeys.has(key))
|
|
2021
|
+
continue;
|
|
2022
|
+
const value = source[key];
|
|
2023
|
+
if (value !== undefined) {
|
|
2024
|
+
this[key] = value;
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
// Handle distributions separately so that we can preserve identity fields
|
|
2028
|
+
// of existing distributions while syncing other fields, and create new
|
|
2029
|
+
// distributions for any additional ones in the source.
|
|
2030
|
+
const sourceDistributions = source.Distributions;
|
|
2031
|
+
if (!sourceDistributions || sourceDistributions.length === 0) {
|
|
2032
|
+
return;
|
|
2033
|
+
}
|
|
2034
|
+
this.Distributions = [];
|
|
2035
|
+
for (let i = 0; i < sourceDistributions.length; i++) {
|
|
2036
|
+
const srcDist = sourceDistributions[i];
|
|
2037
|
+
const targetDist = new _distribution__WEBPACK_IMPORTED_MODULE_5__["default"]();
|
|
2038
|
+
targetDist.populateToSync(srcDist);
|
|
2039
|
+
this.Distributions.push(targetDist);
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
1978
2042
|
createDBRecord() {
|
|
1979
2043
|
const _super = Object.create(null, {
|
|
1980
2044
|
createDBRecord: { get: () => super.createDBRecord }
|
|
@@ -2165,6 +2229,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2165
2229
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2166
2230
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2167
2231
|
/* harmony export */ });
|
|
2232
|
+
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js");
|
|
2168
2233
|
/* harmony import */ var _core_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/error */ "./lib/core/error.ts");
|
|
2169
2234
|
/* harmony import */ var _core_type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/type */ "./lib/core/type.ts");
|
|
2170
2235
|
/* harmony import */ var _core_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/util */ "./lib/core/util.ts");
|
|
@@ -2184,10 +2249,105 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
2184
2249
|
|
|
2185
2250
|
|
|
2186
2251
|
|
|
2252
|
+
|
|
2187
2253
|
/**
|
|
2188
2254
|
* Represents a series of datasets.
|
|
2189
2255
|
*/
|
|
2190
2256
|
class DatasetSeries extends _dcatResource__WEBPACK_IMPORTED_MODULE_4__["default"] {
|
|
2257
|
+
static syncToCurrentHub(datasetSeries) {
|
|
2258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2259
|
+
var _a;
|
|
2260
|
+
try {
|
|
2261
|
+
const checkExisting = yield DatasetSeries.getDBRecordByAssetID((0,_core_type__WEBPACK_IMPORTED_MODULE_1__.asID)(datasetSeries.assetID));
|
|
2262
|
+
if (checkExisting) {
|
|
2263
|
+
yield checkExisting.populateToSync(datasetSeries);
|
|
2264
|
+
yield checkExisting.updateDBRecord();
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
catch (error) {
|
|
2268
|
+
if (axios__WEBPACK_IMPORTED_MODULE_5__["default"].isAxiosError(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
|
|
2269
|
+
const newDatasetSeries = new DatasetSeries();
|
|
2270
|
+
yield newDatasetSeries.populateToSync(datasetSeries);
|
|
2271
|
+
yield newDatasetSeries.createDBRecord();
|
|
2272
|
+
}
|
|
2273
|
+
else {
|
|
2274
|
+
throw error;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
});
|
|
2278
|
+
}
|
|
2279
|
+
/**
|
|
2280
|
+
* Populates this instance with values from the given DatasetSeries, except for:
|
|
2281
|
+
* - DB identity / temporal fields (ID, IRI, Issued, Modified, CreatedAt, UpdatedAt)
|
|
2282
|
+
* - Version/lineage fields (IsVersionOf, PreviousVersionID, NextVersionID, VersionInfos)
|
|
2283
|
+
* - Series identity fields (DatasetSeriesID, InSeriesID)
|
|
2284
|
+
* - Fields explicitly set to `undefined` on the source instance
|
|
2285
|
+
*
|
|
2286
|
+
* Additionally, when SeriesMembers are present on the source, this method
|
|
2287
|
+
* resolves each member via Dataset.getDBRecordByAssetID (by AssetID) and
|
|
2288
|
+
* replaces this.SeriesMemberIDs with the resolved IDs.
|
|
2289
|
+
*/
|
|
2290
|
+
populateToSync(source) {
|
|
2291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2292
|
+
var _a;
|
|
2293
|
+
const excludedKeys = new Set([
|
|
2294
|
+
"ID",
|
|
2295
|
+
"IsVersionOf",
|
|
2296
|
+
"PreviousVersionID",
|
|
2297
|
+
"NextVersionID",
|
|
2298
|
+
"VersionInfos",
|
|
2299
|
+
"DatasetSeriesID",
|
|
2300
|
+
"InSeriesID",
|
|
2301
|
+
]);
|
|
2302
|
+
for (const key in source) {
|
|
2303
|
+
if (!Object.prototype.hasOwnProperty.call(source, key))
|
|
2304
|
+
continue;
|
|
2305
|
+
if (key === "SeriesMembers")
|
|
2306
|
+
continue;
|
|
2307
|
+
if (excludedKeys.has(key))
|
|
2308
|
+
continue;
|
|
2309
|
+
const value = source[key];
|
|
2310
|
+
if (value !== undefined) {
|
|
2311
|
+
this[key] = value;
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
this.SeriesMembers = [];
|
|
2315
|
+
const sourceMembers = source.SeriesMembers;
|
|
2316
|
+
if (!sourceMembers || sourceMembers.length === 0) {
|
|
2317
|
+
return;
|
|
2318
|
+
}
|
|
2319
|
+
const resolvedIDs = [];
|
|
2320
|
+
for (const member of sourceMembers) {
|
|
2321
|
+
if (!member)
|
|
2322
|
+
continue;
|
|
2323
|
+
const assetIDStr = member.assetID;
|
|
2324
|
+
if (!assetIDStr)
|
|
2325
|
+
continue;
|
|
2326
|
+
const assetID = (0,_core_type__WEBPACK_IMPORTED_MODULE_1__.asID)(assetIDStr);
|
|
2327
|
+
// Prefer existing record by AssetID; if not found, create a new one.
|
|
2328
|
+
try {
|
|
2329
|
+
const existing = yield _dataset__WEBPACK_IMPORTED_MODULE_3__["default"].getDBRecordByAssetID(assetID);
|
|
2330
|
+
if (existing) {
|
|
2331
|
+
existing.populateToSync(member);
|
|
2332
|
+
yield existing.updateDBRecord();
|
|
2333
|
+
resolvedIDs.push(existing.id);
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
catch (error) {
|
|
2337
|
+
if (axios__WEBPACK_IMPORTED_MODULE_5__["default"].isAxiosError(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
|
|
2338
|
+
const newMember = new _dataset__WEBPACK_IMPORTED_MODULE_3__["default"]();
|
|
2339
|
+
newMember.populateToSync(member);
|
|
2340
|
+
yield newMember.createDBRecord();
|
|
2341
|
+
resolvedIDs.push(newMember.id);
|
|
2342
|
+
}
|
|
2343
|
+
else {
|
|
2344
|
+
throw error;
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
this.SeriesMemberIDs = resolvedIDs;
|
|
2349
|
+
});
|
|
2350
|
+
}
|
|
2191
2351
|
/**
|
|
2192
2352
|
* Initializes or updates the API_URL and LIST_URL for Dataset.
|
|
2193
2353
|
*
|
|
@@ -2228,11 +2388,17 @@ class DatasetSeries extends _dcatResource__WEBPACK_IMPORTED_MODULE_4__["default"
|
|
|
2228
2388
|
}
|
|
2229
2389
|
populateSeriesMembersFromDTO(dto) {
|
|
2230
2390
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2391
|
+
this.SeriesMembers = [];
|
|
2231
2392
|
if (dto.SeriesMemberIDs && dto.SeriesMemberIDs.length != 0) {
|
|
2232
2393
|
this.SeriesMemberIDs = (0,_core_type__WEBPACK_IMPORTED_MODULE_1__.asIDs)(dto.SeriesMemberIDs);
|
|
2233
|
-
this.
|
|
2234
|
-
|
|
2235
|
-
|
|
2394
|
+
if (this.SeriesMemberIDs && this.SeriesMemberIDs.length != 0) {
|
|
2395
|
+
for (const seriesMemberID of this.SeriesMemberIDs) {
|
|
2396
|
+
const seriesMember = yield _dataset__WEBPACK_IMPORTED_MODULE_3__["default"].getDBRecord(seriesMemberID);
|
|
2397
|
+
if (seriesMember) {
|
|
2398
|
+
this.SeriesMembers.push(seriesMember);
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2236
2402
|
}
|
|
2237
2403
|
});
|
|
2238
2404
|
}
|
|
@@ -2251,6 +2417,17 @@ class DatasetSeries extends _dcatResource__WEBPACK_IMPORTED_MODULE_4__["default"
|
|
|
2251
2417
|
yield _super.deleteDBRecord.call(this);
|
|
2252
2418
|
});
|
|
2253
2419
|
}
|
|
2420
|
+
/**
|
|
2421
|
+
* Creates a dataset series DB record in an interoperated context
|
|
2422
|
+
* (e.g. together with related Dataset instances or other resources).
|
|
2423
|
+
*
|
|
2424
|
+
* The implementation will be added later.
|
|
2425
|
+
*/
|
|
2426
|
+
createInteroperatedDBRecord() {
|
|
2427
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2428
|
+
// TODO: Implement interoperated create logic.
|
|
2429
|
+
});
|
|
2430
|
+
}
|
|
2254
2431
|
appendSeriesMember(dataset) {
|
|
2255
2432
|
if (!this.SeriesMemberIDs) {
|
|
2256
2433
|
this.SeriesMemberIDs = [];
|
|
@@ -2283,7 +2460,7 @@ class DatasetSeries extends _dcatResource__WEBPACK_IMPORTED_MODULE_4__["default"
|
|
|
2283
2460
|
get datasetSeriesID() {
|
|
2284
2461
|
return this.DatasetSeriesID;
|
|
2285
2462
|
}
|
|
2286
|
-
get
|
|
2463
|
+
get seriesMemberIDs() {
|
|
2287
2464
|
return this.SeriesMemberIDs;
|
|
2288
2465
|
}
|
|
2289
2466
|
get seriesMembers() {
|
|
@@ -2709,8 +2886,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2709
2886
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2710
2887
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2711
2888
|
/* harmony export */ });
|
|
2712
|
-
/* harmony import */ var
|
|
2713
|
-
/* harmony import */ var
|
|
2889
|
+
/* harmony import */ var _SODAS_SDK_FILE_dataFile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../SODAS_SDK_FILE/dataFile */ "./lib/SODAS_SDK_FILE/dataFile.ts");
|
|
2890
|
+
/* harmony import */ var _core_type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/type */ "./lib/core/type.ts");
|
|
2714
2891
|
/* harmony import */ var _dcatClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dcatClass */ "./lib/SODAS_SDK_CLASS/dcatClass.ts");
|
|
2715
2892
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2716
2893
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -2725,6 +2902,24 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
2725
2902
|
|
|
2726
2903
|
|
|
2727
2904
|
class Distribution extends _dcatClass__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
2905
|
+
/**
|
|
2906
|
+
* Populates this instance with values from the given Distribution, except for:
|
|
2907
|
+
* - DB identity / temporal fields (ID, IRI, Issued, Modified, CreatedAt, UpdatedAt)
|
|
2908
|
+
* - Fields that are explicitly set to `undefined` on the source instance
|
|
2909
|
+
*/
|
|
2910
|
+
populateToSync(source) {
|
|
2911
|
+
const excludedKeys = new Set(["ID", "IsDistributionOf", "AccessServiceID"]);
|
|
2912
|
+
for (const key in source) {
|
|
2913
|
+
if (!Object.prototype.hasOwnProperty.call(source, key))
|
|
2914
|
+
continue;
|
|
2915
|
+
if (excludedKeys.has(key))
|
|
2916
|
+
continue;
|
|
2917
|
+
const value = source[key];
|
|
2918
|
+
if (value !== undefined) {
|
|
2919
|
+
this[key] = value;
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2728
2923
|
toDTO() {
|
|
2729
2924
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, super.toDTO()), (this.IsDistributionOf && { IsDistributionOf: this.IsDistributionOf })), (this.AccessServiceID && { AccessServiceID: this.AccessServiceID })), { AccessURL: this.AccessURL, ByteSize: this.ByteSize, CompressFormat: this.CompressFormat, DownloadURL: this.DownloadURL, MediaType: this.MediaType, PackageFormat: this.PackageFormat, SpatialResolutionInMeters: this.SpatialResolutionInMeters, TemporalResolution: this.TemporalResolution, AccessRights: this.AccessRights, ConformsTo: this.ConformsTo, DescriptionML: this.DescriptionML, Format: this.Format, License: this.License, Rights: this.Rights, TitleML: this.TitleML, HasPolicy: this.HasPolicy, Checksum: this.Checksum });
|
|
2730
2925
|
}
|
|
@@ -2736,7 +2931,7 @@ class Distribution extends _dcatClass__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
2736
2931
|
yield _super.populateFromDTO.call(this, dto);
|
|
2737
2932
|
const distributionDTO = dto;
|
|
2738
2933
|
distributionDTO.AccessServiceID &&
|
|
2739
|
-
(this.AccessServiceID = (0,
|
|
2934
|
+
(this.AccessServiceID = (0,_core_type__WEBPACK_IMPORTED_MODULE_1__.asID)(distributionDTO.AccessServiceID));
|
|
2740
2935
|
distributionDTO.AccessURL && (this.AccessURL = distributionDTO.AccessURL);
|
|
2741
2936
|
distributionDTO.ByteSize && (this.ByteSize = distributionDTO.ByteSize);
|
|
2742
2937
|
distributionDTO.CompressFormat &&
|
|
@@ -2764,7 +2959,7 @@ class Distribution extends _dcatClass__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
2764
2959
|
distributionDTO.HasPolicy && (this.HasPolicy = distributionDTO.HasPolicy);
|
|
2765
2960
|
distributionDTO.Checksum && (this.Checksum = distributionDTO.Checksum);
|
|
2766
2961
|
distributionDTO.IsDistributionOf &&
|
|
2767
|
-
(this.IsDistributionOf = (0,
|
|
2962
|
+
(this.IsDistributionOf = (0,_core_type__WEBPACK_IMPORTED_MODULE_1__.asID)(distributionDTO.IsDistributionOf));
|
|
2768
2963
|
});
|
|
2769
2964
|
}
|
|
2770
2965
|
/**
|
|
@@ -2780,7 +2975,7 @@ class Distribution extends _dcatClass__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
2780
2975
|
Distribution.DOWNLOAD_API_URL = `${url}/data/download`;
|
|
2781
2976
|
}
|
|
2782
2977
|
static configureBucketName(bucketName) {
|
|
2783
|
-
|
|
2978
|
+
_SODAS_SDK_FILE_dataFile__WEBPACK_IMPORTED_MODULE_0__["default"].configureBucketName(bucketName);
|
|
2784
2979
|
}
|
|
2785
2980
|
/**
|
|
2786
2981
|
* Sets file information for a browser environment.
|
|
@@ -2788,7 +2983,7 @@ class Distribution extends _dcatClass__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
2788
2983
|
*/
|
|
2789
2984
|
setUploadingDataForBrowser(file) {
|
|
2790
2985
|
if (!this.UploadingData) {
|
|
2791
|
-
this.UploadingData = new
|
|
2986
|
+
this.UploadingData = new _SODAS_SDK_FILE_dataFile__WEBPACK_IMPORTED_MODULE_0__["default"]();
|
|
2792
2987
|
}
|
|
2793
2988
|
this.UploadingData.setFileForBrowser(file);
|
|
2794
2989
|
}
|
|
@@ -2798,7 +2993,7 @@ class Distribution extends _dcatClass__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
2798
2993
|
*/
|
|
2799
2994
|
setUploadingDataForNode(filePath) {
|
|
2800
2995
|
if (!this.UploadingData) {
|
|
2801
|
-
this.UploadingData = new
|
|
2996
|
+
this.UploadingData = new _SODAS_SDK_FILE_dataFile__WEBPACK_IMPORTED_MODULE_0__["default"]();
|
|
2802
2997
|
}
|
|
2803
2998
|
this.UploadingData.setFileForNode(filePath);
|
|
2804
2999
|
}
|
|
@@ -2991,7 +3186,7 @@ class Distribution extends _dcatClass__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
2991
3186
|
return this.IsDistributionOf;
|
|
2992
3187
|
}
|
|
2993
3188
|
set isDistributionOf(value) {
|
|
2994
|
-
this.IsDistributionOf = (0,
|
|
3189
|
+
this.IsDistributionOf = (0,_core_type__WEBPACK_IMPORTED_MODULE_1__.asID)(value);
|
|
2995
3190
|
}
|
|
2996
3191
|
}
|
|
2997
3192
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Distribution);
|
|
@@ -3246,6 +3441,27 @@ class DCAT_MODEL extends _sodasSDKClass__WEBPACK_IMPORTED_MODULE_3__["default"]
|
|
|
3246
3441
|
}
|
|
3247
3442
|
});
|
|
3248
3443
|
}
|
|
3444
|
+
/**
|
|
3445
|
+
* Checks whether a DB record exists for the given AssetID and returns its ID.
|
|
3446
|
+
*
|
|
3447
|
+
* This method wraps getDBRecordByAssetID and converts a 404 response to `null`,
|
|
3448
|
+
* while rethrowing any other kind of error.
|
|
3449
|
+
*/
|
|
3450
|
+
static checkDBRecordOfAssetID(assetID) {
|
|
3451
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3452
|
+
var _a;
|
|
3453
|
+
try {
|
|
3454
|
+
const record = (yield this.getDBRecordByAssetID(assetID));
|
|
3455
|
+
return record.id;
|
|
3456
|
+
}
|
|
3457
|
+
catch (error) {
|
|
3458
|
+
if (axios__WEBPACK_IMPORTED_MODULE_4__["default"].isAxiosError(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
|
|
3459
|
+
return null;
|
|
3460
|
+
}
|
|
3461
|
+
throw error;
|
|
3462
|
+
}
|
|
3463
|
+
});
|
|
3464
|
+
}
|
|
3249
3465
|
updateDBRecord() {
|
|
3250
3466
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3251
3467
|
this.throwErrorIfAPIURLNotSet();
|
|
@@ -4226,7 +4442,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4226
4442
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4227
4443
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4228
4444
|
/* harmony export */ });
|
|
4229
|
-
/* harmony import */ var
|
|
4445
|
+
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js");
|
|
4230
4446
|
/* harmony import */ var _SODAS_SDK_CLASS_DCAT_dataService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../SODAS_SDK_CLASS/DCAT/dataService */ "./lib/SODAS_SDK_CLASS/DCAT/dataService.ts");
|
|
4231
4447
|
/* harmony import */ var _SODAS_SDK_CLASS_DCAT_dataset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SODAS_SDK_CLASS/DCAT/dataset */ "./lib/SODAS_SDK_CLASS/DCAT/dataset.ts");
|
|
4232
4448
|
/* harmony import */ var _SODAS_SDK_CLASS_DCAT_datasetSeries__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SODAS_SDK_CLASS/DCAT/datasetSeries */ "./lib/SODAS_SDK_CLASS/DCAT/datasetSeries.ts");
|
|
@@ -4237,6 +4453,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4237
4453
|
/* harmony import */ var _SODAS_SDK_FILE_dataFile__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../SODAS_SDK_FILE/dataFile */ "./lib/SODAS_SDK_FILE/dataFile.ts");
|
|
4238
4454
|
/* harmony import */ var _SODAS_SDK_FILE_thumbnailFile__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../SODAS_SDK_FILE/thumbnailFile */ "./lib/SODAS_SDK_FILE/thumbnailFile.ts");
|
|
4239
4455
|
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./error */ "./lib/core/error.ts");
|
|
4456
|
+
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./init */ "./lib/core/init.ts");
|
|
4240
4457
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4241
4458
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4242
4459
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -4257,25 +4474,28 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
4257
4474
|
|
|
4258
4475
|
|
|
4259
4476
|
|
|
4477
|
+
|
|
4260
4478
|
class Config {
|
|
4261
|
-
constructor(governanceBaseUrl,
|
|
4479
|
+
constructor(governanceBaseUrl, sodasProfileBaseUrl, legacyDatahubBaseUrl) {
|
|
4262
4480
|
this.governanceToken = null;
|
|
4263
|
-
this.
|
|
4481
|
+
this.legacyDatahubToken = null;
|
|
4264
4482
|
this.governanceBaseUrl = governanceBaseUrl.replace(/\/$/, "");
|
|
4265
|
-
this.
|
|
4483
|
+
this.sodasProfileBaseUrl = sodasProfileBaseUrl.replace(/\/$/, "");
|
|
4484
|
+
this.legacyDatahubBaseUrl = legacyDatahubBaseUrl.replace(/\/$/, "");
|
|
4266
4485
|
this.initializeAPIURLs();
|
|
4267
4486
|
}
|
|
4268
4487
|
/**
|
|
4269
4488
|
* Explicitly configure the SDK with the given API URLs.
|
|
4270
4489
|
* This is the preferred way to set API URLs instead of using configureAPIURL.
|
|
4271
4490
|
*/
|
|
4272
|
-
static configure(datahubApiUrl, governanceApiUrl) {
|
|
4491
|
+
static configure(datahubApiUrl, governanceApiUrl, legacyDatahubApiUrl) {
|
|
4273
4492
|
if (!Config.instance) {
|
|
4274
|
-
Config.instance = new Config(governanceApiUrl, datahubApiUrl);
|
|
4493
|
+
Config.instance = new Config(governanceApiUrl, datahubApiUrl, legacyDatahubApiUrl);
|
|
4275
4494
|
}
|
|
4276
4495
|
else {
|
|
4277
4496
|
Config.instance.governanceBaseUrl = governanceApiUrl.replace(/\/$/, "");
|
|
4278
|
-
Config.instance.
|
|
4497
|
+
Config.instance.sodasProfileBaseUrl = datahubApiUrl.replace(/\/$/, "");
|
|
4498
|
+
Config.instance.legacyDatahubBaseUrl = legacyDatahubApiUrl.replace(/\/$/, "");
|
|
4279
4499
|
Config.instance.initializeAPIURLs();
|
|
4280
4500
|
}
|
|
4281
4501
|
return Config.instance;
|
|
@@ -4288,13 +4508,16 @@ class Config {
|
|
|
4288
4508
|
const governanceBaseUrl = process.env.PRODUCTION_GOVERNANCE_API_URL ||
|
|
4289
4509
|
process.env.TEST_GOVERNANCE_API_URL ||
|
|
4290
4510
|
"";
|
|
4291
|
-
const
|
|
4292
|
-
process.env.
|
|
4511
|
+
const sodasProfileBaseUrl = process.env.PRODUCTION_DATAHUB_API_URL ||
|
|
4512
|
+
process.env.TEST_SODAS_PROFILE_API_URL ||
|
|
4513
|
+
"";
|
|
4514
|
+
const legacyDatahubBaseUrl = process.env.PRODUCTION_LEGACY_DATAHUB_API_URL ||
|
|
4515
|
+
process.env.TEST_LEGACY_DATAHUB_API_URL ||
|
|
4293
4516
|
"";
|
|
4294
|
-
if (!governanceBaseUrl || !
|
|
4517
|
+
if (!governanceBaseUrl || !sodasProfileBaseUrl) {
|
|
4295
4518
|
throw new Error("Governance or Datahub base URL is not configured in environment variables.");
|
|
4296
4519
|
}
|
|
4297
|
-
Config.instance = new Config(governanceBaseUrl,
|
|
4520
|
+
Config.instance = new Config(governanceBaseUrl, sodasProfileBaseUrl, legacyDatahubBaseUrl);
|
|
4298
4521
|
}
|
|
4299
4522
|
return Config.instance;
|
|
4300
4523
|
}
|
|
@@ -4302,15 +4525,15 @@ class Config {
|
|
|
4302
4525
|
* Initialize all SDK class API URLs based on the configured base URLs.
|
|
4303
4526
|
*/
|
|
4304
4527
|
initializeAPIURLs() {
|
|
4305
|
-
const
|
|
4528
|
+
const SLASH_DELETED_SODAS_PROFILE_BASE_URL = this.sodasProfileBaseUrl.replace(/\/$/, "");
|
|
4306
4529
|
const SLASH_DELETED_GOVERNANCE_PORTAL_API_URL = this.governanceBaseUrl.replace(/\/$/, "");
|
|
4307
|
-
if (this.
|
|
4308
|
-
_SODAS_SDK_CLASS_DCAT_distribution__WEBPACK_IMPORTED_MODULE_3__["default"].configureAPIURL(
|
|
4309
|
-
_SODAS_SDK_CLASS_DCAT_dataset__WEBPACK_IMPORTED_MODULE_1__["default"].configureAPIURL(
|
|
4310
|
-
_SODAS_SDK_CLASS_DCAT_datasetSeries__WEBPACK_IMPORTED_MODULE_2__["default"].configureAPIURL(
|
|
4311
|
-
_SODAS_SDK_CLASS_DCAT_dataService__WEBPACK_IMPORTED_MODULE_0__["default"].configureAPIURL(
|
|
4312
|
-
_SODAS_SDK_FILE_thumbnailFile__WEBPACK_IMPORTED_MODULE_8__["default"].configureAPIURL(
|
|
4313
|
-
_SODAS_SDK_FILE_dataFile__WEBPACK_IMPORTED_MODULE_7__["default"].configureAPIURL(
|
|
4530
|
+
if (this.sodasProfileBaseUrl) {
|
|
4531
|
+
_SODAS_SDK_CLASS_DCAT_distribution__WEBPACK_IMPORTED_MODULE_3__["default"].configureAPIURL(SLASH_DELETED_SODAS_PROFILE_BASE_URL);
|
|
4532
|
+
_SODAS_SDK_CLASS_DCAT_dataset__WEBPACK_IMPORTED_MODULE_1__["default"].configureAPIURL(SLASH_DELETED_SODAS_PROFILE_BASE_URL);
|
|
4533
|
+
_SODAS_SDK_CLASS_DCAT_datasetSeries__WEBPACK_IMPORTED_MODULE_2__["default"].configureAPIURL(SLASH_DELETED_SODAS_PROFILE_BASE_URL);
|
|
4534
|
+
_SODAS_SDK_CLASS_DCAT_dataService__WEBPACK_IMPORTED_MODULE_0__["default"].configureAPIURL(SLASH_DELETED_SODAS_PROFILE_BASE_URL);
|
|
4535
|
+
_SODAS_SDK_FILE_thumbnailFile__WEBPACK_IMPORTED_MODULE_8__["default"].configureAPIURL(SLASH_DELETED_SODAS_PROFILE_BASE_URL);
|
|
4536
|
+
_SODAS_SDK_FILE_dataFile__WEBPACK_IMPORTED_MODULE_7__["default"].configureAPIURL(SLASH_DELETED_SODAS_PROFILE_BASE_URL);
|
|
4314
4537
|
}
|
|
4315
4538
|
else {
|
|
4316
4539
|
console.error("DATAHUB_API_URL not found in config");
|
|
@@ -4335,9 +4558,10 @@ class Config {
|
|
|
4335
4558
|
password,
|
|
4336
4559
|
offline: false,
|
|
4337
4560
|
};
|
|
4338
|
-
const response = yield
|
|
4561
|
+
const response = yield axios__WEBPACK_IMPORTED_MODULE_11__["default"].post(url, parameters);
|
|
4339
4562
|
if (response.data && response.data.accessToken) {
|
|
4340
4563
|
this.governanceToken = response.data.accessToken;
|
|
4564
|
+
(0,_init__WEBPACK_IMPORTED_MODULE_10__.setGovernanceBearerToken)(this.governanceToken);
|
|
4341
4565
|
}
|
|
4342
4566
|
else {
|
|
4343
4567
|
throw new _error__WEBPACK_IMPORTED_MODULE_9__.NoAccessTokenFoundError();
|
|
@@ -4347,20 +4571,27 @@ class Config {
|
|
|
4347
4571
|
/**
|
|
4348
4572
|
* Login to the Datahub portal and store the access token.
|
|
4349
4573
|
*/
|
|
4350
|
-
|
|
4574
|
+
loginLegacyDatahub(id, password) {
|
|
4351
4575
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4352
|
-
const url = `${this.
|
|
4576
|
+
const url = `${this.legacyDatahubBaseUrl}/api/v1/authnz/authentication/user/login`;
|
|
4353
4577
|
const parameters = {
|
|
4354
4578
|
id,
|
|
4355
4579
|
password,
|
|
4356
4580
|
offline: false,
|
|
4357
4581
|
};
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4582
|
+
try {
|
|
4583
|
+
const response = yield axios__WEBPACK_IMPORTED_MODULE_11__["default"].post(url, parameters);
|
|
4584
|
+
if (response.data && response.data.accessToken) {
|
|
4585
|
+
this.legacyDatahubToken = response.data.accessToken;
|
|
4586
|
+
(0,_init__WEBPACK_IMPORTED_MODULE_10__.setLegacyDatahubBearerToken)(this.legacyDatahubToken);
|
|
4587
|
+
}
|
|
4588
|
+
else {
|
|
4589
|
+
throw new _error__WEBPACK_IMPORTED_MODULE_9__.NoAccessTokenFoundError();
|
|
4590
|
+
}
|
|
4361
4591
|
}
|
|
4362
|
-
|
|
4363
|
-
|
|
4592
|
+
catch (error) {
|
|
4593
|
+
console.error("Error during loginLegacyDatahub:", error);
|
|
4594
|
+
throw error;
|
|
4364
4595
|
}
|
|
4365
4596
|
});
|
|
4366
4597
|
}
|
|
@@ -4370,7 +4601,7 @@ class Config {
|
|
|
4370
4601
|
logoutGovernance() {
|
|
4371
4602
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4372
4603
|
const url = `${this.governanceBaseUrl}/api/v1/authnz/authentication/user/logout`;
|
|
4373
|
-
const response = yield
|
|
4604
|
+
const response = yield axios__WEBPACK_IMPORTED_MODULE_11__["default"].post(url, {}, {
|
|
4374
4605
|
headers: this.governanceToken
|
|
4375
4606
|
? { Authorization: `Bearer ${this.governanceToken}` }
|
|
4376
4607
|
: undefined,
|
|
@@ -4386,16 +4617,16 @@ class Config {
|
|
|
4386
4617
|
/**
|
|
4387
4618
|
* Logout from the Datahub portal and clear the stored token.
|
|
4388
4619
|
*/
|
|
4389
|
-
|
|
4620
|
+
logoutLegacyDatahub() {
|
|
4390
4621
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4391
|
-
const url = `${this.
|
|
4392
|
-
const response = yield
|
|
4393
|
-
headers: this.
|
|
4394
|
-
? { Authorization: `Bearer ${this.
|
|
4622
|
+
const url = `${this.legacyDatahubBaseUrl}/api/v1/authnz/authentication/user/logout`;
|
|
4623
|
+
const response = yield axios__WEBPACK_IMPORTED_MODULE_11__["default"].post(url, {}, {
|
|
4624
|
+
headers: this.legacyDatahubToken
|
|
4625
|
+
? { Authorization: `Bearer ${this.legacyDatahubToken}` }
|
|
4395
4626
|
: undefined,
|
|
4396
4627
|
});
|
|
4397
4628
|
if (response.data && response.data.result === "success") {
|
|
4398
|
-
this.
|
|
4629
|
+
this.legacyDatahubToken = null;
|
|
4399
4630
|
}
|
|
4400
4631
|
else {
|
|
4401
4632
|
throw new _error__WEBPACK_IMPORTED_MODULE_9__.UnexpectedResponseFormatError(response.data);
|
|
@@ -4411,8 +4642,8 @@ class Config {
|
|
|
4411
4642
|
/**
|
|
4412
4643
|
* Get the current Datahub access token.
|
|
4413
4644
|
*/
|
|
4414
|
-
|
|
4415
|
-
return this.
|
|
4645
|
+
getLegacyDatahubToken() {
|
|
4646
|
+
return this.legacyDatahubToken;
|
|
4416
4647
|
}
|
|
4417
4648
|
}
|
|
4418
4649
|
Config.instance = null;
|
|
@@ -4577,7 +4808,8 @@ class UnexpectedResponseFormatError extends Error {
|
|
|
4577
4808
|
"use strict";
|
|
4578
4809
|
__webpack_require__.r(__webpack_exports__);
|
|
4579
4810
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4580
|
-
/* harmony export */
|
|
4811
|
+
/* harmony export */ setGovernanceBearerToken: () => (/* binding */ setGovernanceBearerToken),
|
|
4812
|
+
/* harmony export */ setLegacyDatahubBearerToken: () => (/* binding */ setLegacyDatahubBearerToken)
|
|
4581
4813
|
/* harmony export */ });
|
|
4582
4814
|
/* harmony import */ var _SODAS_SDK_CLASS_DCAT_dataService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../SODAS_SDK_CLASS/DCAT/dataService */ "./lib/SODAS_SDK_CLASS/DCAT/dataService.ts");
|
|
4583
4815
|
/* harmony import */ var _SODAS_SDK_CLASS_DCAT_dataset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SODAS_SDK_CLASS/DCAT/dataset */ "./lib/SODAS_SDK_CLASS/DCAT/dataset.ts");
|
|
@@ -4597,13 +4829,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4597
4829
|
* @param {string} token - The Bearer token used for API authentication.
|
|
4598
4830
|
* @returns {void}
|
|
4599
4831
|
*/
|
|
4600
|
-
function
|
|
4832
|
+
function setGovernanceBearerToken(token) {
|
|
4833
|
+
_SODAS_SDK_CLASS_dictionary_vocabulary__WEBPACK_IMPORTED_MODULE_5__["default"].BEARER_TOKEN = token;
|
|
4834
|
+
_SODAS_SDK_CLASS_dictionary_term__WEBPACK_IMPORTED_MODULE_4__["default"].BEARER_TOKEN = token;
|
|
4835
|
+
}
|
|
4836
|
+
function setLegacyDatahubBearerToken(token) {
|
|
4601
4837
|
_SODAS_SDK_CLASS_DCAT_dataset__WEBPACK_IMPORTED_MODULE_1__["default"].BEARER_TOKEN = token;
|
|
4602
4838
|
_SODAS_SDK_CLASS_DCAT_dataService__WEBPACK_IMPORTED_MODULE_0__["default"].BEARER_TOKEN = token;
|
|
4603
4839
|
_SODAS_SDK_CLASS_DCAT_datasetSeries__WEBPACK_IMPORTED_MODULE_2__["default"].BEARER_TOKEN = token;
|
|
4604
4840
|
_SODAS_SDK_CLASS_DCAT_distribution__WEBPACK_IMPORTED_MODULE_3__["default"].BEARER_TOKEN = token;
|
|
4605
|
-
_SODAS_SDK_CLASS_dictionary_vocabulary__WEBPACK_IMPORTED_MODULE_5__["default"].BEARER_TOKEN = token;
|
|
4606
|
-
_SODAS_SDK_CLASS_dictionary_term__WEBPACK_IMPORTED_MODULE_4__["default"].BEARER_TOKEN = token;
|
|
4607
4841
|
}
|
|
4608
4842
|
|
|
4609
4843
|
|
|
@@ -9872,7 +10106,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9872
10106
|
/* harmony export */ asID: () => (/* reexport safe */ _core_type__WEBPACK_IMPORTED_MODULE_6__.asID),
|
|
9873
10107
|
/* harmony export */ asIRI: () => (/* reexport safe */ _core_type__WEBPACK_IMPORTED_MODULE_6__.asIRI),
|
|
9874
10108
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
9875
|
-
/* harmony export */
|
|
10109
|
+
/* harmony export */ setGovernanceBearerToken: () => (/* reexport safe */ _core_init__WEBPACK_IMPORTED_MODULE_5__.setGovernanceBearerToken),
|
|
10110
|
+
/* harmony export */ setLegacyDatahubBearerToken: () => (/* reexport safe */ _core_init__WEBPACK_IMPORTED_MODULE_5__.setLegacyDatahubBearerToken)
|
|
9876
10111
|
/* harmony export */ });
|
|
9877
10112
|
/* harmony import */ var _SODAS_SDK_CLASS_DCAT_dataService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SODAS_SDK_CLASS/DCAT/dataService */ "./lib/SODAS_SDK_CLASS/DCAT/dataService.ts");
|
|
9878
10113
|
/* harmony import */ var _SODAS_SDK_CLASS_DCAT_dataset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SODAS_SDK_CLASS/DCAT/dataset */ "./lib/SODAS_SDK_CLASS/DCAT/dataset.ts");
|
|
@@ -9909,7 +10144,8 @@ const sdk = {
|
|
|
9909
10144
|
SortOrder: _core_type__WEBPACK_IMPORTED_MODULE_6__.SortOrder,
|
|
9910
10145
|
TemplateDetailFunctionality: _core_type__WEBPACK_IMPORTED_MODULE_6__.TemplateDetailFunctionality,
|
|
9911
10146
|
Config: _core_auth__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
9912
|
-
|
|
10147
|
+
setGovernanceBearerToken: _core_init__WEBPACK_IMPORTED_MODULE_5__.setGovernanceBearerToken,
|
|
10148
|
+
setLegacyDatahubBearerToken: _core_init__WEBPACK_IMPORTED_MODULE_5__.setLegacyDatahubBearerToken,
|
|
9913
10149
|
};
|
|
9914
10150
|
// ✅ Ensures `require("sodas-sdk")` works in CommonJS
|
|
9915
10151
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sdk);
|