@osdk/client 0.20.0-beta.1 → 0.20.0-beta.2

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 0.20.0-beta.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 7505880: Fix exports from client
8
+ - 141953f: Expose $title property in OsdkBase
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [141953f]
13
+ - @osdk/client.api@0.20.0-beta.2
14
+
3
15
  ## 0.20.0-beta.1
4
16
 
5
17
  ### Minor Changes
@@ -834,6 +834,7 @@ function createInterfaceProxyHandler(newDef) {
834
834
  const objDef = underlying[ObjectDefRef];
835
835
  switch (p) {
836
836
  case "$primaryKey":
837
+ case "$title":
837
838
  case "$objectType":
838
839
  return Reflect.getOwnPropertyDescriptor(underlying, p);
839
840
  case "$apiName":
@@ -852,7 +853,7 @@ function createInterfaceProxyHandler(newDef) {
852
853
  }
853
854
  },
854
855
  ownKeys(target) {
855
- return ["$apiName", "$objectType", "$primaryKey", ...Object.keys(newDef.properties)];
856
+ return ["$apiName", "$objectType", "$primaryKey", "$title", ...Object.keys(newDef.properties)];
856
857
  },
857
858
  get(target, p) {
858
859
  const underlying = target[UnderlyingOsdkObject];
@@ -864,6 +865,7 @@ function createInterfaceProxyHandler(newDef) {
864
865
  case "$as":
865
866
  case UnderlyingOsdkObject:
866
867
  case "$primaryKey":
868
+ case "$title":
867
869
  case "$objectType":
868
870
  return underlying[p];
869
871
  }
@@ -1508,8 +1510,10 @@ function fixObjectPropertiesInPlace(objs, forceRemoveRid) {
1508
1510
  obj.$apiName = obj.__apiName;
1509
1511
  obj.$objectType = obj.__apiName;
1510
1512
  obj.$primaryKey = obj.__primaryKey;
1513
+ obj.$title = obj.__title;
1511
1514
  delete obj.__apiName;
1512
1515
  delete obj.__primaryKey;
1516
+ delete obj.__title;
1513
1517
  }
1514
1518
  }
1515
1519
 
@@ -1768,7 +1772,7 @@ var createStandardOntologyProviderFactory = (client) => {
1768
1772
  };
1769
1773
 
1770
1774
  // src/util/UserAgent.ts
1771
- var USER_AGENT = `osdk-client/${"0.20.0-beta.1"}`;
1775
+ var USER_AGENT = `osdk-client/${"0.20.0-beta.2"}`;
1772
1776
 
1773
1777
  // src/createMinimalClient.ts
1774
1778
  function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet) {
@@ -1823,4 +1827,4 @@ var createClient = createClientInternal.bind(void 0, createObjectSet);
1823
1827
 
1824
1828
  export { ActionValidationError, USER_AGENT, augment, convertWireToOsdkObjects, createAttachmentFromRid, createClient, createClientInternal, createObjectSet, createSimpleAsyncCache, esm_exports2 as esm_exports };
1825
1829
  //# sourceMappingURL=out.js.map
1826
- //# sourceMappingURL=chunk-RJH55BAH.js.map
1830
+ //# sourceMappingURL=chunk-Y6GMYWXB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../internal.foundry.datasets/build/esm/chunk-CSAU5B4Q.js","../../../shared.net.platformapi/build/esm/index.js","../../../internal.foundry.datasets/build/esm/chunk-YPYY5DPJ.js","../../../internal.foundry.datasets/build/esm/chunk-Q6FZUZ4K.js","../../../internal.foundry.datasets/build/esm/chunk-UJYKN4YN.js","../../../internal.foundry.datasets/build/esm/chunk-5RKMNE66.js","../../../internal.foundry.models/build/esm/chunk-SJUC7YTI.js","../../../internal.foundry.ontologies/build/esm/index.js","../../../internal.foundry.ontologies/build/esm/chunk-CSAU5B4Q.js","../../../internal.foundry.ontologies/build/esm/chunk-UV55E7D4.js","../../../internal.foundry.ontologies/build/esm/chunk-KU7N4OS3.js","../../../internal.foundry.ontologies/build/esm/chunk-K2FHVG2O.js","../../../internal.foundry.ontologies/build/esm/chunk-LB4RYVNQ.js","../../../internal.foundry.ontologies/build/esm/chunk-FANEAZUW.js","../../../internal.foundry.ontologies/build/esm/chunk-CRDBJVD6.js","../../../internal.foundry.ontologiesv2/build/esm/index.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-CSAU5B4Q.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-UVEI3RO3.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-GCLYROAR.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-GUSJ3JXB.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-ADT7WVKJ.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-S2FR63YP.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-QZMDTH3J.js","../../../internal.foundry.ontologiesv2/build/esm/chunk-HLZX6UUL.js","../../src/createAttachmentFromRid.ts","../../src/util/addUserAgent.ts","../../src/object/convertWireToOsdkObjects.ts","../../src/object/Cache.ts","../../src/ontology/OntologyProvider.ts","../../src/object/SimpleCache.ts","../../src/object/convertWireToOsdkObjects/InternalSymbols.ts","../../src/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.ts","../../src/object/convertWireToOsdkObjects/createOsdkInterface.ts","../../src/object/convertWireToOsdkObjects/getDollarAs.ts","../../src/internal/conversions/modernToLegacyWhereClause.ts","../../src/object/aggregate.ts","../../src/internal/conversions/legacyToModernSingleAggregationResult.ts","../../src/internal/conversions/modernToLegacyAggregationClause.ts","../../src/internal/conversions/modernToLegacyGroupByClause.ts","../../src/object/fetchSingle.ts","../../src/util/WireObjectSet.ts","../../src/objectSet/createObjectSet.ts","../../src/object/convertWireToOsdkObjects/getDollarLink.ts","../../src/object/convertWireToOsdkObjects/createOsdkObject.ts","../../src/object/fetchPage.ts","../../src/actions/ActionValidationError.ts","../../src/createClient.ts","../../src/object/AttachmentUpload.ts","../../src/util/isOntologyObjectV2.ts","../../src/util/toDataValue.ts","../../src/actions/applyAction.ts","../../src/createMinimalClient.ts","../../src/ontology/loadFullObjectMetadata.ts","../../src/ontology/loadInterfaceDefinition.ts","../../src/ontology/StandardOntologyProvider.ts","../../src/util/UserAgent.ts"],"names":["__defPro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xE;AAAA,IACA,aAAa,SAAS;AAAA,IACtB,QAAQ,QAAQ;AAAA,EAClB;AACA,SAAO,OAAO,OAAO,eAAe;AAAA,IAClC,kBAAkB,sCAAsC,OAAO,EAAE,aAAa;AAAA,EAChF,CAAC;AACH;;;ALlBA,IAAM,gBAAN,MAAoB;AAAA,EAClB,YAAY,WAAW,WAAW;AAKhC,SAAK,cAAcD,aAAY,KAAK,QAAW,WAAW,SAAS;AAAA,EACrE;AACF;AACO,SAAS,qBAAqB,kBAErC,SAAS,aAAa,eAAe,UAAU,QAAW,UAAU,OAAO;AACzE,QAAM,YAAY,oBAAoB;AAAA,IACpC;AAAA,EACF,GAAG,SAAS,eAAe,SAAS,SAAS,gBAAgB;AAC7D,WAAS,SAAS,GAAG;AACnB,QAAI,EAAE,SAAS,YAAY,EAAE,SAAS,aAAa;AACjD,gBAAU,iBAAiB,UAAU,CAAC;AACtC,aAAO,iBAAiB,GAAG,SAAS;AAAA,IACtC,WAAW,EAAE,SAAS,UAAU;AAC9B,gBAAU,iBAAiB,UAAU,CAAC;AACtC,aAAO,IAAI,cAAc,WAAW,CAAC;AAAA,IACvC,OAAO;AACL,YAAM,IAAI,MAAM,iBAAiB;AAAA,IACnC;AAAA,EACF;AACA,QAAM,SAAS,OAAO,iBAAiB,UAAU;AAAA,IAC/C,CAACD,oBAAmB,GAAG;AAAA,MACrB,OAAO;AAAA,IACT;AAAA,EACF,CAAC;AACD,SAAO;AACT;AACO,IAAM,eAAe,qBAAqB,KAAK,QAAW,eAAe","sourcesContent":["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-CSAU5B4Q.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-CSAU5B4Q.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-CSAU5B4Q.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-CSAU5B4Q.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 };","import { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\nvar __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};\n\n// src/public/LanguageModel.ts\nvar LanguageModel_exports = {};\n__export(LanguageModel_exports, {\n createChatCompletion: () => createChatCompletion,\n listLanguageModels: () => listLanguageModels,\n streamChatCompletion: () => streamChatCompletion\n});\nvar _createChatCompletion = [1, \"/v1/models/languageModels/{0}/chatCompletions\", 1];\nfunction createChatCompletion($ctx, ...args) {\n return foundryPlatformFetch($ctx, _createChatCompletion, ...args);\n}\nvar _streamChatCompletion = [1, \"/v1/models/languageModels/{0}/chatCompletions/stream\", 1,, \"*/*\"];\nfunction streamChatCompletion($ctx, ...args) {\n return foundryPlatformFetch($ctx, _streamChatCompletion, ...args);\n}\nvar _listLanguageModels = [0, \"/v1/models/languageModels\", 2];\nfunction listLanguageModels($ctx, ...args) {\n return foundryPlatformFetch($ctx, _listLanguageModels, ...args);\n}\nexport { LanguageModel_exports, createChatCompletion, listLanguageModels, streamChatCompletion };","export { ActionType_exports as ActionTypes } from './chunk-UV55E7D4.js';\nexport { Attachment_exports as Attachments } from './chunk-KU7N4OS3.js';\nexport { ObjectType_exports as ObjectTypes } from './chunk-K2FHVG2O.js';\nexport { Ontology_exports as Ontologies } from './chunk-LB4RYVNQ.js';\nexport { OntologyObject_exports as OntologyObjects } from './chunk-FANEAZUW.js';\nexport { QueryType_exports as QueryTypes } from './chunk-CRDBJVD6.js';\nimport './chunk-CSAU5B4Q.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-CSAU5B4Q.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/ActionType.ts\nvar ActionType_exports = {};\n__export(ActionType_exports, {\n applyAction: () => applyAction,\n applyActionAsync: () => applyActionAsync,\n applyActionBatch: () => applyActionBatch,\n getActionType: () => getActionType,\n getAsyncActionStatus: () => getAsyncActionStatus,\n listActionTypes: () => listActionTypes,\n validateAction: () => validateAction\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}\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 { ActionType_exports, applyAction, applyActionAsync, applyActionBatch, getActionType, getAsyncActionStatus, listActionTypes, validateAction };","import { __export } from './chunk-CSAU5B4Q.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 return foundryPlatformFetch($ctx, _uploadAttachment, ...args);\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-CSAU5B4Q.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-CSAU5B4Q.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-CSAU5B4Q.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-CSAU5B4Q.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/QueryType.ts\nvar QueryType_exports = {};\n__export(QueryType_exports, {\n executeQuery: () => executeQuery,\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}\", 2];\nfunction getQueryType($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getQueryType, ...args);\n}\nvar _executeQuery = [1, \"/v1/ontologies/{0}/queries/{1}/execute\", 3];\nfunction executeQuery($ctx, ...args) {\n return foundryPlatformFetch($ctx, _executeQuery, ...args);\n}\nexport { QueryType_exports, executeQuery, getQueryType, listQueryTypes };","export { Action_exports as Actions } from './chunk-UVEI3RO3.js';\nexport { ActionTypeV2_exports as ActionTypesV2 } from './chunk-GCLYROAR.js';\nexport { ObjectTypeV2_exports as ObjectTypesV2 } from './chunk-GUSJ3JXB.js';\nexport { OntologyObjectSet_exports as OntologyObjectSets } from './chunk-ADT7WVKJ.js';\nexport { OntologyObjectV2_exports as OntologyObjectsV2 } from './chunk-S2FR63YP.js';\nexport { OntologyV2_exports as OntologiesV2 } from './chunk-QZMDTH3J.js';\nexport { QueryType_exports as QueryTypes } from './chunk-HLZX6UUL.js';\nimport './chunk-CSAU5B4Q.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-CSAU5B4Q.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-CSAU5B4Q.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-CSAU5B4Q.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/ObjectTypeV2.ts\nvar ObjectTypeV2_exports = {};\n__export(ObjectTypeV2_exports, {\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 _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, getObjectTypeV2, getOutgoingLinkTypeV2, listObjectTypesV2, listOutgoingLinkTypesV2 };","import { __export } from './chunk-CSAU5B4Q.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-CSAU5B4Q.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/OntologyObjectV2.ts\nvar OntologyObjectV2_exports = {};\n__export(OntologyObjectV2_exports, {\n aggregateObjectsForInterface: () => aggregateObjectsForInterface,\n aggregateObjectsV2: () => aggregateObjectsV2,\n countObjects: () => countObjects,\n getAttachmentByRidV2: () => getAttachmentByRidV2,\n getAttachmentContentByRidV2: () => getAttachmentContentByRidV2,\n getAttachmentContentV2: () => getAttachmentContentV2,\n getAttachmentsV2: () => getAttachmentsV2,\n getFirstPoint: () => getFirstPoint,\n getInterfaceType: () => getInterfaceType,\n getLastPoint: () => getLastPoint,\n getLinkedObjectV2: () => getLinkedObjectV2,\n getObjectTypeFullMetadata: () => getObjectTypeFullMetadata,\n getObjectV2: () => getObjectV2,\n listInterfaceTypes: () => listInterfaceTypes,\n listLinkedObjectsV2: () => listLinkedObjectsV2,\n listObjectsV2: () => listObjectsV2,\n searchObjectsForInterface: () => searchObjectsForInterface,\n searchObjectsV2: () => searchObjectsV2,\n streamPoints: () => streamPoints\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}\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}\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}\nvar _getAttachmentsV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}\", 2];\nfunction getAttachmentsV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentsV2, ...args);\n}\nvar _getAttachmentByRidV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}\", 2];\nfunction getAttachmentByRidV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentByRidV2, ...args);\n}\nvar _getAttachmentContentV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/content\", 2,, \"*/*\"];\nfunction getAttachmentContentV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentContentV2, ...args);\n}\nvar _getAttachmentContentByRidV2 = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}/content\", 2,, \"*/*\"];\nfunction getAttachmentContentByRidV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getAttachmentContentByRidV2, ...args);\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}\nvar _getObjectTypeFullMetadata = [0, \"/v2/ontologies/{0}/objectTypes/{1}/fullMetadata\", 2];\nfunction getObjectTypeFullMetadata($ctx, ...args) {\n return foundryPlatformFetch($ctx, _getObjectTypeFullMetadata, ...args);\n}\nexport { OntologyObjectV2_exports, aggregateObjectsForInterface, aggregateObjectsV2, countObjects, getAttachmentByRidV2, getAttachmentContentByRidV2, getAttachmentContentV2, getAttachmentsV2, getFirstPoint, getInterfaceType, getLastPoint, getLinkedObjectV2, getObjectTypeFullMetadata, getObjectV2, listInterfaceTypes, listLinkedObjectsV2, listObjectsV2, searchObjectsForInterface, searchObjectsV2, streamPoints };","import { __export } from './chunk-CSAU5B4Q.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-CSAU5B4Q.js';\nimport { foundryPlatformFetch } from '@osdk/shared.net.platformapi';\n\n// src/public/QueryType.ts\nvar QueryType_exports = {};\n__export(QueryType_exports, {\n executeQueryV2: () => executeQueryV2,\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}\nvar _executeQueryV2 = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 3];\nfunction executeQueryV2($ctx, ...args) {\n return foundryPlatformFetch($ctx, _executeQueryV2, ...args);\n}\nexport { QueryType_exports, executeQueryV2, getQueryTypeV2, listQueryTypesV2 };","/*\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\";\nexport function createAttachmentFromRid(client, rid) {\n return {\n rid,\n async fetchContents() {\n return Ontologies.Attachments.getAttachmentContent(client, rid);\n },\n async fetchMetadata() {\n return Ontologies.Attachments.getAttachment(client, rid);\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 { createFetchHeaderMutator } from \"@osdk/shared.net.fetch\";\nexport function addUserAgent(client, withMetadata) {\n if (withMetadata.osdkMetadata) {\n return {\n ...client,\n fetch: createFetchHeaderMutator(client.fetch, headers => {\n headers.set(\"Fetch-User-Agent\", withMetadata.osdkMetadata.extraUserAgent);\n return headers;\n })\n };\n }\n return client;\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 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 * A simple async cache that can be used to store values for a given client.\n */\n\n/**\n * Create a new cache without a factory function.\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\nexport function createClientCache(fn) {\n // Given the way some consumers may use this, we may want to cache by\n // stack + ontologyApiName instead of the client object itself.\n const cache = new WeakMap();\n function get(client, key) {\n if (cache.get(client) == null) {\n cache.set(client, new Map());\n }\n let r = cache.get(client).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) == null) {\n cache.set(client, new Map());\n }\n cache.get(client).set(key, value);\n return value;\n }\n function remove(client, key) {\n if (cache.get(client) == null) return false;\n return cache.get(client).delete(key);\n }\n return {\n get,\n set,\n remove\n };\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 */\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 { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nexport const OsdkCustomInspectPrototype = Object.create(null, {\n [Symbol.for(\"nodejs.util.inspect.custom\")]: {\n value: customInspect\n }\n});\n\n/**\n * A custom `util.inspect`/`console.log` for nodejs. Not emitted in the browser version\n * @param this\n * @param _depth\n * @param options\n * @param inspect\n * @returns\n */\nfunction customInspect(_depth, options, localInspect) {\n const newOptions = {\n ...options,\n depth: options.depth == null ? null : options.depth - 1\n };\n let ret = `Osdk<${options.stylize(this[ObjectDefRef]?.apiName ?? this[InterfaceDefRef]?.apiName, \"special\")}> {\\n`;\n for (const k of new Set([\"$apiName\", \"$objectType\", \"$primaryKey\", ...Reflect.ownKeys(this)])) {\n if (typeof k === \"symbol\") continue;\n ret += ` ${options.stylize(k.toString(), \"undefined\")}: ${localInspect(this[k], newOptions)}\\n`;\n }\n if (this[UnderlyingOsdkObject] !== this) {\n ret += \"\\n\";\n ret += ` ${options.stylize(\"$as\", \"special\")}: ${localInspect(this[UnderlyingOsdkObject], newOptions).replace(/\\n/g, `\\n `)}`;\n ret += \"\\n\";\n }\n ret += \"}\";\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\nimport { createSimpleCache } from \"../SimpleCache.js\";\nimport { InterfaceDefRef, ObjectDefRef, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nimport { OsdkCustomInspectPrototype } from \"./OsdkCustomInspectPrototype.js\";\nconst handlerCache = createSimpleCache(new WeakMap(), createInterfaceProxyHandler);\nexport function createOsdkInterface(underlying, interfaceDef) {\n const interfaceHolder = {\n [UnderlyingOsdkObject]: underlying,\n [InterfaceDefRef]: interfaceDef\n };\n if (process.env.TARGET !== \"browser\") {\n Object.setPrototypeOf(interfaceHolder, OsdkCustomInspectPrototype);\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 return Reflect.getOwnPropertyDescriptor(underlying, p);\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 return [\"$apiName\", \"$objectType\", \"$primaryKey\", \"$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 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\";\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\";\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) {\n return makeGeoFilterBbox(field, withinBody.$bbox, firstKey);\n } else if (\"$distance\" in withinBody && \"$of\" in withinBody) {\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) {\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 { 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 { addUserAgent } from \"../util/addUserAgent.js\";\n/** @deprecated use `aggregate` */\nexport async function aggregateOrThrow(clientCtx, objectType, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n}, req) {\n return aggregate(clientCtx, objectType, objectSet, req);\n}\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(addUserAgent(clientCtx, objectType), 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 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\";\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;\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\";\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 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\";\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}\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 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\"]);\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 { isWireObjectSet } from \"../util/WireObjectSet.js\";\nfunction isObjectTypeDefinition(def) {\n return def.type === \"object\";\n}\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();\nexport function createObjectSet(objectType, clientCtx, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n}) {\n const base = {\n aggregate: aggregate.bind(globalThis, clientCtx, objectType, objectSet),\n fetchPage: fetchPageInternal.bind(globalThis, clientCtx, objectType, objectSet),\n fetchPageWithErrors: fetchPageWithErrorsInternal.bind(globalThis, clientCtx, 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 base.fetchPage({\n $nextPageToken\n });\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(clientCtx, 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(clientCtx, 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\";\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 { createClientCache } from \"../Cache.js\";\nimport { get$as } from \"./getDollarAs.js\";\nimport { get$link } from \"./getDollarLink.js\";\nimport { ClientRef, ObjectDefRef, RawObject, UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nimport { OsdkCustomInspectPrototype } from \"./OsdkCustomInspectPrototype.js\";\nconst objectPrototypeCache = createClientCache(function (client, objectDef) {\n return Object.create(process.env.target !== \"browser\" ? OsdkCustomInspectPrototype : 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});\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 }\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 { OntologiesV2 } from \"@osdk/internal.foundry\";\nimport { addUserAgent } from \"../util/addUserAgent.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.OntologyObjectsV2.searchObjectsForInterface(addUserAgent(client, interfaceType), client.ontologyRid, interfaceType.apiName, applyFetchArgs(args, {\n augmentedProperties: args.$augment ?? {},\n augmentedSharedPropertyTypes: {},\n otherInterfaceTypes: [],\n 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}\nexport async function fetchPage(client, objectType, args, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n}) {\n return fetchPageInternal(client, objectType, objectSet, args);\n}\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}\nexport async function fetchObjectPage(client, objectType, args, objectSet) {\n const r = await OntologiesV2.OntologyObjectSets.loadObjectSetV2(addUserAgent(client, objectType), client.ontologyRid, applyFetchArgs(args, {\n objectSet,\n // We have to do the following case because LoadObjectSetRequestV2 isnt 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\nexport class ActionValidationError extends Error {\n constructor(validation) {\n super(\"Validation Error\");\n this.validation = validation;\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { symbolClientContext } from \"@osdk/shared.client\";\nimport { applyAction } from \"./actions/applyAction.js\";\nimport { createMinimalClient } from \"./createMinimalClient.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.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 }\n}\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 {\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);","/*\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 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 isOntologyObjectV2(o) {\n return o && typeof o === \"object\" && typeof o.__apiName === \"string\" && o.__primaryKey != null;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Ontologies } from \"@osdk/internal.foundry\";\nimport { isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isOntologyObjectV2 } from \"./isOntologyObjectV2.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n */\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 \"Content-Length\": value.size.toString(),\n \"Content-Type\": value.type\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\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 { addUserAgent } from \"../util/addUserAgent.js\";\nimport { toDataValue } from \"../util/toDataValue.js\";\nimport { ActionValidationError } from \"./ActionValidationError.js\";\nexport async function applyAction(client, action, parameters, options = {}) {\n if (Array.isArray(parameters)) {\n const response = await OntologiesV2.Actions.applyActionBatchV2(addUserAgent(client, action), client.ontologyRid, action.apiName, {\n requests: parameters ? await remapBatchActionParams(parameters, client) : [],\n options: {\n returnEdits: options?.$returnEdits ? \"ALL\" : \"NONE\"\n }\n });\n return options?.$returnEdits ? response.edits : undefined;\n } else {\n const response = await OntologiesV2.Actions.applyActionV2(addUserAgent(client, action), 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 return options?.$returnEdits ? 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}","/*\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\";\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 };\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\nimport { wireObjectTypeFullMetadataToSdkObjectTypeDefinition } from \"@osdk/generator-converters\";\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nexport async function loadFullObjectMetadata(client, objtype) {\n const full = await OntologiesV2.OntologyObjectsV2.getObjectTypeFullMetadata(client, client.ontologyRid, objtype, {\n preview: true\n });\n const ret = wireObjectTypeFullMetadataToSdkObjectTypeDefinition(full, true);\n client.logger?.debug(`END loadFullObjectMetadata(${objtype})`);\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, objtype) {\n const r = await OntologiesV2.OntologyObjectsV2.getInterfaceType(client, client.ontologyRid, objtype, {\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}`;"]}
@@ -1,5 +1,5 @@
1
- import { USER_AGENT } from './chunk-RJH55BAH.js';
2
- export { ActionValidationError, createAttachmentFromRid, createClient } from './chunk-RJH55BAH.js';
1
+ import { USER_AGENT } from './chunk-Y6GMYWXB.js';
2
+ export { ActionValidationError, createAttachmentFromRid, createClient } from './chunk-Y6GMYWXB.js';
3
3
  export { PalantirApiError } from '@osdk/shared.net.errors';
4
4
  import { createSharedClientContext } from '@osdk/shared.client.impl';
5
5
 
@@ -1,5 +1,5 @@
1
- import { createSimpleAsyncCache, createClientInternal, createObjectSet, esm_exports, convertWireToOsdkObjects } from '../chunk-RJH55BAH.js';
2
- export { augment } from '../chunk-RJH55BAH.js';
1
+ import { createSimpleAsyncCache, createClientInternal, createObjectSet, esm_exports, convertWireToOsdkObjects } from '../chunk-Y6GMYWXB.js';
2
+ export { augment } from '../chunk-Y6GMYWXB.js';
3
3
  import { symbolClientContext } from '@osdk/shared.client';
4
4
  import { getBulkLinksPage, getLinkTypesForObjectTypes, loadOntologyEntities, createTemporaryObjectSet, loadAllOntologies } from '@osdk/client.unstable';
5
5
  import { batchEnableWatcher } from '@osdk/client.unstable.osw';
@@ -843,6 +843,7 @@ function createInterfaceProxyHandler(newDef) {
843
843
  const objDef = underlying[ObjectDefRef];
844
844
  switch (p) {
845
845
  case "$primaryKey":
846
+ case "$title":
846
847
  case "$objectType":
847
848
  return Reflect.getOwnPropertyDescriptor(underlying, p);
848
849
  case "$apiName":
@@ -861,7 +862,7 @@ function createInterfaceProxyHandler(newDef) {
861
862
  }
862
863
  },
863
864
  ownKeys(target) {
864
- return ["$apiName", "$objectType", "$primaryKey", ...Object.keys(newDef.properties)];
865
+ return ["$apiName", "$objectType", "$primaryKey", "$title", ...Object.keys(newDef.properties)];
865
866
  },
866
867
  get(target, p) {
867
868
  const underlying = target[UnderlyingOsdkObject];
@@ -873,6 +874,7 @@ function createInterfaceProxyHandler(newDef) {
873
874
  case "$as":
874
875
  case UnderlyingOsdkObject:
875
876
  case "$primaryKey":
877
+ case "$title":
876
878
  case "$objectType":
877
879
  return underlying[p];
878
880
  }
@@ -1517,8 +1519,10 @@ function fixObjectPropertiesInPlace(objs, forceRemoveRid) {
1517
1519
  obj.$apiName = obj.__apiName;
1518
1520
  obj.$objectType = obj.__apiName;
1519
1521
  obj.$primaryKey = obj.__primaryKey;
1522
+ obj.$title = obj.__title;
1520
1523
  delete obj.__apiName;
1521
1524
  delete obj.__primaryKey;
1525
+ delete obj.__title;
1522
1526
  }
1523
1527
  }
1524
1528
 
@@ -1777,7 +1781,7 @@ var createStandardOntologyProviderFactory = (client) => {
1777
1781
  };
1778
1782
 
1779
1783
  // src/util/UserAgent.ts
1780
- var USER_AGENT = `osdk-client/${"0.20.0-beta.1"}`;
1784
+ var USER_AGENT = `osdk-client/${"0.20.0-beta.2"}`;
1781
1785
 
1782
1786
  // src/createMinimalClient.ts
1783
1787
  function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet) {
@@ -1841,4 +1845,4 @@ exports.createObjectSet = createObjectSet;
1841
1845
  exports.createSimpleAsyncCache = createSimpleAsyncCache;
1842
1846
  exports.esm_exports = esm_exports2;
1843
1847
  //# sourceMappingURL=out.js.map
1844
- //# sourceMappingURL=chunk-HRRQHYVC.cjs.map
1848
+ //# sourceMappingURL=chunk-VG5EKGOO.cjs.map