@osdk/client 2.35.0 → 2.36.0
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 +12 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/scenarios/ScenarioClient.js +5 -3
- package/build/browser/scenarios/ScenarioClient.js.map +1 -1
- package/build/browser/scenarios/createScenario.js +3 -5
- package/build/browser/scenarios/createScenario.js.map +1 -1
- package/build/browser/scenarios/withScenario.js +2 -1
- package/build/browser/scenarios/withScenario.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{applyStreamingQuery-IWZCZA6J.cjs → applyStreamingQuery-RK2N6TJ5.cjs} +9 -9
- package/build/cjs/{applyStreamingQuery-IWZCZA6J.cjs.map → applyStreamingQuery-RK2N6TJ5.cjs.map} +1 -1
- package/build/cjs/{chunk-A4LQCGPA.cjs → chunk-53ODHT6J.cjs} +47 -47
- package/build/cjs/{chunk-A4LQCGPA.cjs.map → chunk-53ODHT6J.cjs.map} +1 -1
- package/build/cjs/{chunk-CWBZEZQC.cjs → chunk-QUF62D2S.cjs} +76 -76
- package/build/cjs/{chunk-CWBZEZQC.cjs.map → chunk-QUF62D2S.cjs.map} +1 -1
- package/build/cjs/{chunk-LWT7AZZD.cjs → chunk-VD4QAB27.cjs} +13 -13
- package/build/cjs/{chunk-LWT7AZZD.cjs.map → chunk-VD4QAB27.cjs.map} +1 -1
- package/build/cjs/{chunk-ZLUXOM2B.cjs → chunk-ZSQBDK7L.cjs} +2 -2
- package/build/cjs/{chunk-ZLUXOM2B.cjs.map → chunk-ZSQBDK7L.cjs.map} +1 -1
- package/build/cjs/index.cjs +11 -11
- package/build/cjs/public/experimental.cjs +6 -6
- package/build/cjs/public/internal.cjs +7 -7
- package/build/cjs/public/observable.cjs +5 -5
- package/build/cjs/public/unstable-do-not-use.cjs +14 -17
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +5 -3
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/scenarios/ScenarioClient.js +5 -3
- package/build/esm/scenarios/ScenarioClient.js.map +1 -1
- package/build/esm/scenarios/createScenario.js +3 -5
- package/build/esm/scenarios/createScenario.js.map +1 -1
- package/build/esm/scenarios/withScenario.js +2 -1
- package/build/esm/scenarios/withScenario.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/Client.d.ts +1 -1
- package/build/types/scenarios/createScenario.d.ts +3 -2
- package/build/types/scenarios/createScenario.d.ts.map +1 -1
- package/build/types/scenarios/withScenario.d.ts +2 -1
- package/build/types/scenarios/withScenario.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/ActionValidationError.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyScenario.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js","../../src/scenarios/ScenarioClient.ts","../../src/util/isOntologyObjectV2.ts","../../src/util/toDataValue.ts","../../src/actions/applyAction.ts","../../src/util/timeseriesUtils.ts","../../src/createGeotimeSeriesProperty.ts","../../src/createMediaReferenceProperty.ts","../../src/createTimeseriesProperty.ts","../../src/object/formatting/formatBoolean.ts","../../src/object/formatting/propertyFormattingUtils.ts","../../src/object/formatting/formatDateTime.ts","../../src/object/formatting/formatNumber.ts","../../src/object/formatting/applyPropertyFormatter.ts","../../src/ontology/OntologyProvider.ts","../../src/object/convertWireToOsdkObjects/InternalSymbols.ts","../../src/object/convertWireToOsdkObjects/getDollarLink.ts","../../src/object/convertWireToOsdkObjects/createOsdkInterface.ts","../../src/object/convertWireToOsdkObjects/getDollarAs.ts","../../src/object/convertWireToOsdkObjects/createOsdkObject.ts","../../src/object/convertWireToOsdkObjects.ts","../../src/object/Cache.ts","../../src/util/deepFreeze.ts","../../src/ontology/loadActionMetadata.ts","../../src/ontology/loadFullObjectMetadata.ts","../../src/ontology/loadInterfaceMetadata.ts","../../src/ontology/loadQueryMetadata.ts","../../src/ontology/StandardOntologyProvider.ts","../../src/util/UserAgent.ts","../../src/createMinimalClient.ts","../../src/fetchMetadata.ts","../../src/internal/conversions/makeMediaTransformation.ts","../../src/createClient.ts"],"names":["foundryPlatformFetch","_get","get","__export","additionalContext","isAttachmentUpload","isAttachmentFile","value","upload","isMediaUpload","MediaSet_exports","isMedia","isMediaReference","isObjectSpecifiersObject","isWireObjectSet","isObjectSet","getWireObjectSet","isInterfaceActionParam","addUserAgentAndRequestContextHeaders","augmentRequestContext","invariant","TimeseriesDurationMapping","parseStreamedResponse","iterateReadableStream","getMediaContent","getMediaMetadata","validateMediaItemMetadata","fetchSingle","fetchSingleWithErrors","extractNamespace","createSimpleCache","createObjectSpecifierFromPrimaryKey","hydrateAttachmentFromRidInternal","client","createObjectSet","createSharedClientContext","applyQuery","ontologyRid","MinimalLogger","__EXPERIMENTAL__NOT_SUPPORTED_YET__executeStreamingFunction","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","fetchPage","fetchStaticRidPage","__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet","ObjectSetListenerWebsocket","__EXPERIMENTAL__NOT_SUPPORTED_YET__transformAndWait","symbolClientContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBO,IAAM,qBAAA,GAAN,cAAoC,KAAA,CAAM;AAAA,EAC/C,YAAY,UAAA,EAAY;AACtB,IAAA,KAAA,CAAM,uBAAuB,IAAA,CAAK,SAAA,CAAU,UAAA,EAAY,IAAA,EAAM,CAAC,CAAC,CAAA;AAChE,IAAA,IAAA,CAAK,UAAA,GAAa,UAAA;AAAA,EACpB;AACF;;;ACJA,IAAM,MAAA,GAAS,CAAC,CAAA,EAAG,sCAAA,EAAwC,CAAC,CAAA;AAkBrD,SAAS,KAAA,CAAM,SAAS,IAAA,EAAM;AACnC,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,MAAA,EAAQ,GAAG,IAAI,CAAA;AACpD;AAmBA,IAAM,WAAA,GAAc,CAAC,CAAA,EAAG,2CAAA,EAA6C,CAAC,CAAA;AAiB/D,SAAS,UAAA,CAAW,SAAS,IAAA,EAAM;AACxC,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,WAAA,EAAa,GAAG,IAAI,CAAA;AACzD;;;AC3CA,IAAM,IAAA,GAAO,CAAC,CAAA,EAAG,oCAAA,EAAsC,CAAC,CAAA;AASjD,SAAS,GAAA,CAAI,SAAS,IAAA,EAAM;AACjC,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,IAAA,EAAM,GAAG,IAAI,CAAA;AAClD;;;ACmBA,IAAM,gBAAA,GAAmB,CAAC,CAAA,EAAG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CAAK,MAAA,EAAW,SAAS,CAAA;AACrE,EAAA,MAAMC,oBAAAA,GAAsB,qBAAA;AAC5B,EAAA,MAAM,MAAA,GAAS,MAAA,CAAO,gBAAA,CAAiB,QAAA,EAAU;AAAA,IAC/C,CAACA,qCAAsB,GAAG;AAAA,MACxB,KAAA,EAAO;AAAA,KACT;AAAA,IACA,CAACA,oBAAmB,GAAG;AAAA,MACrB,KAAA,EAAO;AAAA,KACT;AAAA,IACA,CAAC7C,mCAAiB,GAAG;AAAA,MACnB,KAAA,EAAO;AAAA,KACT;AAAA,IACA,aAAA,EAAe;AAAA,MACb,KAAA,EAAO;AAAA;AACT,GACD,CAAA;AACD,EAAA,OAAO,MAAA;AACT;AAoCO,IAAM,eAAe,oBAAA,CAAqB,IAAA,CAAK,QAAW8B,iCAAA,EAAiB,MAAA,EAAW,QAAW,MAAS;AAC1G,IAAM,2BAAA,GAA8B,CAAC,cAAA,EAAgB,UAAA,EAAA,GAAe,IAAA,KAAS,oBAAA,CAAqBA,iCAAA,EAAiB,cAAA,EAAgB,UAAA,EAAY,MAAA,EAAW,GAAG,IAAI;AAGjK,IAAM,wBAAA,GAA2B,CAAC,WAAA,EAAA,GAAgB,IAAA,KAAS,oBAAA,CAAqBA,mCAAiB,MAAA,EAAW,MAAA,EAAW,WAAA,EAAa,GAAG,IAAI,CAAA;AAClJ,SAAS,cAAc,IAAA,EAAM;AAC3B,EAAA,MAAM,OAAA,GAAU;AAAA,IACd,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-A4LQCGPA.cjs","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 class ActionValidationError extends Error {\n constructor(validation) {\n super(\"Validation Error: \" + JSON.stringify(validation, null, 2));\n this.validation = validation;\n }\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _apply = [1, \"/v2/ontologies/{0}/actions/{1}/apply\", 7];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Note that a 200 HTTP status code only indicates that the request was received and processed by the server.\n * See the validation result in the response body to determine if the action was applied successfully.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/apply\n */\nexport function apply($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _apply, ...args);\n}\nconst _applyAsync = [1, \"/v2/ontologies/{0}/actions/{1}/applyAsync\", 7];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyAsync\n */\nexport function applyAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyAsync, ...args);\n}\nconst _applyBatch = [1, \"/v2/ontologies/{0}/actions/{1}/applyBatch\", 3];\n/**\n * Applies multiple actions (of the same Action Type) using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not\n * call Functions may receive a higher limit.\n *\n * Note that [notifications](https://www.palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyBatch\n */\nexport function applyBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyBatch, ...args);\n}\nconst _applyWithOverrides = [1, \"/v2/ontologies/{0}/actions/{1}/applyWithOverrides\", 3];\n/**\n * Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and\n * CurrentTime generated action parameters.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyWithOverrides\n */\nexport function applyWithOverrides($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyWithOverrides, ...args);\n}\nconst _applyBatchWithOverrides = [1, \"/v2/ontologies/{0}/actions/{1}/applyBatchWithOverrides\", 3];\n/**\n * Applies multiple actions (of the same Action Type) with per-item overrides\n * for UniqueIdentifier and CurrentTime generated action parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not\n * call Functions may receive a higher limit.\n *\n * Note that [notifications](https://www.palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyBatchWithOverrides\n */\nexport function applyBatchWithOverrides($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyBatchWithOverrides, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/actionTypes\", 2];\n/**\n * Lists the action types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/actionTypes/{1}\", 2];\n/**\n * Gets a specific action type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/{actionType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/ontologies/{0}/actionTypes/byRid/{1}\", 2];\n/**\n * Gets a specific action type with the given RID.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid}\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/ontologies/{0}/actionTypes/getByRidBatch\", 3];\n/**\n * Gets a list of action types by RID in bulk.\n *\n * Action types are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/objectTypes\", 2];\n/**\n * Lists the object types for the given Ontology.\n *\n * Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are\n * more results available, at least one result will be present in the\n * response.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectTypes/{1}\", 2];\n/**\n * Gets a specific object type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/ontologies/{0}/objectTypes/getByRidBatch\", 3];\n/**\n * Gets a list of object types by RID in bulk.\n *\n * Object types are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}\nconst _getFullMetadata = [0, \"/v2/ontologies/{0}/objectTypes/{1}/fullMetadata\", 2];\n/**\n * Gets the full metadata for a specific object type with the given API name.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata\n */\nexport function getFullMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFullMetadata, ...args);\n}\nconst _getEditsHistory = [1, \"/v2/ontologies/{0}/objectTypes/{1}/editsHistory\", 3];\n/**\n * Returns the history of edits (additions, modifications, deletions) for objects of a\n * specific object type. This endpoint provides visibility into all actions that have\n * modified objects of this type.\n *\n * The edits are returned in reverse chronological order (most recent first) by default.\n *\n * Note that filters are ignored for OSv1 object types.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/editsHistory\n */\nexport function getEditsHistory($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getEditsHistory, ...args);\n}\nconst _listOutgoingLinkTypes = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing links for an object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes\n */\nexport function listOutgoingLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingLinkTypes, ...args);\n}\nconst _getOutgoingLinkType = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes/{2}\", 2];\n/**\n * Get an outgoing link for an object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}\n */\nexport function getOutgoingLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);\n}\nconst _getOutgoingLinkTypesByObjectTypeRidBatch = [1, \"/v2/ontologies/{0}/outgoingLinkTypes/getByRidBatch\", 3];\n/**\n * Gets outgoing link types for a batch of object types, identified by their RIDs.\n *\n * For each requested object type, returns the list of outgoing link types visible to the\n * requesting token. Optionally, results can be filtered to only include specific link type RIDs.\n *\n * Object types that don't exist or that the requesting token lacks permissions for are\n * silently omitted from the response.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/outgoingLinkTypes/getByRidBatch\n */\nexport function getOutgoingLinkTypesByObjectTypeRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingLinkTypesByObjectTypeRidBatch, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/interfaceTypes\", 2];\n/**\n * Lists the interface types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}\", 2];\n/**\n * Gets a specific interface type with the given API name.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _listObjectsForInterface = [0, \"/v2/ontologies/{0}/interfaces/{1}\", 2];\n/**\n * Lists the objects for the given Ontology and interface type.\n *\n * Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or\n * repeated objects in the response pages.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Each page may be smaller or larger than the requested page size. However, it\n * is guaranteed that if there are more results available, at least one result will be present\n * in the response.\n *\n * Note that null value properties will not be returned.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}\n */\nexport function listObjectsForInterface($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listObjectsForInterface, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/interfaces/{1}/search\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object\n * sets.\n * :::\n * Search for objects in the specified ontology and interface type. Any properties specified in the \"where\" or\n * \"orderBy\" parameters must be shared property type API names defined on the interface. The following search\n * queries are supported:\n *\n * | Query type | Description | Supported Types |\n * |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------|\n * | lt | The provided property is less than the provided value. | number, string, date, timestamp |\n * | gt | The provided property is greater than the provided value. | number, string, date, timestamp |\n * | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp |\n * | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp |\n * | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp |\n * | isNull | The provided property is (or is not) null. | all |\n * | contains | The provided property contains the provided value. | array |\n * | not | The sub-query does not match. | N/A (applied on a query) |\n * | and | All the sub-queries match. | N/A (applied on queries) |\n * | or | At least one of the sub-queries match. | N/A (applied on queries) |\n * | startsWith | The provided property starts with the provided term. | string |\n * | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string |\n * | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string |\n * | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string |\n * | containsAllTerms | The provided property contains all the terms separated by whitespace. | string |\n *\n * Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'\"~`). Periods (`.`) on their own are ignored.\n * Partial terms are not matched by terms filters except where explicitly noted.\n *\n * Attempting to use an unsupported query will result in a validation error. Third-party applications using this\n * endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/interfaces/{1}/aggregate\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object\n * sets.\n * :::\n * Perform functions on object fields in the specified ontology and of the specified interface type. Any\n * properties specified in the query must be shared property type API names defined on the interface.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\n}\nconst _listOutgoingInterfaceLinkTypes = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing interface link types for an interface type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes\n */\nexport function listOutgoingInterfaceLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingInterfaceLinkTypes, ...args);\n}\nconst _getOutgoingInterfaceLinkType = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes/{2}\", 2];\n/**\n * Get an outgoing interface link type for an interface type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType}\n */\nexport function getOutgoingInterfaceLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingInterfaceLinkType, ...args);\n}\nconst _listInterfaceLinkedObjects = [0, \"/v2/ontologies/{0}/interfaces/{1}/{2}/{3}/links/{4}\", 2];\n/**\n * Lists the linked objects for a specific object and the given interface link type.\n *\n * Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or\n * repeated objects in the response pages.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Each page may be smaller or larger than the requested page size. However, it\n * is guaranteed that if there are more results available, at least one result will be present\n * in the response.\n *\n * Note that null value properties will not be returned.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType}\n */\nexport function listInterfaceLinkedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listInterfaceLinkedObjects, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _createScenario = [1, \"/v2/ontologies/{0}/scenarios/create\", 3];\n/**\n * Creates an ontology scenario.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/scenarios/create\n */\nexport function createScenario($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _createScenario, ...args);\n}\nconst _listScenarioEditedObjectTypes = [0, \"/v2/ontologies/{0}/scenarios/{1}/objectTypes/edited\", 2];\n/**\n * Returns the list of object type API names that have been modified within a given scenario.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/objectTypes/edited\n */\nexport function listScenarioEditedObjectTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedObjectTypes, ...args);\n}\nconst _listScenarioEditedLinkTypes = [0, \"/v2/ontologies/{0}/scenarios/{1}/objectTypes/{2}/outgoingLinkTypes/edited\", 2];\n/**\n * Returns the list of outgoing links that have been modified within a given scenario for an object type.\n *\n * Note that only many-to-many link type are returned by this endpoint. One-to-many link type edits are\n * surfaced as object edits on the object type that owns the foreign key property.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/objectTypes/{objectType}/outgoingLinkTypes/edited\n */\nexport function listScenarioEditedLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedLinkTypes, ...args);\n}\nconst _listScenarioEditedEntityTypes = [0, \"/v2/ontologies/{0}/scenarios/{1}/editedEntityTypes\", 2];\n/**\n * Returns the object types and link types that have been modified within a given scenario.\n *\n * The response contains the list of object type API names that have been modified, and the list of\n * many-to-many link types that have been modified, grouped by their source object type. One-to-many\n * link type edits are surfaced as object edits on the object type that owns the foreign key property.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/editedEntityTypes\n */\nexport function listScenarioEditedEntityTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedEntityTypes, ...args);\n}\nconst _listScenarioEditedObjects = [0, \"/v2/ontologies/{0}/scenarios/{1}/objects/{2}/edited\", 2];\n/**\n * Returns the list of objects that have been edited within a given scenario for a specific object type.\n * Only objects that the user has permission to view are returned.\n *\n * Each page may be smaller than the requested page size.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/objects/{objectType}/edited\n */\nexport function listScenarioEditedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedObjects, ...args);\n}\nconst _listScenarioEditedLinks = [0, \"/v2/ontologies/{0}/scenarios/{1}/objects/{2}/links/{3}/edited\", 2];\n/**\n * Returns the list of edited links within a given scenario for a specific object type and link type, grouped\n * by source object. Only works for many-to-many link types. Only links where the user has permission to view\n * both objects are returned.\n *\n * Each page may be smaller than the requested page size.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/objects/{objectType}/links/{linkType}/edited\n */\nexport function listScenarioEditedLinks($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedLinks, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/queryTypes\", 2];\n/**\n * Lists the query types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/queryTypes/{1}\", 2];\n/**\n * Gets a specific query type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getFirstPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint\", 2];\n/**\n * Get the first point of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint\n */\nexport function getFirstPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFirstPoint, ...args);\n}\nconst _getLastPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/lastPoint\", 2];\n/**\n * Get the last point of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint\n */\nexport function getLastPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLastPoint, ...args);\n}\nconst _streamPoints = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamPoints\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints\n */\nexport function streamPoints($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamPoints, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getLatestValue = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/latestValue\", 2];\n/**\n * Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue\n */\nexport function getLatestValue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLatestValue, ...args);\n}\nconst _streamValues = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamValues\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property (this includes geotime series references).\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues\n */\nexport function streamValues($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamValues, ...args);\n}","/*\n * Copyright 2026 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 { OntologyScenarios } from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\nimport { createClientWithScenario } from \"../createClient.js\";\n\n/**\n * The set of many-to-many link types modified within a scenario for one source object type. Returned as part of\n * {@link ScenarioEditedEntityTypes.linkTypes}.\n */\n\n/**\n * The object types and link types that have been modified within a scenario. Only many-to-many link type edits are\n * surfaced via `linkTypes`; one-to-many edits surface as object edits on the object type that owns the foreign key\n * property.\n */\n\n/**\n * A page of edited object identifiers within a scenario for a given object type. Returned by\n * {@link EXPERIMENTAL_ScenarioClient.getEditedEntities}. To load full property values, pass the primary keys back\n * through the scenario client, e.g.\n * `scenario(MyObject).where({ $primaryKey: { $in: keys } }).fetchPage()`.\n */\n\n/**\n * A page of directed link instances edited within a scenario for a given source object type and link api name.\n * Returned by {@link EXPERIMENTAL_ScenarioClient.getEditedLinks}. Source and target carry only `$primaryKey` + `$apiName`.\n */\n\n/**\n * A {@link Client} attached to an ontology scenario. All read and write operations performed via this client are\n * scoped to that scenario. `EXPERIMENTAL_ScenarioClient` is a superset of {@link Client}.\n *\n * @beta This is an experimental, unstable feature subject to change.\n */\n\nexport function isScenarioClient(value) {\n return value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof value.getScenarioReference === \"function\";\n}\n\n/**\n * Shared internal builder used by both {@link withScenario} and {@link createScenario}. Validates the parent client\n * is not already inside a scenario or transaction, then constructs a fresh {@link Client} via\n * `createClientWithScenario` and decorates it with {@link EXPERIMENTAL_ScenarioClient}-only methods.\n *\n * @internal\n */\nexport function buildScenarioClient(parent, scenarioRid) {\n const ctx = parent[additionalContext];\n if (ctx.transactionId != null) {\n throw new Error(\"withScenario / createScenario: the supplied client already has an active transaction. Scenarios cannot be nested on transactions.\");\n }\n if (ctx.scenarioRid != null) {\n throw new Error(\"withScenario / createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.\");\n }\n const inner = createClientWithScenario(scenarioRid, ctx.baseUrl, ctx.ontologyRid, ctx.tokenProvider, {\n logger: ctx.logger,\n UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch\n }, ctx.fetch);\n const innerCtx = inner[additionalContext];\n async function getEditedEntityTypes() {\n const ontologyRid = await innerCtx.ontologyRid;\n const response = await OntologyScenarios.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {\n preview: true\n });\n return {\n objectTypes: response.objectTypes,\n linkTypes: response.linkTypes\n };\n }\n async function getEditedEntities(objectType, options) {\n const ontologyRid = await innerCtx.ontologyRid;\n const response = await OntologyScenarios.listScenarioEditedObjects(innerCtx, ontologyRid, scenarioRid, objectType.apiName, {\n pageSize: options?.pageSize,\n pageToken: options?.pageToken,\n preview: true\n });\n const data = response.data.map(entry => {\n const wire = entry;\n return {\n $apiName: wire.__apiName,\n $primaryKey: wire.__primaryKey\n };\n });\n return {\n data,\n nextPageToken: response.nextPageToken\n };\n }\n async function* editedEntitiesAsyncIter(objectType, options) {\n const seen = new Set();\n let pageToken;\n do {\n const page = await getEditedEntities(objectType, {\n pageSize: options?.pageSize,\n pageToken\n });\n for (const obj of page.data) {\n const key = obj.$primaryKey;\n if (seen.has(key)) continue;\n seen.add(key);\n yield obj;\n }\n pageToken = page.nextPageToken;\n } while (pageToken != null);\n }\n async function getEditedLinkTypes(sourceObjectType) {\n const ontologyRid = await innerCtx.ontologyRid;\n const response = await OntologyScenarios.listScenarioEditedLinkTypes(innerCtx, ontologyRid, scenarioRid, sourceObjectType.apiName, {\n preview: true\n });\n return response.data;\n }\n async function getEditedLinks(sourceObjectType, linkType, options) {\n const ontologyRid = await innerCtx.ontologyRid;\n const response = await OntologyScenarios.listScenarioEditedLinks(innerCtx, ontologyRid, scenarioRid, sourceObjectType.apiName, linkType, {\n pageSize: options?.pageSize,\n pageToken: options?.pageToken,\n preview: true\n });\n const data = [];\n for (const entry of response.data) {\n const sourceWire = entry.sourceObject;\n if (sourceWire?.__apiName == null || sourceWire.__primaryKey == null) {\n continue;\n }\n const source = {\n $apiName: sourceWire.__apiName,\n $primaryKey: sourceWire.__primaryKey\n };\n for (const linked of entry.linkedObjects) {\n const targetWire = linked.targetObject;\n if (targetWire?.__apiName == null || targetWire.__primaryKey == null) {\n continue;\n }\n const target = {\n $apiName: targetWire.__apiName,\n $primaryKey: targetWire.__primaryKey\n };\n data.push({\n source,\n target,\n linkType: linked.linkType ?? linkType\n });\n }\n }\n return {\n data,\n nextPageToken: response.nextPageToken\n };\n }\n async function* editedLinksAsyncIter(sourceObjectType, linkType, options) {\n let pageToken;\n do {\n const page = await getEditedLinks(sourceObjectType, linkType, {\n pageSize: options?.pageSize,\n pageToken\n });\n for (const link of page.data) {\n yield link;\n }\n pageToken = page.nextPageToken;\n } while (pageToken != null);\n }\n return Object.defineProperties(inner, {\n getScenarioReference: {\n value: () => scenarioRid\n },\n getEditedEntityTypes: {\n value: getEditedEntityTypes\n },\n getEditedEntities: {\n value: getEditedEntities\n },\n editedEntitiesAsyncIter: {\n value: editedEntitiesAsyncIter\n },\n getEditedLinkTypes: {\n value: getEditedLinkTypes\n },\n getEditedLinks: {\n value: getEditedLinks\n },\n editedLinksAsyncIter: {\n value: editedLinksAsyncIter\n }\n });\n}","/*\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\n/** @internal */\nexport function isOntologyObjectV2(o) {\n return o && typeof o === \"object\" && typeof o.__apiName === \"string\" && o.__primaryKey != null;\n}","/*\n * Copyright 2024 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 { MediaSets } from \"@osdk/foundry.mediasets\";\nimport * as Attachments from \"@osdk/foundry.ontologies/Attachment\";\nimport { isAttachmentFile, isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { isMedia, isMediaReference, isMediaUpload } from \"../object/mediaUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isScenarioClient } from \"../scenarios/ScenarioClient.js\";\nimport { isInterfaceActionParam } from \"./interfaceUtils.js\";\nimport { isObjectSpecifiersObject } from \"./isObjectSpecifiersObject.js\";\nimport { isOntologyObjectV2 } from \"./isOntologyObjectV2.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n * @internal\n */\nexport async function toDataValue(value, client, actionMetadata) {\n if (value == null) {\n // typeof null is 'object' so do this first\n // Sending null over the wire clears the data, whereas undefined is dropped at request time.\n return value;\n }\n\n // arrays and sets are both sent over the wire as arrays\n if (Array.isArray(value) || value instanceof Set) {\n const values = Array.from(value);\n if (values.some(dataValue => isAttachmentUpload(dataValue) || isAttachmentFile(dataValue))) {\n const converted = [];\n for (const value of values) {\n converted.push(await toDataValue(value, client, actionMetadata));\n }\n return converted;\n }\n const promiseArray = Array.from(value, async innerValue => await toDataValue(innerValue, client, actionMetadata));\n return Promise.all(promiseArray);\n }\n\n // For uploads, we need to upload ourselves first to get the RID of the attachment\n if (isAttachmentUpload(value)) {\n const attachment = await Attachments.upload(client, value.data, {\n filename: value.name\n });\n return await toDataValue(attachment.rid, client, actionMetadata);\n }\n if (isAttachmentFile(value)) {\n const attachment = await Attachments.upload(client, value, {\n filename: value.name\n });\n return await toDataValue(attachment.rid, client, actionMetadata);\n }\n if (isMediaUpload(value)) {\n const mediaRef = await MediaSets.uploadMedia(client, value.data, {\n filename: value.fileName,\n preview: true\n });\n return await toDataValue(mediaRef, client, actionMetadata);\n }\n if (isMedia(value)) {\n return value.getMediaReference();\n }\n if (isMediaReference(value)) {\n return value;\n }\n\n // objects just send the JSON'd primaryKey\n if (isOntologyObjectV2(value)) {\n return await toDataValue(value.__primaryKey, client, actionMetadata);\n }\n if (isObjectSpecifiersObject(value)) {\n return await toDataValue(value.$primaryKey, client, actionMetadata);\n }\n\n // object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)\n if (isWireObjectSet(value)) {\n return value;\n }\n if (isObjectSet(value)) {\n return getWireObjectSet(value);\n }\n if (isInterfaceActionParam(value)) {\n return {\n objectTypeApiName: value.$objectType,\n primaryKeyValue: value.$primaryKey\n };\n }\n if (isScenarioClient(value)) {\n return value.getScenarioReference();\n }\n\n // TODO (during queries implementation)\n // two dimensional aggregation\n // three dimensional aggregation\n\n // struct\n if (typeof value === \"object\") {\n return Object.entries(value).reduce(async (promisedAcc, [key, structValue]) => {\n const acc = await promisedAcc;\n acc[key] = await toDataValue(structValue, client, actionMetadata);\n return acc;\n }, Promise.resolve({}));\n }\n\n // expected to pass through - boolean, byte, date, decimal, float, double, integer, long, short, string, timestamp, object type reference\n return value;\n}","/*\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\nimport * as Actions from \"@osdk/foundry.ontologies/Action\";\nimport invariant from \"tiny-invariant\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { toDataValue } from \"../util/toDataValue.js\";\nimport { ActionValidationError } from \"./ActionValidationError.js\";\nexport async function applyAction(client, action, parameters, options = {}) {\n const clientWithHeaders = addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyAction\"\n })), action);\n if (Array.isArray(parameters)) {\n !(client.transactionId == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Batch actions are not supported for staged edit functions or when supplying a transaction ID\") : invariant(false) : void 0;\n !(client.scenarioRid == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Batch actions are not supported when scoped to a scenario\") : invariant(false) : void 0;\n const response = await Actions.applyBatch(clientWithHeaders, await client.ontologyRid, action.unsanitizedApiName ?? action.apiName, {\n requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.unsanitizedApiName ?? action.apiName)) : [],\n options: {\n returnEdits: options?.$returnEdits ? \"ALL\" : \"NONE\"\n }\n }, {\n branch: client.branch\n });\n const edits = response.edits;\n return options?.$returnEdits ? edits?.type === \"edits\" ? remapActionResponse(response) : edits : undefined;\n } else {\n const response = await Actions.apply(clientWithHeaders, await client.ontologyRid, action.unsanitizedApiName ?? action.apiName, {\n parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.unsanitizedApiName ?? action.apiName)),\n options: {\n mode: options?.$validateOnly ? \"VALIDATE_ONLY\" : \"VALIDATE_AND_EXECUTE\",\n returnEdits: options?.$returnEdits ? \"ALL_V2_WITH_DELETIONS\" : \"NONE\"\n }\n }, {\n branch: client.branch,\n transactionId: client.transactionId,\n scenarioRid: client.scenarioRid\n });\n if (options?.$validateOnly) {\n return response.validation;\n }\n if (response.validation && response.validation?.result === \"INVALID\") {\n const validation = response.validation;\n throw new ActionValidationError(validation);\n }\n const edits = response.edits;\n return options?.$returnEdits ? edits?.type === \"edits\" ? remapActionResponse(response) : edits : undefined;\n }\n}\nasync function remapActionParams(params, client, actionMetadata) {\n if (params == null) {\n return {};\n }\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValue(value, client, actionMetadata);\n }\n return parameterMap;\n}\nasync function remapBatchActionParams(params, client, actionMetadata) {\n const remappedParams = await Promise.all(params.map(async param => {\n return {\n parameters: await remapActionParams(param, client, actionMetadata)\n };\n }));\n return remappedParams;\n}\nexport function remapActionResponse(response) {\n const editResponses = response?.edits;\n if (editResponses?.type === \"edits\") {\n const remappedActionResponse = {\n type: editResponses.type,\n deletedLinksCount: editResponses.deletedLinksCount,\n deletedObjectsCount: editResponses.deletedObjectsCount,\n addedLinks: [],\n deletedLinks: [],\n addedObjects: [],\n deletedObjects: [],\n modifiedObjects: [],\n editedObjectTypes: []\n };\n const editedObjectTypesSet = new Set();\n for (const edit of editResponses.edits) {\n if (edit.type === \"addLink\" || edit.type === \"deleteLink\") {\n const osdkEdit = {\n linkTypeApiNameAtoB: edit.linkTypeApiNameAtoB,\n linkTypeApiNameBtoA: edit.linkTypeApiNameBtoA,\n aSideObject: edit.aSideObject,\n bSideObject: edit.bSideObject\n };\n edit.type === \"addLink\" ? remappedActionResponse.addedLinks.push(osdkEdit) : remappedActionResponse.deletedLinks?.push(osdkEdit);\n editedObjectTypesSet.add(edit.aSideObject.objectType);\n editedObjectTypesSet.add(edit.bSideObject.objectType);\n } else if (edit.type === \"addObject\" || edit.type === \"deleteObject\" || edit.type === \"modifyObject\") {\n const osdkEdit = {\n objectType: edit.objectType,\n primaryKey: edit.primaryKey\n };\n if (edit.type === \"addObject\") {\n remappedActionResponse.addedObjects.push(osdkEdit);\n } else if (edit.type === \"deleteObject\") {\n remappedActionResponse.deletedObjects?.push(osdkEdit);\n } else if (edit.type === \"modifyObject\") {\n remappedActionResponse.modifiedObjects.push(osdkEdit);\n }\n editedObjectTypesSet.add(edit.objectType);\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(`Unexpected edit type: ${JSON.stringify(edit)}`);\n }\n }\n }\n remappedActionResponse.editedObjectTypes = [...editedObjectTypesSet];\n return remappedActionResponse;\n }\n}","/*\n * Copyright 2024 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 { TimeseriesDurationMapping } from \"@osdk/api\";\nimport { iterateReadableStream, parseStreamedResponse } from \"./streamutils.js\";\nexport function getTimeRange(body) {\n if (\"$startTime\" in body || \"$endTime\" in body) {\n return {\n type: \"absolute\",\n startTime: body.$startTime,\n endTime: body.$endTime\n };\n }\n return body.$before ? {\n type: \"relative\",\n startTime: {\n when: \"BEFORE\",\n value: body.$before,\n unit: TimeseriesDurationMapping[body.$unit]\n }\n } : {\n type: \"relative\",\n endTime: {\n when: \"AFTER\",\n value: body.$after,\n unit: TimeseriesDurationMapping[body.$unit]\n }\n };\n}\nexport async function* asyncIterPointsHelper(iterator) {\n const reader = iterator.body?.getReader();\n for await (const point of parseStreamedResponse(iterateReadableStream(reader))) {\n yield {\n time: point.time,\n value: point.value\n };\n }\n}","/*\n * Copyright 2024 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 * as TimeSeriesValueBankProperties from \"@osdk/foundry.ontologies/TimeSeriesValueBankProperty\";\nimport { asyncIterPointsHelper, getTimeRange } from \"./util/timeseriesUtils.js\";\nexport class GeotimeSeriesPropertyImpl {\n #triplet;\n #client;\n constructor(client, objectApiName, primaryKey, propertyName, initialValue) {\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n if (initialValue != null) {\n this.lastFetchedValue = initialValue;\n }\n }\n async getLatestValue() {\n const latestPointPromise = TimeSeriesValueBankProperties.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n latestPointPromise.then(latestPoint => this.lastFetchedValue = latestPoint,\n // eslint-disable-next-line no-console\n err => void console.error(err));\n return latestPointPromise;\n }\n async getAllValues(query) {\n const allPoints = [];\n for await (const point of this.asyncIterValues(query)) {\n allPoints.push(point);\n }\n return allPoints;\n }\n async *asyncIterValues(query) {\n const streamPointsIterator = await TimeSeriesValueBankProperties.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {\n range: getTimeRange(query)\n } : {});\n for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {\n yield timeseriesPoint;\n }\n }\n}","/*\n * Copyright 2024 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 { MediaSets } from \"@osdk/foundry.mediasets\";\nimport * as MediaReferenceProperties from \"@osdk/foundry.ontologies/MediaReferenceProperty\";\nimport { validateMediaItemMetadata } from \"./object/validateMediaItemMetadata.js\";\nexport class MediaReferencePropertyImpl {\n #mediaReference;\n #triplet;\n #client;\n constructor(args) {\n const {\n client,\n objectApiName,\n primaryKey,\n propertyName,\n mediaReference\n } = args;\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n this.#mediaReference = mediaReference;\n }\n async fetchContents() {\n return MediaReferenceProperties.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {\n preview: true // TODO: Can turn this back off when backend is no longer in beta.\n });\n }\n async fetchMetadata() {\n const r = await MediaReferenceProperties.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {\n preview: true // TODO: Can turn this back off when backend is no longer in beta.\n });\n return {\n path: r.path,\n sizeBytes: Number(r.sizeBytes),\n mediaType: r.mediaType\n };\n }\n\n /**\n * Fetches type-specific metadata via `MediaSets.metadata`. There is no Ontologies-backed\n * full-metadata endpoint, so this routes through the media set view using the embedded media\n * reference.\n */\n async fetchFullMetadata() {\n const {\n mediaSetRid,\n mediaItemRid,\n token\n } = this.#mediaReference.reference.mediaSetViewItem;\n const raw = await MediaSets.metadata(this.#client, mediaSetRid, mediaItemRid, {\n preview: true\n }, token ? {\n ReadToken: token\n } : undefined);\n return {\n itemMetadata: validateMediaItemMetadata(raw)\n };\n }\n getMediaReference() {\n return this.#mediaReference;\n }\n}","/*\n * Copyright 2024 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 * as TimeSeriesPropertiesV2 from \"@osdk/foundry.ontologies/TimeSeriesPropertyV2\";\nimport { asyncIterPointsHelper, getTimeRange } from \"./util/timeseriesUtils.js\";\nexport class TimeSeriesPropertyImpl {\n #triplet;\n #client;\n constructor(client, objectApiName, primaryKey, propertyName) {\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n }\n async getFirstPoint() {\n return TimeSeriesPropertiesV2.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n }\n async getLastPoint() {\n return TimeSeriesPropertiesV2.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n }\n async getAllPoints(query) {\n const allPoints = [];\n for await (const point of this.asyncIterPoints(query)) {\n allPoints.push(point);\n }\n return allPoints;\n }\n async *asyncIterPoints(query) {\n const streamPointsIterator = await TimeSeriesPropertiesV2.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {\n range: getTimeRange(query)\n } : {});\n for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {\n yield timeseriesPoint;\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\n/**\n * Formats a boolean value according to the specified formatting rule\n */\nexport function formatBoolean(value, rule) {\n return value ? rule.valueIfTrue : rule.valueIfFalse;\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\n/**\n * Resolves a property reference or string constant to its actual value\n */\n\nexport function resolvePropertyReference(ref, objectData) {\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() {\n if (typeof navigator !== \"undefined\" && navigator.language != null) {\n return navigator.language;\n }\n return \"en-US\";\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 { resolvePropertyReference } from \"./propertyFormattingUtils.js\";\n\n/**\n * Formats a date/timestamp value according to the specified formatting rule\n */\nexport function formatDateTime(value, format, timezone, objectData, locale, userTimezoneOverride) {\n const date = value instanceof Date ? value : new Date(value);\n if (isNaN(date.getTime())) {\n return undefined;\n }\n const resolvedTimezone = resolveTimezone(timezone, objectData, userTimezoneOverride);\n switch (format.type) {\n case \"localizedFormat\":\n return formatLocalized(date, format, locale, resolvedTimezone);\n case \"stringFormat\":\n // TODO - pattern formatting\n return undefined;\n default:\n format;\n return undefined;\n }\n}\nconst INVALID_DATE_STRING = \"Invalid date or timezone\";\nfunction formatLocalized(date, format, locale, timezone) {\n if (format.format === \"DATE_FORMAT_ISO_INSTANT\") {\n return date.toISOString();\n }\n if (format.format === \"DATE_FORMAT_RELATIVE_TO_NOW\") {\n return formatRelativeToNow(date, locale, timezone);\n }\n const options = getLocalizedFormatOptions(format.format);\n try {\n return new Intl.DateTimeFormat(locale, timezone ? {\n ...options,\n timeZone: timezone\n } : options).format(date);\n } catch (_e) {\n // If a property reference is an invalid timezone we specifically say that it's invalid instead of returning undefined;\n return INVALID_DATE_STRING;\n }\n}\nfunction getLocalizedFormatOptions(format) {\n switch (format) {\n case \"DATE_FORMAT_DATE\":\n return FORMAT_DATE;\n case \"DATE_FORMAT_YEAR_AND_MONTH\":\n return FORMAT_YEAR_AND_MONTH;\n case \"DATE_FORMAT_DATE_TIME\":\n return FORMAT_DATE_TIME;\n case \"DATE_FORMAT_DATE_TIME_SHORT\":\n return FORMAT_DATE_TIME_SHORT;\n case \"DATE_FORMAT_TIME\":\n return FORMAT_TIME;\n default:\n format;\n return {};\n }\n}\nconst FORMAT_DATE = {\n day: \"numeric\",\n month: \"short\",\n weekday: \"short\",\n year: \"numeric\"\n};\nconst FORMAT_YEAR_AND_MONTH = {\n month: \"short\",\n year: \"numeric\"\n};\nconst FORMAT_DATE_TIME = {\n day: \"numeric\",\n month: \"short\",\n weekday: \"short\",\n year: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n};\nconst FORMAT_DATE_TIME_SHORT = {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\"\n};\nconst FORMAT_TIME = {\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n};\nconst DATE_TIME_SHORT_WITH_WEEKDAY = {\n day: \"numeric\",\n month: \"short\",\n weekday: \"short\",\n year: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\"\n};\nfunction resolveTimezone(timezone, objectData, userTimezoneOverride) {\n if (userTimezoneOverride != null) {\n return userTimezoneOverride;\n }\n if (timezone == null) {\n return undefined;\n }\n switch (timezone.type) {\n case \"user\":\n return undefined;\n case \"static\":\n return resolvePropertyReference(timezone.zoneId, objectData);\n default:\n timezone;\n return undefined;\n }\n}\nconst SECOND_MS = 1_000;\nconst MINUTE_MS = 60 * SECOND_MS;\nconst HOUR_MS = 60 * MINUTE_MS;\nconst DAY_MS = 24 * HOUR_MS;\nfunction formatRelativeToNow(date, locale, timezone) {\n const now = Date.now();\n const diff = date.valueOf() - now;\n const absDiff = Math.abs(diff);\n\n // More than 1 day - fall back to absolute date formatting\n if (absDiff >= DAY_MS) {\n const dtf = new Intl.DateTimeFormat(locale, {\n ...DATE_TIME_SHORT_WITH_WEEKDAY,\n timeZone: timezone\n });\n return dtf.format(date);\n }\n\n // Within 1 day - use relative formatting\n const rtf = new Intl.RelativeTimeFormat(locale, {\n numeric: \"auto\"\n });\n const units = [[\"hour\", HOUR_MS], [\"minute\", MINUTE_MS], [\"second\", SECOND_MS]];\n for (const [unit, ms] of units) {\n if (absDiff >= ms) {\n return rtf.format(Math.floor(diff / ms), unit);\n }\n }\n return rtf.format(0, \"second\");\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 { resolvePropertyReference } from \"./propertyFormattingUtils.js\";\n\n/**\n * Extended NumberFormatOptions that includes rounding mode support\n * which is available in modern browsers but not yet in TypeScript types.\n * Only includes modes that are actually supported by Intl.NumberFormat and used in our API.\n */\n\n/**\n * Formats a number value according to the specified formatting rule\n */\nexport function formatNumber(value, numberType, objectData, locale) {\n switch (numberType.type) {\n case \"standard\":\n return formatStandardNumber(value, numberType.baseFormatOptions, locale);\n case \"fixedValues\":\n return numberType.values[value];\n case \"currency\":\n return formatCurrency(value, numberType, objectData, locale);\n case \"standardUnit\":\n return formatStandardUnit(value, numberType, objectData, locale);\n case \"customUnit\":\n return formatCustomUnit(value, numberType, objectData, locale);\n case \"affix\":\n return formatAffix(value, numberType, objectData, locale);\n case \"duration\":\n // TODO (duration is a bit more complex)\n return undefined;\n case \"scale\":\n return formatScale(value, numberType, locale);\n case \"ratio\":\n return formatRatio(value, numberType, locale);\n default:\n numberType;\n return undefined;\n }\n}\nfunction formatStandardNumber(value, options, locale) {\n return formatNumberWithAffixes(value, options, locale);\n}\nfunction formatCurrency(value, rule, objectData, locale) {\n const currencyCode = resolvePropertyReference(rule.currencyCode, objectData);\n if (currencyCode == null) {\n return formatStandardNumber(value, rule.baseFormatOptions, locale);\n }\n const options = {\n ...convertToIntlOptions(rule.baseFormatOptions),\n style: \"currency\",\n currency: currencyCode,\n currencyDisplay: rule.style === \"COMPACT\" ? \"narrowSymbol\" : \"symbol\"\n };\n return formatWithIntl(value, options, locale);\n}\nfunction formatStandardUnit(value, rule, objectData, locale) {\n const unit = resolvePropertyReference(rule.unit, objectData);\n if (unit == null) {\n return formatStandardNumber(value, rule.baseFormatOptions, locale);\n }\n const options = {\n ...convertToIntlOptions(rule.baseFormatOptions),\n style: \"unit\",\n unit: unit\n };\n try {\n return formatWithIntl(value, options, locale);\n } catch (error) {\n const suffix = ` ${unit}`;\n return formatNumberWithAffixes(value, rule.baseFormatOptions, locale, \"\", suffix);\n }\n}\nfunction formatCustomUnit(value, rule, objectData, locale) {\n const unit = resolvePropertyReference(rule.unit, objectData);\n const suffix = unit != null ? ` ${unit}` : \"\";\n return formatNumberWithAffixes(value, rule.baseFormatOptions, locale, \"\", suffix);\n}\nfunction formatAffix(value, rule, objectData, locale) {\n const prefix = rule.affix.prefix != null ? resolvePropertyReference(rule.affix.prefix, objectData) ?? \"\" : \"\";\n const suffix = rule.affix.postfix != null ? resolvePropertyReference(rule.affix.postfix, objectData) ?? \"\" : \"\";\n return formatNumberWithAffixes(value, rule.baseFormatOptions, locale, prefix, suffix);\n}\n\n/**\n * Gets the scale divisor for a given scale type\n */\nfunction getScaleDivisor(scaleType) {\n switch (scaleType) {\n case \"THOUSANDS\":\n return 1e3;\n case \"MILLIONS\":\n return 1e6;\n case \"BILLIONS\":\n return 1e9;\n default:\n scaleType;\n throw new Error(`Unknown scale type: ${scaleType}`);\n }\n}\n\n/**\n * Extracts the localized compact suffix for a given scale.\n * Uses Intl.NumberFormat with compact notation to get the proper i18n suffix.\n */\nfunction getLocalizedCompactSuffix(scaleDivisor, locale) {\n const compactFormatter = new Intl.NumberFormat(locale, {\n notation: \"compact\",\n compactDisplay: \"short\"\n });\n const parts = compactFormatter.formatToParts(scaleDivisor);\n const compactPart = parts.find(p => p.type === \"compact\");\n return compactPart?.value ?? \"\";\n}\nfunction formatScale(value, rule, locale) {\n const scaleDivisor = getScaleDivisor(rule.scaleType);\n const scaledValue = value / scaleDivisor;\n const suffix = getLocalizedCompactSuffix(scaleDivisor, locale);\n return formatNumberWithAffixes(scaledValue, rule.baseFormatOptions, locale, \"\", suffix);\n}\nfunction getRatioScaledValue(value, ratioType) {\n switch (ratioType) {\n case \"PERCENTAGE\":\n return value * 100;\n case \"PER_MILLE\":\n return value * 1000;\n case \"BASIS_POINTS\":\n return value * 10000;\n default:\n ratioType;\n throw new Error(`Unknown ratio type: ${ratioType}`);\n }\n}\nfunction formatRatio(value, rule, locale) {\n // Special case: PERCENTAGE uses Intl's native percent style\n if (rule.ratioType === \"PERCENTAGE\") {\n const options = {\n ...convertToIntlOptions(rule.baseFormatOptions),\n style: \"percent\"\n };\n return formatWithIntl(value, options, locale);\n }\n\n // Other ratio types: scale and add suffix\n const scaledValue = getRatioScaledValue(value, rule.ratioType);\n let suffix;\n switch (rule.ratioType) {\n case \"PER_MILLE\":\n suffix = \"‰\";\n break;\n case \"BASIS_POINTS\":\n suffix = \" bps\";\n break;\n default:\n rule.ratioType;\n throw new Error(`Unknown ratio type: ${rule.ratioType}`);\n }\n return formatNumberWithAffixes(scaledValue, rule.baseFormatOptions, locale, \"\", suffix);\n}\n\n/**\n * Maps notation from OSDK format to Intl format\n */\nfunction mapNotation(notation) {\n switch (notation) {\n case \"STANDARD\":\n return \"standard\";\n case \"SCIENTIFIC\":\n return \"scientific\";\n case \"ENGINEERING\":\n return \"engineering\";\n case \"COMPACT\":\n return \"compact\";\n default:\n notation;\n }\n}\n\n/**\n * Maps rounding mode from OSDK format to Intl format\n */\nfunction mapRoundingMode(mode) {\n switch (mode) {\n case \"CEIL\":\n return \"ceil\";\n case \"FLOOR\":\n return \"floor\";\n case \"ROUND_CLOSEST\":\n return \"halfExpand\";\n default:\n mode;\n return undefined;\n }\n}\nfunction convertToIntlOptions(options) {\n return {\n useGrouping: options.useGrouping,\n minimumIntegerDigits: options.minimumIntegerDigits,\n minimumFractionDigits: options.minimumFractionDigits,\n maximumFractionDigits: options.maximumFractionDigits,\n minimumSignificantDigits: options.minimumSignificantDigits,\n maximumSignificantDigits: options.maximumSignificantDigits,\n notation: options.notation ? mapNotation(options.notation) : undefined,\n roundingMode: options.roundingMode ? mapRoundingMode(options.roundingMode) : undefined,\n convertNegativeToParenthesis: options.convertNegativeToParenthesis\n };\n}\n\n/**\n * Applies negative-to-parenthesis conversion if requested\n */\nfunction maybeConvertNegativeToParenthesis(formatted, value, shouldConvert) {\n if (shouldConvert && value < 0) {\n return formatted.replace(/^-/, \"(\") + \")\";\n }\n return formatted;\n}\n\n/**\n * Formats a number using Intl.NumberFormat with the given options\n */\nfunction formatWithIntl(value, options, locale) {\n const formatter = new Intl.NumberFormat(locale, options);\n const formatted = formatter.format(value);\n return maybeConvertNegativeToParenthesis(formatted, value, options.convertNegativeToParenthesis ?? false);\n}\n\n/**\n * Formats a number and optionally adds prefix/suffix\n */\nfunction formatNumberWithAffixes(value, baseOptions, locale, prefix, suffix) {\n const intlOptions = convertToIntlOptions(baseOptions);\n const formatted = formatWithIntl(value, intlOptions, locale);\n return `${prefix || \"\"}${formatted}${suffix || \"\"}`;\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 { formatBoolean } from \"./formatBoolean.js\";\nimport { formatDateTime } from \"./formatDateTime.js\";\nimport { formatNumber } from \"./formatNumber.js\";\nimport { getBrowserLocale } from \"./propertyFormattingUtils.js\";\n/**\n * Applies formatting rules to a property value and returns the formatted string value.\n *\n * @param propertyValue - The value of the property to format\n * @returns The formatted string value, or undefined if the property cannot be formatted\n *\n * @experimental This is a stub implementation that returns undefined.\n * The actual formatting logic will be implemented later.\n */\nexport function applyPropertyFormatter(propertyValue, propertyDefinition, objectData, options = {}) {\n if (propertyDefinition?.valueFormatting == null || propertyValue == null) {\n return undefined;\n }\n return formatPropertyValue(propertyValue, propertyDefinition.valueFormatting, objectData, options);\n}\nfunction formatPropertyValue(value, rule, objectData, options) {\n switch (rule.type) {\n case \"boolean\":\n if (typeof value !== \"boolean\") {\n return undefined;\n }\n return formatBoolean(value, rule);\n case \"number\":\n if (typeof value !== \"number\") {\n return undefined;\n }\n return formatNumber(value, rule.numberType, objectData, options.locale ?? getBrowserLocale());\n case \"date\":\n case \"timestamp\":\n if (typeof value !== \"string\") {\n return undefined;\n }\n return formatDateTime(new Date(value), rule.format, rule.type === \"timestamp\" ? rule.displayTimezone : undefined, objectData, options.locale ?? getBrowserLocale(), options.timezoneId);\n default:\n return undefined;\n }\n}","/*\n * Copyright 2024 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 const InterfaceDefinitions = Symbol(process.env.MODE !== \"production\" ? \"InterfaceDefinitions\" : undefined);","/*\n * Copyright 2024 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\n/** @internal */\nexport const UnderlyingOsdkObject = Symbol(process.env.MODE !== \"production\" ? \"Underlying Object\" : undefined);\n\n/** @internal */\nexport const ObjectDefRef = Symbol(process.env.MODE !== \"production\" ? \"ObjectDefinition\" : undefined);\n\n/** @internal */\nexport const InterfaceDefRef = Symbol(process.env.MODE !== \"production\" ? \"InterfaceDefinition\" : undefined);\n\n/** @internal */\nexport const ClientRef = Symbol(process.env.MODE !== \"production\" ? \"ClientRef\" : undefined);\n\n/** @internal */\nexport const PropertySecuritiesRef = Symbol(process.env.MODE !== \"production\" ? \"Property Securities\" : undefined);","/*\n * Copyright 2024 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 { getWireObjectSet } from \"../../objectSet/createObjectSet.js\";\nimport { fetchSingle, fetchSingleWithErrors } from \"../fetchSingle.js\";\nimport { ClientRef, InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\n/** @internal */\nexport function get$link(holder) {\n const client = holder[ClientRef];\n const objDef = holder[ObjectDefRef];\n const rawObj = holder[UnderlyingOsdkObject];\n return Object.freeze(Object.fromEntries(Object.keys(objDef.links).map(linkName => {\n const linkDef = objDef.links[linkName];\n const objectSet = client.objectSetFactory(objDef, client).where({\n [objDef.primaryKeyApiName]: rawObj.$primaryKey\n }).pivotTo(linkName);\n const value = !linkDef.multiplicity ? {\n fetchOne: options => fetchSingle(client, objDef, options ?? {}, getWireObjectSet(objectSet)),\n fetchOneWithErrors: options => fetchSingleWithErrors(client, objDef, options ?? {}, getWireObjectSet(objectSet))\n } : objectSet;\n return [linkName, value];\n })));\n}\n\n/** @internal */\nexport function get$linkForInterface(holder) {\n const client = holder[UnderlyingOsdkObject][ClientRef];\n const objDef = holder[UnderlyingOsdkObject][ObjectDefRef];\n const interfaceDef = holder[InterfaceDefRef];\n const rawObj = holder[UnderlyingOsdkObject];\n return Object.freeze(Object.fromEntries(Object.keys(interfaceDef.links).map(linkName => {\n const linkDef = interfaceDef.links[linkName];\n const objectSet = client.objectSetFactory(interfaceDef, client).intersect(client.objectSetFactory(objDef, client).where({\n [objDef.primaryKeyApiName]: rawObj.$primaryKey\n })).pivotTo(linkName);\n const linkTargetDef = linkDef.targetType === \"object\" ? {\n type: \"object\",\n apiName: linkDef.targetTypeApiName\n } : {\n type: \"interface\",\n apiName: linkDef.targetTypeApiName\n };\n const value = !linkDef.multiplicity ? {\n fetchOne: options => fetchSingle(client, linkTargetDef, options ?? {}, getWireObjectSet(objectSet)),\n fetchOneWithErrors: options => fetchSingleWithErrors(client, linkTargetDef, options ?? {}, getWireObjectSet(objectSet))\n } : objectSet;\n return [linkName, value];\n })));\n}","/*\n * Copyright 2024 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 { extractNamespace } from \"../../internal/conversions/extractNamespace.js\";\nimport { get$linkForInterface } from \"./getDollarLink.js\";\nimport { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\n/** @internal */\nexport function createOsdkInterface(underlying, interfaceDef) {\n const [objApiNamespace] = extractNamespace(interfaceDef.apiName);\n return Object.freeze(Object.defineProperties({}, {\n // first to minimize hidden classes\n [UnderlyingOsdkObject]: {\n value: underlying\n },\n \"$apiName\": {\n value: interfaceDef.apiName,\n enumerable: true\n },\n \"$as\": {\n value: underlying.$as,\n enumerable: false\n },\n \"$objectType\": {\n value: underlying.$objectType,\n enumerable: \"$objectType\" in underlying\n },\n \"$primaryKey\": {\n value: underlying.$primaryKey,\n enumerable: \"$primaryKey\" in underlying\n },\n \"$objectSpecifier\": {\n value: underlying.$objectSpecifier,\n enumerable: \"$objectSpecifier\" in underlying\n },\n \"$title\": {\n value: underlying.$title,\n enumerable: \"$title\" in underlying\n },\n \"$rid\": {\n value: underlying.$rid,\n enumerable: \"$rid\" in underlying\n },\n \"$clone\": {\n value: clone,\n enumerable: false\n },\n \"$propertySecurities\": {\n value: remapPropertySecuritiesForInterface(underlying.$propertySecurities, underlying[ObjectDefRef], interfaceDef, objApiNamespace),\n enumerable: \"$propertySecurities\" in underlying\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n value: {\n \"ObjectMetadata\": underlying[ObjectDefRef],\n \"InterfaceMetadata\": interfaceDef\n },\n enumerable: false\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue\": {\n value: underlying.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue,\n enumerable: false\n },\n \"$link\": {\n get() {\n return get$linkForInterface(this);\n }\n },\n [InterfaceDefRef]: {\n value: interfaceDef\n },\n ...Object.fromEntries(Object.keys(interfaceDef.properties).map(p => {\n const objDef = underlying[ObjectDefRef];\n const [apiNamespace, apiName] = extractNamespace(p);\n const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];\n return [apiNamespace === objApiNamespace ? apiName : p, {\n enumerable: targetPropName in underlying,\n value: underlying[targetPropName]\n }];\n }))\n }));\n function clone(update) {\n if (update == null) {\n return underlying.$clone().$as(interfaceDef);\n }\n for (const key of Object.keys(update)) {\n if (!(key in interfaceDef.properties)) {\n throw new Error(`Invalid property ${key} for interface ${interfaceDef.apiName}`);\n }\n }\n const remappedProps = Object.fromEntries(Object.keys(update).map(p => mapProperty(p, update[p])).filter(x => x != null));\n return underlying.$clone(remappedProps).$as(interfaceDef);\n }\n function mapProperty(propertyName, value) {\n const objDef = underlying[ObjectDefRef];\n const targetPropName = objDef.interfaceMap[interfaceDef.apiName][propertyName];\n // If the underlying object does not implement the SPT, throw errors\n if (targetPropName == null) {\n throw new Error(`Cannot clone interface with ${propertyName} as property is not implemented by the underlying object type ${objDef.apiName}`);\n }\n return [targetPropName, value];\n }\n}\nfunction remapPropertySecuritiesForInterface(underlyingSecurities, objDef, interfaceDef, objApiNamespace) {\n if (underlyingSecurities == null) return undefined;\n const inverseMap = objDef.inverseInterfaceMap?.[interfaceDef.apiName] ?? {};\n const remapped = {};\n for (const objPropName of Object.keys(underlyingSecurities)) {\n if (objPropName === \"$primaryKey\" || objPropName === \"$title\") {\n remapped[objPropName] = underlyingSecurities[objPropName];\n continue;\n }\n const interfacePropName = inverseMap[objPropName];\n if (interfacePropName == null) continue;\n const [apiNamespace, apiName] = extractNamespace(interfacePropName);\n const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;\n remapped[key] = underlyingSecurities[objPropName];\n }\n return remapped;\n}","/*\n * Copyright 2024 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 { InterfaceDefinitions } from \"../../ontology/OntologyProvider.js\";\nimport { createSimpleCache } from \"../SimpleCache.js\";\nimport { createOsdkInterface } from \"./createOsdkInterface.js\";\nimport { UnderlyingOsdkObject } from \"./InternalSymbols.js\";\n\n/** @internal */\n\nexport const get$as = createSimpleCache(new WeakMap(), $asFactory).get;\nconst osdkObjectToInterfaceView = createSimpleCache(new WeakMap(), () => new Map());\nfunction $asFactory(objDef) {\n // We use the exact same logic for both the interface rep and the underlying rep\n\n return function $as(targetMinDef) {\n let targetInterfaceApiName;\n if (typeof targetMinDef === \"string\") {\n if (targetMinDef === objDef.apiName) {\n return this[UnderlyingOsdkObject];\n }\n\n // this is sufficient to determine if we implement the interface\n if (objDef.interfaceMap?.[targetMinDef] == null) {\n throw new Error(`Object does not implement interface '${targetMinDef}'.`);\n }\n targetInterfaceApiName = targetMinDef;\n } else if (targetMinDef.apiName === objDef.apiName) {\n return this[UnderlyingOsdkObject];\n } else {\n if (targetMinDef.type === \"object\") {\n throw new Error(`'${targetMinDef.apiName}' is not an interface nor is it '${objDef.apiName}', which is the object type.`);\n }\n targetInterfaceApiName = targetMinDef.apiName;\n }\n const def = objDef[InterfaceDefinitions][targetInterfaceApiName];\n if (!def) {\n throw new Error(`Object does not implement interface '${targetInterfaceApiName}'.`);\n }\n const underlying = this[UnderlyingOsdkObject];\n const existing = osdkObjectToInterfaceView.get(underlying).get(targetInterfaceApiName)?.deref();\n if (existing) return existing;\n const osdkInterface = createOsdkInterface(underlying, def.def);\n osdkObjectToInterfaceView.get(underlying).set(targetInterfaceApiName, new WeakRef(osdkInterface));\n return osdkInterface;\n };\n}","/*\n * Copyright 2024 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 invariant from \"tiny-invariant\";\nimport { GeotimeSeriesPropertyImpl } from \"../../createGeotimeSeriesProperty.js\";\nimport { MediaReferencePropertyImpl } from \"../../createMediaReferenceProperty.js\";\nimport { TimeSeriesPropertyImpl } from \"../../createTimeseriesProperty.js\";\nimport { hydrateAttachmentFromRidInternal } from \"../../public-utils/hydrateAttachmentFromRid.js\";\nimport { createObjectSpecifierFromPrimaryKey } from \"../../util/objectSpecifierUtils.js\";\nimport { applyPropertyFormatter } from \"../formatting/applyPropertyFormatter.js\";\nimport { get$as } from \"./getDollarAs.js\";\nimport { get$link } from \"./getDollarLink.js\";\nimport { ClientRef, ObjectDefRef, PropertySecuritiesRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nconst specialPropertyTypes = new Set([\"attachment\", \"geotimeSeriesReference\", \"mediaReference\", \"numericTimeseries\", \"stringTimeseries\", \"sensorTimeseries\"]);\nconst securableSpecialKeys = new Set([\"$primaryKey\", \"$title\"]);\n\n// kept separate so we are not redefining these functions\n// every time an object is created.\nconst basePropDefs = {\n \"$as\": {\n get() {\n return get$as(this[ObjectDefRef]);\n }\n },\n \"$link\": {\n get() {\n return get$link(this);\n }\n },\n \"$clone\": {\n value(update) {\n // I think `rawObj` is the same thing as `this` and can be removed?\n const rawObj = this[UnderlyingOsdkObject];\n const def = this[ObjectDefRef];\n if (update == null) {\n return createOsdkObject(this[ClientRef], def, {\n ...rawObj\n });\n }\n if (def.primaryKeyApiName in update && rawObj[def.primaryKeyApiName] !== update[def.primaryKeyApiName]) {\n throw new Error(`Cannot update ${def.apiName} object with differing primary key values `);\n }\n if (def.titleProperty in update && !(\"$title\" in update)) {\n update.$title = update[def.titleProperty];\n }\n const newObject = {\n ...this[UnderlyingOsdkObject],\n ...update\n };\n return createOsdkObject(this[ClientRef], this[ObjectDefRef], newObject);\n }\n },\n \"$objectSpecifier\": {\n get() {\n const rawObj = this[UnderlyingOsdkObject];\n return createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);\n },\n enumerable: true\n },\n \"$propertySecurities\": {\n get() {\n return this[PropertySecuritiesRef];\n },\n enumerable: true\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n get() {\n return {\n ObjectMetadata: this[ObjectDefRef]\n };\n },\n enumerable: false\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue\": {\n value(propertyApiName, options) {\n const rawObj = this[UnderlyingOsdkObject];\n const def = this[ObjectDefRef];\n const propertyValue = rawObj[propertyApiName];\n return applyPropertyFormatter(propertyValue, def.properties[propertyApiName], rawObj, options);\n },\n enumerable: false\n }\n};\n\n/**\n * @internal\n * @param client\n * @param objectDef\n * @param simpleOsdkProperties\n */\nexport function createOsdkObject(client, objectDef, simpleOsdkProperties, derivedPropertyTypeByName = {}, wirePropertySecurities = []) {\n const {\n parsedObject,\n clientPropertySecurities\n } = parseWhenSecuritiesLoaded(wirePropertySecurities, simpleOsdkProperties, objectDef, derivedPropertyTypeByName);\n\n // updates the object's \"hidden class/map\".\n const rawObj = parsedObject;\n Object.defineProperties(rawObj, {\n [UnderlyingOsdkObject]: {\n enumerable: false,\n value: simpleOsdkProperties\n },\n [PropertySecuritiesRef]: {\n enumerable: false,\n value: clientPropertySecurities\n },\n [ObjectDefRef]: {\n value: objectDef,\n enumerable: false\n },\n // TODO: Potentially update when GA metadata field\n [ClientRef]: {\n value: client,\n enumerable: false\n },\n ...basePropDefs\n });\n\n // Assign the special values\n for (const propKey of Object.keys(rawObj)) {\n if (propKey in objectDef.properties && typeof objectDef.properties[propKey].type === \"string\" && specialPropertyTypes.has(objectDef.properties[propKey].type)) {\n rawObj[propKey] = createSpecialProperty(client, objectDef, rawObj, propKey);\n } else if (propKey in derivedPropertyTypeByName) {\n rawObj[propKey] = modifyRdpProperties(client, derivedPropertyTypeByName, rawObj[propKey], propKey);\n }\n }\n return Object.freeze(rawObj);\n}\nfunction modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKey) {\n if (derivedPropertyTypeByName[propKey].definition.type === \"selection\" && derivedPropertyTypeByName[propKey].definition.operation.type === \"count\") {\n const num = Number(rawValue);\n !Number.isSafeInteger(num) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Count aggregation for derived property \" + propKey + \" returned a value larger than safe integer.\") : invariant(false) : void 0;\n return num;\n } // Selected or collected properties need to be deserialized specially when constructed with RDP\n else if (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType != null && typeof derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType.type === \"string\" && specialPropertyTypes.has(derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType.type)) {\n switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {\n case \"attachment\":\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => hydrateAttachmentFromRidInternal(client, a.rid));\n } else {\n return hydrateAttachmentFromRidInternal(client, rawValue.rid);\n }\n break;\n default:\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Derived property aggregations for Timeseries and Media are not supported\") : invariant(false) : void 0;\n }\n }\n return rawValue;\n}\nfunction createSpecialProperty(client, objectDef, rawObject, p) {\n const rawValue = rawObject[p];\n const propDef = objectDef.properties[p];\n if (process.env.NODE_ENV !== \"production\") {\n !(propDef != null && typeof propDef.type === \"string\" && specialPropertyTypes.has(propDef.type)) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n }\n if (propDef.type === \"attachment\") {\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => hydrateAttachmentFromRidInternal(client, a.rid));\n }\n return hydrateAttachmentFromRidInternal(client, rawValue.rid);\n }\n if (propDef.type === \"numericTimeseries\" || propDef.type === \"stringTimeseries\" || propDef.type === \"sensorTimeseries\") {\n return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);\n }\n if (propDef.type === \"geotimeSeriesReference\") {\n return new GeotimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p, rawValue.type === \"geotimeSeriesValue\" ? {\n time: rawValue.timestamp,\n value: {\n type: \"Point\",\n coordinates: rawValue.position\n }\n } : undefined);\n }\n if (propDef.type === \"mediaReference\") {\n return new MediaReferencePropertyImpl({\n client,\n objectApiName: objectDef.apiName,\n primaryKey: rawObject[objectDef.primaryKeyApiName],\n propertyName: p,\n mediaReference: rawValue\n });\n }\n}\nfunction parseWhenSecuritiesLoaded(wirePropertySecurities, rawObject, objectDef, derivedPropertyTypeByName = {}) {\n if (wirePropertySecurities == null || wirePropertySecurities.length === 0) {\n return {\n parsedObject: rawObject,\n clientPropertySecurities: undefined\n };\n }\n const parsedObject = rawObject;\n const clientPropertySecurities = {};\n for (const propKey of Object.keys(rawObject)) {\n if (propKey in objectDef.properties || propKey in derivedPropertyTypeByName || securableSpecialKeys.has(propKey)) {\n const value = rawObject[propKey];\n if (Array.isArray(value)) {\n const newVal = [];\n const newSecurities = [];\n value.forEach(spv => {\n !(typeof spv === \"object\" && spv != null && \"value\" in spv && \"propertySecurityIndex\" in spv) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected destructured secured property value object in array\") : invariant(false) : void 0;\n const securedValue = spv;\n newVal.push(securedValue.value);\n const securityIndex = securedValue.propertySecurityIndex;\n !(securityIndex != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected property security index to be defined\") : invariant(false) : void 0;\n !(securityIndex < wirePropertySecurities.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected property security index to be within bounds\") : invariant(false) : void 0;\n newSecurities.push(wirePropertySecurities[securityIndex].disjunction.map(wireToClientPropertySecurities));\n });\n parsedObject[propKey] = newVal;\n clientPropertySecurities[propKey] = newSecurities;\n } // Check if this is a secured property value object\n else if (typeof value === \"object\" && value != null && \"value\" in value && \"propertySecurityIndex\" in value) {\n const securedValue = value;\n parsedObject[propKey] = securedValue.value;\n const securityIndex = securedValue.propertySecurityIndex;\n !(securityIndex != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected property security index to be defined\") : invariant(false) : void 0;\n !(securityIndex < wirePropertySecurities.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected property security index to be within bounds\") : invariant(false) : void 0;\n clientPropertySecurities[propKey] = wirePropertySecurities[securityIndex].disjunction.map(wireToClientPropertySecurities);\n } else {\n // Regular property without security\n parsedObject[propKey] = value;\n }\n }\n }\n return {\n parsedObject,\n clientPropertySecurities\n };\n}\nfunction wireToClientPropertySecurities(propertySecurity) {\n switch (propertySecurity.type) {\n case \"propertyMarkingSummary\":\n return {\n type: \"propertyMarkings\",\n conjunctive: propertySecurity.conjunctive,\n containerConjunctive: propertySecurity.containerConjunctive,\n disjunctive: propertySecurity.disjunctive,\n containerDisjunctive: propertySecurity.containerDisjunctive\n };\n case \"errorComputingSecurity\":\n return {\n type: \"errorComputingSecurity\"\n };\n case \"unsupportedPolicy\":\n return {\n type: \"unsupportedPolicy\"\n };\n }\n}","/*\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\nimport invariant from \"tiny-invariant\";\nimport { createOsdkObject } from \"./convertWireToOsdkObjects/createOsdkObject.js\";\n\n/**\n * If interfaceApiName is not undefined, converts the instances of the\n * interface into their respective\n * underlying concrete types and then returns the $as() representation\n * for the consumers.\n *\n * Otherwise just does the conversion\n *\n * May mutate in place for performance reasons. If you need a clean copy,\n * keep it first.\n *\n * However, you must use the returned value, which will be whatever is correct.\n *\n * @internal\n * @param interfaceApiName - if undefined\n */\n\n/**\n * @internal\n */\nexport async function convertWireToOsdkObjects(client, objects, interfaceApiName, derivedPropertyTypeByName, propertySecurities, forceRemoveRid = false, selectedProps, strictNonNull = false, interfaceToObjectTypeMappings = {}, interfaceToObjectTypeMappingsV2 = {}) {\n fixObjectPropertiesInPlace(objects, forceRemoveRid);\n\n // prefer V2 mappings if non-empty, otherwise fall back to V1\n const effectiveMappings = Object.keys(interfaceToObjectTypeMappingsV2).length > 0 ? convertInterfaceToObjectTypeMappingsV2ToV1(interfaceToObjectTypeMappingsV2) : interfaceToObjectTypeMappings;\n const isInterfaceScoped = Object.keys(effectiveMappings).length > 0;\n const ret = [];\n for (const rawObj of objects) {\n const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);\n !objectDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing definition for '${rawObj.$apiName}'`) : invariant(false) : void 0;\n const interfaceToObjMapping = interfaceApiName && isInterfaceScoped ? effectiveMappings[interfaceApiName][rawObj.$apiName] : undefined;\n const ifaceSelected = interfaceApiName && interfaceToObjMapping ? selectedProps ? Object.keys(interfaceToObjMapping).filter(val => {\n selectedProps?.includes(interfaceToObjMapping[val]);\n }) : [...Object.values(interfaceToObjMapping), objectDef.primaryKeyApiName] : undefined;\n\n // default value for when we are checking an object\n let objProps;\n let conforming = true;\n if (interfaceApiName && ifaceSelected) {\n invariantInterfacesAsViews(objectDef, interfaceApiName, client);\n objProps = ifaceSelected;\n } else {\n objProps = selectedProps ?? Object.keys(objectDef.properties);\n }\n conforming &&= isConforming(client, objectDef, rawObj, objProps);\n if (strictNonNull === \"throw\" && !conforming) {\n throw new Error(\"Unable to safely convert objects as some non nullable properties are null\");\n } else if (strictNonNull === \"drop\" && !conforming) {\n continue;\n }\n let osdkObject = createOsdkObject(client, objectDef, rawObj, derivedPropertyTypeByName, propertySecurities);\n if (interfaceApiName && isInterfaceScoped) osdkObject = osdkObject.$as(interfaceApiName);\n ret.push(osdkObject);\n }\n return ret;\n}\nfunction isConforming(client, def, obj, propsToCheck) {\n for (const propName of propsToCheck) {\n if (propName in def.properties && def.properties[propName].nullable === false && obj[propName] == null) {\n if (process.env.NODE_ENV !== \"production\") {\n client.logger?.debug({\n obj: {\n $apiName: obj.$apiName,\n $objectType: obj.$objectType,\n $primaryKey: obj.$primaryKey\n }\n }, `Found object that does not conform to its definition. Expected ${def.apiName}'s ${propName} to not be null.`);\n }\n return false;\n }\n }\n return true;\n}\nfunction invariantInterfacesAsViews(objectDef, interfaceApiName, client) {\n if (objectDef.interfaceMap?.[interfaceApiName] == null) {\n const warning = \"Interfaces are only supported 'as views' but your metadata object is missing the correct information. This suggests your interfaces have not been migrated to the newer version yet and you cannot use this version of the SDK.\";\n if (client.logger) {\n client.logger.warn(warning);\n } else {\n // eslint-disable-next-line no-console\n console.error(`WARNING! ${warning}`);\n }\n throw new Error(warning);\n }\n}\nfunction fixObjectPropertiesInPlace(objs, forceRemoveRid) {\n for (const obj of objs) {\n if (forceRemoveRid) {\n delete obj.__rid;\n }\n if (obj.__rid) {\n obj.$rid = obj.__rid;\n delete obj.__rid;\n }\n if (obj.__score) {\n obj.$score = obj.__score;\n delete obj.__score;\n }\n\n // Backend returns as __apiName but we want to stick to $ structure\n obj.$apiName ??= obj.__apiName;\n\n // for now these are the same but when we start doing interface projections the $objectType will always be underlying and\n // the $apiName will be for the current view (in current designs)\n obj.$objectType = obj.$apiName;\n\n // copying over for now as its always returned. In the future, this should just be inferred from underlying\n obj.$primaryKey ??= obj.__primaryKey;\n obj.$title ??= obj.__title;\n\n // we don't want people to use these\n delete obj.__apiName;\n delete obj.__primaryKey;\n delete obj.__title;\n }\n}\n\n/**\n * Converts interfaceToObjectTypeMappingsV2 format to the V1 format.\n * V2 format: { interfaceProp: { type: \"localPropertyImplementation\", propertyApiName: \"objectProp\" } }\n * V1 format: { interfaceProp: \"objectProp\" }\n */\nfunction convertInterfaceToObjectTypeMappingsV2ToV1(mappingsV2) {\n return Object.fromEntries(Object.entries(mappingsV2).map(([interfaceApiName, objectTypeMappingsV2]) => [interfaceApiName, Object.fromEntries(Object.entries(objectTypeMappingsV2).map(([objectTypeName, propertyMappings]) => [objectTypeName, Object.fromEntries(Object.entries(propertyMappings).filter(([, impl]) => impl.type === \"localPropertyImplementation\").map(([interfaceProp, impl]) => [interfaceProp, impl.propertyApiName]))]))]));\n}","/*\n * Copyright 2024 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\n/**\n * A simple cache that can be used to store values for a given client.\n */\n\n/**\n * @internal\n * A simple async cache that can be used to store values for a given client.\n */\n\n/** @internal */\n\n/**\n * @internal\n * Create a new cache without a factory function.\n */\n\n/**\n * @internal\n * Create a new cache with a factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n */\n\nexport function createClientCache(fn) {\n const cache = new WeakMap();\n function get(client, key) {\n if (cache.get(client.clientCacheKey) == null) {\n cache.set(client.clientCacheKey, new Map());\n }\n const r = cache.get(client.clientCacheKey).get(key);\n if (r === undefined && fn !== undefined) {\n return set(client, key, fn(client, key));\n } else {\n return r;\n }\n }\n function set(client, key, value) {\n if (cache.get(client.clientCacheKey) == null) {\n cache.set(client.clientCacheKey, new Map());\n }\n cache.get(client.clientCacheKey).set(key, value);\n return value;\n }\n function remove(client, key) {\n if (cache.get(client.clientCacheKey) == null) return false;\n return cache.get(client.clientCacheKey).delete(key);\n }\n return {\n get,\n set,\n remove\n };\n}\n\n/** @internal */\n\n/**\n * @internal\n * Create a new cache with an async factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n * @returns\n */\nexport function createAsyncClientCache(fn, createCacheLocal = createClientCache) {\n const cache = createCacheLocal();\n const inProgress = createCacheLocal();\n const ret = {\n getOrUndefined: function getOrUndefined(client, key) {\n return cache.get(client, key);\n },\n get: async function get(client, key) {\n return cache.get(client, key) ?? inProgress.get(client, key) ?? ret.set(client, key, fn(client, key));\n },\n set: async function set(client, k, v) {\n // the `.set` happens first to prevent races.\n try {\n const r = await inProgress.set(client, k, v); // returns v\n\n cache.set(client, k, r);\n inProgress.remove(client, k);\n return r;\n } catch (e) {\n // we don't want to cache failures\n inProgress.remove(client, k);\n throw e;\n }\n }\n };\n return ret;\n}","/*\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 function deepFreeze(obj) {\n Object.getOwnPropertyNames(obj).forEach(name => {\n const prop = obj[name];\n if (typeof prop === \"object\" && prop != null && !Object.isFrozen(prop)) {\n deepFreeze(prop);\n }\n });\n return Object.freeze(obj);\n}","/*\n * Copyright 2024 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 * as ActionTypesV2 from \"@osdk/foundry.ontologies/ActionTypeV2\";\nexport async function loadActionMetadata(client, actionType) {\n const r = await ActionTypesV2.get(client, await client.ontologyRid, actionType, {\n branch: client.branch\n });\n const {\n wireActionTypeV2ToSdkActionMetadata\n } = await import(\"@osdk/generator-converters\");\n return wireActionTypeV2ToSdkActionMetadata(r);\n}","/*\n * Copyright 2024 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 * as ObjectTypesV2 from \"@osdk/foundry.ontologies/ObjectTypeV2\";\nexport async function loadFullObjectMetadata(client, objectType) {\n const full = await ObjectTypesV2.getFullMetadata(client, await client.ontologyRid, objectType, {\n preview: true,\n branch: client.branch\n });\n const {\n wireObjectTypeFullMetadataToSdkObjectMetadata\n } = await import(\"@osdk/generator-converters\");\n const ret = wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);\n return {\n ...ret\n };\n}","/*\n * Copyright 2024 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 * as OntologyInterfaces from \"@osdk/foundry.ontologies/OntologyInterface\";\nexport async function loadInterfaceMetadata(client, objectType) {\n const r = await OntologyInterfaces.get(client, await client.ontologyRid, objectType, {\n preview: true,\n branch: client.branch\n });\n const {\n wireInterfaceTypeV2ToSdkObjectDefinition\n } = await import(\"@osdk/generator-converters\");\n return wireInterfaceTypeV2ToSdkObjectDefinition(r, true);\n}","/*\n * Copyright 2024 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 * as QueryTypes from \"@osdk/foundry.ontologies/QueryType\";\nexport async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {\n const [apiName, version] = queryTypeApiNameAndVersion.split(\":\");\n const r = await QueryTypes.get(client, await client.ontologyRid, apiName, {\n version\n });\n const {\n wireQueryTypeV2ToSdkQueryMetadata\n } = await import(\"@osdk/generator-converters\");\n return wireQueryTypeV2ToSdkQueryMetadata(r);\n}","/*\n * Copyright 2024 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 { createAsyncClientCache } from \"../object/Cache.js\";\nimport { deepFreeze } from \"../util/deepFreeze.js\";\nimport { loadActionMetadata } from \"./loadActionMetadata.js\";\nimport { loadFullObjectMetadata } from \"./loadFullObjectMetadata.js\";\nimport { loadInterfaceMetadata } from \"./loadInterfaceMetadata.js\";\nimport { loadQueryMetadata } from \"./loadQueryMetadata.js\";\nimport { InterfaceDefinitions } from \"./OntologyProvider.js\";\nexport const createStandardOntologyProviderFactory = client => {\n return client => {\n async function loadObject(client, key) {\n const objectDef = await loadFullObjectMetadata(client, key);\n\n // ensure we have all of the interfaces loaded\n const interfaceDefs = Object.fromEntries((await Promise.all(objectDef.implements?.map(i => ret.getInterfaceDefinition(i)) ?? [])).map(i => [i.apiName, {\n def: i,\n handler: undefined\n }]));\n const fullObjectDef = {\n ...objectDef,\n [InterfaceDefinitions]: interfaceDefs\n };\n return deepFreeze(fullObjectDef);\n }\n async function loadInterface(client, key) {\n return deepFreeze(await loadInterfaceMetadata(client, key));\n }\n async function loadQuery(client, key) {\n return loadQueryMetadata(client, key);\n }\n async function loadAction(client, key) {\n const r = await loadActionMetadata(client, key);\n return r;\n }\n function makeGetter(fn) {\n const cache = createAsyncClientCache((client, key) => fn(client, key, false));\n return async apiName => {\n return await cache.get(client, apiName);\n };\n }\n function makeQueryGetter(client, fn) {\n const queryCache = createAsyncClientCache((client, key) => {\n return fn(client, key);\n });\n return async (apiName, version) => {\n const key = version ? `${apiName}:${version}` : apiName;\n return await queryCache.get(client, key);\n };\n }\n const ret = {\n getObjectDefinition: makeGetter(loadObject),\n getInterfaceDefinition: makeGetter(loadInterface),\n getActionDefinition: makeGetter(loadAction),\n getQueryDefinition: makeQueryGetter(client, loadQuery)\n };\n return ret;\n };\n};","/*\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 const USER_AGENT = `osdk-client/${process.env.PACKAGE_VERSION}`;\nexport const OBSERVABLE_USER_AGENT = `osdk-observable-client/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 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 { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { convertWireToOsdkObjects } from \"./object/convertWireToOsdkObjects.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { createStandardOntologyProviderFactory } from \"./ontology/StandardOntologyProvider.js\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n\n/** @internal */\nexport function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {\n if (process.env.NODE_ENV !== \"production\") {\n try {\n new URL(baseUrl);\n } catch (e) {\n const hint = !baseUrl.startsWith(\"http://\") || !baseUrl.startsWith(\"https://\") ? \". Did you forget to add 'http://' or 'https://'?\" : \"\";\n throw new Error(`Invalid stack URL: ${baseUrl}${hint}`);\n }\n }\n const minimalClient = {\n ...createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn, options.headers),\n objectSetFactory,\n objectFactory: convertWireToOsdkObjects,\n ontologyRid: metadata.ontologyRid,\n logger: options.logger,\n transactionId: options.transactionId,\n flushEdits: options.flushEdits,\n scenarioRid: options.scenarioRid,\n clientCacheKey: {},\n requestContext: {},\n branch: options.branch,\n narrowTypeInterfaceOrObjectMapping: {}\n };\n return Object.freeze(Object.assign(minimalClient, {\n ontologyProvider: createOntologyProviderFactory(options)(minimalClient)\n }));\n}","/*\n * Copyright 2024 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 { InterfaceDefinitions } from \"./ontology/OntologyProvider.js\";\n\n/** @internal */\nexport const fetchMetadataInternal = async (client, definition) => {\n if (definition.type === \"object\") {\n const {\n [InterfaceDefinitions]: interfaceDefs,\n ...objectTypeDef\n } = await client.ontologyProvider.getObjectDefinition(definition.apiName);\n return objectTypeDef;\n } else if (definition.type === \"interface\") {\n return client.ontologyProvider.getInterfaceDefinition(definition.apiName);\n } else if (definition.type === \"action\") {\n return client.ontologyProvider.getActionDefinition(definition.unsanitizedApiName ?? definition.apiName);\n } else if (definition.type === \"query\") {\n return client.ontologyProvider.getQueryDefinition(definition.apiName, definition.isFixedVersion ? definition.version : undefined);\n } else {\n throw new Error(\"Not implemented for given definition\");\n }\n};","/*\n * Copyright 2026 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 function makeMediaTransformation(transformation) {\n if (\"$image\" in transformation && transformation.$image != null) {\n const t = transformation.$image;\n return {\n type: \"image\",\n encoding: {\n type: t.$encoding\n },\n operations: t.$operations.map(convertImageOperation)\n };\n } else if (\"$video\" in transformation && transformation.$video != null) {\n const t = transformation.$video;\n return {\n type: \"video\",\n encoding: {\n type: t.$encoding\n },\n operation: convertVideoOperation(t.$operation)\n };\n } else if (\"$audio\" in transformation && transformation.$audio != null) {\n return {\n type: \"audio\",\n operation: convertAudioOperation(transformation.$audio.$operation)\n };\n } else if (\"$emailToText\" in transformation && transformation.$emailToText != null) {\n return {\n type: \"emailToText\",\n operation: convertEmailToTextOperation(transformation.$emailToText.$operation)\n };\n } else if (\"$spreadsheetToText\" in transformation && transformation.$spreadsheetToText != null) {\n return {\n type: \"spreadsheetToText\",\n operation: convertSpreadsheetToTextOperation(transformation.$spreadsheetToText.$operation)\n };\n } else if (\"$videoToAudio\" in transformation && transformation.$videoToAudio != null) {\n const t = transformation.$videoToAudio;\n return {\n type: \"videoToAudio\",\n encoding: convertAudioEncoding(t.$encoding),\n operation: convertVideoToAudioOperation(t.$operation)\n };\n } else if (\"$audioToText\" in transformation && transformation.$audioToText != null) {\n return {\n type: \"audioToText\",\n operation: convertAudioToTextOperation(transformation.$audioToText.$operation)\n };\n } else if (\"$emailToAttachment\" in transformation && transformation.$emailToAttachment != null) {\n return {\n type: \"emailToAttachment\",\n operation: convertEmailToAttachmentOperation(transformation.$emailToAttachment.$operation)\n };\n } else if (\"$videoToArchive\" in transformation && transformation.$videoToArchive != null) {\n const t = transformation.$videoToArchive;\n return {\n type: \"videoToArchive\",\n encoding: {\n type: t.$encoding\n },\n operation: convertVideoToArchiveOperation(t.$operation)\n };\n } else if (\"$videoToText\" in transformation && transformation.$videoToText != null) {\n return {\n type: \"videoToText\",\n operation: convertVideoToTextOperation(transformation.$videoToText.$operation)\n };\n } else if (\"$imageToText\" in transformation && transformation.$imageToText != null) {\n return {\n type: \"imageToText\",\n operation: convertImageToTextOperation(transformation.$imageToText.$operation)\n };\n } else if (\"$videoToImage\" in transformation && transformation.$videoToImage != null) {\n const t = transformation.$videoToImage;\n return {\n type: \"videoToImage\",\n encoding: {\n type: t.$encoding\n },\n operation: convertVideoToImageOperation(t.$operation)\n };\n } else if (\"$imageToDocument\" in transformation && transformation.$imageToDocument != null) {\n return {\n type: \"imageToDocument\",\n operation: convertImageToDocumentOperation(transformation.$imageToDocument.$operation)\n };\n } else if (\"$dicomToImage\" in transformation && transformation.$dicomToImage != null) {\n const t = transformation.$dicomToImage;\n return {\n type: \"dicomToImage\",\n encoding: {\n type: t.$encoding\n },\n operation: convertDicomToImageOperation(t.$operation)\n };\n } else if (\"$documentToDocument\" in transformation && transformation.$documentToDocument != null) {\n const t = transformation.$documentToDocument;\n return {\n type: \"documentToDocument\",\n encoding: {\n type: t.$encoding\n },\n operation: convertDocumentToDocumentOperation(t.$operation)\n };\n } else if (\"$documentToImage\" in transformation && transformation.$documentToImage != null) {\n const t = transformation.$documentToImage;\n return {\n type: \"documentToImage\",\n encoding: {\n type: t.$encoding\n },\n operation: convertDocumentToImageOperation(t.$operation)\n };\n } else if (\"$imageToEmbedding\" in transformation && transformation.$imageToEmbedding != null) {\n return {\n type: \"imageToEmbedding\",\n operation: convertImageToEmbeddingOperation(transformation.$imageToEmbedding.$operation)\n };\n } else {\n return {\n type: \"documentToText\",\n operation: convertDocumentToTextOperation(transformation.$documentToText.$operation)\n };\n }\n}\n\n// ─── Shared converters ──────────────────────────────────────────────────────\n\nfunction convertAudioEncoding(encoding) {\n if (typeof encoding === \"string\") {\n if (encoding === \"mp3\") {\n return {\n type: \"mp3\"\n };\n } else {\n return {\n type: \"ts\"\n };\n }\n }\n return {\n type: \"wav\",\n sampleRate: encoding.$wav.$sampleRate,\n audioChannelLayout: encoding.$wav.$audioChannelLayout != null ? {\n type: \"numberOfChannels\",\n numberOfChannels: encoding.$wav.$audioChannelLayout.$numberOfChannels\n } : undefined\n };\n}\nfunction convertPageRange(range) {\n return {\n startPageInclusive: range.$startPageInclusive,\n endPageExclusive: range.$endPageExclusive\n };\n}\nfunction convertOcrOutputFormat(fmt) {\n if (\"$hocr\" in fmt) {\n return {\n type: \"hocr\"\n };\n } else {\n return {\n type: \"text\"\n };\n }\n}\nfunction convertOcrLanguageOrScript(item) {\n if (\"$language\" in item && item.$language != null) {\n return {\n type: \"language\",\n language: item.$language\n };\n } else {\n const script = item.$script;\n return {\n type: \"script\",\n script\n };\n }\n}\nfunction convertOcrParameters(params) {\n return {\n outputFormat: convertOcrOutputFormat(params.$outputFormat),\n languages: params.$languages.map(convertOcrLanguageOrScript)\n };\n}\nfunction convertLayoutAwareExtractionParameters(params) {\n return {\n languages: params.$languages\n };\n}\nfunction convertDocumentTextExtractionConfig(config) {\n return {\n format: config.$format,\n mode: config.$mode,\n languages: config.$languages.map(convertOcrLanguageOrScript)\n };\n}\nfunction convertTranscribeOutputFormat(fmt) {\n if (\"$plainTextNoSegmentData\" in fmt && fmt.$plainTextNoSegmentData != null) {\n return {\n type: \"plainTextNoSegmentData\",\n addTimestamps: fmt.$plainTextNoSegmentData.$addTimestamps\n };\n } else if (\"$json\" in fmt) {\n return {\n type: \"json\"\n };\n } else {\n return {\n type: \"pttml\"\n };\n }\n}\nfunction convertLlmSpec(spec) {\n return {\n type: \"chat\",\n chat: {\n modelLocator: {\n type: \"apiName\",\n apiName: spec.$chat.$modelLocator\n },\n systemPrompt: spec.$chat.$systemPrompt,\n userPrompt: spec.$chat.$userPrompt,\n maxTokens: spec.$chat.$maxTokens\n }\n };\n}\nfunction convertVlmPreprocessingConfig(config) {\n if (\"$layoutAware\" in config && config.$layoutAware != null) {\n return {\n type: \"layoutAware\",\n layoutAware: {\n transformationConfig: convertDocumentTextExtractionConfig(config.$layoutAware.$transformationConfig),\n cropConfig: config.$layoutAware.$cropConfig != null ? {\n tablePrompt: config.$layoutAware.$cropConfig.$tablePrompt\n } : undefined\n }\n };\n } else {\n const ext = config.$extractText;\n return {\n type: \"extractText\",\n extractText: convertDocumentTextExtractionConfig(ext)\n };\n }\n}\nfunction convertImageSpec(spec) {\n return {\n resizingMode: spec.$resizingMode,\n height: spec.$height,\n width: spec.$width,\n mimeType: spec.$mimeType\n };\n}\n\n// ─── Operation converters ───────────────────────────────────────────────────\n\nfunction convertImageOperation(op) {\n if (\"$resize\" in op && op.$resize != null) {\n return {\n type: \"resize\",\n width: op.$resize.$width,\n height: op.$resize.$height,\n autoOrient: op.$resize.$autoOrient\n };\n } else if (\"$resizeToFitBoundingBox\" in op && op.$resizeToFitBoundingBox != null) {\n return {\n type: \"resizeToFitBoundingBox\",\n width: op.$resizeToFitBoundingBox.$width,\n height: op.$resizeToFitBoundingBox.$height\n };\n } else if (\"$rotate\" in op && op.$rotate != null) {\n return {\n type: \"rotate\",\n angle: op.$rotate.$angle\n };\n } else if (\"$crop\" in op && op.$crop != null) {\n return {\n type: \"crop\",\n xOffset: op.$crop.$xOffset,\n yOffset: op.$crop.$yOffset,\n width: op.$crop.$width,\n height: op.$crop.$height\n };\n } else if (\"$grayscale\" in op) {\n return {\n type: \"grayscale\"\n };\n } else {\n const tile = op.$tile;\n return {\n type: \"tile\",\n zoom: tile.$zoom,\n x: tile.$x,\n y: tile.$y\n };\n }\n}\nfunction convertVideoOperation(op) {\n if (\"$transcode\" in op) {\n return {\n type: \"transcode\"\n };\n } else {\n const chunk = op.$chunk;\n return {\n type: \"chunk\",\n chunkDurationMilliseconds: chunk.$chunkDurationMilliseconds,\n chunkIndex: chunk.$chunkIndex\n };\n }\n}\nfunction convertAudioOperation(op) {\n if (\"$channel\" in op && op.$channel != null) {\n return {\n type: \"channel\",\n encodeFormat: convertAudioEncoding(op.$channel.$encodeFormat),\n channel: op.$channel.$channel\n };\n } else if (\"$chunk\" in op && op.$chunk != null) {\n return {\n type: \"chunk\",\n encodeFormat: convertAudioEncoding(op.$chunk.$encodeFormat),\n chunkDurationMilliseconds: op.$chunk.$chunkDurationMilliseconds,\n chunkIndex: op.$chunk.$chunkIndex\n };\n } else {\n const convert = op.$convert;\n return {\n type: \"convert\",\n encodeFormat: convertAudioEncoding(convert.$encodeFormat)\n };\n }\n}\nfunction convertVideoToAudioOperation(_op) {\n return {\n type: \"extractAudio\"\n };\n}\nfunction convertAudioToTextOperation(op) {\n if (\"$transcribe\" in op && op.$transcribe != null) {\n return {\n type: \"transcribe\",\n language: op.$transcribe.$language,\n diarize: op.$transcribe.$diarize,\n outputFormat: op.$transcribe.$outputFormat != null ? convertTranscribeOutputFormat(op.$transcribe.$outputFormat) : undefined,\n performanceMode: op.$transcribe.$performanceMode\n };\n } else {\n const waveform = op.$waveform;\n return {\n type: \"waveform\",\n peaksPerSecond: waveform.$peaksPerSecond\n };\n }\n}\nfunction convertEmailToTextOperation(op) {\n return {\n type: \"getEmailBody\",\n outputFormat: op.$getEmailBody.$outputFormat\n };\n}\nfunction convertEmailToAttachmentOperation(op) {\n return {\n type: \"getEmailAttachment\",\n mimeType: op.$getEmailAttachment.$mimeType,\n attachmentIndex: op.$getEmailAttachment.$attachmentIndex\n };\n}\nfunction convertSpreadsheetToTextOperation(op) {\n return {\n type: \"convertSheetToJson\",\n sheetName: op.$convertSheetToJson.$sheetName\n };\n}\nfunction convertVideoToArchiveOperation(op) {\n return {\n type: \"extractSceneFrames\",\n encoding: {\n type: op.$extractSceneFrames.$encoding\n },\n sceneScore: op.$extractSceneFrames.$sceneScore\n };\n}\nfunction convertVideoToTextOperation(op) {\n return {\n type: \"getTimestampsForSceneFrames\",\n sceneScore: op.$getTimestampsForSceneFrames.$sceneScore\n };\n}\nfunction convertImageToTextOperation(op) {\n if (\"$extractLayoutAwareContent\" in op && op.$extractLayoutAwareContent != null) {\n return {\n type: \"extractLayoutAwareContent\",\n parameters: convertLayoutAwareExtractionParameters(op.$extractLayoutAwareContent.$parameters)\n };\n } else {\n const ocr = op.$ocr;\n return {\n type: \"ocr\",\n parameters: convertOcrParameters(ocr.$parameters)\n };\n }\n}\nfunction convertVideoToImageOperation(op) {\n if (\"$extractFirstFrame\" in op && op.$extractFirstFrame != null) {\n return {\n type: \"extractFirstFrame\",\n height: op.$extractFirstFrame.$height,\n width: op.$extractFirstFrame.$width\n };\n } else {\n const ext = op.$extractFramesAtTimestamps;\n return {\n type: \"extractFramesAtTimestamps\",\n height: ext.$height,\n width: ext.$width,\n timestamp: ext.$timestamp\n };\n }\n}\nfunction convertImageToDocumentOperation(_op) {\n return {\n type: \"createPdf\"\n };\n}\nfunction convertDicomToImageOperation(op) {\n return {\n type: \"renderImageLayer\",\n layerNumber: op.$renderImageLayer.$layerNumber,\n height: op.$renderImageLayer.$height,\n width: op.$renderImageLayer.$width\n };\n}\nfunction convertDocumentToDocumentOperation(op) {\n if (\"$slicePdfRange\" in op && op.$slicePdfRange != null) {\n return {\n type: \"slicePdfRange\",\n startPageInclusive: op.$slicePdfRange.$startPageInclusive,\n endPageExclusive: op.$slicePdfRange.$endPageExclusive,\n strictlyEnforceEndPage: op.$slicePdfRange.$strictlyEnforceEndPage\n };\n } else {\n return {\n type: \"convertDocument\"\n };\n }\n}\nfunction convertDocumentToImageOperation(op) {\n if (\"$renderPage\" in op && op.$renderPage != null) {\n return {\n type: \"renderPage\",\n pageNumber: op.$renderPage.$pageNumber,\n height: op.$renderPage.$height,\n width: op.$renderPage.$width\n };\n } else {\n const bb = op.$renderPageToFitBoundingBox;\n return {\n type: \"renderPageToFitBoundingBox\",\n pageNumber: bb.$pageNumber,\n width: bb.$width,\n height: bb.$height\n };\n }\n}\nfunction convertImageToEmbeddingOperation(op) {\n return {\n type: \"generateEmbedding\",\n modelId: op.$generateEmbedding.$modelId\n };\n}\nfunction convertDocumentToTextOperation(op) {\n if (\"$extractAllText\" in op) {\n return {\n type: \"extractAllText\"\n };\n } else if (\"$extractTableOfContents\" in op) {\n return {\n type: \"extractTableOfContents\"\n };\n } else if (\"$getPdfPageDimensions\" in op) {\n return {\n type: \"getPdfPageDimensions\"\n };\n } else if (\"$extractFormFields\" in op) {\n return {\n type: \"extractFormFields\"\n };\n } else if (\"$extractUnstructuredTextFromPage\" in op && op.$extractUnstructuredTextFromPage != null) {\n return {\n type: \"extractUnstructuredTextFromPage\",\n pageNumber: op.$extractUnstructuredTextFromPage.$pageNumber\n };\n } else if (\"$extractTextFromPagesToArray\" in op && op.$extractTextFromPagesToArray != null) {\n return {\n type: \"extractTextFromPagesToArray\",\n startPage: op.$extractTextFromPagesToArray.$startPage,\n endPage: op.$extractTextFromPagesToArray.$endPage\n };\n } else if (\"$ocrOnPage\" in op && op.$ocrOnPage != null) {\n return {\n type: \"ocrOnPage\",\n pageNumber: op.$ocrOnPage.$pageNumber,\n parameters: convertOcrParameters(op.$ocrOnPage.$parameters)\n };\n } else if (\"$ocrOnPages\" in op && op.$ocrOnPages != null) {\n return {\n type: \"ocrOnPages\",\n pageNumber: op.$ocrOnPages.$pageNumber,\n parameters: convertOcrParameters(op.$ocrOnPages.$parameters)\n };\n } else if (\"$extractLayoutAwareContent\" in op && op.$extractLayoutAwareContent != null) {\n return {\n type: \"extractLayoutAwareContent\",\n parameters: convertLayoutAwareExtractionParameters(op.$extractLayoutAwareContent.$parameters)\n };\n } else if (\"$extractLayoutAwareTextV2\" in op && op.$extractLayoutAwareTextV2 != null) {\n return {\n type: \"extractLayoutAwareTextV2\",\n pageRange: op.$extractLayoutAwareTextV2.$pageRange != null ? convertPageRange(op.$extractLayoutAwareTextV2.$pageRange) : undefined,\n config: convertDocumentTextExtractionConfig(op.$extractLayoutAwareTextV2.$config)\n };\n } else if (\"$extractTextV2\" in op && op.$extractTextV2 != null) {\n return {\n type: \"extractTextV2\",\n pageRange: op.$extractTextV2.$pageRange != null ? convertPageRange(op.$extractTextV2.$pageRange) : undefined,\n config: convertDocumentTextExtractionConfig(op.$extractTextV2.$config)\n };\n } else {\n const vlm = op.$extractVlmText;\n return {\n type: \"extractVlmText\",\n llmSpec: convertLlmSpec(vlm.$llmSpec),\n preprocessingConfiguration: vlm.$preprocessingConfiguration != null ? convertVlmPreprocessingConfig(vlm.$preprocessingConfiguration) : undefined,\n imageSpec: vlm.$imageSpec != null ? convertImageSpec(vlm.$imageSpec) : undefined,\n outputFormat: vlm.$outputFormat,\n pageRange: vlm.$pageRange != null ? convertPageRange(vlm.$pageRange) : undefined\n };\n }\n}","/*\n * Copyright 2024 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 { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference, __EXPERIMENTAL__NOT_SUPPORTED_YET__executeStreamingFunction, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet, __EXPERIMENTAL__NOT_SUPPORTED_YET__transformAndWait } from \"@osdk/api/unstable\";\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { applyAction } from \"./actions/applyAction.js\";\nimport { additionalContext } from \"./Client.js\";\nimport { createMinimalClient } from \"./createMinimalClient.js\";\nimport { fetchMetadataInternal } from \"./fetchMetadata.js\";\nimport { makeMediaTransformation } from \"./internal/conversions/makeMediaTransformation.js\";\nimport { MinimalLogger } from \"./logger/MinimalLogger.js\";\nimport { fetchPage, fetchStaticRidPage } from \"./object/fetchPage.js\";\nimport { fetchSingle } from \"./object/fetchSingle.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { ObjectSetListenerWebsocket } from \"./objectSet/ObjectSetListenerWebsocket.js\";\nimport { applyQuery } from \"./queries/applyQuery.js\";\n\n// We import it this way to keep compatible with CJS. If we referenced the\n// value of `symbolClientContext` directly, then we would have to a dynamic import\n// in `createClientInternal` which would make it async and a break.\n// Since this is just a string in `@osdk/shared.client2` instead of a symbol,\n// we can safely perform this trick.\n\nclass ActionInvoker {\n constructor(clientCtx, actionDef) {\n // We type the property as a generic function as binding `applyAction`\n // doesn't return a type thats all that useful anyway\n // The implements covers us for the most part here as this exact type doesn't\n // escape this file\n this.applyAction = applyAction.bind(undefined, clientCtx, actionDef);\n this.batchApplyAction = applyAction.bind(undefined, clientCtx, actionDef);\n }\n}\nclass QueryInvoker {\n constructor(clientCtx, queryDef) {\n this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);\n }\n}\n\n/** @internal */\nexport function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, baseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {\n if (typeof ontologyRid === \"string\") {\n if (!ontologyRid.startsWith(\"ri.\")) {\n throw new Error(\"Invalid ontology RID\");\n }\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ontologyRid.then(ontologyRid => {\n if (!ontologyRid.startsWith(\"ri.\")) {\n // FIXME this promise is not await so this just shows up as an unhandled promise rejection\n throw new Error(\"Invalid ontology RID\");\n }\n });\n }\n const clientCtx = createMinimalClient({\n ontologyRid\n }, baseUrl, tokenProvider, {\n ...options,\n logger: options?.logger ?? new MinimalLogger(),\n transactionId: transactionRid,\n flushEdits,\n scenarioRid,\n branch: options?.UNSTABLE_DO_NOT_USE_BRANCH\n }, fetchFn, objectSetFactory);\n return createClientFromContext(clientCtx);\n}\n\n/**\n * @internal\n */\nexport function createClientFromContext(clientCtx) {\n function clientFn(o) {\n if (o.type === \"object\" || o.type === \"interface\") {\n return clientCtx.objectSetFactory(o, clientCtx);\n } else if (o.type === \"action\") {\n return new ActionInvoker(clientCtx, o); // then as any for dealing with the conditional return value\n } else if (o.type === \"query\") {\n return new QueryInvoker(clientCtx, o);\n } else if (o.type === \"experiment\") {\n switch (o.name) {\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__executeStreamingFunction.name:\n return {\n async *executeStreamingFunction(query, params) {\n const {\n applyStreamingQuery\n } = await import(\"./queries/applyStreamingQuery.js\");\n yield* applyStreamingQuery(clientCtx, query, params);\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks.name:\n return {\n async *getBulkLinks(objs, linkTypes) {\n const {\n createBulkLinksAsyncIterFactory\n } = await import(\"./__unstable/createBulkLinksAsyncIterFactory.js\");\n yield* createBulkLinksAsyncIterFactory(clientCtx)(objs, linkTypes);\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:\n return {\n fetchOneByRid: async (objectType, rid, options) => {\n return await fetchSingle(clientCtx, objectType, options, createWithRid([rid]));\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:\n return {\n createMediaReference: async args => {\n const {\n data,\n fileName,\n objectType,\n propertyType\n } = args;\n const {\n upload\n } = await import(\"@osdk/foundry.ontologies/MediaReferenceProperty\");\n return await upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {\n mediaItemPath: fileName,\n preview: true\n });\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:\n return {\n fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {\n return await fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));\n },\n fetchPageByRidNoType: async (rids, options) => {\n return await fetchStaticRidPage(clientCtx, rids, options ?? {});\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:\n return {\n subscribeToNoTypeObjectSet: (rid, listener, opts) => {\n const unsubscribe = ObjectSetListenerWebsocket.getInstance(clientCtx).subscribeWithoutType({\n type: \"reference\",\n reference: rid\n }, listener, opts?.includeRid ?? false);\n return {\n unsubscribe\n };\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__transformAndWait.name:\n return {\n transformAndWait: async args => {\n const {\n transformAndWaitInternal\n } = await import(\"./util/transformAndWaitInternal.js\");\n const {\n mediaSetRid,\n mediaItemRid,\n token\n } = args.mediaReference.reference.mediaSetViewItem;\n return transformAndWaitInternal(clientCtx, mediaSetRid, mediaItemRid, makeMediaTransformation(args.transformation), token, args.options);\n }\n };\n }\n throw new Error(\"not implemented\");\n } else {\n throw new Error(\"not implemented\");\n }\n }\n const fetchMetadata = fetchMetadataInternal.bind(undefined, clientCtx);\n const symbolClientContext = \"__osdkClientContext\";\n const client = Object.defineProperties(clientFn, {\n [oldSymbolClientContext]: {\n value: clientCtx\n },\n [symbolClientContext]: {\n value: clientCtx\n },\n [additionalContext]: {\n value: clientCtx\n },\n fetchMetadata: {\n value: fetchMetadata\n }\n });\n return client;\n}\n\n/**\n * Creates a {@link Client} for interacting with a Foundry Ontology. This is the primary entry point for\n * the OSDK and is typically called once per application during setup. The returned client is then used\n * to load object sets, apply actions, and execute queries against the configured ontology.\n * @param baseUrl - The base URL of the Foundry stack (e.g. `\"https://example.palantirfoundry.com\"`).\n * @param ontologyRid - The ontology RID to scope the client to. May be provided directly or as a `Promise`\n * that resolves to the RID. Typically the generated `$ontologyRid` export from your generated SDK is passed here.\n * @param tokenProvider - A function returning a `Promise` that resolves to a bearer token used to authenticate\n * requests. Typically the OAuth client returned by `createPublicOauthClient` or `createConfidentialOauthClient`\n * from `@osdk/oauth`, which handles caching and refresh; you can also provide a custom function if you\n * manage tokens yourself.\n * @param options - Optional client configuration: a custom `logger`, an experimental `UNSTABLE_DO_NOT_USE_BRANCH`\n * for branch-aware requests, and additional `headers` to include on every request.\n * @param fetchFn - An optional `fetch` implementation to use for all requests. Defaults to the global `fetch`.\n * @example\n * ```ts\n * import { createClient, type Client } from \"@osdk/client\";\n * import { createPublicOauthClient } from \"@osdk/oauth\";\n * import { $ontologyRid } from \"./generatedNoCheck/index.js\";\n *\n * const auth = createPublicOauthClient(\n * \"<your-client-id>\",\n * \"https://example.palantirfoundry.com\",\n * `${window.location.origin}/auth/callback`,\n * );\n *\n * export const client: Client = createClient(\n * \"https://example.palantirfoundry.com\",\n * $ontologyRid,\n * auth,\n * );\n * ```\n * @returns a {@link Client} configured to talk to the given Foundry stack and ontology\n */\nexport const createClient = createClientInternal.bind(undefined, createObjectSet, undefined, undefined, undefined);\nexport const createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(createObjectSet, transactionRid, flushEdits, undefined, ...args);\n\n/** @internal */\nexport const createClientWithScenario = (scenarioRid, ...args) => createClientInternal(createObjectSet, undefined, undefined, scenarioRid, ...args);\nfunction createWithRid(rids) {\n const withRid = {\n type: \"static\",\n \"objects\": rids\n };\n return withRid;\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/actions/ActionValidationError.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyScenario.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js","../../src/scenarios/ScenarioClient.ts","../../src/util/isOntologyObjectV2.ts","../../src/util/toDataValue.ts","../../src/actions/applyAction.ts","../../src/util/timeseriesUtils.ts","../../src/createGeotimeSeriesProperty.ts","../../src/createMediaReferenceProperty.ts","../../src/createTimeseriesProperty.ts","../../src/object/formatting/formatBoolean.ts","../../src/object/formatting/propertyFormattingUtils.ts","../../src/object/formatting/formatDateTime.ts","../../src/object/formatting/formatNumber.ts","../../src/object/formatting/applyPropertyFormatter.ts","../../src/ontology/OntologyProvider.ts","../../src/object/convertWireToOsdkObjects/InternalSymbols.ts","../../src/object/convertWireToOsdkObjects/getDollarLink.ts","../../src/object/convertWireToOsdkObjects/createOsdkInterface.ts","../../src/object/convertWireToOsdkObjects/getDollarAs.ts","../../src/object/convertWireToOsdkObjects/createOsdkObject.ts","../../src/object/convertWireToOsdkObjects.ts","../../src/object/Cache.ts","../../src/util/deepFreeze.ts","../../src/ontology/loadActionMetadata.ts","../../src/ontology/loadFullObjectMetadata.ts","../../src/ontology/loadInterfaceMetadata.ts","../../src/ontology/loadQueryMetadata.ts","../../src/ontology/StandardOntologyProvider.ts","../../src/util/UserAgent.ts","../../src/createMinimalClient.ts","../../src/fetchMetadata.ts","../../src/internal/conversions/makeMediaTransformation.ts","../../src/createClient.ts"],"names":["foundryPlatformFetch","_get","get","__export","additionalContext","isAttachmentUpload","isAttachmentFile","value","upload","isMediaUpload","MediaSet_exports","isMedia","isMediaReference","isObjectSpecifiersObject","isWireObjectSet","isObjectSet","getWireObjectSet","isInterfaceActionParam","addUserAgentAndRequestContextHeaders","augmentRequestContext","invariant","TimeseriesDurationMapping","parseStreamedResponse","iterateReadableStream","getMediaContent","getMediaMetadata","validateMediaItemMetadata","fetchSingle","fetchSingleWithErrors","extractNamespace","createSimpleCache","createObjectSpecifierFromPrimaryKey","hydrateAttachmentFromRidInternal","client","createObjectSet","createSharedClientContext","applyQuery","ontologyRid","MinimalLogger","__EXPERIMENTAL__NOT_SUPPORTED_YET__executeStreamingFunction","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","fetchPage","fetchStaticRidPage","__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet","ObjectSetListenerWebsocket","__EXPERIMENTAL__NOT_SUPPORTED_YET__transformAndWait","symbolClientContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBO,IAAM,qBAAA,GAAN,cAAoC,KAAA,CAAM;AAAA,EAC/C,YAAY,UAAA,EAAY;AACtB,IAAA,KAAA,CAAM,uBAAuB,IAAA,CAAK,SAAA,CAAU,UAAA,EAAY,IAAA,EAAM,CAAC,CAAC,CAAA;AAChE,IAAA,IAAA,CAAK,UAAA,GAAa,UAAA;AAAA,EACpB;AACF;;;ACJA,IAAM,MAAA,GAAS,CAAC,CAAA,EAAG,sCAAA,EAAwC,CAAC,CAAA;AAkBrD,SAAS,KAAA,CAAM,SAAS,IAAA,EAAM;AACnC,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,MAAA,EAAQ,GAAG,IAAI,CAAA;AACpD;AAmBA,IAAM,WAAA,GAAc,CAAC,CAAA,EAAG,2CAAA,EAA6C,CA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,IAAA,EAAM;AAC3B,EAAA,MAAM,OAAA,GAAU;AAAA,IACd,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-53ODHT6J.cjs","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 class ActionValidationError extends Error {\n constructor(validation) {\n super(\"Validation Error: \" + JSON.stringify(validation, null, 2));\n this.validation = validation;\n }\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _apply = [1, \"/v2/ontologies/{0}/actions/{1}/apply\", 7];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Note that a 200 HTTP status code only indicates that the request was received and processed by the server.\n * See the validation result in the response body to determine if the action was applied successfully.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/apply\n */\nexport function apply($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _apply, ...args);\n}\nconst _applyAsync = [1, \"/v2/ontologies/{0}/actions/{1}/applyAsync\", 7];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyAsync\n */\nexport function applyAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyAsync, ...args);\n}\nconst _applyBatch = [1, \"/v2/ontologies/{0}/actions/{1}/applyBatch\", 3];\n/**\n * Applies multiple actions (of the same Action Type) using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not\n * call Functions may receive a higher limit.\n *\n * Note that [notifications](https://www.palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyBatch\n */\nexport function applyBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyBatch, ...args);\n}\nconst _applyWithOverrides = [1, \"/v2/ontologies/{0}/actions/{1}/applyWithOverrides\", 3];\n/**\n * Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and\n * CurrentTime generated action parameters.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyWithOverrides\n */\nexport function applyWithOverrides($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyWithOverrides, ...args);\n}\nconst _applyBatchWithOverrides = [1, \"/v2/ontologies/{0}/actions/{1}/applyBatchWithOverrides\", 3];\n/**\n * Applies multiple actions (of the same Action Type) with per-item overrides\n * for UniqueIdentifier and CurrentTime generated action parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not\n * call Functions may receive a higher limit.\n *\n * Note that [notifications](https://www.palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyBatchWithOverrides\n */\nexport function applyBatchWithOverrides($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyBatchWithOverrides, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/actionTypes\", 2];\n/**\n * Lists the action types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/actionTypes/{1}\", 2];\n/**\n * Gets a specific action type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/{actionType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/ontologies/{0}/actionTypes/byRid/{1}\", 2];\n/**\n * Gets a specific action type with the given RID.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid}\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/ontologies/{0}/actionTypes/getByRidBatch\", 3];\n/**\n * Gets a list of action types by RID in bulk.\n *\n * Action types are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/objectTypes\", 2];\n/**\n * Lists the object types for the given Ontology.\n *\n * Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are\n * more results available, at least one result will be present in the\n * response.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectTypes/{1}\", 2];\n/**\n * Gets a specific object type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/ontologies/{0}/objectTypes/getByRidBatch\", 3];\n/**\n * Gets a list of object types by RID in bulk.\n *\n * Object types are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}\nconst _getFullMetadata = [0, \"/v2/ontologies/{0}/objectTypes/{1}/fullMetadata\", 2];\n/**\n * Gets the full metadata for a specific object type with the given API name.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata\n */\nexport function getFullMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFullMetadata, ...args);\n}\nconst _getEditsHistory = [1, \"/v2/ontologies/{0}/objectTypes/{1}/editsHistory\", 3];\n/**\n * Returns the history of edits (additions, modifications, deletions) for objects of a\n * specific object type. This endpoint provides visibility into all actions that have\n * modified objects of this type.\n *\n * The edits are returned in reverse chronological order (most recent first) by default.\n *\n * Note that filters are ignored for OSv1 object types.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/editsHistory\n */\nexport function getEditsHistory($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getEditsHistory, ...args);\n}\nconst _listOutgoingLinkTypes = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing links for an object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes\n */\nexport function listOutgoingLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingLinkTypes, ...args);\n}\nconst _getOutgoingLinkType = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes/{2}\", 2];\n/**\n * Get an outgoing link for an object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}\n */\nexport function getOutgoingLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);\n}\nconst _getOutgoingLinkTypesByObjectTypeRidBatch = [1, \"/v2/ontologies/{0}/outgoingLinkTypes/getByRidBatch\", 3];\n/**\n * Gets outgoing link types for a batch of object types, identified by their RIDs.\n *\n * For each requested object type, returns the list of outgoing link types visible to the\n * requesting token. Optionally, results can be filtered to only include specific link type RIDs.\n *\n * Object types that don't exist or that the requesting token lacks permissions for are\n * silently omitted from the response.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/outgoingLinkTypes/getByRidBatch\n */\nexport function getOutgoingLinkTypesByObjectTypeRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingLinkTypesByObjectTypeRidBatch, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/interfaceTypes\", 2];\n/**\n * Lists the interface types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}\", 2];\n/**\n * Gets a specific interface type with the given API name.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _listObjectsForInterface = [0, \"/v2/ontologies/{0}/interfaces/{1}\", 2];\n/**\n * Lists the objects for the given Ontology and interface type.\n *\n * Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or\n * repeated objects in the response pages.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Each page may be smaller or larger than the requested page size. However, it\n * is guaranteed that if there are more results available, at least one result will be present\n * in the response.\n *\n * Note that null value properties will not be returned.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}\n */\nexport function listObjectsForInterface($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listObjectsForInterface, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/interfaces/{1}/search\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object\n * sets.\n * :::\n * Search for objects in the specified ontology and interface type. Any properties specified in the \"where\" or\n * \"orderBy\" parameters must be shared property type API names defined on the interface. The following search\n * queries are supported:\n *\n * | Query type | Description | Supported Types |\n * |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------|\n * | lt | The provided property is less than the provided value. | number, string, date, timestamp |\n * | gt | The provided property is greater than the provided value. | number, string, date, timestamp |\n * | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp |\n * | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp |\n * | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp |\n * | isNull | The provided property is (or is not) null. | all |\n * | contains | The provided property contains the provided value. | array |\n * | not | The sub-query does not match. | N/A (applied on a query) |\n * | and | All the sub-queries match. | N/A (applied on queries) |\n * | or | At least one of the sub-queries match. | N/A (applied on queries) |\n * | startsWith | The provided property starts with the provided term. | string |\n * | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string |\n * | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string |\n * | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string |\n * | containsAllTerms | The provided property contains all the terms separated by whitespace. | string |\n *\n * Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'\"~`). Periods (`.`) on their own are ignored.\n * Partial terms are not matched by terms filters except where explicitly noted.\n *\n * Attempting to use an unsupported query will result in a validation error. Third-party applications using this\n * endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/interfaces/{1}/aggregate\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object\n * sets.\n * :::\n * Perform functions on object fields in the specified ontology and of the specified interface type. Any\n * properties specified in the query must be shared property type API names defined on the interface.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\n}\nconst _listOutgoingInterfaceLinkTypes = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing interface link types for an interface type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes\n */\nexport function listOutgoingInterfaceLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingInterfaceLinkTypes, ...args);\n}\nconst _getOutgoingInterfaceLinkType = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes/{2}\", 2];\n/**\n * Get an outgoing interface link type for an interface type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType}\n */\nexport function getOutgoingInterfaceLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingInterfaceLinkType, ...args);\n}\nconst _listInterfaceLinkedObjects = [0, \"/v2/ontologies/{0}/interfaces/{1}/{2}/{3}/links/{4}\", 2];\n/**\n * Lists the linked objects for a specific object and the given interface link type.\n *\n * Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or\n * repeated objects in the response pages.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Each page may be smaller or larger than the requested page size. However, it\n * is guaranteed that if there are more results available, at least one result will be present\n * in the response.\n *\n * Note that null value properties will not be returned.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType}\n */\nexport function listInterfaceLinkedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listInterfaceLinkedObjects, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _createScenario = [1, \"/v2/ontologies/{0}/scenarios/create\", 3];\n/**\n * Creates an ontology scenario.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/scenarios/create\n */\nexport function createScenario($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _createScenario, ...args);\n}\nconst _listScenarioEditedObjectTypes = [0, \"/v2/ontologies/{0}/scenarios/{1}/objectTypes/edited\", 2];\n/**\n * Returns the list of object type API names that have been modified within a given scenario.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/objectTypes/edited\n */\nexport function listScenarioEditedObjectTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedObjectTypes, ...args);\n}\nconst _listScenarioEditedLinkTypes = [0, \"/v2/ontologies/{0}/scenarios/{1}/objectTypes/{2}/outgoingLinkTypes/edited\", 2];\n/**\n * Returns the list of outgoing links that have been modified within a given scenario for an object type.\n *\n * Note that only many-to-many link type are returned by this endpoint. One-to-many link type edits are\n * surfaced as object edits on the object type that owns the foreign key property.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/objectTypes/{objectType}/outgoingLinkTypes/edited\n */\nexport function listScenarioEditedLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedLinkTypes, ...args);\n}\nconst _listScenarioEditedEntityTypes = [0, \"/v2/ontologies/{0}/scenarios/{1}/editedEntityTypes\", 2];\n/**\n * Returns the object types and link types that have been modified within a given scenario.\n *\n * The response contains the list of object type API names that have been modified, and the list of\n * many-to-many link types that have been modified, grouped by their source object type. One-to-many\n * link type edits are surfaced as object edits on the object type that owns the foreign key property.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/editedEntityTypes\n */\nexport function listScenarioEditedEntityTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedEntityTypes, ...args);\n}\nconst _listScenarioEditedObjects = [0, \"/v2/ontologies/{0}/scenarios/{1}/objects/{2}/edited\", 2];\n/**\n * Returns the list of objects that have been edited within a given scenario for a specific object type.\n * Only objects that the user has permission to view are returned.\n *\n * Each page may be smaller than the requested page size.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/objects/{objectType}/edited\n */\nexport function listScenarioEditedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedObjects, ...args);\n}\nconst _listScenarioEditedLinks = [0, \"/v2/ontologies/{0}/scenarios/{1}/objects/{2}/links/{3}/edited\", 2];\n/**\n * Returns the list of edited links within a given scenario for a specific object type and link type, grouped\n * by source object. Only works for many-to-many link types. Only links where the user has permission to view\n * both objects are returned.\n *\n * Each page may be smaller than the requested page size.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/scenarios/{scenarioRid}/objects/{objectType}/links/{linkType}/edited\n */\nexport function listScenarioEditedLinks($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listScenarioEditedLinks, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/queryTypes\", 2];\n/**\n * Lists the query types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/queryTypes/{1}\", 2];\n/**\n * Gets a specific query type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getFirstPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint\", 2];\n/**\n * Get the first point of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint\n */\nexport function getFirstPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFirstPoint, ...args);\n}\nconst _getLastPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/lastPoint\", 2];\n/**\n * Get the last point of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint\n */\nexport function getLastPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLastPoint, ...args);\n}\nconst _streamPoints = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamPoints\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints\n */\nexport function streamPoints($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamPoints, ...args);\n}","/*\n * Copyright 2024 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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getLatestValue = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/latestValue\", 2];\n/**\n * Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue\n */\nexport function getLatestValue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLatestValue, ...args);\n}\nconst _streamValues = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamValues\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property (this includes geotime series references).\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues\n */\nexport function streamValues($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamValues, ...args);\n}","/*\n * Copyright 2026 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 { OntologyScenarios } from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\nimport { createClientWithScenario } from \"../createClient.js\";\n\n/**\n * The set of many-to-many link types modified within a scenario for one source object type. Returned as part of\n * {@link ScenarioEditedEntityTypes.linkTypes}.\n */\n\n/**\n * The object types and link types that have been modified within a scenario. Only many-to-many link type edits are\n * surfaced via `linkTypes`; one-to-many edits surface as object edits on the object type that owns the foreign key\n * property.\n */\n\n/**\n * A page of edited object identifiers within a scenario for a given object type. Returned by\n * {@link EXPERIMENTAL_ScenarioClient.getEditedEntities}. To load full property values, pass the primary keys back\n * through the scenario client, e.g.\n * `scenario(MyObject).where({ $primaryKey: { $in: keys } }).fetchPage()`.\n */\n\n/**\n * A page of directed link instances edited within a scenario for a given source object type and link api name.\n * Returned by {@link EXPERIMENTAL_ScenarioClient.getEditedLinks}. Source and target carry only `$primaryKey` + `$apiName`.\n */\n\n/**\n * A {@link Client} attached to an ontology scenario. All read and write operations performed via this client are\n * scoped to that scenario. `EXPERIMENTAL_ScenarioClient` is a superset of {@link Client}.\n *\n * @beta This is an experimental, unstable feature subject to change.\n */\n\nexport function isScenarioClient(value) {\n return value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof value.getScenarioReference === \"function\";\n}\n\n/**\n * Shared internal builder used by both {@link withScenario} and {@link createScenario}. Throws if the parent client\n * is already inside a scenario. If the parent client has an active transaction, the transaction is ignored (a warning\n * is logged) and the client is scoped to the scenario instead. Constructs a fresh {@link Client} via\n * `createClientWithScenario` and decorates it with {@link EXPERIMENTAL_ScenarioClient}-only methods.\n *\n * @internal\n */\nexport function buildScenarioClient(parent, scenarioRid) {\n const ctx = parent[additionalContext];\n if (ctx.transactionId != null) {\n // eslint-disable-next-line no-console\n console.warn(\"withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.\");\n }\n if (ctx.scenarioRid != null) {\n throw new Error(\"withScenario / createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.\");\n }\n const inner = createClientWithScenario(scenarioRid, ctx.baseUrl, ctx.ontologyRid, ctx.tokenProvider, {\n logger: ctx.logger,\n UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch\n }, ctx.fetch);\n const innerCtx = inner[additionalContext];\n async function getEditedEntityTypes() {\n const ontologyRid = await innerCtx.ontologyRid;\n const response = await OntologyScenarios.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {\n preview: true\n });\n return {\n objectTypes: response.objectTypes,\n linkTypes: response.linkTypes\n };\n }\n async function getEditedEntities(objectType, options) {\n const ontologyRid = await innerCtx.ontologyRid;\n const response = await OntologyScenarios.listScenarioEditedObjects(innerCtx, ontologyRid, scenarioRid, objectType.apiName, {\n pageSize: options?.pageSize,\n pageToken: options?.pageToken,\n preview: true\n });\n const data = response.data.map(entry => {\n const wire = entry;\n return {\n $apiName: wire.__apiName,\n $primaryKey: wire.__primaryKey\n };\n });\n return {\n data,\n nextPageToken: response.nextPageToken\n };\n }\n async function* editedEntitiesAsyncIter(objectType, options) {\n const seen = new Set();\n let pageToken;\n do {\n const page = await getEditedEntities(objectType, {\n pageSize: options?.pageSize,\n pageToken\n });\n for (const obj of page.data) {\n const key = obj.$primaryKey;\n if (seen.has(key)) continue;\n seen.add(key);\n yield obj;\n }\n pageToken = page.nextPageToken;\n } while (pageToken != null);\n }\n async function getEditedLinkTypes(sourceObjectType) {\n const ontologyRid = await innerCtx.ontologyRid;\n const response = await OntologyScenarios.listScenarioEditedLinkTypes(innerCtx, ontologyRid, scenarioRid, sourceObjectType.apiName, {\n preview: true\n });\n return response.data;\n }\n async function getEditedLinks(sourceObjectType, linkType, options) {\n const ontologyRid = await innerCtx.ontologyRid;\n const response = await OntologyScenarios.listScenarioEditedLinks(innerCtx, ontologyRid, scenarioRid, sourceObjectType.apiName, linkType, {\n pageSize: options?.pageSize,\n pageToken: options?.pageToken,\n preview: true\n });\n const data = [];\n for (const entry of response.data) {\n const sourceWire = entry.sourceObject;\n if (sourceWire?.__apiName == null || sourceWire.__primaryKey == null) {\n continue;\n }\n const source = {\n $apiName: sourceWire.__apiName,\n $primaryKey: sourceWire.__primaryKey\n };\n for (const linked of entry.linkedObjects) {\n const targetWire = linked.targetObject;\n if (targetWire?.__apiName == null || targetWire.__primaryKey == null) {\n continue;\n }\n const target = {\n $apiName: targetWire.__apiName,\n $primaryKey: targetWire.__primaryKey\n };\n data.push({\n source,\n target,\n linkType: linked.linkType ?? linkType\n });\n }\n }\n return {\n data,\n nextPageToken: response.nextPageToken\n };\n }\n async function* editedLinksAsyncIter(sourceObjectType, linkType, options) {\n let pageToken;\n do {\n const page = await getEditedLinks(sourceObjectType, linkType, {\n pageSize: options?.pageSize,\n pageToken\n });\n for (const link of page.data) {\n yield link;\n }\n pageToken = page.nextPageToken;\n } while (pageToken != null);\n }\n return Object.defineProperties(inner, {\n getScenarioReference: {\n value: () => scenarioRid\n },\n getEditedEntityTypes: {\n value: getEditedEntityTypes\n },\n getEditedEntities: {\n value: getEditedEntities\n },\n editedEntitiesAsyncIter: {\n value: editedEntitiesAsyncIter\n },\n getEditedLinkTypes: {\n value: getEditedLinkTypes\n },\n getEditedLinks: {\n value: getEditedLinks\n },\n editedLinksAsyncIter: {\n value: editedLinksAsyncIter\n }\n });\n}","/*\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\n/** @internal */\nexport function isOntologyObjectV2(o) {\n return o && typeof o === \"object\" && typeof o.__apiName === \"string\" && o.__primaryKey != null;\n}","/*\n * Copyright 2024 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 { MediaSets } from \"@osdk/foundry.mediasets\";\nimport * as Attachments from \"@osdk/foundry.ontologies/Attachment\";\nimport { isAttachmentFile, isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { isMedia, isMediaReference, isMediaUpload } from \"../object/mediaUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isScenarioClient } from \"../scenarios/ScenarioClient.js\";\nimport { isInterfaceActionParam } from \"./interfaceUtils.js\";\nimport { isObjectSpecifiersObject } from \"./isObjectSpecifiersObject.js\";\nimport { isOntologyObjectV2 } from \"./isOntologyObjectV2.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n * @internal\n */\nexport async function toDataValue(value, client, actionMetadata) {\n if (value == null) {\n // typeof null is 'object' so do this first\n // Sending null over the wire clears the data, whereas undefined is dropped at request time.\n return value;\n }\n\n // arrays and sets are both sent over the wire as arrays\n if (Array.isArray(value) || value instanceof Set) {\n const values = Array.from(value);\n if (values.some(dataValue => isAttachmentUpload(dataValue) || isAttachmentFile(dataValue))) {\n const converted = [];\n for (const value of values) {\n converted.push(await toDataValue(value, client, actionMetadata));\n }\n return converted;\n }\n const promiseArray = Array.from(value, async innerValue => await toDataValue(innerValue, client, actionMetadata));\n return Promise.all(promiseArray);\n }\n\n // For uploads, we need to upload ourselves first to get the RID of the attachment\n if (isAttachmentUpload(value)) {\n const attachment = await Attachments.upload(client, value.data, {\n filename: value.name\n });\n return await toDataValue(attachment.rid, client, actionMetadata);\n }\n if (isAttachmentFile(value)) {\n const attachment = await Attachments.upload(client, value, {\n filename: value.name\n });\n return await toDataValue(attachment.rid, client, actionMetadata);\n }\n if (isMediaUpload(value)) {\n const mediaRef = await MediaSets.uploadMedia(client, value.data, {\n filename: value.fileName,\n preview: true\n });\n return await toDataValue(mediaRef, client, actionMetadata);\n }\n if (isMedia(value)) {\n return value.getMediaReference();\n }\n if (isMediaReference(value)) {\n return value;\n }\n\n // objects just send the JSON'd primaryKey\n if (isOntologyObjectV2(value)) {\n return await toDataValue(value.__primaryKey, client, actionMetadata);\n }\n if (isObjectSpecifiersObject(value)) {\n return await toDataValue(value.$primaryKey, client, actionMetadata);\n }\n\n // object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)\n if (isWireObjectSet(value)) {\n return value;\n }\n if (isObjectSet(value)) {\n return getWireObjectSet(value);\n }\n if (isInterfaceActionParam(value)) {\n return {\n objectTypeApiName: value.$objectType,\n primaryKeyValue: value.$primaryKey\n };\n }\n if (isScenarioClient(value)) {\n return value.getScenarioReference();\n }\n\n // TODO (during queries implementation)\n // two dimensional aggregation\n // three dimensional aggregation\n\n // struct\n if (typeof value === \"object\") {\n return Object.entries(value).reduce(async (promisedAcc, [key, structValue]) => {\n const acc = await promisedAcc;\n acc[key] = await toDataValue(structValue, client, actionMetadata);\n return acc;\n }, Promise.resolve({}));\n }\n\n // expected to pass through - boolean, byte, date, decimal, float, double, integer, long, short, string, timestamp, object type reference\n return value;\n}","/*\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\nimport * as Actions from \"@osdk/foundry.ontologies/Action\";\nimport invariant from \"tiny-invariant\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { toDataValue } from \"../util/toDataValue.js\";\nimport { ActionValidationError } from \"./ActionValidationError.js\";\nexport async function applyAction(client, action, parameters, options = {}) {\n const clientWithHeaders = addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyAction\"\n })), action);\n if (Array.isArray(parameters)) {\n !(client.transactionId == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Batch actions are not supported for staged edit functions or when supplying a transaction ID\") : invariant(false) : void 0;\n !(client.scenarioRid == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Batch actions are not supported when scoped to a scenario\") : invariant(false) : void 0;\n const response = await Actions.applyBatch(clientWithHeaders, await client.ontologyRid, action.unsanitizedApiName ?? action.apiName, {\n requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.unsanitizedApiName ?? action.apiName)) : [],\n options: {\n returnEdits: options?.$returnEdits ? \"ALL\" : \"NONE\"\n }\n }, {\n branch: client.branch\n });\n const edits = response.edits;\n return options?.$returnEdits ? edits?.type === \"edits\" ? remapActionResponse(response) : edits : undefined;\n } else {\n const response = await Actions.apply(clientWithHeaders, await client.ontologyRid, action.unsanitizedApiName ?? action.apiName, {\n parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.unsanitizedApiName ?? action.apiName)),\n options: {\n mode: options?.$validateOnly ? \"VALIDATE_ONLY\" : \"VALIDATE_AND_EXECUTE\",\n returnEdits: options?.$returnEdits ? \"ALL_V2_WITH_DELETIONS\" : \"NONE\"\n }\n }, {\n branch: client.branch,\n transactionId: client.transactionId,\n scenarioRid: client.scenarioRid\n });\n if (options?.$validateOnly) {\n return response.validation;\n }\n if (response.validation && response.validation?.result === \"INVALID\") {\n const validation = response.validation;\n throw new ActionValidationError(validation);\n }\n const edits = response.edits;\n return options?.$returnEdits ? edits?.type === \"edits\" ? remapActionResponse(response) : edits : undefined;\n }\n}\nasync function remapActionParams(params, client, actionMetadata) {\n if (params == null) {\n return {};\n }\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValue(value, client, actionMetadata);\n }\n return parameterMap;\n}\nasync function remapBatchActionParams(params, client, actionMetadata) {\n const remappedParams = await Promise.all(params.map(async param => {\n return {\n parameters: await remapActionParams(param, client, actionMetadata)\n };\n }));\n return remappedParams;\n}\nexport function remapActionResponse(response) {\n const editResponses = response?.edits;\n if (editResponses?.type === \"edits\") {\n const remappedActionResponse = {\n type: editResponses.type,\n deletedLinksCount: editResponses.deletedLinksCount,\n deletedObjectsCount: editResponses.deletedObjectsCount,\n addedLinks: [],\n deletedLinks: [],\n addedObjects: [],\n deletedObjects: [],\n modifiedObjects: [],\n editedObjectTypes: []\n };\n const editedObjectTypesSet = new Set();\n for (const edit of editResponses.edits) {\n if (edit.type === \"addLink\" || edit.type === \"deleteLink\") {\n const osdkEdit = {\n linkTypeApiNameAtoB: edit.linkTypeApiNameAtoB,\n linkTypeApiNameBtoA: edit.linkTypeApiNameBtoA,\n aSideObject: edit.aSideObject,\n bSideObject: edit.bSideObject\n };\n edit.type === \"addLink\" ? remappedActionResponse.addedLinks.push(osdkEdit) : remappedActionResponse.deletedLinks?.push(osdkEdit);\n editedObjectTypesSet.add(edit.aSideObject.objectType);\n editedObjectTypesSet.add(edit.bSideObject.objectType);\n } else if (edit.type === \"addObject\" || edit.type === \"deleteObject\" || edit.type === \"modifyObject\") {\n const osdkEdit = {\n objectType: edit.objectType,\n primaryKey: edit.primaryKey\n };\n if (edit.type === \"addObject\") {\n remappedActionResponse.addedObjects.push(osdkEdit);\n } else if (edit.type === \"deleteObject\") {\n remappedActionResponse.deletedObjects?.push(osdkEdit);\n } else if (edit.type === \"modifyObject\") {\n remappedActionResponse.modifiedObjects.push(osdkEdit);\n }\n editedObjectTypesSet.add(edit.objectType);\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(`Unexpected edit type: ${JSON.stringify(edit)}`);\n }\n }\n }\n remappedActionResponse.editedObjectTypes = [...editedObjectTypesSet];\n return remappedActionResponse;\n }\n}","/*\n * Copyright 2024 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 { TimeseriesDurationMapping } from \"@osdk/api\";\nimport { iterateReadableStream, parseStreamedResponse } from \"./streamutils.js\";\nexport function getTimeRange(body) {\n if (\"$startTime\" in body || \"$endTime\" in body) {\n return {\n type: \"absolute\",\n startTime: body.$startTime,\n endTime: body.$endTime\n };\n }\n return body.$before ? {\n type: \"relative\",\n startTime: {\n when: \"BEFORE\",\n value: body.$before,\n unit: TimeseriesDurationMapping[body.$unit]\n }\n } : {\n type: \"relative\",\n endTime: {\n when: \"AFTER\",\n value: body.$after,\n unit: TimeseriesDurationMapping[body.$unit]\n }\n };\n}\nexport async function* asyncIterPointsHelper(iterator) {\n const reader = iterator.body?.getReader();\n for await (const point of parseStreamedResponse(iterateReadableStream(reader))) {\n yield {\n time: point.time,\n value: point.value\n };\n }\n}","/*\n * Copyright 2024 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 * as TimeSeriesValueBankProperties from \"@osdk/foundry.ontologies/TimeSeriesValueBankProperty\";\nimport { asyncIterPointsHelper, getTimeRange } from \"./util/timeseriesUtils.js\";\nexport class GeotimeSeriesPropertyImpl {\n #triplet;\n #client;\n constructor(client, objectApiName, primaryKey, propertyName, initialValue) {\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n if (initialValue != null) {\n this.lastFetchedValue = initialValue;\n }\n }\n async getLatestValue() {\n const latestPointPromise = TimeSeriesValueBankProperties.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n latestPointPromise.then(latestPoint => this.lastFetchedValue = latestPoint,\n // eslint-disable-next-line no-console\n err => void console.error(err));\n return latestPointPromise;\n }\n async getAllValues(query) {\n const allPoints = [];\n for await (const point of this.asyncIterValues(query)) {\n allPoints.push(point);\n }\n return allPoints;\n }\n async *asyncIterValues(query) {\n const streamPointsIterator = await TimeSeriesValueBankProperties.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {\n range: getTimeRange(query)\n } : {});\n for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {\n yield timeseriesPoint;\n }\n }\n}","/*\n * Copyright 2024 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 { MediaSets } from \"@osdk/foundry.mediasets\";\nimport * as MediaReferenceProperties from \"@osdk/foundry.ontologies/MediaReferenceProperty\";\nimport { validateMediaItemMetadata } from \"./object/validateMediaItemMetadata.js\";\nexport class MediaReferencePropertyImpl {\n #mediaReference;\n #triplet;\n #client;\n constructor(args) {\n const {\n client,\n objectApiName,\n primaryKey,\n propertyName,\n mediaReference\n } = args;\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n this.#mediaReference = mediaReference;\n }\n async fetchContents() {\n return MediaReferenceProperties.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {\n preview: true // TODO: Can turn this back off when backend is no longer in beta.\n });\n }\n async fetchMetadata() {\n const r = await MediaReferenceProperties.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {\n preview: true // TODO: Can turn this back off when backend is no longer in beta.\n });\n return {\n path: r.path,\n sizeBytes: Number(r.sizeBytes),\n mediaType: r.mediaType\n };\n }\n\n /**\n * Fetches type-specific metadata via `MediaSets.metadata`. There is no Ontologies-backed\n * full-metadata endpoint, so this routes through the media set view using the embedded media\n * reference.\n */\n async fetchFullMetadata() {\n const {\n mediaSetRid,\n mediaItemRid,\n token\n } = this.#mediaReference.reference.mediaSetViewItem;\n const raw = await MediaSets.metadata(this.#client, mediaSetRid, mediaItemRid, {\n preview: true\n }, token ? {\n ReadToken: token\n } : undefined);\n return {\n itemMetadata: validateMediaItemMetadata(raw)\n };\n }\n getMediaReference() {\n return this.#mediaReference;\n }\n}","/*\n * Copyright 2024 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 * as TimeSeriesPropertiesV2 from \"@osdk/foundry.ontologies/TimeSeriesPropertyV2\";\nimport { asyncIterPointsHelper, getTimeRange } from \"./util/timeseriesUtils.js\";\nexport class TimeSeriesPropertyImpl {\n #triplet;\n #client;\n constructor(client, objectApiName, primaryKey, propertyName) {\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n }\n async getFirstPoint() {\n return TimeSeriesPropertiesV2.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n }\n async getLastPoint() {\n return TimeSeriesPropertiesV2.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n }\n async getAllPoints(query) {\n const allPoints = [];\n for await (const point of this.asyncIterPoints(query)) {\n allPoints.push(point);\n }\n return allPoints;\n }\n async *asyncIterPoints(query) {\n const streamPointsIterator = await TimeSeriesPropertiesV2.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {\n range: getTimeRange(query)\n } : {});\n for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {\n yield timeseriesPoint;\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\n/**\n * Formats a boolean value according to the specified formatting rule\n */\nexport function formatBoolean(value, rule) {\n return value ? rule.valueIfTrue : rule.valueIfFalse;\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\n/**\n * Resolves a property reference or string constant to its actual value\n */\n\nexport function resolvePropertyReference(ref, objectData) {\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() {\n if (typeof navigator !== \"undefined\" && navigator.language != null) {\n return navigator.language;\n }\n return \"en-US\";\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 { resolvePropertyReference } from \"./propertyFormattingUtils.js\";\n\n/**\n * Formats a date/timestamp value according to the specified formatting rule\n */\nexport function formatDateTime(value, format, timezone, objectData, locale, userTimezoneOverride) {\n const date = value instanceof Date ? value : new Date(value);\n if (isNaN(date.getTime())) {\n return undefined;\n }\n const resolvedTimezone = resolveTimezone(timezone, objectData, userTimezoneOverride);\n switch (format.type) {\n case \"localizedFormat\":\n return formatLocalized(date, format, locale, resolvedTimezone);\n case \"stringFormat\":\n // TODO - pattern formatting\n return undefined;\n default:\n format;\n return undefined;\n }\n}\nconst INVALID_DATE_STRING = \"Invalid date or timezone\";\nfunction formatLocalized(date, format, locale, timezone) {\n if (format.format === \"DATE_FORMAT_ISO_INSTANT\") {\n return date.toISOString();\n }\n if (format.format === \"DATE_FORMAT_RELATIVE_TO_NOW\") {\n return formatRelativeToNow(date, locale, timezone);\n }\n const options = getLocalizedFormatOptions(format.format);\n try {\n return new Intl.DateTimeFormat(locale, timezone ? {\n ...options,\n timeZone: timezone\n } : options).format(date);\n } catch (_e) {\n // If a property reference is an invalid timezone we specifically say that it's invalid instead of returning undefined;\n return INVALID_DATE_STRING;\n }\n}\nfunction getLocalizedFormatOptions(format) {\n switch (format) {\n case \"DATE_FORMAT_DATE\":\n return FORMAT_DATE;\n case \"DATE_FORMAT_YEAR_AND_MONTH\":\n return FORMAT_YEAR_AND_MONTH;\n case \"DATE_FORMAT_DATE_TIME\":\n return FORMAT_DATE_TIME;\n case \"DATE_FORMAT_DATE_TIME_SHORT\":\n return FORMAT_DATE_TIME_SHORT;\n case \"DATE_FORMAT_TIME\":\n return FORMAT_TIME;\n default:\n format;\n return {};\n }\n}\nconst FORMAT_DATE = {\n day: \"numeric\",\n month: \"short\",\n weekday: \"short\",\n year: \"numeric\"\n};\nconst FORMAT_YEAR_AND_MONTH = {\n month: \"short\",\n year: \"numeric\"\n};\nconst FORMAT_DATE_TIME = {\n day: \"numeric\",\n month: \"short\",\n weekday: \"short\",\n year: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n};\nconst FORMAT_DATE_TIME_SHORT = {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\"\n};\nconst FORMAT_TIME = {\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n};\nconst DATE_TIME_SHORT_WITH_WEEKDAY = {\n day: \"numeric\",\n month: \"short\",\n weekday: \"short\",\n year: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\"\n};\nfunction resolveTimezone(timezone, objectData, userTimezoneOverride) {\n if (userTimezoneOverride != null) {\n return userTimezoneOverride;\n }\n if (timezone == null) {\n return undefined;\n }\n switch (timezone.type) {\n case \"user\":\n return undefined;\n case \"static\":\n return resolvePropertyReference(timezone.zoneId, objectData);\n default:\n timezone;\n return undefined;\n }\n}\nconst SECOND_MS = 1_000;\nconst MINUTE_MS = 60 * SECOND_MS;\nconst HOUR_MS = 60 * MINUTE_MS;\nconst DAY_MS = 24 * HOUR_MS;\nfunction formatRelativeToNow(date, locale, timezone) {\n const now = Date.now();\n const diff = date.valueOf() - now;\n const absDiff = Math.abs(diff);\n\n // More than 1 day - fall back to absolute date formatting\n if (absDiff >= DAY_MS) {\n const dtf = new Intl.DateTimeFormat(locale, {\n ...DATE_TIME_SHORT_WITH_WEEKDAY,\n timeZone: timezone\n });\n return dtf.format(date);\n }\n\n // Within 1 day - use relative formatting\n const rtf = new Intl.RelativeTimeFormat(locale, {\n numeric: \"auto\"\n });\n const units = [[\"hour\", HOUR_MS], [\"minute\", MINUTE_MS], [\"second\", SECOND_MS]];\n for (const [unit, ms] of units) {\n if (absDiff >= ms) {\n return rtf.format(Math.floor(diff / ms), unit);\n }\n }\n return rtf.format(0, \"second\");\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 { resolvePropertyReference } from \"./propertyFormattingUtils.js\";\n\n/**\n * Extended NumberFormatOptions that includes rounding mode support\n * which is available in modern browsers but not yet in TypeScript types.\n * Only includes modes that are actually supported by Intl.NumberFormat and used in our API.\n */\n\n/**\n * Formats a number value according to the specified formatting rule\n */\nexport function formatNumber(value, numberType, objectData, locale) {\n switch (numberType.type) {\n case \"standard\":\n return formatStandardNumber(value, numberType.baseFormatOptions, locale);\n case \"fixedValues\":\n return numberType.values[value];\n case \"currency\":\n return formatCurrency(value, numberType, objectData, locale);\n case \"standardUnit\":\n return formatStandardUnit(value, numberType, objectData, locale);\n case \"customUnit\":\n return formatCustomUnit(value, numberType, objectData, locale);\n case \"affix\":\n return formatAffix(value, numberType, objectData, locale);\n case \"duration\":\n // TODO (duration is a bit more complex)\n return undefined;\n case \"scale\":\n return formatScale(value, numberType, locale);\n case \"ratio\":\n return formatRatio(value, numberType, locale);\n default:\n numberType;\n return undefined;\n }\n}\nfunction formatStandardNumber(value, options, locale) {\n return formatNumberWithAffixes(value, options, locale);\n}\nfunction formatCurrency(value, rule, objectData, locale) {\n const currencyCode = resolvePropertyReference(rule.currencyCode, objectData);\n if (currencyCode == null) {\n return formatStandardNumber(value, rule.baseFormatOptions, locale);\n }\n const options = {\n ...convertToIntlOptions(rule.baseFormatOptions),\n style: \"currency\",\n currency: currencyCode,\n currencyDisplay: rule.style === \"COMPACT\" ? \"narrowSymbol\" : \"symbol\"\n };\n return formatWithIntl(value, options, locale);\n}\nfunction formatStandardUnit(value, rule, objectData, locale) {\n const unit = resolvePropertyReference(rule.unit, objectData);\n if (unit == null) {\n return formatStandardNumber(value, rule.baseFormatOptions, locale);\n }\n const options = {\n ...convertToIntlOptions(rule.baseFormatOptions),\n style: \"unit\",\n unit: unit\n };\n try {\n return formatWithIntl(value, options, locale);\n } catch (error) {\n const suffix = ` ${unit}`;\n return formatNumberWithAffixes(value, rule.baseFormatOptions, locale, \"\", suffix);\n }\n}\nfunction formatCustomUnit(value, rule, objectData, locale) {\n const unit = resolvePropertyReference(rule.unit, objectData);\n const suffix = unit != null ? ` ${unit}` : \"\";\n return formatNumberWithAffixes(value, rule.baseFormatOptions, locale, \"\", suffix);\n}\nfunction formatAffix(value, rule, objectData, locale) {\n const prefix = rule.affix.prefix != null ? resolvePropertyReference(rule.affix.prefix, objectData) ?? \"\" : \"\";\n const suffix = rule.affix.postfix != null ? resolvePropertyReference(rule.affix.postfix, objectData) ?? \"\" : \"\";\n return formatNumberWithAffixes(value, rule.baseFormatOptions, locale, prefix, suffix);\n}\n\n/**\n * Gets the scale divisor for a given scale type\n */\nfunction getScaleDivisor(scaleType) {\n switch (scaleType) {\n case \"THOUSANDS\":\n return 1e3;\n case \"MILLIONS\":\n return 1e6;\n case \"BILLIONS\":\n return 1e9;\n default:\n scaleType;\n throw new Error(`Unknown scale type: ${scaleType}`);\n }\n}\n\n/**\n * Extracts the localized compact suffix for a given scale.\n * Uses Intl.NumberFormat with compact notation to get the proper i18n suffix.\n */\nfunction getLocalizedCompactSuffix(scaleDivisor, locale) {\n const compactFormatter = new Intl.NumberFormat(locale, {\n notation: \"compact\",\n compactDisplay: \"short\"\n });\n const parts = compactFormatter.formatToParts(scaleDivisor);\n const compactPart = parts.find(p => p.type === \"compact\");\n return compactPart?.value ?? \"\";\n}\nfunction formatScale(value, rule, locale) {\n const scaleDivisor = getScaleDivisor(rule.scaleType);\n const scaledValue = value / scaleDivisor;\n const suffix = getLocalizedCompactSuffix(scaleDivisor, locale);\n return formatNumberWithAffixes(scaledValue, rule.baseFormatOptions, locale, \"\", suffix);\n}\nfunction getRatioScaledValue(value, ratioType) {\n switch (ratioType) {\n case \"PERCENTAGE\":\n return value * 100;\n case \"PER_MILLE\":\n return value * 1000;\n case \"BASIS_POINTS\":\n return value * 10000;\n default:\n ratioType;\n throw new Error(`Unknown ratio type: ${ratioType}`);\n }\n}\nfunction formatRatio(value, rule, locale) {\n // Special case: PERCENTAGE uses Intl's native percent style\n if (rule.ratioType === \"PERCENTAGE\") {\n const options = {\n ...convertToIntlOptions(rule.baseFormatOptions),\n style: \"percent\"\n };\n return formatWithIntl(value, options, locale);\n }\n\n // Other ratio types: scale and add suffix\n const scaledValue = getRatioScaledValue(value, rule.ratioType);\n let suffix;\n switch (rule.ratioType) {\n case \"PER_MILLE\":\n suffix = \"‰\";\n break;\n case \"BASIS_POINTS\":\n suffix = \" bps\";\n break;\n default:\n rule.ratioType;\n throw new Error(`Unknown ratio type: ${rule.ratioType}`);\n }\n return formatNumberWithAffixes(scaledValue, rule.baseFormatOptions, locale, \"\", suffix);\n}\n\n/**\n * Maps notation from OSDK format to Intl format\n */\nfunction mapNotation(notation) {\n switch (notation) {\n case \"STANDARD\":\n return \"standard\";\n case \"SCIENTIFIC\":\n return \"scientific\";\n case \"ENGINEERING\":\n return \"engineering\";\n case \"COMPACT\":\n return \"compact\";\n default:\n notation;\n }\n}\n\n/**\n * Maps rounding mode from OSDK format to Intl format\n */\nfunction mapRoundingMode(mode) {\n switch (mode) {\n case \"CEIL\":\n return \"ceil\";\n case \"FLOOR\":\n return \"floor\";\n case \"ROUND_CLOSEST\":\n return \"halfExpand\";\n default:\n mode;\n return undefined;\n }\n}\nfunction convertToIntlOptions(options) {\n return {\n useGrouping: options.useGrouping,\n minimumIntegerDigits: options.minimumIntegerDigits,\n minimumFractionDigits: options.minimumFractionDigits,\n maximumFractionDigits: options.maximumFractionDigits,\n minimumSignificantDigits: options.minimumSignificantDigits,\n maximumSignificantDigits: options.maximumSignificantDigits,\n notation: options.notation ? mapNotation(options.notation) : undefined,\n roundingMode: options.roundingMode ? mapRoundingMode(options.roundingMode) : undefined,\n convertNegativeToParenthesis: options.convertNegativeToParenthesis\n };\n}\n\n/**\n * Applies negative-to-parenthesis conversion if requested\n */\nfunction maybeConvertNegativeToParenthesis(formatted, value, shouldConvert) {\n if (shouldConvert && value < 0) {\n return formatted.replace(/^-/, \"(\") + \")\";\n }\n return formatted;\n}\n\n/**\n * Formats a number using Intl.NumberFormat with the given options\n */\nfunction formatWithIntl(value, options, locale) {\n const formatter = new Intl.NumberFormat(locale, options);\n const formatted = formatter.format(value);\n return maybeConvertNegativeToParenthesis(formatted, value, options.convertNegativeToParenthesis ?? false);\n}\n\n/**\n * Formats a number and optionally adds prefix/suffix\n */\nfunction formatNumberWithAffixes(value, baseOptions, locale, prefix, suffix) {\n const intlOptions = convertToIntlOptions(baseOptions);\n const formatted = formatWithIntl(value, intlOptions, locale);\n return `${prefix || \"\"}${formatted}${suffix || \"\"}`;\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 { formatBoolean } from \"./formatBoolean.js\";\nimport { formatDateTime } from \"./formatDateTime.js\";\nimport { formatNumber } from \"./formatNumber.js\";\nimport { getBrowserLocale } from \"./propertyFormattingUtils.js\";\n/**\n * Applies formatting rules to a property value and returns the formatted string value.\n *\n * @param propertyValue - The value of the property to format\n * @returns The formatted string value, or undefined if the property cannot be formatted\n *\n * @experimental This is a stub implementation that returns undefined.\n * The actual formatting logic will be implemented later.\n */\nexport function applyPropertyFormatter(propertyValue, propertyDefinition, objectData, options = {}) {\n if (propertyDefinition?.valueFormatting == null || propertyValue == null) {\n return undefined;\n }\n return formatPropertyValue(propertyValue, propertyDefinition.valueFormatting, objectData, options);\n}\nfunction formatPropertyValue(value, rule, objectData, options) {\n switch (rule.type) {\n case \"boolean\":\n if (typeof value !== \"boolean\") {\n return undefined;\n }\n return formatBoolean(value, rule);\n case \"number\":\n if (typeof value !== \"number\") {\n return undefined;\n }\n return formatNumber(value, rule.numberType, objectData, options.locale ?? getBrowserLocale());\n case \"date\":\n case \"timestamp\":\n if (typeof value !== \"string\") {\n return undefined;\n }\n return formatDateTime(new Date(value), rule.format, rule.type === \"timestamp\" ? rule.displayTimezone : undefined, objectData, options.locale ?? getBrowserLocale(), options.timezoneId);\n default:\n return undefined;\n }\n}","/*\n * Copyright 2024 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 const InterfaceDefinitions = Symbol(process.env.MODE !== \"production\" ? \"InterfaceDefinitions\" : undefined);","/*\n * Copyright 2024 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\n/** @internal */\nexport const UnderlyingOsdkObject = Symbol(process.env.MODE !== \"production\" ? \"Underlying Object\" : undefined);\n\n/** @internal */\nexport const ObjectDefRef = Symbol(process.env.MODE !== \"production\" ? \"ObjectDefinition\" : undefined);\n\n/** @internal */\nexport const InterfaceDefRef = Symbol(process.env.MODE !== \"production\" ? \"InterfaceDefinition\" : undefined);\n\n/** @internal */\nexport const ClientRef = Symbol(process.env.MODE !== \"production\" ? \"ClientRef\" : undefined);\n\n/** @internal */\nexport const PropertySecuritiesRef = Symbol(process.env.MODE !== \"production\" ? \"Property Securities\" : undefined);","/*\n * Copyright 2024 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 { getWireObjectSet } from \"../../objectSet/createObjectSet.js\";\nimport { fetchSingle, fetchSingleWithErrors } from \"../fetchSingle.js\";\nimport { ClientRef, InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\n/** @internal */\nexport function get$link(holder) {\n const client = holder[ClientRef];\n const objDef = holder[ObjectDefRef];\n const rawObj = holder[UnderlyingOsdkObject];\n return Object.freeze(Object.fromEntries(Object.keys(objDef.links).map(linkName => {\n const linkDef = objDef.links[linkName];\n const objectSet = client.objectSetFactory(objDef, client).where({\n [objDef.primaryKeyApiName]: rawObj.$primaryKey\n }).pivotTo(linkName);\n const value = !linkDef.multiplicity ? {\n fetchOne: options => fetchSingle(client, objDef, options ?? {}, getWireObjectSet(objectSet)),\n fetchOneWithErrors: options => fetchSingleWithErrors(client, objDef, options ?? {}, getWireObjectSet(objectSet))\n } : objectSet;\n return [linkName, value];\n })));\n}\n\n/** @internal */\nexport function get$linkForInterface(holder) {\n const client = holder[UnderlyingOsdkObject][ClientRef];\n const objDef = holder[UnderlyingOsdkObject][ObjectDefRef];\n const interfaceDef = holder[InterfaceDefRef];\n const rawObj = holder[UnderlyingOsdkObject];\n return Object.freeze(Object.fromEntries(Object.keys(interfaceDef.links).map(linkName => {\n const linkDef = interfaceDef.links[linkName];\n const objectSet = client.objectSetFactory(interfaceDef, client).intersect(client.objectSetFactory(objDef, client).where({\n [objDef.primaryKeyApiName]: rawObj.$primaryKey\n })).pivotTo(linkName);\n const linkTargetDef = linkDef.targetType === \"object\" ? {\n type: \"object\",\n apiName: linkDef.targetTypeApiName\n } : {\n type: \"interface\",\n apiName: linkDef.targetTypeApiName\n };\n const value = !linkDef.multiplicity ? {\n fetchOne: options => fetchSingle(client, linkTargetDef, options ?? {}, getWireObjectSet(objectSet)),\n fetchOneWithErrors: options => fetchSingleWithErrors(client, linkTargetDef, options ?? {}, getWireObjectSet(objectSet))\n } : objectSet;\n return [linkName, value];\n })));\n}","/*\n * Copyright 2024 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 { extractNamespace } from \"../../internal/conversions/extractNamespace.js\";\nimport { get$linkForInterface } from \"./getDollarLink.js\";\nimport { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\n/** @internal */\nexport function createOsdkInterface(underlying, interfaceDef) {\n const [objApiNamespace] = extractNamespace(interfaceDef.apiName);\n return Object.freeze(Object.defineProperties({}, {\n // first to minimize hidden classes\n [UnderlyingOsdkObject]: {\n value: underlying\n },\n \"$apiName\": {\n value: interfaceDef.apiName,\n enumerable: true\n },\n \"$as\": {\n value: underlying.$as,\n enumerable: false\n },\n \"$objectType\": {\n value: underlying.$objectType,\n enumerable: \"$objectType\" in underlying\n },\n \"$primaryKey\": {\n value: underlying.$primaryKey,\n enumerable: \"$primaryKey\" in underlying\n },\n \"$objectSpecifier\": {\n value: underlying.$objectSpecifier,\n enumerable: \"$objectSpecifier\" in underlying\n },\n \"$title\": {\n value: underlying.$title,\n enumerable: \"$title\" in underlying\n },\n \"$rid\": {\n value: underlying.$rid,\n enumerable: \"$rid\" in underlying\n },\n \"$clone\": {\n value: clone,\n enumerable: false\n },\n \"$propertySecurities\": {\n value: remapPropertySecuritiesForInterface(underlying.$propertySecurities, underlying[ObjectDefRef], interfaceDef, objApiNamespace),\n enumerable: \"$propertySecurities\" in underlying\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n value: {\n \"ObjectMetadata\": underlying[ObjectDefRef],\n \"InterfaceMetadata\": interfaceDef\n },\n enumerable: false\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue\": {\n value: underlying.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue,\n enumerable: false\n },\n \"$link\": {\n get() {\n return get$linkForInterface(this);\n }\n },\n [InterfaceDefRef]: {\n value: interfaceDef\n },\n ...Object.fromEntries(Object.keys(interfaceDef.properties).map(p => {\n const objDef = underlying[ObjectDefRef];\n const [apiNamespace, apiName] = extractNamespace(p);\n const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];\n return [apiNamespace === objApiNamespace ? apiName : p, {\n enumerable: targetPropName in underlying,\n value: underlying[targetPropName]\n }];\n }))\n }));\n function clone(update) {\n if (update == null) {\n return underlying.$clone().$as(interfaceDef);\n }\n for (const key of Object.keys(update)) {\n if (!(key in interfaceDef.properties)) {\n throw new Error(`Invalid property ${key} for interface ${interfaceDef.apiName}`);\n }\n }\n const remappedProps = Object.fromEntries(Object.keys(update).map(p => mapProperty(p, update[p])).filter(x => x != null));\n return underlying.$clone(remappedProps).$as(interfaceDef);\n }\n function mapProperty(propertyName, value) {\n const objDef = underlying[ObjectDefRef];\n const targetPropName = objDef.interfaceMap[interfaceDef.apiName][propertyName];\n // If the underlying object does not implement the SPT, throw errors\n if (targetPropName == null) {\n throw new Error(`Cannot clone interface with ${propertyName} as property is not implemented by the underlying object type ${objDef.apiName}`);\n }\n return [targetPropName, value];\n }\n}\nfunction remapPropertySecuritiesForInterface(underlyingSecurities, objDef, interfaceDef, objApiNamespace) {\n if (underlyingSecurities == null) return undefined;\n const inverseMap = objDef.inverseInterfaceMap?.[interfaceDef.apiName] ?? {};\n const remapped = {};\n for (const objPropName of Object.keys(underlyingSecurities)) {\n if (objPropName === \"$primaryKey\" || objPropName === \"$title\") {\n remapped[objPropName] = underlyingSecurities[objPropName];\n continue;\n }\n const interfacePropName = inverseMap[objPropName];\n if (interfacePropName == null) continue;\n const [apiNamespace, apiName] = extractNamespace(interfacePropName);\n const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;\n remapped[key] = underlyingSecurities[objPropName];\n }\n return remapped;\n}","/*\n * Copyright 2024 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 { InterfaceDefinitions } from \"../../ontology/OntologyProvider.js\";\nimport { createSimpleCache } from \"../SimpleCache.js\";\nimport { createOsdkInterface } from \"./createOsdkInterface.js\";\nimport { UnderlyingOsdkObject } from \"./InternalSymbols.js\";\n\n/** @internal */\n\nexport const get$as = createSimpleCache(new WeakMap(), $asFactory).get;\nconst osdkObjectToInterfaceView = createSimpleCache(new WeakMap(), () => new Map());\nfunction $asFactory(objDef) {\n // We use the exact same logic for both the interface rep and the underlying rep\n\n return function $as(targetMinDef) {\n let targetInterfaceApiName;\n if (typeof targetMinDef === \"string\") {\n if (targetMinDef === objDef.apiName) {\n return this[UnderlyingOsdkObject];\n }\n\n // this is sufficient to determine if we implement the interface\n if (objDef.interfaceMap?.[targetMinDef] == null) {\n throw new Error(`Object does not implement interface '${targetMinDef}'.`);\n }\n targetInterfaceApiName = targetMinDef;\n } else if (targetMinDef.apiName === objDef.apiName) {\n return this[UnderlyingOsdkObject];\n } else {\n if (targetMinDef.type === \"object\") {\n throw new Error(`'${targetMinDef.apiName}' is not an interface nor is it '${objDef.apiName}', which is the object type.`);\n }\n targetInterfaceApiName = targetMinDef.apiName;\n }\n const def = objDef[InterfaceDefinitions][targetInterfaceApiName];\n if (!def) {\n throw new Error(`Object does not implement interface '${targetInterfaceApiName}'.`);\n }\n const underlying = this[UnderlyingOsdkObject];\n const existing = osdkObjectToInterfaceView.get(underlying).get(targetInterfaceApiName)?.deref();\n if (existing) return existing;\n const osdkInterface = createOsdkInterface(underlying, def.def);\n osdkObjectToInterfaceView.get(underlying).set(targetInterfaceApiName, new WeakRef(osdkInterface));\n return osdkInterface;\n };\n}","/*\n * Copyright 2024 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 invariant from \"tiny-invariant\";\nimport { GeotimeSeriesPropertyImpl } from \"../../createGeotimeSeriesProperty.js\";\nimport { MediaReferencePropertyImpl } from \"../../createMediaReferenceProperty.js\";\nimport { TimeSeriesPropertyImpl } from \"../../createTimeseriesProperty.js\";\nimport { hydrateAttachmentFromRidInternal } from \"../../public-utils/hydrateAttachmentFromRid.js\";\nimport { createObjectSpecifierFromPrimaryKey } from \"../../util/objectSpecifierUtils.js\";\nimport { applyPropertyFormatter } from \"../formatting/applyPropertyFormatter.js\";\nimport { get$as } from \"./getDollarAs.js\";\nimport { get$link } from \"./getDollarLink.js\";\nimport { ClientRef, ObjectDefRef, PropertySecuritiesRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nconst specialPropertyTypes = new Set([\"attachment\", \"geotimeSeriesReference\", \"mediaReference\", \"numericTimeseries\", \"stringTimeseries\", \"sensorTimeseries\"]);\nconst securableSpecialKeys = new Set([\"$primaryKey\", \"$title\"]);\n\n// kept separate so we are not redefining these functions\n// every time an object is created.\nconst basePropDefs = {\n \"$as\": {\n get() {\n return get$as(this[ObjectDefRef]);\n }\n },\n \"$link\": {\n get() {\n return get$link(this);\n }\n },\n \"$clone\": {\n value(update) {\n // I think `rawObj` is the same thing as `this` and can be removed?\n const rawObj = this[UnderlyingOsdkObject];\n const def = this[ObjectDefRef];\n if (update == null) {\n return createOsdkObject(this[ClientRef], def, {\n ...rawObj\n });\n }\n if (def.primaryKeyApiName in update && rawObj[def.primaryKeyApiName] !== update[def.primaryKeyApiName]) {\n throw new Error(`Cannot update ${def.apiName} object with differing primary key values `);\n }\n if (def.titleProperty in update && !(\"$title\" in update)) {\n update.$title = update[def.titleProperty];\n }\n const newObject = {\n ...this[UnderlyingOsdkObject],\n ...update\n };\n return createOsdkObject(this[ClientRef], this[ObjectDefRef], newObject);\n }\n },\n \"$objectSpecifier\": {\n get() {\n const rawObj = this[UnderlyingOsdkObject];\n return createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);\n },\n enumerable: true\n },\n \"$propertySecurities\": {\n get() {\n return this[PropertySecuritiesRef];\n },\n enumerable: true\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n get() {\n return {\n ObjectMetadata: this[ObjectDefRef]\n };\n },\n enumerable: false\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue\": {\n value(propertyApiName, options) {\n const rawObj = this[UnderlyingOsdkObject];\n const def = this[ObjectDefRef];\n const propertyValue = rawObj[propertyApiName];\n return applyPropertyFormatter(propertyValue, def.properties[propertyApiName], rawObj, options);\n },\n enumerable: false\n }\n};\n\n/**\n * @internal\n * @param client\n * @param objectDef\n * @param simpleOsdkProperties\n */\nexport function createOsdkObject(client, objectDef, simpleOsdkProperties, derivedPropertyTypeByName = {}, wirePropertySecurities = []) {\n const {\n parsedObject,\n clientPropertySecurities\n } = parseWhenSecuritiesLoaded(wirePropertySecurities, simpleOsdkProperties, objectDef, derivedPropertyTypeByName);\n\n // updates the object's \"hidden class/map\".\n const rawObj = parsedObject;\n Object.defineProperties(rawObj, {\n [UnderlyingOsdkObject]: {\n enumerable: false,\n value: simpleOsdkProperties\n },\n [PropertySecuritiesRef]: {\n enumerable: false,\n value: clientPropertySecurities\n },\n [ObjectDefRef]: {\n value: objectDef,\n enumerable: false\n },\n // TODO: Potentially update when GA metadata field\n [ClientRef]: {\n value: client,\n enumerable: false\n },\n ...basePropDefs\n });\n\n // Assign the special values\n for (const propKey of Object.keys(rawObj)) {\n if (propKey in objectDef.properties && typeof objectDef.properties[propKey].type === \"string\" && specialPropertyTypes.has(objectDef.properties[propKey].type)) {\n rawObj[propKey] = createSpecialProperty(client, objectDef, rawObj, propKey);\n } else if (propKey in derivedPropertyTypeByName) {\n rawObj[propKey] = modifyRdpProperties(client, derivedPropertyTypeByName, rawObj[propKey], propKey);\n }\n }\n return Object.freeze(rawObj);\n}\nfunction modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKey) {\n if (derivedPropertyTypeByName[propKey].definition.type === \"selection\" && derivedPropertyTypeByName[propKey].definition.operation.type === \"count\") {\n const num = Number(rawValue);\n !Number.isSafeInteger(num) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Count aggregation for derived property \" + propKey + \" returned a value larger than safe integer.\") : invariant(false) : void 0;\n return num;\n } // Selected or collected properties need to be deserialized specially when constructed with RDP\n else if (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType != null && typeof derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType.type === \"string\" && specialPropertyTypes.has(derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType.type)) {\n switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {\n case \"attachment\":\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => hydrateAttachmentFromRidInternal(client, a.rid));\n } else {\n return hydrateAttachmentFromRidInternal(client, rawValue.rid);\n }\n break;\n default:\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Derived property aggregations for Timeseries and Media are not supported\") : invariant(false) : void 0;\n }\n }\n return rawValue;\n}\nfunction createSpecialProperty(client, objectDef, rawObject, p) {\n const rawValue = rawObject[p];\n const propDef = objectDef.properties[p];\n if (process.env.NODE_ENV !== \"production\") {\n !(propDef != null && typeof propDef.type === \"string\" && specialPropertyTypes.has(propDef.type)) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n }\n if (propDef.type === \"attachment\") {\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => hydrateAttachmentFromRidInternal(client, a.rid));\n }\n return hydrateAttachmentFromRidInternal(client, rawValue.rid);\n }\n if (propDef.type === \"numericTimeseries\" || propDef.type === \"stringTimeseries\" || propDef.type === \"sensorTimeseries\") {\n return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);\n }\n if (propDef.type === \"geotimeSeriesReference\") {\n return new GeotimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p, rawValue.type === \"geotimeSeriesValue\" ? {\n time: rawValue.timestamp,\n value: {\n type: \"Point\",\n coordinates: rawValue.position\n }\n } : undefined);\n }\n if (propDef.type === \"mediaReference\") {\n return new MediaReferencePropertyImpl({\n client,\n objectApiName: objectDef.apiName,\n primaryKey: rawObject[objectDef.primaryKeyApiName],\n propertyName: p,\n mediaReference: rawValue\n });\n }\n}\nfunction parseWhenSecuritiesLoaded(wirePropertySecurities, rawObject, objectDef, derivedPropertyTypeByName = {}) {\n if (wirePropertySecurities == null || wirePropertySecurities.length === 0) {\n return {\n parsedObject: rawObject,\n clientPropertySecurities: undefined\n };\n }\n const parsedObject = rawObject;\n const clientPropertySecurities = {};\n for (const propKey of Object.keys(rawObject)) {\n if (propKey in objectDef.properties || propKey in derivedPropertyTypeByName || securableSpecialKeys.has(propKey)) {\n const value = rawObject[propKey];\n if (Array.isArray(value)) {\n const newVal = [];\n const newSecurities = [];\n value.forEach(spv => {\n !(typeof spv === \"object\" && spv != null && \"value\" in spv && \"propertySecurityIndex\" in spv) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected destructured secured property value object in array\") : invariant(false) : void 0;\n const securedValue = spv;\n newVal.push(securedValue.value);\n const securityIndex = securedValue.propertySecurityIndex;\n !(securityIndex != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected property security index to be defined\") : invariant(false) : void 0;\n !(securityIndex < wirePropertySecurities.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected property security index to be within bounds\") : invariant(false) : void 0;\n newSecurities.push(wirePropertySecurities[securityIndex].disjunction.map(wireToClientPropertySecurities));\n });\n parsedObject[propKey] = newVal;\n clientPropertySecurities[propKey] = newSecurities;\n } // Check if this is a secured property value object\n else if (typeof value === \"object\" && value != null && \"value\" in value && \"propertySecurityIndex\" in value) {\n const securedValue = value;\n parsedObject[propKey] = securedValue.value;\n const securityIndex = securedValue.propertySecurityIndex;\n !(securityIndex != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected property security index to be defined\") : invariant(false) : void 0;\n !(securityIndex < wirePropertySecurities.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected property security index to be within bounds\") : invariant(false) : void 0;\n clientPropertySecurities[propKey] = wirePropertySecurities[securityIndex].disjunction.map(wireToClientPropertySecurities);\n } else {\n // Regular property without security\n parsedObject[propKey] = value;\n }\n }\n }\n return {\n parsedObject,\n clientPropertySecurities\n };\n}\nfunction wireToClientPropertySecurities(propertySecurity) {\n switch (propertySecurity.type) {\n case \"propertyMarkingSummary\":\n return {\n type: \"propertyMarkings\",\n conjunctive: propertySecurity.conjunctive,\n containerConjunctive: propertySecurity.containerConjunctive,\n disjunctive: propertySecurity.disjunctive,\n containerDisjunctive: propertySecurity.containerDisjunctive\n };\n case \"errorComputingSecurity\":\n return {\n type: \"errorComputingSecurity\"\n };\n case \"unsupportedPolicy\":\n return {\n type: \"unsupportedPolicy\"\n };\n }\n}","/*\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\nimport invariant from \"tiny-invariant\";\nimport { createOsdkObject } from \"./convertWireToOsdkObjects/createOsdkObject.js\";\n\n/**\n * If interfaceApiName is not undefined, converts the instances of the\n * interface into their respective\n * underlying concrete types and then returns the $as() representation\n * for the consumers.\n *\n * Otherwise just does the conversion\n *\n * May mutate in place for performance reasons. If you need a clean copy,\n * keep it first.\n *\n * However, you must use the returned value, which will be whatever is correct.\n *\n * @internal\n * @param interfaceApiName - if undefined\n */\n\n/**\n * @internal\n */\nexport async function convertWireToOsdkObjects(client, objects, interfaceApiName, derivedPropertyTypeByName, propertySecurities, forceRemoveRid = false, selectedProps, strictNonNull = false, interfaceToObjectTypeMappings = {}, interfaceToObjectTypeMappingsV2 = {}) {\n fixObjectPropertiesInPlace(objects, forceRemoveRid);\n\n // prefer V2 mappings if non-empty, otherwise fall back to V1\n const effectiveMappings = Object.keys(interfaceToObjectTypeMappingsV2).length > 0 ? convertInterfaceToObjectTypeMappingsV2ToV1(interfaceToObjectTypeMappingsV2) : interfaceToObjectTypeMappings;\n const isInterfaceScoped = Object.keys(effectiveMappings).length > 0;\n const ret = [];\n for (const rawObj of objects) {\n const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);\n !objectDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing definition for '${rawObj.$apiName}'`) : invariant(false) : void 0;\n const interfaceToObjMapping = interfaceApiName && isInterfaceScoped ? effectiveMappings[interfaceApiName][rawObj.$apiName] : undefined;\n const ifaceSelected = interfaceApiName && interfaceToObjMapping ? selectedProps ? Object.keys(interfaceToObjMapping).filter(val => {\n selectedProps?.includes(interfaceToObjMapping[val]);\n }) : [...Object.values(interfaceToObjMapping), objectDef.primaryKeyApiName] : undefined;\n\n // default value for when we are checking an object\n let objProps;\n let conforming = true;\n if (interfaceApiName && ifaceSelected) {\n invariantInterfacesAsViews(objectDef, interfaceApiName, client);\n objProps = ifaceSelected;\n } else {\n objProps = selectedProps ?? Object.keys(objectDef.properties);\n }\n conforming &&= isConforming(client, objectDef, rawObj, objProps);\n if (strictNonNull === \"throw\" && !conforming) {\n throw new Error(\"Unable to safely convert objects as some non nullable properties are null\");\n } else if (strictNonNull === \"drop\" && !conforming) {\n continue;\n }\n let osdkObject = createOsdkObject(client, objectDef, rawObj, derivedPropertyTypeByName, propertySecurities);\n if (interfaceApiName && isInterfaceScoped) osdkObject = osdkObject.$as(interfaceApiName);\n ret.push(osdkObject);\n }\n return ret;\n}\nfunction isConforming(client, def, obj, propsToCheck) {\n for (const propName of propsToCheck) {\n if (propName in def.properties && def.properties[propName].nullable === false && obj[propName] == null) {\n if (process.env.NODE_ENV !== \"production\") {\n client.logger?.debug({\n obj: {\n $apiName: obj.$apiName,\n $objectType: obj.$objectType,\n $primaryKey: obj.$primaryKey\n }\n }, `Found object that does not conform to its definition. Expected ${def.apiName}'s ${propName} to not be null.`);\n }\n return false;\n }\n }\n return true;\n}\nfunction invariantInterfacesAsViews(objectDef, interfaceApiName, client) {\n if (objectDef.interfaceMap?.[interfaceApiName] == null) {\n const warning = \"Interfaces are only supported 'as views' but your metadata object is missing the correct information. This suggests your interfaces have not been migrated to the newer version yet and you cannot use this version of the SDK.\";\n if (client.logger) {\n client.logger.warn(warning);\n } else {\n // eslint-disable-next-line no-console\n console.error(`WARNING! ${warning}`);\n }\n throw new Error(warning);\n }\n}\nfunction fixObjectPropertiesInPlace(objs, forceRemoveRid) {\n for (const obj of objs) {\n if (forceRemoveRid) {\n delete obj.__rid;\n }\n if (obj.__rid) {\n obj.$rid = obj.__rid;\n delete obj.__rid;\n }\n if (obj.__score) {\n obj.$score = obj.__score;\n delete obj.__score;\n }\n\n // Backend returns as __apiName but we want to stick to $ structure\n obj.$apiName ??= obj.__apiName;\n\n // for now these are the same but when we start doing interface projections the $objectType will always be underlying and\n // the $apiName will be for the current view (in current designs)\n obj.$objectType = obj.$apiName;\n\n // copying over for now as its always returned. In the future, this should just be inferred from underlying\n obj.$primaryKey ??= obj.__primaryKey;\n obj.$title ??= obj.__title;\n\n // we don't want people to use these\n delete obj.__apiName;\n delete obj.__primaryKey;\n delete obj.__title;\n }\n}\n\n/**\n * Converts interfaceToObjectTypeMappingsV2 format to the V1 format.\n * V2 format: { interfaceProp: { type: \"localPropertyImplementation\", propertyApiName: \"objectProp\" } }\n * V1 format: { interfaceProp: \"objectProp\" }\n */\nfunction convertInterfaceToObjectTypeMappingsV2ToV1(mappingsV2) {\n return Object.fromEntries(Object.entries(mappingsV2).map(([interfaceApiName, objectTypeMappingsV2]) => [interfaceApiName, Object.fromEntries(Object.entries(objectTypeMappingsV2).map(([objectTypeName, propertyMappings]) => [objectTypeName, Object.fromEntries(Object.entries(propertyMappings).filter(([, impl]) => impl.type === \"localPropertyImplementation\").map(([interfaceProp, impl]) => [interfaceProp, impl.propertyApiName]))]))]));\n}","/*\n * Copyright 2024 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\n/**\n * A simple cache that can be used to store values for a given client.\n */\n\n/**\n * @internal\n * A simple async cache that can be used to store values for a given client.\n */\n\n/** @internal */\n\n/**\n * @internal\n * Create a new cache without a factory function.\n */\n\n/**\n * @internal\n * Create a new cache with a factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n */\n\nexport function createClientCache(fn) {\n const cache = new WeakMap();\n function get(client, key) {\n if (cache.get(client.clientCacheKey) == null) {\n cache.set(client.clientCacheKey, new Map());\n }\n const r = cache.get(client.clientCacheKey).get(key);\n if (r === undefined && fn !== undefined) {\n return set(client, key, fn(client, key));\n } else {\n return r;\n }\n }\n function set(client, key, value) {\n if (cache.get(client.clientCacheKey) == null) {\n cache.set(client.clientCacheKey, new Map());\n }\n cache.get(client.clientCacheKey).set(key, value);\n return value;\n }\n function remove(client, key) {\n if (cache.get(client.clientCacheKey) == null) return false;\n return cache.get(client.clientCacheKey).delete(key);\n }\n return {\n get,\n set,\n remove\n };\n}\n\n/** @internal */\n\n/**\n * @internal\n * Create a new cache with an async factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n * @returns\n */\nexport function createAsyncClientCache(fn, createCacheLocal = createClientCache) {\n const cache = createCacheLocal();\n const inProgress = createCacheLocal();\n const ret = {\n getOrUndefined: function getOrUndefined(client, key) {\n return cache.get(client, key);\n },\n get: async function get(client, key) {\n return cache.get(client, key) ?? inProgress.get(client, key) ?? ret.set(client, key, fn(client, key));\n },\n set: async function set(client, k, v) {\n // the `.set` happens first to prevent races.\n try {\n const r = await inProgress.set(client, k, v); // returns v\n\n cache.set(client, k, r);\n inProgress.remove(client, k);\n return r;\n } catch (e) {\n // we don't want to cache failures\n inProgress.remove(client, k);\n throw e;\n }\n }\n };\n return ret;\n}","/*\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 function deepFreeze(obj) {\n Object.getOwnPropertyNames(obj).forEach(name => {\n const prop = obj[name];\n if (typeof prop === \"object\" && prop != null && !Object.isFrozen(prop)) {\n deepFreeze(prop);\n }\n });\n return Object.freeze(obj);\n}","/*\n * Copyright 2024 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 * as ActionTypesV2 from \"@osdk/foundry.ontologies/ActionTypeV2\";\nexport async function loadActionMetadata(client, actionType) {\n const r = await ActionTypesV2.get(client, await client.ontologyRid, actionType, {\n branch: client.branch\n });\n const {\n wireActionTypeV2ToSdkActionMetadata\n } = await import(\"@osdk/generator-converters\");\n return wireActionTypeV2ToSdkActionMetadata(r);\n}","/*\n * Copyright 2024 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 * as ObjectTypesV2 from \"@osdk/foundry.ontologies/ObjectTypeV2\";\nexport async function loadFullObjectMetadata(client, objectType) {\n const full = await ObjectTypesV2.getFullMetadata(client, await client.ontologyRid, objectType, {\n preview: true,\n branch: client.branch\n });\n const {\n wireObjectTypeFullMetadataToSdkObjectMetadata\n } = await import(\"@osdk/generator-converters\");\n const ret = wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);\n return {\n ...ret\n };\n}","/*\n * Copyright 2024 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 * as OntologyInterfaces from \"@osdk/foundry.ontologies/OntologyInterface\";\nexport async function loadInterfaceMetadata(client, objectType) {\n const r = await OntologyInterfaces.get(client, await client.ontologyRid, objectType, {\n preview: true,\n branch: client.branch\n });\n const {\n wireInterfaceTypeV2ToSdkObjectDefinition\n } = await import(\"@osdk/generator-converters\");\n return wireInterfaceTypeV2ToSdkObjectDefinition(r, true);\n}","/*\n * Copyright 2024 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 * as QueryTypes from \"@osdk/foundry.ontologies/QueryType\";\nexport async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {\n const [apiName, version] = queryTypeApiNameAndVersion.split(\":\");\n const r = await QueryTypes.get(client, await client.ontologyRid, apiName, {\n version\n });\n const {\n wireQueryTypeV2ToSdkQueryMetadata\n } = await import(\"@osdk/generator-converters\");\n return wireQueryTypeV2ToSdkQueryMetadata(r);\n}","/*\n * Copyright 2024 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 { createAsyncClientCache } from \"../object/Cache.js\";\nimport { deepFreeze } from \"../util/deepFreeze.js\";\nimport { loadActionMetadata } from \"./loadActionMetadata.js\";\nimport { loadFullObjectMetadata } from \"./loadFullObjectMetadata.js\";\nimport { loadInterfaceMetadata } from \"./loadInterfaceMetadata.js\";\nimport { loadQueryMetadata } from \"./loadQueryMetadata.js\";\nimport { InterfaceDefinitions } from \"./OntologyProvider.js\";\nexport const createStandardOntologyProviderFactory = client => {\n return client => {\n async function loadObject(client, key) {\n const objectDef = await loadFullObjectMetadata(client, key);\n\n // ensure we have all of the interfaces loaded\n const interfaceDefs = Object.fromEntries((await Promise.all(objectDef.implements?.map(i => ret.getInterfaceDefinition(i)) ?? [])).map(i => [i.apiName, {\n def: i,\n handler: undefined\n }]));\n const fullObjectDef = {\n ...objectDef,\n [InterfaceDefinitions]: interfaceDefs\n };\n return deepFreeze(fullObjectDef);\n }\n async function loadInterface(client, key) {\n return deepFreeze(await loadInterfaceMetadata(client, key));\n }\n async function loadQuery(client, key) {\n return loadQueryMetadata(client, key);\n }\n async function loadAction(client, key) {\n const r = await loadActionMetadata(client, key);\n return r;\n }\n function makeGetter(fn) {\n const cache = createAsyncClientCache((client, key) => fn(client, key, false));\n return async apiName => {\n return await cache.get(client, apiName);\n };\n }\n function makeQueryGetter(client, fn) {\n const queryCache = createAsyncClientCache((client, key) => {\n return fn(client, key);\n });\n return async (apiName, version) => {\n const key = version ? `${apiName}:${version}` : apiName;\n return await queryCache.get(client, key);\n };\n }\n const ret = {\n getObjectDefinition: makeGetter(loadObject),\n getInterfaceDefinition: makeGetter(loadInterface),\n getActionDefinition: makeGetter(loadAction),\n getQueryDefinition: makeQueryGetter(client, loadQuery)\n };\n return ret;\n };\n};","/*\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 const USER_AGENT = `osdk-client/${process.env.PACKAGE_VERSION}`;\nexport const OBSERVABLE_USER_AGENT = `osdk-observable-client/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 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 { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { convertWireToOsdkObjects } from \"./object/convertWireToOsdkObjects.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { createStandardOntologyProviderFactory } from \"./ontology/StandardOntologyProvider.js\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n\n/** @internal */\nexport function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {\n if (process.env.NODE_ENV !== \"production\") {\n try {\n new URL(baseUrl);\n } catch (e) {\n const hint = !baseUrl.startsWith(\"http://\") || !baseUrl.startsWith(\"https://\") ? \". Did you forget to add 'http://' or 'https://'?\" : \"\";\n throw new Error(`Invalid stack URL: ${baseUrl}${hint}`);\n }\n }\n const minimalClient = {\n ...createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn, options.headers),\n objectSetFactory,\n objectFactory: convertWireToOsdkObjects,\n ontologyRid: metadata.ontologyRid,\n logger: options.logger,\n transactionId: options.transactionId,\n flushEdits: options.flushEdits,\n scenarioRid: options.scenarioRid,\n clientCacheKey: {},\n requestContext: {},\n branch: options.branch,\n narrowTypeInterfaceOrObjectMapping: {}\n };\n return Object.freeze(Object.assign(minimalClient, {\n ontologyProvider: createOntologyProviderFactory(options)(minimalClient)\n }));\n}","/*\n * Copyright 2024 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 { InterfaceDefinitions } from \"./ontology/OntologyProvider.js\";\n\n/** @internal */\nexport const fetchMetadataInternal = async (client, definition) => {\n if (definition.type === \"object\") {\n const {\n [InterfaceDefinitions]: interfaceDefs,\n ...objectTypeDef\n } = await client.ontologyProvider.getObjectDefinition(definition.apiName);\n return objectTypeDef;\n } else if (definition.type === \"interface\") {\n return client.ontologyProvider.getInterfaceDefinition(definition.apiName);\n } else if (definition.type === \"action\") {\n return client.ontologyProvider.getActionDefinition(definition.unsanitizedApiName ?? definition.apiName);\n } else if (definition.type === \"query\") {\n return client.ontologyProvider.getQueryDefinition(definition.apiName, definition.isFixedVersion ? definition.version : undefined);\n } else {\n throw new Error(\"Not implemented for given definition\");\n }\n};","/*\n * Copyright 2026 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 function makeMediaTransformation(transformation) {\n if (\"$image\" in transformation && transformation.$image != null) {\n const t = transformation.$image;\n return {\n type: \"image\",\n encoding: {\n type: t.$encoding\n },\n operations: t.$operations.map(convertImageOperation)\n };\n } else if (\"$video\" in transformation && transformation.$video != null) {\n const t = transformation.$video;\n return {\n type: \"video\",\n encoding: {\n type: t.$encoding\n },\n operation: convertVideoOperation(t.$operation)\n };\n } else if (\"$audio\" in transformation && transformation.$audio != null) {\n return {\n type: \"audio\",\n operation: convertAudioOperation(transformation.$audio.$operation)\n };\n } else if (\"$emailToText\" in transformation && transformation.$emailToText != null) {\n return {\n type: \"emailToText\",\n operation: convertEmailToTextOperation(transformation.$emailToText.$operation)\n };\n } else if (\"$spreadsheetToText\" in transformation && transformation.$spreadsheetToText != null) {\n return {\n type: \"spreadsheetToText\",\n operation: convertSpreadsheetToTextOperation(transformation.$spreadsheetToText.$operation)\n };\n } else if (\"$videoToAudio\" in transformation && transformation.$videoToAudio != null) {\n const t = transformation.$videoToAudio;\n return {\n type: \"videoToAudio\",\n encoding: convertAudioEncoding(t.$encoding),\n operation: convertVideoToAudioOperation(t.$operation)\n };\n } else if (\"$audioToText\" in transformation && transformation.$audioToText != null) {\n return {\n type: \"audioToText\",\n operation: convertAudioToTextOperation(transformation.$audioToText.$operation)\n };\n } else if (\"$emailToAttachment\" in transformation && transformation.$emailToAttachment != null) {\n return {\n type: \"emailToAttachment\",\n operation: convertEmailToAttachmentOperation(transformation.$emailToAttachment.$operation)\n };\n } else if (\"$videoToArchive\" in transformation && transformation.$videoToArchive != null) {\n const t = transformation.$videoToArchive;\n return {\n type: \"videoToArchive\",\n encoding: {\n type: t.$encoding\n },\n operation: convertVideoToArchiveOperation(t.$operation)\n };\n } else if (\"$videoToText\" in transformation && transformation.$videoToText != null) {\n return {\n type: \"videoToText\",\n operation: convertVideoToTextOperation(transformation.$videoToText.$operation)\n };\n } else if (\"$imageToText\" in transformation && transformation.$imageToText != null) {\n return {\n type: \"imageToText\",\n operation: convertImageToTextOperation(transformation.$imageToText.$operation)\n };\n } else if (\"$videoToImage\" in transformation && transformation.$videoToImage != null) {\n const t = transformation.$videoToImage;\n return {\n type: \"videoToImage\",\n encoding: {\n type: t.$encoding\n },\n operation: convertVideoToImageOperation(t.$operation)\n };\n } else if (\"$imageToDocument\" in transformation && transformation.$imageToDocument != null) {\n return {\n type: \"imageToDocument\",\n operation: convertImageToDocumentOperation(transformation.$imageToDocument.$operation)\n };\n } else if (\"$dicomToImage\" in transformation && transformation.$dicomToImage != null) {\n const t = transformation.$dicomToImage;\n return {\n type: \"dicomToImage\",\n encoding: {\n type: t.$encoding\n },\n operation: convertDicomToImageOperation(t.$operation)\n };\n } else if (\"$documentToDocument\" in transformation && transformation.$documentToDocument != null) {\n const t = transformation.$documentToDocument;\n return {\n type: \"documentToDocument\",\n encoding: {\n type: t.$encoding\n },\n operation: convertDocumentToDocumentOperation(t.$operation)\n };\n } else if (\"$documentToImage\" in transformation && transformation.$documentToImage != null) {\n const t = transformation.$documentToImage;\n return {\n type: \"documentToImage\",\n encoding: {\n type: t.$encoding\n },\n operation: convertDocumentToImageOperation(t.$operation)\n };\n } else if (\"$imageToEmbedding\" in transformation && transformation.$imageToEmbedding != null) {\n return {\n type: \"imageToEmbedding\",\n operation: convertImageToEmbeddingOperation(transformation.$imageToEmbedding.$operation)\n };\n } else {\n return {\n type: \"documentToText\",\n operation: convertDocumentToTextOperation(transformation.$documentToText.$operation)\n };\n }\n}\n\n// ─── Shared converters ──────────────────────────────────────────────────────\n\nfunction convertAudioEncoding(encoding) {\n if (typeof encoding === \"string\") {\n if (encoding === \"mp3\") {\n return {\n type: \"mp3\"\n };\n } else {\n return {\n type: \"ts\"\n };\n }\n }\n return {\n type: \"wav\",\n sampleRate: encoding.$wav.$sampleRate,\n audioChannelLayout: encoding.$wav.$audioChannelLayout != null ? {\n type: \"numberOfChannels\",\n numberOfChannels: encoding.$wav.$audioChannelLayout.$numberOfChannels\n } : undefined\n };\n}\nfunction convertPageRange(range) {\n return {\n startPageInclusive: range.$startPageInclusive,\n endPageExclusive: range.$endPageExclusive\n };\n}\nfunction convertOcrOutputFormat(fmt) {\n if (\"$hocr\" in fmt) {\n return {\n type: \"hocr\"\n };\n } else {\n return {\n type: \"text\"\n };\n }\n}\nfunction convertOcrLanguageOrScript(item) {\n if (\"$language\" in item && item.$language != null) {\n return {\n type: \"language\",\n language: item.$language\n };\n } else {\n const script = item.$script;\n return {\n type: \"script\",\n script\n };\n }\n}\nfunction convertOcrParameters(params) {\n return {\n outputFormat: convertOcrOutputFormat(params.$outputFormat),\n languages: params.$languages.map(convertOcrLanguageOrScript)\n };\n}\nfunction convertLayoutAwareExtractionParameters(params) {\n return {\n languages: params.$languages\n };\n}\nfunction convertDocumentTextExtractionConfig(config) {\n return {\n format: config.$format,\n mode: config.$mode,\n languages: config.$languages.map(convertOcrLanguageOrScript)\n };\n}\nfunction convertTranscribeOutputFormat(fmt) {\n if (\"$plainTextNoSegmentData\" in fmt && fmt.$plainTextNoSegmentData != null) {\n return {\n type: \"plainTextNoSegmentData\",\n addTimestamps: fmt.$plainTextNoSegmentData.$addTimestamps\n };\n } else if (\"$json\" in fmt) {\n return {\n type: \"json\"\n };\n } else {\n return {\n type: \"pttml\"\n };\n }\n}\nfunction convertLlmSpec(spec) {\n return {\n type: \"chat\",\n chat: {\n modelLocator: {\n type: \"apiName\",\n apiName: spec.$chat.$modelLocator\n },\n systemPrompt: spec.$chat.$systemPrompt,\n userPrompt: spec.$chat.$userPrompt,\n maxTokens: spec.$chat.$maxTokens\n }\n };\n}\nfunction convertVlmPreprocessingConfig(config) {\n if (\"$layoutAware\" in config && config.$layoutAware != null) {\n return {\n type: \"layoutAware\",\n layoutAware: {\n transformationConfig: convertDocumentTextExtractionConfig(config.$layoutAware.$transformationConfig),\n cropConfig: config.$layoutAware.$cropConfig != null ? {\n tablePrompt: config.$layoutAware.$cropConfig.$tablePrompt\n } : undefined\n }\n };\n } else {\n const ext = config.$extractText;\n return {\n type: \"extractText\",\n extractText: convertDocumentTextExtractionConfig(ext)\n };\n }\n}\nfunction convertImageSpec(spec) {\n return {\n resizingMode: spec.$resizingMode,\n height: spec.$height,\n width: spec.$width,\n mimeType: spec.$mimeType\n };\n}\n\n// ─── Operation converters ───────────────────────────────────────────────────\n\nfunction convertImageOperation(op) {\n if (\"$resize\" in op && op.$resize != null) {\n return {\n type: \"resize\",\n width: op.$resize.$width,\n height: op.$resize.$height,\n autoOrient: op.$resize.$autoOrient\n };\n } else if (\"$resizeToFitBoundingBox\" in op && op.$resizeToFitBoundingBox != null) {\n return {\n type: \"resizeToFitBoundingBox\",\n width: op.$resizeToFitBoundingBox.$width,\n height: op.$resizeToFitBoundingBox.$height\n };\n } else if (\"$rotate\" in op && op.$rotate != null) {\n return {\n type: \"rotate\",\n angle: op.$rotate.$angle\n };\n } else if (\"$crop\" in op && op.$crop != null) {\n return {\n type: \"crop\",\n xOffset: op.$crop.$xOffset,\n yOffset: op.$crop.$yOffset,\n width: op.$crop.$width,\n height: op.$crop.$height\n };\n } else if (\"$grayscale\" in op) {\n return {\n type: \"grayscale\"\n };\n } else {\n const tile = op.$tile;\n return {\n type: \"tile\",\n zoom: tile.$zoom,\n x: tile.$x,\n y: tile.$y\n };\n }\n}\nfunction convertVideoOperation(op) {\n if (\"$transcode\" in op) {\n return {\n type: \"transcode\"\n };\n } else {\n const chunk = op.$chunk;\n return {\n type: \"chunk\",\n chunkDurationMilliseconds: chunk.$chunkDurationMilliseconds,\n chunkIndex: chunk.$chunkIndex\n };\n }\n}\nfunction convertAudioOperation(op) {\n if (\"$channel\" in op && op.$channel != null) {\n return {\n type: \"channel\",\n encodeFormat: convertAudioEncoding(op.$channel.$encodeFormat),\n channel: op.$channel.$channel\n };\n } else if (\"$chunk\" in op && op.$chunk != null) {\n return {\n type: \"chunk\",\n encodeFormat: convertAudioEncoding(op.$chunk.$encodeFormat),\n chunkDurationMilliseconds: op.$chunk.$chunkDurationMilliseconds,\n chunkIndex: op.$chunk.$chunkIndex\n };\n } else {\n const convert = op.$convert;\n return {\n type: \"convert\",\n encodeFormat: convertAudioEncoding(convert.$encodeFormat)\n };\n }\n}\nfunction convertVideoToAudioOperation(_op) {\n return {\n type: \"extractAudio\"\n };\n}\nfunction convertAudioToTextOperation(op) {\n if (\"$transcribe\" in op && op.$transcribe != null) {\n return {\n type: \"transcribe\",\n language: op.$transcribe.$language,\n diarize: op.$transcribe.$diarize,\n outputFormat: op.$transcribe.$outputFormat != null ? convertTranscribeOutputFormat(op.$transcribe.$outputFormat) : undefined,\n performanceMode: op.$transcribe.$performanceMode\n };\n } else {\n const waveform = op.$waveform;\n return {\n type: \"waveform\",\n peaksPerSecond: waveform.$peaksPerSecond\n };\n }\n}\nfunction convertEmailToTextOperation(op) {\n return {\n type: \"getEmailBody\",\n outputFormat: op.$getEmailBody.$outputFormat\n };\n}\nfunction convertEmailToAttachmentOperation(op) {\n return {\n type: \"getEmailAttachment\",\n mimeType: op.$getEmailAttachment.$mimeType,\n attachmentIndex: op.$getEmailAttachment.$attachmentIndex\n };\n}\nfunction convertSpreadsheetToTextOperation(op) {\n return {\n type: \"convertSheetToJson\",\n sheetName: op.$convertSheetToJson.$sheetName\n };\n}\nfunction convertVideoToArchiveOperation(op) {\n return {\n type: \"extractSceneFrames\",\n encoding: {\n type: op.$extractSceneFrames.$encoding\n },\n sceneScore: op.$extractSceneFrames.$sceneScore\n };\n}\nfunction convertVideoToTextOperation(op) {\n return {\n type: \"getTimestampsForSceneFrames\",\n sceneScore: op.$getTimestampsForSceneFrames.$sceneScore\n };\n}\nfunction convertImageToTextOperation(op) {\n if (\"$extractLayoutAwareContent\" in op && op.$extractLayoutAwareContent != null) {\n return {\n type: \"extractLayoutAwareContent\",\n parameters: convertLayoutAwareExtractionParameters(op.$extractLayoutAwareContent.$parameters)\n };\n } else {\n const ocr = op.$ocr;\n return {\n type: \"ocr\",\n parameters: convertOcrParameters(ocr.$parameters)\n };\n }\n}\nfunction convertVideoToImageOperation(op) {\n if (\"$extractFirstFrame\" in op && op.$extractFirstFrame != null) {\n return {\n type: \"extractFirstFrame\",\n height: op.$extractFirstFrame.$height,\n width: op.$extractFirstFrame.$width\n };\n } else {\n const ext = op.$extractFramesAtTimestamps;\n return {\n type: \"extractFramesAtTimestamps\",\n height: ext.$height,\n width: ext.$width,\n timestamp: ext.$timestamp\n };\n }\n}\nfunction convertImageToDocumentOperation(_op) {\n return {\n type: \"createPdf\"\n };\n}\nfunction convertDicomToImageOperation(op) {\n return {\n type: \"renderImageLayer\",\n layerNumber: op.$renderImageLayer.$layerNumber,\n height: op.$renderImageLayer.$height,\n width: op.$renderImageLayer.$width\n };\n}\nfunction convertDocumentToDocumentOperation(op) {\n if (\"$slicePdfRange\" in op && op.$slicePdfRange != null) {\n return {\n type: \"slicePdfRange\",\n startPageInclusive: op.$slicePdfRange.$startPageInclusive,\n endPageExclusive: op.$slicePdfRange.$endPageExclusive,\n strictlyEnforceEndPage: op.$slicePdfRange.$strictlyEnforceEndPage\n };\n } else {\n return {\n type: \"convertDocument\"\n };\n }\n}\nfunction convertDocumentToImageOperation(op) {\n if (\"$renderPage\" in op && op.$renderPage != null) {\n return {\n type: \"renderPage\",\n pageNumber: op.$renderPage.$pageNumber,\n height: op.$renderPage.$height,\n width: op.$renderPage.$width\n };\n } else {\n const bb = op.$renderPageToFitBoundingBox;\n return {\n type: \"renderPageToFitBoundingBox\",\n pageNumber: bb.$pageNumber,\n width: bb.$width,\n height: bb.$height\n };\n }\n}\nfunction convertImageToEmbeddingOperation(op) {\n return {\n type: \"generateEmbedding\",\n modelId: op.$generateEmbedding.$modelId\n };\n}\nfunction convertDocumentToTextOperation(op) {\n if (\"$extractAllText\" in op) {\n return {\n type: \"extractAllText\"\n };\n } else if (\"$extractTableOfContents\" in op) {\n return {\n type: \"extractTableOfContents\"\n };\n } else if (\"$getPdfPageDimensions\" in op) {\n return {\n type: \"getPdfPageDimensions\"\n };\n } else if (\"$extractFormFields\" in op) {\n return {\n type: \"extractFormFields\"\n };\n } else if (\"$extractUnstructuredTextFromPage\" in op && op.$extractUnstructuredTextFromPage != null) {\n return {\n type: \"extractUnstructuredTextFromPage\",\n pageNumber: op.$extractUnstructuredTextFromPage.$pageNumber\n };\n } else if (\"$extractTextFromPagesToArray\" in op && op.$extractTextFromPagesToArray != null) {\n return {\n type: \"extractTextFromPagesToArray\",\n startPage: op.$extractTextFromPagesToArray.$startPage,\n endPage: op.$extractTextFromPagesToArray.$endPage\n };\n } else if (\"$ocrOnPage\" in op && op.$ocrOnPage != null) {\n return {\n type: \"ocrOnPage\",\n pageNumber: op.$ocrOnPage.$pageNumber,\n parameters: convertOcrParameters(op.$ocrOnPage.$parameters)\n };\n } else if (\"$ocrOnPages\" in op && op.$ocrOnPages != null) {\n return {\n type: \"ocrOnPages\",\n pageNumber: op.$ocrOnPages.$pageNumber,\n parameters: convertOcrParameters(op.$ocrOnPages.$parameters)\n };\n } else if (\"$extractLayoutAwareContent\" in op && op.$extractLayoutAwareContent != null) {\n return {\n type: \"extractLayoutAwareContent\",\n parameters: convertLayoutAwareExtractionParameters(op.$extractLayoutAwareContent.$parameters)\n };\n } else if (\"$extractLayoutAwareTextV2\" in op && op.$extractLayoutAwareTextV2 != null) {\n return {\n type: \"extractLayoutAwareTextV2\",\n pageRange: op.$extractLayoutAwareTextV2.$pageRange != null ? convertPageRange(op.$extractLayoutAwareTextV2.$pageRange) : undefined,\n config: convertDocumentTextExtractionConfig(op.$extractLayoutAwareTextV2.$config)\n };\n } else if (\"$extractTextV2\" in op && op.$extractTextV2 != null) {\n return {\n type: \"extractTextV2\",\n pageRange: op.$extractTextV2.$pageRange != null ? convertPageRange(op.$extractTextV2.$pageRange) : undefined,\n config: convertDocumentTextExtractionConfig(op.$extractTextV2.$config)\n };\n } else {\n const vlm = op.$extractVlmText;\n return {\n type: \"extractVlmText\",\n llmSpec: convertLlmSpec(vlm.$llmSpec),\n preprocessingConfiguration: vlm.$preprocessingConfiguration != null ? convertVlmPreprocessingConfig(vlm.$preprocessingConfiguration) : undefined,\n imageSpec: vlm.$imageSpec != null ? convertImageSpec(vlm.$imageSpec) : undefined,\n outputFormat: vlm.$outputFormat,\n pageRange: vlm.$pageRange != null ? convertPageRange(vlm.$pageRange) : undefined\n };\n }\n}","/*\n * Copyright 2024 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 { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference, __EXPERIMENTAL__NOT_SUPPORTED_YET__executeStreamingFunction, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet, __EXPERIMENTAL__NOT_SUPPORTED_YET__transformAndWait } from \"@osdk/api/unstable\";\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { applyAction } from \"./actions/applyAction.js\";\nimport { additionalContext } from \"./Client.js\";\nimport { createMinimalClient } from \"./createMinimalClient.js\";\nimport { fetchMetadataInternal } from \"./fetchMetadata.js\";\nimport { makeMediaTransformation } from \"./internal/conversions/makeMediaTransformation.js\";\nimport { MinimalLogger } from \"./logger/MinimalLogger.js\";\nimport { fetchPage, fetchStaticRidPage } from \"./object/fetchPage.js\";\nimport { fetchSingle } from \"./object/fetchSingle.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { ObjectSetListenerWebsocket } from \"./objectSet/ObjectSetListenerWebsocket.js\";\nimport { applyQuery } from \"./queries/applyQuery.js\";\n\n// We import it this way to keep compatible with CJS. If we referenced the\n// value of `symbolClientContext` directly, then we would have to a dynamic import\n// in `createClientInternal` which would make it async and a break.\n// Since this is just a string in `@osdk/shared.client2` instead of a symbol,\n// we can safely perform this trick.\n\nclass ActionInvoker {\n constructor(clientCtx, actionDef) {\n // We type the property as a generic function as binding `applyAction`\n // doesn't return a type thats all that useful anyway\n // The implements covers us for the most part here as this exact type doesn't\n // escape this file\n this.applyAction = applyAction.bind(undefined, clientCtx, actionDef);\n this.batchApplyAction = applyAction.bind(undefined, clientCtx, actionDef);\n }\n}\nclass QueryInvoker {\n constructor(clientCtx, queryDef) {\n this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);\n }\n}\n\n/** @internal */\nexport function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, baseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {\n if (typeof ontologyRid === \"string\") {\n if (!ontologyRid.startsWith(\"ri.\")) {\n throw new Error(\"Invalid ontology RID\");\n }\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ontologyRid.then(ontologyRid => {\n if (!ontologyRid.startsWith(\"ri.\")) {\n // FIXME this promise is not await so this just shows up as an unhandled promise rejection\n throw new Error(\"Invalid ontology RID\");\n }\n });\n }\n const clientCtx = createMinimalClient({\n ontologyRid\n }, baseUrl, tokenProvider, {\n ...options,\n logger: options?.logger ?? new MinimalLogger(),\n transactionId: transactionRid,\n flushEdits,\n scenarioRid,\n branch: options?.UNSTABLE_DO_NOT_USE_BRANCH\n }, fetchFn, objectSetFactory);\n return createClientFromContext(clientCtx);\n}\n\n/**\n * @internal\n */\nexport function createClientFromContext(clientCtx) {\n function clientFn(o) {\n if (o.type === \"object\" || o.type === \"interface\") {\n return clientCtx.objectSetFactory(o, clientCtx);\n } else if (o.type === \"action\") {\n return new ActionInvoker(clientCtx, o); // then as any for dealing with the conditional return value\n } else if (o.type === \"query\") {\n return new QueryInvoker(clientCtx, o);\n } else if (o.type === \"experiment\") {\n switch (o.name) {\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__executeStreamingFunction.name:\n return {\n async *executeStreamingFunction(query, params) {\n const {\n applyStreamingQuery\n } = await import(\"./queries/applyStreamingQuery.js\");\n yield* applyStreamingQuery(clientCtx, query, params);\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks.name:\n return {\n async *getBulkLinks(objs, linkTypes) {\n const {\n createBulkLinksAsyncIterFactory\n } = await import(\"./__unstable/createBulkLinksAsyncIterFactory.js\");\n yield* createBulkLinksAsyncIterFactory(clientCtx)(objs, linkTypes);\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:\n return {\n fetchOneByRid: async (objectType, rid, options) => {\n return await fetchSingle(clientCtx, objectType, options, createWithRid([rid]));\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:\n return {\n createMediaReference: async args => {\n const {\n data,\n fileName,\n objectType,\n propertyType\n } = args;\n const {\n upload\n } = await import(\"@osdk/foundry.ontologies/MediaReferenceProperty\");\n return await upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {\n mediaItemPath: fileName,\n preview: true\n });\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:\n return {\n fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {\n return await fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));\n },\n fetchPageByRidNoType: async (rids, options) => {\n return await fetchStaticRidPage(clientCtx, rids, options ?? {});\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:\n return {\n subscribeToNoTypeObjectSet: (rid, listener, opts) => {\n const unsubscribe = ObjectSetListenerWebsocket.getInstance(clientCtx).subscribeWithoutType({\n type: \"reference\",\n reference: rid\n }, listener, opts?.includeRid ?? false);\n return {\n unsubscribe\n };\n }\n };\n case __EXPERIMENTAL__NOT_SUPPORTED_YET__transformAndWait.name:\n return {\n transformAndWait: async args => {\n const {\n transformAndWaitInternal\n } = await import(\"./util/transformAndWaitInternal.js\");\n const {\n mediaSetRid,\n mediaItemRid,\n token\n } = args.mediaReference.reference.mediaSetViewItem;\n return transformAndWaitInternal(clientCtx, mediaSetRid, mediaItemRid, makeMediaTransformation(args.transformation), token, args.options);\n }\n };\n }\n throw new Error(\"not implemented\");\n } else {\n throw new Error(\"not implemented\");\n }\n }\n const fetchMetadata = fetchMetadataInternal.bind(undefined, clientCtx);\n const symbolClientContext = \"__osdkClientContext\";\n const client = Object.defineProperties(clientFn, {\n [oldSymbolClientContext]: {\n value: clientCtx\n },\n [symbolClientContext]: {\n value: clientCtx\n },\n [additionalContext]: {\n value: clientCtx\n },\n fetchMetadata: {\n value: fetchMetadata\n }\n });\n return client;\n}\n\n/**\n * Creates a {@link Client} for interacting with a Foundry Ontology. This is the primary entry point for\n * the OSDK and is typically called once per application during setup. The returned client is then used\n * to load object sets, apply actions, and execute queries against the configured ontology.\n * @param baseUrl - The base URL of the Foundry stack (e.g. `\"https://example.palantirfoundry.com\"`).\n * @param ontologyRid - The ontology RID to scope the client to. May be provided directly or as a `Promise`\n * that resolves to the RID. Typically the generated `$ontologyRid` export from your generated SDK is passed here.\n * @param tokenProvider - A function returning a `Promise` that resolves to a bearer token used to authenticate\n * requests. Typically the OAuth client returned by `createPublicOauthClient` or `createConfidentialOauthClient`\n * from `@osdk/oauth`, which handles caching and refresh; you can also provide a custom function if you\n * manage tokens yourself.\n * @param options - Optional client configuration: a custom `logger`, an experimental `UNSTABLE_DO_NOT_USE_BRANCH`\n * for branch-aware requests, and additional `headers` to include on every request.\n * @param fetchFn - An optional `fetch` implementation to use for all requests. Defaults to the global `fetch`.\n * @example\n * ```ts\n * import { createClient, type Client } from \"@osdk/client\";\n * import { createPublicOauthClient } from \"@osdk/oauth\";\n * import { $ontologyRid } from \"./generatedNoCheck/index.js\";\n *\n * const auth = createPublicOauthClient(\n * \"<your-client-id>\",\n * \"https://example.palantirfoundry.com\",\n * `${window.location.origin}/auth/callback`,\n * );\n *\n * export const client: Client = createClient(\n * \"https://example.palantirfoundry.com\",\n * $ontologyRid,\n * auth,\n * );\n * ```\n * @returns a {@link Client} configured to talk to the given Foundry stack and ontology\n */\nexport const createClient = createClientInternal.bind(undefined, createObjectSet, undefined, undefined, undefined);\nexport const createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(createObjectSet, transactionRid, flushEdits, undefined, ...args);\n\n/** @internal */\nexport const createClientWithScenario = (scenarioRid, ...args) => createClientInternal(createObjectSet, undefined, undefined, scenarioRid, ...args);\nfunction createWithRid(rids) {\n const withRid = {\n type: \"static\",\n \"objects\": rids\n };\n return withRid;\n}"]}
|