@osdk/api 2.2.0-beta.6 → 2.2.0-beta.8

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/browser/OsdkBase.js.map +1 -1
  3. package/build/browser/actions/ActionResults.js.map +1 -1
  4. package/build/browser/actions/Actions.js.map +1 -1
  5. package/build/browser/experimental/fetchPageByRid.js +22 -0
  6. package/build/browser/experimental/fetchPageByRid.js.map +1 -0
  7. package/build/browser/index.js.map +1 -1
  8. package/build/browser/objectSet/ObjectSet.test.js +0 -4
  9. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  10. package/build/browser/ontology/ObjectSpecifier.js +2 -0
  11. package/build/browser/ontology/ObjectSpecifier.js.map +1 -0
  12. package/build/browser/ontology/ObjectSpecifier.test.js +53 -0
  13. package/build/browser/ontology/ObjectSpecifier.test.js.map +1 -0
  14. package/build/browser/ontology/ObjectTypeDefinition.js.map +1 -1
  15. package/build/browser/ontology/QueryDefinition.js.map +1 -1
  16. package/build/browser/public/unstable.js +1 -0
  17. package/build/browser/public/unstable.js.map +1 -1
  18. package/build/browser/test/EmployeeApiTest.js +21 -0
  19. package/build/browser/test/EmployeeApiTest.js.map +1 -0
  20. package/build/browser/test/FooInterfaceApiTest.js +22 -0
  21. package/build/browser/test/FooInterfaceApiTest.js.map +1 -0
  22. package/build/cjs/{FilteredPropertyKeys-CL4GoFyy.d.cts → FilteredPropertyKeys-D4ZQUqjG.d.cts} +7 -2
  23. package/build/cjs/index.cjs.map +1 -1
  24. package/build/cjs/index.d.cts +13 -5
  25. package/build/cjs/public/unstable.cjs +8 -0
  26. package/build/cjs/public/unstable.cjs.map +1 -1
  27. package/build/cjs/public/unstable.d.cts +8 -3
  28. package/build/esm/OsdkBase.js.map +1 -1
  29. package/build/esm/actions/ActionResults.js.map +1 -1
  30. package/build/esm/actions/Actions.js.map +1 -1
  31. package/build/esm/experimental/fetchPageByRid.js +22 -0
  32. package/build/esm/experimental/fetchPageByRid.js.map +1 -0
  33. package/build/esm/index.js.map +1 -1
  34. package/build/esm/objectSet/ObjectSet.test.js +0 -4
  35. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  36. package/build/esm/ontology/ObjectSpecifier.js +2 -0
  37. package/build/esm/ontology/ObjectSpecifier.js.map +1 -0
  38. package/build/esm/ontology/ObjectSpecifier.test.js +53 -0
  39. package/build/esm/ontology/ObjectSpecifier.test.js.map +1 -0
  40. package/build/esm/ontology/ObjectTypeDefinition.js.map +1 -1
  41. package/build/esm/ontology/QueryDefinition.js.map +1 -1
  42. package/build/esm/public/unstable.js +1 -0
  43. package/build/esm/public/unstable.js.map +1 -1
  44. package/build/esm/test/EmployeeApiTest.js +21 -0
  45. package/build/esm/test/EmployeeApiTest.js.map +1 -0
  46. package/build/esm/test/FooInterfaceApiTest.js +22 -0
  47. package/build/esm/test/FooInterfaceApiTest.js.map +1 -0
  48. package/build/types/OsdkBase.d.ts +2 -0
  49. package/build/types/OsdkBase.d.ts.map +1 -1
  50. package/build/types/actions/ActionResults.d.ts +4 -0
  51. package/build/types/actions/ActionResults.d.ts.map +1 -1
  52. package/build/types/actions/Actions.d.ts +1 -1
  53. package/build/types/actions/Actions.d.ts.map +1 -1
  54. package/build/types/experimental/fetchPageByRid.d.ts +14 -0
  55. package/build/types/experimental/fetchPageByRid.d.ts.map +1 -0
  56. package/build/types/index.d.ts +2 -0
  57. package/build/types/index.d.ts.map +1 -1
  58. package/build/types/ontology/ObjectSpecifier.d.ts +5 -0
  59. package/build/types/ontology/ObjectSpecifier.d.ts.map +1 -0
  60. package/build/types/ontology/ObjectSpecifier.test.d.ts +1 -0
  61. package/build/types/ontology/ObjectSpecifier.test.d.ts.map +1 -0
  62. package/build/types/ontology/ObjectTypeDefinition.d.ts +1 -1
  63. package/build/types/ontology/ObjectTypeDefinition.d.ts.map +1 -1
  64. package/build/types/ontology/QueryDefinition.d.ts +5 -1
  65. package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
  66. package/build/types/public/unstable.d.ts +1 -0
  67. package/build/types/public/unstable.d.ts.map +1 -1
  68. package/build/types/test/EmployeeApiTest.d.ts +62 -0
  69. package/build/types/test/EmployeeApiTest.d.ts.map +1 -0
  70. package/build/types/test/FooInterfaceApiTest.d.ts +50 -0
  71. package/build/types/test/FooInterfaceApiTest.d.ts.map +1 -0
  72. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @osdk/api
2
2
 
3
+ ## 2.2.0-beta.8
4
+
5
+ ### Minor Changes
6
+
7
+ - 0e874b1: Exporting more entities from functions package.
8
+ - 63b2e63: Update Platform SDK Dependencies
9
+ - 26c2d95: Add experimental function to load page of objects by rid.
10
+ - 63b2e63: Supports generating queries for entrySet function types
11
+ - 63b2e63: Adds ObjectSpecifiers to generated OSDK objects
12
+
13
+ ## 2.2.0-beta.7
14
+
15
+ ### Minor Changes
16
+
17
+ - 7416ce4: Adds deleted objects and links returned from applyAction
18
+ - 7416ce4: Update Platform SDK Dependencies
19
+ - 805df40: Fix interface action types.
20
+
3
21
  ## 2.2.0-beta.6
4
22
 
