@osdk/client 2.2.1 → 2.3.0-beta.10
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/CHANGELOG.md +94 -134
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js +6 -1
- package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -1
- package/build/browser/actions/ActionValidationError.js.map +1 -1
- package/build/browser/actions/applyAction.js +9 -8
- package/build/browser/actions/applyAction.js.map +1 -1
- package/build/browser/createClient.js +8 -1
- package/build/browser/createClient.js.map +1 -1
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +41 -1
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.test.js +145 -12
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.test.js.map +1 -1
- package/build/browser/derivedProperties/derivedPropertyDefinitionFactory.js +93 -0
- package/build/browser/derivedProperties/derivedPropertyDefinitionFactory.js.map +1 -0
- package/build/browser/logger/BaseLogger.js +1 -1
- package/build/browser/logger/BaseLogger.js.map +1 -1
- package/build/browser/object/fetchPage.js +9 -7
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/object/mediaUpload.js +3 -0
- package/build/browser/object/mediaUpload.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +85 -106
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/objectSet/createObjectSet.js +1 -1
- package/build/browser/objectSet/createObjectSet.js.map +1 -1
- package/build/browser/observable/ObservableClient.js +17 -1
- package/build/browser/observable/ObservableClient.js.map +1 -1
- package/build/browser/observable/OptimisticBuilder.js.map +1 -1
- package/build/browser/observable/internal/ActionApplication.js +31 -30
- package/build/browser/observable/internal/ActionApplication.js.map +1 -1
- package/build/browser/observable/internal/Changes.js +5 -1
- package/build/browser/observable/internal/Changes.js.map +1 -1
- package/build/browser/observable/internal/ListQuery.js +24 -22
- package/build/browser/observable/internal/ListQuery.js.map +1 -1
- package/build/browser/observable/internal/ObjectQuery.js +30 -1
- package/build/browser/observable/internal/ObjectQuery.js.map +1 -1
- package/build/browser/observable/internal/ObservableClientImpl.js +1 -2
- package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/browser/observable/internal/OptimisticJob.js +8 -0
- package/build/browser/observable/internal/OptimisticJob.js.map +1 -1
- package/build/browser/observable/internal/Query.js +2 -2
- package/build/browser/observable/internal/Query.js.map +1 -1
- package/build/browser/observable/internal/Store.js +4 -0
- package/build/browser/observable/internal/Store.js.map +1 -1
- package/build/browser/observable/internal/Store.test.js +45 -5
- package/build/browser/observable/internal/Store.test.js.map +1 -1
- package/build/browser/observable/internal/testUtils.js.map +1 -1
- package/build/browser/observable/internal/tombstone.js +18 -0
- package/build/browser/observable/internal/tombstone.js.map +1 -0
- package/build/browser/public/internal.js +1 -0
- package/build/browser/public/internal.js.map +1 -1
- package/build/browser/public-utils/hydrateObjectSetFromObjectRids.js +39 -0
- package/build/browser/public-utils/hydrateObjectSetFromObjectRids.js.map +1 -0
- package/build/browser/queries/applyQuery.js +8 -4
- package/build/browser/queries/applyQuery.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -1
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/browser/util/extractRdpDefinition.js +2 -0
- package/build/browser/util/extractRdpDefinition.js.map +1 -1
- package/build/browser/util/toDataValue.js +20 -10
- package/build/browser/util/toDataValue.js.map +1 -1
- package/build/browser/util/toDataValue.test.js +50 -11
- package/build/browser/util/toDataValue.test.js.map +1 -1
- package/build/cjs/chunk-VZ57PNLC.cjs +1808 -0
- package/build/cjs/chunk-VZ57PNLC.cjs.map +1 -0
- package/build/cjs/{chunk-LPYAXRWJ.cjs → chunk-YGJRXE4F.cjs} +757 -36
- package/build/cjs/chunk-YGJRXE4F.cjs.map +1 -0
- package/build/cjs/index.cjs +16 -1764
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +4 -3
- package/build/cjs/public/internal.cjs +22 -8
- package/build/cjs/public/internal.cjs.map +1 -1
- package/build/cjs/public/internal.d.cts +10 -1
- package/build/cjs/public/unstable-do-not-use.cjs +182 -123
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +2 -1
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +6 -1
- package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -1
- package/build/esm/actions/ActionValidationError.js.map +1 -1
- package/build/esm/actions/applyAction.js +9 -8
- package/build/esm/actions/applyAction.js.map +1 -1
- package/build/esm/createClient.js +8 -1
- package/build/esm/createClient.js.map +1 -1
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +41 -1
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.test.js +145 -12
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.test.js.map +1 -1
- package/build/esm/derivedProperties/derivedPropertyDefinitionFactory.js +93 -0
- package/build/esm/derivedProperties/derivedPropertyDefinitionFactory.js.map +1 -0
- package/build/esm/logger/BaseLogger.js +1 -1
- package/build/esm/logger/BaseLogger.js.map +1 -1
- package/build/esm/object/fetchPage.js +9 -7
- package/build/esm/object/fetchPage.js.map +1 -1
- package/build/esm/object/mediaUpload.js +3 -0
- package/build/esm/object/mediaUpload.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +85 -106
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/objectSet/createObjectSet.js +1 -1
- package/build/esm/objectSet/createObjectSet.js.map +1 -1
- package/build/esm/observable/ObservableClient.js +17 -1
- package/build/esm/observable/ObservableClient.js.map +1 -1
- package/build/esm/observable/OptimisticBuilder.js.map +1 -1
- package/build/esm/observable/internal/ActionApplication.js +31 -30
- package/build/esm/observable/internal/ActionApplication.js.map +1 -1
- package/build/esm/observable/internal/Changes.js +5 -1
- package/build/esm/observable/internal/Changes.js.map +1 -1
- package/build/esm/observable/internal/ListQuery.js +24 -22
- package/build/esm/observable/internal/ListQuery.js.map +1 -1
- package/build/esm/observable/internal/ObjectQuery.js +30 -1
- package/build/esm/observable/internal/ObjectQuery.js.map +1 -1
- package/build/esm/observable/internal/ObservableClientImpl.js +1 -2
- package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/esm/observable/internal/OptimisticJob.js +8 -0
- package/build/esm/observable/internal/OptimisticJob.js.map +1 -1
- package/build/esm/observable/internal/Query.js +2 -2
- package/build/esm/observable/internal/Query.js.map +1 -1
- package/build/esm/observable/internal/Store.js +4 -0
- package/build/esm/observable/internal/Store.js.map +1 -1
- package/build/esm/observable/internal/Store.test.js +45 -5
- package/build/esm/observable/internal/Store.test.js.map +1 -1
- package/build/esm/observable/internal/testUtils.js.map +1 -1
- package/build/esm/observable/internal/tombstone.js +18 -0
- package/build/esm/observable/internal/tombstone.js.map +1 -0
- package/build/esm/public/internal.js +1 -0
- package/build/esm/public/internal.js.map +1 -1
- package/build/esm/public-utils/hydrateObjectSetFromObjectRids.js +39 -0
- package/build/esm/public-utils/hydrateObjectSetFromObjectRids.js.map +1 -0
- package/build/esm/queries/applyQuery.js +8 -4
- package/build/esm/queries/applyQuery.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -1
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/esm/util/extractRdpDefinition.js +2 -0
- package/build/esm/util/extractRdpDefinition.js.map +1 -1
- package/build/esm/util/toDataValue.js +20 -10
- package/build/esm/util/toDataValue.js.map +1 -1
- package/build/esm/util/toDataValue.test.js +50 -11
- package/build/esm/util/toDataValue.test.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/build/types/actions/ActionValidationError.d.ts +1 -1
- package/build/types/actions/ActionValidationError.d.ts.map +1 -1
- package/build/types/actions/applyAction.d.ts.map +1 -1
- package/build/types/createClient.d.ts.map +1 -1
- package/build/types/derivedProperties/derivedPropertyDefinitionFactory.d.ts +1 -0
- package/build/types/derivedProperties/derivedPropertyDefinitionFactory.d.ts.map +1 -0
- package/build/types/object/mediaUpload.d.ts +2 -1
- package/build/types/object/mediaUpload.d.ts.map +1 -1
- package/build/types/observable/ObservableClient.d.ts +2 -2
- package/build/types/observable/ObservableClient.d.ts.map +1 -1
- package/build/types/observable/OptimisticBuilder.d.ts +1 -0
- package/build/types/observable/OptimisticBuilder.d.ts.map +1 -1
- package/build/types/observable/internal/ActionApplication.d.ts +1 -1
- package/build/types/observable/internal/ActionApplication.d.ts.map +1 -1
- package/build/types/observable/internal/Changes.d.ts +2 -0
- package/build/types/observable/internal/Changes.d.ts.map +1 -1
- package/build/types/observable/internal/ListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/ObjectQuery.d.ts +1 -0
- package/build/types/observable/internal/ObjectQuery.d.ts.map +1 -1
- package/build/types/observable/internal/OptimisticJob.d.ts.map +1 -1
- package/build/types/observable/internal/Store.d.ts +2 -1
- package/build/types/observable/internal/Store.d.ts.map +1 -1
- package/build/types/observable/internal/testUtils.d.ts +1 -1
- package/build/types/observable/internal/testUtils.d.ts.map +1 -1
- package/build/types/observable/internal/tombstone.d.ts +1 -0
- package/build/types/observable/internal/tombstone.d.ts.map +1 -0
- package/build/types/public/internal.d.ts +1 -0
- package/build/types/public/internal.d.ts.map +1 -1
- package/build/types/public-utils/hydrateObjectSetFromObjectRids.d.ts +10 -0
- package/build/types/public-utils/hydrateObjectSetFromObjectRids.d.ts.map +1 -0
- package/build/types/queries/applyQuery.d.ts.map +1 -1
- package/build/types/util/UserAgent.d.ts +1 -0
- package/build/types/util/UserAgent.d.ts.map +1 -1
- package/package.json +14 -14
- package/build/cjs/chunk-LPYAXRWJ.cjs.map +0 -1
- package/build/cjs/chunk-T4NIFYZS.cjs +0 -14
- package/build/cjs/chunk-T4NIFYZS.cjs.map +0 -1
- package/build/cjs/chunk-UCW7RLKM.cjs +0 -615
- package/build/cjs/chunk-UCW7RLKM.cjs.map +0 -1
|
@@ -1,615 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var shared_net_errors = require('@osdk/shared.net.errors');
|
|
4
|
-
var shared_net_fetch = require('@osdk/shared.net.fetch');
|
|
5
|
-
var invariant = require('tiny-invariant');
|
|
6
|
-
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
10
|
-
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __export = (target, all) => {
|
|
13
|
-
for (var name in all)
|
|
14
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
18
|
-
var Action_exports = {};
|
|
19
|
-
__export(Action_exports, {
|
|
20
|
-
apply: () => apply,
|
|
21
|
-
applyAsync: () => applyAsync,
|
|
22
|
-
applyBatch: () => applyBatch
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// ../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js
|
|
26
|
-
var symbolClientContext = Symbol("ClientContext");
|
|
27
|
-
|
|
28
|
-
// ../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js
|
|
29
|
-
var symbolClientContext2 = "__osdkClientContext";
|
|
30
|
-
async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
|
|
31
|
-
const path = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
|
|
32
|
-
const body = flags & 1 ? args.shift() : void 0;
|
|
33
|
-
const queryArgs = flags & 2 ? args.shift() : void 0;
|
|
34
|
-
const headerArgs = flags & 4 ? args.shift() : void 0;
|
|
35
|
-
const method = ["GET", "POST", "PUT", "DELETE", "PATCH"][httpMethodNum];
|
|
36
|
-
return await apiFetch(client[symbolClientContext2] ?? client[symbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);
|
|
37
|
-
}
|
|
38
|
-
async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {
|
|
39
|
-
const url = parseUrl(clientCtx.baseUrl, endpointPath);
|
|
40
|
-
for (const [key, value] of Object.entries(queryArguments || {})) {
|
|
41
|
-
if (value == null) {
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
if (Array.isArray(value)) {
|
|
45
|
-
for (const item of value) {
|
|
46
|
-
url.searchParams.append(key, item);
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
url.searchParams.append(key, value);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
const headersInit = new Headers();
|
|
53
|
-
headersInit.set("Content-Type", requestMediaType ?? "application/json");
|
|
54
|
-
headersInit.set("Accept", responseMediaType ?? "application/json");
|
|
55
|
-
Object.entries(headers || {}).forEach(([key, value]) => {
|
|
56
|
-
if (value != null) {
|
|
57
|
-
headersInit.append(key, value.toString());
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);
|
|
61
|
-
const response = await clientCtx.fetch(url.toString(), {
|
|
62
|
-
body,
|
|
63
|
-
method,
|
|
64
|
-
headers: headersInit
|
|
65
|
-
});
|
|
66
|
-
if (!response.ok) {
|
|
67
|
-
try {
|
|
68
|
-
const convertedError = await response.json();
|
|
69
|
-
return new shared_net_errors.PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, response.status, convertedError.errorInstanceId, convertedError.parameters);
|
|
70
|
-
} catch (e) {
|
|
71
|
-
if (e instanceof Error) {
|
|
72
|
-
return new shared_net_errors.UnknownError(e.message, "UNKNOWN");
|
|
73
|
-
}
|
|
74
|
-
return new shared_net_errors.UnknownError("Unable to parse error response", "UNKNOWN");
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (response.status === 204) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (responseMediaType == null || responseMediaType === "application/json") {
|
|
81
|
-
return await response.json();
|
|
82
|
-
}
|
|
83
|
-
return response;
|
|
84
|
-
}
|
|
85
|
-
function parseUrl(baseUrl, endpointPath) {
|
|
86
|
-
baseUrl += baseUrl.endsWith("/") ? "" : "/";
|
|
87
|
-
return new URL(`api${endpointPath}`, baseUrl);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
91
|
-
var _apply = [1, "/v2/ontologies/{0}/actions/{1}/apply", 3];
|
|
92
|
-
function apply($ctx, ...args) {
|
|
93
|
-
return foundryPlatformFetch($ctx, _apply, ...args);
|
|
94
|
-
}
|
|
95
|
-
var _applyAsync = [1, "/v2/ontologies/{0}/actions/{1}/applyAsync", 3];
|
|
96
|
-
function applyAsync($ctx, ...args) {
|
|
97
|
-
return foundryPlatformFetch($ctx, _applyAsync, ...args);
|
|
98
|
-
}
|
|
99
|
-
var _applyBatch = [1, "/v2/ontologies/{0}/actions/{1}/applyBatch", 3];
|
|
100
|
-
function applyBatch($ctx, ...args) {
|
|
101
|
-
return foundryPlatformFetch($ctx, _applyBatch, ...args);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
105
|
-
var ActionTypeV2_exports = {};
|
|
106
|
-
__export(ActionTypeV2_exports, {
|
|
107
|
-
get: () => get,
|
|
108
|
-
getByRid: () => getByRid,
|
|
109
|
-
list: () => list
|
|
110
|
-
});
|
|
111
|
-
var _list = [0, "/v2/ontologies/{0}/actionTypes", 2];
|
|
112
|
-
function list($ctx, ...args) {
|
|
113
|
-
return foundryPlatformFetch($ctx, _list, ...args);
|
|
114
|
-
}
|
|
115
|
-
var _get = [0, "/v2/ontologies/{0}/actionTypes/{1}"];
|
|
116
|
-
function get($ctx, ...args) {
|
|
117
|
-
return foundryPlatformFetch($ctx, _get, ...args);
|
|
118
|
-
}
|
|
119
|
-
var _getByRid = [0, "/v2/ontologies/{0}/actionTypes/byRid/{1}"];
|
|
120
|
-
function getByRid($ctx, ...args) {
|
|
121
|
-
return foundryPlatformFetch($ctx, _getByRid, ...args);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
125
|
-
var Attachment_exports = {};
|
|
126
|
-
__export(Attachment_exports, {
|
|
127
|
-
get: () => get2,
|
|
128
|
-
read: () => read,
|
|
129
|
-
upload: () => upload
|
|
130
|
-
});
|
|
131
|
-
var _upload = [1, "/v2/ontologies/attachments/upload", 7, "*/*"];
|
|
132
|
-
function upload($ctx, ...args) {
|
|
133
|
-
const headerParams = {
|
|
134
|
-
...args[2],
|
|
135
|
-
"Content-Type": args[2]?.["Content-Type"] ?? args[0].type,
|
|
136
|
-
"Content-Length": args[0].size.toString()
|
|
137
|
-
};
|
|
138
|
-
return foundryPlatformFetch($ctx, _upload, args[0], args[1], headerParams);
|
|
139
|
-
}
|
|
140
|
-
var _read = [0, "/v2/ontologies/attachments/{0}/content", , , "*/*"];
|
|
141
|
-
function read($ctx, ...args) {
|
|
142
|
-
return foundryPlatformFetch($ctx, _read, ...args);
|
|
143
|
-
}
|
|
144
|
-
var _get2 = [0, "/v2/ontologies/attachments/{0}"];
|
|
145
|
-
function get2($ctx, ...args) {
|
|
146
|
-
return foundryPlatformFetch($ctx, _get2, ...args);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
150
|
-
var MediaReferenceProperty_exports = {};
|
|
151
|
-
__export(MediaReferenceProperty_exports, {
|
|
152
|
-
getMediaContent: () => getMediaContent,
|
|
153
|
-
getMediaMetadata: () => getMediaMetadata,
|
|
154
|
-
upload: () => upload2
|
|
155
|
-
});
|
|
156
|
-
var _getMediaContent = [0, "/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/content", 2, , "*/*"];
|
|
157
|
-
function getMediaContent($ctx, ...args) {
|
|
158
|
-
return foundryPlatformFetch($ctx, _getMediaContent, ...args);
|
|
159
|
-
}
|
|
160
|
-
var _getMediaMetadata = [0, "/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/metadata", 2];
|
|
161
|
-
function getMediaMetadata($ctx, ...args) {
|
|
162
|
-
return foundryPlatformFetch($ctx, _getMediaMetadata, ...args);
|
|
163
|
-
}
|
|
164
|
-
var _upload2 = [1, "/v2/ontologies/{0}/objectTypes/{1}/media/{2}/upload", 3, "*/*"];
|
|
165
|
-
function upload2($ctx, ...args) {
|
|
166
|
-
return foundryPlatformFetch($ctx, _upload2, ...args);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
170
|
-
var ObjectTypeV2_exports = {};
|
|
171
|
-
__export(ObjectTypeV2_exports, {
|
|
172
|
-
get: () => get3,
|
|
173
|
-
getFullMetadata: () => getFullMetadata,
|
|
174
|
-
getOutgoingLinkType: () => getOutgoingLinkType,
|
|
175
|
-
list: () => list2,
|
|
176
|
-
listOutgoingLinkTypes: () => listOutgoingLinkTypes
|
|
177
|
-
});
|
|
178
|
-
var _list2 = [0, "/v2/ontologies/{0}/objectTypes", 2];
|
|
179
|
-
function list2($ctx, ...args) {
|
|
180
|
-
return foundryPlatformFetch($ctx, _list2, ...args);
|
|
181
|
-
}
|
|
182
|
-
var _get3 = [0, "/v2/ontologies/{0}/objectTypes/{1}"];
|
|
183
|
-
function get3($ctx, ...args) {
|
|
184
|
-
return foundryPlatformFetch($ctx, _get3, ...args);
|
|
185
|
-
}
|
|
186
|
-
var _getFullMetadata = [0, "/v2/ontologies/{0}/objectTypes/{1}/fullMetadata", 2];
|
|
187
|
-
function getFullMetadata($ctx, ...args) {
|
|
188
|
-
return foundryPlatformFetch($ctx, _getFullMetadata, ...args);
|
|
189
|
-
}
|
|
190
|
-
var _listOutgoingLinkTypes = [0, "/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes", 2];
|
|
191
|
-
function listOutgoingLinkTypes($ctx, ...args) {
|
|
192
|
-
return foundryPlatformFetch($ctx, _listOutgoingLinkTypes, ...args);
|
|
193
|
-
}
|
|
194
|
-
var _getOutgoingLinkType = [0, "/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes/{2}"];
|
|
195
|
-
function getOutgoingLinkType($ctx, ...args) {
|
|
196
|
-
return foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
200
|
-
var OntologyInterface_exports = {};
|
|
201
|
-
__export(OntologyInterface_exports, {
|
|
202
|
-
aggregate: () => aggregate,
|
|
203
|
-
get: () => get4,
|
|
204
|
-
list: () => list3,
|
|
205
|
-
search: () => search
|
|
206
|
-
});
|
|
207
|
-
var _list3 = [0, "/v2/ontologies/{0}/interfaceTypes", 2];
|
|
208
|
-
function list3($ctx, ...args) {
|
|
209
|
-
return foundryPlatformFetch($ctx, _list3, ...args);
|
|
210
|
-
}
|
|
211
|
-
var _get4 = [0, "/v2/ontologies/{0}/interfaceTypes/{1}", 2];
|
|
212
|
-
function get4($ctx, ...args) {
|
|
213
|
-
return foundryPlatformFetch($ctx, _get4, ...args);
|
|
214
|
-
}
|
|
215
|
-
var _search = [1, "/v2/ontologies/{0}/interfaces/{1}/search", 3];
|
|
216
|
-
function search($ctx, ...args) {
|
|
217
|
-
return foundryPlatformFetch($ctx, _search, ...args);
|
|
218
|
-
}
|
|
219
|
-
var _aggregate = [1, "/v2/ontologies/{0}/interfaces/{1}/aggregate", 3];
|
|
220
|
-
function aggregate($ctx, ...args) {
|
|
221
|
-
return foundryPlatformFetch($ctx, _aggregate, ...args);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
225
|
-
var OntologyObjectSet_exports = {};
|
|
226
|
-
__export(OntologyObjectSet_exports, {
|
|
227
|
-
aggregate: () => aggregate2,
|
|
228
|
-
createTemporary: () => createTemporary,
|
|
229
|
-
get: () => get5,
|
|
230
|
-
load: () => load,
|
|
231
|
-
loadMultipleObjectTypes: () => loadMultipleObjectTypes,
|
|
232
|
-
loadObjectsOrInterfaces: () => loadObjectsOrInterfaces
|
|
233
|
-
});
|
|
234
|
-
var _createTemporary = [1, "/v2/ontologies/{0}/objectSets/createTemporary", 1];
|
|
235
|
-
function createTemporary($ctx, ...args) {
|
|
236
|
-
return foundryPlatformFetch($ctx, _createTemporary, ...args);
|
|
237
|
-
}
|
|
238
|
-
var _get5 = [0, "/v2/ontologies/{0}/objectSets/{1}"];
|
|
239
|
-
function get5($ctx, ...args) {
|
|
240
|
-
return foundryPlatformFetch($ctx, _get5, ...args);
|
|
241
|
-
}
|
|
242
|
-
var _load = [1, "/v2/ontologies/{0}/objectSets/loadObjects", 3];
|
|
243
|
-
function load($ctx, ...args) {
|
|
244
|
-
return foundryPlatformFetch($ctx, _load, ...args);
|
|
245
|
-
}
|
|
246
|
-
var _loadMultipleObjectTypes = [1, "/v2/ontologies/{0}/objectSets/loadObjectsMultipleObjectTypes", 3];
|
|
247
|
-
function loadMultipleObjectTypes($ctx, ...args) {
|
|
248
|
-
return foundryPlatformFetch($ctx, _loadMultipleObjectTypes, ...args);
|
|
249
|
-
}
|
|
250
|
-
var _loadObjectsOrInterfaces = [1, "/v2/ontologies/{0}/objectSets/loadObjectsOrInterfaces", 3];
|
|
251
|
-
function loadObjectsOrInterfaces($ctx, ...args) {
|
|
252
|
-
return foundryPlatformFetch($ctx, _loadObjectsOrInterfaces, ...args);
|
|
253
|
-
}
|
|
254
|
-
var _aggregate2 = [1, "/v2/ontologies/{0}/objectSets/aggregate", 3];
|
|
255
|
-
function aggregate2($ctx, ...args) {
|
|
256
|
-
return foundryPlatformFetch($ctx, _aggregate2, ...args);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
260
|
-
var Query_exports = {};
|
|
261
|
-
__export(Query_exports, {
|
|
262
|
-
execute: () => execute
|
|
263
|
-
});
|
|
264
|
-
var _execute = [1, "/v2/ontologies/{0}/queries/{1}/execute", 3];
|
|
265
|
-
function execute($ctx, ...args) {
|
|
266
|
-
return foundryPlatformFetch($ctx, _execute, ...args);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
270
|
-
var QueryType_exports = {};
|
|
271
|
-
__export(QueryType_exports, {
|
|
272
|
-
get: () => get6,
|
|
273
|
-
list: () => list4
|
|
274
|
-
});
|
|
275
|
-
var _list4 = [0, "/v2/ontologies/{0}/queryTypes", 2];
|
|
276
|
-
function list4($ctx, ...args) {
|
|
277
|
-
return foundryPlatformFetch($ctx, _list4, ...args);
|
|
278
|
-
}
|
|
279
|
-
var _get6 = [0, "/v2/ontologies/{0}/queryTypes/{1}", 2];
|
|
280
|
-
function get6($ctx, ...args) {
|
|
281
|
-
return foundryPlatformFetch($ctx, _get6, ...args);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
285
|
-
var TimeSeriesPropertyV2_exports = {};
|
|
286
|
-
__export(TimeSeriesPropertyV2_exports, {
|
|
287
|
-
getFirstPoint: () => getFirstPoint,
|
|
288
|
-
getLastPoint: () => getLastPoint,
|
|
289
|
-
streamPoints: () => streamPoints
|
|
290
|
-
});
|
|
291
|
-
var _getFirstPoint = [0, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint", 2];
|
|
292
|
-
function getFirstPoint($ctx, ...args) {
|
|
293
|
-
return foundryPlatformFetch($ctx, _getFirstPoint, ...args);
|
|
294
|
-
}
|
|
295
|
-
var _getLastPoint = [0, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/lastPoint", 2];
|
|
296
|
-
function getLastPoint($ctx, ...args) {
|
|
297
|
-
return foundryPlatformFetch($ctx, _getLastPoint, ...args);
|
|
298
|
-
}
|
|
299
|
-
var _streamPoints = [1, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamPoints", 3, , "*/*"];
|
|
300
|
-
function streamPoints($ctx, ...args) {
|
|
301
|
-
return foundryPlatformFetch($ctx, _streamPoints, ...args);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.20.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
305
|
-
var TimeSeriesValueBankProperty_exports = {};
|
|
306
|
-
__export(TimeSeriesValueBankProperty_exports, {
|
|
307
|
-
getLatestValue: () => getLatestValue,
|
|
308
|
-
streamValues: () => streamValues
|
|
309
|
-
});
|
|
310
|
-
var _getLatestValue = [0, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/latestValue", 2];
|
|
311
|
-
function getLatestValue($ctx, ...args) {
|
|
312
|
-
return foundryPlatformFetch($ctx, _getLatestValue, ...args);
|
|
313
|
-
}
|
|
314
|
-
var _streamValues = [1, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamValues", 3, , "*/*"];
|
|
315
|
-
function streamValues($ctx, ...args) {
|
|
316
|
-
return foundryPlatformFetch($ctx, _streamValues, ...args);
|
|
317
|
-
}
|
|
318
|
-
var addUserAgentAndRequestContextHeaders = (client, withMetadata) => ({
|
|
319
|
-
...client,
|
|
320
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client.fetch, (headers) => {
|
|
321
|
-
headers.set("X-OSDK-Request-Context", JSON.stringify(client.requestContext));
|
|
322
|
-
if (withMetadata.osdkMetadata) {
|
|
323
|
-
headers.set("Fetch-User-Agent", withMetadata.osdkMetadata.extraUserAgent);
|
|
324
|
-
}
|
|
325
|
-
return headers;
|
|
326
|
-
})
|
|
327
|
-
});
|
|
328
|
-
async function extractRdpDefinition(clientCtx, objectSet) {
|
|
329
|
-
return (await extractRdpDefinitionInternal(clientCtx, objectSet, void 0)).definitions;
|
|
330
|
-
}
|
|
331
|
-
async function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObjectType) {
|
|
332
|
-
switch (objectSet.type) {
|
|
333
|
-
case "searchAround": {
|
|
334
|
-
const {
|
|
335
|
-
definitions: definitions2,
|
|
336
|
-
childObjectType
|
|
337
|
-
} = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);
|
|
338
|
-
if (childObjectType === void 0 || childObjectType === "") {
|
|
339
|
-
return {
|
|
340
|
-
definitions: {}
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
const objDef = await clientCtx.ontologyProvider.getObjectDefinition(childObjectType);
|
|
344
|
-
const linkDef = objDef.links[objectSet.link];
|
|
345
|
-
!linkDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing link definition for '${objectSet.link}'`) : invariant__default.default(false) : void 0;
|
|
346
|
-
return {
|
|
347
|
-
definitions: definitions2,
|
|
348
|
-
childObjectType: objDef.links[objectSet.link].targetType
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
case "withProperties": {
|
|
352
|
-
const {
|
|
353
|
-
definitions: definitions2,
|
|
354
|
-
childObjectType
|
|
355
|
-
} = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);
|
|
356
|
-
if (childObjectType === void 0 || childObjectType === "") {
|
|
357
|
-
return {
|
|
358
|
-
definitions: {}
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
for (const [name, definition] of Object.entries(objectSet.derivedProperties)) {
|
|
362
|
-
if (definition.type !== "selection") {
|
|
363
|
-
definitions2[name] = {
|
|
364
|
-
selectedOrCollectedPropertyType: void 0,
|
|
365
|
-
definition
|
|
366
|
-
};
|
|
367
|
-
continue;
|
|
368
|
-
}
|
|
369
|
-
switch (definition.operation.type) {
|
|
370
|
-
case "collectList":
|
|
371
|
-
case "collectSet":
|
|
372
|
-
case "get":
|
|
373
|
-
const {
|
|
374
|
-
childObjectType: operationLevelObjectType
|
|
375
|
-
} = await extractRdpDefinitionInternal(clientCtx, definition.objectSet, childObjectType);
|
|
376
|
-
if (operationLevelObjectType === void 0 || operationLevelObjectType === "") {
|
|
377
|
-
return {
|
|
378
|
-
definitions: {}
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
const objDef = await clientCtx.ontologyProvider.getObjectDefinition(operationLevelObjectType);
|
|
382
|
-
definitions2[name] = {
|
|
383
|
-
selectedOrCollectedPropertyType: objDef.properties[definition.operation.selectedPropertyApiName],
|
|
384
|
-
definition
|
|
385
|
-
};
|
|
386
|
-
break;
|
|
387
|
-
default:
|
|
388
|
-
definitions2[name] = {
|
|
389
|
-
selectedOrCollectedPropertyType: void 0,
|
|
390
|
-
definition
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
return {
|
|
395
|
-
definitions: definitions2,
|
|
396
|
-
childObjectType
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
case "methodInput":
|
|
400
|
-
return {
|
|
401
|
-
definitions: {},
|
|
402
|
-
childObjectType: methodInputObjectType
|
|
403
|
-
};
|
|
404
|
-
case "base":
|
|
405
|
-
return {
|
|
406
|
-
definitions: {},
|
|
407
|
-
childObjectType: objectSet.objectType
|
|
408
|
-
};
|
|
409
|
-
case "interfaceBase":
|
|
410
|
-
return {
|
|
411
|
-
definitions: {},
|
|
412
|
-
childObjectType: objectSet.interfaceType
|
|
413
|
-
};
|
|
414
|
-
case "filter":
|
|
415
|
-
case "asBaseObjectTypes":
|
|
416
|
-
case "asType":
|
|
417
|
-
case "nearestNeighbors":
|
|
418
|
-
return extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);
|
|
419
|
-
// These will throw in OSS so we should throw here so no request is made
|
|
420
|
-
case "intersect":
|
|
421
|
-
case "subtract":
|
|
422
|
-
case "union":
|
|
423
|
-
const objectSets = objectSet.objectSets;
|
|
424
|
-
const objectSetTypes = await Promise.all(objectSets.map((os) => extractRdpDefinitionInternal(clientCtx, os, methodInputObjectType)));
|
|
425
|
-
const definitions = objectSetTypes.reduce((acc, {
|
|
426
|
-
definitions: definitions2
|
|
427
|
-
}) => ({
|
|
428
|
-
...acc,
|
|
429
|
-
...definitions2
|
|
430
|
-
}), {});
|
|
431
|
-
!(Object.keys(definitions).length === 0) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Object sets combined using intersect, subtract, or union must not contain any derived property definitions") : invariant__default.default(false) : void 0;
|
|
432
|
-
const firstValidChildObjectType = objectSetTypes.find(({
|
|
433
|
-
childObjectType
|
|
434
|
-
}) => childObjectType != null)?.childObjectType;
|
|
435
|
-
!objectSetTypes.every(({
|
|
436
|
-
childObjectType
|
|
437
|
-
}) => childObjectType === firstValidChildObjectType || childObjectType == null) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "All object sets in an intersect, subtract, or union must have the same child object type") : invariant__default.default(false) : void 0;
|
|
438
|
-
return {
|
|
439
|
-
definitions: {},
|
|
440
|
-
childObjectType: firstValidChildObjectType
|
|
441
|
-
};
|
|
442
|
-
case "static":
|
|
443
|
-
case "reference":
|
|
444
|
-
return {
|
|
445
|
-
definitions: {}
|
|
446
|
-
};
|
|
447
|
-
// We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.
|
|
448
|
-
default:
|
|
449
|
-
process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Unsupported object set type for Runtime Derived Properties`) : invariant__default.default(false) ;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// src/util/objectSetUtils.ts
|
|
454
|
-
function resolveBaseObjectSetType(objectType) {
|
|
455
|
-
return objectType.type === "interface" ? {
|
|
456
|
-
type: "interfaceBase",
|
|
457
|
-
interfaceType: objectType["apiName"]
|
|
458
|
-
} : {
|
|
459
|
-
type: "base",
|
|
460
|
-
objectType: objectType["apiName"]
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
// src/object/fetchPage.ts
|
|
465
|
-
function augment(type, ...properties) {
|
|
466
|
-
return {
|
|
467
|
-
[type.apiName]: properties
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWhere = void 0) {
|
|
471
|
-
if (objectSet.type === "base" || objectSet.type === "interfaceBase") {
|
|
472
|
-
if (objectSet.type === "base" && objectSet.objectType !== expectedApiName) {
|
|
473
|
-
throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`);
|
|
474
|
-
}
|
|
475
|
-
if (objectSet.type === "interfaceBase" && objectSet.interfaceType !== expectedApiName) {
|
|
476
|
-
throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.interfaceType}`);
|
|
477
|
-
}
|
|
478
|
-
return existingWhere;
|
|
479
|
-
}
|
|
480
|
-
if (objectSet.type === "filter") {
|
|
481
|
-
return objectSetToSearchJsonV2(objectSet.objectSet, expectedApiName, existingWhere == null ? objectSet.where : {
|
|
482
|
-
type: "and",
|
|
483
|
-
value: [existingWhere, objectSet.where]
|
|
484
|
-
});
|
|
485
|
-
}
|
|
486
|
-
throw new Error(`Unsupported objectSet type: ${objectSet.type}`);
|
|
487
|
-
}
|
|
488
|
-
function resolveInterfaceObjectSet(objectSet, interfaceTypeApiName, args) {
|
|
489
|
-
return args?.$includeAllBaseObjectProperties ? {
|
|
490
|
-
type: "intersect",
|
|
491
|
-
objectSets: [objectSet, {
|
|
492
|
-
type: "interfaceBase",
|
|
493
|
-
interfaceType: interfaceTypeApiName,
|
|
494
|
-
includeAllBaseObjectProperties: true
|
|
495
|
-
}]
|
|
496
|
-
} : objectSet;
|
|
497
|
-
}
|
|
498
|
-
async function fetchInterfacePage(client, interfaceType, args, objectSet) {
|
|
499
|
-
if (args.$__UNSTABLE_useOldInterfaceApis) {
|
|
500
|
-
const result2 = await OntologyInterface_exports.search(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, applyFetchArgs(args, {
|
|
501
|
-
augmentedProperties: {},
|
|
502
|
-
augmentedSharedPropertyTypes: {},
|
|
503
|
-
otherInterfaceTypes: [],
|
|
504
|
-
selectedObjectTypes: [],
|
|
505
|
-
selectedSharedPropertyTypes: args.$select ?? [],
|
|
506
|
-
where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)
|
|
507
|
-
}), {
|
|
508
|
-
preview: true
|
|
509
|
-
});
|
|
510
|
-
result2.data = await client.objectFactory(
|
|
511
|
-
client,
|
|
512
|
-
result2.data,
|
|
513
|
-
// drop readonly
|
|
514
|
-
interfaceType.apiName,
|
|
515
|
-
!args.$includeRid,
|
|
516
|
-
await extractRdpDefinition(client, objectSet)
|
|
517
|
-
);
|
|
518
|
-
return result2;
|
|
519
|
-
}
|
|
520
|
-
const result = await OntologyObjectSet_exports.loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, applyFetchArgs(args, {
|
|
521
|
-
objectSet: resolveInterfaceObjectSet(objectSet, interfaceType.apiName, args),
|
|
522
|
-
select: args?.$select ?? [],
|
|
523
|
-
excludeRid: !args?.$includeRid
|
|
524
|
-
}), {
|
|
525
|
-
preview: true
|
|
526
|
-
});
|
|
527
|
-
return Promise.resolve({
|
|
528
|
-
data: await client.objectFactory2(client, result.data, interfaceType.apiName, {}, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings),
|
|
529
|
-
nextPageToken: result.nextPageToken,
|
|
530
|
-
totalCount: result.totalCount
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
async function fetchPageInternal(client, objectType, objectSet, args = {}) {
|
|
534
|
-
if (objectType.type === "interface") {
|
|
535
|
-
return await fetchInterfacePage(client, objectType, args, objectSet);
|
|
536
|
-
} else {
|
|
537
|
-
return await fetchObjectPage(client, objectType, args, objectSet);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
async function fetchPageWithErrorsInternal(client, objectType, objectSet, args = {}) {
|
|
541
|
-
try {
|
|
542
|
-
const result = await fetchPageInternal(client, objectType, objectSet, args);
|
|
543
|
-
return {
|
|
544
|
-
value: result
|
|
545
|
-
};
|
|
546
|
-
} catch (e) {
|
|
547
|
-
if (e instanceof Error) {
|
|
548
|
-
return {
|
|
549
|
-
error: e
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
return {
|
|
553
|
-
error: e
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
async function fetchPage(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {
|
|
558
|
-
return fetchPageInternal(client, objectType, objectSet, args);
|
|
559
|
-
}
|
|
560
|
-
function applyFetchArgs(args, body) {
|
|
561
|
-
if (args?.$nextPageToken) {
|
|
562
|
-
body.pageToken = args.$nextPageToken;
|
|
563
|
-
}
|
|
564
|
-
if (args?.$pageSize != null) {
|
|
565
|
-
body.pageSize = args.$pageSize;
|
|
566
|
-
}
|
|
567
|
-
if (args?.$orderBy != null) {
|
|
568
|
-
body.orderBy = {
|
|
569
|
-
fields: Object.entries(args.$orderBy).map(([field, direction]) => ({
|
|
570
|
-
field,
|
|
571
|
-
direction
|
|
572
|
-
}))
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
return body;
|
|
576
|
-
}
|
|
577
|
-
async function fetchObjectPage(client, objectType, args, objectSet) {
|
|
578
|
-
const r = await OntologyObjectSet_exports.load(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, applyFetchArgs(args, {
|
|
579
|
-
objectSet,
|
|
580
|
-
// We have to do the following case because LoadObjectSetRequestV2 isn't readonly
|
|
581
|
-
select: args?.$select ?? [],
|
|
582
|
-
// FIXME?
|
|
583
|
-
excludeRid: !args?.$includeRid
|
|
584
|
-
}));
|
|
585
|
-
return Promise.resolve({
|
|
586
|
-
data: await client.objectFactory(client, r.data, void 0, void 0, await extractRdpDefinition(client, objectSet), args.$select),
|
|
587
|
-
nextPageToken: r.nextPageToken,
|
|
588
|
-
totalCount: r.totalCount
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
// src/Client.ts
|
|
593
|
-
var additionalContext = Symbol("additionalContext");
|
|
594
|
-
|
|
595
|
-
exports.ActionTypeV2_exports = ActionTypeV2_exports;
|
|
596
|
-
exports.Action_exports = Action_exports;
|
|
597
|
-
exports.Attachment_exports = Attachment_exports;
|
|
598
|
-
exports.MediaReferenceProperty_exports = MediaReferenceProperty_exports;
|
|
599
|
-
exports.ObjectTypeV2_exports = ObjectTypeV2_exports;
|
|
600
|
-
exports.OntologyInterface_exports = OntologyInterface_exports;
|
|
601
|
-
exports.OntologyObjectSet_exports = OntologyObjectSet_exports;
|
|
602
|
-
exports.QueryType_exports = QueryType_exports;
|
|
603
|
-
exports.Query_exports = Query_exports;
|
|
604
|
-
exports.TimeSeriesPropertyV2_exports = TimeSeriesPropertyV2_exports;
|
|
605
|
-
exports.TimeSeriesValueBankProperty_exports = TimeSeriesValueBankProperty_exports;
|
|
606
|
-
exports.addUserAgentAndRequestContextHeaders = addUserAgentAndRequestContextHeaders;
|
|
607
|
-
exports.additionalContext = additionalContext;
|
|
608
|
-
exports.augment = augment;
|
|
609
|
-
exports.fetchPage = fetchPage;
|
|
610
|
-
exports.fetchPageInternal = fetchPageInternal;
|
|
611
|
-
exports.fetchPageWithErrorsInternal = fetchPageWithErrorsInternal;
|
|
612
|
-
exports.resolveBaseObjectSetType = resolveBaseObjectSetType;
|
|
613
|
-
exports.symbolClientContext = symbolClientContext;
|
|
614
|
-
//# sourceMappingURL=chunk-UCW7RLKM.cjs.map
|
|
615
|
-
//# sourceMappingURL=chunk-UCW7RLKM.cjs.map
|