@osdk/faux 0.4.0-beta.2 → 0.4.0-beta.4
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 +25 -0
- package/build/browser/FauxFoundry/validateAction.js +85 -13
- package/build/browser/FauxFoundry/validateAction.js.map +1 -1
- package/build/browser/FauxFoundry/validateAction.test.js +522 -0
- package/build/browser/FauxFoundry/validateAction.test.js.map +1 -0
- package/build/browser/errors.js +11 -0
- package/build/browser/errors.js.map +1 -1
- package/build/browser/mock/OntologiesV2/MediaReferenceProperties.js +2 -1
- package/build/browser/mock/OntologiesV2/MediaReferenceProperties.js.map +1 -1
- package/build/cjs/index.cjs +190 -43
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +2 -1
- package/build/esm/FauxFoundry/validateAction.js +85 -13
- package/build/esm/FauxFoundry/validateAction.js.map +1 -1
- package/build/esm/FauxFoundry/validateAction.test.js +522 -0
- package/build/esm/FauxFoundry/validateAction.test.js.map +1 -0
- package/build/esm/errors.js +11 -0
- package/build/esm/errors.js.map +1 -1
- package/build/esm/mock/OntologiesV2/MediaReferenceProperties.js +2 -1
- package/build/esm/mock/OntologiesV2/MediaReferenceProperties.js.map +1 -1
- package/build/types/FauxFoundry/validateAction.d.ts +2 -1
- package/build/types/FauxFoundry/validateAction.d.ts.map +1 -1
- package/build/types/FauxFoundry/validateAction.test.d.ts +1 -0
- package/build/types/FauxFoundry/validateAction.test.d.ts.map +1 -0
- package/build/types/errors.d.ts.map +1 -1
- package/build/types/mock/OntologiesV2/MediaReferenceProperties.d.ts +2 -1
- package/build/types/mock/OntologiesV2/MediaReferenceProperties.d.ts.map +1 -1
- package/package.json +11 -9
package/build/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/FauxFoundry/typeHelpers/index.ts","../../src/FauxFoundry/typeHelpers/TH_ActionParameterV2.ts","../../src/FauxFoundry/typeHelpers/TH_ActionTypeV2.ts","../../src/FauxFoundry/typeHelpers/ActionTypeBuilder.ts","../../src/BaseError.ts","../../src/errors.ts","../../src/filterObjects.ts","../../src/handlers/util/getPaginationParams.ts","../../src/handlers/authHandlerMiddleware.ts","../../src/handlers/util/handleOpenApiCall.ts","../../src/handlers/util/pageThroughResponseSearchParams.ts","../../src/FauxFoundry/BaseServerObject.ts","../../src/FauxFoundry/FauxDataStoreBatch.ts","../../src/FauxFoundry/filterTimeSeriesData.ts","../../src/FauxFoundry/filterObjects.ts","../../src/FauxFoundry/getObjectsFromSet.ts","../../src/FauxFoundry/ObjectLocator.ts","../../src/FauxFoundry/validateAction.ts","../../src/FauxFoundry/FauxDataStore.ts","../../src/mock/OntologiesV2/index.ts","../../src/mock/OntologiesV2/Actions.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js","../../../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js","../../../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js","../../../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js","../../../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js","../../../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js","../../src/mock/OntologiesV2/ActionTypesV2.ts","../../src/mock/OntologiesV2/AttachmentPropertiesV2.ts","../../src/mock/OntologiesV2/Attachments.ts","../../src/mock/OntologiesV2/LinkedObjectsV2.ts","../../src/mock/OntologiesV2/MediaReferenceProperties.ts","../../src/mock/OntologiesV2/ObjectTypesV2.ts","../../src/mock/OntologiesV2/OntologiesV2.ts","../../src/mock/OntologiesV2/OntologyInterfaces.ts","../../src/mock/OntologiesV2/OntologyObjectSets.ts","../../src/mock/OntologiesV2/OntologyObjectsV2.ts","../../src/mock/OntologiesV2/Queries.ts","../../src/mock/OntologiesV2/QueryTypes.ts","../../src/mock/OntologiesV2/TimeSeriesPropertiesV2.ts","../../src/mock/OntologiesV2/TimeSeriesValueBankProperties.ts","../../src/mock/OntologiesV2/Transactions.ts","../../src/handlers/createActionHandlers.ts","../../src/handlers/util/requireSearchParams.ts","../../src/handlers/createAttachmentHandlers.ts","../../src/handlers/createLoadObjectsHandlers.ts","../../src/handlers/createMediaRefHandlers.ts","../../src/handlers/createMultipassServerHandlers.ts","../../src/handlers/createObjectSetHandlers.ts","../../src/defaultOntologyMetadata.ts","../../src/defaultOntologyForConjure.ts","../../src/handlers/createOntologyHandlers.ts","../../src/handlers/createQueryHandlers.ts","../../src/handlers/createTimeseriesAndGeotimeHandlers.ts","../../src/handlers/createFauxFoundryHandlers.ts","../../src/FauxFoundry/FauxAttachmentStore.ts","../../src/FauxFoundry/FauxOntology.ts","../../src/FauxFoundry/FauxFoundry.ts","../../src/withoutRid.ts"],"names":["crypto","wireActionTypeV2ToSdkActionMetadata","rest","HttpResponse","http","deepEqual","constructNow","isBefore","isAfter","sub","add","invariant","set","ret","DefaultMap","MultiMap","crypto2","inspect","randomUUID","primaryKey","OntologiesV2_exports","apply","applyBatch","symbolClientContext","errorInstanceId","get","_get","upload","_upload","list","_list","aggregate","_aggregate","search","_search","getFullMetadata","_getFullMetadata","getAttachment","readAttachment","read","getLinkedObject","listLinkedObjects","getMediaContent","getMediaMetadata","uploadMedia","getOutgoingLinkType","listOutgoingLinkTypes","loadMetadata","load","loadMultipleObjectTypes","execute","getFirstPoint","getLastPoint","streamPoints","getLatestValue","streamValues","postEdits","valid","semver","crypto3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,m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SAAS,WAAW,CAAG,EAAA;AAC5B,EAAM,MAAA;AAAA,IACJ,KAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,CAAA;AACJ,EAAO,OAAA,CAAA;AACT","file":"index.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { actionTypeBuilder, createActionRid } from \"./ActionTypeBuilder.js\";\nexport { createActionParameterV2 } from \"./TH_ActionParameterV2.js\";\nexport { createAction as createActionType } from \"./TH_ActionTypeV2.js\";","/*\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\nexport function createActionParameterV2(type, required) {\n return {\n dataType: {\n type\n },\n required\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createActionRid } from \"./ActionTypeBuilder.js\";\nexport function createAction({\n apiName,\n parameters,\n rid = createActionRid(),\n operations = [],\n status = \"ACTIVE\",\n description\n}) {\n return {\n apiName,\n parameters,\n rid,\n operations,\n status,\n description: description ?? `Action ${apiName}`\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 { wireActionTypeV2ToSdkActionMetadata } from \"@osdk/generator-converters\";\nimport * as crypto from \"node:crypto\";\nimport { createActionParameterV2 } from \"./TH_ActionParameterV2.js\";\nimport { createAction } from \"./TH_ActionTypeV2.js\";\nexport function actionTypeBuilder(action) {\n return new ActionTypeBuilder(action);\n}\nexport function createActionRid() {\n return `ri.ontology.main.action-type.${crypto.randomUUID()}`;\n}\nexport class ActionTypeBuilder {\n constructor(action) {\n if (typeof action === \"string\") {\n this.action = createAction({\n apiName: action,\n parameters: {}\n });\n } else {\n this.action = action;\n }\n }\n addParameter(paramId, parameter, required = false) {\n const v = typeof parameter === \"string\" ? createActionParameterV2(parameter, required) : parameter;\n return new ActionTypeBuilder({\n ...this.action,\n parameters: {\n ...this.action.parameters,\n [paramId]: v\n }\n });\n }\n build() {\n const actionTypeV2 = this.action;\n const actionMetadata = wireActionTypeV2ToSdkActionMetadata(actionTypeV2\n // cast below is needed because the compile time type also needs `signatures`\n // which we don't create in the conversion.\n );\n return {\n actionTypeV2: this.action,\n actionDefinition: {\n __DefinitionMetadata: actionMetadata,\n apiName: actionMetadata.apiName,\n type: \"action\"\n }\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// These are the shape of the errors that come back from the API.\nexport function isBaseApiError(error) {\n return error && typeof error === \"object\" && \"errorCode\" in error && \"errorName\" in error && \"errorInstanceId\" in error;\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\nconst errorInstanceId = \"errorInstanceId\";\nconst objectTypeRid = \"ri.foundry.main.objectType.1\";\nexport function ObjectTypeDoesNotExistError(objectType) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ObjectTypeNotFound\",\n errorInstanceId,\n parameters: {\n objectType,\n objectTypeRid\n }\n };\n}\nexport function LinkTypeNotFound(objectType, linkType) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"LinkTypeNotFound\",\n errorInstanceId,\n parameters: {\n objectType,\n linkType,\n linkTypeId: undefined\n }\n };\n}\nexport function OntologyNotFoundError(ontology) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"OntologyNotFound\",\n errorInstanceId,\n parameters: {\n ontologyRid: ontology,\n apiName: ontology\n }\n };\n}\nexport function ObjectNotFoundError(objectType, primaryKey) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ObjectNotFound\",\n errorInstanceId,\n parameters: {\n objectType,\n primaryKey\n }\n };\n}\nexport function QueryNotFoundError(queryApiName) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"QueryNotFound\",\n errorInstanceId,\n parameters: {\n query: queryApiName\n }\n };\n}\nexport function ActionNotFoundError() {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ActionNotFound\",\n errorInstanceId,\n parameters: {\n actionRid: \"\"\n }\n };\n}\nexport function InvalidRequest(errorName) {\n return {\n errorCode: \"INVALID_REQUEST\",\n errorName,\n errorInstanceId,\n parameters: {}\n };\n}\nexport const ApplyActionFailedError = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"ApplyActionFailed\",\n errorInstanceId,\n parameters: {}\n};\nexport const ExecuteQueryFailedError = {\n errorCode: \"CONFLICT\",\n errorName: \"QueryEncounteredUserFacingError\",\n errorInstanceId,\n parameters: {\n functionRid: \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n functionVersion: \"0.11.0\",\n message: \"test failed\"\n }\n};\nexport const InvalidContentTypeError = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"InvalidContentType\",\n errorInstanceId,\n parameters: {}\n};\nexport const AttachmentSizeExceededLimitError = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"AttachmentSizeExceededLimit\",\n errorInstanceId,\n parameters: {\n fileSizeBytes: \"230000\",\n fileLimitBytes: \"200000\"\n }\n};\nexport const AttachmentNotFoundError = {\n errorCode: \"NOT_FOUND\",\n errorName: \"AttachmentNotFound\",\n errorInstanceId,\n parameters: {\n attachmentRid: \"ri.attachments.main.attachment.86016861-707f-4292-b258-6a7108915a80\"\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 function subSelectPropertiesUrl(object, url) {\n const properties = new Set(url.searchParams.getAll(\"select\"));\n if (properties.size === 0) {\n return object;\n }\n const result = Object.entries(object).reduce((acc, [key, value]) => {\n if (properties.has(key)) {\n acc[key] = value;\n } else if (key === \"__primaryKey\") {\n acc.__primaryKey = value;\n } else if (key === \"__apiName\") {\n acc.__apiName = value;\n }\n return acc;\n }, {});\n return result;\n}\nexport function subSelectProperties(objects, urlOrProperties, includeCount, excludeRid) {\n let properties;\n if (Array.isArray(urlOrProperties)) {\n properties = new Set(urlOrProperties);\n } else {\n properties = new Set(urlOrProperties.searchParams.getAll(\"select\"));\n }\n const result = objects.data.map(object => {\n // This is set when an object had an interface that was marked to return all properties\n if (object.$propsToReturn) {\n return {\n __apiName: object.__apiName,\n __primaryKey: object.__primaryKey,\n __title: object.__title,\n ...object.$propsToReturn,\n ...(excludeRid ? {} : {\n __rid: object.__rid\n })\n };\n }\n\n // no subselect provided, just handle the rid.\n if (properties.size === 0) {\n return excludeRid ? removeRid(object) : object;\n }\n\n // do subselect\n properties.add(\"__primaryKey\");\n properties.add(\"__apiName\");\n properties.add(\"__title\");\n if (!excludeRid) properties.add(\"__rid\");\n return Object.entries(object).reduce((acc, [key, value]) => {\n if (properties.has(key)) {\n acc[key] = value;\n }\n return acc;\n }, {});\n });\n const ret = {\n nextPageToken: objects.nextPageToken,\n data: result,\n totalCount: objects.totalCount\n };\n return ret;\n}\nfunction removeRid(object) {\n const {\n __rid,\n ...rest\n } = object;\n return rest;\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 getPaginationParamsFromUrl(request) {\n const url = new URL(request.url);\n return {\n pageSize: url.searchParams.get(\"pageSize\") == null ? undefined : Number(url.searchParams.get(\"pageSize\")),\n pageToken: url.searchParams.get(\"pageToken\") == null ? undefined : url.searchParams.get(\"pageToken\")\n };\n}\nexport function getPaginationParamsFromRequest({\n pageSize,\n pageToken\n}) {\n return {\n pageSize,\n pageToken\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 { HttpResponse } from \"msw\";\nimport { OpenApiCallError } from \"./util/handleOpenApiCall.js\";\nexport function authHandlerMiddleware(handler) {\n return async info => {\n const authHeader = info.request.headers.get(\"authorization\");\n if (!authHeader || authHeader !== `Bearer myAccessToken`) {\n return HttpResponse.json({\n message: \"Missing Authorization header\"\n }, {\n status: 401\n });\n }\n try {\n return await handler(info);\n } catch (e) {\n if (e instanceof OpenApiCallError) {\n return HttpResponse.json(e.json, {\n status: e.status\n });\n }\n throw e;\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 { http, HttpResponse } from \"msw\";\nimport { authHandlerMiddleware } from \"../authHandlerMiddleware.js\";\nexport class OpenApiCallError extends Error {\n constructor(status, json) {\n super(`${json.errorCode} ${json.errorName ?? \"Unknown error\"} ${JSON.stringify(json.parameters)}`);\n this.status = status;\n this.json = json;\n }\n}\n\n/**\n * This relies on a trick that generally our query params and header params are optional therefore\n * the body can generally be assumed to be the first payload following the strings which are path\n * params.\n *\n * This will also fail if your body is defined as a string as that will get interpreted as a path param.\n * If this happens, you cannot use the helper. Sorry\n */\n\nexport function handleOpenApiCall(openApiCall, names) {\n return (baseUrl, restImpl, options) => {\n let captured = {};\n const capture = {\n fetch: (url, req) => {\n const u = new URL(url);\n u.search = \"\"; // msw doesn't want the search string\n captured = {\n method: req.method,\n endPoint: u.toString().replace(/%3A/g, \":\")\n };\n\n // fake a response object so the call doesn't fail\n return {\n ok: true,\n json: () => Promise.resolve({}),\n blob: () => new Blob()\n };\n },\n baseUrl\n };\n\n // we don't care about the promise here, we are just building the url\n void openApiCall(capture, ...names.map(n => `:${n}`),\n // add a simulated blob in here in case of an upload\n {\n type: \"\",\n size: 5\n });\n return http[captured.method.toLowerCase()](captured.endPoint, authHandlerMiddleware(async info => {\n try {\n const result = await restImpl(info);\n if (result instanceof Response) {\n return new HttpResponse(result.body);\n }\n return HttpResponse.json(result);\n } catch (e) {\n if (e instanceof OpenApiCallError) {\n return HttpResponse.json({\n ...e.json,\n stack: e.stack\n }, {\n status: e.status,\n statusText: e.message\n });\n }\n throw e;\n }\n }), options);\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 function pageThroughResponseSearchParams(iter, {\n pageSize = 1000,\n pageToken\n}, includeCount) {\n const data = Array.from(iter);\n const pageCount = Math.ceil(data.length / pageSize);\n const currentPage = pageToken ? Number(pageToken) : 0;\n if (currentPage < 0 || currentPage >= pageCount) {\n return undefined;\n }\n const startIndex = currentPage * pageSize;\n const endIndex = Math.min(startIndex + pageSize, data.length);\n const nextPageToken = currentPage + 1 < pageCount ? (currentPage + 1).toString() : undefined;\n const ret = {\n nextPageToken,\n data: data.slice(startIndex, endIndex),\n ...(includeCount ? {\n totalCount: String(data.length)\n } : {})\n };\n return ret;\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 * A simplified type safe version of `OntologyObjectV2` that adds a tiny bit\n * more strictness in that it declares the meaning of values for the `__` prefix\n * props.\n */\n\n/**\n * Helpful for distinguishing between an object that looks like it is for the server (__apiName)\n * vs one that is for the client ($apiName).\n */\nexport function isBaseServerObject(obj) {\n return typeof obj === \"object\" && obj != null && \"__primaryKey\" in obj && \"__apiName\" in obj && !(\"$apiName\" in obj) && !(\"$primaryKey\" in obj);\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 deepEqual from \"fast-deep-equal\";\nimport { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\n/**\n * This is separate from the FauxDataStore so that we can in the future support\n * this not-committing on errors. That functionality just does not exist at the moment\n */\nexport class FauxDataStoreBatch {\n #fauxDataStore;\n objectEdits = {\n addedLinksCount: 0,\n addedObjectCount: 0,\n deletedLinksCount: 0,\n deletedObjectsCount: 0,\n modifiedObjectsCount: 0,\n edits: []\n };\n constructor(fauxDataStore) {\n this.#fauxDataStore = fauxDataStore;\n }\n getObject = (objectType, primaryKey) => {\n return this.#fauxDataStore.getObjectOrThrow(objectType, primaryKey);\n };\n getObjects = objectType => {\n return this.#fauxDataStore.getObjectsOfType(objectType);\n };\n addObject(objectType, primaryKey, object) {\n const existingObject = this.#fauxDataStore.getObject(objectType, primaryKey);\n if (existingObject) {\n throw new OpenApiCallError(500, {\n errorCode: \"CONFLICT\",\n errorName: \"ObjectAlreadyExists\",\n errorInstanceId: \"\",\n parameters: {\n objectType,\n primaryKey\n },\n errorDescription: \"The object the user is attempting to create already exists.\"\n });\n }\n const fullMetadata = this.#fauxDataStore.ontology.getObjectTypeFullMetadataOrThrow(objectType);\n this.#fauxDataStore.registerObject({\n ...object,\n __apiName: objectType,\n __primaryKey: primaryKey,\n [fullMetadata.objectType.primaryKey]: primaryKey\n });\n this.objectEdits.edits.push({\n type: \"addObject\",\n primaryKey,\n objectType\n });\n this.objectEdits.addedObjectCount += 1;\n }\n modifyObject(objectType, primaryKey, update) {\n const origObj = this.#fauxDataStore.getObjectOrThrow(objectType, primaryKey);\n const newObj = {\n ...origObj,\n ...update\n };\n if (!deepEqual(origObj, newObj)) {\n this.#fauxDataStore.replaceObjectOrThrow(newObj);\n this.objectEdits.edits.push({\n type: \"modifyObject\",\n primaryKey,\n objectType\n });\n this.objectEdits.modifiedObjectsCount += 1;\n }\n }\n deleteObject = (objectType, primaryKey) => {\n this.#fauxDataStore.unregisterObjectOrThrow(objectType, primaryKey);\n this.objectEdits.edits.push({\n type: \"deleteObject\",\n objectType,\n primaryKey: primaryKey\n });\n };\n addLink = (leftObjectType, leftPrimaryKey, leftLinkName, rightObjectType, rightPrimaryKey) => {\n const [leftTypeSideV2, rightTypeSideV2] = this.#fauxDataStore.ontology.getBothLinkTypeSides(leftObjectType, leftLinkName, rightObjectType);\n this.#fauxDataStore.registerLink({\n __apiName: leftObjectType,\n __primaryKey: leftPrimaryKey\n }, leftTypeSideV2.apiName, {\n __apiName: rightObjectType,\n __primaryKey: rightPrimaryKey\n }, rightTypeSideV2.apiName);\n this.objectEdits.edits.push({\n type: \"addLink\",\n aSideObject: {\n objectType: leftObjectType,\n primaryKey: leftPrimaryKey\n },\n bSideObject: {\n objectType: rightObjectType,\n primaryKey: rightPrimaryKey\n },\n linkTypeApiNameAtoB: leftLinkName,\n linkTypeApiNameBtoA: rightTypeSideV2.apiName\n });\n this.objectEdits.addedLinksCount += 1;\n };\n removeLink = (leftObjectType, leftPrimaryKey, leftLinkName, rightObjectType, rightPrimaryKey) => {\n const [leftTypeSideV2, rightTypeSideV2] = this.#fauxDataStore.ontology.getBothLinkTypeSides(leftObjectType, leftLinkName, rightObjectType);\n this.#fauxDataStore.unregisterLink({\n __apiName: leftObjectType,\n __primaryKey: leftPrimaryKey\n }, leftTypeSideV2.apiName, {\n __apiName: rightObjectType,\n __primaryKey: rightPrimaryKey\n }, rightTypeSideV2.apiName);\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { add, constructNow, isAfter, isBefore, sub } from \"date-fns\";\nconst toDuration = {\n \"DAYS\": v => ({\n days: v\n }),\n \"HOURS\": v => ({\n hours: v\n }),\n \"MILLISECONDS\": v => ({\n seconds: v / 1000\n }),\n \"MINUTES\": v => ({\n minutes: v\n }),\n \"MONTHS\": v => ({\n months: v\n }),\n \"SECONDS\": v => ({\n seconds: v\n }),\n \"WEEKS\": v => ({\n weeks: v\n }),\n \"YEARS\": v => ({\n years: v\n })\n};\nexport function filterTimeSeriesData(data, {\n range\n}, now = constructNow(Date.now())) {\n if (!range) {\n return data;\n }\n const start = extractDate(range, \"startTime\", now);\n const end = extractDate(range, \"endTime\", now);\n const ret = data.filter(point => {\n if (range.type === \"relative\") {\n return (!end || isBefore(point.time, end)) && (!start || isAfter(point.time, start));\n } else {\n return (!end || isBefore(point.time, end)) && (!start || isAfter(point.time, start));\n }\n });\n return ret;\n}\nfunction extractDate(range, key, now) {\n if (range.type === \"absolute\") {\n return range[key];\n }\n const x = range[key];\n if (!x) return undefined;\n const method = x.when === \"BEFORE\" ? sub : add;\n return method(now, toDuration[x.unit](x.value));\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/* eslint-disable no-console */\n\nimport invariant from \"tiny-invariant\";\nexport function filterObjects(objects, where) {\n switch (where.type) {\n case \"eq\":\n {\n const {\n propertyIdentifier,\n field\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n const ret = objects.filter(obj => {\n return obj[field] === where.value;\n });\n return ret;\n }\n case \"gt\":\n {\n const {\n propertyIdentifier,\n field\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n return objects.filter(obj => {\n return obj[field] > where.value;\n });\n }\n case \"lt\":\n {\n const {\n propertyIdentifier,\n field\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n return objects.filter(obj => {\n return obj[field] < where.value;\n });\n }\n case \"in\":\n {\n const {\n propertyIdentifier,\n field\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n return objects.filter(obj => {\n return where.value.includes(obj[field]);\n });\n }\n case \"and\":\n {\n const {\n value\n } = where;\n for (const subWhere of value) {\n objects = filterObjects(objects, subWhere);\n }\n return objects;\n }\n case \"not\":\n {\n const {\n value\n } = where;\n return objects.filter(obj => {\n return !filterObjects([obj], value).length;\n });\n }\n case \"isNull\":\n {\n const {\n propertyIdentifier,\n field,\n value\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n return objects.filter(obj => {\n return value ? obj[field] == null : obj[field] != null;\n });\n }\n }\n console.error(\"-=-=-=-=-=-= Unhandled where type: \\n\" + `Unhandled where type: ${where.type} in ${JSON.stringify(where)}`);\n throw new Error(`Unhandled where type: ${where.type} in ${JSON.stringify(where)}`);\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 invariant from \"tiny-invariant\";\nimport { filterObjects } from \"./filterObjects.js\";\nexport function getObjectsFromSet(ds, objectSet, methodInput) {\n switch (objectSet.type) {\n case \"base\":\n const ret = Array.from(ds.getObjectsOfType(objectSet.objectType));\n return ret;\n case \"filter\":\n {\n const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return filterObjects(base, objectSet.where);\n }\n case \"union\":\n {\n const set = new Set();\n for (const objSet of objectSet.objectSets) {\n const objects = getObjectsFromSet(ds, objSet, methodInput);\n for (const obj of objects) {\n set.add(obj);\n }\n }\n return Array.from(set);\n }\n case \"subtract\":\n {\n const set = new Set(getObjectsFromSet(ds, objectSet.objectSets[0], methodInput));\n for (let i = 1; i < objectSet.objectSets.length; i++) {\n const toSubtract = getObjectsFromSet(ds, objectSet.objectSets[i], methodInput);\n for (const obj of toSubtract) {\n set.delete(obj);\n }\n }\n return Array.from(set);\n }\n case \"intersect\":\n {\n const set = new Set(getObjectsFromSet(ds, objectSet.objectSets[0], methodInput));\n for (let i = 1; i < objectSet.objectSets.length; i++) {\n const toIntersect = getObjectsFromSet(ds, objectSet.objectSets[i], methodInput);\n for (const obj of set) {\n const match = toIntersect.find(x => x.__apiName === obj.__apiName && x.__primaryKey === obj.__primaryKey);\n if (!match) {\n set.delete(obj);\n } else if (obj[\"$propsToReturn\"] || match[\"$propsToReturn\"]) {\n obj[\"$propsToReturn\"] = {\n ...obj[\"$propsToReturn\"],\n ...match[\"$propsToReturn\"]\n };\n }\n }\n }\n return Array.from(set);\n }\n case \"searchAround\":\n {\n const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return base.flatMap(o => {\n const ret = ds.getLinksOrThrow(o.__apiName, o.__primaryKey, objectSet.link);\n return ret;\n });\n }\n case \"interfaceLinkSearchAround\":\n {\n const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return base.flatMap(o => {\n const ret = ds.getLinksOrThrow(o.__apiName, o.__primaryKey, objectSet.interfaceLink);\n return ret;\n });\n }\n case \"static\":\n {\n return objectSet.objects.map(x => ds.getObjectByRid(x)).filter(x => x != null);\n }\n case \"withProperties\":\n {\n const {\n derivedProperties\n } = objectSet;\n const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return base.map(obj => {\n const extra = Object.fromEntries(Object.entries(derivedProperties).map(([k, v]) => {\n return [k, getDerivedPropertyValue(ds, obj, v)];\n }));\n return {\n ...obj,\n ...extra\n };\n });\n }\n case \"methodInput\":\n !methodInput ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"expected a methodInput\") : invariant(false) : void 0;\n return [methodInput];\n case \"asBaseObjectTypes\":\n throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);\n case \"asType\":\n throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);\n case \"interfaceBase\":\n const relevantObjectTypes = ds.ontology.getAllObjectTypes().filter(x => objectSet.interfaceType in x.implementsInterfaces2);\n\n // const ifaceDef = ds.ontology.getInterfaceType(objectTypeWithAllPropertyTypes);\n\n return relevantObjectTypes.flatMap(x => Array.from(ds.getObjectsOfType(x.objectType.apiName))).map(obj => {\n const objDef = ds.ontology.getObjectTypeFullMetadataOrThrow(obj.__apiName);\n const ifaceMap = objDef.implementsInterfaces2[objectSet.interfaceType];\n const $propsToReturn = objectSet.includeAllBaseObjectProperties ? obj : Object.fromEntries(Object.values(ifaceMap.properties).map(propApiName => [propApiName, obj[propApiName]]));\n return {\n ...objToInterface(ds, obj, objectSet.interfaceType),\n $propsToReturn\n };\n });\n\n // This does not mimic KNN, it just returns `numNeighbors` objects\n case \"nearestNeighbors\":\n const {\n numNeighbors\n } = objectSet;\n const set = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return set.slice(0, numNeighbors);\n case \"reference\":\n throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);\n }\n throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);\n}\nfunction objToInterface(ds, o, iface) {\n const ifaceDef = ds.ontology.getInterfaceType(iface);\n const propMap = ds.ontology.getObjectTypeFullMetadataOrThrow(o.__apiName).implementsInterfaces2[iface].properties;\n const {\n __apiName,\n __primaryKey,\n __rid,\n __title\n } = o;\n const ret = {\n __apiName,\n __primaryKey,\n __rid,\n __title\n };\n for (const [sptApiName, propApiName] of Object.entries(propMap)) {\n ret[sptApiName] = o[propApiName];\n }\n return ret;\n}\nexport function getDerivedPropertyValue(ds, obj, def) {\n switch (def.type) {\n case \"selection\":\n {\n return getDerivedPropertySelection(ds, obj, def);\n }\n }\n throw new Error(`Unhandled derived property type ${def.type} in ${JSON.stringify(def)}`);\n // return obj[property.propertyIdentifier];\n}\nfunction getDerivedPropertySelection(ds, obj, {\n operation,\n objectSet\n}) {\n switch (operation.type) {\n case \"get\":\n {\n const objs = getObjectsFromSet(ds, objectSet, obj);\n if (objs.length > 1) {\n throw new Error(\"Cannot get more than one object from a set\");\n }\n return objs[0]?.[operation.selectedPropertyApiName];\n }\n case \"collectList\":\n {\n const objs = getObjectsFromSet(ds, objectSet, obj);\n return objs.map(o => o[operation.selectedPropertyApiName]);\n }\n case \"collectSet\":\n {\n const objs = getObjectsFromSet(ds, objectSet, obj);\n return Array.from(new Set(objs.map(o => o[operation.selectedPropertyApiName])));\n }\n case \"count\":\n {\n const objs = getObjectsFromSet(ds, objectSet, obj);\n return objs.length.toString();\n }\n }\n}\nexport function createOrderBySortFn(orderBy) {\n const fns = orderBy.fields.map(({\n field,\n direction\n }) => {\n return (a, b) => {\n const aValue = a?.[field];\n const bValue = b?.[field];\n if (aValue == null && bValue == null) {\n return 0;\n }\n if (aValue == null) {\n return 1;\n }\n if (bValue == null) {\n return -1;\n }\n const m = direction === \"asc\" ? -1 : 1;\n return aValue < bValue ? m : aValue > bValue ? -m : 0;\n };\n });\n return (a, b) => {\n for (const sortFn of fns) {\n const ret = sortFn(a, b);\n if (ret !== 0) {\n return ret;\n }\n }\n return 0;\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nexport function objectLocator(obj) {\n return `${obj.__apiName}:${obj.__primaryKey}`;\n}\nexport function parseLocator(locator) {\n const [objectType, primaryKey] = locator?.split(\":\") ?? [];\n !(objectType && primaryKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid locator format: ${locator}`) : invariant(false) : void 0;\n return {\n objectType,\n primaryKey\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\nexport function validateAction(payload, def, dataStore) {\n const ret = {\n parameters: {},\n submissionCriteria: [],\n result: \"VALID\"\n };\n for (const [k, v] of Object.entries(def.parameters)) {\n const value = payload.parameters[k];\n validateActionParameterType(v.dataType, v, value, ret, k, dataStore);\n }\n return ret;\n}\n\n// So far these all basically return the same thing\n// and can likely be rewritten as a function that return boolean\nfunction validateActionParameterType(dataType, paramDef, value, ret, paramKey, dataStore) {\n if (paramDef.required && value == null) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n result: \"INVALID\",\n evaluatedConstraints: [],\n required: true\n };\n return;\n }\n if (!paramDef.required && value == null) {\n return;\n }\n const baseParam = {\n result: \"INVALID\",\n evaluatedConstraints: [],\n required: paramDef.required\n };\n switch (dataType.type) {\n case \"array\":\n {\n if (!Array.isArray(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n for (const item of value) {\n validateActionParameterType(dataType.subType, paramDef, item, ret, paramKey, dataStore);\n }\n return;\n }\n case \"attachment\":\n {\n if (typeof value !== \"string\") {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n }\n case \"boolean\":\n case \"date\":\n case \"long\":\n case \"double\":\n case \"integer\":\n case \"marking\":\n case \"objectSet\":\n case \"timestamp\":\n case \"object\":\n case \"string\":\n if (!matchesOntologyDataType(dataType, value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n case \"geohash\":\n if (!(typeof value === \"string\")) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n case \"geoshape\":\n if (!(typeof value === \"object\" && (\"coordinates\" in value || \"geometries\" in value || \"features\" in value))) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n case \"interfaceObject\":\n {\n if (!isInterfaceActionParam(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n } else if (dataStore.getObject(value.objectTypeApiName, value.primaryKeyValue) == null) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam,\n evaluatedConstraints: [{\n type: \"objectPropertyValue\"\n }]\n };\n }\n return;\n }\n case \"mediaReference\":\n {\n if (!isMediaReference(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n }\n case \"vector\":\n {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n case \"struct\":\n {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n for (const {\n name,\n fieldType,\n required\n } of dataType.fields) {\n const fieldValue = value[name];\n if (required && fieldValue == null || !matchesOntologyDataType(fieldType, fieldValue)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n }\n return;\n }\n case \"objectType\":\n {\n if (typeof value !== \"string\" || !dataStore.ontology.getObjectTypeFullMetadata(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n return;\n }\n default:\n {\n const _assertNever = dataType;\n throw new Error(`validateDataType: unknown type`);\n }\n }\n}\nfunction matchesOntologyDataType(odt, value) {\n switch (odt.type) {\n case \"any\":\n return true;\n case \"array\":\n return Array.isArray(value) && value.every(v => matchesOntologyDataType(odt.itemType, v));\n case \"binary\":\n throw new Error(`validateDataType: ${odt.type} not implemented yet.`);\n case \"boolean\":\n return typeof value === \"boolean\";\n case \"byte\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"cipherText\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"date\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"decimal\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"double\":\n return typeof value === \"number\";\n case \"float\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"integer\":\n return typeof value === \"number\" && Number.isInteger(value);\n case \"long\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"map\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"marking\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"object\":\n return typeof value === \"string\" || value != null && typeof value === \"object\" && \"$primaryKey\" in value;\n case \"objectSet\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"set\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"short\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"string\":\n return typeof value === \"string\";\n case \"struct\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"timestamp\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"unsupported\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n default:\n const _assertNever = odt;\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n }\n}\nexport function isMediaReference(o) {\n return typeof o === `object` && typeof o.mimeType === \"string\" && \"reference\" in o && typeof o.reference === \"object\" && o.reference.type === \"mediaSetViewItem\" && \"mediaSetViewItem\" in o.reference && typeof o.reference.mediaSetViewItem === \"object\" && typeof o.reference.mediaSetViewItem.mediaSetRid === \"string\" && typeof o.reference.mediaSetViewItem.mediaSetViewRid === \"string\" && typeof o.reference.mediaSetViewItem.mediaItemRid === \"string\";\n}\nexport function isInterfaceActionParam(value) {\n return typeof value === \"object\" && \"objectTypeApiName\" in value && typeof value.objectTypeApiName === \"string\" && \"primaryKeyValue\" in value && (typeof value.primaryKeyValue === \"string\" || typeof value.primaryKeyValue === \"number\" || typeof value.primaryKeyValue === \"boolean\");\n}\nfunction isPoint(obj) {\n return obj.type === \"Point\" && Array.isArray(obj.coordinates) && obj.coordinates.length === 2 && typeof obj.coordinates[0] === \"number\" && typeof obj.coordinates[1] === \"number\";\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 { DefaultMap, MultiMap } from \"mnemonist\";\nimport * as crypto from \"node:crypto\";\nimport { randomUUID } from \"node:crypto\";\nimport { inspect } from \"node:util\";\nimport invariant from \"tiny-invariant\";\nimport { InvalidRequest, ObjectNotFoundError } from \"../errors.js\";\nimport { subSelectProperties } from \"../filterObjects.js\";\nimport { getPaginationParamsFromRequest } from \"../handlers/util/getPaginationParams.js\";\nimport { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\nimport { pageThroughResponseSearchParams } from \"../handlers/util/pageThroughResponseSearchParams.js\";\nimport { isBaseServerObject } from \"./BaseServerObject.js\";\nimport { FauxDataStoreBatch } from \"./FauxDataStoreBatch.js\";\nimport { filterTimeSeriesData } from \"./filterTimeSeriesData.js\";\nimport { createOrderBySortFn, getObjectsFromSet } from \"./getObjectsFromSet.js\";\nimport { objectLocator, parseLocator } from \"./ObjectLocator.js\";\nimport { validateAction } from \"./validateAction.js\";\n\n/**\n * Represents the properties needed to create an object, specifically,\n * the properties of the object and the $apiName\n */\n\n/**\n * Helper type for converting `foo: string | undefined` into `foo?: string`\n */\n\n/**\n * Type safe object for representing \"client\" side objects.\n */\n\nexport class FauxDataStore {\n #objects = new DefaultMap(key => new Map());\n #singleLinks = new DefaultMap(_objectLocator => new Map());\n #manyLinks = new DefaultMap(_objectLocator => new MultiMap(Set));\n #fauxOntology;\n #attachments;\n #timeSeriesData = new DefaultMap(_objectType => new DefaultMap(_pk => new DefaultMap(_property => [])));\n #media = new DefaultMap(_objectType => new DefaultMap(_propName => {\n return new Map();\n }));\n #strict;\n constructor(fauxOntology, attachments, strict) {\n this.#fauxOntology = fauxOntology;\n this.#attachments = attachments;\n this.#strict = strict;\n }\n\n /**\n * Removes all data that is associated with a namespace/ontology.\n *\n * Note: does not clear `attachments` nor does it clear the ontology itself.\n */\n clear() {\n this.#media.clear();\n this.#timeSeriesData.clear();\n this.#manyLinks.clear();\n this.#singleLinks.clear();\n this.#objects.clear();\n }\n get ontology() {\n return this.#fauxOntology;\n }\n #assertObjectExists(objectType, primaryKey) {\n if (!this.getObject(objectType, primaryKey)) {\n throw new OpenApiCallError(404, ObjectNotFoundError(objectType, String(primaryKey)));\n }\n }\n #assertObjectDoesNotExist(objectType, primaryKey) {\n if (this.getObject(objectType, primaryKey)) {\n throw new OpenApiCallError(500, {\n errorCode: \"CONFLICT\",\n errorName: \"ObjectAlreadyExists\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n objectType,\n primaryKey: String(primaryKey)\n },\n errorDescription: \"The object the user is attempting to create already exists.\"\n });\n }\n }\n\n /**\n * Version for use in places like @osdk/client.\n *\n * @param obj An `Osdk.Instance` like object for the ObjectType in the generics\n */\n\n /**\n * Version of register object generally used in shared.test\n * @param obj A raw server side representation of an object\n *\n * Don't use, its too easy to end up with an any.\n */\n\n registerObject(objectType, anyObj) {\n let bso;\n // obj = { ...obj }; // make a copy so we can mutate it\n\n if (isBaseServerObject(objectType)) {\n !(anyObj == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Internal overload should only pass one argument\") : invariant(false) : void 0;\n !!Object.keys(objectType).some(s => s.startsWith(\"$\")) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object should not have any keys starting with $ if it has __apiName\") : invariant(false) : void 0;\n bso = objectType;\n } else if (anyObj == null) {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"should not be possible due to overloads\") : invariant(false) : void 0;\n } else if (isBaseServerObject(anyObj)) {\n !!Object.keys(anyObj).some(s => s.startsWith(\"$\")) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object should not have any keys starting with $ if it has __apiName\") : invariant(false) : void 0;\n bso = anyObj;\n } else {\n bso = this.#osdkCreatableToBso(objectType, anyObj);\n }\n const apiName = bso.__apiName || bso.$apiName;\n !apiName ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object should have an __apiName or $apiName\") : invariant(false) : void 0;\n this.#assertObjectDoesNotExist(apiName, bso.__primaryKey);\n if (!(\"__apiName\" in bso && \"__primaryKey\" in bso)) {\n !(\"$apiName\" in bso && \"$primaryKey\" in bso) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object should have (__apiName and __primaryKey) or ($apiName and $primaryKey)\") : invariant(false) : void 0;\n const {\n $apiName,\n $primaryKey,\n ...others\n } = bso;\n bso = {\n __apiName: $apiName,\n __primaryKey: $primaryKey,\n ...others\n };\n }\n this.#assertObjectDoesNotExist(bso.__apiName, bso.__primaryKey);\n const frozenBso = Object.freeze({\n ...bso\n });\n this.#objects.get(bso.__apiName).set(String(bso.__primaryKey), frozenBso);\n return frozenBso;\n }\n #osdkCreatableToBso(objectType, anyObj) {\n objectType = typeof objectType === \"string\" ? objectType : objectType.apiName;\n if (\"$apiName\" in anyObj) {\n !(anyObj.$apiName === objectType) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n }\n const {\n $apiName,\n $primaryKey,\n ...others\n } = anyObj;\n const meta = this.ontology.getObjectTypeFullMetadataOrThrow(objectType);\n const realPrimaryKey = anyObj[meta.objectType.primaryKey];\n const maybeTitle = anyObj[meta.objectType.titleProperty];\n const rid = anyObj.$rid ?? `ri.phonograph2-objects.main.object.${crypto.randomUUID()}`;\n !(realPrimaryKey != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Object should have a primary key. ${JSON.stringify(anyObj)}`) : invariant(false) : void 0;\n !($primaryKey == null || $primaryKey === realPrimaryKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Primary key mismatch\") : invariant(false) : void 0;\n return {\n __apiName: objectType,\n __primaryKey: realPrimaryKey,\n __title: maybeTitle ? String(maybeTitle) : undefined,\n __rid: rid,\n ...others\n };\n }\n replaceObjectOrThrow(x) {\n const objectType = this.ontology.getObjectTypeFullMetadataOrThrow(x.__apiName);\n const oldObject = this.getObjectOrThrow(x.__apiName, x.__primaryKey);\n const linksToUpdate = [];\n const linksToRemove = [];\n for (const linkDef of objectType.linkTypes) {\n if (linkDef.cardinality === \"ONE\") {\n !(this.#strict && linkDef.foreignKeyPropertyApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Error examining ${objectType.objectType.apiName}.${linkDef.apiName}: ONE side of links should have a foreign key. ${inspect(linkDef, {\n colors: false\n })}`) : invariant(false) : void 0;\n const fkName = linkDef.foreignKeyPropertyApiName;\n const fkValue = x[fkName];\n const oldFkValue = oldObject[fkName];\n if (oldObject[fkName] !== x[fkName]) {\n const dstSide = this.ontology.getOtherLinkTypeSideV2OrThrow(objectType.objectType.apiName, linkDef.apiName);\n const dstLocator = objectLocator({\n __apiName: linkDef.objectTypeApiName,\n __primaryKey: fkValue\n });\n const target = this.getObject(linkDef.objectTypeApiName, fkValue);\n if (fkValue != null && !target) {\n // eslint-disable-next-line no-console\n console.log(`WARNING! Setting a FK value to a non-existent object: ${dstLocator}`);\n }\n if (fkValue != null) {\n linksToUpdate.push({\n dstSide,\n dstLocator,\n srcSide: linkDef,\n srcLocator: objectLocator(x)\n });\n } else {\n linksToRemove.push({\n srcLocator: objectLocator(x),\n srcSide: linkDef,\n dstLocator: objectLocator({\n __apiName: linkDef.objectTypeApiName,\n __primaryKey: oldFkValue\n }),\n dstSide\n });\n }\n }\n }\n }\n this.#objects.get(x.__apiName).set(String(x.__primaryKey), x);\n for (const {\n srcSide,\n srcLocator,\n dstSide,\n dstLocator\n } of linksToUpdate) {\n this.#updateSingleLinkSide(srcSide, srcLocator, dstSide, dstLocator);\n this.#updateSingleLinkSide(dstSide, dstLocator, srcSide, srcLocator);\n }\n for (const {\n srcSide,\n srcLocator,\n dstSide,\n dstLocator\n } of linksToRemove) {\n this.#removeSingleSideOfLink(srcLocator, srcSide, dstLocator);\n this.#removeSingleSideOfLink(dstLocator, dstSide, srcLocator);\n }\n }\n\n /** Throws if the object does not already exist */\n unregisterObjectOrThrow(objectType, primaryKey) {\n this.#assertObjectExists(objectType, primaryKey);\n this.#objects.get(objectType).delete(String(primaryKey));\n }\n registerLink(tmpSrc, srcLinkName, tmpDst, destLinkName) {\n const src = this.getObjectOrThrow(tmpSrc.__apiName, tmpSrc.__primaryKey);\n const dst = this.getObjectOrThrow(tmpDst.__apiName, tmpDst.__primaryKey);\n const srcLocator = objectLocator(src);\n const dstLocator = objectLocator(dst);\n const [srcSide, dstSide] = this.#fauxOntology.getBothLinkTypeSides(src.__apiName, srcLinkName, dst.__apiName);\n !(srcSide.linkTypeRid === dstSide.linkTypeRid) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected both sides of the link to have the same rid, but got ${srcSide.linkTypeRid} and ${dstSide.linkTypeRid}`) : invariant(false) : void 0;\n !(dstSide.apiName === destLinkName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link name mismatch on dst side. Expected ${destLinkName} but found ${dstSide.apiName}`) : invariant(false) : void 0;\n if (this.#strict) {\n const oneSide = srcSide.cardinality === \"ONE\" ? {\n object: src,\n link: srcSide\n } : dstSide.cardinality === \"ONE\" ? {\n object: dst,\n link: dstSide\n } : undefined;\n const manySide = oneSide ? srcSide.cardinality === \"MANY\" ? {\n object: src,\n link: srcSide\n } : {\n object: dst,\n link: dstSide\n } : undefined;\n if (oneSide && manySide) {\n !oneSide.link.foreignKeyPropertyApiName ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected to find a foreignKeyPropertyApiName on the one side: ${oneSide.object.__apiName}.${oneSide.link.apiName}`) : invariant(false) : void 0;\n const newObj = {\n ...oneSide.object,\n [oneSide.link.foreignKeyPropertyApiName]: manySide.object.__primaryKey\n };\n\n // This method call will also do the work to update the sides\n this.replaceObjectOrThrow(newObj);\n return;\n }\n }\n this.#updateSingleLinkSide(srcSide, srcLocator, dstSide, dstLocator);\n this.#updateSingleLinkSide(dstSide, dstLocator, srcSide, srcLocator);\n }\n unregisterLink(src, srcLinkName, dst, dstLinkName) {\n const srcLocator = objectLocator(src);\n const dstLocator = objectLocator(dst);\n const [srcSide, dstSide] = this.#fauxOntology.getBothLinkTypeSides(src.__apiName, srcLinkName, dst.__apiName);\n !(dstSide.apiName === dstLinkName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link name mismatch on dst side. Expected ${dstLinkName} but found ${dstSide.apiName}`) : invariant(false) : void 0;\n if (this.#strict) {\n const {\n oneSide,\n manySide\n } = extractOneManySide(srcSide, src, dstSide, dst);\n if (oneSide && manySide) {\n !oneSide.link.foreignKeyPropertyApiName ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected to find a foreignKeyPropertyApiName on the one side: ${oneSide.object.__apiName}.${oneSide.link.apiName}`) : invariant(false) : void 0;\n const newObj = {\n ...oneSide.object,\n [oneSide.link.foreignKeyPropertyApiName]: undefined\n };\n\n // This method call will also do the work to update the sides\n this.replaceObjectOrThrow(newObj);\n return;\n }\n }\n this.#removeSingleSideOfLink(srcLocator, srcSide, dstLocator);\n this.#removeSingleSideOfLink(dstLocator, dstSide, srcLocator);\n }\n registerTimeSeriesData(objectType, primaryKey, property, data) {\n this.getObjectOrThrow(objectType, primaryKey);\n const def = this.ontology.getObjectTypeFullMetadataOrThrow(objectType);\n !(def.objectType.properties[property].dataType.type === \"timeseries\" || def.objectType.properties[property].dataType.type === \"geotimeSeriesReference\") ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n this.#timeSeriesData.get(objectType).get(String(primaryKey)).set(property, data);\n }\n getTimeSeriesData(objectType, primaryKey, property, filter) {\n this.getObjectOrThrow(objectType, primaryKey);\n const allData = this.#timeSeriesData.get(objectType).get(String(primaryKey)).get(property);\n if (!filter) return allData;\n return filterTimeSeriesData(allData, filter);\n }\n #updateSingleLinkSide(srcSide, srcLocator, dstSide, dstLocator) {\n const srcLinkName = srcSide.apiName;\n if (srcSide.cardinality === \"ONE\") {\n const linkNameToObj = this.#singleLinks.get(srcLocator);\n const oldLocator = linkNameToObj.get(srcLinkName);\n if (oldLocator && oldLocator !== dstLocator) {\n // we need to remove the other side's old value\n this.#removeSingleSideOfLink(oldLocator, dstSide, srcLocator);\n }\n linkNameToObj.set(srcLinkName, dstLocator);\n } else if (srcSide.cardinality === \"MANY\") {\n const linkNameToObj = this.#manyLinks.get(srcLocator);\n linkNameToObj.set(srcLinkName, dstLocator);\n } else {\n // \"never\" case\n throw new Error(\"unexpected cardinality: \" + srcSide.cardinality);\n }\n }\n registerMedia(objectType, property, content, mediaType, path,\n // This should be the correct prefix, per\n // https://github.com/palantir/osdk-ts/pull/1303#discussion_r2001989395\n mediaItemRid = `ri.mio.main.media-item.${randomUUID()}`) {\n const mediaRef = Object.freeze({\n mimeType: mediaType,\n reference: Object.freeze({\n type: \"mediaSetViewItem\",\n mediaSetViewItem: Object.freeze({\n mediaItemRid,\n mediaSetRid: \"ri.unimplemented.in.shared.test\",\n mediaSetViewRid: \"ri.unimplemented.in.shared.test\"\n })\n })\n });\n this.#media.get(objectType).get(property).set(mediaItemRid, Object.freeze({\n content,\n mediaRef,\n metaData: Object.freeze({\n mediaType,\n path,\n sizeBytes: String(content.byteLength)\n })\n }));\n return mediaRef;\n }\n getMediaOrThrow(objectType, primaryKey, property) {\n const obj = this.getObjectOrThrow(objectType, primaryKey);\n const propertyDef = this.ontology.getObjectTypeFullMetadataOrThrow(objectType).objectType.properties[property];\n if (!propertyDef) {\n // This should be the correct error, per\n // https://github.com/palantir/osdk-ts/pull/1303#discussion_r2001968959\n throw new OpenApiCallError(400, {\n errorCode: \"NOT_FOUND\",\n errorName: \"PropertiesNotFound\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n objectType,\n properties: [property]\n },\n errorDescription: \"The requested properties are not found on the object type.\"\n });\n }\n if (propertyDef.dataType.type !== \"mediaReference\") {\n // FIXME: what would the backend do here?\n throw new OpenApiCallError(400, {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"InvalidPropertyType\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n property,\n propertyBaseType: propertyDef.dataType.type\n },\n errorDescription: \"The given property type is not of the expected type.\"\n });\n }\n const rid = obj[property].reference.mediaSetViewItem.mediaItemRid;\n if (!rid || !rid.startsWith(\"ri.\")) {\n throw new OpenApiCallError(400, {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"InvalidPropertyValue\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n property,\n propertyBaseType: propertyDef.dataType.type,\n propertyValue: rid\n },\n errorDescription: \"The value of the given property is invalid. See the documentation of PropertyValue for details on how properties are represented.\"\n });\n }\n const ret = this.#media.get(objectType).get(property).get(rid);\n if (!ret) {\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid parameters\"));\n }\n return ret;\n }\n #removeSingleSideOfLink(locator, linkSide, expectedPriorValue) {\n const destLinkName = linkSide.apiName;\n if (linkSide.cardinality === \"ONE\") {\n const links = this.#singleLinks.get(locator);\n !(links.get(destLinkName) === expectedPriorValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Failed to remove link: expected ${JSON.stringify(expectedPriorValue)} but found ${JSON.stringify(links.get(destLinkName))} for link ${destLinkName} on ${JSON.stringify(locator)}`) : invariant(false) : void 0;\n links.delete(destLinkName);\n } else {\n const links = this.#manyLinks.get(locator);\n !links.get(destLinkName)?.has(expectedPriorValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Failed to remove link: expected collection to contain ${JSON.stringify(expectedPriorValue)} for link ${destLinkName} on ${JSON.stringify(locator)}`) : invariant(false) : void 0;\n links.remove(destLinkName, expectedPriorValue);\n }\n }\n getObject(apiName, primaryKey) {\n return this.#objects.get(apiName).get(String(primaryKey));\n }\n getObjectOrThrow(apiName, primaryKey) {\n const object = this.getObject(apiName, primaryKey);\n if (!object) {\n throw new OpenApiCallError(404, ObjectNotFoundError(apiName, String(primaryKey)));\n }\n return object;\n }\n getObjectByRid(rid) {\n for (const [, pkToObjects] of this.#objects) {\n for (const [, obj] of pkToObjects) {\n if (obj.__rid === rid) {\n return obj;\n }\n }\n }\n }\n getLinksOrThrow(apiName, primaryKey, linkApiName) {\n const object = this.getObjectOrThrow(apiName, primaryKey);\n const linkTypeSide = this.#fauxOntology.getLinkTypeSideV2(apiName, linkApiName);\n if (linkTypeSide.cardinality === \"ONE\") {\n const locator = this.#singleLinks.get(objectLocator(object)).get(linkApiName);\n if (locator === undefined) {\n return [];\n }\n const {\n objectType,\n primaryKey\n } = parseLocator(locator);\n return [this.getObjectOrThrow(objectType, primaryKey)]; // will throw if not found\n } else {\n const locators = this.#manyLinks.get(objectLocator(object)).get(linkApiName);\n return Array.from(locators ?? []).map(a => {\n const [objectType, primaryKey] = a.split(\":\") ?? [];\n !(objectType && primaryKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid locator format\") : invariant(false) : void 0;\n return this.getObjectOrThrow(objectType, primaryKey);\n });\n }\n }\n getLinkOrThrow(objectType, primaryKey, linkType, targetPrimaryKey) {\n const allLinks = this.getLinksOrThrow(objectType, primaryKey, linkType);\n const object = allLinks.filter(l => String(l.__primaryKey) === targetPrimaryKey)[0];\n if (!object) {\n throw new OpenApiCallError(404, ObjectNotFoundError(`${objectType} -> ${linkType}`, String(targetPrimaryKey)));\n }\n return object;\n }\n getObjectsOfType(apiName) {\n this.ontology.getObjectTypeFullMetadataOrThrow(apiName);\n return this.#objects.get(apiName).values();\n }\n getObjectsFromObjectSet(parsedBody) {\n const selected = parsedBody.select;\n // when we have interfaces in here, we have a little trick for\n // caching off the important properties\n let objects = getObjectsFromSet(this, parsedBody.objectSet, undefined);\n if (!objects || objects.length === 0) {\n return {\n data: [],\n totalCount: \"0\",\n nextPageToken: undefined\n };\n }\n if (parsedBody.orderBy) {\n objects = objects.sort(createOrderBySortFn(parsedBody.orderBy));\n }\n\n // finally, if we got interfaces, the objects have names like the interface and we need\n // to return them like the object.\n\n const page = pageThroughResponseSearchParams(objects, getPaginationParamsFromRequest(parsedBody), false);\n if (!page) {\n throw new OpenApiCallError(404, InvalidRequest(`No objects found for ${JSON.stringify(parsedBody)}`));\n }\n const ret = subSelectProperties(page, [...selected], true, parsedBody.excludeRid);\n return ret;\n }\n getAttachmentMetadata(objectType, primaryKey, propertyName) {\n const rid = this.getObjectOrThrow(objectType, primaryKey)[propertyName];\n return this.#attachments.getAttachmentMetadataByRid(rid);\n }\n getAttachmentBuffer(objectType, primaryKey, propertyName) {\n const rid = this.getObjectOrThrow(objectType, primaryKey)[propertyName];\n return this.#attachments.getAttachmentBuffer(rid);\n }\n applyAction(actionTypeApiName, req) {\n const actionDef = this.#fauxOntology.getActionDef(actionTypeApiName);\n const actionImpl = this.#fauxOntology.getActionImpl(actionTypeApiName);\n const validation = validateAction(req, actionDef, this);\n if (validation.result === \"INVALID\") {\n return {\n validation\n };\n }\n const batch = new FauxDataStoreBatch(this);\n const r = actionImpl(batch, req, {\n def: actionDef,\n attachments: this.#attachments\n });\n\n // The legacy actions return the full payload\n // they want to return, so we need to do that\n // but the future is for the actionImpl's to\n // return void and to do validation details here\n if (r) return r;\n return {\n validation: {\n parameters: {},\n result: \"VALID\",\n submissionCriteria: []\n },\n edits: req.options?.mode === \"VALIDATE_AND_EXECUTE\" && (req.options.returnEdits === \"ALL\" || req.options.returnEdits === \"ALL_V2_WITH_DELETIONS\") ? {\n type: \"edits\",\n ...batch.objectEdits\n } : undefined\n };\n }\n batchApplyAction(actionTypeApiName, batchReq) {\n const actionDef = this.#fauxOntology.getActionDef(actionTypeApiName);\n const actionImpl = this.#fauxOntology.getActionImpl(actionTypeApiName);\n for (const req of batchReq.requests) {\n const result = validateAction(req, actionDef, this);\n if (result.result === \"INVALID\") {\n throw new OpenApiCallError(500, {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"ActionValidationFailed\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n actionType: actionTypeApiName\n }\n });\n }\n }\n const batch = new FauxDataStoreBatch(this);\n const returnLargeScaleEdits = false;\n for (const item of batchReq.requests) {\n actionImpl(batch, {\n ...item,\n options: {\n mode: \"VALIDATE_AND_EXECUTE\",\n returnEdits: batchReq.options?.returnEdits\n }\n }, {\n def: actionDef,\n attachments: this.#attachments\n });\n }\n if (batchReq.options?.returnEdits === \"NONE\") {\n return {};\n }\n if (returnLargeScaleEdits) {\n const editedObjectTypes = new Set();\n for (const edit of batch.objectEdits.edits) {\n if (edit.type === \"modifyObject\" || edit.type === \"addObject\" || edit.type === \"deleteObject\") {\n editedObjectTypes.add(edit.objectType);\n }\n }\n return {\n edits: {\n type: \"largeScaleEdits\",\n editedObjectTypes: Array.from(editedObjectTypes)\n }\n };\n }\n return {\n edits: {\n type: \"edits\",\n ...batch.objectEdits,\n edits: batch.objectEdits.edits.filter(x => x.type !== \"deleteObject\" && x.type !== \"deleteLink\")\n }\n };\n }\n}\nfunction extractOneManySide(srcSide, src, dstSide, dst) {\n const oneSide = srcSide.cardinality === \"ONE\" ? {\n object: src,\n link: srcSide\n } : dstSide.cardinality === \"ONE\" ? {\n object: dst,\n link: dstSide\n } : undefined;\n const manySide = oneSide ? srcSide.cardinality === \"MANY\" ? {\n object: src,\n link: srcSide\n } : {\n object: dst,\n link: dstSide\n } : undefined;\n return {\n oneSide,\n manySide\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\nexport * as Actions from \"./Actions.js\";\nexport * as ActionTypesV2 from \"./ActionTypesV2.js\";\nexport * as AttachmentPropertiesV2 from \"./AttachmentPropertiesV2.js\";\nexport * as Attachments from \"./Attachments.js\";\nexport * as LinkedObjectsV2 from \"./LinkedObjectsV2.js\";\nexport * as MediaReferenceProperties from \"./MediaReferenceProperties.js\";\nexport * as ObjectTypesV2 from \"./ObjectTypesV2.js\";\nexport * as OntologiesV2 from \"./OntologiesV2.js\";\nexport * as OntologyInterfaces from \"./OntologyInterfaces.js\";\nexport * as OntologyObjectSets from \"./OntologyObjectSets.js\";\nexport * as OntologyObjectsV2 from \"./OntologyObjectsV2.js\";\nexport * as Queries from \"./Queries.js\";\nexport * as QueryTypes from \"./QueryTypes.js\";\nexport * as TimeSeriesPropertiesV2 from \"./TimeSeriesPropertiesV2.js\";\nexport * as TimeSeriesValueBankProperties from \"./TimeSeriesValueBankProperties.js\";\nexport * as OntologyTransactions from \"./Transactions.js\";","/*\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 { Actions } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const applyBatch = handleOpenApiCall(Actions.applyBatch, [\"ontologyApiName\", \"actionType\"]);\nexport const apply = handleOpenApiCall(Actions.apply, [\"ontologyApiName\", \"actionType\"]);","/*\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\", 3];\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\", 3];\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}","/*\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 symbolClientContext = Symbol(\"ClientContext\");","/*\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 symbolClientContext = \"__osdkClientContext\";","/*\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 PalantirApiError extends Error {\n constructor(message, errorName, errorCode, errorDescription, statusCode, errorInstanceId, parameters) {\n super(message);\n this.message = message;\n this.errorName = errorName;\n this.errorCode = errorCode;\n this.errorDescription = errorDescription;\n this.statusCode = statusCode;\n this.errorInstanceId = errorInstanceId;\n this.parameters = parameters;\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 { PalantirApiError } from \"./PalantirApiError.js\";\nexport class UnknownError extends PalantirApiError {\n constructor(message, errorName, originalError, statusCode) {\n super(message, errorName, undefined, undefined, statusCode);\n this.originalError = originalError;\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 */\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { symbolClientContext } from \"@osdk/shared.client2\";\nimport { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nexport async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {\n const path = origPath.replace(/\\{([^}]+)\\}/g, () => encodeURIComponent(args.shift()));\n const body = flags & 1 ? args.shift() : undefined;\n const queryArgs = flags & 2 ? args.shift() : undefined;\n const headerArgs = flags & 4 ? args.shift() : undefined;\n const method = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"][httpMethodNum];\n return await apiFetch(client[symbolClientContext] ?? client[oldSymbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);\n}\nasync function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {\n const url = parseUrl(clientCtx.baseUrl, endpointPath);\n for (const [key, value] of Object.entries(queryArguments || {})) {\n if (value == null) {\n continue;\n }\n if (Array.isArray(value)) {\n for (const item of value) {\n url.searchParams.append(key, item);\n }\n } else {\n url.searchParams.append(key, value);\n }\n }\n const headersInit = new Headers();\n headersInit.set(\"Content-Type\", requestMediaType ?? \"application/json\");\n headersInit.set(\"Accept\", responseMediaType ?? \"application/json\");\n Object.entries(headers || {}).forEach(([key, value]) => {\n if (key === \"Content-Type\" && typeof value === \"string\") {\n headersInit.set(\"Content-Type\", value);\n } else if (key === \"Accept\" && typeof value === \"string\") {\n headersInit.set(\"Accept\", value);\n } else if (value != null) {\n headersInit.append(key, value.toString());\n }\n });\n const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);\n // Because this uses the client's fetch, there is a 99.99% chance that it is already going\n // to handle the error case and throw a PalantirApiError since its wrapped in a\n // createFetchOrThrow.\n const response = await clientCtx.fetch(url.toString(), {\n body,\n method: method,\n headers: headersInit\n });\n // However, if we ended up using a \"regular\" fetch, the\n // error status codes are not thrown by fetch automatically,\n // we have to look at the ok property and behave accordingly\n if (!response.ok) {\n try {\n const convertedError = await response.json();\n return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);\n } catch (e) {\n if (e instanceof Error) {\n return new UnknownError(e.message, \"UNKNOWN\");\n }\n return new UnknownError(\"Unable to parse error response\", \"UNKNOWN\");\n }\n }\n // Do not return anything if its a 204. Do not parse either!\n if (response.status === 204) {\n return;\n }\n if (responseMediaType == null || responseMediaType === \"application/json\") {\n return await response.json();\n }\n return response;\n}\nexport function parseUrl(baseUrl, endpointPath) {\n baseUrl += baseUrl.endsWith(\"/\") ? \"\" : \"/\";\n return new URL(`api${endpointPath}`, baseUrl);\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}","/*\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 _upload = [1, \"/v2/ontologies/attachments/upload\", 7, \"*/*\"];\n/**\n * Upload an attachment to use in an action. Any attachment which has not been linked to an object via\n * an action within one hour after upload will be removed.\n * Previously mapped attachments which are not connected to any object anymore are also removed on\n * a biweekly basis.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-write]\n * URL: /v2/ontologies/attachments/upload\n */\nexport function upload($ctx, ...args) {\n const headerParams = {\n ...args[2],\n \"Content-Type\": args[2]?.[\"Content-Type\"] ?? args[0].type,\n \"Content-Length\": args[0].size.toString()\n };\n return $foundryPlatformFetch($ctx, _upload, args[0], args[1], headerParams);\n}\nconst _read = [0, \"/v2/ontologies/attachments/{0}/content\",,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _get = [0, \"/v2/ontologies/attachments/{0}\"];\n/**\n * Get the metadata of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}\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 _getAttachment = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}\", 2];\n/**\n * Get the metadata of attachments parented to the given object.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}\n */\nexport function getAttachment($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getAttachment, ...args);\n}\nconst _getAttachmentByRid = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}\", 2];\n/**\n * Get the metadata of a particular attachment in an attachment list.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}\n */\nexport function getAttachmentByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getAttachmentByRid, ...args);\n}\nconst _readAttachment = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/content\", 2,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content\n */\nexport function readAttachment($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readAttachment, ...args);\n}\nconst _readAttachmentByRid = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}/content\", 2,, \"*/*\"];\n/**\n * Get the content of an attachment by its RID.\n *\n * The RID must exist in the attachment array of the property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content\n */\nexport function readAttachmentByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readAttachmentByRid, ...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 _listLinkedObjects = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/links/{3}\", 2];\n/**\n * Lists the linked objects for a specific object and the given 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}\n */\nexport function listLinkedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listLinkedObjects, ...args);\n}\nconst _getLinkedObject = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/links/{3}/{4}\", 2];\n/**\n * Get a specific linked object that originates from another object.\n *\n * If there is no link between the two objects, `LinkedObjectNotFound` is thrown.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}\n */\nexport function getLinkedObject($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLinkedObject, ...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 _getMediaContent = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/content\", 2,, \"*/*\"];\n/**\n * Gets the content of a media item referenced by this property.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content\n */\nexport function getMediaContent($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaContent, ...args);\n}\nconst _getMediaMetadata = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/metadata\", 2];\n/**\n * Gets metadata about the media item referenced by this property.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata\n */\nexport function getMediaMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaMetadata, ...args);\n}\nconst _upload = [1, \"/v2/ontologies/{0}/objectTypes/{1}/media/{2}/upload\", 3, \"*/*\"];\n/**\n * Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}\nconst _uploadMedia = [1, \"/v2/ontologies/{0}/actions/{1}/media/upload\", 3, \"*/*\"];\n/**\n * Uploads a media item for use by the specified action. If the media item isn't persisted by the associated action within 1 hour, the item will be deleted.\n *\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{actionType}/media/upload\n */\nexport function uploadMedia($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _uploadMedia, ...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 _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 * @alpha\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 _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}","/*\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 _createTemporary = [1, \"/v2/ontologies/{0}/objectSets/createTemporary\", 3];\n/**\n * Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectSets/createTemporary\n */\nexport function createTemporary($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _createTemporary, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectSets/{1}\"];\n/**\n * Gets the definition of the `ObjectSet` with the given RID.\n *\n * @alpha\n *\n * Required Scopes: []\n * URL: /v2/ontologies/{ontology}/objectSets/{objectSetRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _load = [1, \"/v2/ontologies/{0}/objectSets/loadObjects\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition.\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 * Note that null value properties will not be returned.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjects\n */\nexport function load($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _load, ...args);\n}\nconst _loadMultipleObjectTypes = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsMultipleObjectTypes\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting\n * objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped\n * to an interface, in which only the object type properties that implement the properties of any interfaces in its\n * scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to\n * object implementation is returned in order to interpret the objects as the interfaces that they implement.\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 * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `loadObjects`.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes\n */\nexport function loadMultipleObjectTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMultipleObjectTypes, ...args);\n}\nconst _loadObjectsOrInterfaces = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsOrInterfaces\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested\n * object set contains interfaces and the object can be viewed as an interface, it will contain the properties\n * defined by the interface. If not, it will contain the properties defined by its object type. This allows directly\n * loading all objects of an interface where all objects are viewed as the interface, for example.\n *\n * Note that the result object set cannot contain a mix of objects with \"interface\" properties and \"object type\"\n * properties. Attempting to load an object set like this will result in an error.\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 * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `/loadObjects`.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces\n */\nexport function loadObjectsOrInterfaces($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadObjectsOrInterfaces, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objectSets/aggregate\", 3];\n/**\n * Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...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}/objects/{1}\", 2];\n/**\n * Lists the objects for the given Ontology and object 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objects/{1}/{2}\", 2];\n/**\n * Gets a specific object with the given primary key.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _count = [1, \"/v2/ontologies/{0}/objects/{1}/count\", 2];\n/**\n * Returns a count of the objects of the given object type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/count\n */\nexport function count($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _count, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/objects/{1}/search\", 3];\n/**\n * Search for objects in the specified ontology and object type. The request body is used\n * to filter objects based on the specified query. The supported queries are:\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 * | 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 term 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 * | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objects/{1}/aggregate\", 3];\n/**\n * Perform functions on object fields in the specified ontology and object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...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 _postEdits = [1, \"/v2/ontologies/{0}/transactions/{1}/edits\", 3];\n/**\n * Applies a set of edits to a transaction in order.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/transactions/{transactionRid}/edits\n */\nexport function postEdits($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _postEdits, ...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\"];\n/**\n * Lists the Ontologies visible to the current user.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}\"];\n/**\n * Gets a specific ontology for a given Ontology API name or RID.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getFullMetadata = [0, \"/v2/ontologies/{0}/fullMetadata\", 2];\n/**\n * Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces.\n * This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows.\n * It may omit certain entities rather than fail the request.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/fullMetadata\n */\nexport function getFullMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFullMetadata, ...args);\n}\nconst _loadMetadata = [1, \"/v2/ontologies/{0}/metadata\", 3];\n/**\n * Load Ontology metadata for the requested object, link, action, query, and interface types.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/metadata\n */\nexport function loadMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMetadata, ...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 _execute = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 7];\n/**\n * Executes a Query using the given parameters.\n *\n * Optional parameters do not need to be supplied.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...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 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 { ActionTypesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const list = handleOpenApiCall(ActionTypesV2.list, [\"ontologyApiName\"]);\nexport const get = handleOpenApiCall(ActionTypesV2.get, [\"ontologyApiName\", \"actionTypeApiName\"]);","/*\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 { AttachmentPropertiesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getAttachment = handleOpenApiCall(AttachmentPropertiesV2.getAttachment, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const readAttachment = handleOpenApiCall(AttachmentPropertiesV2.readAttachment, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);","/*\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 { Attachments } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const upload = handleOpenApiCall(Attachments.upload, []);\nexport const get = handleOpenApiCall(Attachments.get, [\"attachmentRid\"]);\nexport const read = handleOpenApiCall(Attachments.read, [\"attachmentRid\"]);","/*\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 { LinkedObjectsV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const listLinkedObjects = handleOpenApiCall(LinkedObjectsV2.listLinkedObjects, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"linkType\"]);\nexport const getLinkedObject = handleOpenApiCall(LinkedObjectsV2.getLinkedObject, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"linkType\", \"targetPrimaryKey\"]);","/*\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 { MediaReferenceProperties } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getMediaMetadata = handleOpenApiCall(MediaReferenceProperties.getMediaMetadata, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const getMediaContent = handleOpenApiCall(MediaReferenceProperties.getMediaContent, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const upload = handleOpenApiCall(MediaReferenceProperties.upload, [\"ontologyApiName\", \"objectType\", \"propertyName\"]);\nexport const uploadMedia = handleOpenApiCall(MediaReferenceProperties.uploadMedia, [\"ontologyApiName\", \"actionTypeApiName\"]);","/*\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 { ObjectTypesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const get = handleOpenApiCall(ObjectTypesV2.get, [\"ontologyApiName\", \"objectTypeApiName\"]);\nexport const getFullMetadata = handleOpenApiCall(ObjectTypesV2.getFullMetadata, [\"ontologyApiName\", \"objectTypeApiName\"]);\nexport const getOutgoingLinkType = handleOpenApiCall(ObjectTypesV2.getOutgoingLinkType, [\"ontology\", \"objectType\", \"linkType\"]);\nexport const listOutgoingLinkTypes = handleOpenApiCall(ObjectTypesV2.listOutgoingLinkTypes, [\"ontology\", \"objectType\"]);\nexport const list = handleOpenApiCall(ObjectTypesV2.list, [\"ontologyApiName\"]);","/*\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 { OntologiesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getFullMetadata = handleOpenApiCall(OntologiesV2.getFullMetadata, [\"ontologyApiName\"]);\nexport const loadMetadata = handleOpenApiCall(OntologiesV2.loadMetadata, [\"ontologyApiName\"]);\nexport const list = handleOpenApiCall(OntologiesV2.list, []);\n\n/**\n * Get specified Ontology\n */\nexport const get = handleOpenApiCall(OntologiesV2.get, [\"ontologyRid\"]);","/*\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 { OntologyInterfaces } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const list = handleOpenApiCall(OntologyInterfaces.list, [\"ontologyApiName\"]);\nexport const get = handleOpenApiCall(OntologyInterfaces.get, [\"ontologyApiName\", \"interfaceType\"]);","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyObjectSets } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const load = handleOpenApiCall(OntologyObjectSets.load, [\"ontologyApiName\"]);\nexport const aggregate = handleOpenApiCall(OntologyObjectSets.aggregate, [\"ontologyApiName\"]);\nexport const loadMultipleObjectTypes = handleOpenApiCall(OntologyObjectSets.loadMultipleObjectTypes, [\"ontologyApiName\"]);","/*\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 { OntologyObjectsV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const get = handleOpenApiCall(OntologyObjectsV2.get, [\"ontologyApiName\", \"objectType\", \"primaryKey\"]);\nexport const list = handleOpenApiCall(OntologyObjectsV2.list, [\"ontologyApiName\", \"objectType\"]);","/*\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 { Queries } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const execute = handleOpenApiCall(Queries.execute, [\"ontologyApiName\", \"queryApiName\"]);","/*\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 { QueryTypes } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const get = handleOpenApiCall(QueryTypes.get, [\"ontologyApiName\", \"queryTypeApiName\"]);\nexport const list = handleOpenApiCall(QueryTypes.list, [\"ontologyApiName\"]);","/*\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 { TimeSeriesPropertiesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getFirstPoint = handleOpenApiCall(TimeSeriesPropertiesV2.getFirstPoint, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const getLastPoint = handleOpenApiCall(TimeSeriesPropertiesV2.getLastPoint, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const streamPoints = handleOpenApiCall(TimeSeriesPropertiesV2.streamPoints, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);","/*\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 { TimeSeriesValueBankProperties } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getLatestValue = handleOpenApiCall(TimeSeriesValueBankProperties.getLatestValue, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const streamValues = handleOpenApiCall(TimeSeriesValueBankProperties.streamValues, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);","/*\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 { OntologyTransactions } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const postEdits = handleOpenApiCall(OntologyTransactions.postEdits, [\"ontologyApiName\", \"transactionRid\"]);","/*\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 { ApplyActionFailedError } from \"../errors.js\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { OpenApiCallError } from \"./util/handleOpenApiCall.js\";\nexport const createActionHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Apply an Action\n */\nOntologiesV2.Actions.apply(baseUrl, async ({\n params: {\n ontologyApiName,\n actionType\n },\n request\n}) => {\n const response = fauxFoundry.getDataStore(ontologyApiName).applyAction(actionType, await request.json());\n\n // this is just for the legacy code that registered `undefined` as the return\n // value causing this code path. Once we get rid of the uses of\n // `createLazyDoNothingActionImpl` this should be removed.\n if (!response) {\n throw new OpenApiCallError(400, ApplyActionFailedError);\n }\n return response;\n}), OntologiesV2.Actions.applyBatch(baseUrl, async ({\n params: {\n ontologyApiName,\n actionType\n },\n request\n}) => {\n return fauxFoundry.getDataStore(ontologyApiName).batchApplyAction(actionType, await request.json());\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 { InvalidRequest } from \"../../errors.js\";\nimport { OpenApiCallError } from \"./handleOpenApiCall.js\";\nexport function requireSearchParams(names, req) {\n const url = new URL(req.url);\n return Object.fromEntries(names.map(name => {\n const value = url.searchParams.get(name);\n if (value == null) {\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid parameters\"));\n }\n return [name, value];\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { randomUUID } from \"node:crypto\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { requireSearchParams } from \"./util/requireSearchParams.js\";\nexport const createAttachmentHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Upload attachment\n */\nOntologiesV2.Attachments.upload(baseUrl, async ({\n request\n}) => {\n const {\n filename\n } = requireSearchParams([\"filename\"], request);\n return fauxFoundry.attachments.registerAttachment({\n buffer: await request.arrayBuffer(),\n filename,\n mediaType: request.headers.get(\"Content-Type\") ?? \"application/octet-stream\",\n rid: `ri.attachments.main.attachment.${randomUUID()}`\n });\n}),\n/**\n * Get attachment metadata V1\n */\n\nOntologiesV2.Attachments.get(baseUrl, async ({\n params\n}) => {\n return fauxFoundry.attachments.getAttachmentMetadataByRid(params.attachmentRid);\n}),\n/**\n * Get attachment metadata V2\n */\n\nOntologiesV2.AttachmentPropertiesV2.getAttachment(baseUrl, async ({\n params: {\n ontologyApiName,\n primaryKey,\n objectType,\n propertyName\n }\n}) => {\n return {\n ...fauxFoundry.getDataStore(ontologyApiName).getAttachmentMetadata(objectType, primaryKey, propertyName),\n type: \"single\"\n };\n}),\n/**\n * Read attachment content V1\n */\n\nOntologiesV2.Attachments.read(baseUrl, async ({\n params\n}) => {\n return new Response(fauxFoundry.attachments.getAttachmentBuffer(params.attachmentRid));\n}),\n/**\n * Read attachment content V2\n */\n\nOntologiesV2.AttachmentPropertiesV2.readAttachment(baseUrl, async ({\n params: {\n ontologyApiName,\n primaryKey,\n objectType,\n propertyName\n }\n}) => {\n return new Response(fauxFoundry.getDataStore(ontologyApiName).getAttachmentBuffer(objectType, primaryKey, propertyName));\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { InvalidRequest } from \"../errors.js\";\nimport { subSelectProperties, subSelectPropertiesUrl } from \"../filterObjects.js\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { getPaginationParamsFromUrl } from \"./util/getPaginationParams.js\";\nimport { OpenApiCallError } from \"./util/handleOpenApiCall.js\";\nimport { pageThroughResponseSearchParams } from \"./util/pageThroughResponseSearchParams.js\";\nexport const createLoadObjectsHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load object\n */\nOntologiesV2.OntologyObjectsV2.get(baseUrl, async ({\n request,\n params: {\n ontologyApiName,\n objectType,\n primaryKey\n }\n}) => {\n return subSelectPropertiesUrl(fauxFoundry.getDataStore(ontologyApiName).getObjectOrThrow(objectType, primaryKey), new URL(request.url));\n}),\n/**\n * Load all objects\n */\nOntologiesV2.OntologyObjectsV2.list(baseUrl, async ({\n request,\n params: {\n ontologyApiName,\n objectType\n }\n}) => {\n const loadObjects = pageThroughResponseSearchParams(fauxFoundry.getDataStore(ontologyApiName).getObjectsOfType(objectType), getPaginationParamsFromUrl(request), true);\n if (loadObjects) {\n return subSelectProperties(loadObjects, new URL(request.url), true);\n }\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid Request\"));\n}),\n/**\n * List Linked Objects\n */\nOntologiesV2.LinkedObjectsV2.listLinkedObjects(baseUrl, async ({\n request,\n params: {\n primaryKey,\n linkType,\n objectType,\n ontologyApiName\n }\n}) => {\n const linkResults = fauxFoundry.getDataStore(ontologyApiName).getLinksOrThrow(objectType, primaryKey, linkType);\n const objects = pageThroughResponseSearchParams(linkResults, getPaginationParamsFromUrl(request), true);\n if (objects) {\n return subSelectProperties(objects, new URL(request.url), false);\n }\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid Request\"));\n}),\n/**\n * Get specific Linked Object\n */\n\nOntologiesV2.LinkedObjectsV2.getLinkedObject(baseUrl, async ({\n request,\n params: {\n ontologyApiName,\n objectType,\n primaryKey,\n linkType,\n targetPrimaryKey\n }\n}) => {\n const object = fauxFoundry.getDataStore(ontologyApiName).getLinkOrThrow(objectType, primaryKey, linkType, targetPrimaryKey);\n return subSelectPropertiesUrl(object, new URL(request.url));\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { requireSearchParams } from \"./util/requireSearchParams.js\";\nexport const createMediaRefHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load media metadata\n */\nOntologiesV2.MediaReferenceProperties.getMediaMetadata(baseUrl, async ({\n params: {\n ontologyApiName,\n objectType,\n primaryKey,\n propertyName\n }\n}) => {\n return fauxFoundry.getDataStore(ontologyApiName).getMediaOrThrow(objectType, primaryKey, propertyName).metaData;\n}),\n/**\n * Read media content\n */\nOntologiesV2.MediaReferenceProperties.getMediaContent(baseUrl, async ({\n params: {\n ontologyApiName,\n objectType,\n primaryKey,\n propertyName\n }\n}) => {\n const {\n content,\n metaData: {\n mediaType\n }\n } = fauxFoundry.getDataStore(ontologyApiName).getMediaOrThrow(objectType, primaryKey, propertyName);\n return new Response(content, {\n headers: {\n \"Content-Type\": mediaType\n }\n });\n}), OntologiesV2.MediaReferenceProperties.upload(baseUrl, async ({\n params: {\n ontologyApiName,\n objectType,\n propertyName\n },\n request\n}) => {\n const {\n mediaItemPath\n } = requireSearchParams([\"mediaItemPath\"], request);\n return fauxFoundry.getDataStore(ontologyApiName).registerMedia(objectType, propertyName, await request.arrayBuffer(), request.headers.get(\"Content-Type\") ?? \"application/octet-stream\", mediaItemPath);\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 { http, HttpResponse } from \"msw\";\nexport const createMultipassServerHandlers = (baseUrl, fauxFoundry) => [http.post(`${baseUrl}/multipass/api/oauth2/token`, async req => {\n const body = await req.request.text();\n const parsedBody = new URLSearchParams(body);\n const parsedBodyArray = Array.from(parsedBody.entries());\n if (parsedBody.get(\"grant_type\") === \"client_credentials\" && parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"client_secret\") === \"myClientSecret\" && parsedBody.get(\"scopes\")?.includes(\"offline_access\") && parsedBodyArray.length === 4) {\n return HttpResponse.json({\n access_token: \"myAccessToken\",\n token_type: \"bearer\",\n refresh_token: \"myRefreshToken\",\n expires_in: 3600\n });\n }\n if (parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"grant_type\") === \"authorization_code\" && parsedBody.get(\"code\") === \"callBackCode\" && parsedBody.get(\"redirect_uri\") === \"localhost\" && parsedBody.get(\"code_verifier\") === \"01020304\" && parsedBodyArray.length === 5) {\n return HttpResponse.json({\n access_token: \"myAccessToken\",\n token_type: \"bearer\",\n refresh_token: \"myRefreshToken\",\n expires_in: 3600\n });\n }\n if (parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"grant_type\") === \"refresh_token\" && parsedBody.get(\"refresh_token\") === \"myRefreshToken\" && parsedBodyArray.length === 3) {\n return HttpResponse.json({\n access_token: \"refreshedAccessToken\",\n token_type: \"bearer\",\n refresh_token: \"refreshedRefreshToken\",\n expires_in: 3600\n });\n }\n return HttpResponse.json({\n message: \"Invalid request body\"\n }, {\n status: 400\n });\n}), http.post(\"https://stack.palantir.com/multipass/api/oauth2/revoke_token\", async req => {\n const body = await req.request.text();\n const parsedBody = new URLSearchParams(body);\n const parsedBodyArray = Array.from(parsedBody.entries());\n if (parsedBodyArray.length === 3 && parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"client_secret\") === \"myClientSecret\" && parsedBody.get(\"token\") === \"myAccessToken\") {\n return HttpResponse.json({});\n }\n if (parsedBodyArray.length === 2 && parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"token\") === \"myAccessToken\") {\n return HttpResponse.json({});\n }\n return HttpResponse.json({\n message: \"Invalid request body\"\n }, {\n status: 400\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 { OntologiesV2 } from \"../mock/index.js\";\nexport const createObjectSetHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load ObjectSet Objects\n */\nOntologiesV2.OntologyObjectSets.load(baseUrl, async ({\n request,\n params\n}) => {\n return fauxFoundry.getDataStore(params.ontologyApiName).getObjectsFromObjectSet(await request.json());\n}),\n/**\n * Aggregate Objects in ObjectSet\n */\nOntologiesV2.OntologyObjectSets.aggregate(baseUrl, async ({\n request\n}) => {\n throw new Error(\"Not implemented\");\n}),\n/**\n * Load interface objectset Objects\n */\nOntologiesV2.OntologyObjectSets.loadMultipleObjectTypes(baseUrl, async ({\n params,\n request\n}) => {\n const pagedResponse = fauxFoundry.getDataStore(params.ontologyApiName).getObjectsFromObjectSet(await request.json());\n const objectApiNames = new Set(pagedResponse.data.map(o => o.__apiName));\n return {\n interfaceToObjectTypeMappings: fauxFoundry.getOntology(params.ontologyApiName).getInterfaceToObjectTypeMappings(objectApiNames),\n ...pagedResponse\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\nexport const defaultOntologyMetadata = {\n apiName: \"default-ontology\",\n displayName: \"Ontology\",\n description: \"The default ontology\",\n rid: \"ri.ontology.main.ontology.698267cc-6b48-4d98-beff-29beb24e9361\"\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 { defaultOntologyMetadata as defaultOntology } from \"./defaultOntologyMetadata.js\";\nexport const defaultOntologyForConjure = {\n apiName: defaultOntology.apiName,\n displayName: defaultOntology.displayName,\n description: defaultOntology.description,\n currentOntologyVersion: \"0000000c-aaaa-bbbb-cccc-ddddeeeeffff\",\n defaultBranchRid: \"ri.ontology.main.branch.99999999-8888-7777-6666-555555555555\"\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { http as rest, HttpResponse } from \"msw\";\nimport { defaultOntologyForConjure } from \"../defaultOntologyForConjure.js\";\nimport { defaultOntologyMetadata } from \"../defaultOntologyMetadata.js\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { authHandlerMiddleware } from \"./authHandlerMiddleware.js\";\nexport const createOntologyHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load full Ontology metadata\n */\nOntologiesV2.OntologiesV2.getFullMetadata(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyApiName).getOntologyFullMetadata();\n}),\n/**\n * Load ontology metadata for the requested object, link, action, query, and interface types.\n */\nOntologiesV2.OntologiesV2.loadMetadata(baseUrl, async ({\n params,\n request\n}) => {\n return fauxFoundry.getOntology(params.ontologyApiName).getFilteredOntologyMetadata(await request.json());\n}), OntologiesV2.ObjectTypesV2.get(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyApiName).getObjectTypeFullMetadataOrThrow(req.params.objectTypeApiName).objectType;\n}), OntologiesV2.ObjectTypesV2.getFullMetadata(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyApiName).getObjectTypeFullMetadataOrThrow(req.params.objectTypeApiName);\n}),\n/**\n * List ActionTypes\n */\nOntologiesV2.ActionTypesV2.list(baseUrl, async ({\n params\n}) => {\n return {\n data: fauxFoundry.getOntology(params.ontologyApiName).getAllActionTypes()\n };\n}), OntologiesV2.ActionTypesV2.get(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyApiName).getActionDef(req.params.actionTypeApiName);\n}), OntologiesV2.QueryTypes.get(baseUrl, async req => {\n const queryParams = Object.fromEntries(new URL(req.request.url).searchParams.entries());\n const version = queryParams[\"version\"];\n return fauxFoundry.getOntology(req.params.ontologyApiName).getQueryDef(version ? `${req.params.queryTypeApiName}:${version}` : req.params.queryTypeApiName);\n}), OntologiesV2.ObjectTypesV2.getOutgoingLinkType(baseUrl, async ({\n params\n}) => {\n return fauxFoundry.getOntology(params.ontology).getLinkTypeSideV2(params.objectType, params.linkType);\n}), OntologiesV2.ObjectTypesV2.listOutgoingLinkTypes(baseUrl, async ({\n params\n}) => {\n return {\n data: fauxFoundry.getOntology(params.ontology).getObjectTypeFullMetadataOrThrow(params.objectType).linkTypes\n };\n}), OntologiesV2.OntologyInterfaces.list(baseUrl, async req => {\n return {\n data: fauxFoundry.getOntology(req.params.ontologyApiName).getAllInterfaceTypes()\n };\n}), OntologiesV2.OntologyInterfaces.get(baseUrl, ({\n params\n}) => {\n return fauxFoundry.getOntology(params.ontologyApiName).getInterfaceType(params.interfaceType);\n}),\n/**\n * List ontologies\n */\nOntologiesV2.OntologiesV2.list(baseUrl, async () => {\n return {\n data: fauxFoundry.getEveryOntology().map(x => x.getOntologyFullMetadata().ontology)\n };\n}),\n/**\n * Get specified Ontology\n */\nOntologiesV2.OntologiesV2.get(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyRid).getOntologyFullMetadata().ontology;\n}),\n/**\n * List objectTypes V2\n */\nOntologiesV2.ObjectTypesV2.list(baseUrl, async req => {\n return {\n data: fauxFoundry.getOntology(req.params.ontologyApiName).getAllObjectTypes().map(x => x.objectType)\n };\n}),\n/**\n * List Queries\n */\nOntologiesV2.QueryTypes.list(baseUrl, async req => {\n return {\n data: fauxFoundry.getOntology(req.params.ontologyApiName).getAllQueryTypes()\n };\n})];\nexport const conjureEndpoint = [rest.post(`https://stack.palantir.com/ontology-metadata/api/ontology/ontology/ontologies/load/all`, authHandlerMiddleware(async () => {\n return HttpResponse.json({\n ontologies: {\n \"ri.ontology.main.ontology.f34bca54-eb0f-41ad-84f0-d562d9f2763a\": {\n apiName: \"ontology-migration-source\",\n displayName: \"Ontology Migration Test Source\",\n description: \"\",\n currentOntologyVersion: \"0000000c-040d-f49d-b7e8-79fa53caacf5\",\n defaultBranchRid: \"ri.ontology.main.branch.122438ac-a6b7-46e9-825f-6c911ffff857\"\n },\n [defaultOntologyMetadata.rid]: defaultOntologyForConjure\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 { valid } from \"semver\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nexport const createQueryHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Execute Queries\n */\nOntologiesV2.Queries.execute(baseUrl, async ({\n request,\n params: {\n ontologyApiName,\n queryApiName\n }\n}) => {\n const queryParams = Object.fromEntries(new URL(request.url).searchParams.entries());\n const version = queryParams[\"version\"];\n if (version != null && !valid(version)) {\n throw new Error(`Invalid version \"${version}\" for query \"${queryApiName}\" in ontology \"${ontologyApiName}: not semver compatible\".`);\n }\n const queryImpl = fauxFoundry.getOntology(ontologyApiName).getQueryImpl(queryApiName, version);\n return queryImpl(await request.json(), fauxFoundry.getDataStore(ontologyApiName));\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { InvalidRequest } from \"../errors.js\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { OpenApiCallError } from \"./util/handleOpenApiCall.js\";\nexport const createTimeseriesAndGeotimeHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load firstPoint\n */\n\nOntologiesV2.TimeSeriesPropertiesV2.getFirstPoint(baseUrl, async ({\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n return fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName).at(0);\n}),\n/**\n * Load lastPoint\n */\nOntologiesV2.TimeSeriesPropertiesV2.getLastPoint(baseUrl, async ({\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n return fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName).at(-1);\n}),\n/**\n * stream points\n */\nOntologiesV2.TimeSeriesPropertiesV2.streamPoints(baseUrl, async ({\n request,\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n return Response.json(fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName, await request.json()));\n}),\n/**\n * Load latestValue\n */\nOntologiesV2.TimeSeriesValueBankProperties.getLatestValue(baseUrl, async ({\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n const ret = fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName).at(-1);\n if (!ret) {\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid request\"));\n }\n return ret;\n}),\n/**\n * stream values\n */\nOntologiesV2.TimeSeriesValueBankProperties.streamValues(baseUrl, async ({\n request,\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n return Response.json(fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName, await request.json()));\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 { createActionHandlers } from \"./createActionHandlers.js\";\nimport { createAttachmentHandlers } from \"./createAttachmentHandlers.js\";\nimport { createLoadObjectsHandlers } from \"./createLoadObjectsHandlers.js\";\nimport { createMediaRefHandlers } from \"./createMediaRefHandlers.js\";\nimport { createMultipassServerHandlers } from \"./createMultipassServerHandlers.js\";\nimport { createObjectSetHandlers } from \"./createObjectSetHandlers.js\";\nimport { createOntologyHandlers } from \"./createOntologyHandlers.js\";\nimport { createQueryHandlers } from \"./createQueryHandlers.js\";\nimport { createTimeseriesAndGeotimeHandlers } from \"./createTimeseriesAndGeotimeHandlers.js\";\nexport function createFauxFoundryHandlers(baseUrl, fauxFoundry) {\n return [createMultipassServerHandlers, createActionHandlers, createObjectSetHandlers, createOntologyHandlers, createQueryHandlers, createLoadObjectsHandlers, createTimeseriesAndGeotimeHandlers, createAttachmentHandlers, createMediaRefHandlers].flatMap(x => x(baseUrl, fauxFoundry));\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 { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\nexport class FauxAttachmentStore {\n #attachments = new Map();\n registerAttachment(attachment) {\n this.#attachments.set(attachment.rid, attachment);\n return this.getAttachmentMetadataByRid(attachment.rid);\n }\n getAttachmentMetadataByRid(attachmentRid) {\n const attachment = this.#attachments.get(attachmentRid);\n if (!attachment) {\n throw new OpenApiCallError(404, {\n errorCode: \"NOT_FOUND\",\n errorName: \"AttachmentNotFound\",\n errorInstanceId: \"internal\",\n parameters: {\n attachmentRid\n },\n errorDescription: \"The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object.\"\n });\n }\n const {\n buffer,\n ...metadata\n } = attachment;\n return {\n ...metadata,\n sizeBytes: String(buffer.byteLength)\n };\n }\n getAttachmentBuffer(attachmentRid) {\n const attachment = this.#attachments.get(attachmentRid);\n if (!attachment) {\n throw new OpenApiCallError(404, {\n errorCode: \"NOT_FOUND\",\n errorName: \"AttachmentNotFound\",\n errorInstanceId: \"internal\",\n parameters: {\n attachmentRid\n },\n errorDescription: \"The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object.\"\n });\n }\n return attachment.buffer;\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 semver, { valid } from \"semver\";\nimport invariant from \"tiny-invariant\";\nimport { ActionNotFoundError, LinkTypeNotFound, ObjectNotFoundError, ObjectTypeDoesNotExistError, QueryNotFoundError } from \"../errors.js\";\nimport { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\n/**\n * Currently Unsupported Concepts:\n * - many:many links.\n */\nexport class FauxOntology {\n #ontology;\n #actionImpl = new Map();\n #queryImpl = new Map();\n constructor(ontology) {\n this.#ontology = {\n actionTypes: {},\n interfaceTypes: {},\n objectTypes: {},\n ontology,\n queryTypes: {},\n sharedPropertyTypes: {},\n valueTypes: {}\n };\n }\n get apiName() {\n return this.#ontology.ontology.apiName;\n }\n getOntologyFullMetadata() {\n return this.#ontology;\n }\n getFilteredOntologyMetadata(request) {\n return {\n ontology: this.#ontology.ontology,\n objectTypes: Object.fromEntries(Object.entries(this.#ontology.objectTypes).filter(([objectType]) => request.objectTypes.includes(objectType)).map(([objectTypeApiName, objectTypeDefinition]) => [objectTypeApiName, {\n ...objectTypeDefinition,\n linkTypes: objectTypeDefinition.linkTypes.filter(linkType => request.linkTypes.includes(linkType.apiName))\n }])),\n actionTypes: filterRecord(this.#ontology.actionTypes, request.actionTypes),\n queryTypes: this.#getFilteredQueryTypes(request),\n interfaceTypes: filterRecord(this.#ontology.interfaceTypes, request.interfaceTypes),\n sharedPropertyTypes: {},\n valueTypes: {}\n };\n }\n getAllInterfaceTypes() {\n return Object.values(this.#ontology.interfaceTypes);\n }\n getAllObjectTypes() {\n return Object.values(this.#ontology.objectTypes);\n }\n getAllActionTypes() {\n return Object.values(this.#ontology.actionTypes);\n }\n getAllQueryTypes() {\n return Object.values(this.#ontology.queryTypes);\n }\n getInterfaceType(interfaceType) {\n const ret = this.#ontology.interfaceTypes[interfaceType];\n if (ret === undefined) {\n throw new OpenApiCallError(404, ObjectNotFoundError(interfaceType, \"\"));\n }\n return this.#ontology.interfaceTypes[interfaceType];\n }\n getObjectTypeFullMetadata(objectTypeApiName) {\n return this.#ontology.objectTypes[objectTypeApiName];\n }\n getObjectTypeFullMetadataOrThrow(objectTypeApiName) {\n const objectType = this.#ontology.objectTypes[objectTypeApiName];\n if (objectType === undefined) {\n throw new OpenApiCallError(404, ObjectTypeDoesNotExistError(objectTypeApiName));\n }\n return objectType;\n }\n getActionDef(actionTypeApiName) {\n const actionType = this.#ontology.actionTypes[actionTypeApiName];\n if (actionType === undefined) {\n throw new OpenApiCallError(404, ActionNotFoundError());\n }\n return actionType;\n }\n getActionImpl(actionTypeApiName) {\n const impl = this.#actionImpl.get(actionTypeApiName);\n !impl ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Action implementation not found for \" + actionTypeApiName) : invariant(false) : void 0;\n return impl;\n }\n getQueryDef(queryTypeApiNameAndVersion) {\n const queryType = this.#ontology.queryTypes[this.#convertToVersionedApiName(queryTypeApiNameAndVersion)];\n if (queryType === undefined) {\n throw new OpenApiCallError(404, QueryNotFoundError(queryTypeApiNameAndVersion));\n }\n return queryType;\n }\n getQueryImpl(queryTypeApiName, version) {\n const versionMap = this.#queryImpl.get(queryTypeApiName);\n const impl = version !== undefined ? versionMap?.get(version) : versionMap?.get(semver.rsort(Array.from(versionMap.keys() ?? []))[0]);\n if (!impl) {\n throw new OpenApiCallError(404, QueryNotFoundError(queryTypeApiName));\n }\n !impl ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Query implementation not found for \" + queryTypeApiName) : invariant(false) : void 0;\n return impl;\n }\n getInterfaceToObjectTypeMappings(objectApiNames) {\n const objectDefs = Array.from(objectApiNames).map(apiName => this.getObjectTypeFullMetadataOrThrow(apiName));\n const ifaceToObjMap = {};\n for (const objDef of objectDefs) {\n for (const [ifaceApiName, {\n properties\n }] of Object.entries(objDef.implementsInterfaces2)) {\n if (ifaceToObjMap[ifaceApiName] === undefined) {\n ifaceToObjMap[ifaceApiName] = {};\n }\n ifaceToObjMap[ifaceApiName][objDef.objectType.apiName] = properties;\n }\n }\n return ifaceToObjMap;\n }\n getLinkTypeSideV2(objectTypeApiName, linkTypeName) {\n const objectType = this.getObjectTypeFullMetadataOrThrow(objectTypeApiName);\n const linkType = objectType.linkTypes.find(a => a.apiName === linkTypeName);\n if (linkType === undefined) {\n throw new OpenApiCallError(404, LinkTypeNotFound(objectTypeApiName, linkTypeName));\n }\n return linkType;\n }\n getOtherLinkTypeSideV2OrThrow(objectTypeApiName, linkTypeName) {\n const thisSideLink = this.getLinkTypeSideV2(objectTypeApiName, linkTypeName);\n const otherObj = this.getObjectTypeFullMetadataOrThrow(thisSideLink.objectTypeApiName);\n const candidates = otherObj.linkTypes.filter(l => l.linkTypeRid === thisSideLink.linkTypeRid);\n if (otherObj.objectType.apiName !== objectTypeApiName) {\n // if its not the same object type then there should only be one\n !(candidates.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected only one candidate link type\") : invariant(false) : void 0;\n return candidates[0];\n }\n // if its the same object type, then this could be a link that points to itself that\n // is 1:1, many:1 or many:many. In the 1:1 case, the link could have the same name\n // and there would only be 1 entry in that case. Otherwise there should be 2 entries\n // and we want the one that doesn't match the one passed in.\n if (candidates.length === 1) {\n return candidates[0];\n }\n !(candidates.length === 2) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected only two candidate link types\") : invariant(false) : void 0;\n const candidate = candidates.find(l => l.apiName !== thisSideLink.apiName);\n !candidate ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected to find a candidate link type that is not the same as the one passed in\") : invariant(false) : void 0;\n return candidate;\n }\n getBothLinkTypeSides(leftObjectType, leftLinkName, rightObjectType) {\n const leftTypeSideV2 = this.getLinkTypeSideV2(leftObjectType, leftLinkName);\n\n // the rhs passed in should match the target of the lhs\n !(rightObjectType === leftTypeSideV2.objectTypeApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n const rightTypeSideV2 = this.getOtherLinkTypeSideV2OrThrow(leftObjectType, leftLinkName);\n return [leftTypeSideV2, rightTypeSideV2];\n }\n registerObjectType(def) {\n if (def.objectType.apiName in this.#ontology.objectTypes) {\n throw new Error(`ObjectType ${def.objectType.apiName} already registered`);\n }\n this.#ontology.objectTypes[def.objectType.apiName] = def;\n }\n registerActionType(def, implementation) {\n if (def.apiName in this.#ontology.actionTypes) {\n throw new Error(`ActionType ${def.apiName} already registered`);\n }\n this.#ontology.actionTypes[def.apiName] = def;\n if (implementation) {\n this.#actionImpl.set(def.apiName, implementation);\n }\n }\n registerQueryType(def, implementation) {\n if (`${def.apiName}:${def.version}` in this.#ontology.queryTypes) {\n throw new Error(`QueryType ${def.apiName} already registered`);\n }\n this.#ontology.queryTypes[`${def.apiName}:${def.version}`] = def;\n if (implementation) {\n if (!this.#queryImpl.has(def.apiName)) {\n this.#queryImpl.set(def.apiName, new Map());\n }\n if (!valid(def.version)) {\n throw new Error(`QueryType ${def.apiName} version ${def.version} is not semver valid`);\n }\n this.#queryImpl.get(def.apiName)?.set(def.version, implementation);\n }\n }\n registerInterfaceType(def) {\n if (def.apiName in this.#ontology.interfaceTypes) {\n throw new Error(`InterfaceType ${def.apiName} already registered`);\n }\n this.#ontology.interfaceTypes[def.apiName] = def;\n }\n registerSharedPropertyType(def) {\n if (def.apiName in this.#ontology.sharedPropertyTypes) {\n throw new Error(`SharedPropertyType ${def.apiName} already registered`);\n }\n this.#ontology.sharedPropertyTypes[def.apiName] = def;\n }\n #getFilteredQueryTypes(request) {\n const remappedQueryTypes = request.queryTypes.map(x => this.#convertToVersionedApiName(x));\n return Object.fromEntries(Object.entries(this.#ontology.queryTypes).filter(([queryTypeApiName]) => remappedQueryTypes.includes(queryTypeApiName)).map(([queryTypeApiName, queryTypeDefinition]) => [request.queryTypes[remappedQueryTypes.indexOf(queryTypeApiName)], queryTypeDefinition]));\n }\n #convertToVersionedApiName(apiName) {\n // If a query is requested without a version, we remap it to include a versioned api name with the latest version\n if (extractVersion(apiName) !== undefined) {\n return apiName;\n }\n const version = semver.rsort(Object.keys(this.#ontology.queryTypes).filter(queryTypeApiName => queryTypeApiName.split(\":\")[0] === apiName).map(x => extractVersion(x)))[0];\n return `${apiName}:${version}`;\n }\n}\nfunction filterRecord(record, keys) {\n return Object.fromEntries(Object.entries(record).filter(([key]) => keys.includes(key)));\n}\nfunction extractVersion(apiName) {\n return apiName.split(\":\")[1];\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 crypto from \"node:crypto\";\nimport { OntologyNotFoundError } from \"../errors.js\";\nimport { createFauxFoundryHandlers } from \"../handlers/createFauxFoundryHandlers.js\";\nimport { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\nimport { FauxAttachmentStore } from \"./FauxAttachmentStore.js\";\nimport { FauxDataStore } from \"./FauxDataStore.js\";\nimport { FauxOntology } from \"./FauxOntology.js\";\nexport class FauxFoundry {\n #ontologiesByRid = new Map();\n #ontologiesByApiName = new Map();\n #dataStoresByOntologyApiName = new Map();\n #handlers;\n attachments = new FauxAttachmentStore();\n constructor(baseUrl, defaultOntology = {\n apiName: \"default-ontology\",\n displayName: \"Ontology\",\n description: \"The default ontology\",\n rid: `ri.ontology.main.ontology.${crypto.randomUUID()}`\n }, {\n logger,\n strict\n } = {}) {\n this.strict = strict ?? true;\n this.baseUrl = baseUrl;\n this.#handlers = createFauxFoundryHandlers(baseUrl, this);\n this.createOntology(defaultOntology);\n this.defaultOntologyRid = defaultOntology.rid;\n this.logger = logger;\n }\n get handlers() {\n return this.#handlers;\n }\n getDefaultOntology() {\n return this.getOntology(this.defaultOntologyRid);\n }\n getDefaultDataStore() {\n return this.getDataStore(this.defaultOntologyRid);\n }\n createOntology(metadata) {\n const ret = new FauxOntology(metadata);\n this.registerOntology(ret);\n return ret;\n }\n registerOntology(ontology) {\n this.#ontologiesByApiName.set(ontology.getOntologyFullMetadata().ontology.apiName, ontology);\n this.#ontologiesByRid.set(ontology.getOntologyFullMetadata().ontology.rid, ontology);\n }\n getOntology(ontologyApiNameOrRid) {\n const ontology = this.#ontologiesByApiName.get(ontologyApiNameOrRid) ?? this.#ontologiesByRid.get(ontologyApiNameOrRid);\n if (!ontology) {\n throw new OpenApiCallError(404, OntologyNotFoundError(ontologyApiNameOrRid));\n }\n return ontology;\n }\n setDataStore(ontologyApiNameOrRid, fauxDataStore) {\n const ontology = this.getOntology(ontologyApiNameOrRid); // will throw\n this.#dataStoresByOntologyApiName.set(ontology.apiName, fauxDataStore);\n }\n getDataStore(ontologyApiNameOrRid) {\n const ontology = this.getOntology(ontologyApiNameOrRid); // will throw\n const dataStore = this.#dataStoresByOntologyApiName.get(ontology.apiName);\n if (!dataStore) {\n const ret = new FauxDataStore(ontology, this.attachments, this.strict);\n this.setDataStore(ontologyApiNameOrRid, ret);\n return ret;\n }\n return dataStore;\n }\n getEveryOntology() {\n return Object.values(this.#ontologiesByApiName);\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 function withoutRid(o) {\n const {\n __rid,\n ...r\n } = o;\n return r;\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/FauxFoundry/typeHelpers/index.ts","../../src/FauxFoundry/typeHelpers/TH_ActionParameterV2.ts","../../src/FauxFoundry/typeHelpers/TH_ActionTypeV2.ts","../../src/FauxFoundry/typeHelpers/ActionTypeBuilder.ts","../../src/BaseError.ts","../../src/errors.ts","../../src/filterObjects.ts","../../src/handlers/util/getPaginationParams.ts","../../src/handlers/authHandlerMiddleware.ts","../../src/handlers/util/handleOpenApiCall.ts","../../src/handlers/util/pageThroughResponseSearchParams.ts","../../src/FauxFoundry/BaseServerObject.ts","../../src/FauxFoundry/FauxDataStoreBatch.ts","../../src/FauxFoundry/filterTimeSeriesData.ts","../../src/FauxFoundry/filterObjects.ts","../../src/FauxFoundry/getObjectsFromSet.ts","../../src/FauxFoundry/ObjectLocator.ts","../../src/FauxFoundry/validateAction.ts","../../src/FauxFoundry/FauxDataStore.ts","../../src/mock/OntologiesV2/index.ts","../../src/mock/OntologiesV2/Actions.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js","../../../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js","../../../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js","../../../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js","../../../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js","../../../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js","../../src/mock/OntologiesV2/ActionTypesV2.ts","../../src/mock/OntologiesV2/AttachmentPropertiesV2.ts","../../src/mock/OntologiesV2/Attachments.ts","../../src/mock/OntologiesV2/LinkedObjectsV2.ts","../../src/mock/OntologiesV2/MediaReferenceProperties.ts","../../../../node_modules/.pnpm/@osdk+foundry.mediasets@2.38.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js","../../src/mock/OntologiesV2/ObjectTypesV2.ts","../../src/mock/OntologiesV2/OntologiesV2.ts","../../src/mock/OntologiesV2/OntologyInterfaces.ts","../../src/mock/OntologiesV2/OntologyObjectSets.ts","../../src/mock/OntologiesV2/OntologyObjectsV2.ts","../../src/mock/OntologiesV2/Queries.ts","../../src/mock/OntologiesV2/QueryTypes.ts","../../src/mock/OntologiesV2/TimeSeriesPropertiesV2.ts","../../src/mock/OntologiesV2/TimeSeriesValueBankProperties.ts","../../src/mock/OntologiesV2/Transactions.ts","../../src/handlers/createActionHandlers.ts","../../src/handlers/util/requireSearchParams.ts","../../src/handlers/createAttachmentHandlers.ts","../../src/handlers/createLoadObjectsHandlers.ts","../../src/handlers/createMediaRefHandlers.ts","../../src/handlers/createMultipassServerHandlers.ts","../../src/handlers/createObjectSetHandlers.ts","../../src/defaultOntologyMetadata.ts","../../src/defaultOntologyForConjure.ts","../../src/handlers/createOntologyHandlers.ts","../../src/handlers/createQueryHandlers.ts","../../src/handlers/createTimeseriesAndGeotimeHandlers.ts","../../src/handlers/createFauxFoundryHandlers.ts","../../src/FauxFoundry/FauxAttachmentStore.ts","../../src/FauxFoundry/FauxOntology.ts","../../src/FauxFoundry/FauxFoundry.ts","../../src/withoutRid.ts"],"names":["crypto","wireActionTypeV2ToSdkActionMetadata","rest","info","HttpResponse","http","deepEqual","constructNow","isBefore","isAfter","sub","add","invariant","set","ret","DefaultMap","MultiMap","crypto2","inspect","randomUUID","primaryKey","OntologiesV2_exports","apply","applyBatch","symbolClientContext","errorInstanceId","get","_get","upload","_upload","list","_list","aggregate","_aggregate","search","_search","getFullMetadata","_getFullMetadata","getAttachment","readAttachment","read","getLinkedObject","listLinkedObjects","getMediaContent","getMediaMetadata","uploadMedia","_read","getOutgoingLinkType","listOutgoingLinkTypes","loadMetadata","load","loadMultipleObjectTypes","execute","getFirstPoint","getLastPoint","streamPoints","getLatestValue","streamValues","postEdits","valid","semver","crypto3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,mBAAA,GAAA;AAAA,QAAA,CAAA,mBAAA,EAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,uBAAA,EAAA,MAAA,uBAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,gBAAA,EAAA,MAAA;AAAA,CAAA,CAAA;;;ACgBO,SAAS,uBAAA,CAAwB,MAAM,QAAU,EAAA;AACtD,EAAO,OAAA;AAAA,IACL,QAAU,EAAA;AAAA,MACR;AAAA,KACF;AAAA,IACA;AAAA,GACF;AACF;;;ACNO,SAAS,YAAa,CAAA;AAAA,EAC3B,OAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAM,eAAgB,EAAA;AAAA,EACtB,aAAa,EAAC;AAAA,EACd,MAAS,GAAA,QAAA;AAAA,EACT;AACF,CAAG,EAAA;AACD,EAAO,OAAA;AAAA,IACL,OAAA;AAAA,IACA,UAAA;AAAA,IACA,GAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,WAAA,EAAa,WAAe,IAAA,CAAA,OAAA,EAAU,OAAO,CAAA;AAAA,GAC/C;AACF;;;ACbO,SAAS,kBAAkB,MAAQ,EAAA;AACxC,EAAO,OAAA,IAAI,kBAAkB,MAAM,CAAA;AACr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A,CAAiB,GAAK,EAAA,qBAAA,CAAsB,oBAAoB,CAAC,CAAA;AAAA;AAE7E,IAAO,OAAA,QAAA;AAAA;AACT,EACA,YAAA,CAAa,sBAAsB,aAAe,EAAA;AAChD,IAAM,MAAA,QAAA,GAAW,IAAK,CAAA,WAAA,CAAY,oBAAoB,CAAA;AACtD,IAAA,IAAA,CAAK,4BAA6B,CAAA,GAAA,CAAI,QAAS,CAAA,OAAA,EAAS,aAAa,CAAA;AAAA;AACvE,EACA,aAAa,oBAAsB,EAAA;AACjC,IAAM,MAAA,QAAA,GAAW,IAAK,CAAA,WAAA,CAAY,oBAAoB,CAAA;AACtD,IAAA,MAAM,SAAY,GAAA,IAAA,CAAK,4BAA6B,CAAA,GAAA,CAAI,SAAS,OAAO,CAAA;AACxE,IAAA,IAAI,CAAC,SAAW,EAAA;AACd,MAAA,MAAM,MAAM,IAAI,aAAA,CAAc,UAAU,IAAK,CAAA,WAAA,EAAa,KAAK,MAAM,CAAA;AACrE,MAAK,IAAA,CAAA,YAAA,CAAa,sBAAsB,GAAG,CAAA;AAC3C,MAAO,OAAA,GAAA;AAAA;AAET,IAAO,OAAA,SAAA;AAAA;AACT,EACA,gBAAmB,GAAA;AACjB,IAAO,OAAA,MAAA,CAAO,MAAO,CAAA,IAAA,CAAK,oBAAoB,CAAA;AAAA;AAElD;;;ACvEO,SAAS,WAAW,CAAG,EAAA;AAC5B,EAAM,MAAA;AAAA,IACJ,KAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,CAAA;AACJ,EAAO,OAAA,CAAA;AACT","file":"index.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { actionTypeBuilder, createActionRid } from \"./ActionTypeBuilder.js\";\nexport { createActionParameterV2 } from \"./TH_ActionParameterV2.js\";\nexport { createAction as createActionType } from \"./TH_ActionTypeV2.js\";","/*\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\nexport function createActionParameterV2(type, required) {\n return {\n dataType: {\n type\n },\n required\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createActionRid } from \"./ActionTypeBuilder.js\";\nexport function createAction({\n apiName,\n parameters,\n rid = createActionRid(),\n operations = [],\n status = \"ACTIVE\",\n description\n}) {\n return {\n apiName,\n parameters,\n rid,\n operations,\n status,\n description: description ?? `Action ${apiName}`\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 { wireActionTypeV2ToSdkActionMetadata } from \"@osdk/generator-converters\";\nimport * as crypto from \"node:crypto\";\nimport { createActionParameterV2 } from \"./TH_ActionParameterV2.js\";\nimport { createAction } from \"./TH_ActionTypeV2.js\";\nexport function actionTypeBuilder(action) {\n return new ActionTypeBuilder(action);\n}\nexport function createActionRid() {\n return `ri.ontology.main.action-type.${crypto.randomUUID()}`;\n}\nexport class ActionTypeBuilder {\n constructor(action) {\n if (typeof action === \"string\") {\n this.action = createAction({\n apiName: action,\n parameters: {}\n });\n } else {\n this.action = action;\n }\n }\n addParameter(paramId, parameter, required = false) {\n const v = typeof parameter === \"string\" ? createActionParameterV2(parameter, required) : parameter;\n return new ActionTypeBuilder({\n ...this.action,\n parameters: {\n ...this.action.parameters,\n [paramId]: v\n }\n });\n }\n build() {\n const actionTypeV2 = this.action;\n const actionMetadata = wireActionTypeV2ToSdkActionMetadata(actionTypeV2\n // cast below is needed because the compile time type also needs `signatures`\n // which we don't create in the conversion.\n );\n return {\n actionTypeV2: this.action,\n actionDefinition: {\n __DefinitionMetadata: actionMetadata,\n apiName: actionMetadata.apiName,\n type: \"action\"\n }\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// These are the shape of the errors that come back from the API.\nexport function isBaseApiError(error) {\n return error && typeof error === \"object\" && \"errorCode\" in error && \"errorName\" in error && \"errorInstanceId\" in error;\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\nconst errorInstanceId = \"errorInstanceId\";\nconst objectTypeRid = \"ri.foundry.main.objectType.1\";\nexport function ObjectTypeDoesNotExistError(objectType) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ObjectTypeNotFound\",\n errorDescription: \"The requested object type is not found, or the client token does not have access to it.\",\n errorInstanceId,\n parameters: {\n objectType,\n objectTypeRid\n }\n };\n}\nexport function LinkTypeNotFound(objectType, linkType) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"LinkTypeNotFound\",\n errorDescription: \"The link type is not found, or the user does not have access to it.\",\n errorInstanceId,\n parameters: {\n objectType,\n linkType,\n linkTypeId: undefined\n }\n };\n}\nexport function OntologyNotFoundError(ontology) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"OntologyNotFound\",\n errorDescription: \"The requested Ontology is not found, or the client token does not have access to it.\",\n errorInstanceId,\n parameters: {\n ontologyRid: ontology,\n apiName: ontology\n }\n };\n}\nexport function ObjectNotFoundError(objectType, primaryKey) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ObjectNotFound\",\n errorDescription: \"The requested object is not found, or the client token does not have access to it.\",\n errorInstanceId,\n parameters: {\n objectType,\n primaryKey\n }\n };\n}\nexport function QueryNotFoundError(queryApiName) {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"QueryNotFound\",\n errorDescription: \"The query is not found, or the user does not have access to it.\",\n errorInstanceId,\n parameters: {\n query: queryApiName\n }\n };\n}\nexport function ActionNotFoundError() {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ActionNotFound\",\n errorDescription: \"The action is not found, or the user does not have access to it.\",\n errorInstanceId,\n parameters: {\n actionRid: \"\"\n }\n };\n}\nexport function InvalidRequest(errorName) {\n return {\n errorCode: \"INVALID_REQUEST\",\n errorName,\n errorInstanceId,\n parameters: {}\n };\n}\nexport const ApplyActionFailedError = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"ApplyActionFailed\",\n errorDescription: \"\",\n errorInstanceId,\n parameters: {}\n};\nexport const ExecuteQueryFailedError = {\n errorCode: \"CONFLICT\",\n errorName: \"QueryEncounteredUserFacingError\",\n errorDescription: \"The authored Query failed to execute because of a user induced error. The message argument is meant to be displayed to the user.\",\n errorInstanceId,\n parameters: {\n functionRid: \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n functionVersion: \"0.11.0\",\n message: \"test failed\"\n }\n};\nexport const InvalidContentTypeError = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"InvalidContentType\",\n errorDescription: \"The Content-Type cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible.\",\n errorInstanceId,\n parameters: {}\n};\nexport const AttachmentSizeExceededLimitError = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"AttachmentSizeExceededLimit\",\n errorDescription: \"The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB.\",\n errorInstanceId,\n parameters: {\n fileSizeBytes: \"230000\",\n fileLimitBytes: \"200000\"\n }\n};\nexport const AttachmentNotFoundError = {\n errorCode: \"NOT_FOUND\",\n errorName: \"AttachmentNotFound\",\n errorDescription: \"The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object.\",\n errorInstanceId,\n parameters: {\n attachmentRid: \"ri.attachments.main.attachment.86016861-707f-4292-b258-6a7108915a80\"\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 function subSelectPropertiesUrl(object, url) {\n const properties = new Set(url.searchParams.getAll(\"select\"));\n if (properties.size === 0) {\n return object;\n }\n const result = Object.entries(object).reduce((acc, [key, value]) => {\n if (properties.has(key)) {\n acc[key] = value;\n } else if (key === \"__primaryKey\") {\n acc.__primaryKey = value;\n } else if (key === \"__apiName\") {\n acc.__apiName = value;\n }\n return acc;\n }, {});\n return result;\n}\nexport function subSelectProperties(objects, urlOrProperties, includeCount, excludeRid) {\n let properties;\n if (Array.isArray(urlOrProperties)) {\n properties = new Set(urlOrProperties);\n } else {\n properties = new Set(urlOrProperties.searchParams.getAll(\"select\"));\n }\n const result = objects.data.map(object => {\n // This is set when an object had an interface that was marked to return all properties\n if (object.$propsToReturn) {\n return {\n __apiName: object.__apiName,\n __primaryKey: object.__primaryKey,\n __title: object.__title,\n ...object.$propsToReturn,\n ...(excludeRid ? {} : {\n __rid: object.__rid\n })\n };\n }\n\n // no subselect provided, just handle the rid.\n if (properties.size === 0) {\n return excludeRid ? removeRid(object) : object;\n }\n\n // do subselect\n properties.add(\"__primaryKey\");\n properties.add(\"__apiName\");\n properties.add(\"__title\");\n if (!excludeRid) properties.add(\"__rid\");\n return Object.entries(object).reduce((acc, [key, value]) => {\n if (properties.has(key)) {\n acc[key] = value;\n }\n return acc;\n }, {});\n });\n const ret = {\n nextPageToken: objects.nextPageToken,\n data: result,\n totalCount: objects.totalCount\n };\n return ret;\n}\nfunction removeRid(object) {\n const {\n __rid,\n ...rest\n } = object;\n return rest;\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 getPaginationParamsFromUrl(request) {\n const url = new URL(request.url);\n return {\n pageSize: url.searchParams.get(\"pageSize\") == null ? undefined : Number(url.searchParams.get(\"pageSize\")),\n pageToken: url.searchParams.get(\"pageToken\") == null ? undefined : url.searchParams.get(\"pageToken\")\n };\n}\nexport function getPaginationParamsFromRequest({\n pageSize,\n pageToken\n}) {\n return {\n pageSize,\n pageToken\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 { HttpResponse } from \"msw\";\nimport { OpenApiCallError } from \"./util/handleOpenApiCall.js\";\nexport function authHandlerMiddleware(handler) {\n return async info => {\n const authHeader = info.request.headers.get(\"authorization\");\n if (!authHeader || authHeader !== `Bearer myAccessToken`) {\n return HttpResponse.json({\n message: \"Missing Authorization header\"\n }, {\n status: 401\n });\n }\n try {\n return await handler(info);\n } catch (e) {\n if (e instanceof OpenApiCallError) {\n return HttpResponse.json(e.json, {\n status: e.status\n });\n }\n throw e;\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 { http, HttpResponse } from \"msw\";\nimport { authHandlerMiddleware } from \"../authHandlerMiddleware.js\";\nexport class OpenApiCallError extends Error {\n constructor(status, json) {\n super(`${json.errorCode} ${json.errorName ?? \"Unknown error\"} ${JSON.stringify(json.parameters)}`);\n this.status = status;\n this.json = json;\n }\n}\n\n/**\n * This relies on a trick that generally our query params and header params are optional therefore\n * the body can generally be assumed to be the first payload following the strings which are path\n * params.\n *\n * This will also fail if your body is defined as a string as that will get interpreted as a path param.\n * If this happens, you cannot use the helper. Sorry\n */\n\nexport function handleOpenApiCall(openApiCall, names) {\n return (baseUrl, restImpl, options) => {\n let captured = {};\n const capture = {\n fetch: (url, req) => {\n const u = new URL(url);\n u.search = \"\"; // msw doesn't want the search string\n captured = {\n method: req.method,\n endPoint: u.toString().replace(/%3A/g, \":\")\n };\n\n // fake a response object so the call doesn't fail\n return {\n ok: true,\n json: () => Promise.resolve({}),\n blob: () => new Blob()\n };\n },\n baseUrl\n };\n\n // we don't care about the promise here, we are just building the url\n void openApiCall(capture, ...names.map(n => `:${n}`),\n // add a simulated blob in here in case of an upload\n {\n type: \"\",\n size: 5\n });\n return http[captured.method.toLowerCase()](captured.endPoint, authHandlerMiddleware(async info => {\n try {\n const result = await restImpl(info);\n if (result instanceof Response) {\n return new HttpResponse(result.body);\n }\n return HttpResponse.json(result);\n } catch (e) {\n if (e instanceof OpenApiCallError) {\n return HttpResponse.json({\n ...e.json,\n stack: e.stack\n }, {\n status: e.status,\n statusText: e.message\n });\n }\n throw e;\n }\n }), options);\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 function pageThroughResponseSearchParams(iter, {\n pageSize = 1000,\n pageToken\n}, includeCount) {\n const data = Array.from(iter);\n const pageCount = Math.ceil(data.length / pageSize);\n const currentPage = pageToken ? Number(pageToken) : 0;\n if (currentPage < 0 || currentPage >= pageCount) {\n return undefined;\n }\n const startIndex = currentPage * pageSize;\n const endIndex = Math.min(startIndex + pageSize, data.length);\n const nextPageToken = currentPage + 1 < pageCount ? (currentPage + 1).toString() : undefined;\n const ret = {\n nextPageToken,\n data: data.slice(startIndex, endIndex),\n ...(includeCount ? {\n totalCount: String(data.length)\n } : {})\n };\n return ret;\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 * A simplified type safe version of `OntologyObjectV2` that adds a tiny bit\n * more strictness in that it declares the meaning of values for the `__` prefix\n * props.\n */\n\n/**\n * Helpful for distinguishing between an object that looks like it is for the server (__apiName)\n * vs one that is for the client ($apiName).\n */\nexport function isBaseServerObject(obj) {\n return typeof obj === \"object\" && obj != null && \"__primaryKey\" in obj && \"__apiName\" in obj && !(\"$apiName\" in obj) && !(\"$primaryKey\" in obj);\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 deepEqual from \"fast-deep-equal\";\nimport { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\n/**\n * This is separate from the FauxDataStore so that we can in the future support\n * this not-committing on errors. That functionality just does not exist at the moment\n */\nexport class FauxDataStoreBatch {\n #fauxDataStore;\n objectEdits = {\n addedLinksCount: 0,\n addedObjectCount: 0,\n deletedLinksCount: 0,\n deletedObjectsCount: 0,\n modifiedObjectsCount: 0,\n edits: []\n };\n constructor(fauxDataStore) {\n this.#fauxDataStore = fauxDataStore;\n }\n getObject = (objectType, primaryKey) => {\n return this.#fauxDataStore.getObjectOrThrow(objectType, primaryKey);\n };\n getObjects = objectType => {\n return this.#fauxDataStore.getObjectsOfType(objectType);\n };\n addObject(objectType, primaryKey, object) {\n const existingObject = this.#fauxDataStore.getObject(objectType, primaryKey);\n if (existingObject) {\n throw new OpenApiCallError(500, {\n errorCode: \"CONFLICT\",\n errorName: \"ObjectAlreadyExists\",\n errorInstanceId: \"\",\n parameters: {\n objectType,\n primaryKey\n },\n errorDescription: \"The object the user is attempting to create already exists.\"\n });\n }\n const fullMetadata = this.#fauxDataStore.ontology.getObjectTypeFullMetadataOrThrow(objectType);\n this.#fauxDataStore.registerObject({\n ...object,\n __apiName: objectType,\n __primaryKey: primaryKey,\n [fullMetadata.objectType.primaryKey]: primaryKey\n });\n this.objectEdits.edits.push({\n type: \"addObject\",\n primaryKey,\n objectType\n });\n this.objectEdits.addedObjectCount += 1;\n }\n modifyObject(objectType, primaryKey, update) {\n const origObj = this.#fauxDataStore.getObjectOrThrow(objectType, primaryKey);\n const newObj = {\n ...origObj,\n ...update\n };\n if (!deepEqual(origObj, newObj)) {\n this.#fauxDataStore.replaceObjectOrThrow(newObj);\n this.objectEdits.edits.push({\n type: \"modifyObject\",\n primaryKey,\n objectType\n });\n this.objectEdits.modifiedObjectsCount += 1;\n }\n }\n deleteObject = (objectType, primaryKey) => {\n this.#fauxDataStore.unregisterObjectOrThrow(objectType, primaryKey);\n this.objectEdits.edits.push({\n type: \"deleteObject\",\n objectType,\n primaryKey: primaryKey\n });\n };\n addLink = (leftObjectType, leftPrimaryKey, leftLinkName, rightObjectType, rightPrimaryKey) => {\n const [leftTypeSideV2, rightTypeSideV2] = this.#fauxDataStore.ontology.getBothLinkTypeSides(leftObjectType, leftLinkName, rightObjectType);\n this.#fauxDataStore.registerLink({\n __apiName: leftObjectType,\n __primaryKey: leftPrimaryKey\n }, leftTypeSideV2.apiName, {\n __apiName: rightObjectType,\n __primaryKey: rightPrimaryKey\n }, rightTypeSideV2.apiName);\n this.objectEdits.edits.push({\n type: \"addLink\",\n aSideObject: {\n objectType: leftObjectType,\n primaryKey: leftPrimaryKey\n },\n bSideObject: {\n objectType: rightObjectType,\n primaryKey: rightPrimaryKey\n },\n linkTypeApiNameAtoB: leftLinkName,\n linkTypeApiNameBtoA: rightTypeSideV2.apiName\n });\n this.objectEdits.addedLinksCount += 1;\n };\n removeLink = (leftObjectType, leftPrimaryKey, leftLinkName, rightObjectType, rightPrimaryKey) => {\n const [leftTypeSideV2, rightTypeSideV2] = this.#fauxDataStore.ontology.getBothLinkTypeSides(leftObjectType, leftLinkName, rightObjectType);\n this.#fauxDataStore.unregisterLink({\n __apiName: leftObjectType,\n __primaryKey: leftPrimaryKey\n }, leftTypeSideV2.apiName, {\n __apiName: rightObjectType,\n __primaryKey: rightPrimaryKey\n }, rightTypeSideV2.apiName);\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { add, constructNow, isAfter, isBefore, sub } from \"date-fns\";\nconst toDuration = {\n \"DAYS\": v => ({\n days: v\n }),\n \"HOURS\": v => ({\n hours: v\n }),\n \"MILLISECONDS\": v => ({\n seconds: v / 1000\n }),\n \"MINUTES\": v => ({\n minutes: v\n }),\n \"MONTHS\": v => ({\n months: v\n }),\n \"SECONDS\": v => ({\n seconds: v\n }),\n \"WEEKS\": v => ({\n weeks: v\n }),\n \"YEARS\": v => ({\n years: v\n })\n};\nexport function filterTimeSeriesData(data, {\n range\n}, now = constructNow(Date.now())) {\n if (!range) {\n return data;\n }\n const start = extractDate(range, \"startTime\", now);\n const end = extractDate(range, \"endTime\", now);\n const ret = data.filter(point => {\n if (range.type === \"relative\") {\n return (!end || isBefore(point.time, end)) && (!start || isAfter(point.time, start));\n } else {\n return (!end || isBefore(point.time, end)) && (!start || isAfter(point.time, start));\n }\n });\n return ret;\n}\nfunction extractDate(range, key, now) {\n if (range.type === \"absolute\") {\n return range[key];\n }\n const x = range[key];\n if (!x) return undefined;\n const method = x.when === \"BEFORE\" ? sub : add;\n return method(now, toDuration[x.unit](x.value));\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/* eslint-disable no-console */\n\nimport invariant from \"tiny-invariant\";\nexport function filterObjects(objects, where) {\n switch (where.type) {\n case \"eq\":\n {\n const {\n propertyIdentifier,\n field\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n const ret = objects.filter(obj => {\n return obj[field] === where.value;\n });\n return ret;\n }\n case \"gt\":\n {\n const {\n propertyIdentifier,\n field\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n return objects.filter(obj => {\n return obj[field] > where.value;\n });\n }\n case \"lt\":\n {\n const {\n propertyIdentifier,\n field\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n return objects.filter(obj => {\n return obj[field] < where.value;\n });\n }\n case \"in\":\n {\n const {\n propertyIdentifier,\n field\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n return objects.filter(obj => {\n return where.value.includes(obj[field]);\n });\n }\n case \"and\":\n {\n const {\n value\n } = where;\n for (const subWhere of value) {\n objects = filterObjects(objects, subWhere);\n }\n return objects;\n }\n case \"not\":\n {\n const {\n value\n } = where;\n return objects.filter(obj => {\n return !filterObjects([obj], value).length;\n });\n }\n case \"isNull\":\n {\n const {\n propertyIdentifier,\n field,\n value\n } = where;\n if (propertyIdentifier) {\n console.error(\"propertyIdentifier not supported\", where);\n throw new Error(\"propertyIdentifier not supported\");\n }\n !field ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n return objects.filter(obj => {\n return value ? obj[field] == null : obj[field] != null;\n });\n }\n }\n console.error(\"-=-=-=-=-=-= Unhandled where type: \\n\" + `Unhandled where type: ${where.type} in ${JSON.stringify(where)}`);\n throw new Error(`Unhandled where type: ${where.type} in ${JSON.stringify(where)}`);\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 invariant from \"tiny-invariant\";\nimport { filterObjects } from \"./filterObjects.js\";\nexport function getObjectsFromSet(ds, objectSet, methodInput) {\n switch (objectSet.type) {\n case \"base\":\n const ret = Array.from(ds.getObjectsOfType(objectSet.objectType));\n return ret;\n case \"filter\":\n {\n const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return filterObjects(base, objectSet.where);\n }\n case \"union\":\n {\n const set = new Set();\n for (const objSet of objectSet.objectSets) {\n const objects = getObjectsFromSet(ds, objSet, methodInput);\n for (const obj of objects) {\n set.add(obj);\n }\n }\n return Array.from(set);\n }\n case \"subtract\":\n {\n const set = new Set(getObjectsFromSet(ds, objectSet.objectSets[0], methodInput));\n for (let i = 1; i < objectSet.objectSets.length; i++) {\n const toSubtract = getObjectsFromSet(ds, objectSet.objectSets[i], methodInput);\n for (const obj of toSubtract) {\n set.delete(obj);\n }\n }\n return Array.from(set);\n }\n case \"intersect\":\n {\n const set = new Set(getObjectsFromSet(ds, objectSet.objectSets[0], methodInput));\n for (let i = 1; i < objectSet.objectSets.length; i++) {\n const toIntersect = getObjectsFromSet(ds, objectSet.objectSets[i], methodInput);\n for (const obj of set) {\n const match = toIntersect.find(x => x.__apiName === obj.__apiName && x.__primaryKey === obj.__primaryKey);\n if (!match) {\n set.delete(obj);\n } else if (obj[\"$propsToReturn\"] || match[\"$propsToReturn\"]) {\n obj[\"$propsToReturn\"] = {\n ...obj[\"$propsToReturn\"],\n ...match[\"$propsToReturn\"]\n };\n }\n }\n }\n return Array.from(set);\n }\n case \"searchAround\":\n {\n const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return base.flatMap(o => {\n const ret = ds.getLinksOrThrow(o.__apiName, o.__primaryKey, objectSet.link);\n return ret;\n });\n }\n case \"interfaceLinkSearchAround\":\n {\n const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return base.flatMap(o => {\n const ret = ds.getLinksOrThrow(o.__apiName, o.__primaryKey, objectSet.interfaceLink);\n return ret;\n });\n }\n case \"static\":\n {\n return objectSet.objects.map(x => ds.getObjectByRid(x)).filter(x => x != null);\n }\n case \"withProperties\":\n {\n const {\n derivedProperties\n } = objectSet;\n const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return base.map(obj => {\n const extra = Object.fromEntries(Object.entries(derivedProperties).map(([k, v]) => {\n return [k, getDerivedPropertyValue(ds, obj, v)];\n }));\n return {\n ...obj,\n ...extra\n };\n });\n }\n case \"methodInput\":\n !methodInput ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"expected a methodInput\") : invariant(false) : void 0;\n return [methodInput];\n case \"asBaseObjectTypes\":\n throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);\n case \"asType\":\n throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);\n case \"interfaceBase\":\n const relevantObjectTypes = ds.ontology.getAllObjectTypes().filter(x => objectSet.interfaceType in x.implementsInterfaces2);\n\n // const ifaceDef = ds.ontology.getInterfaceType(objectTypeWithAllPropertyTypes);\n\n return relevantObjectTypes.flatMap(x => Array.from(ds.getObjectsOfType(x.objectType.apiName))).map(obj => {\n const objDef = ds.ontology.getObjectTypeFullMetadataOrThrow(obj.__apiName);\n const ifaceMap = objDef.implementsInterfaces2[objectSet.interfaceType];\n const $propsToReturn = objectSet.includeAllBaseObjectProperties ? obj : Object.fromEntries(Object.values(ifaceMap.properties).map(propApiName => [propApiName, obj[propApiName]]));\n return {\n ...objToInterface(ds, obj, objectSet.interfaceType),\n $propsToReturn\n };\n });\n\n // This does not mimic KNN, it just returns `numNeighbors` objects\n case \"nearestNeighbors\":\n const {\n numNeighbors\n } = objectSet;\n const set = getObjectsFromSet(ds, objectSet.objectSet, methodInput);\n return set.slice(0, numNeighbors);\n case \"reference\":\n throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);\n }\n throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);\n}\nfunction objToInterface(ds, o, iface) {\n const ifaceDef = ds.ontology.getInterfaceType(iface);\n const propMap = ds.ontology.getObjectTypeFullMetadataOrThrow(o.__apiName).implementsInterfaces2[iface].properties;\n const {\n __apiName,\n __primaryKey,\n __rid,\n __title\n } = o;\n const ret = {\n __apiName,\n __primaryKey,\n __rid,\n __title\n };\n for (const [sptApiName, propApiName] of Object.entries(propMap)) {\n ret[sptApiName] = o[propApiName];\n }\n return ret;\n}\nexport function getDerivedPropertyValue(ds, obj, def) {\n switch (def.type) {\n case \"selection\":\n {\n return getDerivedPropertySelection(ds, obj, def);\n }\n }\n throw new Error(`Unhandled derived property type ${def.type} in ${JSON.stringify(def)}`);\n // return obj[property.propertyIdentifier];\n}\nfunction getDerivedPropertySelection(ds, obj, {\n operation,\n objectSet\n}) {\n switch (operation.type) {\n case \"get\":\n {\n const objs = getObjectsFromSet(ds, objectSet, obj);\n if (objs.length > 1) {\n throw new Error(\"Cannot get more than one object from a set\");\n }\n return objs[0]?.[operation.selectedPropertyApiName];\n }\n case \"collectList\":\n {\n const objs = getObjectsFromSet(ds, objectSet, obj);\n return objs.map(o => o[operation.selectedPropertyApiName]);\n }\n case \"collectSet\":\n {\n const objs = getObjectsFromSet(ds, objectSet, obj);\n return Array.from(new Set(objs.map(o => o[operation.selectedPropertyApiName])));\n }\n case \"count\":\n {\n const objs = getObjectsFromSet(ds, objectSet, obj);\n return objs.length.toString();\n }\n }\n}\nexport function createOrderBySortFn(orderBy) {\n const fns = orderBy.fields.map(({\n field,\n direction\n }) => {\n return (a, b) => {\n const aValue = a?.[field];\n const bValue = b?.[field];\n if (aValue == null && bValue == null) {\n return 0;\n }\n if (aValue == null) {\n return 1;\n }\n if (bValue == null) {\n return -1;\n }\n const m = direction === \"asc\" ? -1 : 1;\n return aValue < bValue ? m : aValue > bValue ? -m : 0;\n };\n });\n return (a, b) => {\n for (const sortFn of fns) {\n const ret = sortFn(a, b);\n if (ret !== 0) {\n return ret;\n }\n }\n return 0;\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nexport function objectLocator(obj) {\n return `${obj.__apiName}:${obj.__primaryKey}`;\n}\nexport function parseLocator(locator) {\n const [objectType, primaryKey] = locator?.split(\":\") ?? [];\n !(objectType && primaryKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid locator format: ${locator}`) : invariant(false) : void 0;\n return {\n objectType,\n primaryKey\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\nconst NUMERIC_LITERAL_BOUNDS = {\n byte: {\n // Java min/max byte bounds\n minimum: -128,\n maximum: 127\n },\n double: {\n // These numbers are smaller than the actual min/max of a java double,\n // but going higher will require using BigInt in our input fields.\n minimum: -Number.MAX_VALUE,\n maximum: Number.MAX_VALUE\n },\n float: {\n // Java min/max float bounds\n minimum: -3.4028235e38,\n maximum: 3.4028235e38\n },\n integer: {\n // Java min/max integer bounds\n minimum: -2147483648,\n maximum: 2147483647\n },\n long: {\n // These numbers are smaller than the actual min/max of a java long,\n // but going higher will require using BigInt in our input fields.\n minimum: Number.MIN_SAFE_INTEGER,\n maximum: Number.MAX_SAFE_INTEGER\n },\n short: {\n // Java min/max short bounds\n minimum: -32768,\n maximum: 32767\n }\n};\nexport function validateAction(payload, def, dataStore) {\n const ret = {\n parameters: {},\n submissionCriteria: [],\n result: \"VALID\"\n };\n for (const [k, v] of Object.entries(def.parameters)) {\n const value = payload.parameters[k];\n validateActionParameterType(v.dataType, v, value, ret, k, dataStore);\n }\n return ret;\n}\n\n// So far these all basically return the same thing\n// and can likely be rewritten as a function that return boolean\nfunction validateActionParameterType(dataType, paramDef, value, ret, paramKey, dataStore) {\n if (paramDef.required && value == null) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n result: \"INVALID\",\n evaluatedConstraints: [],\n required: true\n };\n return;\n }\n if (!paramDef.required && value == null) {\n return;\n }\n const baseParam = {\n result: \"INVALID\",\n evaluatedConstraints: [],\n required: paramDef.required\n };\n switch (dataType.type) {\n case \"array\":\n {\n if (!Array.isArray(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n for (const item of value) {\n validateActionParameterType(dataType.subType, paramDef, item, ret, paramKey, dataStore);\n }\n return;\n }\n case \"attachment\":\n {\n if (typeof value !== \"string\") {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n }\n case \"boolean\":\n case \"date\":\n case \"long\":\n case \"double\":\n case \"integer\":\n case \"marking\":\n case \"objectSet\":\n case \"timestamp\":\n case \"object\":\n case \"string\":\n if (!matchesOntologyDataType(dataType, value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n case \"geohash\":\n if (!(typeof value === \"string\")) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n case \"geoshape\":\n if (!(typeof value === \"object\" && (\"coordinates\" in value || \"geometries\" in value || \"features\" in value))) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n case \"interfaceObject\":\n {\n if (!isInterfaceActionParam(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n } else if (dataStore.getObject(value.objectTypeApiName, value.primaryKeyValue) == null) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam,\n evaluatedConstraints: [{\n type: \"objectPropertyValue\"\n }]\n };\n }\n return;\n }\n case \"mediaReference\":\n {\n if (!isMediaReference(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n }\n return;\n }\n case \"vector\":\n {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n case \"struct\":\n {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n for (const {\n name,\n fieldType,\n required\n } of dataType.fields) {\n const fieldValue = value[name];\n if (required && fieldValue == null || !matchesOntologyDataType(fieldType, fieldValue)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n }\n return;\n }\n case \"objectType\":\n {\n if (typeof value !== \"string\" || !dataStore.ontology.getObjectTypeFullMetadata(value)) {\n ret.result = \"INVALID\";\n ret.parameters[paramKey] = {\n ...baseParam\n };\n return;\n }\n return;\n }\n default:\n {\n const _assertNever = dataType;\n throw new Error(`validateDataType: unknown type`);\n }\n }\n}\nexport function matchesOntologyDataType(odt, value) {\n switch (odt.type) {\n case \"any\":\n return true;\n case \"array\":\n return Array.isArray(value) && value.every(v => matchesOntologyDataType(odt.itemType, v));\n case \"binary\":\n throw new Error(`validateDataType: ${odt.type} not implemented yet.`);\n case \"boolean\":\n return typeof value === \"boolean\";\n case \"byte\":\n return typeof value === \"number\" && isInBounds(value, NUMERIC_LITERAL_BOUNDS.byte);\n case \"cipherText\":\n return isValidCipherText(value);\n case \"date\":\n return isValidDateString(value);\n case \"decimal\":\n return isValidDecimalString(value);\n case \"double\":\n return typeof value === \"number\" && isInBounds(value, NUMERIC_LITERAL_BOUNDS.double);\n case \"float\":\n return typeof value === \"number\" && isInBounds(value, NUMERIC_LITERAL_BOUNDS.float);\n case \"integer\":\n return typeof value === \"number\" && Number.isInteger(value) && isInBounds(value, NUMERIC_LITERAL_BOUNDS.integer);\n case \"long\":\n return typeof value === \"number\" && Number.isInteger(value) && isInBounds(value, NUMERIC_LITERAL_BOUNDS.long);\n case \"map\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"marking\":\n return typeof value === \"string\";\n case \"object\":\n return typeof value === \"string\" || value != null && typeof value === \"object\" && \"$primaryKey\" in value;\n case \"objectSet\":\n return typeof value === \"string\" && value.startsWith(\"ri.\") || value != null && typeof value === \"object\" && \"objectSet\" in value;\n case \"set\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"short\":\n return typeof value === \"number\" && isInBounds(value, NUMERIC_LITERAL_BOUNDS.short);\n case \"string\":\n return typeof value === \"string\";\n case \"struct\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n case \"timestamp\":\n return isValidTimestampString(value);\n case \"unsupported\":\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n default:\n const _assertNever = odt;\n throw new Error(`matchesOntologyDataType: ${odt.type} not implemented yet.`);\n }\n}\nexport function isMediaReference(o) {\n return typeof o === `object` && typeof o.mimeType === \"string\" && \"reference\" in o && typeof o.reference === \"object\" && o.reference.type === \"mediaSetViewItem\" && \"mediaSetViewItem\" in o.reference && typeof o.reference.mediaSetViewItem === \"object\" && typeof o.reference.mediaSetViewItem.mediaSetRid === \"string\" && typeof o.reference.mediaSetViewItem.mediaSetViewRid === \"string\" && typeof o.reference.mediaSetViewItem.mediaItemRid === \"string\";\n}\nexport function isInterfaceActionParam(value) {\n return typeof value === \"object\" && \"objectTypeApiName\" in value && typeof value.objectTypeApiName === \"string\" && \"primaryKeyValue\" in value && (typeof value.primaryKeyValue === \"string\" || typeof value.primaryKeyValue === \"number\" || typeof value.primaryKeyValue === \"boolean\");\n}\nfunction isPoint(obj) {\n return obj.type === \"Point\" && Array.isArray(obj.coordinates) && obj.coordinates.length === 2 && typeof obj.coordinates[0] === \"number\" && typeof obj.coordinates[1] === \"number\";\n}\nfunction isInBounds(value, bounds) {\n return bounds.minimum <= value && value <= bounds.maximum;\n}\nfunction isValidDateString(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n const dateRegex = /^\\d{4}-\\d{2}-\\d{2}$/;\n if (!dateRegex.test(value)) {\n return false;\n }\n const date = new Date(value);\n return !isNaN(date.getTime()) && date.toISOString().startsWith(value);\n}\nfunction isValidTimestampString(value) {\n return typeof value === \"string\" && !isNaN(new Date(value).getTime());\n}\nfunction isValidCipherText(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n const parts = value.split(\"::\");\n if (!(isValidCipherAffix(parts, \"CIPHER\") || isValidCipherAffix(parts, \"BELLASO\") || isValidCipherAffix(parts, \"BELLASO\", true))) {\n return false;\n }\n const channelRid = parts[1];\n const encryptedValue = parts[2];\n return channelRid.startsWith(\"ri.\") && encryptedValue !== \"\";\n}\nfunction isValidCipherAffix(parts, affix, prefixOnly = false) {\n const totalParts = prefixOnly ? 3 : 4;\n return parts.length === totalParts && parts[0] === affix && (prefixOnly || parts[3] === affix);\n}\nfunction isValidDecimalString(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n const decimalRegex = /^[+-]?(\\d+\\.?\\d*|\\.\\d+)(E[+-]?\\d+)?$/;\n return decimalRegex.test(value) && !isNaN(parseFloat(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 { DefaultMap, MultiMap } from \"mnemonist\";\nimport * as crypto from \"node:crypto\";\nimport { randomUUID } from \"node:crypto\";\nimport { inspect } from \"node:util\";\nimport invariant from \"tiny-invariant\";\nimport { InvalidRequest, ObjectNotFoundError } from \"../errors.js\";\nimport { subSelectProperties } from \"../filterObjects.js\";\nimport { getPaginationParamsFromRequest } from \"../handlers/util/getPaginationParams.js\";\nimport { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\nimport { pageThroughResponseSearchParams } from \"../handlers/util/pageThroughResponseSearchParams.js\";\nimport { isBaseServerObject } from \"./BaseServerObject.js\";\nimport { FauxDataStoreBatch } from \"./FauxDataStoreBatch.js\";\nimport { filterTimeSeriesData } from \"./filterTimeSeriesData.js\";\nimport { createOrderBySortFn, getObjectsFromSet } from \"./getObjectsFromSet.js\";\nimport { objectLocator, parseLocator } from \"./ObjectLocator.js\";\nimport { validateAction } from \"./validateAction.js\";\n\n/**\n * Represents the properties needed to create an object, specifically,\n * the properties of the object and the $apiName\n */\n\n/**\n * Helper type for converting `foo: string | undefined` into `foo?: string`\n */\n\n/**\n * Type safe object for representing \"client\" side objects.\n */\n\nexport class FauxDataStore {\n #objects = new DefaultMap(key => new Map());\n #singleLinks = new DefaultMap(_objectLocator => new Map());\n #manyLinks = new DefaultMap(_objectLocator => new MultiMap(Set));\n #fauxOntology;\n #attachments;\n #timeSeriesData = new DefaultMap(_objectType => new DefaultMap(_pk => new DefaultMap(_property => [])));\n #media = new DefaultMap(_objectType => new DefaultMap(_propName => {\n return new Map();\n }));\n #strict;\n constructor(fauxOntology, attachments, strict) {\n this.#fauxOntology = fauxOntology;\n this.#attachments = attachments;\n this.#strict = strict;\n }\n\n /**\n * Removes all data that is associated with a namespace/ontology.\n *\n * Note: does not clear `attachments` nor does it clear the ontology itself.\n */\n clear() {\n this.#media.clear();\n this.#timeSeriesData.clear();\n this.#manyLinks.clear();\n this.#singleLinks.clear();\n this.#objects.clear();\n }\n get ontology() {\n return this.#fauxOntology;\n }\n #assertObjectExists(objectType, primaryKey) {\n if (!this.getObject(objectType, primaryKey)) {\n throw new OpenApiCallError(404, ObjectNotFoundError(objectType, String(primaryKey)));\n }\n }\n #assertObjectDoesNotExist(objectType, primaryKey) {\n if (this.getObject(objectType, primaryKey)) {\n throw new OpenApiCallError(500, {\n errorCode: \"CONFLICT\",\n errorName: \"ObjectAlreadyExists\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n objectType,\n primaryKey: String(primaryKey)\n },\n errorDescription: \"The object the user is attempting to create already exists.\"\n });\n }\n }\n\n /**\n * Version for use in places like @osdk/client.\n *\n * @param obj An `Osdk.Instance` like object for the ObjectType in the generics\n */\n\n /**\n * Version of register object generally used in shared.test\n * @param obj A raw server side representation of an object\n *\n * Don't use, its too easy to end up with an any.\n */\n\n registerObject(objectType, anyObj) {\n let bso;\n // obj = { ...obj }; // make a copy so we can mutate it\n\n if (isBaseServerObject(objectType)) {\n !(anyObj == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Internal overload should only pass one argument\") : invariant(false) : void 0;\n !!Object.keys(objectType).some(s => s.startsWith(\"$\")) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object should not have any keys starting with $ if it has __apiName\") : invariant(false) : void 0;\n bso = objectType;\n } else if (anyObj == null) {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"should not be possible due to overloads\") : invariant(false) : void 0;\n } else if (isBaseServerObject(anyObj)) {\n !!Object.keys(anyObj).some(s => s.startsWith(\"$\")) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object should not have any keys starting with $ if it has __apiName\") : invariant(false) : void 0;\n bso = anyObj;\n } else {\n bso = this.#osdkCreatableToBso(objectType, anyObj);\n }\n const apiName = bso.__apiName || bso.$apiName;\n !apiName ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object should have an __apiName or $apiName\") : invariant(false) : void 0;\n this.#assertObjectDoesNotExist(apiName, bso.__primaryKey);\n if (!(\"__apiName\" in bso && \"__primaryKey\" in bso)) {\n !(\"$apiName\" in bso && \"$primaryKey\" in bso) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object should have (__apiName and __primaryKey) or ($apiName and $primaryKey)\") : invariant(false) : void 0;\n const {\n $apiName,\n $primaryKey,\n ...others\n } = bso;\n bso = {\n __apiName: $apiName,\n __primaryKey: $primaryKey,\n ...others\n };\n }\n this.#assertObjectDoesNotExist(bso.__apiName, bso.__primaryKey);\n const frozenBso = Object.freeze({\n ...bso\n });\n this.#objects.get(bso.__apiName).set(String(bso.__primaryKey), frozenBso);\n return frozenBso;\n }\n #osdkCreatableToBso(objectType, anyObj) {\n objectType = typeof objectType === \"string\" ? objectType : objectType.apiName;\n if (\"$apiName\" in anyObj) {\n !(anyObj.$apiName === objectType) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n }\n const {\n $apiName,\n $primaryKey,\n ...others\n } = anyObj;\n const meta = this.ontology.getObjectTypeFullMetadataOrThrow(objectType);\n const realPrimaryKey = anyObj[meta.objectType.primaryKey];\n const maybeTitle = anyObj[meta.objectType.titleProperty];\n const rid = anyObj.$rid ?? `ri.phonograph2-objects.main.object.${crypto.randomUUID()}`;\n !(realPrimaryKey != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Object should have a primary key. ${JSON.stringify(anyObj)}`) : invariant(false) : void 0;\n !($primaryKey == null || $primaryKey === realPrimaryKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Primary key mismatch\") : invariant(false) : void 0;\n return {\n __apiName: objectType,\n __primaryKey: realPrimaryKey,\n __title: maybeTitle ? String(maybeTitle) : undefined,\n __rid: rid,\n ...others\n };\n }\n replaceObjectOrThrow(x) {\n const objectType = this.ontology.getObjectTypeFullMetadataOrThrow(x.__apiName);\n const oldObject = this.getObjectOrThrow(x.__apiName, x.__primaryKey);\n const linksToUpdate = [];\n const linksToRemove = [];\n for (const linkDef of objectType.linkTypes) {\n if (linkDef.cardinality === \"ONE\") {\n !(this.#strict && linkDef.foreignKeyPropertyApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Error examining ${objectType.objectType.apiName}.${linkDef.apiName}: ONE side of links should have a foreign key. ${inspect(linkDef, {\n colors: false\n })}`) : invariant(false) : void 0;\n const fkName = linkDef.foreignKeyPropertyApiName;\n const fkValue = x[fkName];\n const oldFkValue = oldObject[fkName];\n if (oldObject[fkName] !== x[fkName]) {\n const dstSide = this.ontology.getOtherLinkTypeSideV2OrThrow(objectType.objectType.apiName, linkDef.apiName);\n const dstLocator = objectLocator({\n __apiName: linkDef.objectTypeApiName,\n __primaryKey: fkValue\n });\n const target = this.getObject(linkDef.objectTypeApiName, fkValue);\n if (fkValue != null && !target) {\n // eslint-disable-next-line no-console\n console.log(`WARNING! Setting a FK value to a non-existent object: ${dstLocator}`);\n }\n if (fkValue != null) {\n linksToUpdate.push({\n dstSide,\n dstLocator,\n srcSide: linkDef,\n srcLocator: objectLocator(x)\n });\n } else {\n linksToRemove.push({\n srcLocator: objectLocator(x),\n srcSide: linkDef,\n dstLocator: objectLocator({\n __apiName: linkDef.objectTypeApiName,\n __primaryKey: oldFkValue\n }),\n dstSide\n });\n }\n }\n }\n }\n this.#objects.get(x.__apiName).set(String(x.__primaryKey), x);\n for (const {\n srcSide,\n srcLocator,\n dstSide,\n dstLocator\n } of linksToUpdate) {\n this.#updateSingleLinkSide(srcSide, srcLocator, dstSide, dstLocator);\n this.#updateSingleLinkSide(dstSide, dstLocator, srcSide, srcLocator);\n }\n for (const {\n srcSide,\n srcLocator,\n dstSide,\n dstLocator\n } of linksToRemove) {\n this.#removeSingleSideOfLink(srcLocator, srcSide, dstLocator);\n this.#removeSingleSideOfLink(dstLocator, dstSide, srcLocator);\n }\n }\n\n /** Throws if the object does not already exist */\n unregisterObjectOrThrow(objectType, primaryKey) {\n this.#assertObjectExists(objectType, primaryKey);\n this.#objects.get(objectType).delete(String(primaryKey));\n }\n registerLink(tmpSrc, srcLinkName, tmpDst, destLinkName) {\n const src = this.getObjectOrThrow(tmpSrc.__apiName, tmpSrc.__primaryKey);\n const dst = this.getObjectOrThrow(tmpDst.__apiName, tmpDst.__primaryKey);\n const srcLocator = objectLocator(src);\n const dstLocator = objectLocator(dst);\n const [srcSide, dstSide] = this.#fauxOntology.getBothLinkTypeSides(src.__apiName, srcLinkName, dst.__apiName);\n !(srcSide.linkTypeRid === dstSide.linkTypeRid) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected both sides of the link to have the same rid, but got ${srcSide.linkTypeRid} and ${dstSide.linkTypeRid}`) : invariant(false) : void 0;\n !(dstSide.apiName === destLinkName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link name mismatch on dst side. Expected ${destLinkName} but found ${dstSide.apiName}`) : invariant(false) : void 0;\n if (this.#strict) {\n const oneSide = srcSide.cardinality === \"ONE\" ? {\n object: src,\n link: srcSide\n } : dstSide.cardinality === \"ONE\" ? {\n object: dst,\n link: dstSide\n } : undefined;\n const manySide = oneSide ? srcSide.cardinality === \"MANY\" ? {\n object: src,\n link: srcSide\n } : {\n object: dst,\n link: dstSide\n } : undefined;\n if (oneSide && manySide) {\n !oneSide.link.foreignKeyPropertyApiName ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected to find a foreignKeyPropertyApiName on the one side: ${oneSide.object.__apiName}.${oneSide.link.apiName}`) : invariant(false) : void 0;\n const newObj = {\n ...oneSide.object,\n [oneSide.link.foreignKeyPropertyApiName]: manySide.object.__primaryKey\n };\n\n // This method call will also do the work to update the sides\n this.replaceObjectOrThrow(newObj);\n return;\n }\n }\n this.#updateSingleLinkSide(srcSide, srcLocator, dstSide, dstLocator);\n this.#updateSingleLinkSide(dstSide, dstLocator, srcSide, srcLocator);\n }\n unregisterLink(src, srcLinkName, dst, dstLinkName) {\n const srcLocator = objectLocator(src);\n const dstLocator = objectLocator(dst);\n const [srcSide, dstSide] = this.#fauxOntology.getBothLinkTypeSides(src.__apiName, srcLinkName, dst.__apiName);\n !(dstSide.apiName === dstLinkName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link name mismatch on dst side. Expected ${dstLinkName} but found ${dstSide.apiName}`) : invariant(false) : void 0;\n if (this.#strict) {\n const {\n oneSide,\n manySide\n } = extractOneManySide(srcSide, src, dstSide, dst);\n if (oneSide && manySide) {\n !oneSide.link.foreignKeyPropertyApiName ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected to find a foreignKeyPropertyApiName on the one side: ${oneSide.object.__apiName}.${oneSide.link.apiName}`) : invariant(false) : void 0;\n const newObj = {\n ...oneSide.object,\n [oneSide.link.foreignKeyPropertyApiName]: undefined\n };\n\n // This method call will also do the work to update the sides\n this.replaceObjectOrThrow(newObj);\n return;\n }\n }\n this.#removeSingleSideOfLink(srcLocator, srcSide, dstLocator);\n this.#removeSingleSideOfLink(dstLocator, dstSide, srcLocator);\n }\n registerTimeSeriesData(objectType, primaryKey, property, data) {\n this.getObjectOrThrow(objectType, primaryKey);\n const def = this.ontology.getObjectTypeFullMetadataOrThrow(objectType);\n !(def.objectType.properties[property].dataType.type === \"timeseries\" || def.objectType.properties[property].dataType.type === \"geotimeSeriesReference\") ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n this.#timeSeriesData.get(objectType).get(String(primaryKey)).set(property, data);\n }\n getTimeSeriesData(objectType, primaryKey, property, filter) {\n this.getObjectOrThrow(objectType, primaryKey);\n const allData = this.#timeSeriesData.get(objectType).get(String(primaryKey)).get(property);\n if (!filter) return allData;\n return filterTimeSeriesData(allData, filter);\n }\n #updateSingleLinkSide(srcSide, srcLocator, dstSide, dstLocator) {\n const srcLinkName = srcSide.apiName;\n if (srcSide.cardinality === \"ONE\") {\n const linkNameToObj = this.#singleLinks.get(srcLocator);\n const oldLocator = linkNameToObj.get(srcLinkName);\n if (oldLocator && oldLocator !== dstLocator) {\n // we need to remove the other side's old value\n this.#removeSingleSideOfLink(oldLocator, dstSide, srcLocator);\n }\n linkNameToObj.set(srcLinkName, dstLocator);\n } else if (srcSide.cardinality === \"MANY\") {\n const linkNameToObj = this.#manyLinks.get(srcLocator);\n linkNameToObj.set(srcLinkName, dstLocator);\n } else {\n // \"never\" case\n throw new Error(\"unexpected cardinality: \" + srcSide.cardinality);\n }\n }\n registerMedia(objectType, property, content, mediaType, path,\n // This should be the correct prefix, per\n // https://github.com/palantir/osdk-ts/pull/1303#discussion_r2001989395\n mediaItemRid = `ri.mio.main.media-item.${randomUUID()}`) {\n const mediaRef = Object.freeze({\n mimeType: mediaType,\n reference: Object.freeze({\n type: \"mediaSetViewItem\",\n mediaSetViewItem: Object.freeze({\n mediaItemRid,\n mediaSetRid: \"ri.unimplemented.in.shared.test\",\n mediaSetViewRid: \"ri.unimplemented.in.shared.test\"\n })\n })\n });\n this.#media.get(objectType).get(property).set(mediaItemRid, Object.freeze({\n content,\n mediaRef,\n metaData: Object.freeze({\n mediaType,\n path,\n sizeBytes: String(content.byteLength)\n })\n }));\n return mediaRef;\n }\n getMediaOrThrow(objectType, primaryKey, property) {\n const obj = this.getObjectOrThrow(objectType, primaryKey);\n const propertyDef = this.ontology.getObjectTypeFullMetadataOrThrow(objectType).objectType.properties[property];\n if (!propertyDef) {\n // This should be the correct error, per\n // https://github.com/palantir/osdk-ts/pull/1303#discussion_r2001968959\n throw new OpenApiCallError(400, {\n errorCode: \"NOT_FOUND\",\n errorName: \"PropertiesNotFound\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n objectType,\n properties: [property]\n },\n errorDescription: \"The requested properties are not found on the object type.\"\n });\n }\n if (propertyDef.dataType.type !== \"mediaReference\") {\n // FIXME: what would the backend do here?\n throw new OpenApiCallError(400, {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"InvalidPropertyType\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n property,\n propertyBaseType: propertyDef.dataType.type\n },\n errorDescription: \"The given property type is not of the expected type.\"\n });\n }\n const rid = obj[property].reference.mediaSetViewItem.mediaItemRid;\n if (!rid || !rid.startsWith(\"ri.\")) {\n throw new OpenApiCallError(400, {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"InvalidPropertyValue\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n property,\n propertyBaseType: propertyDef.dataType.type,\n propertyValue: rid\n },\n errorDescription: \"The value of the given property is invalid. See the documentation of PropertyValue for details on how properties are represented.\"\n });\n }\n const ret = this.#media.get(objectType).get(property).get(rid);\n if (!ret) {\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid parameters\"));\n }\n return ret;\n }\n #removeSingleSideOfLink(locator, linkSide, expectedPriorValue) {\n const destLinkName = linkSide.apiName;\n if (linkSide.cardinality === \"ONE\") {\n const links = this.#singleLinks.get(locator);\n !(links.get(destLinkName) === expectedPriorValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Failed to remove link: expected ${JSON.stringify(expectedPriorValue)} but found ${JSON.stringify(links.get(destLinkName))} for link ${destLinkName} on ${JSON.stringify(locator)}`) : invariant(false) : void 0;\n links.delete(destLinkName);\n } else {\n const links = this.#manyLinks.get(locator);\n !links.get(destLinkName)?.has(expectedPriorValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Failed to remove link: expected collection to contain ${JSON.stringify(expectedPriorValue)} for link ${destLinkName} on ${JSON.stringify(locator)}`) : invariant(false) : void 0;\n links.remove(destLinkName, expectedPriorValue);\n }\n }\n getObject(apiName, primaryKey) {\n return this.#objects.get(apiName).get(String(primaryKey));\n }\n getObjectOrThrow(apiName, primaryKey) {\n const object = this.getObject(apiName, primaryKey);\n if (!object) {\n throw new OpenApiCallError(404, ObjectNotFoundError(apiName, String(primaryKey)));\n }\n return object;\n }\n getObjectByRid(rid) {\n for (const [, pkToObjects] of this.#objects) {\n for (const [, obj] of pkToObjects) {\n if (obj.__rid === rid) {\n return obj;\n }\n }\n }\n }\n getLinksOrThrow(apiName, primaryKey, linkApiName) {\n const object = this.getObjectOrThrow(apiName, primaryKey);\n const linkTypeSide = this.#fauxOntology.getLinkTypeSideV2(apiName, linkApiName);\n if (linkTypeSide.cardinality === \"ONE\") {\n const locator = this.#singleLinks.get(objectLocator(object)).get(linkApiName);\n if (locator === undefined) {\n return [];\n }\n const {\n objectType,\n primaryKey\n } = parseLocator(locator);\n return [this.getObjectOrThrow(objectType, primaryKey)]; // will throw if not found\n } else {\n const locators = this.#manyLinks.get(objectLocator(object)).get(linkApiName);\n return Array.from(locators ?? []).map(a => {\n const [objectType, primaryKey] = a.split(\":\") ?? [];\n !(objectType && primaryKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid locator format\") : invariant(false) : void 0;\n return this.getObjectOrThrow(objectType, primaryKey);\n });\n }\n }\n getLinkOrThrow(objectType, primaryKey, linkType, targetPrimaryKey) {\n const allLinks = this.getLinksOrThrow(objectType, primaryKey, linkType);\n const object = allLinks.filter(l => String(l.__primaryKey) === targetPrimaryKey)[0];\n if (!object) {\n throw new OpenApiCallError(404, ObjectNotFoundError(`${objectType} -> ${linkType}`, String(targetPrimaryKey)));\n }\n return object;\n }\n getObjectsOfType(apiName) {\n this.ontology.getObjectTypeFullMetadataOrThrow(apiName);\n return this.#objects.get(apiName).values();\n }\n getObjectsFromObjectSet(parsedBody) {\n const selected = parsedBody.select;\n // when we have interfaces in here, we have a little trick for\n // caching off the important properties\n let objects = getObjectsFromSet(this, parsedBody.objectSet, undefined);\n if (!objects || objects.length === 0) {\n return {\n data: [],\n totalCount: \"0\",\n nextPageToken: undefined\n };\n }\n if (parsedBody.orderBy) {\n objects = objects.sort(createOrderBySortFn(parsedBody.orderBy));\n }\n\n // finally, if we got interfaces, the objects have names like the interface and we need\n // to return them like the object.\n\n const page = pageThroughResponseSearchParams(objects, getPaginationParamsFromRequest(parsedBody), false);\n if (!page) {\n throw new OpenApiCallError(404, InvalidRequest(`No objects found for ${JSON.stringify(parsedBody)}`));\n }\n const ret = subSelectProperties(page, [...selected], true, parsedBody.excludeRid);\n return ret;\n }\n getAttachmentMetadata(objectType, primaryKey, propertyName) {\n const rid = this.getObjectOrThrow(objectType, primaryKey)[propertyName];\n return this.#attachments.getAttachmentMetadataByRid(rid);\n }\n getAttachmentBuffer(objectType, primaryKey, propertyName) {\n const rid = this.getObjectOrThrow(objectType, primaryKey)[propertyName];\n return this.#attachments.getAttachmentBuffer(rid);\n }\n applyAction(actionTypeApiName, req) {\n const actionDef = this.#fauxOntology.getActionDef(actionTypeApiName);\n const actionImpl = this.#fauxOntology.getActionImpl(actionTypeApiName);\n const validation = validateAction(req, actionDef, this);\n if (validation.result === \"INVALID\") {\n return {\n validation\n };\n }\n const batch = new FauxDataStoreBatch(this);\n const r = actionImpl(batch, req, {\n def: actionDef,\n attachments: this.#attachments\n });\n\n // The legacy actions return the full payload\n // they want to return, so we need to do that\n // but the future is for the actionImpl's to\n // return void and to do validation details here\n if (r) return r;\n return {\n validation: {\n parameters: {},\n result: \"VALID\",\n submissionCriteria: []\n },\n edits: req.options?.mode === \"VALIDATE_AND_EXECUTE\" && (req.options.returnEdits === \"ALL\" || req.options.returnEdits === \"ALL_V2_WITH_DELETIONS\") ? {\n type: \"edits\",\n ...batch.objectEdits\n } : undefined\n };\n }\n batchApplyAction(actionTypeApiName, batchReq) {\n const actionDef = this.#fauxOntology.getActionDef(actionTypeApiName);\n const actionImpl = this.#fauxOntology.getActionImpl(actionTypeApiName);\n for (const req of batchReq.requests) {\n const result = validateAction(req, actionDef, this);\n if (result.result === \"INVALID\") {\n throw new OpenApiCallError(500, {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"ActionValidationFailed\",\n errorInstanceId: \"faux-foundry\",\n parameters: {\n actionType: actionTypeApiName\n }\n });\n }\n }\n const batch = new FauxDataStoreBatch(this);\n const returnLargeScaleEdits = false;\n for (const item of batchReq.requests) {\n actionImpl(batch, {\n ...item,\n options: {\n mode: \"VALIDATE_AND_EXECUTE\",\n returnEdits: batchReq.options?.returnEdits\n }\n }, {\n def: actionDef,\n attachments: this.#attachments\n });\n }\n if (batchReq.options?.returnEdits === \"NONE\") {\n return {};\n }\n if (returnLargeScaleEdits) {\n const editedObjectTypes = new Set();\n for (const edit of batch.objectEdits.edits) {\n if (edit.type === \"modifyObject\" || edit.type === \"addObject\" || edit.type === \"deleteObject\") {\n editedObjectTypes.add(edit.objectType);\n }\n }\n return {\n edits: {\n type: \"largeScaleEdits\",\n editedObjectTypes: Array.from(editedObjectTypes)\n }\n };\n }\n return {\n edits: {\n type: \"edits\",\n ...batch.objectEdits,\n edits: batch.objectEdits.edits.filter(x => x.type !== \"deleteObject\" && x.type !== \"deleteLink\")\n }\n };\n }\n}\nfunction extractOneManySide(srcSide, src, dstSide, dst) {\n const oneSide = srcSide.cardinality === \"ONE\" ? {\n object: src,\n link: srcSide\n } : dstSide.cardinality === \"ONE\" ? {\n object: dst,\n link: dstSide\n } : undefined;\n const manySide = oneSide ? srcSide.cardinality === \"MANY\" ? {\n object: src,\n link: srcSide\n } : {\n object: dst,\n link: dstSide\n } : undefined;\n return {\n oneSide,\n manySide\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\nexport * as Actions from \"./Actions.js\";\nexport * as ActionTypesV2 from \"./ActionTypesV2.js\";\nexport * as AttachmentPropertiesV2 from \"./AttachmentPropertiesV2.js\";\nexport * as Attachments from \"./Attachments.js\";\nexport * as LinkedObjectsV2 from \"./LinkedObjectsV2.js\";\nexport * as MediaReferenceProperties from \"./MediaReferenceProperties.js\";\nexport * as ObjectTypesV2 from \"./ObjectTypesV2.js\";\nexport * as OntologiesV2 from \"./OntologiesV2.js\";\nexport * as OntologyInterfaces from \"./OntologyInterfaces.js\";\nexport * as OntologyObjectSets from \"./OntologyObjectSets.js\";\nexport * as OntologyObjectsV2 from \"./OntologyObjectsV2.js\";\nexport * as Queries from \"./Queries.js\";\nexport * as QueryTypes from \"./QueryTypes.js\";\nexport * as TimeSeriesPropertiesV2 from \"./TimeSeriesPropertiesV2.js\";\nexport * as TimeSeriesValueBankProperties from \"./TimeSeriesValueBankProperties.js\";\nexport * as OntologyTransactions from \"./Transactions.js\";","/*\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 { Actions } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const applyBatch = handleOpenApiCall(Actions.applyBatch, [\"ontologyApiName\", \"actionType\"]);\nexport const apply = handleOpenApiCall(Actions.apply, [\"ontologyApiName\", \"actionType\"]);","/*\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\", 3];\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\", 3];\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}","/*\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 symbolClientContext = Symbol(\"ClientContext\");","/*\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 symbolClientContext = \"__osdkClientContext\";","/*\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 PalantirApiError extends Error {\n constructor(message, errorName, errorCode, errorDescription, statusCode, errorInstanceId, parameters) {\n super(message);\n this.message = message;\n this.errorName = errorName;\n this.errorCode = errorCode;\n this.errorDescription = errorDescription;\n this.statusCode = statusCode;\n this.errorInstanceId = errorInstanceId;\n this.parameters = parameters;\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 { PalantirApiError } from \"./PalantirApiError.js\";\nexport class UnknownError extends PalantirApiError {\n constructor(message, errorName, originalError, statusCode) {\n super(message, errorName, undefined, undefined, statusCode);\n this.originalError = originalError;\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 */\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { symbolClientContext } from \"@osdk/shared.client2\";\nimport { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nexport async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {\n const path = origPath.replace(/\\{([^}]+)\\}/g, () => encodeURIComponent(args.shift()));\n const body = flags & 1 ? args.shift() : undefined;\n const queryArgs = flags & 2 ? args.shift() : undefined;\n const headerArgs = flags & 4 ? args.shift() : undefined;\n const method = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"][httpMethodNum];\n return await apiFetch(client[symbolClientContext] ?? client[oldSymbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);\n}\nasync function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {\n const url = parseUrl(clientCtx.baseUrl, endpointPath);\n for (const [key, value] of Object.entries(queryArguments || {})) {\n if (value == null) {\n continue;\n }\n if (Array.isArray(value)) {\n for (const item of value) {\n url.searchParams.append(key, item);\n }\n } else {\n url.searchParams.append(key, value);\n }\n }\n const headersInit = new Headers();\n headersInit.set(\"Content-Type\", requestMediaType ?? \"application/json\");\n headersInit.set(\"Accept\", responseMediaType ?? \"application/json\");\n Object.entries(headers || {}).forEach(([key, value]) => {\n if (key === \"Content-Type\" && typeof value === \"string\") {\n headersInit.set(\"Content-Type\", value);\n } else if (key === \"Accept\" && typeof value === \"string\") {\n headersInit.set(\"Accept\", value);\n } else if (value != null) {\n headersInit.append(key, value.toString());\n }\n });\n const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);\n // Because this uses the client's fetch, there is a 99.99% chance that it is already going\n // to handle the error case and throw a PalantirApiError since its wrapped in a\n // createFetchOrThrow.\n const response = await clientCtx.fetch(url.toString(), {\n body,\n method: method,\n headers: headersInit\n });\n // However, if we ended up using a \"regular\" fetch, the\n // error status codes are not thrown by fetch automatically,\n // we have to look at the ok property and behave accordingly\n if (!response.ok) {\n try {\n const convertedError = await response.json();\n return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);\n } catch (e) {\n if (e instanceof Error) {\n return new UnknownError(e.message, \"UNKNOWN\");\n }\n return new UnknownError(\"Unable to parse error response\", \"UNKNOWN\");\n }\n }\n // Do not return anything if its a 204. Do not parse either!\n if (response.status === 204) {\n return;\n }\n if (responseMediaType == null || responseMediaType === \"application/json\") {\n return await response.json();\n }\n return response;\n}\nexport function parseUrl(baseUrl, endpointPath) {\n baseUrl += baseUrl.endsWith(\"/\") ? \"\" : \"/\";\n return new URL(`api${endpointPath}`, baseUrl);\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}","/*\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 _upload = [1, \"/v2/ontologies/attachments/upload\", 7, \"*/*\"];\n/**\n * Upload an attachment to use in an action. Any attachment which has not been linked to an object via\n * an action within one hour after upload will be removed.\n * Previously mapped attachments which are not connected to any object anymore are also removed on\n * a biweekly basis.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-write]\n * URL: /v2/ontologies/attachments/upload\n */\nexport function upload($ctx, ...args) {\n const headerParams = {\n ...args[2],\n \"Content-Type\": args[2]?.[\"Content-Type\"] ?? args[0].type,\n \"Content-Length\": args[0].size.toString()\n };\n return $foundryPlatformFetch($ctx, _upload, args[0], args[1], headerParams);\n}\nconst _read = [0, \"/v2/ontologies/attachments/{0}/content\",,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _get = [0, \"/v2/ontologies/attachments/{0}\"];\n/**\n * Get the metadata of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}\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 _getAttachment = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}\", 2];\n/**\n * Get the metadata of attachments parented to the given object.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}\n */\nexport function getAttachment($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getAttachment, ...args);\n}\nconst _getAttachmentByRid = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}\", 2];\n/**\n * Get the metadata of a particular attachment in an attachment list.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}\n */\nexport function getAttachmentByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getAttachmentByRid, ...args);\n}\nconst _readAttachment = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/content\", 2,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content\n */\nexport function readAttachment($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readAttachment, ...args);\n}\nconst _readAttachmentByRid = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}/content\", 2,, \"*/*\"];\n/**\n * Get the content of an attachment by its RID.\n *\n * The RID must exist in the attachment array of the property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content\n */\nexport function readAttachmentByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readAttachmentByRid, ...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 _listLinkedObjects = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/links/{3}\", 2];\n/**\n * Lists the linked objects for a specific object and the given 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}\n */\nexport function listLinkedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listLinkedObjects, ...args);\n}\nconst _getLinkedObject = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/links/{3}/{4}\", 2];\n/**\n * Get a specific linked object that originates from another object.\n *\n * If there is no link between the two objects, `LinkedObjectNotFound` is thrown.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}\n */\nexport function getLinkedObject($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLinkedObject, ...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 _getMediaContent = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/content\", 2,, \"*/*\"];\n/**\n * Gets the content of a media item referenced by this property.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content\n */\nexport function getMediaContent($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaContent, ...args);\n}\nconst _getMediaMetadata = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/metadata\", 2];\n/**\n * Gets metadata about the media item referenced by this property.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata\n */\nexport function getMediaMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaMetadata, ...args);\n}\nconst _upload = [1, \"/v2/ontologies/{0}/objectTypes/{1}/media/{2}/upload\", 3, \"*/*\"];\n/**\n * Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...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 _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 * @alpha\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 _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}","/*\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 _createTemporary = [1, \"/v2/ontologies/{0}/objectSets/createTemporary\", 3];\n/**\n * Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectSets/createTemporary\n */\nexport function createTemporary($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _createTemporary, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectSets/{1}\"];\n/**\n * Gets the definition of the `ObjectSet` with the given RID.\n *\n * @alpha\n *\n * Required Scopes: []\n * URL: /v2/ontologies/{ontology}/objectSets/{objectSetRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _load = [1, \"/v2/ontologies/{0}/objectSets/loadObjects\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition.\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 * Note that null value properties will not be returned.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjects\n */\nexport function load($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _load, ...args);\n}\nconst _loadMultipleObjectTypes = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsMultipleObjectTypes\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting\n * objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped\n * to an interface, in which only the object type properties that implement the properties of any interfaces in its\n * scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to\n * object implementation is returned in order to interpret the objects as the interfaces that they implement.\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 * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `loadObjects`.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes\n */\nexport function loadMultipleObjectTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMultipleObjectTypes, ...args);\n}\nconst _loadObjectsOrInterfaces = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsOrInterfaces\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested\n * object set contains interfaces and the object can be viewed as an interface, it will contain the properties\n * defined by the interface. If not, it will contain the properties defined by its object type. This allows directly\n * loading all objects of an interface where all objects are viewed as the interface, for example.\n *\n * Note that the result object set cannot contain a mix of objects with \"interface\" properties and \"object type\"\n * properties. Attempting to load an object set like this will result in an error.\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 * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `/loadObjects`.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces\n */\nexport function loadObjectsOrInterfaces($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadObjectsOrInterfaces, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objectSets/aggregate\", 3];\n/**\n * Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...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}/objects/{1}\", 2];\n/**\n * Lists the objects for the given Ontology and object 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objects/{1}/{2}\", 2];\n/**\n * Gets a specific object with the given primary key.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _count = [1, \"/v2/ontologies/{0}/objects/{1}/count\", 2];\n/**\n * Returns a count of the objects of the given object type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/count\n */\nexport function count($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _count, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/objects/{1}/search\", 3];\n/**\n * Search for objects in the specified ontology and object type. The request body is used\n * to filter objects based on the specified query. The supported queries are:\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 * | 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 term 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 * | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objects/{1}/aggregate\", 3];\n/**\n * Perform functions on object fields in the specified ontology and object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...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 _postEdits = [1, \"/v2/ontologies/{0}/transactions/{1}/edits\", 3];\n/**\n * Applies a set of edits to a transaction in order.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/transactions/{transactionRid}/edits\n */\nexport function postEdits($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _postEdits, ...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\"];\n/**\n * Lists the Ontologies visible to the current user.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}\"];\n/**\n * Gets a specific ontology for a given Ontology API name or RID.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getFullMetadata = [0, \"/v2/ontologies/{0}/fullMetadata\", 2];\n/**\n * Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces.\n * This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows.\n * It may omit certain entities rather than fail the request.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/fullMetadata\n */\nexport function getFullMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFullMetadata, ...args);\n}\nconst _loadMetadata = [1, \"/v2/ontologies/{0}/metadata\", 3];\n/**\n * Load Ontology metadata for the requested object, link, action, query, and interface types.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/metadata\n */\nexport function loadMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMetadata, ...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 _execute = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 7];\n/**\n * Executes a Query using the given parameters. By default, the latest version of the Query is executed.\n *\n * Optional parameters do not need to be supplied.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...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 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 { ActionTypesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const list = handleOpenApiCall(ActionTypesV2.list, [\"ontologyApiName\"]);\nexport const get = handleOpenApiCall(ActionTypesV2.get, [\"ontologyApiName\", \"actionTypeApiName\"]);","/*\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 { AttachmentPropertiesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getAttachment = handleOpenApiCall(AttachmentPropertiesV2.getAttachment, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const readAttachment = handleOpenApiCall(AttachmentPropertiesV2.readAttachment, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);","/*\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 { Attachments } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const upload = handleOpenApiCall(Attachments.upload, []);\nexport const get = handleOpenApiCall(Attachments.get, [\"attachmentRid\"]);\nexport const read = handleOpenApiCall(Attachments.read, [\"attachmentRid\"]);","/*\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 { LinkedObjectsV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const listLinkedObjects = handleOpenApiCall(LinkedObjectsV2.listLinkedObjects, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"linkType\"]);\nexport const getLinkedObject = handleOpenApiCall(LinkedObjectsV2.getLinkedObject, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"linkType\", \"targetPrimaryKey\"]);","/*\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 { MediaSets } from \"@osdk/foundry.mediasets\";\nimport { MediaReferenceProperties } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getMediaMetadata = handleOpenApiCall(MediaReferenceProperties.getMediaMetadata, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const getMediaContent = handleOpenApiCall(MediaReferenceProperties.getMediaContent, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const upload = handleOpenApiCall(MediaReferenceProperties.upload, [\"ontologyApiName\", \"objectType\", \"propertyName\"]);\nexport const uploadMedia = handleOpenApiCall(MediaSets.uploadMedia, []);","/*\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 _abort = [1, \"/v2/mediasets/{0}/transactions/{1}/abort\", 2];\n/**\n * Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort\n */\nexport function abort($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _abort, ...args);\n}\nconst _calculate = [0, \"/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate\", 6];\n/**\n * Starts calculation of a thumbnail for a given image.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate\n */\nexport function calculate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _calculate, ...args);\n}\nconst _commit = [1, \"/v2/mediasets/{0}/transactions/{1}/commit\", 2];\n/**\n * Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit\n */\nexport function commit($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _commit, ...args);\n}\nconst _create = [1, \"/v2/mediasets/{0}/transactions\", 2];\n/**\n * Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _info = [0, \"/v2/mediasets/{0}/items/{1}\", 6];\n/**\n * Gets information about the media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}\n */\nexport function info($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _info, ...args);\n}\nconst _reference = [0, \"/v2/mediasets/{0}/items/{1}/reference\", 6];\n/**\n * Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference\n */\nexport function reference($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _reference, ...args);\n}\nconst _getRidByPath = [0, \"/v2/mediasets/{0}/items/getRidByPath\", 2];\n/**\n * Returns the media item RID for the media item with the specified path.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/getRidByPath\n */\nexport function getRidByPath($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getRidByPath, ...args);\n}\nconst _upload = [1, \"/v2/mediasets/{0}/items\", 3, \"*/*\"];\n/**\n * Uploads a media item to an existing media set.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}\nconst _read = [0, \"/v2/mediasets/{0}/items/{1}/content\", 6,, \"*/*\"];\n/**\n * Gets the content of a media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _readOriginal = [0, \"/v2/mediasets/{0}/items/{1}/original\", 6,, \"*/*\"];\n/**\n * Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original\n */\nexport function readOriginal($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readOriginal, ...args);\n}\nconst _retrieve = [0, \"/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve\", 6,, \"*/*\"];\n/**\n * Retrieves a successfully calculated thumbnail for a given image.\n *\n * Thumbnails are 200px wide in the format of `image/webp`\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve\n */\nexport function retrieve($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _retrieve, ...args);\n}\nconst _uploadMedia = [2, \"/v2/mediasets/media/upload\", 7, \"*/*\"];\n/**\n * \"Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted.\n *\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`.\"\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/mediasets/media/upload\n */\nexport function uploadMedia($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _uploadMedia, ...args);\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 { ObjectTypesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const get = handleOpenApiCall(ObjectTypesV2.get, [\"ontologyApiName\", \"objectTypeApiName\"]);\nexport const getFullMetadata = handleOpenApiCall(ObjectTypesV2.getFullMetadata, [\"ontologyApiName\", \"objectTypeApiName\"]);\nexport const getOutgoingLinkType = handleOpenApiCall(ObjectTypesV2.getOutgoingLinkType, [\"ontology\", \"objectType\", \"linkType\"]);\nexport const listOutgoingLinkTypes = handleOpenApiCall(ObjectTypesV2.listOutgoingLinkTypes, [\"ontology\", \"objectType\"]);\nexport const list = handleOpenApiCall(ObjectTypesV2.list, [\"ontologyApiName\"]);","/*\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 { OntologiesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getFullMetadata = handleOpenApiCall(OntologiesV2.getFullMetadata, [\"ontologyApiName\"]);\nexport const loadMetadata = handleOpenApiCall(OntologiesV2.loadMetadata, [\"ontologyApiName\"]);\nexport const list = handleOpenApiCall(OntologiesV2.list, []);\n\n/**\n * Get specified Ontology\n */\nexport const get = handleOpenApiCall(OntologiesV2.get, [\"ontologyRid\"]);","/*\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 { OntologyInterfaces } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const list = handleOpenApiCall(OntologyInterfaces.list, [\"ontologyApiName\"]);\nexport const get = handleOpenApiCall(OntologyInterfaces.get, [\"ontologyApiName\", \"interfaceType\"]);","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyObjectSets } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const load = handleOpenApiCall(OntologyObjectSets.load, [\"ontologyApiName\"]);\nexport const aggregate = handleOpenApiCall(OntologyObjectSets.aggregate, [\"ontologyApiName\"]);\nexport const loadMultipleObjectTypes = handleOpenApiCall(OntologyObjectSets.loadMultipleObjectTypes, [\"ontologyApiName\"]);","/*\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 { OntologyObjectsV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const get = handleOpenApiCall(OntologyObjectsV2.get, [\"ontologyApiName\", \"objectType\", \"primaryKey\"]);\nexport const list = handleOpenApiCall(OntologyObjectsV2.list, [\"ontologyApiName\", \"objectType\"]);","/*\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 { Queries } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const execute = handleOpenApiCall(Queries.execute, [\"ontologyApiName\", \"queryApiName\"]);","/*\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 { QueryTypes } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const get = handleOpenApiCall(QueryTypes.get, [\"ontologyApiName\", \"queryTypeApiName\"]);\nexport const list = handleOpenApiCall(QueryTypes.list, [\"ontologyApiName\"]);","/*\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 { TimeSeriesPropertiesV2 } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getFirstPoint = handleOpenApiCall(TimeSeriesPropertiesV2.getFirstPoint, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const getLastPoint = handleOpenApiCall(TimeSeriesPropertiesV2.getLastPoint, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const streamPoints = handleOpenApiCall(TimeSeriesPropertiesV2.streamPoints, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);","/*\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 { TimeSeriesValueBankProperties } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const getLatestValue = handleOpenApiCall(TimeSeriesValueBankProperties.getLatestValue, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);\nexport const streamValues = handleOpenApiCall(TimeSeriesValueBankProperties.streamValues, [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"]);","/*\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 { OntologyTransactions } from \"@osdk/foundry.ontologies\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\nexport const postEdits = handleOpenApiCall(OntologyTransactions.postEdits, [\"ontologyApiName\", \"transactionRid\"]);","/*\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 { ApplyActionFailedError } from \"../errors.js\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { OpenApiCallError } from \"./util/handleOpenApiCall.js\";\nexport const createActionHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Apply an Action\n */\nOntologiesV2.Actions.apply(baseUrl, async ({\n params: {\n ontologyApiName,\n actionType\n },\n request\n}) => {\n const response = fauxFoundry.getDataStore(ontologyApiName).applyAction(actionType, await request.json());\n\n // this is just for the legacy code that registered `undefined` as the return\n // value causing this code path. Once we get rid of the uses of\n // `createLazyDoNothingActionImpl` this should be removed.\n if (!response) {\n throw new OpenApiCallError(400, ApplyActionFailedError);\n }\n return response;\n}), OntologiesV2.Actions.applyBatch(baseUrl, async ({\n params: {\n ontologyApiName,\n actionType\n },\n request\n}) => {\n return fauxFoundry.getDataStore(ontologyApiName).batchApplyAction(actionType, await request.json());\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 { InvalidRequest } from \"../../errors.js\";\nimport { OpenApiCallError } from \"./handleOpenApiCall.js\";\nexport function requireSearchParams(names, req) {\n const url = new URL(req.url);\n return Object.fromEntries(names.map(name => {\n const value = url.searchParams.get(name);\n if (value == null) {\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid parameters\"));\n }\n return [name, value];\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { randomUUID } from \"node:crypto\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { requireSearchParams } from \"./util/requireSearchParams.js\";\nexport const createAttachmentHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Upload attachment\n */\nOntologiesV2.Attachments.upload(baseUrl, async ({\n request\n}) => {\n const {\n filename\n } = requireSearchParams([\"filename\"], request);\n return fauxFoundry.attachments.registerAttachment({\n buffer: await request.arrayBuffer(),\n filename,\n mediaType: request.headers.get(\"Content-Type\") ?? \"application/octet-stream\",\n rid: `ri.attachments.main.attachment.${randomUUID()}`\n });\n}),\n/**\n * Get attachment metadata V1\n */\n\nOntologiesV2.Attachments.get(baseUrl, async ({\n params\n}) => {\n return fauxFoundry.attachments.getAttachmentMetadataByRid(params.attachmentRid);\n}),\n/**\n * Get attachment metadata V2\n */\n\nOntologiesV2.AttachmentPropertiesV2.getAttachment(baseUrl, async ({\n params: {\n ontologyApiName,\n primaryKey,\n objectType,\n propertyName\n }\n}) => {\n return {\n ...fauxFoundry.getDataStore(ontologyApiName).getAttachmentMetadata(objectType, primaryKey, propertyName),\n type: \"single\"\n };\n}),\n/**\n * Read attachment content V1\n */\n\nOntologiesV2.Attachments.read(baseUrl, async ({\n params\n}) => {\n return new Response(fauxFoundry.attachments.getAttachmentBuffer(params.attachmentRid));\n}),\n/**\n * Read attachment content V2\n */\n\nOntologiesV2.AttachmentPropertiesV2.readAttachment(baseUrl, async ({\n params: {\n ontologyApiName,\n primaryKey,\n objectType,\n propertyName\n }\n}) => {\n return new Response(fauxFoundry.getDataStore(ontologyApiName).getAttachmentBuffer(objectType, primaryKey, propertyName));\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { InvalidRequest } from \"../errors.js\";\nimport { subSelectProperties, subSelectPropertiesUrl } from \"../filterObjects.js\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { getPaginationParamsFromUrl } from \"./util/getPaginationParams.js\";\nimport { OpenApiCallError } from \"./util/handleOpenApiCall.js\";\nimport { pageThroughResponseSearchParams } from \"./util/pageThroughResponseSearchParams.js\";\nexport const createLoadObjectsHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load object\n */\nOntologiesV2.OntologyObjectsV2.get(baseUrl, async ({\n request,\n params: {\n ontologyApiName,\n objectType,\n primaryKey\n }\n}) => {\n return subSelectPropertiesUrl(fauxFoundry.getDataStore(ontologyApiName).getObjectOrThrow(objectType, primaryKey), new URL(request.url));\n}),\n/**\n * Load all objects\n */\nOntologiesV2.OntologyObjectsV2.list(baseUrl, async ({\n request,\n params: {\n ontologyApiName,\n objectType\n }\n}) => {\n const loadObjects = pageThroughResponseSearchParams(fauxFoundry.getDataStore(ontologyApiName).getObjectsOfType(objectType), getPaginationParamsFromUrl(request), true);\n if (loadObjects) {\n return subSelectProperties(loadObjects, new URL(request.url), true);\n }\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid Request\"));\n}),\n/**\n * List Linked Objects\n */\nOntologiesV2.LinkedObjectsV2.listLinkedObjects(baseUrl, async ({\n request,\n params: {\n primaryKey,\n linkType,\n objectType,\n ontologyApiName\n }\n}) => {\n const linkResults = fauxFoundry.getDataStore(ontologyApiName).getLinksOrThrow(objectType, primaryKey, linkType);\n const objects = pageThroughResponseSearchParams(linkResults, getPaginationParamsFromUrl(request), true);\n if (objects) {\n return subSelectProperties(objects, new URL(request.url), false);\n }\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid Request\"));\n}),\n/**\n * Get specific Linked Object\n */\n\nOntologiesV2.LinkedObjectsV2.getLinkedObject(baseUrl, async ({\n request,\n params: {\n ontologyApiName,\n objectType,\n primaryKey,\n linkType,\n targetPrimaryKey\n }\n}) => {\n const object = fauxFoundry.getDataStore(ontologyApiName).getLinkOrThrow(objectType, primaryKey, linkType, targetPrimaryKey);\n return subSelectPropertiesUrl(object, new URL(request.url));\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { requireSearchParams } from \"./util/requireSearchParams.js\";\nexport const createMediaRefHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load media metadata\n */\nOntologiesV2.MediaReferenceProperties.getMediaMetadata(baseUrl, async ({\n params: {\n ontologyApiName,\n objectType,\n primaryKey,\n propertyName\n }\n}) => {\n return fauxFoundry.getDataStore(ontologyApiName).getMediaOrThrow(objectType, primaryKey, propertyName).metaData;\n}),\n/**\n * Read media content\n */\nOntologiesV2.MediaReferenceProperties.getMediaContent(baseUrl, async ({\n params: {\n ontologyApiName,\n objectType,\n primaryKey,\n propertyName\n }\n}) => {\n const {\n content,\n metaData: {\n mediaType\n }\n } = fauxFoundry.getDataStore(ontologyApiName).getMediaOrThrow(objectType, primaryKey, propertyName);\n return new Response(content, {\n headers: {\n \"Content-Type\": mediaType\n }\n });\n}), OntologiesV2.MediaReferenceProperties.upload(baseUrl, async ({\n params: {\n ontologyApiName,\n objectType,\n propertyName\n },\n request\n}) => {\n const {\n mediaItemPath\n } = requireSearchParams([\"mediaItemPath\"], request);\n return fauxFoundry.getDataStore(ontologyApiName).registerMedia(objectType, propertyName, await request.arrayBuffer(), request.headers.get(\"Content-Type\") ?? \"application/octet-stream\", mediaItemPath);\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 { http, HttpResponse } from \"msw\";\nexport const createMultipassServerHandlers = (baseUrl, fauxFoundry) => [http.post(`${baseUrl}/multipass/api/oauth2/token`, async req => {\n const body = await req.request.text();\n const parsedBody = new URLSearchParams(body);\n const parsedBodyArray = Array.from(parsedBody.entries());\n if (parsedBody.get(\"grant_type\") === \"client_credentials\" && parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"client_secret\") === \"myClientSecret\" && parsedBody.get(\"scopes\")?.includes(\"offline_access\") && parsedBodyArray.length === 4) {\n return HttpResponse.json({\n access_token: \"myAccessToken\",\n token_type: \"bearer\",\n refresh_token: \"myRefreshToken\",\n expires_in: 3600\n });\n }\n if (parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"grant_type\") === \"authorization_code\" && parsedBody.get(\"code\") === \"callBackCode\" && parsedBody.get(\"redirect_uri\") === \"localhost\" && parsedBody.get(\"code_verifier\") === \"01020304\" && parsedBodyArray.length === 5) {\n return HttpResponse.json({\n access_token: \"myAccessToken\",\n token_type: \"bearer\",\n refresh_token: \"myRefreshToken\",\n expires_in: 3600\n });\n }\n if (parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"grant_type\") === \"refresh_token\" && parsedBody.get(\"refresh_token\") === \"myRefreshToken\" && parsedBodyArray.length === 3) {\n return HttpResponse.json({\n access_token: \"refreshedAccessToken\",\n token_type: \"bearer\",\n refresh_token: \"refreshedRefreshToken\",\n expires_in: 3600\n });\n }\n return HttpResponse.json({\n message: \"Invalid request body\"\n }, {\n status: 400\n });\n}), http.post(\"https://stack.palantir.com/multipass/api/oauth2/revoke_token\", async req => {\n const body = await req.request.text();\n const parsedBody = new URLSearchParams(body);\n const parsedBodyArray = Array.from(parsedBody.entries());\n if (parsedBodyArray.length === 3 && parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"client_secret\") === \"myClientSecret\" && parsedBody.get(\"token\") === \"myAccessToken\") {\n return HttpResponse.json({});\n }\n if (parsedBodyArray.length === 2 && parsedBody.get(\"client_id\") === \"myClientId\" && parsedBody.get(\"token\") === \"myAccessToken\") {\n return HttpResponse.json({});\n }\n return HttpResponse.json({\n message: \"Invalid request body\"\n }, {\n status: 400\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 { OntologiesV2 } from \"../mock/index.js\";\nexport const createObjectSetHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load ObjectSet Objects\n */\nOntologiesV2.OntologyObjectSets.load(baseUrl, async ({\n request,\n params\n}) => {\n return fauxFoundry.getDataStore(params.ontologyApiName).getObjectsFromObjectSet(await request.json());\n}),\n/**\n * Aggregate Objects in ObjectSet\n */\nOntologiesV2.OntologyObjectSets.aggregate(baseUrl, async ({\n request\n}) => {\n throw new Error(\"Not implemented\");\n}),\n/**\n * Load interface objectset Objects\n */\nOntologiesV2.OntologyObjectSets.loadMultipleObjectTypes(baseUrl, async ({\n params,\n request\n}) => {\n const pagedResponse = fauxFoundry.getDataStore(params.ontologyApiName).getObjectsFromObjectSet(await request.json());\n const objectApiNames = new Set(pagedResponse.data.map(o => o.__apiName));\n return {\n interfaceToObjectTypeMappings: fauxFoundry.getOntology(params.ontologyApiName).getInterfaceToObjectTypeMappings(objectApiNames),\n ...pagedResponse\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\nexport const defaultOntologyMetadata = {\n apiName: \"default-ontology\",\n displayName: \"Ontology\",\n description: \"The default ontology\",\n rid: \"ri.ontology.main.ontology.698267cc-6b48-4d98-beff-29beb24e9361\"\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 { defaultOntologyMetadata as defaultOntology } from \"./defaultOntologyMetadata.js\";\nexport const defaultOntologyForConjure = {\n apiName: defaultOntology.apiName,\n displayName: defaultOntology.displayName,\n description: defaultOntology.description,\n currentOntologyVersion: \"0000000c-aaaa-bbbb-cccc-ddddeeeeffff\",\n defaultBranchRid: \"ri.ontology.main.branch.99999999-8888-7777-6666-555555555555\"\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { http as rest, HttpResponse } from \"msw\";\nimport { defaultOntologyForConjure } from \"../defaultOntologyForConjure.js\";\nimport { defaultOntologyMetadata } from \"../defaultOntologyMetadata.js\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { authHandlerMiddleware } from \"./authHandlerMiddleware.js\";\nexport const createOntologyHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load full Ontology metadata\n */\nOntologiesV2.OntologiesV2.getFullMetadata(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyApiName).getOntologyFullMetadata();\n}),\n/**\n * Load ontology metadata for the requested object, link, action, query, and interface types.\n */\nOntologiesV2.OntologiesV2.loadMetadata(baseUrl, async ({\n params,\n request\n}) => {\n return fauxFoundry.getOntology(params.ontologyApiName).getFilteredOntologyMetadata(await request.json());\n}), OntologiesV2.ObjectTypesV2.get(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyApiName).getObjectTypeFullMetadataOrThrow(req.params.objectTypeApiName).objectType;\n}), OntologiesV2.ObjectTypesV2.getFullMetadata(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyApiName).getObjectTypeFullMetadataOrThrow(req.params.objectTypeApiName);\n}),\n/**\n * List ActionTypes\n */\nOntologiesV2.ActionTypesV2.list(baseUrl, async ({\n params\n}) => {\n return {\n data: fauxFoundry.getOntology(params.ontologyApiName).getAllActionTypes()\n };\n}), OntologiesV2.ActionTypesV2.get(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyApiName).getActionDef(req.params.actionTypeApiName);\n}), OntologiesV2.QueryTypes.get(baseUrl, async req => {\n const queryParams = Object.fromEntries(new URL(req.request.url).searchParams.entries());\n const version = queryParams[\"version\"];\n return fauxFoundry.getOntology(req.params.ontologyApiName).getQueryDef(version ? `${req.params.queryTypeApiName}:${version}` : req.params.queryTypeApiName);\n}), OntologiesV2.ObjectTypesV2.getOutgoingLinkType(baseUrl, async ({\n params\n}) => {\n return fauxFoundry.getOntology(params.ontology).getLinkTypeSideV2(params.objectType, params.linkType);\n}), OntologiesV2.ObjectTypesV2.listOutgoingLinkTypes(baseUrl, async ({\n params\n}) => {\n return {\n data: fauxFoundry.getOntology(params.ontology).getObjectTypeFullMetadataOrThrow(params.objectType).linkTypes\n };\n}), OntologiesV2.OntologyInterfaces.list(baseUrl, async req => {\n return {\n data: fauxFoundry.getOntology(req.params.ontologyApiName).getAllInterfaceTypes()\n };\n}), OntologiesV2.OntologyInterfaces.get(baseUrl, ({\n params\n}) => {\n return fauxFoundry.getOntology(params.ontologyApiName).getInterfaceType(params.interfaceType);\n}),\n/**\n * List ontologies\n */\nOntologiesV2.OntologiesV2.list(baseUrl, async () => {\n return {\n data: fauxFoundry.getEveryOntology().map(x => x.getOntologyFullMetadata().ontology)\n };\n}),\n/**\n * Get specified Ontology\n */\nOntologiesV2.OntologiesV2.get(baseUrl, async req => {\n return fauxFoundry.getOntology(req.params.ontologyRid).getOntologyFullMetadata().ontology;\n}),\n/**\n * List objectTypes V2\n */\nOntologiesV2.ObjectTypesV2.list(baseUrl, async req => {\n return {\n data: fauxFoundry.getOntology(req.params.ontologyApiName).getAllObjectTypes().map(x => x.objectType)\n };\n}),\n/**\n * List Queries\n */\nOntologiesV2.QueryTypes.list(baseUrl, async req => {\n return {\n data: fauxFoundry.getOntology(req.params.ontologyApiName).getAllQueryTypes()\n };\n})];\nexport const conjureEndpoint = [rest.post(`https://stack.palantir.com/ontology-metadata/api/ontology/ontology/ontologies/load/all`, authHandlerMiddleware(async () => {\n return HttpResponse.json({\n ontologies: {\n \"ri.ontology.main.ontology.f34bca54-eb0f-41ad-84f0-d562d9f2763a\": {\n apiName: \"ontology-migration-source\",\n displayName: \"Ontology Migration Test Source\",\n description: \"\",\n currentOntologyVersion: \"0000000c-040d-f49d-b7e8-79fa53caacf5\",\n defaultBranchRid: \"ri.ontology.main.branch.122438ac-a6b7-46e9-825f-6c911ffff857\"\n },\n [defaultOntologyMetadata.rid]: defaultOntologyForConjure\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 { valid } from \"semver\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nexport const createQueryHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Execute Queries\n */\nOntologiesV2.Queries.execute(baseUrl, async ({\n request,\n params: {\n ontologyApiName,\n queryApiName\n }\n}) => {\n const queryParams = Object.fromEntries(new URL(request.url).searchParams.entries());\n const version = queryParams[\"version\"];\n if (version != null && !valid(version)) {\n throw new Error(`Invalid version \"${version}\" for query \"${queryApiName}\" in ontology \"${ontologyApiName}: not semver compatible\".`);\n }\n const queryImpl = fauxFoundry.getOntology(ontologyApiName).getQueryImpl(queryApiName, version);\n return queryImpl(await request.json(), fauxFoundry.getDataStore(ontologyApiName));\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/* eslint-disable @typescript-eslint/require-await */\n\nimport { InvalidRequest } from \"../errors.js\";\nimport { OntologiesV2 } from \"../mock/index.js\";\nimport { OpenApiCallError } from \"./util/handleOpenApiCall.js\";\nexport const createTimeseriesAndGeotimeHandlers = (baseUrl, fauxFoundry) => [\n/**\n * Load firstPoint\n */\n\nOntologiesV2.TimeSeriesPropertiesV2.getFirstPoint(baseUrl, async ({\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n return fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName).at(0);\n}),\n/**\n * Load lastPoint\n */\nOntologiesV2.TimeSeriesPropertiesV2.getLastPoint(baseUrl, async ({\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n return fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName).at(-1);\n}),\n/**\n * stream points\n */\nOntologiesV2.TimeSeriesPropertiesV2.streamPoints(baseUrl, async ({\n request,\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n return Response.json(fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName, await request.json()));\n}),\n/**\n * Load latestValue\n */\nOntologiesV2.TimeSeriesValueBankProperties.getLatestValue(baseUrl, async ({\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n const ret = fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName).at(-1);\n if (!ret) {\n throw new OpenApiCallError(400, InvalidRequest(\"Invalid request\"));\n }\n return ret;\n}),\n/**\n * stream values\n */\nOntologiesV2.TimeSeriesValueBankProperties.streamValues(baseUrl, async ({\n request,\n params: {\n objectType,\n ontologyApiName,\n primaryKey,\n propertyName\n }\n}) => {\n return Response.json(fauxFoundry.getDataStore(ontologyApiName).getTimeSeriesData(objectType, primaryKey, propertyName, await request.json()));\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 { createActionHandlers } from \"./createActionHandlers.js\";\nimport { createAttachmentHandlers } from \"./createAttachmentHandlers.js\";\nimport { createLoadObjectsHandlers } from \"./createLoadObjectsHandlers.js\";\nimport { createMediaRefHandlers } from \"./createMediaRefHandlers.js\";\nimport { createMultipassServerHandlers } from \"./createMultipassServerHandlers.js\";\nimport { createObjectSetHandlers } from \"./createObjectSetHandlers.js\";\nimport { createOntologyHandlers } from \"./createOntologyHandlers.js\";\nimport { createQueryHandlers } from \"./createQueryHandlers.js\";\nimport { createTimeseriesAndGeotimeHandlers } from \"./createTimeseriesAndGeotimeHandlers.js\";\nexport function createFauxFoundryHandlers(baseUrl, fauxFoundry) {\n return [createMultipassServerHandlers, createActionHandlers, createObjectSetHandlers, createOntologyHandlers, createQueryHandlers, createLoadObjectsHandlers, createTimeseriesAndGeotimeHandlers, createAttachmentHandlers, createMediaRefHandlers].flatMap(x => x(baseUrl, fauxFoundry));\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 { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\nexport class FauxAttachmentStore {\n #attachments = new Map();\n registerAttachment(attachment) {\n this.#attachments.set(attachment.rid, attachment);\n return this.getAttachmentMetadataByRid(attachment.rid);\n }\n getAttachmentMetadataByRid(attachmentRid) {\n const attachment = this.#attachments.get(attachmentRid);\n if (!attachment) {\n throw new OpenApiCallError(404, {\n errorCode: \"NOT_FOUND\",\n errorName: \"AttachmentNotFound\",\n errorInstanceId: \"internal\",\n parameters: {\n attachmentRid\n },\n errorDescription: \"The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object.\"\n });\n }\n const {\n buffer,\n ...metadata\n } = attachment;\n return {\n ...metadata,\n sizeBytes: String(buffer.byteLength)\n };\n }\n getAttachmentBuffer(attachmentRid) {\n const attachment = this.#attachments.get(attachmentRid);\n if (!attachment) {\n throw new OpenApiCallError(404, {\n errorCode: \"NOT_FOUND\",\n errorName: \"AttachmentNotFound\",\n errorInstanceId: \"internal\",\n parameters: {\n attachmentRid\n },\n errorDescription: \"The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object.\"\n });\n }\n return attachment.buffer;\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 semver, { valid } from \"semver\";\nimport invariant from \"tiny-invariant\";\nimport { ActionNotFoundError, LinkTypeNotFound, ObjectNotFoundError, ObjectTypeDoesNotExistError, QueryNotFoundError } from \"../errors.js\";\nimport { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\n/**\n * Currently Unsupported Concepts:\n * - many:many links.\n */\nexport class FauxOntology {\n #ontology;\n #actionImpl = new Map();\n #queryImpl = new Map();\n constructor(ontology) {\n this.#ontology = {\n actionTypes: {},\n interfaceTypes: {},\n objectTypes: {},\n ontology,\n queryTypes: {},\n sharedPropertyTypes: {},\n valueTypes: {}\n };\n }\n get apiName() {\n return this.#ontology.ontology.apiName;\n }\n getOntologyFullMetadata() {\n return this.#ontology;\n }\n getFilteredOntologyMetadata(request) {\n return {\n ontology: this.#ontology.ontology,\n objectTypes: Object.fromEntries(Object.entries(this.#ontology.objectTypes).filter(([objectType]) => request.objectTypes.includes(objectType)).map(([objectTypeApiName, objectTypeDefinition]) => [objectTypeApiName, {\n ...objectTypeDefinition,\n linkTypes: objectTypeDefinition.linkTypes.filter(linkType => request.linkTypes.includes(linkType.apiName))\n }])),\n actionTypes: filterRecord(this.#ontology.actionTypes, request.actionTypes),\n queryTypes: this.#getFilteredQueryTypes(request),\n interfaceTypes: filterRecord(this.#ontology.interfaceTypes, request.interfaceTypes),\n sharedPropertyTypes: {},\n valueTypes: {}\n };\n }\n getAllInterfaceTypes() {\n return Object.values(this.#ontology.interfaceTypes);\n }\n getAllObjectTypes() {\n return Object.values(this.#ontology.objectTypes);\n }\n getAllActionTypes() {\n return Object.values(this.#ontology.actionTypes);\n }\n getAllQueryTypes() {\n return Object.values(this.#ontology.queryTypes);\n }\n getInterfaceType(interfaceType) {\n const ret = this.#ontology.interfaceTypes[interfaceType];\n if (ret === undefined) {\n throw new OpenApiCallError(404, ObjectNotFoundError(interfaceType, \"\"));\n }\n return this.#ontology.interfaceTypes[interfaceType];\n }\n getObjectTypeFullMetadata(objectTypeApiName) {\n return this.#ontology.objectTypes[objectTypeApiName];\n }\n getObjectTypeFullMetadataOrThrow(objectTypeApiName) {\n const objectType = this.#ontology.objectTypes[objectTypeApiName];\n if (objectType === undefined) {\n throw new OpenApiCallError(404, ObjectTypeDoesNotExistError(objectTypeApiName));\n }\n return objectType;\n }\n getActionDef(actionTypeApiName) {\n const actionType = this.#ontology.actionTypes[actionTypeApiName];\n if (actionType === undefined) {\n throw new OpenApiCallError(404, ActionNotFoundError());\n }\n return actionType;\n }\n getActionImpl(actionTypeApiName) {\n const impl = this.#actionImpl.get(actionTypeApiName);\n !impl ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Action implementation not found for \" + actionTypeApiName) : invariant(false) : void 0;\n return impl;\n }\n getQueryDef(queryTypeApiNameAndVersion) {\n const queryType = this.#ontology.queryTypes[this.#convertToVersionedApiName(queryTypeApiNameAndVersion)];\n if (queryType === undefined) {\n throw new OpenApiCallError(404, QueryNotFoundError(queryTypeApiNameAndVersion));\n }\n return queryType;\n }\n getQueryImpl(queryTypeApiName, version) {\n const versionMap = this.#queryImpl.get(queryTypeApiName);\n const impl = version !== undefined ? versionMap?.get(version) : versionMap?.get(semver.rsort(Array.from(versionMap.keys() ?? []))[0]);\n if (!impl) {\n throw new OpenApiCallError(404, QueryNotFoundError(queryTypeApiName));\n }\n !impl ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Query implementation not found for \" + queryTypeApiName) : invariant(false) : void 0;\n return impl;\n }\n getInterfaceToObjectTypeMappings(objectApiNames) {\n const objectDefs = Array.from(objectApiNames).map(apiName => this.getObjectTypeFullMetadataOrThrow(apiName));\n const ifaceToObjMap = {};\n for (const objDef of objectDefs) {\n for (const [ifaceApiName, {\n properties\n }] of Object.entries(objDef.implementsInterfaces2)) {\n if (ifaceToObjMap[ifaceApiName] === undefined) {\n ifaceToObjMap[ifaceApiName] = {};\n }\n ifaceToObjMap[ifaceApiName][objDef.objectType.apiName] = properties;\n }\n }\n return ifaceToObjMap;\n }\n getLinkTypeSideV2(objectTypeApiName, linkTypeName) {\n const objectType = this.getObjectTypeFullMetadataOrThrow(objectTypeApiName);\n const linkType = objectType.linkTypes.find(a => a.apiName === linkTypeName);\n if (linkType === undefined) {\n throw new OpenApiCallError(404, LinkTypeNotFound(objectTypeApiName, linkTypeName));\n }\n return linkType;\n }\n getOtherLinkTypeSideV2OrThrow(objectTypeApiName, linkTypeName) {\n const thisSideLink = this.getLinkTypeSideV2(objectTypeApiName, linkTypeName);\n const otherObj = this.getObjectTypeFullMetadataOrThrow(thisSideLink.objectTypeApiName);\n const candidates = otherObj.linkTypes.filter(l => l.linkTypeRid === thisSideLink.linkTypeRid);\n if (otherObj.objectType.apiName !== objectTypeApiName) {\n // if its not the same object type then there should only be one\n !(candidates.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected only one candidate link type\") : invariant(false) : void 0;\n return candidates[0];\n }\n // if its the same object type, then this could be a link that points to itself that\n // is 1:1, many:1 or many:many. In the 1:1 case, the link could have the same name\n // and there would only be 1 entry in that case. Otherwise there should be 2 entries\n // and we want the one that doesn't match the one passed in.\n if (candidates.length === 1) {\n return candidates[0];\n }\n !(candidates.length === 2) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected only two candidate link types\") : invariant(false) : void 0;\n const candidate = candidates.find(l => l.apiName !== thisSideLink.apiName);\n !candidate ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected to find a candidate link type that is not the same as the one passed in\") : invariant(false) : void 0;\n return candidate;\n }\n getBothLinkTypeSides(leftObjectType, leftLinkName, rightObjectType) {\n const leftTypeSideV2 = this.getLinkTypeSideV2(leftObjectType, leftLinkName);\n\n // the rhs passed in should match the target of the lhs\n !(rightObjectType === leftTypeSideV2.objectTypeApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n const rightTypeSideV2 = this.getOtherLinkTypeSideV2OrThrow(leftObjectType, leftLinkName);\n return [leftTypeSideV2, rightTypeSideV2];\n }\n registerObjectType(def) {\n if (def.objectType.apiName in this.#ontology.objectTypes) {\n throw new Error(`ObjectType ${def.objectType.apiName} already registered`);\n }\n this.#ontology.objectTypes[def.objectType.apiName] = def;\n }\n registerActionType(def, implementation) {\n if (def.apiName in this.#ontology.actionTypes) {\n throw new Error(`ActionType ${def.apiName} already registered`);\n }\n this.#ontology.actionTypes[def.apiName] = def;\n if (implementation) {\n this.#actionImpl.set(def.apiName, implementation);\n }\n }\n registerQueryType(def, implementation) {\n if (`${def.apiName}:${def.version}` in this.#ontology.queryTypes) {\n throw new Error(`QueryType ${def.apiName} already registered`);\n }\n this.#ontology.queryTypes[`${def.apiName}:${def.version}`] = def;\n if (implementation) {\n if (!this.#queryImpl.has(def.apiName)) {\n this.#queryImpl.set(def.apiName, new Map());\n }\n if (!valid(def.version)) {\n throw new Error(`QueryType ${def.apiName} version ${def.version} is not semver valid`);\n }\n this.#queryImpl.get(def.apiName)?.set(def.version, implementation);\n }\n }\n registerInterfaceType(def) {\n if (def.apiName in this.#ontology.interfaceTypes) {\n throw new Error(`InterfaceType ${def.apiName} already registered`);\n }\n this.#ontology.interfaceTypes[def.apiName] = def;\n }\n registerSharedPropertyType(def) {\n if (def.apiName in this.#ontology.sharedPropertyTypes) {\n throw new Error(`SharedPropertyType ${def.apiName} already registered`);\n }\n this.#ontology.sharedPropertyTypes[def.apiName] = def;\n }\n #getFilteredQueryTypes(request) {\n const remappedQueryTypes = request.queryTypes.map(x => this.#convertToVersionedApiName(x));\n return Object.fromEntries(Object.entries(this.#ontology.queryTypes).filter(([queryTypeApiName]) => remappedQueryTypes.includes(queryTypeApiName)).map(([queryTypeApiName, queryTypeDefinition]) => [request.queryTypes[remappedQueryTypes.indexOf(queryTypeApiName)], queryTypeDefinition]));\n }\n #convertToVersionedApiName(apiName) {\n // If a query is requested without a version, we remap it to include a versioned api name with the latest version\n if (extractVersion(apiName) !== undefined) {\n return apiName;\n }\n const version = semver.rsort(Object.keys(this.#ontology.queryTypes).filter(queryTypeApiName => queryTypeApiName.split(\":\")[0] === apiName).map(x => extractVersion(x)))[0];\n return `${apiName}:${version}`;\n }\n}\nfunction filterRecord(record, keys) {\n return Object.fromEntries(Object.entries(record).filter(([key]) => keys.includes(key)));\n}\nfunction extractVersion(apiName) {\n return apiName.split(\":\")[1];\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 crypto from \"node:crypto\";\nimport { OntologyNotFoundError } from \"../errors.js\";\nimport { createFauxFoundryHandlers } from \"../handlers/createFauxFoundryHandlers.js\";\nimport { OpenApiCallError } from \"../handlers/util/handleOpenApiCall.js\";\nimport { FauxAttachmentStore } from \"./FauxAttachmentStore.js\";\nimport { FauxDataStore } from \"./FauxDataStore.js\";\nimport { FauxOntology } from \"./FauxOntology.js\";\nexport class FauxFoundry {\n #ontologiesByRid = new Map();\n #ontologiesByApiName = new Map();\n #dataStoresByOntologyApiName = new Map();\n #handlers;\n attachments = new FauxAttachmentStore();\n constructor(baseUrl, defaultOntology = {\n apiName: \"default-ontology\",\n displayName: \"Ontology\",\n description: \"The default ontology\",\n rid: `ri.ontology.main.ontology.${crypto.randomUUID()}`\n }, {\n logger,\n strict\n } = {}) {\n this.strict = strict ?? true;\n this.baseUrl = baseUrl;\n this.#handlers = createFauxFoundryHandlers(baseUrl, this);\n this.createOntology(defaultOntology);\n this.defaultOntologyRid = defaultOntology.rid;\n this.logger = logger;\n }\n get handlers() {\n return this.#handlers;\n }\n getDefaultOntology() {\n return this.getOntology(this.defaultOntologyRid);\n }\n getDefaultDataStore() {\n return this.getDataStore(this.defaultOntologyRid);\n }\n createOntology(metadata) {\n const ret = new FauxOntology(metadata);\n this.registerOntology(ret);\n return ret;\n }\n registerOntology(ontology) {\n this.#ontologiesByApiName.set(ontology.getOntologyFullMetadata().ontology.apiName, ontology);\n this.#ontologiesByRid.set(ontology.getOntologyFullMetadata().ontology.rid, ontology);\n }\n getOntology(ontologyApiNameOrRid) {\n const ontology = this.#ontologiesByApiName.get(ontologyApiNameOrRid) ?? this.#ontologiesByRid.get(ontologyApiNameOrRid);\n if (!ontology) {\n throw new OpenApiCallError(404, OntologyNotFoundError(ontologyApiNameOrRid));\n }\n return ontology;\n }\n setDataStore(ontologyApiNameOrRid, fauxDataStore) {\n const ontology = this.getOntology(ontologyApiNameOrRid); // will throw\n this.#dataStoresByOntologyApiName.set(ontology.apiName, fauxDataStore);\n }\n getDataStore(ontologyApiNameOrRid) {\n const ontology = this.getOntology(ontologyApiNameOrRid); // will throw\n const dataStore = this.#dataStoresByOntologyApiName.get(ontology.apiName);\n if (!dataStore) {\n const ret = new FauxDataStore(ontology, this.attachments, this.strict);\n this.setDataStore(ontologyApiNameOrRid, ret);\n return ret;\n }\n return dataStore;\n }\n getEveryOntology() {\n return Object.values(this.#ontologiesByApiName);\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 function withoutRid(o) {\n const {\n __rid,\n ...r\n } = o;\n return r;\n}"]}
|