bruce-models 4.6.0 → 4.6.2
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/bruce-models.es5.js +41 -21
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +41 -21
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/bruce-api.js +30 -16
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +10 -4
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -1066,10 +1066,11 @@
|
|
|
1066
1066
|
if (!tmp.pathname.endsWith("/")) {
|
|
1067
1067
|
tmp.pathname += "/";
|
|
1068
1068
|
}
|
|
1069
|
+
let split;
|
|
1069
1070
|
if (params === null || params === void 0 ? void 0 : params.url) {
|
|
1070
1071
|
// Ensure we're only adding the path.
|
|
1071
1072
|
// The baseUrl could have included query params so have this extra logic.
|
|
1072
|
-
|
|
1073
|
+
split = params.url.split("?");
|
|
1073
1074
|
// Ensure the url does not start with a slash.
|
|
1074
1075
|
// This is because the base url already has a slash at the end.
|
|
1075
1076
|
let path = split[0];
|
|
@@ -1077,16 +1078,22 @@
|
|
|
1077
1078
|
path = path.substring(1);
|
|
1078
1079
|
}
|
|
1079
1080
|
tmp.pathname += path;
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1081
|
+
}
|
|
1082
|
+
let full = tmp.toString();
|
|
1083
|
+
// Append the query string if any exist.
|
|
1084
|
+
if (split && split.length > 1) {
|
|
1085
|
+
const query = split[1].split("&");
|
|
1086
|
+
for (let q of query) {
|
|
1087
|
+
if (full.includes("?")) {
|
|
1088
|
+
full += "&";
|
|
1089
|
+
}
|
|
1090
|
+
else {
|
|
1091
|
+
full += "?";
|
|
1086
1092
|
}
|
|
1093
|
+
full += q;
|
|
1087
1094
|
}
|
|
1088
1095
|
}
|
|
1089
|
-
return
|
|
1096
|
+
return full;
|
|
1090
1097
|
}
|
|
1091
1098
|
/**
|
|
1092
1099
|
* Returns a url routed through the API's CDN.
|
|
@@ -1116,10 +1123,11 @@
|
|
|
1116
1123
|
if (!tmp.pathname.endsWith("/")) {
|
|
1117
1124
|
tmp.pathname += "/";
|
|
1118
1125
|
}
|
|
1126
|
+
let split;
|
|
1119
1127
|
if (url) {
|
|
1120
1128
|
// Ensure we're only adding the path.
|
|
1121
1129
|
// The baseUrl could have included query params so have this extra logic.
|
|
1122
|
-
|
|
1130
|
+
split = url.split("?");
|
|
1123
1131
|
// Ensure the url does not start with a slash.
|
|
1124
1132
|
// This is because the base url already has a slash at the end.
|
|
1125
1133
|
let path = split[0];
|
|
@@ -1127,16 +1135,22 @@
|
|
|
1127
1135
|
path = url.substring(1);
|
|
1128
1136
|
}
|
|
1129
1137
|
tmp.pathname += path;
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1138
|
+
}
|
|
1139
|
+
let full = tmp.toString();
|
|
1140
|
+
// Append the query string if any exist.
|
|
1141
|
+
if (split && split.length > 1) {
|
|
1142
|
+
const query = split[1].split("&");
|
|
1143
|
+
for (let q of query) {
|
|
1144
|
+
if (full.includes("?")) {
|
|
1145
|
+
full += "&";
|
|
1146
|
+
}
|
|
1147
|
+
else {
|
|
1148
|
+
full += "?";
|
|
1136
1149
|
}
|
|
1150
|
+
full += q;
|
|
1137
1151
|
}
|
|
1138
1152
|
}
|
|
1139
|
-
return
|
|
1153
|
+
return full;
|
|
1140
1154
|
}
|
|
1141
1155
|
/**
|
|
1142
1156
|
* Warning: This will cancel the init process.
|
|
@@ -3777,10 +3791,13 @@
|
|
|
3777
3791
|
urlParams.set("schema", schemaId);
|
|
3778
3792
|
}
|
|
3779
3793
|
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3794
|
+
let url = analysis ? "entities/summary" : "entities";
|
|
3795
|
+
// Adding url params here because this will avoid making them encoded.
|
|
3796
|
+
// Our API isn't decoding them properly so $expand is not being recognized.
|
|
3797
|
+
url += "?" + urlParams.toString();
|
|
3780
3798
|
const urlStr = api.ConstructUrl({
|
|
3781
3799
|
cdn: !analysis && viaCdn,
|
|
3782
|
-
url:
|
|
3783
|
-
urlParams: urlParams
|
|
3800
|
+
url: url
|
|
3784
3801
|
});
|
|
3785
3802
|
const data = yield api.get(urlStr, exports.Api.PrepReqParams(reqParams));
|
|
3786
3803
|
if (!analysis) {
|
|
@@ -3800,10 +3817,13 @@
|
|
|
3800
3817
|
urlParams.set("schema", schemaId);
|
|
3801
3818
|
}
|
|
3802
3819
|
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3820
|
+
let url = analysis ? "entities/summary" : "entities";
|
|
3821
|
+
// Adding url params here because this will avoid making them encoded.
|
|
3822
|
+
// Our API isn't decoding them properly so $expand is not being recognized.
|
|
3823
|
+
url += "?" + urlParams.toString();
|
|
3803
3824
|
const urlStr = api.ConstructUrl({
|
|
3804
3825
|
cdn: false,
|
|
3805
|
-
url:
|
|
3806
|
-
urlParams: urlParams
|
|
3826
|
+
url: url
|
|
3807
3827
|
});
|
|
3808
3828
|
const data = yield api.post(urlStr, body, exports.Api.PrepReqParams(reqParams));
|
|
3809
3829
|
if (!analysis) {
|
|
@@ -13490,7 +13510,7 @@
|
|
|
13490
13510
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
13491
13511
|
|
|
13492
13512
|
// This is updated with the package.json version on build.
|
|
13493
|
-
const VERSION = "4.6.
|
|
13513
|
+
const VERSION = "4.6.2";
|
|
13494
13514
|
|
|
13495
13515
|
exports.VERSION = VERSION;
|
|
13496
13516
|
exports.AbstractApi = AbstractApi;
|