@osdk/client 2.0.0-beta.7 → 2.0.0-beta.9
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 +28 -0
- package/build/browser/{chunk-FGMBMQIJ.js → chunk-ITBKY5DE.js} +8 -4
- package/build/browser/chunk-ITBKY5DE.js.map +1 -0
- package/build/browser/index.js +2 -2
- package/build/browser/public/unstable-do-not-use.js +2 -2
- package/build/esm/Client.d.ts +2 -2
- package/build/esm/Client.d.ts.map +1 -1
- package/build/esm/actions/applyAction.d.ts +12 -5
- package/build/esm/actions/applyAction.d.ts.map +1 -1
- package/build/esm/{chunk-FGMBMQIJ.js → chunk-ITBKY5DE.js} +8 -4
- package/build/esm/chunk-ITBKY5DE.js.map +1 -0
- package/build/esm/createAttachmentFromRid.d.ts.map +1 -1
- package/build/esm/createClient.d.ts.map +1 -1
- package/build/esm/index.js +2 -2
- package/build/esm/ontology/OntologyProvider.d.ts +2 -2
- package/build/esm/ontology/OntologyProvider.d.ts.map +1 -1
- package/build/esm/public/unstable-do-not-use.js +2 -2
- package/package.json +10 -10
- package/build/browser/chunk-FGMBMQIJ.js.map +0 -1
- package/build/esm/chunk-FGMBMQIJ.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/actions/ActionValidationError.ts","../../../internal.foundry.datasets/build/esm/chunk-PZ5AY32C.js","../../../shared.net.platformapi/build/esm/index.js","../../../internal.foundry.datasets/build/esm/chunk-S3RCUT7E.js","../../../internal.foundry.datasets/build/esm/chunk-LACCW5AJ.js","../../../internal.foundry.datasets/build/esm/chunk-WOQTHZR3.js","../../../internal.foundry.datasets/build/esm/chunk-6JHAYAPR.js","../../../internal.foundry.ontologies/build/esm/index.js","../../../internal.foundry.ontologies/build/esm/chunk-PZ5AY32C.js","../../../internal.foundry.ontologies/build/esm/chunk-UM4N5F6D.js","../../../internal.foundry.ontologies/build/esm/chunk-MONAXU3N.js","../../../internal.foundry.ontologies/build/esm/chunk-5RUWELWF.js","../../../internal.foundry.ontologies/build/esm/chunk-YCOLCQXU.js","../../../internal.foundry.ontologies/build/esm/chunk-ATSSLGFA.js","../../../internal.foundry.ontologies/build/esm/chunk-ABHCL2BI.js","../../../internal.foundry.ontologies/build/esm/chunk-VBZZKGHE.js","../../../internal.foundry.ontologies/build/esm/chunk-SALCOSHR.js","../../../internal.foundry.ontologiesv2/build/esm/index.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-PZ5AY32C.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-CTA4DXZF.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-U76D6BOW.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-35VM6XLH.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-UFJTKRQC.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-GWYI4RKT.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-KQNF55S5.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-ZKWJVNUQ.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-VCCTOHYG.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-EFVOGNPX.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-3H3SHEFA.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-4TOWICL3.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-ZNHKEV4X.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-OBKC7XBM.js","../../src/createAttachmentFromRid.ts","../../src/object/AttachmentUpload.ts","../../src/util/addUserAgentAndRequestContextHeaders.ts","../../src/util/streamutils.ts","../../src/createTimeseriesProperty.ts","../../src/object/Cache.ts","../../src/ontology/OntologyProvider.ts","../../src/object/SimpleCache.ts","../../src/object/convertWireToOsdkObjects/InternalSymbols.ts","../../src/object/convertWireToOsdkObjects/createOsdkInterface.ts","../../src/object/convertWireToOsdkObjects/getDollarAs.ts","../../src/internal/conversions/modernToLegacyWhereClause.ts","../../src/internal/conversions/legacyToModernSingleAggregationResult.ts","../../src/internal/conversions/modernToLegacyAggregationClause.ts","../../src/internal/conversions/modernToLegacyGroupByClause.ts","../../src/object/aggregate.ts","../../src/object/fetchSingle.ts","../../src/util/augmentRequestContext.ts","../../src/util/WireObjectSet.ts","../../src/objectSet/createObjectSet.ts","../../src/object/convertWireToOsdkObjects/getDollarLink.ts","../../src/object/convertWireToOsdkObjects/createOsdkObject.ts","../../src/object/convertWireToOsdkObjects.ts","../../src/object/fetchPage.ts","../../src/util/isOntologyObjectV2.ts","../../src/util/isOsdkObject.ts","../../src/util/toDataValue.ts","../../src/actions/applyAction.ts","../../src/ontology/loadFullObjectMetadata.ts","../../src/ontology/loadInterfaceDefinition.ts","../../src/ontology/StandardOntologyProvider.ts","../../src/util/UserAgent.ts","../../src/createMinimalClient.ts","../../src/util/isOsdkBaseObject.ts","../../src/util/toDataValueQueries.ts","../../src/queries/applyQuery.ts","../../src/createClient.ts"],"names":["__defProp","__export","esm_exports","Action_exports","Attachment_exports","Query_exports","QueryType_exports","getFirstPoint","getLastPoint","invariant","PalantirApiError","augment","applyAction","client","isOsdkBaseObject","symbolClientContext"],"mappings":";;;;;;;;;;;;;;;AAgBa,IAAA,qBAAA,GAAN,cAAoC,KAAM,CAAA;AAAA,EAC/C,YAAY,UAAY,EAAA;AACtB,IAAA,KAAA,CAAM,kBAAkB,CAAA,CAAA;AACxB,IAAA,IAAA,CAAK,UAAa,GAAA,UAAA,CAAA;AAAA,GACpB;AACF,EAAA;;;ACrBA,IAAIA,aAAY,MAAO,CAAA,cAAA,CAAA;AACvB,IAAIC,SAAAA,GAAW,CAAC,MAAA,EAAQ,GAAQ,KAAA;AAC9B,EAAA,KAAA,IAAS,IAAQ,IAAA,GAAA,EAAKD,UAAAA,CAAU,QAAQ,IAAM,EAAA;AAAA,IAC5C,GAAA,EAAK,IAAI,IAAI,CAAA;AAAA,IACb,UAAY,EAAA,IAAA;AAAA,GACb,CAAA,CAAA;AACH,C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A,KAAS,QAAU,EAAA;AAC9B,MAAU,SAAA,CAAA,gBAAA,CAAiB,UAAU,CAAC,CAAA,CAAA;AACtC,MAAO,OAAA,IAAI,aAAc,CAAA,SAAA,EAAW,CAAC,CAAA,CAAA;AAAA,KACvC,MAAA,IAAW,CAAE,CAAA,IAAA,KAAS,OAAS,EAAA;AAC7B,MAAU,SAAA,CAAA,gBAAA,CAAiB,UAAU,CAAC,CAAA,CAAA;AACtC,MAAO,OAAA,IAAI,YAAa,CAAA,SAAA,EAAW,CAAC,CAAA,CAAA;AAAA,KAC/B,MAAA;AACL,MAAM,MAAA,IAAI,MAAM,iBAAiB,CAAA,CAAA;AAAA,KACnC;AAAA,GACF;AACA,EAAM,MAAA,MAAA,GAAS,MAAO,CAAA,gBAAA,CAAiB,QAAU,EAAA;AAAA,IAC/C,CAACG,mBAAmB,GAAG;AAAA,MACrB,KAAO,EAAA,SAAA;AAAA,KACT;AAAA,GACD,CAAA,CAAA;AACD,EAAO,OAAA,MAAA,CAAA;AACT,CAAA;AACO,IAAM,YAAe,GAAA,oBAAA,CAAqB,IAAK,CAAA,KAAA,CAAA,EAAW,eAAe","file":"chunk-ITBKY5DE.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class ActionValidationError extends Error {\n constructor(validation) {\n super(\"Validation Error\");\n this.validation = validation;\n }\n}","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all) __defProp(target, name, {\n get: all[name],\n enumerable: true\n });\n};\nexport { __export };","import { symbolClientContext } from '@osdk/shared.client';\nimport { PalantirApiError, UnknownError } from '@osdk/shared.net.errors';\n\n// src/foundryPlatformFetch.ts\nasync 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() : void 0;\n const queryArgs = flags & 2 ? args.shift() : void 0;\n const headerArgs = flags & 4 ? args.shift() : void 0;\n const method = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"][httpMethodNum];\n return await apiFetch(client[symbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);\n}\nasync function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {\n const url = new URL(`/api${endpointPath}`, clientCtx.baseUrl);\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 (value != null) {\n headersInit.append(key, value.toString());\n }\n });\n const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);\n const response = await clientCtx.fetch(url.toString(), {\n body,\n method,\n headers: headersInit\n });\n if (!response.ok) {\n try {\n const convertedError = await response.json();\n return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, 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 if (response.status === 204) {\n return;\n }\n if (responseMediaType == null || responseMediaType === \"application/json\") {\n return await response.json();\n }\n return response.blob();\n}\nexport { foundryPlatformFetch };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Branch.ts\nvar Branch_exports = {};\n__export(Branch_exports, {\n createBranch: () => createBranch,\n deleteBranch: () => deleteBranch,\n getBranch: () => getBranch,\n listBranches: () => listBranches\n});\nvar _listBranches = [0, \"/v1/datasets/{0}/branches\", 2];\nfunction listBranches($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listBranches, ...args);\n}\nvar _createBranch = [1, \"/v1/datasets/{0}/branches\", 1];\nfunction createBranch($ctx, ...args) {\n return foundryPlatformFetch($ctx, _createBranch, ...args);\n}\nvar _getBranch = [0, \"/v1/datasets/{0}/branches/{1}\"];\nfunction getBranch($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getBranch, ...args);\n}\nvar _deleteBranch = [3, \"/v1/datasets/{0}/branches/{1}\"];\nfunction deleteBranch($ctx, ...args) {\n return foundryPlatformFetch($ctx, _deleteBranch, ...args);\n}\nexport { Branch_exports, createBranch, deleteBranch, getBranch, listBranches };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Dataset.ts\nvar Dataset_exports = {};\n__export(Dataset_exports, {\n createDataset: () => createDataset,\n deleteSchema: () => deleteSchema,\n getDataset: () => getDataset,\n getSchema: () => getSchema,\n putSchema: () => putSchema,\n readTable: () => readTable\n});\nvar _createDataset = [1, \"/v1/datasets\", 1];\nfunction createDataset($ctx, ...args) {\n return foundryPlatformFetch($ctx, _createDataset, ...args);\n}\nvar _getDataset = [0, \"/v1/datasets/{0}\"];\nfunction getDataset($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getDataset, ...args);\n}\nvar _readTable = [0, \"/v1/datasets/{0}/readTable\", 2,, \"*/*\"];\nfunction readTable($ctx, ...args) {\n return foundryPlatformFetch($ctx, _readTable, ...args);\n}\nvar _getSchema = [0, \"/v1/datasets/{0}/schema\", 2];\nfunction getSchema($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getSchema, ...args);\n}\nvar _putSchema = [2, \"/v1/datasets/{0}/schema\", 3];\nfunction putSchema($ctx, ...args) {\n return foundryPlatformFetch($ctx, _putSchema, ...args);\n}\nvar _deleteSchema = [3, \"/v1/datasets/{0}/schema\", 2];\nfunction deleteSchema($ctx, ...args) {\n return foundryPlatformFetch($ctx, _deleteSchema, ...args);\n}\nexport { Dataset_exports, createDataset, deleteSchema, getDataset, getSchema, putSchema, readTable };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/File.ts\nvar File_exports = {};\n__export(File_exports, {\n deleteFile: () => deleteFile,\n getFileContent: () => getFileContent,\n getFileMetadata: () => getFileMetadata,\n listFiles: () => listFiles,\n uploadFile: () => uploadFile\n});\nvar _listFiles = [0, \"/v1/datasets/{0}/files\", 2];\nfunction listFiles($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listFiles, ...args);\n}\nvar _uploadFile = [1, \"/v1/datasets/{0}/files:upload\", 3, \"*/*\"];\nfunction uploadFile($ctx, ...args) {\n return foundryPlatformFetch($ctx, _uploadFile, ...args);\n}\nvar _getFileMetadata = [0, \"/v1/datasets/{0}/files/{1}\", 2];\nfunction getFileMetadata($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getFileMetadata, ...args);\n}\nvar _deleteFile = [3, \"/v1/datasets/{0}/files/{1}\", 2];\nfunction deleteFile($ctx, ...args) {\n return foundryPlatformFetch($ctx, _deleteFile, ...args);\n}\nvar _getFileContent = [0, \"/v1/datasets/{0}/files/{1}/content\", 2,, \"*/*\"];\nfunction getFileContent($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getFileContent, ...args);\n}\nexport { File_exports, deleteFile, getFileContent, getFileMetadata, listFiles, uploadFile };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Transaction.ts\nvar Transaction_exports = {};\n__export(Transaction_exports, {\n abortTransaction: () => abortTransaction,\n commitTransaction: () => commitTransaction,\n createTransaction: () => createTransaction,\n getTransaction: () => getTransaction\n});\nvar _createTransaction = [1, \"/v1/datasets/{0}/transactions\", 3];\nfunction createTransaction($ctx, ...args) {\n return foundryPlatformFetch($ctx, _createTransaction, ...args);\n}\nvar _getTransaction = [0, \"/v1/datasets/{0}/transactions/{1}\"];\nfunction getTransaction($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getTransaction, ...args);\n}\nvar _commitTransaction = [1, \"/v1/datasets/{0}/transactions/{1}/commit\"];\nfunction commitTransaction($ctx, ...args) {\n return foundryPlatformFetch($ctx, _commitTransaction, ...args);\n}\nvar _abortTransaction = [1, \"/v1/datasets/{0}/transactions/{1}/abort\"];\nfunction abortTransaction($ctx, ...args) {\n return foundryPlatformFetch($ctx, _abortTransaction, ...args);\n}\nexport { Transaction_exports, abortTransaction, commitTransaction, createTransaction, getTransaction };","export { QueryType_exports as QueryTypes } from './chunk-UM4N5F6D.js';\nexport { Action_exports as Actions } from './chunk-MONAXU3N.js';\nexport { ActionType_exports as ActionTypes } from './chunk-5RUWELWF.js';\nexport { Attachment_exports as Attachments } from './chunk-YCOLCQXU.js';\nexport { ObjectType_exports as ObjectTypes } from './chunk-ATSSLGFA.js';\nexport { Ontology_exports as Ontologies } from './chunk-ABHCL2BI.js';\nexport { OntologyObject_exports as OntologyObjects } from './chunk-VBZZKGHE.js';\nexport { Query_exports as Queries } from './chunk-SALCOSHR.js';\nimport './chunk-PZ5AY32C.js';","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all) __defProp(target, name, {\n get: all[name],\n enumerable: true\n });\n};\nexport { __export };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/QueryType.ts\nvar QueryType_exports = {};\n__export(QueryType_exports, {\n getQueryType: () => getQueryType,\n listQueryTypes: () => listQueryTypes\n});\nvar _listQueryTypes = [0, \"/v1/ontologies/{0}/queryTypes\", 2];\nfunction listQueryTypes($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listQueryTypes, ...args);\n}\nvar _getQueryType = [0, \"/v1/ontologies/{0}/queryTypes/{1}\"];\nfunction getQueryType($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getQueryType, ...args);\n}\nexport { QueryType_exports, getQueryType, listQueryTypes };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Action.ts\nvar Action_exports = {};\n__export(Action_exports, {\n applyAction: () => applyAction,\n applyActionAsync: () => applyActionAsync,\n applyActionBatch: () => applyActionBatch,\n getAsyncActionStatus: () => getAsyncActionStatus,\n validateAction: () => validateAction\n});\nvar _applyAction = [1, \"/v1/ontologies/{0}/actions/{1}/apply\", 1];\nfunction applyAction($ctx, ...args) {\n return foundryPlatformFetch($ctx, _applyAction, ...args);\n}\nvar _applyActionBatch = [1, \"/v1/ontologies/{0}/actions/{1}/applyBatch\", 1];\nfunction applyActionBatch($ctx, ...args) {\n return foundryPlatformFetch($ctx, _applyActionBatch, ...args);\n}\nvar _applyActionAsync = [1, \"/v1/ontologies/{0}/actions/{1}/applyAsync\", 3];\nfunction applyActionAsync($ctx, ...args) {\n return foundryPlatformFetch($ctx, _applyActionAsync, ...args);\n}\nvar _getAsyncActionStatus = [0, \"/v1/ontologies/{0}/actions/{1}/applyAsync/{2}\", 2];\nfunction getAsyncActionStatus($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAsyncActionStatus, ...args);\n}\nvar _validateAction = [1, \"/v1/ontologies/{0}/actions/{1}/validate\", 1];\nfunction validateAction($ctx, ...args) {\n return foundryPlatformFetch($ctx, _validateAction, ...args);\n}\nexport { Action_exports, applyAction, applyActionAsync, applyActionBatch, getAsyncActionStatus, validateAction };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/ActionType.ts\nvar ActionType_exports = {};\n__export(ActionType_exports, {\n getActionType: () => getActionType,\n listActionTypes: () => listActionTypes\n});\nvar _listActionTypes = [0, \"/v1/ontologies/{0}/actionTypes\", 2];\nfunction listActionTypes($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listActionTypes, ...args);\n}\nvar _getActionType = [0, \"/v1/ontologies/{0}/actionTypes/{1}\"];\nfunction getActionType($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getActionType, ...args);\n}\nexport { ActionType_exports, getActionType, listActionTypes };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Attachment.ts\nvar Attachment_exports = {};\n__export(Attachment_exports, {\n getAttachment: () => getAttachment,\n getAttachmentContent: () => getAttachmentContent,\n uploadAttachment: () => uploadAttachment\n});\nvar _uploadAttachment = [1, \"/v1/attachments/upload\", 7, \"*/*\"];\nfunction uploadAttachment($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, _uploadAttachment, args[0], args[1], headerParams);\n}\nvar _getAttachmentContent = [0, \"/v1/attachments/{0}/content\",,, \"*/*\"];\nfunction getAttachmentContent($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentContent, ...args);\n}\nvar _getAttachment = [0, \"/v1/attachments/{0}\"];\nfunction getAttachment($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachment, ...args);\n}\nexport { Attachment_exports, getAttachment, getAttachmentContent, uploadAttachment };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/ObjectType.ts\nvar ObjectType_exports = {};\n__export(ObjectType_exports, {\n getObjectType: () => getObjectType,\n getOutgoingLinkType: () => getOutgoingLinkType,\n listObjectTypes: () => listObjectTypes,\n listOutgoingLinkTypes: () => listOutgoingLinkTypes\n});\nvar _listObjectTypes = [0, \"/v1/ontologies/{0}/objectTypes\", 2];\nfunction listObjectTypes($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listObjectTypes, ...args);\n}\nvar _getObjectType = [0, \"/v1/ontologies/{0}/objectTypes/{1}\"];\nfunction getObjectType($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getObjectType, ...args);\n}\nvar _listOutgoingLinkTypes = [0, \"/v1/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes\", 2];\nfunction listOutgoingLinkTypes($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listOutgoingLinkTypes, ...args);\n}\nvar _getOutgoingLinkType = [0, \"/v1/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes/{2}\"];\nfunction getOutgoingLinkType($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);\n}\nexport { ObjectType_exports, getObjectType, getOutgoingLinkType, listObjectTypes, listOutgoingLinkTypes };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Ontology.ts\nvar Ontology_exports = {};\n__export(Ontology_exports, {\n getOntology: () => getOntology,\n listOntologies: () => listOntologies\n});\nvar _listOntologies = [0, \"/v1/ontologies\"];\nfunction listOntologies($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listOntologies, ...args);\n}\nvar _getOntology = [0, \"/v1/ontologies/{0}\"];\nfunction getOntology($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getOntology, ...args);\n}\nexport { Ontology_exports, getOntology, listOntologies };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/OntologyObject.ts\nvar OntologyObject_exports = {};\n__export(OntologyObject_exports, {\n aggregateObjects: () => aggregateObjects,\n getLinkedObject: () => getLinkedObject,\n getObject: () => getObject,\n listLinkedObjects: () => listLinkedObjects,\n listObjects: () => listObjects,\n searchObjects: () => searchObjects\n});\nvar _listObjects = [0, \"/v1/ontologies/{0}/objects/{1}\", 2];\nfunction listObjects($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listObjects, ...args);\n}\nvar _getObject = [0, \"/v1/ontologies/{0}/objects/{1}/{2}\", 2];\nfunction getObject($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getObject, ...args);\n}\nvar _listLinkedObjects = [0, \"/v1/ontologies/{0}/objects/{1}/{2}/links/{3}\", 2];\nfunction listLinkedObjects($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listLinkedObjects, ...args);\n}\nvar _getLinkedObject = [0, \"/v1/ontologies/{0}/objects/{1}/{2}/links/{3}/{4}\", 2];\nfunction getLinkedObject($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getLinkedObject, ...args);\n}\nvar _searchObjects = [1, \"/v1/ontologies/{0}/objects/{1}/search\", 1];\nfunction searchObjects($ctx, ...args) {\n return foundryPlatformFetch($ctx, _searchObjects, ...args);\n}\nvar _aggregateObjects = [1, \"/v1/ontologies/{0}/objects/{1}/aggregate\", 1];\nfunction aggregateObjects($ctx, ...args) {\n return foundryPlatformFetch($ctx, _aggregateObjects, ...args);\n}\nexport { OntologyObject_exports, aggregateObjects, getLinkedObject, getObject, listLinkedObjects, listObjects, searchObjects };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Query.ts\nvar Query_exports = {};\n__export(Query_exports, {\n executeQuery: () => executeQuery\n});\nvar _executeQuery = [1, \"/v1/ontologies/{0}/queries/{1}/execute\", 1];\nfunction executeQuery($ctx, ...args) {\n return foundryPlatformFetch($ctx, _executeQuery, ...args);\n}\nexport { Query_exports, executeQuery };","export { OntologyObjectSet_exports as OntologyObjectSets } from './chunk-CTA4DXZF.js';\nexport { OntologyObjectV2_exports as OntologyObjectsV2 } from './chunk-U76D6BOW.js';\nexport { OntologyV2_exports as OntologiesV2 } from './chunk-35VM6XLH.js';\nexport { Query_exports as Queries } from './chunk-UFJTKRQC.js';\nexport { QueryType_exports as QueryTypes } from './chunk-GWYI4RKT.js';\nexport { TimeSeriesPropertyV2_exports as TimeSeriesPropertiesV2 } from './chunk-KQNF55S5.js';\nexport { Action_exports as Actions } from './chunk-ZKWJVNUQ.js';\nexport { ActionTypeV2_exports as ActionTypesV2 } from './chunk-VCCTOHYG.js';\nexport { Attachment_exports as Attachments } from './chunk-EFVOGNPX.js';\nexport { AttachmentPropertyV2_exports as AttachmentPropertiesV2 } from './chunk-3H3SHEFA.js';\nexport { LinkedObjectV2_exports as LinkedObjectsV2 } from './chunk-4TOWICL3.js';\nexport { ObjectTypeV2_exports as ObjectTypesV2 } from './chunk-ZNHKEV4X.js';\nexport { OntologyInterface_exports as OntologyInterfaces } from './chunk-OBKC7XBM.js';\nimport './chunk-PZ5AY32C.js';","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all) __defProp(target, name, {\n get: all[name],\n enumerable: true\n });\n};\nexport { __export };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/OntologyObjectSet.ts\nvar OntologyObjectSet_exports = {};\n__export(OntologyObjectSet_exports, {\n aggregateObjectSetV2: () => aggregateObjectSetV2,\n createTemporaryObjectSetV2: () => createTemporaryObjectSetV2,\n getObjectSetV2: () => getObjectSetV2,\n loadObjectSetV2: () => loadObjectSetV2\n});\nvar _createTemporaryObjectSetV2 = [1, \"/v2/ontologies/{0}/objectSets/createTemporary\", 1];\nfunction createTemporaryObjectSetV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _createTemporaryObjectSetV2, ...args);\n}\nvar _getObjectSetV2 = [0, \"/v2/ontologies/{0}/objectSets/{1}\"];\nfunction getObjectSetV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getObjectSetV2, ...args);\n}\nvar _loadObjectSetV2 = [1, \"/v2/ontologies/{0}/objectSets/loadObjects\", 3];\nfunction loadObjectSetV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _loadObjectSetV2, ...args);\n}\nvar _aggregateObjectSetV2 = [1, \"/v2/ontologies/{0}/objectSets/aggregate\", 3];\nfunction aggregateObjectSetV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _aggregateObjectSetV2, ...args);\n}\nexport { OntologyObjectSet_exports, aggregateObjectSetV2, createTemporaryObjectSetV2, getObjectSetV2, loadObjectSetV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/OntologyObjectV2.ts\nvar OntologyObjectV2_exports = {};\n__export(OntologyObjectV2_exports, {\n aggregateObjectsV2: () => aggregateObjectsV2,\n countObjects: () => countObjects,\n getObjectV2: () => getObjectV2,\n listObjectsV2: () => listObjectsV2,\n searchObjectsV2: () => searchObjectsV2\n});\nvar _listObjectsV2 = [0, \"/v2/ontologies/{0}/objects/{1}\", 2];\nfunction listObjectsV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listObjectsV2, ...args);\n}\nvar _getObjectV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}\", 2];\nfunction getObjectV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getObjectV2, ...args);\n}\nvar _countObjects = [1, \"/v2/ontologies/{0}/objects/{1}/count\", 2];\nfunction countObjects($ctx, ...args) {\n return foundryPlatformFetch($ctx, _countObjects, ...args);\n}\nvar _searchObjectsV2 = [1, \"/v2/ontologies/{0}/objects/{1}/search\", 3];\nfunction searchObjectsV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _searchObjectsV2, ...args);\n}\nvar _aggregateObjectsV2 = [1, \"/v2/ontologies/{0}/objects/{1}/aggregate\", 3];\nfunction aggregateObjectsV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _aggregateObjectsV2, ...args);\n}\nexport { OntologyObjectV2_exports, aggregateObjectsV2, countObjects, getObjectV2, listObjectsV2, searchObjectsV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/OntologyV2.ts\nvar OntologyV2_exports = {};\n__export(OntologyV2_exports, {\n getOntologyFullMetadata: () => getOntologyFullMetadata,\n getOntologyV2: () => getOntologyV2,\n listOntologiesV2: () => listOntologiesV2\n});\nvar _listOntologiesV2 = [0, \"/v2/ontologies\"];\nfunction listOntologiesV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listOntologiesV2, ...args);\n}\nvar _getOntologyV2 = [0, \"/v2/ontologies/{0}\"];\nfunction getOntologyV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getOntologyV2, ...args);\n}\nvar _getOntologyFullMetadata = [0, \"/v2/ontologies/{0}/fullMetadata\"];\nfunction getOntologyFullMetadata($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getOntologyFullMetadata, ...args);\n}\nexport { OntologyV2_exports, getOntologyFullMetadata, getOntologyV2, listOntologiesV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Query.ts\nvar Query_exports = {};\n__export(Query_exports, {\n executeQueryV2: () => executeQueryV2\n});\nvar _executeQueryV2 = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 3];\nfunction executeQueryV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _executeQueryV2, ...args);\n}\nexport { Query_exports, executeQueryV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/QueryType.ts\nvar QueryType_exports = {};\n__export(QueryType_exports, {\n getQueryTypeV2: () => getQueryTypeV2,\n listQueryTypesV2: () => listQueryTypesV2\n});\nvar _listQueryTypesV2 = [0, \"/v2/ontologies/{0}/queryTypes\", 2];\nfunction listQueryTypesV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listQueryTypesV2, ...args);\n}\nvar _getQueryTypeV2 = [0, \"/v2/ontologies/{0}/queryTypes/{1}\"];\nfunction getQueryTypeV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getQueryTypeV2, ...args);\n}\nexport { QueryType_exports, getQueryTypeV2, listQueryTypesV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/TimeSeriesPropertyV2.ts\nvar TimeSeriesPropertyV2_exports = {};\n__export(TimeSeriesPropertyV2_exports, {\n getFirstPoint: () => getFirstPoint,\n getLastPoint: () => getLastPoint,\n streamPoints: () => streamPoints\n});\nvar _getFirstPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint\", 2];\nfunction getFirstPoint($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getFirstPoint, ...args);\n}\nvar _getLastPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/lastPoint\", 2];\nfunction getLastPoint($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getLastPoint, ...args);\n}\nvar _streamPoints = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamPoints\", 3,, \"*/*\"];\nfunction streamPoints($ctx, ...args) {\n return foundryPlatformFetch($ctx, _streamPoints, ...args);\n}\nexport { TimeSeriesPropertyV2_exports, getFirstPoint, getLastPoint, streamPoints };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Action.ts\nvar Action_exports = {};\n__export(Action_exports, {\n applyActionAsyncV2: () => applyActionAsyncV2,\n applyActionBatchV2: () => applyActionBatchV2,\n applyActionV2: () => applyActionV2\n});\nvar _applyActionV2 = [1, \"/v2/ontologies/{0}/actions/{1}/apply\", 3];\nfunction applyActionV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _applyActionV2, ...args);\n}\nvar _applyActionBatchV2 = [1, \"/v2/ontologies/{0}/actions/{1}/applyBatch\", 3];\nfunction applyActionBatchV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _applyActionBatchV2, ...args);\n}\nvar _applyActionAsyncV2 = [1, \"/v2/ontologies/{0}/actions/{1}/applyAsync\", 3];\nfunction applyActionAsyncV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _applyActionAsyncV2, ...args);\n}\nexport { Action_exports, applyActionAsyncV2, applyActionBatchV2, applyActionV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/ActionTypeV2.ts\nvar ActionTypeV2_exports = {};\n__export(ActionTypeV2_exports, {\n getActionTypeV2: () => getActionTypeV2,\n listActionTypesV2: () => listActionTypesV2\n});\nvar _listActionTypesV2 = [0, \"/v2/ontologies/{0}/actionTypes\", 2];\nfunction listActionTypesV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listActionTypesV2, ...args);\n}\nvar _getActionTypeV2 = [0, \"/v2/ontologies/{0}/actionTypes/{1}\"];\nfunction getActionTypeV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getActionTypeV2, ...args);\n}\nexport { ActionTypeV2_exports, getActionTypeV2, listActionTypesV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/Attachment.ts\nvar Attachment_exports = {};\n__export(Attachment_exports, {\n getAttachmentContentV2: () => getAttachmentContentV2,\n getAttachmentV2: () => getAttachmentV2,\n uploadAttachmentV2: () => uploadAttachmentV2\n});\nvar _uploadAttachmentV2 = [1, \"/v2/ontologies/attachments/upload\", 7, \"*/*\"];\nfunction uploadAttachmentV2($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, _uploadAttachmentV2, args[0], args[1], headerParams);\n}\nvar _getAttachmentContentV2 = [0, \"/v2/ontologies/attachments/{0}/content\",,, \"*/*\"];\nfunction getAttachmentContentV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentContentV2, ...args);\n}\nvar _getAttachmentV2 = [0, \"/v2/ontologies/attachments/{0}\"];\nfunction getAttachmentV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentV2, ...args);\n}\nexport { Attachment_exports, getAttachmentContentV2, getAttachmentV2, uploadAttachmentV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/AttachmentPropertyV2.ts\nvar AttachmentPropertyV2_exports = {};\n__export(AttachmentPropertyV2_exports, {\n getAttachmentPropertyByRidV2: () => getAttachmentPropertyByRidV2,\n getAttachmentPropertyContentByRidV2: () => getAttachmentPropertyContentByRidV2,\n getAttachmentPropertyContentV2: () => getAttachmentPropertyContentV2,\n listPropertyAttachments: () => listPropertyAttachments\n});\nvar _listPropertyAttachments = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}\", 2];\nfunction listPropertyAttachments($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listPropertyAttachments, ...args);\n}\nvar _getAttachmentPropertyByRidV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}\", 2];\nfunction getAttachmentPropertyByRidV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentPropertyByRidV2, ...args);\n}\nvar _getAttachmentPropertyContentV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/content\", 2,, \"*/*\"];\nfunction getAttachmentPropertyContentV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentPropertyContentV2, ...args);\n}\nvar _getAttachmentPropertyContentByRidV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}/content\", 2,, \"*/*\"];\nfunction getAttachmentPropertyContentByRidV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentPropertyContentByRidV2, ...args);\n}\nexport { AttachmentPropertyV2_exports, getAttachmentPropertyByRidV2, getAttachmentPropertyContentByRidV2, getAttachmentPropertyContentV2, listPropertyAttachments };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/LinkedObjectV2.ts\nvar LinkedObjectV2_exports = {};\n__export(LinkedObjectV2_exports, {\n getLinkedObjectV2: () => getLinkedObjectV2,\n listLinkedObjectsV2: () => listLinkedObjectsV2\n});\nvar _listLinkedObjectsV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/links/{3}\", 2];\nfunction listLinkedObjectsV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listLinkedObjectsV2, ...args);\n}\nvar _getLinkedObjectV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/links/{3}/{4}\", 2];\nfunction getLinkedObjectV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getLinkedObjectV2, ...args);\n}\nexport { LinkedObjectV2_exports, getLinkedObjectV2, listLinkedObjectsV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/ObjectTypeV2.ts\nvar ObjectTypeV2_exports = {};\n__export(ObjectTypeV2_exports, {\n getObjectTypeFullMetadata: () => getObjectTypeFullMetadata,\n getObjectTypeV2: () => getObjectTypeV2,\n getOutgoingLinkTypeV2: () => getOutgoingLinkTypeV2,\n listObjectTypesV2: () => listObjectTypesV2,\n listOutgoingLinkTypesV2: () => listOutgoingLinkTypesV2\n});\nvar _listObjectTypesV2 = [0, \"/v2/ontologies/{0}/objectTypes\", 2];\nfunction listObjectTypesV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listObjectTypesV2, ...args);\n}\nvar _getObjectTypeV2 = [0, \"/v2/ontologies/{0}/objectTypes/{1}\"];\nfunction getObjectTypeV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getObjectTypeV2, ...args);\n}\nvar _getObjectTypeFullMetadata = [0, \"/v2/ontologies/{0}/objectTypes/{1}/fullMetadata\", 2];\nfunction getObjectTypeFullMetadata($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getObjectTypeFullMetadata, ...args);\n}\nvar _listOutgoingLinkTypesV2 = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes\", 2];\nfunction listOutgoingLinkTypesV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listOutgoingLinkTypesV2, ...args);\n}\nvar _getOutgoingLinkTypeV2 = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes/{2}\"];\nfunction getOutgoingLinkTypeV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getOutgoingLinkTypeV2, ...args);\n}\nexport { ObjectTypeV2_exports, getObjectTypeFullMetadata, getObjectTypeV2, getOutgoingLinkTypeV2, listObjectTypesV2, listOutgoingLinkTypesV2 };","import { __export } from './chunk-PZ5AY32C.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/OntologyInterface.ts\nvar OntologyInterface_exports = {};\n__export(OntologyInterface_exports, {\n aggregateObjectsForInterface: () => aggregateObjectsForInterface,\n getInterfaceType: () => getInterfaceType,\n listInterfaceTypes: () => listInterfaceTypes,\n searchObjectsForInterface: () => searchObjectsForInterface\n});\nvar _listInterfaceTypes = [0, \"/v2/ontologies/{0}/interfaceTypes\", 2];\nfunction listInterfaceTypes($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listInterfaceTypes, ...args);\n}\nvar _getInterfaceType = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}\", 2];\nfunction getInterfaceType($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getInterfaceType, ...args);\n}\nvar _searchObjectsForInterface = [1, \"/v2/ontologies/{0}/interfaces/{1}/search\", 3];\nfunction searchObjectsForInterface($ctx, ...args) {\n return foundryPlatformFetch($ctx, _searchObjectsForInterface, ...args);\n}\nvar _aggregateObjectsForInterface = [1, \"/v2/ontologies/{0}/interfaces/{1}/aggregate\", 3];\nfunction aggregateObjectsForInterface($ctx, ...args) {\n return foundryPlatformFetch($ctx, _aggregateObjectsForInterface, ...args);\n}\nexport { OntologyInterface_exports, aggregateObjectsForInterface, getInterfaceType, listInterfaceTypes, searchObjectsForInterface };","/*\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 { Ontologies } from \"@osdk/internal.foundry\";\n/**\n * Helper function to create an attachment type from a rid\n * @param client - minimal client\n * @param rid - rid of attachment in Foundry\n * @returns\n */\nexport function createAttachmentFromRid(client, rid) {\n return {\n rid,\n async fetchContents() {\n return Ontologies.Attachments.getAttachmentContent(client, rid);\n },\n async fetchMetadata() {\n const r = await Ontologies.Attachments.getAttachment(client, rid);\n return {\n ...r,\n sizeBytes: Number(r.sizeBytes)\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\nexport function isAttachmentUpload(o) {\n return o instanceof Blob && \"name\" in o;\n}\nexport function createAttachmentUpload(data, name) {\n const attachmentUpload = Object.create(data, {\n name: {\n value: name\n }\n });\n return attachmentUpload;\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 { createFetchHeaderMutator } from \"@osdk/shared.net.fetch\";\nexport const addUserAgentAndRequestContextHeaders = (client, withMetadata) => ({\n ...client,\n fetch: createFetchHeaderMutator(client.fetch, headers => {\n headers.set(\"X-OSDK-Request-Context\", JSON.stringify(client.requestContext));\n if (withMetadata.osdkMetadata) {\n headers.set(\"Fetch-User-Agent\", withMetadata.osdkMetadata.extraUserAgent);\n }\n return headers;\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\nconst START_TOKEN = new Uint8Array([123, 34, 100, 97, 116, 97, 34, 58, 91]); // `{\"data\":[`\nconst OBJECT_OPEN_CHAR_CODE = 123; // '{'\nconst OBJECT_CLOSE_CHAR_CODE = 125; // '}'\n\nexport async function* parseStreamedResponse(asyncIterable) {\n const utf8decoder = new TextDecoder(\"utf-8\");\n let parsedStart = false;\n let prevChunks = [];\n let openBracesCount = 0;\n for await (let chunk of asyncIterable) {\n // on the first chunk, skip the expected START_TOKEN if we see it\n let i = 0;\n if (!parsedStart) {\n parsedStart = true;\n if (startsWith(chunk, START_TOKEN)) {\n i = START_TOKEN.length;\n }\n }\n for (; i < chunk.length; i++) {\n // if we aren't currently parsing an object, skip until we find the next object start\n while (openBracesCount === 0 && chunk[i] !== OBJECT_OPEN_CHAR_CODE && i < chunk.length) {\n i++;\n }\n\n // iterate through the chunk looking for the end of the current top level object\n let j = i;\n for (; j < chunk.length; j++) {\n const c = chunk[j];\n if (c === OBJECT_OPEN_CHAR_CODE) {\n openBracesCount++;\n } else if (c === OBJECT_CLOSE_CHAR_CODE) {\n openBracesCount--;\n\n // found a complete top level object, emit it\n if (0 === openBracesCount) {\n yield combineAndParse(utf8decoder, prevChunks, chunk.subarray(i, j + 1));\n\n // if there was a prevChunk, we've consumed it now\n prevChunks = [];\n\n // advance the start index to the final '}' of the current object,\n // which lets us start seeking the beginning of the next object\n i = j;\n break;\n }\n }\n }\n\n // if we reached the end of our chunk before finding the end of the object\n // store off the relevant remainder of our current chunk and go grab the next one\n if (j === chunk.length) {\n prevChunks.push(chunk.subarray(i));\n break;\n }\n }\n }\n}\nfunction startsWith(a, b) {\n if (a.length < b.length) {\n return false;\n }\n for (let i = 0; i < b.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\nfunction combineAndParse(utf8decoder, prev, curr) {\n let str = \"\";\n for (const chunk of prev) {\n str += utf8decoder.decode(chunk, {\n stream: true\n });\n }\n str += utf8decoder.decode(curr);\n return JSON.parse(str);\n}\nexport async function* iterateReadableStream(readableStream) {\n let res = await readableStream.read();\n while (!res.done) {\n yield res.value;\n res = await readableStream.read();\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeseriesDurationMapping, TimeSeriesProperty } from \"@osdk/client.api\";\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nimport { iterateReadableStream, parseStreamedResponse } from \"./util/streamutils.js\";\nexport function createTimeseriesProperty(client, objectApiName, primaryKey, propertyName) {\n const getFirstPoint = async () => {\n return OntologiesV2.TimeSeriesPropertiesV2.getFirstPoint(client, await client.ontologyRid, objectApiName, primaryKey, propertyName);\n };\n const getLastPoint = async () => {\n return OntologiesV2.TimeSeriesPropertiesV2.getLastPoint(client, await client.ontologyRid, objectApiName, primaryKey, propertyName);\n };\n const getAllPoints = async query => {\n return getAllTimeSeriesPoints(client, objectApiName, primaryKey, propertyName, query);\n };\n const asyncIterPoints = query => {\n return iterateTimeSeriesPoints(client, objectApiName, primaryKey, propertyName, query);\n };\n return new TimeSeriesProperty(getFirstPoint, getLastPoint, getAllPoints, asyncIterPoints);\n}\nasync function getAllTimeSeriesPoints(client, objectApiName, primaryKey, propertyName, body) {\n const allPoints = [];\n for await (const point of iterateTimeSeriesPoints(client, objectApiName, primaryKey, propertyName, body)) {\n allPoints.push({\n time: point.time,\n value: point.value\n });\n }\n return allPoints;\n}\nasync function* iterateTimeSeriesPoints(client, objectApiName, primaryKey, propertyName, body) {\n const utf8decoder = new TextDecoder(\"utf-8\");\n const streamPointsIterator = await OntologiesV2.TimeSeriesPropertiesV2.streamPoints(client, await client.ontologyRid, objectApiName, primaryKey, propertyName, body ? {\n range: getTimeRange(body)\n } : {});\n const reader = streamPointsIterator.stream().getReader();\n for await (const point of parseStreamedResponse(iterateReadableStream(reader))) {\n yield {\n time: point.time,\n value: point.value\n };\n }\n}\nfunction getTimeRange(body) {\n if (\"$startTime\" in body || \"$endTime\" in body) {\n return {\n type: \"absolute\",\n startTime: body.$startTime,\n endTime: body.$endTime\n };\n }\n return body.$before ? {\n type: \"relative\",\n startTime: {\n when: \"BEFORE\",\n value: body.$before,\n unit: TimeseriesDurationMapping[body.$unit]\n }\n } : {\n type: \"relative\",\n endTime: {\n when: \"AFTER\",\n value: body.$after,\n unit: TimeseriesDurationMapping[body.$unit]\n }\n };\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A simple cache that can be used to store values for a given client.\n */\n\n/**\n * @internal\n * A simple async cache that can be used to store values for a given client.\n */\n\n/** @internal */\n\n/**\n * @internal\n * Create a new cache without a factory function.\n */\n\n/**\n * @internal\n * Create a new cache with a factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n */\n\nexport function createClientCache(fn) {\n const cache = new WeakMap();\n function get(client, key) {\n if (cache.get(client.clientCacheKey) == null) {\n cache.set(client.clientCacheKey, new Map());\n }\n let r = cache.get(client.clientCacheKey).get(key);\n if (r === undefined && fn !== undefined) {\n return set(client, key, fn(client, key));\n } else {\n return r;\n }\n }\n function set(client, key, value) {\n if (cache.get(client.clientCacheKey) == null) {\n cache.set(client.clientCacheKey, new Map());\n }\n cache.get(client.clientCacheKey).set(key, value);\n return value;\n }\n function remove(client, key) {\n if (cache.get(client.clientCacheKey) == null) return false;\n return cache.get(client.clientCacheKey).delete(key);\n }\n return {\n get,\n set,\n remove\n };\n}\n\n/** @internal */\n\n/**\n * @internal\n * Create a new cache with an async factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n * @returns\n */\nexport function createAsyncClientCache(fn, createCacheLocal = createClientCache) {\n const cache = createCacheLocal();\n const inProgress = createCacheLocal();\n const ret = {\n getOrUndefined: function getOrUndefined(client, key) {\n return cache.get(client, key);\n },\n get: async function get(client, key) {\n return cache.get(client, key) ?? inProgress.get(client, key) ?? ret.set(client, key, fn(client, key));\n },\n set: async function set(client, k, v) {\n // the `.set` happens first to prevent races.\n try {\n const r = await inProgress.set(client, k, v); // returns v\n\n cache.set(client, k, r);\n inProgress.remove(client, k);\n return r;\n } catch (e) {\n // we don't want to cache failures\n inProgress.remove(client, k);\n throw e;\n }\n }\n };\n return ret;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const InterfaceDefinitions = Symbol(process.env.MODE !== \"production\" ? \"InterfaceDefinitions\" : undefined);","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A simple cache that can be used to store values for a given client.\n */\n\n/**\n * Create a new cache with a factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n */\n\n/**\n * Create a new cache without a factory function.\n */\n\nexport function createSimpleCache(map = new Map(), fn) {\n function get(key) {\n let r = map.get(key);\n if (r === undefined && fn !== undefined) {\n return set(key, fn(key));\n } else {\n return r;\n }\n }\n function set(key, value) {\n map.set(key, value);\n return value;\n }\n function remove(key) {\n return map.delete(key);\n }\n return {\n get,\n set,\n remove\n };\n}\n/**\n * A simple async cache that can be used to store values for a given client.\n */\n\n/**\n * Create a new cache with an async factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n * @returns\n */\n\nexport function createSimpleAsyncCache(type, fn, createCacheLocal = createSimpleCache) {\n const cache = createCacheLocal(type === \"weak\" ? new WeakMap() : new Map());\n const inProgress = createCacheLocal(type === \"weak\" ? new WeakMap() : new Map());\n const ret = {\n getOrUndefined: function getOrUndefined(key) {\n return cache.get(key);\n },\n get: async function get(key) {\n return cache.get(key) ?? inProgress.get(key) ?? ret.set(key, fn(key));\n },\n set: async function set(k, v) {\n // the `.set` happens first to prevent races.\n try {\n const r = await inProgress.set(k, v); // returns v\n\n cache.set(k, r);\n inProgress.remove(k);\n return r;\n } catch (e) {\n // we don't want to cache failures\n inProgress.remove(k);\n throw e;\n }\n }\n };\n return ret;\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 UnderlyingOsdkObject = Symbol(process.env.MODE !== \"production\" ? \"Underlying Object\" : undefined);\nexport const ObjectDefRef = Symbol(process.env.MODE !== \"production\" ? \"ObjectDefinition\" : undefined);\nexport const InterfaceDefRef = Symbol(process.env.MODE !== \"production\" ? \"InterfaceDefinition\" : undefined);\n\n/** A symbol for getting the raw data object off of the holder an osdk object proxy points to */\nexport const RawObject = Symbol(process.env.MODE !== \"production\" ? \"RawObject\" : undefined);\nexport const ClientRef = Symbol(process.env.MODE !== \"production\" ? \"ClientRef\" : undefined);","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createSimpleCache } from \"../SimpleCache.js\";\nimport { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nconst handlerCache = createSimpleCache(new WeakMap(), createInterfaceProxyHandler);\n\n/** @internal */\nexport function createOsdkInterface(underlying, interfaceDef) {\n const interfaceHolder = {\n [UnderlyingOsdkObject]: underlying,\n [InterfaceDefRef]: interfaceDef\n };\n const handler = handlerCache.get(interfaceDef);\n const proxy = new Proxy(interfaceHolder,\n // the wrapper doesn't contain everything obviously. we proxy\n handler);\n return proxy;\n}\nfunction createInterfaceProxyHandler(newDef) {\n return {\n getOwnPropertyDescriptor(target, p) {\n const underlying = target[UnderlyingOsdkObject];\n const objDef = underlying[ObjectDefRef];\n switch (p) {\n case \"$primaryKey\":\n case \"$title\":\n case \"$objectType\":\n case \"$rid\":\n return underlying[p] != null ? Reflect.getOwnPropertyDescriptor(underlying, p) : undefined;\n case \"$apiName\":\n return {\n enumerable: true,\n configurable: true,\n value: target[InterfaceDefRef].apiName\n };\n }\n if (newDef.properties[p] != null) {\n return {\n enumerable: true,\n configurable: true,\n value: underlying[objDef.interfaceMap[newDef.apiName][p]]\n };\n }\n },\n ownKeys(target) {\n const underlying = target[UnderlyingOsdkObject];\n return [\"$apiName\", \"$objectType\", \"$primaryKey\", ...(underlying[\"$rid\"] ? [\"$rid\"] : []), \"$title\", ...Object.keys(newDef.properties)];\n },\n get(target, p) {\n const underlying = target[UnderlyingOsdkObject];\n switch (p) {\n case InterfaceDefRef:\n return newDef;\n case \"$apiName\":\n return newDef.apiName;\n case \"$as\":\n case UnderlyingOsdkObject:\n case \"$primaryKey\":\n case \"$title\":\n case \"$objectType\":\n case \"$rid\":\n return underlying[p];\n }\n if (newDef.properties[p] != null) {\n const objDef = target[UnderlyingOsdkObject][ObjectDefRef];\n return underlying[objDef.interfaceMap[newDef.apiName][p]];\n }\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 { InterfaceDefinitions } from \"../../ontology/OntologyProvider.js\";\nimport { createSimpleCache } from \"../SimpleCache.js\";\nimport { createOsdkInterface } from \"./createOsdkInterface.js\";\nimport { UnderlyingOsdkObject } from \"./InternalSymbols.js\";\n\n/** @internal */\n\nexport const get$as = createSimpleCache(new WeakMap(), $asFactory).get;\nconst osdkObjectToInterfaceView = createSimpleCache(new WeakMap(), () => new Map());\nfunction $asFactory(objDef) {\n // We use the exact same logic for both the interface rep and the underlying rep\n return function $as(newDef) {\n if (typeof newDef === \"string\") {\n if (newDef === objDef.apiName) {\n return this[UnderlyingOsdkObject];\n }\n\n // this is sufficient to determine if we implement the interface\n if (objDef.interfaceMap?.[newDef] == null) {\n throw new Error(`Object does not implement interface '${newDef}'.`);\n }\n const def = objDef[InterfaceDefinitions][newDef];\n if (!def) {\n throw new Error(`Object does not implement interface '${newDef}'.`);\n }\n newDef = def.def;\n } else if (newDef.apiName === objDef.apiName) {\n return this[UnderlyingOsdkObject];\n }\n if (newDef.type === \"object\") {\n throw new Error(`'${newDef.apiName}' is not an interface nor is it '${objDef.apiName}', which is the object type.`);\n }\n const underlying = this[UnderlyingOsdkObject];\n const existing = osdkObjectToInterfaceView.get(underlying).get(newDef.apiName);\n if (existing) return existing;\n const osdkInterface = createOsdkInterface(underlying, newDef);\n osdkObjectToInterfaceView.get(underlying).set(newDef.apiName, osdkInterface);\n return osdkInterface;\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 { DistanceUnitMapping } from \"@osdk/client.api\";\nimport invariant from \"tiny-invariant\";\n\n/** @internal */\nexport function modernToLegacyWhereClause(whereClause) {\n if (\"$and\" in whereClause) {\n return {\n type: \"and\",\n value: whereClause.$and.map(modernToLegacyWhereClause)\n };\n } else if (\"$or\" in whereClause) {\n return {\n type: \"or\",\n value: whereClause.$or.map(modernToLegacyWhereClause)\n };\n } else if (\"$not\" in whereClause) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(whereClause.$not)\n };\n }\n const parts = Object.entries(whereClause);\n if (parts.length === 1) {\n return handleWherePair(parts[0]);\n }\n return {\n type: \"and\",\n value: parts.map(handleWherePair)\n };\n}\nfunction makeGeoFilterBbox(field, bbox, filterType) {\n return {\n type: filterType === \"$within\" ? \"withinBoundingBox\" : \"intersectsBoundingBox\",\n field,\n value: {\n topLeft: {\n type: \"Point\",\n coordinates: [bbox[0], bbox[3]]\n },\n bottomRight: {\n type: \"Point\",\n coordinates: [bbox[2], bbox[1]]\n }\n }\n };\n}\nfunction makeGeoFilterPolygon(field, coordinates, filterType) {\n return {\n type: filterType,\n field,\n value: {\n type: \"Polygon\",\n coordinates\n }\n };\n}\nfunction handleWherePair([field, filter]) {\n !(filter != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Defined key values are only allowed when they are not undefined.\") : invariant(false) : void 0;\n if (typeof filter === \"string\" || typeof filter === \"number\" || typeof filter === \"boolean\") {\n return {\n type: \"eq\",\n field,\n value: filter\n };\n }\n const keysOfFilter = Object.keys(filter);\n\n // If any of the keys start with `$` then they must be the only one.\n // e.g. `where({ name: { $eq: \"foo\", $ne: \"bar\" } })` is invalid currently\n const hasDollarSign = keysOfFilter.some(key => key.startsWith(\"$\"));\n !(!hasDollarSign || keysOfFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"WhereClause Filter with multiple clauses isn't allowed\") : invariant(false) : void 0;\n if (!hasDollarSign) {\n // Future case for structs\n throw new Error(`Unsupported filter. Did you forget to use a $-prefixed filter? (${JSON.stringify(filter)})`);\n }\n const firstKey = keysOfFilter[0];\n !(filter[firstKey] != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n if (firstKey === \"$ne\") {\n return {\n type: \"not\",\n value: {\n type: \"eq\",\n field,\n value: filter[firstKey]\n }\n };\n }\n if (firstKey === \"$within\") {\n const withinBody = filter[firstKey];\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(field, withinBody, firstKey);\n } else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(field, withinBody.$bbox, firstKey);\n } else if (\"$distance\" in withinBody && \"$of\" in withinBody && withinBody.$distance != null && withinBody.$of != null) {\n return {\n type: \"withinDistanceOf\",\n field,\n value: {\n center: Array.isArray(withinBody.$of) ? {\n type: \"Point\",\n coordinates: withinBody.$of\n } : withinBody.$of,\n distance: {\n value: withinBody.$distance[0],\n unit: DistanceUnitMapping[withinBody.$distance[1]]\n }\n }\n };\n } else {\n const coordinates = \"$polygon\" in withinBody ? withinBody.$polygon : withinBody.coordinates;\n return makeGeoFilterPolygon(field, coordinates, \"withinPolygon\");\n }\n }\n if (firstKey === \"$intersects\") {\n const intersectsBody = filter[firstKey];\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(field, intersectsBody, firstKey);\n } else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(field, intersectsBody.$bbox, firstKey);\n } else {\n const coordinates = \"$polygon\" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;\n return makeGeoFilterPolygon(field, coordinates, \"intersectsPolygon\");\n }\n }\n return {\n type: firstKey.substring(1),\n field,\n value: filter[firstKey]\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\n/** @internal */\nexport function legacyToModernSingleAggregationResult(entry) {\n return entry.metrics.reduce((accumulator, curValue) => {\n const parts = curValue.name.split(\".\");\n if (parts[0] === \"count\") {\n return accumulator;\n }\n !(parts.length === 2) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"assumed we were getting a `${key}.${type}`\") : invariant(false) : void 0;\n const property = parts[0];\n const metricType = parts[1];\n if (!(property in accumulator)) {\n accumulator[property] = {}; // fixme?\n }\n accumulator[property][metricType] = curValue.value; // fixme?\n\n return accumulator;\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\nconst directionFieldMap = dir => dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n\n/** @internal */\nexport function modernToLegacyAggregationClause(select) {\n return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType)\n };\n }\n const colonPos = propAndMetric.lastIndexOf(\":\");\n const property = propAndMetric.slice(0, colonPos);\n const metric = propAndMetric.slice(colonPos + 1);\n return [{\n type: metric,\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property\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 { DurationMapping } from \"@osdk/client.api\";\n/** @internal */\nexport function modernToLegacyGroupByClause(groupByClause) {\n if (!groupByClause) return [];\n return Object.entries(groupByClause).flatMap(([field, type]) => {\n if (type === \"exact\") {\n return [{\n type,\n field\n }];\n } else if (\"$exactWithLimit\" in type) {\n {\n return [{\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit\n }];\n }\n } else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth\n }];\n } else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range))\n }];\n } else if (\"$duration\" in type) {\n return [{\n type: \"duration\",\n field,\n value: type.$duration[0],\n unit: DurationMapping[type.$duration[1]]\n }];\n } else return [];\n });\n}\nfunction convertRange(range) {\n return {\n startValue: range[0],\n endValue: range[1]\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 \"@osdk/internal.foundry\";\nimport invariant from \"tiny-invariant\";\nimport { legacyToModernSingleAggregationResult } from \"../internal/conversions/legacyToModernSingleAggregationResult.js\";\nimport { modernToLegacyAggregationClause } from \"../internal/conversions/modernToLegacyAggregationClause.js\";\nimport { modernToLegacyGroupByClause } from \"../internal/conversions/modernToLegacyGroupByClause.js\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\n/** @internal */\nexport async function aggregate(clientCtx, objectType, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n}, req) {\n const body = {\n aggregation: modernToLegacyAggregationClause(req.$select),\n groupBy: [],\n where: undefined\n };\n if (req.$groupBy) {\n body.groupBy = modernToLegacyGroupByClause(req.$groupBy);\n }\n if (req.$where) {\n body.where = modernToLegacyWhereClause(req.$where);\n }\n const result = await OntologiesV2.OntologyObjectSets.aggregateObjectSetV2(addUserAgentAndRequestContextHeaders(clientCtx, objectType), await clientCtx.ontologyRid, {\n objectSet,\n groupBy: body.groupBy,\n aggregation: body.aggregation\n });\n if (!req.$groupBy) {\n !(result.data.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"no group by clause should mean only one data result\") : invariant(false) : void 0;\n return {\n ...aggregationToCountResult(result.data[0]),\n ...legacyToModernSingleAggregationResult(result.data[0])\n };\n }\n const ret = result.data.map(entry => {\n return {\n $group: entry.group,\n ...aggregationToCountResult(entry),\n ...legacyToModernSingleAggregationResult(entry)\n };\n }); // fixme\n\n return ret; // FIXME\n}\nfunction aggregationToCountResult(entry) {\n for (const aggregateResult of entry.metrics) {\n if (aggregateResult.name === \"count\") {\n return {\n $count: aggregateResult.value\n };\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 { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { fetchPage } from \"./fetchPage.js\";\n\n/** @internal */\nexport async function fetchSingle(client, objectType, args, objectSet) {\n const result = await fetchPage(client, objectType, {\n ...args,\n pageSize: 1\n }, objectSet);\n if (result.data.length !== 1 || result.nextPageToken != null) {\n throw new PalantirApiError(`Expected a single result but got ${result.data.length} instead${result.nextPageToken != null ? \" with nextPageToken set\" : \"\"}`);\n }\n return result.data[0];\n}\n\n/** @internal */\nexport async function fetchSingleWithErrors(client, objectType, args, objectSet) {\n try {\n const result = await fetchSingle(client, objectType, args, objectSet);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: 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\n/**\nReturns a client with its `requestContext` merged with the result of applying\n`augment` to its `requestContext`.\n\nThe second argument is an `Partial<RequestContext>`-returning `augment` function\ninstead of a `RequestContext` object to make referencing the current request\ncontext easier. For example, modifying the `fetchPage` function to add its name\nto the object set's called method chain could look like:\n```\naugmentRequestContext(\n clientContext,\n ctx => ({ methodChain: [...ctx.methodChain, \"fetchPage\"] })\n)\n```\nor\n```\naugmentRequestContext(\n clientContext,\n ({ methodChain }) => ({ methodChain: [...methodChain, \"fetchPage\"] })\n)\n```\ninstead of\n```\naugmentRequestContext(\n clientContext,\n { methodChain: [...clientContext.requestContext.methodChain, \"fetchPage\"] }\n)\n```\n*/\nexport const augmentRequestContext = (client, augment) => ({\n ...client,\n requestContext: {\n ...client.requestContext,\n ...augment(client.requestContext)\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\nconst WIRE_OBJECT_SET_TYPES = new Set([\"base\", \"filter\", \"intersect\", \"reference\", \"searchAround\", \"static\", \"subtract\", \"union\"]);\n\n/** @internal */\nexport function isWireObjectSet(o) {\n return o != null && typeof o === \"object\" && WIRE_OBJECT_SET_TYPES.has(o.type);\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 { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { aggregate } from \"../object/aggregate.js\";\nimport { fetchPageInternal, fetchPageWithErrorsInternal } from \"../object/fetchPage.js\";\nimport { fetchSingle, fetchSingleWithErrors } from \"../object/fetchSingle.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { isWireObjectSet } from \"../util/WireObjectSet.js\";\nfunction isObjectTypeDefinition(def) {\n return def.type === \"object\";\n}\n\n/* @internal */\nexport function isObjectSet(o) {\n return o != null && typeof o === \"object\" && isWireObjectSet(objectSetDefinitions.get(o));\n}\n\n/** @internal */\nexport function getWireObjectSet(objectSet) {\n return objectSetDefinitions.get(objectSet);\n}\nconst objectSetDefinitions = new WeakMap();\n\n/** @internal */\nexport function createObjectSet(objectType, clientCtx, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n}) {\n const base = {\n aggregate: aggregate.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"aggregate\"\n })), objectType, objectSet),\n fetchPage: fetchPageInternal.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchPage\"\n })), objectType, objectSet),\n fetchPageWithErrors: fetchPageWithErrorsInternal.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchPageWithErrors\"\n })), objectType, objectSet),\n where: clause => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"filter\",\n objectSet: objectSet,\n where: modernToLegacyWhereClause(clause)\n });\n },\n pivotTo: function (type) {\n return createSearchAround(type)();\n },\n union: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"union\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n intersect: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"intersect\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n subtract: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"subtract\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n asyncIter: async function* () {\n let $nextPageToken = undefined;\n do {\n const result = await fetchPageInternal(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"asyncIter\"\n })), objectType, objectSet, {\n $nextPageToken\n });\n $nextPageToken = result.nextPageToken;\n for (const obj of result.data) {\n yield obj;\n }\n } while ($nextPageToken != null);\n },\n fetchOne: isObjectTypeDefinition(objectType) ? async (primaryKey, options) => {\n const withPk = {\n type: \"filter\",\n objectSet: objectSet,\n where: {\n type: \"eq\",\n field: objectType.primaryKeyApiName,\n value: primaryKey\n }\n };\n return await fetchSingle(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchOne\"\n })), objectType, options, withPk);\n } : undefined,\n fetchOneWithErrors: isObjectTypeDefinition(objectType) ? async (primaryKey, options) => {\n const withPk = {\n type: \"filter\",\n objectSet: objectSet,\n where: {\n type: \"eq\",\n field: objectType.primaryKeyApiName,\n value: primaryKey\n }\n };\n return await fetchSingleWithErrors(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchOneWithErrors\"\n })), objectType, options, withPk);\n } : undefined\n };\n function createSearchAround(link) {\n return () => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"searchAround\",\n objectSet,\n link\n });\n };\n }\n objectSetDefinitions.set(base, objectSet);\n\n // we are using a type assertion because the marker symbol defined in BaseObjectSet isn't actually used\n // at runtime.\n return base;\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 { getWireObjectSet } from \"../../objectSet/createObjectSet.js\";\nimport { fetchSingle, fetchSingleWithErrors } from \"../fetchSingle.js\";\nimport { ClientRef, ObjectDefRef, RawObject } from \"./InternalSymbols.js\";\n/** @internal */\nexport function get$link(holder) {\n return new Proxy(holder, DollarLinkProxyHandler);\n}\nconst DollarLinkProxyHandler = {\n get(target, p) {\n const {\n [ObjectDefRef]: objDef,\n [ClientRef]: client,\n [RawObject]: rawObj\n } = target;\n const linkDef = objDef.links[p];\n if (linkDef == null) {\n return;\n }\n const objectSet = client.objectSetFactory(objDef, client).where({\n [objDef.primaryKeyApiName]: rawObj.$primaryKey\n }).pivotTo(p);\n if (!linkDef.multiplicity) {\n return {\n fetchOne: options => fetchSingle(client, objDef, options ?? {}, getWireObjectSet(objectSet)),\n fetchOneWithErrors: options => fetchSingleWithErrors(client, objDef, options ?? {}, getWireObjectSet(objectSet))\n };\n } else {\n return objectSet;\n }\n },\n ownKeys(target) {\n return [...Object.keys(target[ObjectDefRef].links)];\n },\n getOwnPropertyDescriptor(target, p) {\n if (target[ObjectDefRef].links[p]) {\n return {\n enumerable: true,\n configurable: true,\n // fixme\n writable: false\n };\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 { createAttachmentFromRid } from \"../../createAttachmentFromRid.js\";\nimport { createTimeseriesProperty } from \"../../createTimeseriesProperty.js\";\nimport { createClientCache } from \"../Cache.js\";\nimport { get$as } from \"./getDollarAs.js\";\nimport { get$link } from \"./getDollarLink.js\";\nimport { ClientRef, ObjectDefRef, RawObject, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nconst objectPrototypeCache = createClientCache(function (client, objectDef) {\n return Object.create(null, {\n [ObjectDefRef]: {\n value: objectDef\n },\n [ClientRef]: {\n value: client\n },\n \"$as\": {\n value: get$as(objectDef)\n },\n \"$link\": {\n get: function () {\n return get$link(this);\n }\n },\n \"$updateInternalValues\": {\n value: function (newValues) {\n this[RawObject] = Object.assign({}, this[RawObject], newValues);\n }\n }\n });\n});\n\n/** @internal */\nexport function createOsdkObject(client, objectDef, rawObj) {\n // We use multiple layers of prototypes to maximize reuse and also to keep\n // [RawObject] out of `ownKeys`. This keeps the code in the proxy below simpler.\n const objectHolderPrototype = Object.create(objectPrototypeCache.get(client, objectDef), {\n [RawObject]: {\n value: rawObj,\n writable: true // so we can allow updates\n }\n });\n\n // we separate the holder out so we can update\n // the underlying data without having to return a new object\n // we also need the holder so we can customize the console.log output\n const holder = Object.create(objectHolderPrototype);\n const osdkObject = new Proxy(holder, {\n ownKeys(target) {\n return Reflect.ownKeys(target[RawObject]);\n },\n get(target, p, receiver) {\n switch (p) {\n case UnderlyingOsdkObject:\n // effectively point back to the proxy\n return receiver;\n }\n if (p in target) return target[p];\n if (p in rawObj) {\n const rawValue = target[RawObject][p];\n const propDef = objectDef.properties[p];\n if (propDef) {\n if (propDef.type === \"attachment\") {\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => createAttachmentFromRid(client, a.rid));\n }\n return createAttachmentFromRid(client, rawValue.rid);\n }\n if (propDef.type === \"numericTimeseries\" || propDef.type === \"stringTimeseries\") {\n return createTimeseriesProperty(client, objectDef.apiName, target[RawObject][objectDef.primaryKeyApiName], p);\n }\n }\n return rawValue;\n }\n\n // we do not do any fall through to avoid unexpected behavior\n },\n set(target, p, newValue) {\n // allow the prototype to update this value\n if (p === RawObject) {\n // symbol only exists internally so no one else can hit this\n target[p] = newValue;\n return true;\n }\n return false;\n },\n getOwnPropertyDescriptor(target, p) {\n if (p === RawObject) {\n return Reflect.getOwnPropertyDescriptor(target, p);\n }\n if (target[RawObject][p] != null) {\n return {\n configurable: true,\n enumerable: true\n };\n }\n return {\n enumerable: false\n };\n }\n });\n return osdkObject;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { createOsdkObject } from \"./convertWireToOsdkObjects/createOsdkObject.js\";\n\n/**\n * If interfaceApiName is not undefined, converts the instances of the\n * interface into their respective\n * underlying concrete types and then returns the $as() representation\n * for the consumers.\n *\n * Otherwise just does the conversion\n *\n * May mutate in place for performance reasons. If you need a clean copy,\n * keep it first.\n *\n * However, you must use the returned value, which will be whatever is correct.\n *\n * @internal\n * @param interfaceApiName - if undefined\n */\nexport async function convertWireToOsdkObjects(client, objects, interfaceApiName, forceRemoveRid = false, selectedProps, strictNonNull = false) {\n client.logger?.debug(`START convertWireToOsdkObjects()`);\n fixObjectPropertiesInPlace(objects, forceRemoveRid);\n const ifaceDef = interfaceApiName ? await client.ontologyProvider.getInterfaceDefinition(interfaceApiName) : undefined;\n const ifaceSelected = ifaceDef ? selectedProps ?? Object.keys(ifaceDef.properties) : undefined;\n const ret = [];\n for (const rawObj of objects) {\n const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);\n !objectDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing definition for '${rawObj.$apiName}'`) : invariant(false) : void 0;\n\n // default value for when we are checking an object\n let objProps;\n let conforming = true;\n if (ifaceDef && ifaceSelected) {\n // API returns interface spt names but we cache by real values\n invariantInterfacesAsViews(objectDef, ifaceDef.apiName, client);\n conforming &&= isConforming(client, ifaceDef, rawObj, ifaceSelected);\n reframeAsObjectInPlace(objectDef, ifaceDef.apiName, rawObj);\n objProps = convertInterfacePropNamesToObjectPropNames(objectDef, ifaceDef.apiName, ifaceSelected);\n } else {\n objProps = selectedProps ?? Object.keys(objectDef.properties);\n }\n conforming &&= isConforming(client, objectDef, rawObj, objProps);\n if (strictNonNull === \"throw\" && !conforming) {\n throw new Error(\"Unable to safely convert objects as some non nullable properties are null\");\n } else if (strictNonNull === \"drop\" && !conforming) {\n continue;\n }\n let osdkObject = createOsdkObject(client, objectDef, rawObj);\n if (interfaceApiName) osdkObject = osdkObject.$as(interfaceApiName);\n ret.push(osdkObject);\n }\n client.logger?.debug(`END convertWireToOsdkObjects()`);\n return ret;\n}\n\n/**\n * Utility function that lets us take down selected property names from an interface\n * and convert them to an array of property names on an object.\n */\nfunction convertInterfacePropNamesToObjectPropNames(objectDef, interfaceApiName, ifacePropsToMap) {\n return ifacePropsToMap.map(ifaceProp => objectDef.interfaceMap[interfaceApiName][ifaceProp]);\n}\n\n/**\n * Takes a raw object from the wire (contextually as an interface) and\n * updates the fields to reflect the underlying objectDef instead\n * @param objectDef\n * @param interfaceApiName\n * @param client\n * @param rawObj\n */\nfunction reframeAsObjectInPlace(objectDef, interfaceApiName, rawObj) {\n const newProps = {};\n for (const [sptProp, regularProp] of Object.entries(objectDef.interfaceMap[interfaceApiName])) {\n if (sptProp in rawObj) {\n const value = rawObj[sptProp];\n delete rawObj[sptProp];\n if (value !== undefined) {\n newProps[regularProp] = value;\n }\n }\n }\n Object.assign(rawObj, newProps);\n if (!(objectDef.primaryKeyApiName in rawObj)) {\n rawObj[objectDef.primaryKeyApiName] = rawObj.$primaryKey;\n }\n}\nfunction isConforming(client, def, obj, propsToCheck) {\n for (const propName of propsToCheck) {\n if (def.properties[propName].nullable === false && obj[propName] == null) {\n if (process?.env?.NODE_ENV !== \"production\") {\n client.logger?.debug({\n obj: {\n $objectType: obj[\"$objectType\"],\n $primaryKey: obj[\"$primaryKey\"]\n }\n }, `Found object that does not conform to its definition. Expected ${def.apiName}'s ${propName} to not be null.`);\n }\n return false;\n }\n }\n return true;\n}\nfunction invariantInterfacesAsViews(objectDef, interfaceApiName, client) {\n if (objectDef.interfaceMap?.[interfaceApiName] == null) {\n const warning = \"Interfaces are only supported 'as views' but your metadata object is missing the correct information. This suggests your interfaces have not been migrated to the newer version yet and you cannot use this version of the SDK.\";\n if (client.logger) {\n client.logger.warn(warning);\n } else {\n // eslint-disable-next-line no-console\n console.error(`WARNING! ${warning}`);\n }\n throw new Error(warning);\n }\n}\nfunction fixObjectPropertiesInPlace(objs, forceRemoveRid) {\n for (const obj of objs) {\n if (forceRemoveRid) {\n delete obj.__rid;\n }\n if (obj.__rid) {\n obj.$rid = obj.__rid;\n delete obj.__rid;\n }\n\n // Backend returns as __apiName but we want to stick to $ structure\n obj.$apiName = obj.__apiName;\n\n // for now these are the same but when we start doing interface projections the $objectType will always be underlying and\n // the $apiName will be for the current view (in current designs)\n obj.$objectType = obj.__apiName;\n\n // copying over for now as its always returned. In the future, this should just be inferred from underlying\n obj.$primaryKey = obj.__primaryKey;\n obj.$title = obj.__title;\n\n // we don't want people to use these\n delete obj.__apiName;\n delete obj.__primaryKey;\n delete obj.__title;\n }\n}","/*\n * 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 \"@osdk/internal.foundry\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { convertWireToOsdkObjects } from \"./convertWireToOsdkObjects.js\";\nexport function augment(type, ...properties) {\n return {\n [type.apiName]: properties\n };\n}\n\n/** @internal */\nexport function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWhere = undefined) {\n if (objectSet.type === \"base\") {\n if (objectSet.objectType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`);\n }\n return existingWhere;\n }\n if (objectSet.type === \"filter\") {\n return objectSetToSearchJsonV2(objectSet.objectSet, expectedApiName, existingWhere == null ? objectSet.where : {\n type: \"and\",\n value: [existingWhere, objectSet.where]\n });\n }\n throw new Error(`Unsupported objectSet type: ${objectSet.type}`);\n}\nasync function fetchInterfacePage(client, interfaceType, args, objectSet) {\n const result = await OntologiesV2.OntologyInterfaces.searchObjectsForInterface(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, applyFetchArgs(args, {\n augmentedProperties: args.$augment ?? {},\n augmentedSharedPropertyTypes: {},\n otherInterfaceTypes: [],\n selectedObjectTypes: args.$__EXPERIMENTAL_selectedObjectTypes ?? [],\n selectedSharedPropertyTypes: args.$select ?? [],\n where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)\n }), {\n preview: true\n });\n result.data = await convertWireToOsdkObjects(client, result.data,\n // drop readonly\n interfaceType.apiName, !args.$includeRid);\n return result;\n}\n\n/** @internal */\nexport async function fetchPageInternal(client, objectType, objectSet, args = {}) {\n if (objectType.type === \"interface\") {\n return await fetchInterfacePage(client, objectType, args, objectSet); // fixme\n } else {\n return await fetchObjectPage(client, objectType, args, objectSet); // fixme\n }\n}\n\n/** @internal */\nexport async function fetchPageWithErrorsInternal(client, objectType, objectSet, args = {}) {\n try {\n const result = await fetchPageInternal(client, objectType, objectSet, args);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: e\n };\n }\n}\n\n/**\n * @param client\n * @param objectType\n * @param args\n * @param objectSet\n * @returns\n * @internal\n */\nexport async function fetchPage(client, objectType, args, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n}) {\n return fetchPageInternal(client, objectType, objectSet, args);\n}\n\n/** @internal */\nexport async function fetchPageWithErrors(client, objectType, args, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n}) {\n return fetchPageWithErrorsInternal(client, objectType, objectSet, args);\n}\nfunction applyFetchArgs(args, body) {\n if (args?.$nextPageToken) {\n body.pageToken = args.$nextPageToken;\n }\n if (args?.$pageSize != null) {\n body.pageSize = args.$pageSize;\n }\n if (args?.$orderBy != null) {\n body.orderBy = {\n fields: Object.entries(args.$orderBy).map(([field, direction]) => ({\n field,\n direction\n }))\n };\n }\n return body;\n}\n\n/** @internal */\nexport async function fetchObjectPage(client, objectType, args, objectSet) {\n const r = await OntologiesV2.OntologyObjectSets.loadObjectSetV2(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, applyFetchArgs(args, {\n objectSet,\n // We have to do the following case because LoadObjectSetRequestV2 isn't readonly\n select: args?.$select ?? [],\n // FIXME?\n excludeRid: !args?.$includeRid\n }));\n return Promise.resolve({\n data: await convertWireToOsdkObjects(client, r.data, undefined, undefined, args.$select, args.$__EXPERIMENTAL_strictNonNull),\n nextPageToken: r.nextPageToken\n });\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @internal */\nexport function isOntologyObjectV2(o) {\n return o && typeof o === \"object\" && typeof o.__apiName === \"string\" && o.__primaryKey != null;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isOsdkBaseObject(o) {\n return o && typeof o === \"object\" && typeof o.$apiName === \"string\" && o.$primaryKey != null;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Ontologies } from \"@osdk/internal.foundry\";\nimport { isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isOntologyObjectV2 } from \"./isOntologyObjectV2.js\";\nimport { isOsdkBaseObject } from \"./isOsdkObject.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n * @internal\n */\nexport async function toDataValue(value, client) {\n if (value == null) {\n // typeof null is 'object' so do this first\n return value;\n }\n\n // arrays and sets are both sent over the wire as arrays\n if (Array.isArray(value) || value instanceof Set) {\n const promiseArray = Array.from(value, async innerValue => await toDataValue(innerValue, client));\n return Promise.all(promiseArray);\n }\n\n // For uploads, we need to upload ourselves first to get the RID of the attachment\n if (isAttachmentUpload(value)) {\n const attachment = await Ontologies.Attachments.uploadAttachment(client, value, {\n filename: value.name\n });\n return await toDataValue(attachment.rid, client);\n }\n\n // objects just send the JSON'd primaryKey\n if (isOntologyObjectV2(value)) {\n return await toDataValue(value.__primaryKey, client);\n }\n if (isOsdkBaseObject(value)) {\n return await toDataValue(value.$primaryKey, client);\n }\n\n // object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)\n if (isWireObjectSet(value)) {\n return value;\n }\n if (isObjectSet(value)) {\n return getWireObjectSet(value);\n }\n\n // TODO (during queries implementation)\n // two dimensional aggregation\n // three dimensional aggregation\n\n // struct\n if (typeof value === \"object\") {\n return Object.entries(value).reduce(async (promisedAcc, [key, structValue]) => {\n const acc = await promisedAcc;\n acc[key] = await toDataValue(structValue, client);\n return acc;\n }, Promise.resolve({}));\n }\n\n // expected to pass through - boolean, byte, date, decimal, float, double, integer, long, short, string, timestamp\n return value;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nimport invariant from \"tiny-invariant\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { toDataValue } from \"../util/toDataValue.js\";\nimport { ActionValidationError } from \"./ActionValidationError.js\";\nexport async function applyAction(client, action, parameters, options = {}) {\n const clientWithHeaders = addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyAction\"\n })), action);\n if (Array.isArray(parameters)) {\n const response = await OntologiesV2.Actions.applyActionBatchV2(clientWithHeaders, await client.ontologyRid, action.apiName, {\n requests: parameters ? await remapBatchActionParams(parameters, client) : [],\n options: {\n returnEdits: options?.$returnEdits ? \"ALL\" : \"NONE\"\n }\n });\n const edits = response.edits;\n return options?.$returnEdits ? edits?.type === \"edits\" ? remapActionResponse(response) : edits : undefined;\n } else {\n const response = await OntologiesV2.Actions.applyActionV2(clientWithHeaders, await client.ontologyRid, action.apiName, {\n parameters: await remapActionParams(parameters, client),\n options: {\n mode: options?.$validateOnly ? \"VALIDATE_ONLY\" : \"VALIDATE_AND_EXECUTE\",\n returnEdits: options?.$returnEdits ? \"ALL\" : \"NONE\"\n }\n });\n if (options?.$validateOnly) {\n return response.validation;\n }\n if (response.validation?.result === \"INVALID\") {\n throw new ActionValidationError(response.validation);\n }\n const edits = response.edits;\n return options?.$returnEdits ? edits?.type === \"edits\" ? remapActionResponse(response) : edits : undefined;\n }\n}\nasync function remapActionParams(params, client) {\n if (params == null) {\n return {};\n }\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValue(value, client);\n }\n return parameterMap;\n}\nasync function remapBatchActionParams(params, client) {\n const remappedParams = await Promise.all(params.map(async param => {\n return {\n parameters: await remapActionParams(param, client)\n };\n }));\n return remappedParams;\n}\nexport function remapActionResponse(response) {\n const editResponses = response?.edits;\n if (editResponses?.type === \"edits\") {\n const remappedActionResponse = {\n type: editResponses.type,\n deletedLinksCount: editResponses.deletedLinksCount,\n deletedObjectsCount: editResponses.deletedObjectsCount,\n addedLinks: [],\n addedObjects: [],\n modifiedObjects: [],\n editedObjectTypes: []\n };\n const editedObjectTypesSet = new Set();\n for (const edit of editResponses.edits) {\n if (edit.type === \"addLink\") {\n remappedActionResponse.addedLinks.push(edit);\n editedObjectTypesSet.add(edit.aSideObject.objectType);\n editedObjectTypesSet.add(edit.bSideObject.objectType);\n } else if (edit.type === \"addObject\") {\n remappedActionResponse.addedObjects.push(edit);\n editedObjectTypesSet.add(edit.objectType);\n } else if (edit.type === \"modifyObject\") {\n remappedActionResponse.modifiedObjects.push(edit);\n editedObjectTypesSet.add(edit.objectType);\n } else {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Unknown edit type\") : invariant(false) : void 0;\n }\n }\n remappedActionResponse.editedObjectTypes = [...editedObjectTypesSet];\n return remappedActionResponse;\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { wireObjectTypeFullMetadataToSdkObjectTypeDefinition } from \"@osdk/generator-converters\";\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nexport async function loadFullObjectMetadata(client, objectType) {\n const full = await OntologiesV2.ObjectTypesV2.getObjectTypeFullMetadata(client, await client.ontologyRid, objectType, {\n preview: true\n });\n const ret = wireObjectTypeFullMetadataToSdkObjectTypeDefinition(full, true);\n client.logger?.debug(`END loadFullObjectMetadata(${objectType})`);\n return {\n ...ret,\n rid: full.objectType.rid\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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nexport async function loadInterfaceDefinition(client, objectType) {\n const r = await OntologiesV2.OntologyInterfaces.getInterfaceType(client, await client.ontologyRid, objectType, {\n preview: true\n });\n return __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createAsyncClientCache } from \"../object/Cache.js\";\nimport { loadFullObjectMetadata } from \"./loadFullObjectMetadata.js\";\nimport { loadInterfaceDefinition } from \"./loadInterfaceDefinition.js\";\nimport { InterfaceDefinitions } from \"./OntologyProvider.js\";\nexport const createStandardOntologyProviderFactory = client => {\n return client => {\n async function loadObject(client, key) {\n let objectDef = await loadFullObjectMetadata(client, key);\n\n // ensure we have all of the interfaces loaded\n const interfaceDefs = Object.fromEntries((await Promise.all(objectDef.implements?.map(i => ret.getInterfaceDefinition(i)) ?? [])).map(i => [i.apiName, {\n def: i,\n handler: undefined\n }]));\n const fullObjectDef = {\n ...objectDef,\n [InterfaceDefinitions]: interfaceDefs\n };\n return fullObjectDef;\n }\n async function loadInterface(client, key) {\n return loadInterfaceDefinition(client, key);\n }\n function makeGetter(fn) {\n const cache = createAsyncClientCache((client, key) => fn(client, key, false));\n return async apiName => {\n return await cache.get(client, apiName);\n };\n }\n const ret = {\n getObjectDefinition: makeGetter(loadObject),\n getInterfaceDefinition: makeGetter(loadInterface),\n maybeSeed(definition) {\n // not using this for now\n }\n };\n return ret;\n };\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const USER_AGENT = `osdk-client/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { createStandardOntologyProviderFactory } from \"./ontology/StandardOntologyProvider.js\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n\n/** @internal */\nexport function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet) {\n if (process?.env?.NODE_ENV !== \"production\") {\n try {\n new URL(baseUrl);\n } catch (e) {\n const hint = !baseUrl.startsWith(\"http://\") || !baseUrl.startsWith(\"https://\") ? \". Did you forget to add 'http://' or 'https://'?\" : \"\";\n throw new Error(`Invalid stack URL: ${baseUrl}${hint}`);\n }\n }\n const minimalClient = {\n ...createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn),\n objectSetFactory,\n ontologyRid: metadata.ontologyRid,\n logger: options.logger,\n clientCacheKey: {},\n requestContext: {}\n };\n return Object.assign(minimalClient, {\n ontologyProvider: createStandardOntologyProviderFactory(options)(minimalClient)\n });\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isOsdkBaseObject(o) {\n return o && typeof o === \"object\" && typeof o.$apiName === \"string\" && o.$primaryKey != null;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Ontologies } from \"@osdk/internal.foundry\";\nimport { isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isOsdkBaseObject } from \"./isOsdkBaseObject.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n * @internal\n */\nexport async function toDataValueQueries(value, client, desiredType) {\n if (value == null) {\n return value;\n }\n if (Array.isArray(value) && desiredType.multiplicity) {\n const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType));\n return Promise.all(promiseArray);\n }\n switch (desiredType.type) {\n case \"attachment\":\n {\n if (isAttachmentUpload(value)) {\n const attachment = await Ontologies.Attachments.uploadAttachment(client, value, {\n filename: value.name\n });\n return attachment.rid;\n }\n\n // If it's not an upload, it's just an attachment rid string which we can pass through\n return value;\n }\n case \"twoDimensionalAggregation\":\n {\n return {\n groups: value\n };\n }\n case \"threeDimensionalAggregation\":\n {\n return {\n groups: value\n };\n }\n case \"set\":\n {\n if (value instanceof Set) {\n const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType[\"set\"]));\n return Promise.all(promiseArray);\n }\n break;\n }\n case \"object\":\n {\n if (isOsdkBaseObject(value)) {\n return value.$primaryKey;\n }\n break;\n }\n case \"objectSet\":\n {\n // object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)\n if (isWireObjectSet(value)) {\n return value;\n }\n if (isObjectSet(value)) {\n return getWireObjectSet(value);\n }\n break;\n }\n case \"struct\":\n {\n if (typeof value === \"object\") {\n const structMap = {};\n for (const [key, structValue] of Object.entries(value)) {\n structMap[key] = await toDataValueQueries(structValue, client, desiredType[\"struct\"][key]);\n }\n return structMap;\n }\n }\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"timestamp\":\n return value;\n }\n return value;\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 { OntologiesV2 } from \"@osdk/internal.foundry\";\nimport { createAttachmentFromRid } from \"../createAttachmentFromRid.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { toDataValueQueries } from \"../util/toDataValueQueries.js\";\nexport async function applyQuery(client, query, params) {\n const response = await OntologiesV2.Queries.executeQueryV2(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyQuery\"\n })), query), await client.ontologyRid, query.apiName, {\n parameters: params ? await remapQueryParams(params, client, query.parameters) : {}\n });\n const objectOutputDefs = await getRequiredDefinitions(query.output, client);\n const remappedResponse = await remapQueryResponse(client, query.output, response.value, objectOutputDefs);\n return remappedResponse;\n}\nasync function remapQueryParams(params, client, paramTypes) {\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValueQueries(value, client, paramTypes[key]);\n }\n return parameterMap;\n}\nasync function remapQueryResponse(client, responseDataType, responseValue, definitions) {\n // handle null responses\n if (responseValue == null) {\n if (responseDataType.nullable) {\n return undefined;\n } else {\n throw new Error(\"Got null response when nullable was not allowed\");\n }\n }\n if (responseDataType.multiplicity != null && responseDataType.multiplicity !== false) {\n const withoutMultiplicity = {\n ...responseDataType,\n multiplicity: false\n };\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(responseValue[i], withoutMultiplicity, client, definitions);\n }\n return responseValue;\n }\n switch (responseDataType.type) {\n case \"union\":\n {\n throw new Error(\"Union return types are not yet supported\");\n }\n case \"set\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(responseValue[i], responseDataType.set, client, definitions);\n }\n return responseValue;\n }\n case \"attachment\":\n {\n return createAttachmentFromRid(client, responseValue);\n }\n case \"object\":\n {\n const def = definitions.get(responseDataType.object);\n if (!def) {\n throw new Error(`Missing definition for ${responseDataType.object}`);\n }\n return createQueryObjectResponse(responseValue, def);\n }\n case \"objectSet\":\n {\n const def = definitions.get(responseDataType.objectSet);\n if (!def) {\n throw new Error(`Missing definition for ${responseDataType.objectSet}`);\n }\n if (typeof responseValue === \"string\") {\n return createObjectSet(def, client, {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: responseDataType.objectSet\n }, {\n type: \"reference\",\n reference: responseValue\n }]\n });\n }\n return createObjectSet(def, client, responseValue);\n }\n case \"struct\":\n {\n // figure out what keys need to be fixed up\n for (const [key, subtype] of Object.entries(responseDataType.struct)) {\n if (requiresConversion(subtype)) {\n responseValue[key] = await remapQueryResponse(responseValue[key], subtype, client, definitions);\n }\n }\n return responseValue;\n }\n case \"twoDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n value\n } of responseValue.groups) {\n result.push({\n key,\n value\n });\n }\n return result;\n }\n case \"threeDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n groups\n } of responseValue.groups) {\n const subResult = [];\n for (const {\n key: subKey,\n value\n } of groups) {\n subResult.push({\n key: subKey,\n value\n });\n }\n result.push({\n key,\n groups: subResult\n });\n }\n return result;\n }\n }\n return responseValue;\n}\nasync function getRequiredDefinitions(dataType, client) {\n const result = new Map();\n switch (dataType.type) {\n case \"objectSet\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.objectSet);\n result.set(dataType.objectSet, objectDef);\n break;\n }\n case \"object\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.object);\n result.set(dataType.object, objectDef);\n break;\n }\n case \"set\":\n {\n return getRequiredDefinitions(dataType.set, client);\n }\n case \"struct\":\n {\n for (const value of Object.values(dataType.struct)) {\n for (const [type, objectDef] of await getRequiredDefinitions(value, client)) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"object\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"union\":\n break;\n }\n return result;\n}\nfunction requiresConversion(dataType) {\n switch (dataType.type) {\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"object\": // JSON encoded primary key\n case \"string\":\n case \"timestamp\":\n return false;\n case \"union\":\n return true;\n case \"struct\":\n return Object.values(dataType.struct).some(requiresConversion);\n case \"set\":\n return requiresConversion(dataType.set);\n case \"attachment\":\n case \"objectSet\":\n case \"twoDimensionalAggregation\":\n case \"threeDimensionalAggregation\":\n return true;\n default:\n return false;\n }\n}\nexport function createQueryObjectResponse(primaryKey, objectDef) {\n return {\n $apiName: objectDef.apiName,\n $title: undefined,\n $objectType: objectDef.apiName,\n $primaryKey: primaryKey\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 { symbolClientContext } from \"@osdk/shared.client\";\nimport { applyAction } from \"./actions/applyAction.js\";\nimport { createMinimalClient } from \"./createMinimalClient.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { applyQuery } from \"./queries/applyQuery.js\";\nclass ActionInvoker {\n constructor(clientCtx, actionDef) {\n // We type the property as a generic function as binding `applyAction`\n // doesn't return a type thats all that useful anyway\n // The implements covers us for the most part here as this exact type doesn't\n // escape this file\n this.applyAction = applyAction.bind(undefined, clientCtx, actionDef);\n this.batchApplyAction = applyAction.bind(undefined, clientCtx, actionDef);\n }\n}\nclass QueryInvoker {\n constructor(clientCtx, queryDef) {\n this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);\n }\n}\n\n/** @internal */\nexport function createClientInternal(objectSetFactory,\n// first so i can bind\nbaseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {\n const clientCtx = createMinimalClient({\n ontologyRid\n }, baseUrl, tokenProvider, options, fetchFn, objectSetFactory);\n function clientFn(o) {\n if (o.type === \"object\" || o.type === \"interface\") {\n clientCtx.ontologyProvider.maybeSeed(o);\n return objectSetFactory(o, clientCtx);\n } else if (o.type === \"action\") {\n clientCtx.ontologyProvider.maybeSeed(o);\n return new ActionInvoker(clientCtx, o); // then as any for dealing with the conditional return value\n } else if (o.type === \"query\") {\n clientCtx.ontologyProvider.maybeSeed(o);\n return new QueryInvoker(clientCtx, o);\n } else {\n throw new Error(\"not implemented\");\n }\n }\n const client = Object.defineProperties(clientFn, {\n [symbolClientContext]: {\n value: clientCtx\n }\n });\n return client;\n}\nexport const createClient = createClientInternal.bind(undefined, createObjectSet);"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAttachmentFromRid.d.ts","sourceRoot":"","sources":["../../src/createAttachmentFromRid.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,MAAM,GACV,UAAU,
|
|
1
|
+
{"version":3,"file":"createAttachmentFromRid.d.ts","sourceRoot":"","sources":["../../src/createAttachmentFromRid.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,MAAM,GACV,UAAU,CAiBZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createClient.d.ts","sourceRoot":"","sources":["../../src/createClient.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"createClient.d.ts","sourceRoot":"","sources":["../../src/createClient.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA0G1C,eAAO,MAAM,YAAY,gFA7DF,OAAO,CAAC,MAAM,CAAC;aAChB,MAAM;4DA+D3B,CAAC"}
|
package/build/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { USER_AGENT } from './chunk-
|
|
2
|
-
export { ActionValidationError, createAttachmentFromRid, createAttachmentUpload, createClient } from './chunk-
|
|
1
|
+
import { USER_AGENT } from './chunk-ITBKY5DE.js';
|
|
2
|
+
export { ActionValidationError, createAttachmentFromRid, createAttachmentUpload, createClient } from './chunk-ITBKY5DE.js';
|
|
3
3
|
export { isOk } from '@osdk/client.api';
|
|
4
4
|
export { PalantirApiError } from '@osdk/shared.net.errors';
|
|
5
5
|
import { createSharedClientContext } from '@osdk/shared.client.impl';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InterfaceDefinition, MinimalActionDefinition, ObjectOrInterfaceDefinition, ObjectTypeDefinition, QueryDefinition } from "@osdk/api";
|
|
2
2
|
import type { MinimalClient } from "../MinimalClientContext.js";
|
|
3
3
|
export declare const InterfaceDefinitions: unique symbol;
|
|
4
4
|
export interface FetchedObjectTypeDefinition<K extends string, N = unknown> extends ObjectTypeDefinition<K, N> {
|
|
@@ -32,7 +32,7 @@ export interface OntologyProvider {
|
|
|
32
32
|
* @param definition
|
|
33
33
|
* @returns
|
|
34
34
|
*/
|
|
35
|
-
maybeSeed: (definition: ObjectOrInterfaceDefinition |
|
|
35
|
+
maybeSeed: (definition: ObjectOrInterfaceDefinition | MinimalActionDefinition<string, string, any> | QueryDefinition<any, any>) => void;
|
|
36
36
|
}
|
|
37
37
|
export type OntologyProviderFactory<T extends OntologyProvider = OntologyProvider> = (client: MinimalClient) => T;
|
|
38
38
|
//# sourceMappingURL=OntologyProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OntologyProvider.d.ts","sourceRoot":"","sources":["../../../src/ontology/OntologyProvider.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"OntologyProvider.d.ts","sourceRoot":"","sources":["../../../src/ontology/OntologyProvider.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,eAAO,MAAM,oBAAoB,eAEhC,CAAC;AAEF,MAAM,WAAW,2BAA2B,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,OAAO,CACxE,SAAQ,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC;IAElC,GAAG,EAAE,MAAM,CAAC;IAGZ,CAAC,oBAAoB,CAAC,EAAE;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,GAAG,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;SAAE,CAAC;KAClD,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,mBAAmB,EAAE,CACnB,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,CAAC;IAElD;;;;;;OAMG;IACH,sBAAsB,EAAE,CACtB,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,mBAAmB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,SAAS,EAAE,CACT,UAAU,EACN,2BAA2B,GAC3B,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAC5C,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,KAC1B,IAAI,CAAC;CACX;AAED,MAAM,MAAM,uBAAuB,CACjC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAC3C,CACF,MAAM,EAAE,aAAa,KAClB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSimpleAsyncCache, createClientInternal, createObjectSet, esm_exports, convertWireToOsdkObjects } from '../chunk-
|
|
2
|
-
export { augment } from '../chunk-
|
|
1
|
+
import { createSimpleAsyncCache, createClientInternal, createObjectSet, esm_exports, convertWireToOsdkObjects } from '../chunk-ITBKY5DE.js';
|
|
2
|
+
export { augment } from '../chunk-ITBKY5DE.js';
|
|
3
3
|
import { symbolClientContext } from '@osdk/shared.client';
|
|
4
4
|
import { getBulkLinksPage, getLinkTypesForObjectTypes, bulkLoadOntologyEntities, createTemporaryObjectSet, loadAllOntologies } from '@osdk/client.unstable';
|
|
5
5
|
import { batchEnableWatcher } from '@osdk/client.unstable.osw';
|