@osdk/client 2.6.0-beta.1 → 2.6.0-beta.3
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 +32 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/fetchMetadata.test.js +11 -0
- package/build/browser/fetchMetadata.test.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js +15 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.test.js +12 -0
- package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/browser/object/formatting/applyPropertyFormatter.js +58 -0
- package/build/browser/object/formatting/applyPropertyFormatter.js.map +1 -0
- package/build/browser/object/formatting/applyPropertyFormatter.test.js +726 -0
- package/build/browser/object/formatting/applyPropertyFormatter.test.js.map +1 -0
- package/build/browser/object/formatting/formatBoolean.js +23 -0
- package/build/browser/object/formatting/formatBoolean.js.map +1 -0
- package/build/browser/object/formatting/formatDateTime.js +158 -0
- package/build/browser/object/formatting/formatDateTime.js.map +1 -0
- package/build/browser/object/formatting/formatNumber.js +242 -0
- package/build/browser/object/formatting/formatNumber.js.map +1 -0
- package/build/browser/object/formatting/propertyFormattingUtils.js +39 -0
- package/build/browser/object/formatting/propertyFormattingUtils.js.map +1 -0
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-DCEFUXFS.cjs → chunk-6L3MX4LH.cjs} +35 -15
- package/build/cjs/chunk-6L3MX4LH.cjs.map +1 -0
- package/build/cjs/{chunk-BP7BR5FZ.cjs → chunk-BRYZR53E.cjs} +435 -54
- package/build/cjs/chunk-BRYZR53E.cjs.map +1 -0
- package/build/cjs/index.cjs +8 -8
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +31 -31
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/fetchMetadata.test.js +11 -0
- package/build/esm/fetchMetadata.test.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js +15 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
- package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.test.js +12 -0
- package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/esm/object/formatting/applyPropertyFormatter.js +58 -0
- package/build/esm/object/formatting/applyPropertyFormatter.js.map +1 -0
- package/build/esm/object/formatting/applyPropertyFormatter.test.js +726 -0
- package/build/esm/object/formatting/applyPropertyFormatter.test.js.map +1 -0
- package/build/esm/object/formatting/formatBoolean.js +23 -0
- package/build/esm/object/formatting/formatBoolean.js.map +1 -0
- package/build/esm/object/formatting/formatDateTime.js +158 -0
- package/build/esm/object/formatting/formatDateTime.js.map +1 -0
- package/build/esm/object/formatting/formatNumber.js +242 -0
- package/build/esm/object/formatting/formatNumber.js.map +1 -0
- package/build/esm/object/formatting/propertyFormattingUtils.js +39 -0
- package/build/esm/object/formatting/propertyFormattingUtils.js.map +1 -0
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/Client.d.ts +1 -1
- package/build/types/object/formatting/applyPropertyFormatter.d.ts +18 -0
- package/build/types/object/formatting/applyPropertyFormatter.d.ts.map +1 -0
- package/build/types/object/formatting/applyPropertyFormatter.test.d.ts +1 -0
- package/build/types/object/formatting/applyPropertyFormatter.test.d.ts.map +1 -0
- package/build/types/object/formatting/formatBoolean.d.ts +5 -0
- package/build/types/object/formatting/formatBoolean.d.ts.map +1 -0
- package/build/types/object/formatting/formatDateTime.d.ts +6 -0
- package/build/types/object/formatting/formatDateTime.d.ts.map +1 -0
- package/build/types/object/formatting/formatNumber.d.ts +15 -0
- package/build/types/object/formatting/formatNumber.d.ts.map +1 -0
- package/build/types/object/formatting/propertyFormattingUtils.d.ts +10 -0
- package/build/types/object/formatting/propertyFormattingUtils.d.ts.map +1 -0
- package/package.json +8 -8
- package/build/cjs/chunk-BP7BR5FZ.cjs.map +0 -1
- package/build/cjs/chunk-DCEFUXFS.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propertyFormattingUtils.js","names":["resolvePropertyReference","ref","objectData","type","value","propertyApiName","String","undefined","getBrowserLocale","navigator","language"],"sources":["propertyFormattingUtils.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropertyTypeReferenceOrStringConstant } from \"@osdk/api\";\nimport type { SimpleOsdkProperties } from \"../SimpleOsdkProperties.js\";\n\n/**\n * Resolves a property reference or string constant to its actual value\n */\n\nexport function resolvePropertyReference(\n ref: PropertyTypeReferenceOrStringConstant,\n objectData: SimpleOsdkProperties,\n): string | undefined {\n if (ref.type === \"constant\") {\n return ref.value;\n } else if (ref.type === \"propertyType\") {\n const value = objectData[ref.propertyApiName];\n return value != null ? String(value) : undefined;\n }\n return undefined;\n}\n/**\n * Gets the browser's current locale\n */\nexport function getBrowserLocale(): string {\n if (typeof navigator !== \"undefined\" && navigator.language != null) {\n return navigator.language;\n }\n return \"en-US\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;;AAEA,OAAO,SAASA,wBAAwBA,CACtCC,GAA0C,EAC1CC,UAAgC,EACZ;EACpB,IAAID,GAAG,CAACE,IAAI,KAAK,UAAU,EAAE;IAC3B,OAAOF,GAAG,CAACG,KAAK;EAClB,CAAC,MAAM,IAAIH,GAAG,CAACE,IAAI,KAAK,cAAc,EAAE;IACtC,MAAMC,KAAK,GAAGF,UAAU,CAACD,GAAG,CAACI,eAAe,CAAC;IAC7C,OAAOD,KAAK,IAAI,IAAI,GAAGE,MAAM,CAACF,KAAK,CAAC,GAAGG,SAAS;EAClD;EACA,OAAOA,SAAS;AAClB;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAA,EAAW;EACzC,IAAI,OAAOC,SAAS,KAAK,WAAW,IAAIA,SAAS,CAACC,QAAQ,IAAI,IAAI,EAAE;IAClE,OAAOD,SAAS,CAACC,QAAQ;EAC3B;EACA,OAAO,OAAO;AAChB","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.6.0-beta.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.6.0-beta.3"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.3"}`;
|
|
19
19
|
//# sourceMappingURL=UserAgent.js.map
|
|
@@ -12,7 +12,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
12
12
|
var invariant5__default = /*#__PURE__*/_interopDefault(invariant5);
|
|
13
13
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
14
14
|
|
|
15
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
15
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
16
16
|
var Action_exports = {};
|
|
17
17
|
chunkQ7SFCCGT_cjs.__export(Action_exports, {
|
|
18
18
|
apply: () => apply,
|
|
@@ -68,7 +68,7 @@ async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, h
|
|
|
68
68
|
if (!response.ok) {
|
|
69
69
|
try {
|
|
70
70
|
const convertedError = await response.json();
|
|
71
|
-
return new shared_net_errors.PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, response.status, convertedError.errorInstanceId, convertedError.parameters);
|
|
71
|
+
return new shared_net_errors.PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);
|
|
72
72
|
} catch (e) {
|
|
73
73
|
if (e instanceof Error) {
|
|
74
74
|
return new shared_net_errors.UnknownError(e.message, "UNKNOWN");
|
|
@@ -89,7 +89,7 @@ function parseUrl(baseUrl, endpointPath) {
|
|
|
89
89
|
return new URL(`api${endpointPath}`, baseUrl);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
92
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
93
93
|
var _apply = [1, "/v2/ontologies/{0}/actions/{1}/apply", 3];
|
|
94
94
|
function apply($ctx, ...args) {
|
|
95
95
|
return foundryPlatformFetch($ctx, _apply, ...args);
|
|
@@ -103,7 +103,7 @@ function applyBatch($ctx, ...args) {
|
|
|
103
103
|
return foundryPlatformFetch($ctx, _applyBatch, ...args);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
106
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
107
107
|
var ActionTypeV2_exports = {};
|
|
108
108
|
chunkQ7SFCCGT_cjs.__export(ActionTypeV2_exports, {
|
|
109
109
|
get: () => get,
|
|
@@ -123,7 +123,7 @@ function getByRid($ctx, ...args) {
|
|
|
123
123
|
return foundryPlatformFetch($ctx, _getByRid, ...args);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
126
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
127
127
|
var Attachment_exports = {};
|
|
128
128
|
chunkQ7SFCCGT_cjs.__export(Attachment_exports, {
|
|
129
129
|
get: () => get2,
|
|
@@ -148,7 +148,7 @@ function get2($ctx, ...args) {
|
|
|
148
148
|
return foundryPlatformFetch($ctx, _get2, ...args);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
151
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
152
152
|
var MediaReferenceProperty_exports = {};
|
|
153
153
|
chunkQ7SFCCGT_cjs.__export(MediaReferenceProperty_exports, {
|
|
154
154
|
getMediaContent: () => getMediaContent,
|
|
@@ -173,7 +173,7 @@ function uploadMedia($ctx, ...args) {
|
|
|
173
173
|
return foundryPlatformFetch($ctx, _uploadMedia, ...args);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
176
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
177
177
|
var ObjectTypeV2_exports = {};
|
|
178
178
|
chunkQ7SFCCGT_cjs.__export(ObjectTypeV2_exports, {
|
|
179
179
|
get: () => get3,
|
|
@@ -203,13 +203,14 @@ function getOutgoingLinkType($ctx, ...args) {
|
|
|
203
203
|
return foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
206
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
207
207
|
var OntologyInterface_exports = {};
|
|
208
208
|
chunkQ7SFCCGT_cjs.__export(OntologyInterface_exports, {
|
|
209
209
|
aggregate: () => aggregate,
|
|
210
210
|
get: () => get4,
|
|
211
211
|
getOutgoingInterfaceLinkType: () => getOutgoingInterfaceLinkType,
|
|
212
212
|
list: () => list3,
|
|
213
|
+
listInterfaceLinkedObjects: () => listInterfaceLinkedObjects,
|
|
213
214
|
listObjectsForInterface: () => listObjectsForInterface,
|
|
214
215
|
listOutgoingInterfaceLinkTypes: () => listOutgoingInterfaceLinkTypes,
|
|
215
216
|
search: () => search
|
|
@@ -242,8 +243,12 @@ var _getOutgoingInterfaceLinkType = [0, "/v2/ontologies/{0}/interfaceTypes/{1}/o
|
|
|
242
243
|
function getOutgoingInterfaceLinkType($ctx, ...args) {
|
|
243
244
|
return foundryPlatformFetch($ctx, _getOutgoingInterfaceLinkType, ...args);
|
|
244
245
|
}
|
|
246
|
+
var _listInterfaceLinkedObjects = [0, "/v2/ontologies/{0}/interfaces/{1}/{2}/{3}/links/{4}", 2];
|
|
247
|
+
function listInterfaceLinkedObjects($ctx, ...args) {
|
|
248
|
+
return foundryPlatformFetch($ctx, _listInterfaceLinkedObjects, ...args);
|
|
249
|
+
}
|
|
245
250
|
|
|
246
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
251
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
247
252
|
var OntologyObjectSet_exports = {};
|
|
248
253
|
chunkQ7SFCCGT_cjs.__export(OntologyObjectSet_exports, {
|
|
249
254
|
aggregate: () => aggregate2,
|
|
@@ -278,7 +283,7 @@ function aggregate2($ctx, ...args) {
|
|
|
278
283
|
return foundryPlatformFetch($ctx, _aggregate2, ...args);
|
|
279
284
|
}
|
|
280
285
|
|
|
281
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
286
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
282
287
|
var Query_exports = {};
|
|
283
288
|
chunkQ7SFCCGT_cjs.__export(Query_exports, {
|
|
284
289
|
execute: () => execute
|
|
@@ -288,7 +293,7 @@ function execute($ctx, ...args) {
|
|
|
288
293
|
return foundryPlatformFetch($ctx, _execute, ...args);
|
|
289
294
|
}
|
|
290
295
|
|
|
291
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
296
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
292
297
|
var QueryType_exports = {};
|
|
293
298
|
chunkQ7SFCCGT_cjs.__export(QueryType_exports, {
|
|
294
299
|
get: () => get6,
|
|
@@ -303,7 +308,7 @@ function get6($ctx, ...args) {
|
|
|
303
308
|
return foundryPlatformFetch($ctx, _get6, ...args);
|
|
304
309
|
}
|
|
305
310
|
|
|
306
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
311
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
307
312
|
var TimeSeriesPropertyV2_exports = {};
|
|
308
313
|
chunkQ7SFCCGT_cjs.__export(TimeSeriesPropertyV2_exports, {
|
|
309
314
|
getFirstPoint: () => getFirstPoint,
|
|
@@ -323,7 +328,7 @@ function streamPoints($ctx, ...args) {
|
|
|
323
328
|
return foundryPlatformFetch($ctx, _streamPoints, ...args);
|
|
324
329
|
}
|
|
325
330
|
|
|
326
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
331
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
327
332
|
var TimeSeriesValueBankProperty_exports = {};
|
|
328
333
|
chunkQ7SFCCGT_cjs.__export(TimeSeriesValueBankProperty_exports, {
|
|
329
334
|
getLatestValue: () => getLatestValue,
|
|
@@ -501,6 +506,21 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
|
|
|
501
506
|
fuzzy: typeof filter[firstKey] === "string" ? false : filter[firstKey]["fuzzySearch"] ?? false
|
|
502
507
|
};
|
|
503
508
|
}
|
|
509
|
+
if (firstKey === "$contains" && filter[firstKey] instanceof Object) {
|
|
510
|
+
const structFilter = Object.entries(filter[firstKey]);
|
|
511
|
+
!(structFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Cannot filter on more than one struct field in the same clause, need to use an and clause") : invariant5__default.default(false) : void 0;
|
|
512
|
+
const structFieldApiName = structFilter[0][0];
|
|
513
|
+
!(structFilter[0][1] != null && Object.keys(structFilter[0][1]).length === 1 && "$eq" in structFilter[0][1]) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Cannot filter on a struct field in an array with anything other than a single $eq") : invariant5__default.default(false) : void 0;
|
|
514
|
+
return {
|
|
515
|
+
type: "contains",
|
|
516
|
+
propertyIdentifier: {
|
|
517
|
+
type: "structField",
|
|
518
|
+
propertyApiName: fieldName,
|
|
519
|
+
structFieldApiName
|
|
520
|
+
},
|
|
521
|
+
value: structFilter[0][1]["$eq"]
|
|
522
|
+
};
|
|
523
|
+
}
|
|
504
524
|
return {
|
|
505
525
|
type: firstKey.substring(1),
|
|
506
526
|
...propertyIdentifier != null && {
|
|
@@ -2068,5 +2088,5 @@ exports.hydrateAttachmentFromRidInternal = hydrateAttachmentFromRidInternal;
|
|
|
2068
2088
|
exports.isObjectSet = isObjectSet;
|
|
2069
2089
|
exports.isWireObjectSet = isWireObjectSet;
|
|
2070
2090
|
exports.symbolClientContext = symbolClientContext;
|
|
2071
|
-
//# sourceMappingURL=chunk-
|
|
2072
|
-
//# sourceMappingURL=chunk-
|
|
2091
|
+
//# sourceMappingURL=chunk-6L3MX4LH.cjs.map
|
|
2092
|
+
//# sourceMappingURL=chunk-6L3MX4LH.cjs.map
|