5
23
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"OsdkBase.js","names":[],"sources":["OsdkBase.ts"],"sourcesContent":["/*\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 type { PropertyValueWireToClient } from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ontology/ObjectOrInterface.js\";\nimport type { ObjectTypeDefinition } from \"./ontology/ObjectTypeDefinition.js\";\nimport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"./OsdkObjectPrimaryKeyType.js\";\n\nexport type OsdkBase<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly $apiName: Q[\"apiName\"];\n\n readonly $objectType: string;\n\n readonly $primaryKey: PrimaryKeyType<Q>;\n\n readonly $title: string | undefined;\n};\n\nexport type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> =\n & (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q>\n : unknown)\n // if the type is `unknown` then the next line will\n // restrict it down to all valid primary key types\n & PropertyValueWireToClient[PrimaryKeyTypes];\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"OsdkBase.js","names":[],"sources":["OsdkBase.ts"],"sourcesContent":["/*\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 type { PropertyValueWireToClient } from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ontology/ObjectOrInterface.js\";\nimport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nimport type { ObjectTypeDefinition } from \"./ontology/ObjectTypeDefinition.js\";\nimport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"./OsdkObjectPrimaryKeyType.js\";\n\nexport type OsdkBase<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly $apiName: Q[\"apiName\"];\n\n readonly $objectType: string;\n\n readonly $primaryKey: PrimaryKeyType<Q>;\n\n readonly $title: string | undefined;\n\n readonly $objectSpecifier: ObjectSpecifier<Q>;\n};\n\nexport type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> =\n & (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q>\n : unknown)\n // if the type is `unknown` then the next line will\n // restrict it down to all valid primary key types\n & PropertyValueWireToClient[PrimaryKeyTypes];\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionResults.js","names":[],"sources":["ActionResults.ts"],"sourcesContent":["/*\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// These are migrated from @osdk/foundry.internal to avoid coupling the apis\n\nexport type ActionResults =\n & (\n | ObjectEdits\n | LargeScaleObjectEdits\n )\n & { editedObjectTypes: Array<String> };\n\ninterface ObjectEdits {\n type: \"edits\";\n addedObjects: Array<ObjectReference>;\n modifiedObjects: Array<ObjectReference>;\n addedLinks: Array<LinkReference>;\n deletedObjectsCount: number;\n deletedLinksCount: number;\n}\ninterface LargeScaleObjectEdits {\n type: \"largeScaleEdits\";\n addedObjects?: never;\n modifiedObjects?: never;\n addedLinks?: never;\n deletedObjectsCount?: never;\n deletedLinksCount?: never;\n}\n\ntype LinkReference = {\n linkTypeApiNameAtoB: string;\n linkTypeApiNameBtoA: string;\n aSideObject: ObjectReference;\n bSideObject: ObjectReference;\n};\ninterface ObjectReference {\n primaryKey: string | number;\n objectType: string;\n}\nexport interface ValidateActionResponseV2 {\n result: \"VALID\" | \"INVALID\";\n submissionCriteria: Array<{\n configuredFailureMessage?: string;\n result: \"VALID\" | \"INVALID\";\n }>;\n parameters: Record<string, {\n result: \"VALID\" | \"INVALID\";\n evaluatedConstraints: Array<ParameterEvaluatedConstraint>;\n required: boolean;\n }>;\n}\ntype ParameterEvaluatedConstraint =\n | { type: \"arraySize\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | { type: \"groupMember\" }\n | { type: \"objectPropertyValue\" }\n | { type: \"objectQueryResult\" }\n | {\n type: \"oneOf\";\n options: Array<{\n displayName?: string;\n value?: any;\n }>;\n otherValuesAllowed: boolean;\n }\n | { type: \"range\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | { type: \"stringLength\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | {\n type: \"stringRegexMatch\";\n regex: string;\n configuredFailureMessage?: string;\n }\n | { type: \"unevaluable\" };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ActionResults.js","names":[],"sources":["ActionResults.ts"],"sourcesContent":["/*\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// These are migrated from @osdk/foundry.internal to avoid coupling the apis\n\nexport type ActionResults =\n & (\n | ObjectEdits\n | LargeScaleObjectEdits\n )\n & { editedObjectTypes: Array<String> };\n\ninterface ObjectEdits {\n type: \"edits\";\n addedObjects: Array<ObjectReference>;\n modifiedObjects: Array<ObjectReference>;\n deletedObjects?: Array<ObjectReference>;\n addedLinks: Array<LinkReference>;\n deletedLinks?: Array<LinkReference>;\n deletedObjectsCount: number;\n deletedLinksCount: number;\n}\ninterface LargeScaleObjectEdits {\n type: \"largeScaleEdits\";\n addedObjects?: never;\n modifiedObjects?: never;\n deletedObjects?: never;\n addedLinks?: never;\n deletedLinks?: never;\n deletedObjectsCount?: never;\n deletedLinksCount?: never;\n}\n\ntype LinkReference = {\n linkTypeApiNameAtoB: string;\n linkTypeApiNameBtoA: string;\n aSideObject: ObjectReference;\n bSideObject: ObjectReference;\n};\ninterface ObjectReference {\n primaryKey: string | number;\n objectType: string;\n}\nexport interface ValidateActionResponseV2 {\n result: \"VALID\" | \"INVALID\";\n submissionCriteria: Array<{\n configuredFailureMessage?: string;\n result: \"VALID\" | \"INVALID\";\n }>;\n parameters: Record<string, {\n result: \"VALID\" | \"INVALID\";\n evaluatedConstraints: Array<ParameterEvaluatedConstraint>;\n required: boolean;\n }>;\n}\ntype ParameterEvaluatedConstraint =\n | { type: \"arraySize\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | { type: \"groupMember\" }\n | { type: \"objectPropertyValue\" }\n | { type: \"objectQueryResult\" }\n | {\n type: \"oneOf\";\n options: Array<{\n displayName?: string;\n value?: any;\n }>;\n otherValuesAllowed: boolean;\n }\n | { type: \"range\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | { type: \"stringLength\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | {\n type: \"stringRegexMatch\";\n regex: string;\n configuredFailureMessage?: string;\n }\n | { type: \"unevaluable\" };\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type { ObjectTypeDefinition } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { OsdkBase } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | OsdkBase<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: NonNullable<T[\"__DefinitionMetadata\"]> extends\n { implementedBy: infer U }\n ? (U extends ReadonlyArray<string> ? U[number] : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuBA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type { ObjectTypeDefinition } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { OsdkBase } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | OsdkBase<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: NonNullable<T[\"__DefinitionMetadata\"]> extends\n { implementedBy: infer U } ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuBA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {
18
+ name: "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid",
19
+ type: "experiment",
20
+ version: "2.2.0"
21
+ };
22
+ //# sourceMappingURL=fetchPageByRid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchPageByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","name","type","version"],"sources":["fetchPageByRid.ts"],"sourcesContent":["/*\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 type {\n FetchPageArgs,\n NullabilityAdherence,\n} from \"../object/FetchPageArgs.js\";\nimport type { FetchPageResult } from \"../object/FetchPageResult.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchPageByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends NullabilityAdherence,\n>(\n objectType: Q,\n rids: string[],\n options?: FetchPageArgs<Q, L, R, any, S>,\n) => Promise<FetchPageResult<Q, L, R, S>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,OAAO,MAAMA,iDAIZ,GAAG;EACFC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type { OsdkObjectPropertyType } from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type { Media, MediaMetadata, MediaReference } from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type { FilteredPropertyKeys } from \"./ontology/FilteredPropertyKeys.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type { OsdkBase, PrimaryKeyType } from \"./OsdkBase.js\";\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAahE,SAASC,eAAe,QAAQ,4BAA4B;AA8B5D,SAASC,IAAI,QAAQ,oBAAoB;AA8CzC,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type { OsdkObjectPropertyType } from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type { Media, MediaMetadata, MediaReference } from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type { FilteredPropertyKeys } from \"./ontology/FilteredPropertyKeys.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type { OsdkBase, PrimaryKeyType } from \"./OsdkBase.js\";\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type {\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./queries/Aggregations.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAahE,SAASC,eAAe,QAAQ,4BAA4B;AA8B5D,SAASC,IAAI,QAAQ,oBAAoB;AAoDzC,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
@@ -15,10 +15,6 @@
15
15
  */
16
16
 
17
17
  import { describe, expectTypeOf, it, test, vi } from "vitest";
18
- const Employee = {
19
- type: "object",
20
- apiName: "Employee"
21
- };
22
18
  describe("ObjectSet", () => {
23
19
  const fauxObjectSet = {
24
20
  where: vi.fn(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","Employee","type","apiName","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expectTypeOf, it, test, vi } from \"vitest\";\n\nimport type {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n Osdk,\n PropertyDef as $PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nnamespace Employee {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<Employee>;\n readonly peeps: Employee.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Employee, Employee.ObjectSet> {}\n}\n\ninterface Employee extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n __DefinitionMetadata?: {\n objectSet: Employee.ObjectSet;\n props: Employee.Props;\n linksType: Employee.Links;\n strictProps: Employee.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<Employee, false>;\n peeps: $ObjectMetadata.Link<Employee, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nconst Employee: Employee = {\n type: \"object\",\n apiName: \"Employee\",\n};\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as Employee.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<Employee, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"string\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }>\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {}>\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n Employee,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n Employee,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAiF7D,MAAMC,QAAkB,GAAG;EACzBC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC;AAEDP,QAAQ,CAAC,WAAW,EAAE,MAAM;EAC1B,MAAMQ,aAAa,GAAG;IACpBC,KAAK,EAAEL,EAAE,CAACM,EAAE,CAAC,MAAM;MACjB,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFG,cAAc,EAAEP,EAAE,CAACM,EAAE,CAAC,MAAM;MAC1B,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFI,SAAS,EAAER,EAAE,CAACM,EAAE,CAAC,MAAMG,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC;IACzCC,SAAS,EAAEX,EAAE,CAACM,EAAE,CAAC,MAAM;MACrB,OAAO,CAAC,CAAC;IACX,CAAC;EACH,CAA8B;EAE9BV,QAAQ,CAAC,QAAQ,EA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CAAC,CAACe,aAAa,CAIzC,CAAC;MAEgBR,aAAa,CAACG,cAAc,CAAC;QAC9C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFlB,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAQ5BM,aAAa,CAACG,cAAc,CAAC;QAC3B,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expectTypeOf, it, test, vi } from \"vitest\";\n\nimport type { ObjectSet as $ObjectSet, Osdk, PropertyKeys } from \"../index.js\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as EmployeeApiTest.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"string\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }\n >\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {}\n >\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n EmployeeApiTest,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAK7DJ,QAAQ,CAAC,WAAW,EAAE,MAAM;EAC1B,MAAMK,aAAa,GAAG;IACpBC,KAAK,EAAEF,EAAE,CAACG,EAAE,CAAC,MAAM;MACjB,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFG,cAAc,EAAEJ,EAAE,CAACG,EAAE,CAAC,MAAM;MAC1B,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFI,SAA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AAE,CAAC,4BAA4B,EAAE,MAAM;MACnBG,aAAa,CAACG,cAAc,CAAC;QAC7C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;MAIFhB,YAAY,CAAgB,CAAC,CAACY,aAAa,CAIzC,CAAC;MAEgBR,aAAa,CAACG,cAAc,CAAC;QAC9C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFf,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAQ5BG,aAAa,CAACG,cAAc,CAAC;QAC3B,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ObjectSpecifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSpecifier.js","names":[],"sources":["ObjectSpecifier.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./InterfaceDefinition.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ObjectOrInterface.js\";\n\nexport type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {\n __apiName:\n | Q[\"apiName\"]\n | (Q extends InterfaceDefinition\n ? NonNullable<Q[\"__DefinitionMetadata\"]> extends InterfaceMetadata\n ? NonNullable<\n NonNullable<Q[\"__DefinitionMetadata\"]>[\"implementedBy\"]\n >[number]\n : never\n : never);\n};\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { describe, expectTypeOf, it, vi } from "vitest";
18
+ describe("ObjectSpecifier", () => {
19
+ const fauxObjectSet = {
20
+ fetchOne: vi.fn(() => Promise.resolve(() => ""))
21
+ };
22
+ it("should only work with same Object Specifier", async () => {
23
+ expectTypeOf().toMatchTypeOf();
24
+ const EmployeeApiTest = await fauxObjectSet.fetchOne(123);
25
+ const specifier = EmployeeApiTest.$objectSpecifier;
26
+ expectTypeOf(specifier).toMatchTypeOf();
27
+ expectTypeOf().toMatchTypeOf();
28
+ });
29
+ describe("interfaces", () => {
30
+ const fauxInterfaceObjectSet = {
31
+ fetchPage: vi.fn(() => Promise.resolve({
32
+ data: [""]
33
+ }))
34
+ };
35
+ it("should work with loaded interfaces", async () => {
36
+ expectTypeOf().toMatchTypeOf();
37
+ const FooInterfaceApiTest = await fauxInterfaceObjectSet.fetchPage();
38
+ const specifier = FooInterfaceApiTest.data[0].$objectSpecifier;
39
+ expectTypeOf(specifier).toMatchTypeOf();
40
+ });
41
+ it("should only work with known object types", async () => {
42
+ const EmployeeApiTest = await fauxObjectSet.fetchOne(123);
43
+ const specifier = EmployeeApiTest.$objectSpecifier;
44
+ expectTypeOf(specifier).toMatchTypeOf();
45
+ const FooInterfaceApiTest = (await fauxInterfaceObjectSet.fetchPage()).data[0];
46
+ FooInterfaceApiTest.$objectSpecifier;
47
+ expectTypeOf().toMatchTypeOf();
48
+ expectTypeOf().toMatchTypeOf // @ts-expect-error
49
+ ();
50
+ });
51
+ });
52
+ });
53
+ //# sourceMappingURL=ObjectSpecifier.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSpecifier.test.js","names":["describe","expectTypeOf","it","vi","fauxObjectSet","fetchOne","fn","Promise","resolve","toMatchTypeOf","EmployeeApiTest","specifier","$objectSpecifier","fauxInterfaceObjectSet","fetchPage","data","FooInterfaceApiTest"],"sources":["ObjectSpecifier.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expectTypeOf, it, vi } from \"vitest\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../test/FooInterfaceApiTest.js\";\nimport type { ObjectSpecifier } from \"./ObjectSpecifier.js\";\n\ndescribe(\"ObjectSpecifier\", () => {\n const fauxObjectSet = {\n fetchOne: vi.fn(() => Promise.resolve(() => \"\")),\n } as any as EmployeeApiTest.ObjectSet;\n\n it(\"should only work with same Object Specifier\", async () => {\n type EmployeeObjectSpecifier = ObjectSpecifier<EmployeeApiTest>;\n\n expectTypeOf<EmployeeObjectSpecifier>().toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n const EmployeeApiTest = await fauxObjectSet.fetchOne(123);\n\n const specifier: EmployeeObjectSpecifier = EmployeeApiTest.$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n type NonEmployeeObjectSpecifier = ObjectSpecifier<\n { apiName: \"NotEmployee\"; osdkMetadata: any; type: \"object\" }\n >;\n\n expectTypeOf<NonEmployeeObjectSpecifier>().toMatchTypeOf<\n // @ts-expect-error\n EmployeeObjectId\n >();\n });\n\n describe(\"interfaces\", () => {\n const fauxInterfaceObjectSet = {\n fetchPage: vi.fn(() => Promise.resolve({ data: [\"\"] })),\n } as any as FooInterfaceApiTest.ObjectSet;\n\n it(\"should work with loaded interfaces\", async () => {\n type FooInterfaceObjectSpecifier = ObjectSpecifier<FooInterfaceApiTest>;\n\n expectTypeOf<FooInterfaceObjectSpecifier>().toMatchTypeOf<\n string & { __apiName: \"FooInterface\" | \"Employee\" }\n >();\n\n const FooInterfaceApiTest = await fauxInterfaceObjectSet.fetchPage();\n\n const specifier = FooInterfaceApiTest.data[0].$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"FooInterface\" | \"Employee\" }\n >();\n });\n\n it(\"should only work with known object types\", async () => {\n const EmployeeApiTest = await fauxObjectSet.fetchOne(123);\n\n const specifier = EmployeeApiTest.$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n const FooInterfaceApiTest =\n (await fauxInterfaceObjectSet.fetchPage()).data[0];\n\n const fooInterfaceObjectSpecifier = FooInterfaceApiTest.$objectSpecifier;\n\n expectTypeOf<typeof specifier>().toMatchTypeOf<\n typeof fooInterfaceObjectSpecifier\n >();\n\n type NonEmployeeObjectSpecifier = ObjectSpecifier<\n { apiName: \"NotEmployee\"; osdkMetadata: any; type: \"object\" }\n >;\n\n expectTypeOf<NonEmployeeObjectSp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AAa,CAEnC,CAAC;IACL,CAAC,CAAC;IAEFP,EAAE,CAAC,0CAA0C,EAAE,YAAY;MACzD,MAAMQ,eAAe,GAAG,MAAMN,aAAa,CAACC,QAAQ,CAAC,GAAG,CAAC;MAEzD,MAAMM,SAAS,GAAGD,eAAe,CAACE,gBAAgB;MAElDX,YAAY,CAACU,SAAS,CAAC,CAACF,aAAa,CAEnC,CAAC;MAEH,MAAMO,mBAAmB,GACvB,CAAC,MAAMH,sBAAsB,CAACC,SAAS,CAAC,CAAC,EAAEC,IAAI,CAAC,CAAC,CAAC;MAEhBC,mBAAmB,CAACJ,gBAAgB;MAExEX,YAAY,CAAmB,CAAC,CAACQ,aAAa,CAE5C,CAAC;MAMHR,YAAY,CAA6B,CAAC,CAACQ,aAAa,CAAC;MAAA,CACpB,CAAC;IACxC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectTypeDefinition.js","names":["ObjectMetadata"],"sources":["ObjectTypeDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ObjectOrInterface.js\";\nimport type { PrimaryKeyTypes } from \"./PrimaryKeyTypes.js\";\nimport type { VersionString } from \"./VersionString.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type CompileTimeMetadata<T extends { __DefinitionMetadata?: {} }> =\n NonNullable<\n T[\"__DefinitionMetadata\"]\n >;\n\nexport type ObjectTypePropertyDefinitionFrom2<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][P];\n\nexport type ObjectInterfaceBaseMetadata = {\n type: \"object\" | \"interface\";\n apiName: string;\n displayName: string;\n description?: string;\n properties: Record<any, ObjectMetadata.Property>;\n links: Record<\n string,\n ObjectMetadata.Link<any, any>\n >;\n rid: string;\n /**\n * Represents the \"super interfaces\" of this object.\n *\n * Optional because they may not exist on legacy.\n */\n implements?: ReadonlyArray<string>;\n};\n\nexport interface ObjectInterfaceCompileDefinition {\n type: \"object\" | \"interface\";\n objectSet?: any;\n props?: any;\n strictProps?: any;\n linksType?: any;\n}\n\nexport interface VersionBound<V extends VersionString<any, any, any>> {\n __expectedClientVersion?: V;\n}\n\nexport interface ObjectMetadata extends ObjectInterfaceBaseMetadata {\n type: \"object\";\n primaryKeyApiName: keyof this[\"properties\"];\n titleProperty: keyof this[\"properties\"];\n primaryKeyType: PrimaryKeyTypes;\n icon?: Icon;\n visibility?: ObjectTypeVisibility;\n pluralDisplayName: string;\n status: ReleaseStatus;\n interfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* InterfaceType property api name */ string,\n /* ObjectType property api name */ string\n >\n >;\n inverseInterfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* ObjectType property api name */ string,\n /* InterfaceType property api name */ string\n >\n >;\n}\n\nexport namespace ObjectMetadata {\n export interface Property {\n readonly?: boolean;\n displayName?: string;\n description?: string;\n type: WirePropertyTypes;\n multiplicity?: boolean;\n nullable?: boolean;\n }\n\n export interface Link<\n Q extends ObjectTypeDefinition,\n M extends boolean,\n > {\n __OsdkLinkTargetType?: Q;\n targetType: Q[\"apiName\"];\n multiplicity: M;\n }\n}\n\nexport interface ObjectTypeDefinition {\n type: \"object\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ObjectMetadata\n & ObjectInterfaceCompileDefinition;\n}\n\nexport type ObjectTypeLinkKeysFrom2<\n Q extends ObjectTypeDefinition,\n> =\n & keyof CompileTimeMetadata<Q>[\"links\"]\n & string;\n\nexport interface PropertyDef<\n T extends WirePropertyTypes,\n N extends \"nullable\" | \"non-nullable\" = \"nullable\",\n M extends \"array\" | \"single\" = \"single\",\n> extends ObjectMetadata.Property {\n type: T;\n multiplicity: M extends \"array\" ? true : false;\n nullable: N extends \"nullable\" ? true : false;\n}\n\nexport type ReleaseStatus = \"ACTIVE\" | \"EXPERIMENTAL\" | \"DEPRECATED\";\n\ntype ObjectTypeVisibility = \"NORMAL\" | \"PROMINENT\" | \"HIDDEN\";\n\ntype BlueprintIcon = {\n type: \"blueprint\";\n color: string;\n name: string;\n};\n\ntype Icon = BlueprintIcon;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA2FiBA,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"ObjectTypeDefinition.js","names":["ObjectMetadata"],"sources":["ObjectTypeDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ObjectOrInterface.js\";\nimport type { PrimaryKeyTypes } from \"./PrimaryKeyTypes.js\";\nimport type { VersionString } from \"./VersionString.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type CompileTimeMetadata<T extends { __DefinitionMetadata?: {} }> =\n NonNullable<\n T[\"__DefinitionMetadata\"]\n >;\n\nexport type ObjectTypePropertyDefinitionFrom2<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][P];\n\nexport type ObjectInterfaceBaseMetadata = {\n type: \"object\" | \"interface\";\n apiName: string;\n displayName: string;\n description?: string;\n properties: Record<any, ObjectMetadata.Property>;\n links: Record<\n string,\n ObjectMetadata.Link<any, any>\n >;\n rid: string;\n /**\n * Represents the \"super interfaces\" of this object.\n *\n * Optional because they may not exist on legacy.\n */\n implements?: ReadonlyArray<string>;\n};\n\nexport interface ObjectInterfaceCompileDefinition {\n type: \"object\" | \"interface\";\n objectSet?: any;\n props?: any;\n strictProps?: any;\n linksType?: any;\n}\n\nexport interface VersionBound<V extends VersionString<any, any, any>> {\n __expectedClientVersion?: V;\n}\n\nexport interface ObjectMetadata extends ObjectInterfaceBaseMetadata {\n type: \"object\";\n primaryKeyApiName: keyof this[\"properties\"];\n titleProperty: keyof this[\"properties\"];\n primaryKeyType: PrimaryKeyTypes;\n icon?: Icon;\n visibility?: ObjectTypeVisibility;\n pluralDisplayName: string;\n status: ReleaseStatus;\n interfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* InterfaceType property api name */ string,\n /* ObjectType property api name */ string\n >\n >;\n inverseInterfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* ObjectType property api name */ string,\n /* InterfaceType property api name */ string\n >\n >;\n}\n\nexport namespace ObjectMetadata {\n export interface Property {\n readonly?: boolean;\n displayName?: string;\n description?: string;\n type: WirePropertyTypes;\n multiplicity?: boolean;\n nullable?: boolean;\n }\n\n export interface Link<\n Q extends ObjectTypeDefinition,\n M extends boolean,\n > {\n __OsdkLinkTargetType?: Q;\n targetType: Q[\"apiName\"];\n multiplicity: M;\n }\n}\n\nexport interface ObjectTypeDefinition {\n type: \"object\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ObjectMetadata\n & ObjectInterfaceCompileDefinition;\n}\n\nexport type ObjectTypeLinkKeysFrom2<\n Q extends ObjectTypeDefinition,\n> =\n & keyof CompileTimeMetadata<Q>[\"links\"]\n & string;\n\nexport interface PropertyDef<\n T extends WirePropertyTypes,\n N extends \"nullable\" | \"non-nullable\" = \"nullable\",\n M extends \"array\" | \"single\" = \"single\",\n> extends ObjectMetadata.Property {\n type: T;\n multiplicity: M extends \"array\" ? true : false;\n nullable: N extends \"nullable\" ? true : false;\n}\n\nexport type ReleaseStatus =\n | \"ACTIVE\"\n | \"EXPERIMENTAL\"\n | \"DEPRECATED\"\n | \"ENDORSED\";\n\ntype ObjectTypeVisibility = \"NORMAL\" | \"PROMINENT\" | \"HIDDEN\";\n\ntype BlueprintIcon = {\n type: \"blueprint\";\n color: string;\n name: string;\n};\n\ntype Icon = BlueprintIcon;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA2FiBA,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"QueryDefinition.js","names":[],"sources":["QueryDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { ObjectTypeDefinition } from \"./ObjectTypeDefinition.js\";\n\nexport interface QueryMetadata {\n type: \"query\";\n apiName: string;\n description?: string;\n displayName?: string;\n version: string;\n parameters: Record<string, QueryParameterDefinition<any>>;\n output: QueryDataTypeDefinition;\n rid: string;\n}\n\nexport interface QueryCompileTimeMetadata<T> {\n signature: T;\n}\n\nexport interface QueryDefinition<T = any> {\n type: \"query\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & QueryCompileTimeMetadata<T>\n & QueryMetadata;\n}\n\nexport type QueryParameterDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> = {\n description?: string;\n} & QueryDataTypeDefinition<T_Target>;\n\nexport type QueryDataTypeDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> =\n | PrimitiveDataType\n | ObjectQueryDataType<T_Target>\n | ObjectSetQueryDataType<T_Target>\n | SetQueryDataType\n | UnionQueryDataType\n | StructQueryDataType\n | TwoDimensionalAggregationDataType\n | ThreeDimensionalAggregationDataType;\n\nexport type BaseQueryDataTypeDefinition<T extends string> = {\n multiplicity?: boolean;\n nullable?: boolean;\n type: T;\n};\n\nexport type WireQueryDataTypes =\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"timestamp\"\n | \"attachment\";\n\nexport type PrimitiveDataType<\n Q extends WireQueryDataTypes = WireQueryDataTypes,\n> = BaseQueryDataTypeDefinition<Q>;\n\nexport interface ObjectQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"object\"> {\n object: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface ObjectSetQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"objectSet\"> {\n objectSet: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface SetQueryDataType extends BaseQueryDataTypeDefinition<\"set\"> {\n set: QueryDataTypeDefinition;\n}\n\nexport interface UnionQueryDataType\n extends BaseQueryDataTypeDefinition<\"union\">\n{\n union: ReadonlyArray<QueryDataTypeDefinition>;\n}\n\nexport interface StructQueryDataType\n extends BaseQueryDataTypeDefinition<\"struct\">\n{\n struct: Record<string, QueryDataTypeDefinition>;\n}\n\nexport interface TwoDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"twoDimensionalAggregation\">\n{\n twoDimensionalAggregation: TwoDimensionalQueryAggregationDefinition;\n}\n\nexport interface ThreeDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"threeDimensionalAggregation\">\n{\n threeDimensionalAggregation: ThreeDimensionalQueryAggregationDefinition;\n}\n\nexport type AggregationKeyDataType<V = any> =\n | SimpleAggregationKeyDataType<V>\n | RangeAggregationKeyDataType<V>;\n\nexport interface SimpleAggregationKeyDataType<V = any> {\n keyType: Exclude<AggregationKeyTypes, \"range\">;\n valueType: V;\n}\nexport interface RangeAggregationKeyDataType<V = any> {\n keyType: \"range\";\n keySubtype: AggregationRangeKeyTypes;\n valueType: V;\n}\n\nexport type TwoDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n AggregationValueTypes\n>;\n\nexport type ThreeDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n TwoDimensionalQueryAggregationDefinition\n>;\n\nexport type AggregationKeyTypes =\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\"\n | \"range\";\n\nexport type AggregationRangeKeyTypes =\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\";\n\nexport type AggregationValueTypes = \"date\" | \"double\" | \"timestamp\";\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"QueryDefinition.js","names":[],"sources":["QueryDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { ObjectTypeDefinition } from \"./ObjectTypeDefinition.js\";\n\nexport interface QueryMetadata {\n type: \"query\";\n apiName: string;\n description?: string;\n displayName?: string;\n version: string;\n parameters: Record<string, QueryParameterDefinition<any>>;\n output: QueryDataTypeDefinition;\n rid: string;\n}\n\nexport interface QueryCompileTimeMetadata<T> {\n signature: T;\n}\n\nexport interface QueryDefinition<T = any> {\n type: \"query\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & QueryCompileTimeMetadata<T>\n & QueryMetadata;\n}\n\nexport type QueryParameterDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> = {\n description?: string;\n} & QueryDataTypeDefinition<T_Target>;\n\nexport type QueryDataTypeDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> =\n | PrimitiveDataType\n | ObjectQueryDataType<T_Target>\n | ObjectSetQueryDataType<T_Target>\n | SetQueryDataType\n | UnionQueryDataType\n | StructQueryDataType\n | TwoDimensionalAggregationDataType\n | ThreeDimensionalAggregationDataType\n | MapDataType;\n\nexport type BaseQueryDataTypeDefinition<T extends string> = {\n multiplicity?: boolean;\n nullable?: boolean;\n type: T;\n};\n\nexport type WireQueryDataTypes =\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"timestamp\"\n | \"attachment\";\n\nexport type PrimitiveDataType<\n Q extends WireQueryDataTypes = WireQueryDataTypes,\n> = BaseQueryDataTypeDefinition<Q>;\n\nexport interface ObjectQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"object\"> {\n object: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface ObjectSetQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"objectSet\"> {\n objectSet: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface SetQueryDataType extends BaseQueryDataTypeDefinition<\"set\"> {\n set: QueryDataTypeDefinition;\n}\n\nexport interface UnionQueryDataType\n extends BaseQueryDataTypeDefinition<\"union\">\n{\n union: ReadonlyArray<QueryDataTypeDefinition>;\n}\n\nexport interface StructQueryDataType\n extends BaseQueryDataTypeDefinition<\"struct\">\n{\n struct: Record<string, QueryDataTypeDefinition>;\n}\n\nexport interface TwoDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"twoDimensionalAggregation\">\n{\n twoDimensionalAggregation: TwoDimensionalQueryAggregationDefinition;\n}\n\nexport interface ThreeDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"threeDimensionalAggregation\">\n{\n threeDimensionalAggregation: ThreeDimensionalQueryAggregationDefinition;\n}\n\nexport interface MapDataType extends BaseQueryDataTypeDefinition<\"map\"> {\n keyType: QueryDataTypeDefinition;\n valueType: QueryDataTypeDefinition;\n}\n\nexport type AggregationKeyDataType<V = any> =\n | SimpleAggregationKeyDataType<V>\n | RangeAggregationKeyDataType<V>;\n\nexport interface SimpleAggregationKeyDataType<V = any> {\n keyType: Exclude<AggregationKeyTypes, \"range\">;\n valueType: V;\n}\nexport interface RangeAggregationKeyDataType<V = any> {\n keyType: \"range\";\n keySubtype: AggregationRangeKeyTypes;\n valueType: V;\n}\n\nexport type TwoDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n AggregationValueTypes\n>;\n\nexport type ThreeDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n TwoDimensionalQueryAggregationDefinition\n>;\n\nexport type AggregationKeyTypes =\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\"\n | \"range\";\n\nexport type AggregationRangeKeyTypes =\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\";\n\nexport type AggregationValueTypes = \"date\" | \"double\" | \"timestamp\";\n"],"mappings":"","ignoreList":[]}
@@ -16,5 +16,6 @@
16
16
 
17
17
  export { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from "../experimental/createMediaReference.js";
18
18
  export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from "../experimental/fetchOneByRid.js";
19
+ export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid } from "../experimental/fetchPageByRid.js";
19
20
  export { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from "../experimental/getBulkLinks.js";
20
21
  //# sourceMappingURL=unstable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unstable.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks"],"sources":["unstable.ts"],"sourcesContent":["/*\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 type { Experiment, ExperimentFns } from \"../experimental/Experiment.js\";\n\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \"../experimental/createMediaReference.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from \"../experimental/fetchOneByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from \"../experimental/getBulkLinks.js\";\n\nexport type { EXPERIMENTAL_BulkLinkResult } from \"../objectSet/BulkLinkResult.js\";\nexport type { MinimalObjectSet } from \"../objectSet/ObjectSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,uDAAuD,QAAQ,yCAAyC;AACjH,SAASC,gDAAgD,QAAQ,kCAAkC;AACnG,SAASC,+CAA+C,QAAQ,iCAAiC","ignoreList":[]}
1
+ {"version":3,"file":"unstable.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks"],"sources":["unstable.ts"],"sourcesContent":["/*\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 type { Experiment, ExperimentFns } from \"../experimental/Experiment.js\";\n\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \"../experimental/createMediaReference.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from \"../experimental/fetchOneByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid } from \"../experimental/fetchPageByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from \"../experimental/getBulkLinks.js\";\n\nexport type { EXPERIMENTAL_BulkLinkResult } from \"../objectSet/BulkLinkResult.js\";\nexport type { MinimalObjectSet } from \"../objectSet/ObjectSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,uDAAuD,QAAQ,yCAAyC;AACjH,SAASC,gDAAgD,QAAQ,kCAAkC;AACnG,SAASC,iDAAiD,QAAQ,mCAAmC;AACrG,SAASC,+CAA+C,QAAQ,iCAAiC","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export const EmployeeApiTest = {
18
+ type: "object",
19
+ apiName: "Employee"
20
+ };
21
+ //# sourceMappingURL=EmployeeApiTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmployeeApiTest.js","names":["EmployeeApiTest","type","apiName"],"sources":["EmployeeApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nexport namespace EmployeeApiTest {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<EmployeeApiTest>;\n readonly peeps: EmployeeApiTest.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<EmployeeApiTest, EmployeeApiTest.ObjectSet>\n {}\n}\n\nexport interface EmployeeApiTest extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n __DefinitionMetadata?: {\n objectSet: EmployeeApiTest.ObjectSet;\n props: EmployeeApiTest.Props;\n linksType: EmployeeApiTest.Links;\n strictProps: EmployeeApiTest.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<EmployeeApiTest, false>;\n peeps: $ObjectMetadata.Link<EmployeeApiTest, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nexport const EmployeeApiTest: EmployeeApiTest = {\n type: \"object\",\n apiName: \"Employee\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiFA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export const FooInterfaceApiTest = {
18
+ type: "interface",
19
+ apiName: "FooInterface",
20
+ osdkMetadata: {}
21
+ };
22
+ //# sourceMappingURL=FooInterfaceApiTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooInterfaceApiTest.js","names":["FooInterfaceApiTest","type","apiName","osdkMetadata"],"sources":["FooInterfaceApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n} from \"../index.js\";\n\nexport type OsdkObjectLinks$FooInterface = {};\n\nexport namespace FooInterfaceApiTest {\n export type PropertyKeys = \"name\" | \"description\";\n\n export interface Props {\n readonly description: $PropType[\"string\"] | undefined;\n readonly name: $PropType[\"string\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<FooInterfaceApiTest, FooInterfaceApiTest.ObjectSet>\n {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof FooInterfaceApiTest.Props = keyof FooInterfaceApiTest.Props,\n > = $Osdk.Instance<FooInterfaceApiTest, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof FooInterfaceApiTest.Props = keyof FooInterfaceApiTest.Props,\n > = OsdkInstance<OPTIONS, K>;\n}\n\nexport interface FooInterfaceApiTest extends $InterfaceDefinition {\n osdkMetadata: any;\n type: \"interface\";\n apiName: \"FooInterface\";\n __DefinitionMetadata?: {\n objectSet: FooInterfaceApiTest.ObjectSet;\n props: FooInterfaceApiTest.Props;\n linksType: OsdkObjectLinks$FooInterface;\n strictProps: FooInterfaceApiTest.StrictProps;\n apiName: \"FooInterface\";\n description: \"Its a Foo.\";\n displayName: \"Foo interface\";\n links: {};\n properties: {\n /**\n * display name: 'Description',\n * description: Description of Description\n */\n description: $PropertyDef<\"string\", \"nullable\", \"single\">;\n /**\n * display name: 'Name',\n * description: Name of Foo\n */\n name: $PropertyDef<\"string\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.interface-type.1b1b1b1b-1b1b-1b1b-1b1b-1b1b1b1b1b1b\";\n type: \"interface\";\n implementedBy: [\"Employee\"];\n };\n}\n\nexport const FooInterfaceApiTest: FooInterfaceApiTest = {\n type: \"interface\",\n apiName: \"FooInterface\",\n osdkMetadata: {},\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoEA,OAAO,MAAMA,mBAAwC,GAAG;EACtDC,IAAI,EAAE,WAAW;EACjBC,OAAO,EAAE,cAAc;EACvBC,YAAY,EAAE,CAAC;AACjB,CAAC","ignoreList":[]}
@@ -322,7 +322,7 @@ interface PropertyDef<T extends WirePropertyTypes, N extends "nullable" | "non-n
322
322
  multiplicity: M extends "array" ? true : false;
323
323
  nullable: N extends "nullable" ? true : false;
324
324
  }
