@osdk/client 2.4.0-beta.15 → 2.4.0-beta.17
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 +24 -0
- package/build/browser/index.js +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/browser/public-utils/hydrateObjectSetFromObjectRids.js +4 -1
- package/build/browser/public-utils/hydrateObjectSetFromObjectRids.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-6HUH5WJA.cjs → chunk-4OVZLQDS.cjs} +13 -12
- package/build/cjs/chunk-4OVZLQDS.cjs.map +1 -0
- package/build/cjs/index.cjs +9 -5
- package/build/cjs/index.d.cts +12 -2
- package/build/cjs/public/internal.cjs +4 -1
- package/build/cjs/public/internal.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.cjs +6 -6
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/public-utils/hydrateObjectSetFromObjectRids.js +4 -1
- package/build/esm/public-utils/hydrateObjectSetFromObjectRids.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/build/cjs/chunk-6HUH5WJA.cjs.map +0 -1
package/build/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4OVZLQDS_cjs = require('./chunk-4OVZLQDS.cjs');
|
|
4
4
|
require('./chunk-L3OU54Q5.cjs');
|
|
5
5
|
require('./chunk-Q7SFCCGT.cjs');
|
|
6
6
|
var api = require('@osdk/api');
|
|
@@ -13,7 +13,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
13
13
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
14
14
|
|
|
15
15
|
function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
16
|
-
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider,
|
|
16
|
+
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunk4OVZLQDS_cjs.USER_AGENT, fetchFn);
|
|
17
17
|
}
|
|
18
18
|
var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
19
19
|
var extractDate = (dateTime) => {
|
|
@@ -37,15 +37,19 @@ var extractDateFromIsoString = (dateTime) => {
|
|
|
37
37
|
|
|
38
38
|
Object.defineProperty(exports, "ActionValidationError", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunk4OVZLQDS_cjs.ActionValidationError; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "createAttachmentUpload", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk4OVZLQDS_cjs.createAttachmentUpload; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "createClient", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk4OVZLQDS_cjs.createClient; }
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () { return chunk4OVZLQDS_cjs.createObjectSpecifierFromPrimaryKey; }
|
|
49
53
|
});
|
|
50
54
|
Object.defineProperty(exports, "NULL_VALUE", {
|
|
51
55
|
enumerable: true,
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AttachmentUpload } from '@osdk/api';
|
|
1
|
+
import { AttachmentUpload, ObjectTypeDefinition, PrimaryKeyType, ObjectSpecifier } from '@osdk/api';
|
|
2
2
|
export { ActionDefinition, ActionEditResponse, ActionMetadata, ActionParam, ActionReturnTypeForOptions, ActionValidationResponse, ApplyActionOptions, ApplyBatchActionOptions, Attachment, CompileTimeMetadata, InterfaceDefinition, InterfaceMetadata, Logger, NULL_VALUE, ObjectMetadata, ObjectSet, ObjectSpecifier, ObjectTypeDefinition, Osdk, OsdkObject, OsdkObjectCreatePropertyType, OsdkObjectPropertyType, PageResult, PropertyDef, PropertyKeys, PropertyValueWireToClient, QueryDefinition, QueryParam, QueryResult, Range, Result, SingleLinkAccessor, ThreeDimensionalAggregation, TwoDimensionalAggregation, VersionBound, WhereClause, isOk } from '@osdk/api';
|
|
3
3
|
export { PalantirApiError } from '@osdk/shared.net.errors';
|
|
4
4
|
import { ValidateActionResponseV2 } from '@osdk/foundry.ontologies';
|
|
@@ -62,4 +62,14 @@ declare const extractDateInUTC: (date: Date) => string;
|
|
|
62
62
|
*/
|
|
63
63
|
declare const extractDateInLocalTime: (date: Date) => string;
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Creates an Object Specifier. An ObjectSpecifier is a string that uniquely identifies an object in the system,
|
|
67
|
+
* even when loading an interface object where primary key uniqueness is not guaranteed.
|
|
68
|
+
*
|
|
69
|
+
* @param objectDef - An Object Type Definition
|
|
70
|
+
* @param primaryKey - The value you want to use as the primary key
|
|
71
|
+
* @returns An Object Specifier
|
|
72
|
+
*/
|
|
73
|
+
declare function createObjectSpecifierFromPrimaryKey<Q extends ObjectTypeDefinition>(objectDef: Q, primaryKey: PrimaryKeyType<Q>): ObjectSpecifier<Q>;
|
|
74
|
+
|
|
75
|
+
export { ActionValidationError, type PlatformClient, type ResultOrError, createAttachmentUpload, createObjectSpecifierFromPrimaryKey, createPlatformClient, extractDate, extractDateInLocalTime, extractDateInUTC };
|
|
@@ -15,7 +15,10 @@ async function createAndFetchTempObjectSetRid(client, objectSet) {
|
|
|
15
15
|
function hydrateObjectSetFromObjectRids(client, definition, rids) {
|
|
16
16
|
return chunkL3OU54Q5_cjs.createObjectSet(definition, client[chunkL3OU54Q5_cjs.additionalContext], {
|
|
17
17
|
type: "intersect",
|
|
18
|
-
objectSets: [{
|
|
18
|
+
objectSets: [definition.type === "interface" ? {
|
|
19
|
+
type: "interfaceBase",
|
|
20
|
+
interfaceType: definition.apiName
|
|
21
|
+
} : {
|
|
19
22
|
type: "base",
|
|
20
23
|
objectType: definition.apiName
|
|
21
24
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/public-utils/createAndFetchTempObjectSetRid.ts","../../../src/public-utils/hydrateObjectSetFromObjectRids.ts","../../../src/public-utils/hydrateObjectSetFromRid.ts","../../../src/logger/BrowserLogger.ts"],"names":["OntologyObjectSet_exports","additionalContext","getWireObjectSet","createObjectSet","BaseLogger"],"mappings":";;;;;;AA2BA,eAAsB,8BAAA,CAA+B,QAAQ,SAAW,EAAA;AACtE,EAAM,MAAA,QAAA,GAAW,MAAMA,2CAAmB,CAAA,eAAA,CAAgB,QAAQ,MAAM,MAAA,CAAOC,mCAAiB,CAAA,CAAE,WAAa,EAAA;AAAA,IAC7G,SAAA,EAAWC,mCAAiB,SAAS;AAAA,GACtC,CAAA;AACD,EAAA,OAAO,QAAS,CAAA,YAAA;AAClB;;;ACNO,SAAS,8BAAA,CAA+B,MAAQ,EAAA,UAAA,EAAY,IAAM,EAAA;AACvE,EAAA,OAAOC,iCAAgB,CAAA,UAAA,EAAY,MAAO,CAAAF,mCAAiB,CAAG,EAAA;AAAA,IAC5D,IAAM,EAAA,WAAA;AAAA,IACN,
|
|
1
|
+
{"version":3,"sources":["../../../src/public-utils/createAndFetchTempObjectSetRid.ts","../../../src/public-utils/hydrateObjectSetFromObjectRids.ts","../../../src/public-utils/hydrateObjectSetFromRid.ts","../../../src/logger/BrowserLogger.ts"],"names":["OntologyObjectSet_exports","additionalContext","getWireObjectSet","createObjectSet","BaseLogger"],"mappings":";;;;;;AA2BA,eAAsB,8BAAA,CAA+B,QAAQ,SAAW,EAAA;AACtE,EAAM,MAAA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AO,MAAA,CAAA,IAAA,CAAK,mCAAmC,EAAE,CAAA;AAAA;AAEnD,IAAA,IAAI,OAAO,QAAA,KAAa,QAAY,IAAA,YAAA,IAAgB,QAAU,EAAA;AAC5D,MAAA,IAAA,CAAK,IAAK,CAAA,CAAA,GAAA,EAAM,QAAS,CAAA,UAAU,CAAM,IAAA,CAAA,CAAA;AACzC,MAAO,MAAA,CAAA,IAAA,CAAK,oCAAoC,EAAE,CAAA;AAAA;AAEpD,IAAA,OAAO,IAAI,IAAS,KAAA;AAElB,MAAA,OAAA,CAAQ,IAAS,KAAA,OAAA,GAAU,OAAU,GAAA,IAAI,CAAE,CAAA,IAAA,CAAK,IAAK,CAAA,GAAG,CAAG,EAAA,GAAG,MAAQ,EAAA,GAAG,IAAI,CAAA;AAAA,KAC/E;AAAA;AAEJ","file":"internal.cjs","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 { OntologyObjectSets } from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\nimport { getWireObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Fetches a temporary object set RID from the Foundry stack for the given object set.\n *\n * @param client - An OSDK client.\n * @param objectSet - The object set to fetch a RID for.\n * @returns A promise that resolves to the RID of the temporary object set.\n */\nexport async function createAndFetchTempObjectSetRid(client, objectSet) {\n const response = await OntologyObjectSets.createTemporary(client, await client[additionalContext].ontologyRid, {\n objectSet: getWireObjectSet(objectSet)\n });\n return response.objectSetRid;\n}","/*\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 { additionalContext } from \"../Client.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Creates an OSDK object set from object RIDs.\n * @param client - An OSDK client.\n * @param definition - An OSDK object or interface definition.\n * @param rids - An array of object RIDs.\n * @returns An OSDK object set.\n */\nexport function hydrateObjectSetFromObjectRids(client, definition, rids) {\n return createObjectSet(definition, client[additionalContext], {\n type: \"intersect\",\n objectSets: [definition.type === \"interface\" ? {\n type: \"interfaceBase\",\n interfaceType: definition.apiName\n } : {\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"static\",\n objects: asMutableArray(rids)\n }]\n });\n}\nfunction asMutableArray(array) {\n return array;\n}","/*\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 { additionalContext } from \"../Client.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Creates an OSDK object set from an object set RID.\n * @param client - An OSDK client.\n * @param definition - An OSDK object or interface definition.\n * @param rid - The RID of an object set.\n * @returns An OSDK object set.\n */\nexport function hydrateObjectSetFromRid(client, definition, rid) {\n return createObjectSet(definition, client[additionalContext], {\n type: \"intersect\",\n objectSets: [definition.type === \"interface\" ? {\n type: \"interfaceBase\",\n interfaceType: definition.apiName\n } : {\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"reference\",\n reference: rid\n }]\n });\n}","/*\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 { BaseLogger } from \"./BaseLogger.js\";\nfunction createStyle({\n color\n}) {\n return `color: ${color}; border: 1px solid ${color}; padding: 2px; border-radius: 3px;`;\n}\nconst levelStyles = {\n debug: createStyle({\n color: \"LightBlue\"\n }),\n error: createStyle({\n color: \"red\"\n }),\n fatal: createStyle({\n color: \"red\"\n }),\n info: createStyle({\n color: \"green\"\n }),\n trace: createStyle({\n color: \"gray\"\n }),\n warn: createStyle({\n color: \"orange\"\n })\n};\nexport class BrowserLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, BrowserLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [`%c${name}%c`];\n const styles = [levelStyles[name], \"\"];\n if (this.options?.msgPrefix) {\n msgs.push(`%c${this.options.msgPrefix}%c`);\n styles.push(\"font-style: italic; color: gray\", \"\");\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`%c.${bindings.methodName}()%c`);\n styles.push(\"font-style: italic;color: orchid\", \"\");\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...styles, ...args);\n };\n }\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4OVZLQDS_cjs = require('../chunk-4OVZLQDS.cjs');
|
|
4
4
|
var chunkL3OU54Q5_cjs = require('../chunk-L3OU54Q5.cjs');
|
|
5
5
|
require('../chunk-Q7SFCCGT.cjs');
|
|
6
6
|
var shared_net_fetch = require('@osdk/shared.net.fetch');
|
|
@@ -1176,7 +1176,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
#extractRelevantObjectsForTypeInterface(changes) {
|
|
1178
1178
|
const matchesApiName = ([, object]) => {
|
|
1179
|
-
return this.#apiName in object[
|
|
1179
|
+
return this.#apiName in object[chunk4OVZLQDS_cjs.ObjectDefRef].interfaceMap;
|
|
1180
1180
|
};
|
|
1181
1181
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.#apiName));
|
|
1182
1182
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.#apiName));
|
|
@@ -1352,7 +1352,7 @@ function createOrderBySortFns(orderBy) {
|
|
|
1352
1352
|
async function reloadDataAsFullObjects(client, data) {
|
|
1353
1353
|
const groups = groupBy__default.default(data, (x) => x.$objectType);
|
|
1354
1354
|
const objectTypeToPrimaryKeyToObject = Object.fromEntries(await Promise.all(Object.entries(groups).map(async ([apiName, objects]) => {
|
|
1355
|
-
const objectDef = objects[0][
|
|
1355
|
+
const objectDef = objects[0][chunk4OVZLQDS_cjs.UnderlyingOsdkObject][chunk4OVZLQDS_cjs.ObjectDefRef];
|
|
1356
1356
|
const where = {
|
|
1357
1357
|
[objectDef.primaryKeyApiName]: {
|
|
1358
1358
|
$in: objects.map((x) => x.$primaryKey)
|
|
@@ -1861,10 +1861,10 @@ var Store = class {
|
|
|
1861
1861
|
|
|
1862
1862
|
// src/observable/ObservableClient.ts
|
|
1863
1863
|
function createObservableClient(client) {
|
|
1864
|
-
const tweakedClient =
|
|
1864
|
+
const tweakedClient = chunk4OVZLQDS_cjs.createClientFromContext({
|
|
1865
1865
|
...client[chunkL3OU54Q5_cjs.additionalContext],
|
|
1866
1866
|
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkL3OU54Q5_cjs.additionalContext].fetch, (headers) => {
|
|
1867
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
1867
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunk4OVZLQDS_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
|
|
1868
1868
|
return headers;
|
|
1869
1869
|
})
|
|
1870
1870
|
});
|
|
@@ -1907,7 +1907,7 @@ function getOsdkConfig(ontologyRid) {
|
|
|
1907
1907
|
|
|
1908
1908
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
1909
1909
|
enumerable: true,
|
|
1910
|
-
get: function () { return
|
|
1910
|
+
get: function () { return chunk4OVZLQDS_cjs.createClientWithTransaction; }
|
|
1911
1911
|
});
|
|
1912
1912
|
Object.defineProperty(exports, "augment", {
|
|
1913
1913
|
enumerable: true,
|
package/build/esm/index.js
CHANGED
|
@@ -21,4 +21,5 @@ export { createClient } from "./createClient.js";
|
|
|
21
21
|
export { createPlatformClient } from "./createPlatformClient.js";
|
|
22
22
|
export { createAttachmentUpload } from "./object/AttachmentUpload.js";
|
|
23
23
|
export { extractDate, extractDateInLocalTime, extractDateInUTC } from "./util/datetimeConverters.js";
|
|
24
|
+
export { createObjectSpecifierFromPrimaryKey } from "./util/objectSpecifierUtils.js";
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["isOk","NULL_VALUE","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 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\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n Attachment,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n Logger,\n ObjectMetadata,\n ObjectSet,\n ObjectSpecifier,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Range,\n Result,\n SingleLinkAccessor,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { isOk, NULL_VALUE } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\n\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport type { Client } from \"./Client.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport type { PlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport type { ResultOrError } from \"./ResultOrError.js\";\n\nexport {\n extractDate,\n extractDateInLocalTime,\n extractDateInUTC,\n} from \"./util/datetimeConverters.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuCA,SAASA,IAAI,EAAEC,UAAU,QAAQ,WAAW;AAC5C,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAE1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,SAASC,sBAAsB,QAAQ,8BAA8B;AAGrE,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,8BAA8B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["isOk","NULL_VALUE","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC","createObjectSpecifierFromPrimaryKey"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 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\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n Attachment,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n Logger,\n ObjectMetadata,\n ObjectSet,\n ObjectSpecifier,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Range,\n Result,\n SingleLinkAccessor,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { isOk, NULL_VALUE } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\n\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport type { Client } from \"./Client.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport type { PlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport type { ResultOrError } from \"./ResultOrError.js\";\n\nexport {\n extractDate,\n extractDateInLocalTime,\n extractDateInUTC,\n} from \"./util/datetimeConverters.js\";\n\nexport { createObjectSpecifierFromPrimaryKey } from \"./util/objectSpecifierUtils.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuCA,SAASA,IAAI,EAAEC,UAAU,QAAQ,WAAW;AAC5C,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAE1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,SAASC,sBAAsB,QAAQ,8BAA8B;AAGrE,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,8BAA8B;AAErC,SAASC,mCAAmC,QAAQ,gCAAgC","ignoreList":[]}
|
|
@@ -27,7 +27,10 @@ import { createObjectSet } from "../objectSet/createObjectSet.js";
|
|
|
27
27
|
export function hydrateObjectSetFromObjectRids(client, definition, rids) {
|
|
28
28
|
return createObjectSet(definition, client[additionalContext], {
|
|
29
29
|
type: "intersect",
|
|
30
|
-
objectSets: [{
|
|
30
|
+
objectSets: [definition.type === "interface" ? {
|
|
31
|
+
type: "interfaceBase",
|
|
32
|
+
interfaceType: definition.apiName
|
|
33
|
+
} : {
|
|
31
34
|
type: "base",
|
|
32
35
|
objectType: definition.apiName
|
|
33
36
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydrateObjectSetFromObjectRids.js","names":["additionalContext","createObjectSet","hydrateObjectSetFromObjectRids","client","definition","rids","type","objectSets","
|
|
1
|
+
{"version":3,"file":"hydrateObjectSetFromObjectRids.js","names":["additionalContext","createObjectSet","hydrateObjectSetFromObjectRids","client","definition","rids","type","objectSets","interfaceType","apiName","objectType","objects","asMutableArray","array"],"sources":["hydrateObjectSetFromObjectRids.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 { ObjectOrInterfaceDefinition, ObjectSet } from \"@osdk/api\";\nimport type { Client } from \"../Client.js\";\nimport { additionalContext } from \"../Client.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Creates an OSDK object set from object RIDs.\n * @param client - An OSDK client.\n * @param definition - An OSDK object or interface definition.\n * @param rids - An array of object RIDs.\n * @returns An OSDK object set.\n */\nexport function hydrateObjectSetFromObjectRids<\n T extends ObjectOrInterfaceDefinition,\n>(client: Client, definition: T, rids: readonly string[]): ObjectSet<T> {\n return createObjectSet(definition, client[additionalContext], {\n type: \"intersect\",\n objectSets: [\n definition.type === \"interface\"\n ? { type: \"interfaceBase\", interfaceType: definition.apiName }\n : {\n type: \"base\",\n objectType: definition.apiName,\n },\n {\n type: \"static\",\n objects: asMutableArray(rids),\n },\n ],\n });\n}\n\nfunction asMutableArray<T>(array: readonly T[]): T[] {\n return array as T[];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,iBAAiB,QAAQ,cAAc;AAChD,SAASC,eAAe,QAAQ,iCAAiC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,8BAA8BA,CAE5CC,MAAc,EAAEC,UAAa,EAAEC,IAAuB,EAAgB;EACtE,OAAOJ,eAAe,CAACG,UAAU,EAAED,MAAM,CAACH,iBAAiB,CAAC,EAAE;IAC5DM,IAAI,EAAE,WAAW;IACjBC,UAAU,EAAE,CACVH,UAAU,CAACE,IAAI,KAAK,WAAW,GAC3B;MAAEA,IAAI,EAAE,eAAe;MAAEE,aAAa,EAAEJ,UAAU,CAACK;IAAQ,CAAC,GAC5D;MACAH,IAAI,EAAE,MAAM;MACZI,UAAU,EAAEN,UAAU,CAACK;IACzB,CAAC,EACH;MACEH,IAAI,EAAE,QAAQ;MACdK,OAAO,EAAEC,cAAc,CAACP,IAAI;IAC9B,CAAC;EAEL,CAAC,CAAC;AACJ;AAEA,SAASO,cAAcA,CAAIC,KAAmB,EAAO;EACnD,OAAOA,KAAK;AACd","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.4.0-beta.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.4.0-beta.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.4.0-beta.17"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.4.0-beta.17"}`;
|
|
19
19
|
//# sourceMappingURL=UserAgent.js.map
|
package/build/types/index.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ export type { PlatformClient } from "./createPlatformClient.js";
|
|
|
9
9
|
export { createAttachmentUpload } from "./object/AttachmentUpload.js";
|
|
10
10
|
export type { ResultOrError } from "./ResultOrError.js";
|
|
11
11
|
export { extractDate, extractDateInLocalTime, extractDateInUTC } from "./util/datetimeConverters.js";
|
|
12
|
+
export { createObjectSpecifierFromPrimaryKey } from "./util/objectSpecifierUtils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,kBACA,oBACA,gBACA,aACA,4BACA,0BACA,oBACA,yBACA,YACA,qBACA,qBACA,mBACA,QACA,gBACA,WACA,iBACA,sBACA,MACA,YACA,8BACA,wBACA,YACA,aACA,cACA,2BACA,iBACA,YACA,aACA,OACA,QACA,oBACA,6BACA,2BACA,cACA,mBACK;AACP,SAAS,MAAM,kBAAkB;AACjC,SAAS,wBAAwB;AAEjC,SAAS,6BAA6B;AACtC,cAAc,cAAc;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AACrC,cAAc,sBAAsB;AACpC,SAAS,8BAA8B;AACvC,cAAc,qBAAqB;AAEnC,SACE,aACA,wBACA,wBACK","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
1
|
+
{"mappings":"AAgBA,cACE,kBACA,oBACA,gBACA,aACA,4BACA,0BACA,oBACA,yBACA,YACA,qBACA,qBACA,mBACA,QACA,gBACA,WACA,iBACA,sBACA,MACA,YACA,8BACA,wBACA,YACA,aACA,cACA,2BACA,iBACA,YACA,aACA,OACA,QACA,oBACA,6BACA,2BACA,cACA,mBACK;AACP,SAAS,MAAM,kBAAkB;AACjC,SAAS,wBAAwB;AAEjC,SAAS,6BAA6B;AACtC,cAAc,cAAc;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AACrC,cAAc,sBAAsB;AACpC,SAAS,8BAA8B;AACvC,cAAc,qBAAqB;AAEnC,SACE,aACA,wBACA,wBACK;AAEP,SAAS,2CAA2C","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/client",
|
|
3
|
-
"version": "2.4.0-beta.
|
|
3
|
+
"version": "2.4.0-beta.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
"tiny-invariant": "^1.3.1",
|
|
66
66
|
"type-fest": "^4.18.2",
|
|
67
67
|
"ws": "^8.18.0",
|
|
68
|
-
"@osdk/
|
|
69
|
-
"@osdk/
|
|
70
|
-
"@osdk/generator-converters": "2.4.0-beta.
|
|
71
|
-
"@osdk/shared.
|
|
68
|
+
"@osdk/api": "2.4.0-beta.17",
|
|
69
|
+
"@osdk/client.unstable": "2.4.0-beta.17",
|
|
70
|
+
"@osdk/generator-converters": "2.4.0-beta.17",
|
|
71
|
+
"@osdk/shared.client.impl": "~1.4.0-beta.1",
|
|
72
72
|
"@osdk/shared.net.fetch": "~1.4.0-beta.1",
|
|
73
|
-
"@osdk/shared.
|
|
73
|
+
"@osdk/shared.net.errors": "~2.4.0-beta.1"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@microsoft/api-documenter": "^7.26.5",
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
"ts-expect": "^1.3.0",
|
|
92
92
|
"typescript": "~5.5.4",
|
|
93
93
|
"zod": "^3.23.8",
|
|
94
|
-
"@osdk/client.test.ontology": "~2.4.0-beta.
|
|
94
|
+
"@osdk/client.test.ontology": "~2.4.0-beta.17",
|
|
95
95
|
"@osdk/monorepo.api-extractor": "~0.3.0-beta.1",
|
|
96
|
-
"@osdk/
|
|
97
|
-
"@osdk/
|
|
96
|
+
"@osdk/monorepo.tsconfig": "~0.3.0-beta.1",
|
|
97
|
+
"@osdk/shared.test": "~2.4.0-beta.17"
|
|
98
98
|
},
|
|
99
99
|
"publishConfig": {
|
|
100
100
|
"access": "public"
|