@osdk/api 2.2.0-beta.9 → 2.2.0-rc.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +149 -0
- package/build/browser/Logger.js +17 -0
- package/build/browser/Logger.js.map +1 -0
- package/build/browser/OsdkBase.js.map +1 -1
- package/build/browser/OsdkObjectFrom.js +2 -4
- package/build/browser/OsdkObjectFrom.js.map +1 -1
- package/build/browser/OsdkObjectFrom.test.js +3 -3
- package/build/browser/OsdkObjectFrom.test.js.map +1 -1
- package/build/browser/actions/Actions.js.map +1 -1
- package/build/browser/aggregate/AggregatableKeys.js.map +1 -1
- package/build/browser/definitions/LinkDefinitions.js.map +1 -1
- package/build/browser/derivedProperties/DerivedProperty.js +16 -1
- package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/browser/derivedProperties/WithPropertiesAggregationOptions.js.map +1 -1
- package/build/browser/experimental/createMediaReference.js.map +1 -1
- package/build/browser/experimental/fetchPageByRid.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/mapping/DataValueMapping.js.map +1 -1
- package/build/browser/object/FetchPageArgs.js +1 -0
- package/build/browser/object/FetchPageArgs.js.map +1 -1
- package/build/browser/object/FetchPageResult.js.map +1 -1
- package/build/browser/objectSet/BulkLinkResult.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +204 -11
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/ontology/ActionDefinition.js.map +1 -1
- package/build/browser/ontology/ObjectOrInterface.js +1 -0
- package/build/browser/ontology/ObjectOrInterface.js.map +1 -1
- package/build/browser/ontology/ObjectSpecifier.js.map +1 -1
- package/build/browser/ontology/PrimaryKeyTypes.js.map +1 -1
- package/build/browser/ontology/QueryDefinition.js.map +1 -1
- package/build/browser/ontology/SimplePropertyDef.js.map +1 -1
- package/build/browser/queries/Queries.js.map +1 -1
- package/build/browser/test/EmployeeApiTest.js.map +1 -1
- package/build/browser/util/IncludeValuesExtending.js +2 -0
- package/build/browser/util/IncludeValuesExtending.js.map +1 -0
- package/build/cjs/{FilteredPropertyKeys-qAMesbuN.d.cts → ObjectSet-BLinzmtM.d.cts} +137 -71
- package/build/cjs/index.d.cts +33 -7
- package/build/cjs/public/unstable.d.cts +5 -5
- package/build/esm/Logger.js +17 -0
- package/build/esm/Logger.js.map +1 -0
- package/build/esm/OsdkBase.js.map +1 -1
- package/build/esm/OsdkObjectFrom.js +2 -4
- package/build/esm/OsdkObjectFrom.js.map +1 -1
- package/build/esm/OsdkObjectFrom.test.js +3 -3
- package/build/esm/OsdkObjectFrom.test.js.map +1 -1
- package/build/esm/actions/Actions.js.map +1 -1
- package/build/esm/aggregate/AggregatableKeys.js.map +1 -1
- package/build/esm/definitions/LinkDefinitions.js.map +1 -1
- package/build/esm/derivedProperties/DerivedProperty.js +16 -1
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/derivedProperties/WithPropertiesAggregationOptions.js.map +1 -1
- package/build/esm/experimental/createMediaReference.js.map +1 -1
- package/build/esm/experimental/fetchPageByRid.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/mapping/DataValueMapping.js.map +1 -1
- package/build/esm/object/FetchPageArgs.js +1 -0
- package/build/esm/object/FetchPageArgs.js.map +1 -1
- package/build/esm/object/FetchPageResult.js.map +1 -1
- package/build/esm/objectSet/BulkLinkResult.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +204 -11
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/ontology/ActionDefinition.js.map +1 -1
- package/build/esm/ontology/ObjectOrInterface.js +1 -0
- package/build/esm/ontology/ObjectOrInterface.js.map +1 -1
- package/build/esm/ontology/ObjectSpecifier.js.map +1 -1
- package/build/esm/ontology/PrimaryKeyTypes.js.map +1 -1
- package/build/esm/ontology/QueryDefinition.js.map +1 -1
- package/build/esm/ontology/SimplePropertyDef.js.map +1 -1
- package/build/esm/queries/Queries.js.map +1 -1
- package/build/esm/test/EmployeeApiTest.js.map +1 -1
- package/build/esm/util/IncludeValuesExtending.js +2 -0
- package/build/esm/util/IncludeValuesExtending.js.map +1 -0
- package/build/types/Logger.d.ts +19 -0
- package/build/types/Logger.d.ts.map +1 -0
- package/build/types/OsdkBase.d.ts +9 -7
- package/build/types/OsdkBase.d.ts.map +1 -1
- package/build/types/OsdkObjectFrom.d.ts +2 -0
- package/build/types/OsdkObjectFrom.d.ts.map +1 -1
- package/build/types/actions/Actions.d.ts +4 -4
- package/build/types/actions/Actions.d.ts.map +1 -1
- package/build/types/aggregate/AggregatableKeys.d.ts +10 -8
- package/build/types/aggregate/AggregatableKeys.d.ts.map +1 -1
- package/build/types/definitions/LinkDefinitions.d.ts +1 -1
- package/build/types/definitions/LinkDefinitions.d.ts.map +1 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts +24 -22
- package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
- package/build/types/derivedProperties/WithPropertiesAggregationOptions.d.ts +6 -3
- package/build/types/derivedProperties/WithPropertiesAggregationOptions.d.ts.map +1 -1
- package/build/types/experimental/createMediaReference.d.ts +2 -3
- package/build/types/experimental/createMediaReference.d.ts.map +1 -1
- package/build/types/experimental/fetchPageByRid.d.ts +1 -1
- package/build/types/experimental/fetchPageByRid.d.ts.map +1 -1
- package/build/types/index.d.ts +43 -43
- package/build/types/index.d.ts.map +1 -1
- package/build/types/mapping/DataValueMapping.d.ts +4 -0
- package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
- package/build/types/object/FetchPageArgs.d.ts +44 -13
- package/build/types/object/FetchPageArgs.d.ts.map +1 -1
- package/build/types/object/FetchPageResult.d.ts +1 -1
- package/build/types/object/FetchPageResult.d.ts.map +1 -1
- package/build/types/objectSet/BulkLinkResult.d.ts +1 -1
- package/build/types/objectSet/ObjectSet.d.ts +106 -32
- package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.test.d.ts +2 -1
- package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -1
- package/build/types/ontology/ActionDefinition.d.ts +1 -1
- package/build/types/ontology/ActionDefinition.d.ts.map +1 -1
- package/build/types/ontology/ObjectOrInterface.d.ts +14 -7
- package/build/types/ontology/ObjectOrInterface.d.ts.map +1 -1
- package/build/types/ontology/ObjectSpecifier.d.ts +2 -1
- package/build/types/ontology/ObjectSpecifier.d.ts.map +1 -1
- package/build/types/ontology/PrimaryKeyTypes.d.ts +1 -1
- package/build/types/ontology/PrimaryKeyTypes.d.ts.map +1 -1
- package/build/types/ontology/QueryDefinition.d.ts +2 -0
- package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
- package/build/types/ontology/SimplePropertyDef.d.ts +4 -4
- package/build/types/ontology/SimplePropertyDef.d.ts.map +1 -1
- package/build/types/public/unstable.d.ts +3 -3
- package/build/types/public/unstable.d.ts.map +1 -1
- package/build/types/queries/Queries.d.ts +2 -2
- package/build/types/queries/Queries.d.ts.map +1 -1
- package/build/types/test/EmployeeApiTest.d.ts +25 -3
- package/build/types/test/EmployeeApiTest.d.ts.map +1 -1
- package/build/types/util/IncludeValuesExtending.d.ts +4 -0
- package/build/types/util/IncludeValuesExtending.d.ts.map +1 -0
- package/package.json +2 -2
- package/build/browser/ontology/FilteredPropertyKeys.js +0 -2
- package/build/browser/ontology/FilteredPropertyKeys.js.map +0 -1
- package/build/esm/ontology/FilteredPropertyKeys.js +0 -2
- package/build/esm/ontology/FilteredPropertyKeys.js.map +0 -1
- package/build/types/ontology/FilteredPropertyKeys.d.ts +0 -6
- package/build/types/ontology/FilteredPropertyKeys.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectOrInterface.js","names":["DerivedObjectOrInterfaceDefinition"],"sources":["ObjectOrInterface.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 { InterfaceDefinition } from \"./InterfaceDefinition.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"ObjectOrInterface.js","names":["DerivedObjectOrInterfaceDefinition","PropertyKeys"],"sources":["ObjectOrInterface.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 { IncludeValuesExtending } from \"../util/IncludeValuesExtending.js\";\nimport type { InterfaceDefinition } from \"./InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"./ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./SimplePropertyDef.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type ObjectOrInterfaceDefinition =\n | ObjectTypeDefinition\n | InterfaceDefinition;\n\nexport namespace DerivedObjectOrInterfaceDefinition {\n export type WithDerivedProperties<\n K extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n > = {\n __DefinitionMetadata: {\n properties: {\n [T in keyof D]: SimplePropertyDef.ToPropertyDef<D[T]>;\n };\n props?: {\n [T in keyof D]: SimplePropertyDef.ToRuntimeProperty<D[T]>;\n };\n } | undefined;\n } & K;\n}\n\nexport type PropertyKeys<\n O extends ObjectOrInterfaceDefinition,\n> =\n & (keyof CompileTimeMetadata<O>[\"properties\"])\n & string;\n\nexport namespace PropertyKeys {\n export type Filtered<\n Q extends ObjectOrInterfaceDefinition,\n T extends WirePropertyTypes,\n > = keyof IncludeValuesExtending<\n CompileTimeMetadata<Q>[\"properties\"],\n { type: T }\n >;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA6BiBA,kCAAkC;AAAA,WAsBlCC,YAAY","ignoreList":[]}
|
|
@@ -1 +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 ?
|
|
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\";\nimport type { CompileTimeMetadata } from \"./ObjectTypeDefinition.js\";\n\nexport type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {\n __apiName:\n | Q[\"apiName\"]\n | (Q extends InterfaceDefinition\n ? CompileTimeMetadata<Q> extends InterfaceMetadata\n ? NonNullable<CompileTimeMetadata<Q>[\"implementedBy\"]>[number]\n : never\n : never);\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimaryKeyTypes.js","names":[],"sources":["PrimaryKeyTypes.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 PrimaryKeyTypes =\n | \"string\"\n | \"datetime\"\n | \"double\"\n | \"
|
|
1
|
+
{"version":3,"file":"PrimaryKeyTypes.js","names":[],"sources":["PrimaryKeyTypes.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 PrimaryKeyTypes =\n | \"string\"\n | \"datetime\"\n | \"double\"\n | \"integer\"\n | \"timestamp\"\n | \"short\"\n | \"long\"\n | \"byte\";\n"],"mappings":"","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 | 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":[]}
|
|
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 version?: string;\n isFixedVersion?: boolean;\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":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimplePropertyDef.js","names":["SimplePropertyDef"],"sources":["SimplePropertyDef.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 { GetClientPropertyValueFromWire } from \"../mapping/PropertyValueMapping.js\";\nimport type { ObjectMetadata, PropertyDef } from \"./ObjectTypeDefinition.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type SimplePropertyDef =\n | WirePropertyTypes\n | undefined\n | Array<WirePropertyTypes>;\n\nexport namespace SimplePropertyDef {\n export type Make<\n T extends WirePropertyTypes,\n N extends
|
|
1
|
+
{"version":3,"file":"SimplePropertyDef.js","names":["SimplePropertyDef"],"sources":["SimplePropertyDef.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 { GetClientPropertyValueFromWire } from \"../mapping/PropertyValueMapping.js\";\nimport type { ObjectMetadata, PropertyDef } from \"./ObjectTypeDefinition.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type SimplePropertyDef =\n | WirePropertyTypes\n | undefined\n | Array<WirePropertyTypes>;\n\nexport namespace SimplePropertyDef {\n export type Make<\n T extends WirePropertyTypes,\n N extends \"nullable\" | \"non-nullable\",\n M extends \"array\" | \"single\",\n > =\n // while it is cleaner to just do this as the union of two conditionals, it\n // actually makes it so that it can't be derived inline which we want\n // to keep things simple so instead of :\n // | (P[\"multiplicity\"] extends true ? Array<P[\"type\"]> : P[\"type\"])\n // | (P[\"nullable\"] extends true ? undefined : never);\n // we do:\n M extends \"array\" ? N extends \"nullable\" ? Array<T> | undefined\n : Array<T>\n : N extends \"nullable\" ? T | undefined\n : T;\n\n export type FromPropertyMetadata<\n P extends ObjectMetadata.Property,\n > = Make<\n P[\"type\"],\n P[\"nullable\"] extends true ? \"nullable\" : \"non-nullable\",\n P[\"multiplicity\"] extends true ? \"array\" : \"single\"\n >;\n\n // exported for testing\n export type ExtractMultiplicity<\n T extends\n | WirePropertyTypes\n | undefined\n | Array<WirePropertyTypes>,\n > = NonNullable<T> extends Array<any> ? \"array\" : \"single\";\n\n // exported for testing\n export type ExtractWirePropertyType<\n T extends SimplePropertyDef,\n > = T extends Array<infer Z> ? NonNullable<Z> : NonNullable<T>;\n\n // exported for testing\n export type ExtractNullable<\n T extends SimplePropertyDef,\n > = [undefined] extends [T] ? \"nullable\"\n : [[undefined]] extends [T] ? \"nullable\"\n : \"non-nullable\";\n\n export type ToPropertyDef<S extends SimplePropertyDef> = PropertyDef<\n SimplePropertyDef.ExtractWirePropertyType<S>,\n SimplePropertyDef.ExtractNullable<S>,\n SimplePropertyDef.ExtractMultiplicity<S>\n >;\n\n export type ExtractRuntimeBaseType<S extends SimplePropertyDef> =\n GetClientPropertyValueFromWire<\n SimplePropertyDef.ExtractWirePropertyType<S>\n >;\n\n export type ToRuntimeProperty<S extends SimplePropertyDef> =\n ExtractMultiplicity<S> extends \"array\"\n ? ExtractNullable<S> extends \"nullable\"\n ? Array<ExtractRuntimeBaseType<S>> | undefined\n : Array<ExtractRuntimeBaseType<S>>\n : ExtractNullable<S> extends \"nullable\"\n ? ExtractRuntimeBaseType<S> | undefined\n : ExtractRuntimeBaseType<S>;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAyBiBA,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Queries.js","names":["QueryParam","QueryResult"],"sources":["Queries.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 DataValueClientToWire,\n DataValueWireToClient,\n} from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { ObjectTypeDefinition } from \"../ontology/ObjectTypeDefinition.js\";\nimport type {\n AggregationKeyTypes,\n AggregationRangeKeyTypes,\n AggregationValueTypes,\n} from \"../ontology/QueryDefinition.js\";\nimport type { OsdkBase } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\nimport type {\n AggKeyClientToWire,\n AggKeyWireToClient,\n AggValueClientToWire,\n AggValueWireToClient,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./Aggregations.js\";\n\n/**\n * Helper types for converting query definition parameter types to typescript types\n */\nexport namespace QueryParam {\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 |
|
|
1
|
+
{"version":3,"file":"Queries.js","names":["QueryParam","QueryResult"],"sources":["Queries.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 DataValueClientToWire,\n DataValueWireToClient,\n} from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { ObjectTypeDefinition } from \"../ontology/ObjectTypeDefinition.js\";\nimport type {\n AggregationKeyTypes,\n AggregationRangeKeyTypes,\n AggregationValueTypes,\n} from \"../ontology/QueryDefinition.js\";\nimport type { ObjectIdentifiers, OsdkBase } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\nimport type {\n AggKeyClientToWire,\n AggKeyWireToClient,\n AggValueClientToWire,\n AggValueWireToClient,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./Aggregations.js\";\n\n/**\n * Helper types for converting query definition parameter types to typescript types\n */\nexport namespace QueryParam {\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 | ObjectIdentifiers<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 export type RangeKey<T extends AggregationRangeKeyTypes> = AggKeyClientToWire<\n \"range\",\n T\n >;\n\n export type TwoDimensionalAggregationType<\n T extends AggregationKeyTypes | RangeKey<any>,\n V extends AggregationValueTypes,\n > = TwoDimensionalAggregation<\n T extends AggregationKeyTypes ? AggKeyClientToWire<T> : T,\n AggValueClientToWire<V>\n >;\n\n export type ThreeDimensionalAggregationType<\n OUT extends AggregationKeyTypes | RangeKey<any>,\n IN extends AggregationKeyTypes | RangeKey<any>,\n V extends AggregationValueTypes,\n > = ThreeDimensionalAggregation<\n OUT extends AggregationKeyTypes ? AggKeyClientToWire<OUT> : OUT,\n IN extends AggregationKeyTypes ? AggKeyClientToWire<IN> : IN,\n AggValueClientToWire<V>\n >;\n}\n\n/**\n * Helper types for converting query result types to typescript types\n */\nexport namespace QueryResult {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueWireToClient[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> = OsdkBase<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<\n T\n >;\n\n export type RangeKey<T extends AggregationRangeKeyTypes> = AggKeyWireToClient<\n \"range\",\n T\n >;\n\n export type TwoDimensionalAggregationType<\n T extends AggregationKeyTypes | RangeKey<any>,\n V extends AggregationValueTypes,\n > = TwoDimensionalAggregation<\n T extends AggregationKeyTypes ? AggKeyWireToClient<T> : T,\n AggValueWireToClient<V>\n >;\n\n export type ThreeDimensionalAggregationType<\n OUT extends AggregationKeyTypes | RangeKey<any>,\n IN extends AggregationKeyTypes | RangeKey<any>,\n V extends AggregationValueTypes,\n > = ThreeDimensionalAggregation<\n OUT extends AggregationKeyTypes ? AggKeyWireToClient<OUT> : OUT,\n IN extends AggregationKeyTypes ? AggKeyWireToClient<IN> : IN,\n AggValueWireToClient<V>\n >;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AACA;AACA;AAFA,WAGiBA,UAAU;AA2C3B;AACA;AACA;AAFA,WAGiBC,WAAW","ignoreList":[]}
|
|
@@ -1 +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 | \"
|
|
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 | \"attachment\"\n | \"geopoint\"\n | \"timeseries\"\n | \"mediaReference\"\n | \"geotimeSeriesReference\"\n | \"isActive\"\n | \"yearsOfExperience\"\n | \"rank\"\n | \"performanceScore\"\n | \"hourlyRate\"\n | \"dateOfJoining\"\n | \"lastUpdated\";\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 readonly attachment: $PropType[\"attachment\"] | undefined;\n readonly geopoint: $PropType[\"geopoint\"] | undefined;\n readonly timeseries: $PropType[\"numericTimeseries\"] | undefined;\n readonly mediaReference: $PropType[\"mediaReference\"] | undefined;\n readonly geotimeSeriesReference:\n | $PropType[\"geotimeSeriesReference\"]\n | undefined;\n readonly isActive: $PropType[\"boolean\"] | undefined;\n readonly yearsOfExperience: $PropType[\"long\"] | undefined;\n readonly rank: $PropType[\"short\"] | undefined;\n readonly performanceScore: $PropType[\"double\"] | undefined;\n readonly hourlyRate: $PropType[\"float\"] | undefined;\n readonly dateOfJoining: $PropType[\"datetime\"] | undefined;\n readonly lastUpdated: $PropType[\"timestamp\"] | 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 attachment: $PropertyDef<\"attachment\", \"nullable\", \"single\">;\n geopoint: $PropertyDef<\"geopoint\", \"nullable\", \"single\">;\n timeseries: $PropertyDef<\"numericTimeseries\", \"nullable\", \"single\">;\n mediaReference: $PropertyDef<\"mediaReference\", \"nullable\", \"single\">;\n geotimeSeriesReference: $PropertyDef<\n \"geotimeSeriesReference\",\n \"nullable\",\n \"single\"\n >;\n isActive: $PropertyDef<\"boolean\", \"nullable\", \"single\">;\n yearsOfExperience: $PropertyDef<\"long\", \"nullable\", \"single\">;\n rank: $PropertyDef<\"short\", \"nullable\", \"single\">;\n performanceScore: $PropertyDef<\"double\", \"nullable\", \"single\">;\n hourlyRate: $PropertyDef<\"float\", \"nullable\", \"single\">;\n dateOfJoining: $PropertyDef<\"datetime\", \"nullable\", \"single\">;\n lastUpdated: $PropertyDef<\"timestamp\", \"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;;AA2HA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IncludeValuesExtending.js","names":[],"sources":["IncludeValuesExtending.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\nexport type IncludeValuesExtending<T extends Record<keyof any, any>, M> = {\n [K in keyof T as T[K] extends M ? K : never]: T[K];\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -56,10 +56,13 @@ interface MediaMetadata {
|
|
|
56
56
|
mediaType: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
type DistinctWithPropAggregateOption = "approximateDistinct" | "exactDistinct";
|
|
59
60
|
type CollectWithPropAggregations = "collectSet" | "collectList";
|
|
60
|
-
type BaseWithPropAggregations =
|
|
61
|
-
type
|
|
62
|
-
type
|
|
61
|
+
type BaseWithPropAggregations = DistinctWithPropAggregateOption | CollectWithPropAggregations;
|
|
62
|
+
type MinMaxWithPropAggregateOption = "min" | "max";
|
|
63
|
+
type DatetimeWithPropAggregateOption = MinMaxWithPropAggregateOption | BaseWithPropAggregations;
|
|
64
|
+
type NumericWithPropAggregateOption = "sum" | "avg" | "approximatePercentile" | MinMaxWithPropAggregateOption | BaseWithPropAggregations;
|
|
65
|
+
type ValidCollectPropertyKeysForSpecialTypes = "attachment" | "geopoint" | "geoshape" | "boolean";
|
|
63
66
|
|
|
64
67
|
type TimeSeriesQuery = {
|
|
65
68
|
$before: number;
|
|
@@ -244,11 +247,15 @@ type GetWirePropertyValueFromClient<T extends keyof PropertyValueClientToWire |
|
|
|
244
247
|
[K in keyof T]: PropertyValueClientToWire[T[K]];
|
|
245
248
|
} : never;
|
|
246
249
|
|
|
250
|
+
type IncludeValuesExtending<T extends Record<keyof any, any>, M> = {
|
|
251
|
+
[K in keyof T as T[K] extends M ? K : never]: T[K];
|
|
252
|
+
};
|
|
253
|
+
|
|
247
254
|
interface OsdkMetadata {
|
|
248
255
|
extraUserAgent: string;
|
|
249
256
|
}
|
|
250
257
|
|
|
251
|
-
type PrimaryKeyTypes = "string" | "datetime" | "double" | "
|
|
258
|
+
type PrimaryKeyTypes = "string" | "datetime" | "double" | "integer" | "timestamp" | "short" | "long" | "byte";
|
|
252
259
|
|
|
253
260
|
type VersionString<Major extends number, Minor extends number, Patch extends number> = `${Major}.${Minor}.${Patch}`;
|
|
254
261
|
|
|
@@ -344,8 +351,8 @@ interface InterfaceDefinition {
|
|
|
344
351
|
|
|
345
352
|
type SimplePropertyDef = WirePropertyTypes | undefined | Array<WirePropertyTypes>;
|
|
346
353
|
declare namespace SimplePropertyDef {
|
|
347
|
-
type Make<T extends WirePropertyTypes, N extends
|
|
348
|
-
type FromPropertyMetadata<P extends ObjectMetadata.Property> = Make<P["type"], P["nullable"], P["multiplicity"]>;
|
|
354
|
+
type Make<T extends WirePropertyTypes, N extends "nullable" | "non-nullable", M extends "array" | "single"> = M extends "array" ? N extends "nullable" ? Array<T> | undefined : Array<T> : N extends "nullable" ? T | undefined : T;
|
|
355
|
+
type FromPropertyMetadata<P extends ObjectMetadata.Property> = Make<P["type"], P["nullable"] extends true ? "nullable" : "non-nullable", P["multiplicity"] extends true ? "array" : "single">;
|
|
349
356
|
type ExtractMultiplicity<T extends WirePropertyTypes | undefined | Array<WirePropertyTypes>> = NonNullable<T> extends Array<any> ? "array" : "single";
|
|
350
357
|
type ExtractWirePropertyType<T extends SimplePropertyDef> = T extends Array<infer Z> ? NonNullable<Z> : NonNullable<T>;
|
|
351
358
|
type ExtractNullable<T extends SimplePropertyDef> = [undefined] extends [T] ? "nullable" : [[undefined]] extends [T] ? "nullable" : "non-nullable";
|
|
@@ -361,19 +368,28 @@ declare namespace DerivedObjectOrInterfaceDefinition {
|
|
|
361
368
|
properties: {
|
|
362
369
|
[T in keyof D]: SimplePropertyDef.ToPropertyDef<D[T]>;
|
|
363
370
|
};
|
|
364
|
-
props
|
|
371
|
+
props?: {
|
|
365
372
|
[T in keyof D]: SimplePropertyDef.ToRuntimeProperty<D[T]>;
|
|
366
373
|
};
|
|
367
|
-
};
|
|
374
|
+
} | undefined;
|
|
368
375
|
} & K;
|
|
369
376
|
}
|
|
370
|
-
type PropertyKeys<O extends ObjectOrInterfaceDefinition
|
|
377
|
+
type PropertyKeys<O extends ObjectOrInterfaceDefinition> = (keyof CompileTimeMetadata<O>["properties"]) & string;
|
|
378
|
+
declare namespace PropertyKeys {
|
|
379
|
+
type Filtered<Q extends ObjectOrInterfaceDefinition, T extends WirePropertyTypes> = keyof IncludeValuesExtending<CompileTimeMetadata<Q>["properties"], {
|
|
380
|
+
type: T;
|
|
381
|
+
}>;
|
|
382
|
+
}
|
|
371
383
|
|
|
372
|
-
type
|
|
373
|
-
type
|
|
374
|
-
type
|
|
384
|
+
type BaseAggregateOptions = "approximateDistinct" | "exactDistinct";
|
|
385
|
+
type MinMaxAggregateOption = "min" | "max";
|
|
386
|
+
type DatetimeAggregateOption = MinMaxAggregateOption | BaseAggregateOptions;
|
|
387
|
+
type NumericAggregateOption = "sum" | "avg" | "approximateDistinct" | "exactDistinct" | MinMaxAggregateOption;
|
|
388
|
+
type AGG_FOR_TYPE<WIRE_TYPE extends WirePropertyTypes> = number extends GetWirePropertyValueFromClient<WIRE_TYPE> ? NumericAggregateOption : WIRE_TYPE extends "datetime" | "timestamp" ? DatetimeAggregateOption : BaseAggregateOptions;
|
|
389
|
+
type WITH_PROPERTIES_AGG_FOR_TYPE<WIRE_TYPE extends WirePropertyTypes> = number extends GetWirePropertyValueFromClient<WIRE_TYPE> ? NumericWithPropAggregateOption : WIRE_TYPE extends "datetime" | "timestamp" ? DatetimeWithPropAggregateOption : WIRE_TYPE extends "string" ? BaseWithPropAggregations : WITH_PROPERTIES_AGG_FOR_SPECIAL_WIRE_TYPE<WIRE_TYPE>;
|
|
390
|
+
type WITH_PROPERTIES_AGG_FOR_SPECIAL_WIRE_TYPE<WIRE_TYPE extends WirePropertyTypes> = WIRE_TYPE extends ValidCollectPropertyKeysForSpecialTypes ? BaseWithPropAggregations : DistinctWithPropAggregateOption;
|
|
375
391
|
type ValidAggregationKeys<Q extends ObjectOrInterfaceDefinition, R extends "aggregate" | "withPropertiesAggregate" = "aggregate"> = keyof ({
|
|
376
|
-
[KK in AggregatableKeys<Q> as `${KK & string}:${AGG_FOR_TYPE<
|
|
392
|
+
[KK in AggregatableKeys<Q> as `${KK & string}:${R extends "aggregate" ? AGG_FOR_TYPE<CompileTimeMetadata<Q>["properties"][KK]["type"]> : WITH_PROPERTIES_AGG_FOR_TYPE<CompileTimeMetadata<Q>["properties"][KK]["type"]>}`]?: any;
|
|
377
393
|
} & {
|
|
378
394
|
$count?: any;
|
|
379
395
|
});
|
|
@@ -527,23 +543,39 @@ type NullabilityAdherence = false | "throw" | "drop";
|
|
|
527
543
|
declare namespace NullabilityAdherence {
|
|
528
544
|
type Default = "throw";
|
|
529
545
|
}
|
|
530
|
-
|
|
546
|
+
declare namespace ObjectSetArgs {
|
|
547
|
+
interface Select<OBJECT_KEYS extends string = never, RDP_KEYS extends string = never> {
|
|
548
|
+
$select?: readonly (OBJECT_KEYS | RDP_KEYS)[];
|
|
549
|
+
$includeRid?: boolean;
|
|
550
|
+
}
|
|
551
|
+
interface OrderBy<L extends string = never> {
|
|
552
|
+
$orderBy?: {
|
|
553
|
+
[K in L]?: "asc" | "desc";
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
interface AsyncIter<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never> extends Select<K, RDP_KEYS>, OrderBy<K> {
|
|
557
|
+
$__UNSTABLE_useOldInterfaceApis?: boolean;
|
|
558
|
+
$includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
|
|
559
|
+
}
|
|
560
|
+
interface FetchPage<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never> extends AsyncIter<Q, K, T, RDP_KEYS> {
|
|
561
|
+
$nextPageToken?: string;
|
|
562
|
+
$pageSize?: number;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
interface SelectArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>, R extends boolean = false, S extends NullabilityAdherence = NullabilityAdherence.Default, RDP_KEYS extends string = never> {
|
|
531
566
|
$select?: readonly L[];
|
|
532
567
|
$includeRid?: R;
|
|
533
568
|
}
|
|
534
|
-
interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends
|
|
535
|
-
$orderBy?: {
|
|
536
|
-
[K in L]?: "asc" | "desc";
|
|
537
|
-
};
|
|
569
|
+
interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>> extends ObjectSetArgs.OrderBy<L> {
|
|
538
570
|
}
|
|
539
571
|
type SelectArgToKeys<Q extends ObjectOrInterfaceDefinition, A extends SelectArg<Q, any, any>> = A extends SelectArg<Q, never> ? PropertyKeys<Q> : A["$select"] extends readonly string[] ? A["$select"][number] : PropertyKeys<Q>;
|
|
540
|
-
interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends
|
|
572
|
+
interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS> {
|
|
541
573
|
$nextPageToken?: string;
|
|
542
574
|
$pageSize?: number;
|
|
543
575
|
}
|
|
544
|
-
interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends
|
|
576
|
+
interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never> extends SelectArg<Q, K, R, S, RDP_KEYS>, OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS> {
|
|
545
577
|
$__UNSTABLE_useOldInterfaceApis?: boolean;
|
|
546
|
-
$includeAllBaseObjectProperties?: T;
|
|
578
|
+
$includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
|
|
547
579
|
}
|
|
548
580
|
type Augment<X extends ObjectOrInterfaceDefinition, T extends string> = {
|
|
549
581
|
[K in CompileTimeMetadata<X>["apiName"]]: T[];
|
|
@@ -575,7 +607,7 @@ type DefaultToFalse<B extends boolean | undefined> = false extends B ? false : u
|
|
|
575
607
|
interface SingleLinkAccessor<T extends ObjectTypeDefinition> {
|
|
576
608
|
/** Load the linked object
|
|
577
609
|
*/
|
|
578
|
-
fetchOne: <const A extends SelectArg<T, PropertyKeys<T>, boolean>>(options?: A) => Promise<A extends FetchPageArgs<T, infer L, infer R, any, infer S> ? Osdk.Instance<T, ExtractOptions<R, S>, L
|
|
610
|
+
fetchOne: <const A extends SelectArg<T, PropertyKeys<T>, boolean>>(options?: A) => Promise<A extends FetchPageArgs<T, infer L, infer R, any, infer S> ? Osdk.Instance<T, ExtractOptions<R, S>, L & PropertyKeys<T>> : Osdk.Instance<T>>;
|
|
579
611
|
/** Load the linked object, with a result wrapper
|
|
580
612
|
*/
|
|
581
613
|
fetchOneWithErrors: <const A extends SelectArg<T, PropertyKeys<T>, boolean>>(options?: A) => Promise<Result<A extends FetchPageArgs<T, infer L, infer R, any, infer S> ? Osdk.Instance<T, ExtractOptions<R, S>, L> : Osdk.Instance<T>>>;
|
|
@@ -592,7 +624,7 @@ type UnionIfTrue<S extends string, UNION_IF_TRUE extends boolean, E extends stri
|
|
|
592
624
|
/**
|
|
593
625
|
* Helper type for converting fetch options into an Osdk object
|
|
594
626
|
*/
|
|
595
|
-
type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean> = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>> : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>>;
|
|
627
|
+
type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean = false> = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>> : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>>;
|
|
596
628
|
/**
|
|
597
629
|
* Helper type for converting fetch options into an Osdk object
|
|
598
630
|
*/
|
|
@@ -601,18 +633,20 @@ type SingleOsdkResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyK
|
|
|
601
633
|
}>;
|
|
602
634
|
|
|
603
635
|
type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {
|
|
604
|
-
__apiName: Q["apiName"] | (Q extends InterfaceDefinition ?
|
|
636
|
+
__apiName: Q["apiName"] | (Q extends InterfaceDefinition ? CompileTimeMetadata<Q> extends InterfaceMetadata ? NonNullable<CompileTimeMetadata<Q>["implementedBy"]>[number] : never : never);
|
|
605
637
|
};
|
|
606
638
|
|
|
607
639
|
type OsdkObjectPrimaryKeyType<Q extends ObjectTypeDefinition> = PropertyValueWireToClient[CompileTimeMetadata<Q>["primaryKeyType"]];
|
|
608
640
|
|
|
609
|
-
|
|
641
|
+
interface ObjectIdentifiers<Q extends ObjectOrInterfaceDefinition> {
|
|
610
642
|
readonly $apiName: Q["apiName"];
|
|
611
|
-
readonly $objectType: string;
|
|
612
643
|
readonly $primaryKey: PrimaryKeyType<Q>;
|
|
613
|
-
|
|
644
|
+
}
|
|
645
|
+
interface OsdkBase<Q extends ObjectOrInterfaceDefinition> extends ObjectIdentifiers<Q> {
|
|
614
646
|
readonly $objectSpecifier: ObjectSpecifier<Q>;
|
|
615
|
-
|
|
647
|
+
readonly $objectType: string;
|
|
648
|
+
readonly $title: string | undefined;
|
|
649
|
+
}
|
|
616
650
|
type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> = (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q> : unknown) & PropertyValueWireToClient[PrimaryKeyTypes];
|
|
617
651
|
|
|
618
652
|
type SpecialOsdkPropParams = "$all" | "$rid" | "$strict" | "$notStrict";
|
|
@@ -624,6 +658,8 @@ type MapPropNamesToObjectType<FROM extends ObjectOrInterfaceDefinition, TO exten
|
|
|
624
658
|
type PropMapToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition> = NonNullable<CompileTimeMetadata<FROM>["inverseInterfaceMap"]>[ApiNameAsString<TO>];
|
|
625
659
|
type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition, P extends ValidOsdkPropParams<FROM>> = PropMapToInterface<FROM, TO>[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>];
|
|
626
660
|
/**
|
|
661
|
+
* Older version of this helper that allows for `$rid` and co in
|
|
662
|
+
* the properties field.
|
|
627
663
|
* @param FROM - the interface or object type to convert from
|
|
628
664
|
* @param TO - the interface or object type to convert to
|
|
629
665
|
* @param P - the property(s) to convert
|
|
@@ -910,37 +946,36 @@ type WhereClause<T extends ObjectOrInterfaceDefinition> = OrWhereClause<T> | And
|
|
|
910
946
|
type LinkNames<Q extends ObjectOrInterfaceDefinition> = keyof CompileTimeMetadata<Q>["links"] & string;
|
|
911
947
|
type LinkedType<Q extends ObjectOrInterfaceDefinition, L extends LinkNames<Q>> = NonNullable<CompileTimeMetadata<Q>["links"][L]["__OsdkLinkTargetType"]>;
|
|
912
948
|
|
|
949
|
+
declare const DerivedPropertyDefinitionBrand: unique symbol;
|
|
913
950
|
declare namespace DerivedProperty {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
}
|
|
917
|
-
type Clause<Q extends ObjectOrInterfaceDefinition> = {
|
|
918
|
-
[key: string]:
|
|
951
|
+
export interface Definition<T extends SimplePropertyDef, Q extends ObjectOrInterfaceDefinition> {
|
|
952
|
+
readonly [DerivedPropertyDefinitionBrand]: true;
|
|
953
|
+
}
|
|
954
|
+
export type Clause<Q extends ObjectOrInterfaceDefinition> = {
|
|
955
|
+
[key: string]: DerivedPropertyCreator<Q, SimplePropertyDef>;
|
|
919
956
|
};
|
|
920
|
-
|
|
921
|
-
interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
|
|
957
|
+
interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
|
|
922
958
|
}
|
|
923
|
-
interface
|
|
959
|
+
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED> {
|
|
924
960
|
}
|
|
925
|
-
interface
|
|
961
|
+
export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
|
|
926
962
|
}
|
|
963
|
+
export { };
|
|
927
964
|
}
|
|
928
|
-
type
|
|
965
|
+
type DerivedPropertyCreator<Q extends ObjectOrInterfaceDefinition, T extends SimplePropertyDef> = (baseObjectSet: DerivedProperty.Builder<Q, false>) => DerivedProperty.Definition<T, Q>;
|
|
966
|
+
type BuilderTypeFromConstraint<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true> : DerivedProperty.AggregateBuilder<Q, false>;
|
|
929
967
|
type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
930
968
|
readonly where: (clause: WhereClause<Q>) => BuilderTypeFromConstraint<Q, CONSTRAINED>;
|
|
931
969
|
};
|
|
932
970
|
type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
933
|
-
readonly pivotTo: <L extends LinkNames<Q>>(type: L) => CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : NonNullable<CompileTimeMetadata<Q>["links"][L]["multiplicity"]> extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : DerivedProperty.
|
|
971
|
+
readonly pivotTo: <L extends LinkNames<Q>>(type: L) => CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : NonNullable<CompileTimeMetadata<Q>["links"][L]["multiplicity"]> extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : DerivedProperty.AggregateBuilder<LinkedType<Q, L>, false>;
|
|
934
972
|
};
|
|
935
973
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
936
974
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
937
975
|
limit: number;
|
|
938
976
|
} : P extends "approximatePercentile" ? {
|
|
939
977
|
percentile: number;
|
|
940
|
-
} : never : never) => DerivedProperty.
|
|
941
|
-
};
|
|
942
|
-
type Selectable<Q extends ObjectOrInterfaceDefinition> = {
|
|
943
|
-
readonly selectProperty: <R extends PropertyKeys<Q>>(propertyName: R) => DerivedProperty.SelectorResult<SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][R]["type"], CompileTimeMetadata<Q>["properties"][R]["nullable"], CompileTimeMetadata<Q>["properties"][R]["multiplicity"]>>;
|
|
978
|
+
} : never : never) => DerivedProperty.Definition<V extends `${infer N}:${infer P}` ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][N]["type"], "nullable", "array"> : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][N]["type"], "nullable", "single"> : P extends "approximateDistinct" | "exactDistinct" ? SimplePropertyDef.Make<"integer", "non-nullable", "single"> : SimplePropertyDef.Make<"double", "nullable", "single"> : V extends "$count" ? SimplePropertyDef.Make<"integer", "non-nullable", "single"> : never, Q>;
|
|
944
979
|
};
|
|
945
980
|
|
|
946
981
|
interface BaseObjectSet<Q extends ObjectOrInterfaceDefinition> {
|
|
@@ -987,11 +1022,28 @@ type ObjectUpdate<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<
|
|
|
987
1022
|
state: "ADDED_OR_UPDATED" | "REMOVED";
|
|
988
1023
|
};
|
|
989
1024
|
|
|
990
|
-
type MergeObjectSet<Q extends ObjectOrInterfaceDefinition, D extends
|
|
991
|
-
type ExtractRdp<D extends
|
|
1025
|
+
type MergeObjectSet<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef> = {}> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;
|
|
1026
|
+
type ExtractRdp<D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>> = [D] extends [never] ? {} : D extends BaseObjectSet<any> ? {} : D extends Record<string, SimplePropertyDef> ? D : {};
|
|
1027
|
+
type SubSelectKeysHelper<Q extends ObjectOrInterfaceDefinition, L extends string> = [L] extends [never] ? PropertyKeys<Q> : PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;
|
|
1028
|
+
type SubSelectKeys<Q extends ObjectOrInterfaceDefinition, X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never> = SubSelectKeysHelper<Q, Extract$Select<X>>;
|
|
1029
|
+
type NOOP<T> = T extends (...args: any[]) => any ? T : T extends abstract new (...args: any[]) => any ? T : {
|
|
1030
|
+
[K in keyof T]: T[K];
|
|
1031
|
+
};
|
|
1032
|
+
type SubSelectRDPsHelper<X extends ValidFetchPageArgs<any, any> | ValidAsyncIterArgs<any, any>, DEFAULT extends string> = [X] extends [never] ? DEFAULT : (X["$select"] & string[])[number] & DEFAULT;
|
|
1033
|
+
type SubSelectRDPs<RDPs extends Record<string, SimplePropertyDef>, X extends ValidFetchPageArgs<any, RDPs> | ValidAsyncIterArgs<any, RDPs>> = [RDPs] extends [never] ? never : NOOP<{
|
|
1034
|
+
[K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K];
|
|
1035
|
+
}>;
|
|
992
1036
|
interface MinimalObjectSet<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> extends BaseObjectSet<Q>, FetchPage<Q, RDPs>, AsyncIter<Q, RDPs>, Where<Q, RDPs> {
|
|
993
1037
|
}
|
|
1038
|
+
type ExtractOptions2<X extends FetchPageArgs<any, any, any, any, any, any, any>> = [X] extends [never] ? never : ExtractRidOption<X["$includeRid"] extends true ? true : false> | ExtractAllPropertiesOption<X["$includeAllBaseObjectProperties"] extends true ? true : false>;
|
|
1039
|
+
type Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<X["$select"]>[number];
|
|
994
1040
|
interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1041
|
+
readonly fetchPage: FetchPageSignature<Q, RDPs>;
|
|
1042
|
+
readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;
|
|
1043
|
+
}
|
|
1044
|
+
type ValidFetchPageArgs<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>> = ObjectSetArgs.FetchPage<Q, PropertyKeys<Q>, boolean, string & keyof RDPs>;
|
|
1045
|
+
type ValidAsyncIterArgs<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>> = ObjectSetArgs.AsyncIter<Q, PropertyKeys<Q>, false, string & keyof RDPs> | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;
|
|
1046
|
+
interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
995
1047
|
/**
|
|
996
1048
|
* Gets a page of objects of this type, with a result wrapper
|
|
997
1049
|
* @param args - Args to specify next page token and page size, if applicable
|
|
@@ -1004,9 +1056,9 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
|
|
|
1004
1056
|
|
|
1005
1057
|
* @returns a page of objects
|
|
1006
1058
|
*/
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1059
|
+
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>>>;
|
|
1060
|
+
}
|
|
1061
|
+
interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1010
1062
|
/**
|
|
1011
1063
|
* Gets a page of objects of this type, with a result wrapper
|
|
1012
1064
|
* @param args - Args to specify next page token and page size, if applicable
|
|
@@ -1021,9 +1073,7 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
|
|
|
1021
1073
|
}
|
|
1022
1074
|
* @returns a page of objects, wrapped in a result wrapper
|
|
1023
1075
|
*/
|
|
1024
|
-
|
|
1025
|
-
[K in Extract<keyof RDPs, L>]: RDPs[K];
|
|
1026
|
-
}>>>>;
|
|
1076
|
+
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>>>>;
|
|
1027
1077
|
}
|
|
1028
1078
|
interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1029
1079
|
/**
|
|
@@ -1038,7 +1088,16 @@ interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<strin
|
|
|
1038
1088
|
*/
|
|
1039
1089
|
readonly where: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => this;
|
|
1040
1090
|
}
|
|
1041
|
-
interface
|
|
1091
|
+
interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1092
|
+
/**
|
|
1093
|
+
* Returns an async iterator to load all objects of this type
|
|
1094
|
+
* @example
|
|
1095
|
+
* for await (const obj of myObjectSet.asyncIter()){
|
|
1096
|
+
* // Handle obj
|
|
1097
|
+
* }
|
|
1098
|
+
* @returns an async iterator to load all objects
|
|
1099
|
+
*/
|
|
1100
|
+
<X extends ValidAsyncIterArgs<Q, RDPs> = never>(args?: X): AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>;
|
|
1042
1101
|
/**
|
|
1043
1102
|
* Returns an async iterator to load all objects of this type
|
|
1044
1103
|
* @example
|
|
@@ -1047,18 +1106,19 @@ interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
|
|
|
1047
1106
|
* }
|
|
1048
1107
|
* @returns an async iterator to load all objects
|
|
1049
1108
|
*/
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1109
|
+
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: AsyncIterArgs<Q, L, R, A, S, T>): AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>>;
|
|
1110
|
+
}
|
|
1111
|
+
interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1112
|
+
asyncIter: AsyncIterSignature<Q, RDPs>;
|
|
1053
1113
|
}
|
|
1054
1114
|
interface WithProperties<Q extends ObjectOrInterfaceDefinition = any, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1055
1115
|
readonly withProperties: <NEW extends Record<string, SimplePropertyDef>>(clause: {
|
|
1056
|
-
[K in keyof NEW]:
|
|
1116
|
+
[K in keyof NEW]: DerivedPropertyCreator<Q, NEW[K]>;
|
|
1057
1117
|
}) => ObjectSet<Q, {
|
|
1058
1118
|
[NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN] : NN extends keyof RDPs ? RDPs[NN] : never;
|
|
1059
1119
|
}>;
|
|
1060
1120
|
}
|
|
1061
|
-
interface ObjectSet<Q extends ObjectOrInterfaceDefinition = any, UNUSED_OR_RDP extends
|
|
1121
|
+
interface ObjectSet<Q extends ObjectOrInterfaceDefinition = any, UNUSED_OR_RDP extends BaseObjectSet<Q> | Record<string, SimplePropertyDef> = never> extends ObjectSetCleanedTypes<Q, ExtractRdp<UNUSED_OR_RDP>, MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>> {
|
|
1062
1122
|
}
|
|
1063
1123
|
interface Aggregate<Q extends ObjectOrInterfaceDefinition> {
|
|
1064
1124
|
/**
|
|
@@ -1124,21 +1184,31 @@ interface PivotTo<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1124
1184
|
* @param type - The linked object type you want to pivot to
|
|
1125
1185
|
* @returns an object set of the specified linked type
|
|
1126
1186
|
*/
|
|
1127
|
-
readonly pivotTo: <L extends LinkNames<Q>>(type: L) =>
|
|
1187
|
+
readonly pivotTo: <L extends LinkNames<Q>>(type: L) => ObjectSet<LinkedType<Q, L>>;
|
|
1128
1188
|
}
|
|
1129
|
-
interface
|
|
1189
|
+
interface FetchOneSignature<Q extends ObjectTypeDefinition, RDPs extends Record<string, SimplePropertyDef>> {
|
|
1130
1190
|
/**
|
|
1131
1191
|
* Fetches one object with the specified primary key, without a result wrapper
|
|
1132
1192
|
*/
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
}
|
|
1193
|
+
<const L extends PropertyKeys<Q> | (string & keyof RDPs), const R extends boolean, const S extends false | "throw" = NullabilityAdherence.Default>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>): Promise<Osdk.Instance<Q, ExtractOptions<R, S>, NoInfer<SubSelectKeys<Q, {
|
|
1194
|
+
$select: Array<L>;
|
|
1195
|
+
}>>, SubSelectRDPs<RDPs, {
|
|
1196
|
+
$select: Array<L>;
|
|
1197
|
+
}>>>;
|
|
1198
|
+
}
|
|
1199
|
+
interface FetchOneWithErrorsSignature<Q extends ObjectTypeDefinition, RDPs extends Record<string, SimplePropertyDef>> {
|
|
1136
1200
|
/**
|
|
1137
1201
|
* Fetches one object with the specified primary key, with a result wrapper
|
|
1138
1202
|
*/
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
}
|
|
1203
|
+
<const L extends PropertyKeys<Q> | (string & keyof RDPs), const R extends boolean, const S extends false | "throw" = NullabilityAdherence.Default>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>): Promise<Result<Osdk.Instance<Q, ExtractOptions<R, S>, NoInfer<SubSelectKeys<Q, {
|
|
1204
|
+
$select: Array<L>;
|
|
1205
|
+
}>>, SubSelectRDPs<RDPs, {
|
|
1206
|
+
$select: Array<L>;
|
|
1207
|
+
}>>>>;
|
|
1208
|
+
}
|
|
1209
|
+
interface FetchOne<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>> {
|
|
1210
|
+
fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;
|
|
1211
|
+
fetchOneWithErrors: Q extends ObjectTypeDefinition ? FetchOneWithErrorsSignature<Q, RDPs> : never;
|
|
1142
1212
|
}
|
|
1143
1213
|
interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
|
|
1144
1214
|
/**
|
|
@@ -1151,11 +1221,7 @@ interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1151
1221
|
unsubscribe: () => void;
|
|
1152
1222
|
};
|
|
1153
1223
|
}
|
|
1154
|
-
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<
|
|
1224
|
+
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED> {
|
|
1155
1225
|
}
|
|
1156
1226
|
|
|
1157
|
-
type
|
|
1158
|
-
[K in keyof NonNullable<O["__DefinitionMetadata"]>["properties"]]: NonNullable<O["__DefinitionMetadata"]>["properties"][K]["type"] extends T ? K : never;
|
|
1159
|
-
}[keyof NonNullable<O["__DefinitionMetadata"]>["properties"]];
|
|
1160
|
-
|
|
1161
|
-
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 };
|
|
1227
|
+
export { type ObjectSpecifier as $, type AttachmentUpload as A, type SelectArg as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type SelectArgToKeys as E, type FetchPageArgs as F, type GeoFilterOptions as G, type FetchPageResult as H, type InterfaceDefinition as I, type SingleOsdkResult as J, type Media as K, type MediaMetadata as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, isOk as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type Result as T, type BaseObjectSet as U, type ValidAggregationKeys as V, type WhereClause as W, ObjectSetSubscription as X, type InterfaceMetadata as Y, type ObjectOrInterfaceDefinition as Z, PropertyKeys as _, type Attachment 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 ObjectIdentifiers as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type PrimaryKeyTypes as f, type OsdkBase as g, type AggregateOpts as h, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as i, type AggregationResultsWithGroups as j, type AggregationResultsWithoutGroups as k, type AggregationClause as l, type AggregationsResults as m, type GeoFilter_Intersects as n, type GeoFilter_Within as o, type PossibleWhereClauseFilters as p, type OsdkObjectPropertyType as q, type OsdkObjectLinksObject as r, DerivedProperty as s, DurationMapping as t, type AllGroupByValues as u, type GroupByClause as v, type GroupByRange as w, type AsyncIterArgs as x, type Augment as y, type Augments as z };
|