325
- type ReleaseStatus = "ACTIVE" | "EXPERIMENTAL" | "DEPRECATED";
325
+ type ReleaseStatus = "ACTIVE" | "EXPERIMENTAL" | "DEPRECATED" | "ENDORSED";
326
326
  type ObjectTypeVisibility = "NORMAL" | "PROMINENT" | "HIDDEN";
327
327
  type BlueprintIcon = {
328
328
  type: "blueprint";
@@ -599,6 +599,10 @@ type SingleOsdkResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyK
599
599
  [K in Extract<keyof RDPs, L>]: RDPs[K];
600
600
  }>;
601
601
 
602
+ type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {
603
+ __apiName: Q["apiName"] | (Q extends InterfaceDefinition ? NonNullable<Q["__DefinitionMetadata"]> extends InterfaceMetadata ? NonNullable<NonNullable<Q["__DefinitionMetadata"]>["implementedBy"]>[number] : never : never);
604
+ };
605
+
602
606
  type OsdkObjectPrimaryKeyType<Q extends ObjectTypeDefinition> = PropertyValueWireToClient[CompileTimeMetadata<Q>["primaryKeyType"]];
603
607
 
604
608
  type OsdkBase<Q extends ObjectOrInterfaceDefinition> = {
@@ -606,6 +610,7 @@ type OsdkBase<Q extends ObjectOrInterfaceDefinition> = {
606
610
  readonly $objectType: string;
607
611
  readonly $primaryKey: PrimaryKeyType<Q>;
608
612
  readonly $title: string | undefined;
613
+ readonly $objectSpecifier: ObjectSpecifier<Q>;
609
614
  };
610
615
  type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> = (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q> : unknown) & PropertyValueWireToClient[PrimaryKeyTypes];
611
616
 
@@ -1151,4 +1156,4 @@ type FilteredPropertyKeys<O extends ObjectOrInterfaceDefinition, T extends WireP
1151
1156
  [K in keyof NonNullable<O["__DefinitionMetadata"]>["properties"]]: NonNullable<O["__DefinitionMetadata"]>["properties"][K]["type"] extends T ? K : never;
1152
1157
  }[keyof NonNullable<O["__DefinitionMetadata"]>["properties"]];
1153
1158
 
1154
- export { ObjectMetadata as $, type Attachment as A, type SelectArgToKeys as B, type FetchPageResult as C, DistanceUnitMapping as D, type SingleOsdkResult as E, type FetchPageArgs as F, type GeoFilterOptions as G, type Media as H, type InterfaceDefinition as I, type MediaMetadata as J, isOk as K, type Result as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type BaseObjectSet as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, ObjectSetSubscription as T, type FilteredPropertyKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type InterfaceMetadata as X, type ObjectOrInterfaceDefinition as Y, type PropertyKeys as Z, type CompileTimeMetadata as _, type AttachmentUpload as a, type PropertyDef as a0, type VersionBound as a1, type BaseWirePropertyTypes as a2, type WirePropertyTypes as a3, type PrimaryKeyType as a4, type ConvertProps as a5, Osdk as a6, type PageResult as a7, TimeseriesDurationMapping as a8, type GeotimeSeriesProperty as a9, type TimeSeriesPoint as aa, type TimeSeriesProperty as ab, type TimeSeriesQuery as ac, type LinkedType as ad, type LinkNames as ae, type ExtractOptions as af, type MinimalObjectSet as ag, type OsdkBase as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type PrimaryKeyTypes as f, type AggregateOpts as g, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as h, type AggregationResultsWithGroups as i, type AggregationResultsWithoutGroups as j, type AggregationClause as k, type AggregationsResults as l, type GeoFilter_Intersects as m, type GeoFilter_Within as n, type PossibleWhereClauseFilters as o, type OsdkObjectPropertyType as p, type OsdkObjectLinksObject as q, DerivedProperty as r, DurationMapping as s, type AllGroupByValues as t, type GroupByClause as u, type GroupByRange as v, type AsyncIterArgs as w, type Augment as x, type Augments as y, type SelectArg as z };
1159
+ export { type CompileTimeMetadata as $, type Attachment as A, type SelectArgToKeys as B, type FetchPageResult as C, DistanceUnitMapping as D, type SingleOsdkResult as E, type FetchPageArgs as F, type GeoFilterOptions as G, type Media as H, type InterfaceDefinition as I, type MediaMetadata as J, isOk as K, type Result as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type BaseObjectSet as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, ObjectSetSubscription as T, type FilteredPropertyKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type InterfaceMetadata as X, type ObjectOrInterfaceDefinition as Y, type PropertyKeys as Z, type ObjectSpecifier as _, type AttachmentUpload as a, ObjectMetadata as a0, type PropertyDef as a1, type VersionBound as a2, type BaseWirePropertyTypes as a3, type WirePropertyTypes as a4, type PrimaryKeyType as a5, type ConvertProps as a6, Osdk as a7, type PageResult as a8, TimeseriesDurationMapping as a9, type GeotimeSeriesProperty as aa, type TimeSeriesPoint as ab, type TimeSeriesProperty as ac, type TimeSeriesQuery as ad, type LinkedType as ae, type LinkNames as af, type ExtractOptions as ag, type MinimalObjectSet as ah, type OsdkBase as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type PrimaryKeyTypes as f, type AggregateOpts as g, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as h, type AggregationResultsWithGroups as i, type AggregationResultsWithoutGroups as j, type AggregationClause as k, type AggregationsResults as l, type GeoFilter_Intersects as m, type GeoFilter_Within as n, type PossibleWhereClauseFilters as o, type OsdkObjectPropertyType as p, type OsdkObjectLinksObject as q, DerivedProperty as r, DurationMapping as s, type AllGroupByValues as t, type GroupByClause as u, type GroupByRange as v, type AsyncIterArgs as w, type Augment as x, type Augments as y, type SelectArg as z };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/aggregate/WhereClause.ts","../../src/mapping/DurationMapping.ts","../../src/groupby/GroupByClause.ts","../../src/object/Result.ts","../../src/timeseries/timeseries.ts"],"names":[],"mappings":";;;AAkBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,YAAc,EAAA,aAAA;AAAA,EACd,aAAe,EAAA,aAAA;AAAA,EACf,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,GAAK,EAAA,QAAA;AAAA,EACL,WAAa,EAAA,YAAA;AAAA,EACb,YAAc,EAAA,YAAA;AAAA,EACd,IAAM,EAAA,YAAA;AAAA,EACN,MAAQ,EAAA,QAAA;AAAA,EACR,QAAU,EAAA,QAAA;AAAA,EACV,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,gBAAA;AAAA,EACjB,cAAgB,EAAA,gBAAA;AAAA,EAChB,gBAAkB,EAAA,gBAAA;AACpB,EAAA;;;ACvBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,KAAO,EAAA,SAAA;AAAA,EACP,SAAW,EAAA,SAAA;AAAA,EACX,KAAO,EAAA,SAAA;AAAA,EACP,QAAU,EAAA,SAAA;AAAA,EACV,SAAW,EAAA,SAAA;AAAA,EACX,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,OAAA;AAAA,EACP,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,QAAA;AAAA,EACP,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AACX,CAAA,CAAA;;;ACpBO,IAAM,eAAkB,GAAA;AAAA,EAC7B,GAAG,mBAAA;AAAA,EACH,SAAW,EAAA,UAAA;AAAA,EACX,UAAY,EAAA,UAAA;AACd,EAAA;;;ACAO,SAAS,KAAK,CAAG,EAAA;AACtB,EAAA,OAAO,OAAW,IAAA,CAAA,CAAA;AACpB,CAAA;;;ACNO,IAAM,yBAA4B,GAAA;AAAA,EACvC,IAAM,EAAA,cAAA;AAAA,EACN,cAAgB,EAAA,cAAA;AAAA,EAChB,GAAG,mBAAA;AACL","file":"index.cjs","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\"\n};\n\n// FIXME we need to represent all types","/*\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 TimeDurationMapping = {\n \"sec\": \"SECONDS\",\n \"seconds\": \"SECONDS\",\n \"min\": \"MINUTES\",\n \"minute\": \"MINUTES\",\n \"minutes\": \"MINUTES\",\n \"hr\": \"HOURS\",\n \"hrs\": \"HOURS\",\n \"hour\": \"HOURS\",\n \"hours\": \"HOURS\",\n \"day\": \"DAYS\",\n \"days\": \"DAYS\",\n \"wk\": \"WEEKS\",\n \"week\": \"WEEKS\",\n \"weeks\": \"WEEKS\",\n \"mos\": \"MONTHS\",\n \"month\": \"MONTHS\",\n \"months\": \"MONTHS\",\n \"yr\": \"YEARS\",\n \"year\": \"YEARS\",\n \"years\": \"YEARS\"\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 { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const DurationMapping = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Check if a result was successfully received\n * @param a - result wrapped value\n * @returns whether a result has a value in it\n */\nexport function isOk(a) {\n return \"value\" in a;\n}\n\n/**\n * Check if a result contains an error value\n * @param a Result wrapped value\n * @returns whether a result has an error in it\n */\nexport function isError(a) {\n return \"error\" in a;\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 { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const TimeseriesDurationMapping = {\n \"ms\": \"MILLISECONDS\",\n \"milliseconds\": \"MILLISECONDS\",\n ...TimeDurationMapping\n};"]}
1
+ {"version":3,"sources":["../../src/aggregate/WhereClause.ts","../../src/mapping/DurationMapping.ts","../../src/groupby/GroupByClause.ts","../../src/object/Result.ts","../../src/timeseries/timeseries.ts"],"names":[],"mappings":";;;AAkBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,YAAc,EAAA,aAAA;AAAA,EACd,aAAe,EAAA,aAAA;AAAA,EACf,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,GAAK,EA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B;;;ACNO,IAAM,yBAA4B,GAAA;AAAA,EACvC,IAAM,EAAA,cAAA;AAAA,EACN,cAAgB,EAAA,cAAA;AAAA,EAChB,GAAG;AACL","file":"index.cjs","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\"\n};\n\n// FIXME we need to represent all types","/*\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 TimeDurationMapping = {\n \"sec\": \"SECONDS\",\n \"seconds\": \"SECONDS\",\n \"min\": \"MINUTES\",\n \"minute\": \"MINUTES\",\n \"minutes\": \"MINUTES\",\n \"hr\": \"HOURS\",\n \"hrs\": \"HOURS\",\n \"hour\": \"HOURS\",\n \"hours\": \"HOURS\",\n \"day\": \"DAYS\",\n \"days\": \"DAYS\",\n \"wk\": \"WEEKS\",\n \"week\": \"WEEKS\",\n \"weeks\": \"WEEKS\",\n \"mos\": \"MONTHS\",\n \"month\": \"MONTHS\",\n \"months\": \"MONTHS\",\n \"yr\": \"YEARS\",\n \"year\": \"YEARS\",\n \"years\": \"YEARS\"\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 { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const DurationMapping = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Check if a result was successfully received\n * @param a - result wrapped value\n * @returns whether a result has a value in it\n */\nexport function isOk(a) {\n return \"value\" in a;\n}\n\n/**\n * Check if a result contains an error value\n * @param a Result wrapped value\n * @returns whether a result has an error in it\n */\nexport function isError(a) {\n return \"error\" in a;\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 { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const TimeseriesDurationMapping = {\n \"ms\": \"MILLISECONDS\",\n \"milliseconds\": \"MILLISECONDS\",\n ...TimeDurationMapping\n};"]}