@osdk/api 2.6.0-rc.14 → 2.7.0-beta.1
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 +0 -9
- package/build/browser/OsdkObjectFrom.js.map +1 -1
- package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +22 -0
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/ontology/ObjectTypeDefinition.js.map +1 -1
- package/build/browser/ontology/valueFormatting/PropertyBooleanFormattingRule.js +2 -0
- package/build/browser/ontology/valueFormatting/PropertyBooleanFormattingRule.js.map +1 -0
- package/build/browser/ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js +2 -0
- package/build/browser/ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js.map +1 -0
- package/build/browser/ontology/valueFormatting/PropertyKnownTypeFormattingRule.js +2 -0
- package/build/browser/ontology/valueFormatting/PropertyKnownTypeFormattingRule.js.map +1 -0
- package/build/browser/ontology/valueFormatting/PropertyNumberFormattingRule.js +2 -0
- package/build/browser/ontology/valueFormatting/PropertyNumberFormattingRule.js.map +1 -0
- package/build/browser/ontology/valueFormatting/PropertyValueFormattingRule.js +2 -0
- package/build/browser/ontology/valueFormatting/PropertyValueFormattingRule.js.map +1 -0
- package/build/browser/ontology/valueFormatting/PropertyValueFormattingUtils.js +2 -0
- package/build/browser/ontology/valueFormatting/PropertyValueFormattingUtils.js.map +1 -0
- package/build/cjs/{ObjectSet-DMlVNQym.d.cts → ObjectSet-Dtb6G0ll.d.cts} +203 -2
- package/build/cjs/index.d.cts +2 -2
- package/build/cjs/public/unstable.d.cts +2 -2
- package/build/esm/OsdkObjectFrom.js.map +1 -1
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +22 -0
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/ontology/ObjectTypeDefinition.js.map +1 -1
- package/build/esm/ontology/valueFormatting/PropertyBooleanFormattingRule.js +2 -0
- package/build/esm/ontology/valueFormatting/PropertyBooleanFormattingRule.js.map +1 -0
- package/build/esm/ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js +2 -0
- package/build/esm/ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js.map +1 -0
- package/build/esm/ontology/valueFormatting/PropertyKnownTypeFormattingRule.js +2 -0
- package/build/esm/ontology/valueFormatting/PropertyKnownTypeFormattingRule.js.map +1 -0
- package/build/esm/ontology/valueFormatting/PropertyNumberFormattingRule.js +2 -0
- package/build/esm/ontology/valueFormatting/PropertyNumberFormattingRule.js.map +1 -0
- package/build/esm/ontology/valueFormatting/PropertyValueFormattingRule.js +2 -0
- package/build/esm/ontology/valueFormatting/PropertyValueFormattingRule.js.map +1 -0
- package/build/esm/ontology/valueFormatting/PropertyValueFormattingUtils.js +2 -0
- package/build/esm/ontology/valueFormatting/PropertyValueFormattingUtils.js.map +1 -0
- package/build/types/OsdkObjectFrom.d.ts +4 -0
- package/build/types/OsdkObjectFrom.d.ts.map +1 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts +10 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
- package/build/types/index.d.ts +6 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/ontology/ObjectTypeDefinition.d.ts +2 -0
- package/build/types/ontology/ObjectTypeDefinition.d.ts.map +1 -1
- package/build/types/ontology/valueFormatting/PropertyBooleanFormattingRule.d.ts +5 -0
- package/build/types/ontology/valueFormatting/PropertyBooleanFormattingRule.d.ts.map +1 -0
- package/build/types/ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.d.ts +37 -0
- package/build/types/ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.d.ts.map +1 -0
- package/build/types/ontology/valueFormatting/PropertyKnownTypeFormattingRule.d.ts +8 -0
- package/build/types/ontology/valueFormatting/PropertyKnownTypeFormattingRule.d.ts.map +1 -0
- package/build/types/ontology/valueFormatting/PropertyNumberFormattingRule.d.ts +117 -0
- package/build/types/ontology/valueFormatting/PropertyNumberFormattingRule.d.ts.map +1 -0
- package/build/types/ontology/valueFormatting/PropertyValueFormattingRule.d.ts +8 -0
- package/build/types/ontology/valueFormatting/PropertyValueFormattingRule.d.ts.map +1 -0
- package/build/types/ontology/valueFormatting/PropertyValueFormattingUtils.d.ts +12 -0
- package/build/types/ontology/valueFormatting/PropertyValueFormattingUtils.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -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 | undefined;\n properties: Record<any, ObjectMetadata.Property>;\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 links: Record<\n string,\n ObjectMetadata.Link<any, any>\n >;\n primaryKeyType: PrimaryKeyTypes;\n icon: Icon | undefined;\n visibility: ObjectTypeVisibility | undefined;\n pluralDisplayName: string;\n status: ReleaseStatus | undefined;\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 valueTypeApiName?: string;\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 ObjectOrInterfaceDefinition,\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,
|
|
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 { PropertyValueFormattingRule } from \"./valueFormatting/PropertyValueFormattingRule.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 | undefined;\n properties: Record<any, ObjectMetadata.Property>;\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 links: Record<\n string,\n ObjectMetadata.Link<any, any>\n >;\n primaryKeyType: PrimaryKeyTypes;\n icon: Icon | undefined;\n visibility: ObjectTypeVisibility | undefined;\n pluralDisplayName: string;\n status: ReleaseStatus | undefined;\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 valueTypeApiName?: string;\n valueFormatting?: PropertyValueFormattingRule;\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 ObjectOrInterfaceDefinition,\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,WA4FiBA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyBooleanFormattingRule.js","names":[],"sources":["PropertyBooleanFormattingRule.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 interface PropertyBooleanFormattingRule {\n type: \"boolean\";\n valueIfTrue: string;\n valueIfFalse: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyDateAndTimestampFormattingRule.js","names":[],"sources":["PropertyDateAndTimestampFormattingRule.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 { PropertyTypeReferenceOrStringConstant } from \"./PropertyValueFormattingUtils.js\";\n\nexport interface PropertyDateFormattingRule {\n type: \"date\";\n format: DatetimeFormat;\n}\n\nexport interface PropertyTimestampFormattingRule {\n type: \"timestamp\";\n format: DatetimeFormat;\n displayTimezone: DatetimeTimezone;\n}\n\nexport type DatetimeFormat = DatetimeStringFormat | DatetimeLocalizedFormat;\n\n/**\n * A custom date format pattern.\n */\nexport interface DatetimeStringFormat {\n type: \"stringFormat\";\n pattern: string;\n}\n\n/**\n * Predefined localized date/time formats.\n */\nexport interface DatetimeLocalizedFormat {\n type: \"localizedFormat\";\n format: DatetimeLocalizedFormatType;\n}\n\nexport type DatetimeLocalizedFormatType =\n | \"DATE_FORMAT_RELATIVE_TO_NOW\"\n | \"DATE_FORMAT_DATE\"\n | \"DATE_FORMAT_YEAR_AND_MONTH\"\n | \"DATE_FORMAT_DATE_TIME\"\n | \"DATE_FORMAT_DATE_TIME_SHORT\"\n | \"DATE_FORMAT_TIME\"\n | \"DATE_FORMAT_ISO_INSTANT\";\n\nexport type DatetimeTimezone = DatetimeTimezoneStatic | DatetimeTimezoneUser;\n\nexport interface DatetimeTimezoneStatic {\n type: \"static\";\n zoneId: PropertyTypeReferenceOrStringConstant;\n}\n\n/**\n * Use the user's local timezone.\n */\nexport interface DatetimeTimezoneUser {\n type: \"user\";\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyKnownTypeFormattingRule.js","names":[],"sources":["PropertyKnownTypeFormattingRule.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 interface PropertyKnownTypeFormattingRule {\n type: \"knownType\";\n knownType: KnownType;\n}\n\n/**\n * Known Foundry types with specialized formatting.\n */\nexport type KnownType = \"USER_OR_GROUP_ID\" | \"RESOURCE_RID\" | \"ARTIFACT_GID\";\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyNumberFormattingRule.js","names":[],"sources":["PropertyNumberFormattingRule.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 { PropertyTypeReferenceOrStringConstant } from \"./PropertyValueFormattingUtils.js\";\n\nexport interface PropertyNumberFormattingRule {\n type: \"number\";\n numberType: PropertyNumberFormattingRuleType;\n}\n\nexport type PropertyNumberFormattingRuleType =\n | NumberFormatStandard\n | NumberFormatFixedValues\n | NumberFormatCurrency\n | NumberFormatStandardUnit\n | NumberFormatCustomUnit\n | NumberFormatAffix\n | NumberFormatDuration\n | NumberFormatScale\n | NumberFormatRatio;\n\n/**\n * Base number formatting options.\n */\nexport interface NumberFormatOptions {\n useGrouping?: boolean;\n convertNegativeToParenthesis?: boolean;\n minimumIntegerDigits?: number;\n minimumFractionDigits?: number;\n maximumFractionDigits?: number;\n minimumSignificantDigits?: number;\n maximumSignificantDigits?: number;\n notation?: NumberFormatNotation;\n roundingMode?: NumberRoundingMode;\n}\n\n/**\n * Number notation style.\n */\nexport type NumberFormatNotation =\n | \"STANDARD\"\n | \"SCIENTIFIC\"\n | \"ENGINEERING\"\n | \"COMPACT\";\n\n/**\n * Number rounding behavior.\n */\nexport type NumberRoundingMode = \"CEIL\" | \"FLOOR\" | \"ROUND_CLOSEST\";\n\n/**\n * Standard number formatting with configurable options.\n */\nexport interface NumberFormatStandard {\n type: \"standard\";\n baseFormatOptions: NumberFormatOptions;\n}\n\n/**\n * Map integer values to custom strings.\n */\nexport interface NumberFormatFixedValues {\n type: \"fixedValues\";\n values: Record<number, string>;\n}\n\n/**\n * Format numbers as currency values.\n */\nexport interface NumberFormatCurrency {\n type: \"currency\";\n baseFormatOptions: NumberFormatOptions;\n style: NumberFormatCurrencyStyle;\n currencyCode: PropertyTypeReferenceOrStringConstant;\n}\n\nexport type NumberFormatCurrencyStyle = \"STANDARD\" | \"COMPACT\";\n\n/**\n * Format numbers with standard units supported by Intl.NumberFormat.\n */\nexport interface NumberFormatStandardUnit {\n type: \"standardUnit\";\n baseFormatOptions: NumberFormatOptions;\n unit: PropertyTypeReferenceOrStringConstant;\n}\n\n/**\n * Format numbers with custom units.\n */\nexport interface NumberFormatCustomUnit {\n type: \"customUnit\";\n baseFormatOptions: NumberFormatOptions;\n unit: PropertyTypeReferenceOrStringConstant;\n}\n\n/**\n * Attach text before and/or after the formatted number.\n */\nexport interface NumberFormatAffix {\n type: \"affix\";\n baseFormatOptions: NumberFormatOptions;\n affix: Affix;\n}\n\nexport interface Affix {\n prefix?: PropertyTypeReferenceOrStringConstant;\n postfix?: PropertyTypeReferenceOrStringConstant;\n}\n\n/**\n * Format numeric values representing time durations.\n */\nexport interface NumberFormatDuration {\n type: \"duration\";\n formatStyle: DurationFormatStyle;\n precision?: DurationPrecision;\n baseValue: DurationBaseValue;\n}\n\nexport type DurationFormatStyle = HumanReadableFormat | TimeCodeFormat;\n\nexport interface HumanReadableFormat {\n type: \"humanReadable\";\n showFullUnits?: boolean;\n}\n\nexport interface TimeCodeFormat {\n type: \"timecode\";\n}\n\nexport type DurationPrecision =\n | \"DAYS\"\n | \"HOURS\"\n | \"MINUTES\"\n | \"SECONDS\"\n | \"AUTO\";\nexport type DurationBaseValue = \"SECONDS\" | \"MILLISECONDS\";\n\n/**\n * Scale numeric values by the specified factor.\n */\nexport interface NumberFormatScale {\n type: \"scale\";\n scaleType: NumberScaleType;\n baseFormatOptions: NumberFormatOptions;\n}\n\nexport type NumberScaleType = \"THOUSANDS\" | \"MILLIONS\" | \"BILLIONS\";\n\n/**\n * Display values as ratios with different scaling factors.\n */\nexport interface NumberFormatRatio {\n type: \"ratio\";\n ratioType: NumberRatioType;\n baseFormatOptions: NumberFormatOptions;\n}\n\nexport type NumberRatioType = \"PERCENTAGE\" | \"PER_MILLE\" | \"BASIS_POINTS\";\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyValueFormattingRule.js","names":[],"sources":["PropertyValueFormattingRule.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 { PropertyBooleanFormattingRule } from \"./PropertyBooleanFormattingRule.js\";\nimport type {\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"./PropertyDateAndTimestampFormattingRule.js\";\nimport type { PropertyKnownTypeFormattingRule } from \"./PropertyKnownTypeFormattingRule.js\";\nimport type { PropertyNumberFormattingRule } from \"./PropertyNumberFormattingRule.js\";\n\n/**\n * Formatting configuration for property values.\n */\nexport type PropertyValueFormattingRule =\n | PropertyNumberFormattingRule\n | PropertyTimestampFormattingRule\n | PropertyDateFormattingRule\n | PropertyBooleanFormattingRule\n | PropertyKnownTypeFormattingRule;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyValueFormattingUtils.js","names":[],"sources":["PropertyValueFormattingUtils.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\n/**\n * Reference to another property value or a string constant.\n */\nexport type PropertyTypeReferenceOrStringConstant =\n | StringConstant\n | PropertyTypeReference;\n\nexport interface StringConstant {\n type: \"constant\";\n value: string;\n}\n\nexport interface PropertyTypeReference {\n type: \"propertyType\";\n propertyApiName: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -297,6 +297,193 @@ interface OsdkMetadata {
|
|
|
297
297
|
|
|
298
298
|
type PrimaryKeyTypes = "string" | "datetime" | "double" | "integer" | "timestamp" | "short" | "long" | "byte";
|
|
299
299
|
|
|
300
|
+
interface PropertyBooleanFormattingRule {
|
|
301
|
+
type: "boolean";
|
|
302
|
+
valueIfTrue: string;
|
|
303
|
+
valueIfFalse: string;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Reference to another property value or a string constant.
|
|
308
|
+
*/
|
|
309
|
+
type PropertyTypeReferenceOrStringConstant = StringConstant | PropertyTypeReference;
|
|
310
|
+
interface StringConstant {
|
|
311
|
+
type: "constant";
|
|
312
|
+
value: string;
|
|
313
|
+
}
|
|
314
|
+
interface PropertyTypeReference {
|
|
315
|
+
type: "propertyType";
|
|
316
|
+
propertyApiName: string;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
interface PropertyDateFormattingRule {
|
|
320
|
+
type: "date";
|
|
321
|
+
format: DatetimeFormat;
|
|
322
|
+
}
|
|
323
|
+
interface PropertyTimestampFormattingRule {
|
|
324
|
+
type: "timestamp";
|
|
325
|
+
format: DatetimeFormat;
|
|
326
|
+
displayTimezone: DatetimeTimezone;
|
|
327
|
+
}
|
|
328
|
+
type DatetimeFormat = DatetimeStringFormat | DatetimeLocalizedFormat;
|
|
329
|
+
/**
|
|
330
|
+
* A custom date format pattern.
|
|
331
|
+
*/
|
|
332
|
+
interface DatetimeStringFormat {
|
|
333
|
+
type: "stringFormat";
|
|
334
|
+
pattern: string;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Predefined localized date/time formats.
|
|
338
|
+
*/
|
|
339
|
+
interface DatetimeLocalizedFormat {
|
|
340
|
+
type: "localizedFormat";
|
|
341
|
+
format: DatetimeLocalizedFormatType;
|
|
342
|
+
}
|
|
343
|
+
type DatetimeLocalizedFormatType = "DATE_FORMAT_RELATIVE_TO_NOW" | "DATE_FORMAT_DATE" | "DATE_FORMAT_YEAR_AND_MONTH" | "DATE_FORMAT_DATE_TIME" | "DATE_FORMAT_DATE_TIME_SHORT" | "DATE_FORMAT_TIME" | "DATE_FORMAT_ISO_INSTANT";
|
|
344
|
+
type DatetimeTimezone = DatetimeTimezoneStatic | DatetimeTimezoneUser;
|
|
345
|
+
interface DatetimeTimezoneStatic {
|
|
346
|
+
type: "static";
|
|
347
|
+
zoneId: PropertyTypeReferenceOrStringConstant;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Use the user's local timezone.
|
|
351
|
+
*/
|
|
352
|
+
interface DatetimeTimezoneUser {
|
|
353
|
+
type: "user";
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
interface PropertyKnownTypeFormattingRule {
|
|
357
|
+
type: "knownType";
|
|
358
|
+
knownType: KnownType;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Known Foundry types with specialized formatting.
|
|
362
|
+
*/
|
|
363
|
+
type KnownType = "USER_OR_GROUP_ID" | "RESOURCE_RID" | "ARTIFACT_GID";
|
|
364
|
+
|
|
365
|
+
interface PropertyNumberFormattingRule {
|
|
366
|
+
type: "number";
|
|
367
|
+
numberType: PropertyNumberFormattingRuleType;
|
|
368
|
+
}
|
|
369
|
+
type PropertyNumberFormattingRuleType = NumberFormatStandard | NumberFormatFixedValues | NumberFormatCurrency | NumberFormatStandardUnit | NumberFormatCustomUnit | NumberFormatAffix | NumberFormatDuration | NumberFormatScale | NumberFormatRatio;
|
|
370
|
+
/**
|
|
371
|
+
* Base number formatting options.
|
|
372
|
+
*/
|
|
373
|
+
interface NumberFormatOptions {
|
|
374
|
+
useGrouping?: boolean;
|
|
375
|
+
convertNegativeToParenthesis?: boolean;
|
|
376
|
+
minimumIntegerDigits?: number;
|
|
377
|
+
minimumFractionDigits?: number;
|
|
378
|
+
maximumFractionDigits?: number;
|
|
379
|
+
minimumSignificantDigits?: number;
|
|
380
|
+
maximumSignificantDigits?: number;
|
|
381
|
+
notation?: NumberFormatNotation;
|
|
382
|
+
roundingMode?: NumberRoundingMode;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Number notation style.
|
|
386
|
+
*/
|
|
387
|
+
type NumberFormatNotation = "STANDARD" | "SCIENTIFIC" | "ENGINEERING" | "COMPACT";
|
|
388
|
+
/**
|
|
389
|
+
* Number rounding behavior.
|
|
390
|
+
*/
|
|
391
|
+
type NumberRoundingMode = "CEIL" | "FLOOR" | "ROUND_CLOSEST";
|
|
392
|
+
/**
|
|
393
|
+
* Standard number formatting with configurable options.
|
|
394
|
+
*/
|
|
395
|
+
interface NumberFormatStandard {
|
|
396
|
+
type: "standard";
|
|
397
|
+
baseFormatOptions: NumberFormatOptions;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Map integer values to custom strings.
|
|
401
|
+
*/
|
|
402
|
+
interface NumberFormatFixedValues {
|
|
403
|
+
type: "fixedValues";
|
|
404
|
+
values: Record<number, string>;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Format numbers as currency values.
|
|
408
|
+
*/
|
|
409
|
+
interface NumberFormatCurrency {
|
|
410
|
+
type: "currency";
|
|
411
|
+
baseFormatOptions: NumberFormatOptions;
|
|
412
|
+
style: NumberFormatCurrencyStyle;
|
|
413
|
+
currencyCode: PropertyTypeReferenceOrStringConstant;
|
|
414
|
+
}
|
|
415
|
+
type NumberFormatCurrencyStyle = "STANDARD" | "COMPACT";
|
|
416
|
+
/**
|
|
417
|
+
* Format numbers with standard units supported by Intl.NumberFormat.
|
|
418
|
+
*/
|
|
419
|
+
interface NumberFormatStandardUnit {
|
|
420
|
+
type: "standardUnit";
|
|
421
|
+
baseFormatOptions: NumberFormatOptions;
|
|
422
|
+
unit: PropertyTypeReferenceOrStringConstant;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Format numbers with custom units.
|
|
426
|
+
*/
|
|
427
|
+
interface NumberFormatCustomUnit {
|
|
428
|
+
type: "customUnit";
|
|
429
|
+
baseFormatOptions: NumberFormatOptions;
|
|
430
|
+
unit: PropertyTypeReferenceOrStringConstant;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Attach text before and/or after the formatted number.
|
|
434
|
+
*/
|
|
435
|
+
interface NumberFormatAffix {
|
|
436
|
+
type: "affix";
|
|
437
|
+
baseFormatOptions: NumberFormatOptions;
|
|
438
|
+
affix: Affix;
|
|
439
|
+
}
|
|
440
|
+
interface Affix {
|
|
441
|
+
prefix?: PropertyTypeReferenceOrStringConstant;
|
|
442
|
+
postfix?: PropertyTypeReferenceOrStringConstant;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Format numeric values representing time durations.
|
|
446
|
+
*/
|
|
447
|
+
interface NumberFormatDuration {
|
|
448
|
+
type: "duration";
|
|
449
|
+
formatStyle: DurationFormatStyle;
|
|
450
|
+
precision?: DurationPrecision;
|
|
451
|
+
baseValue: DurationBaseValue;
|
|
452
|
+
}
|
|
453
|
+
type DurationFormatStyle = HumanReadableFormat | TimeCodeFormat;
|
|
454
|
+
interface HumanReadableFormat {
|
|
455
|
+
type: "humanReadable";
|
|
456
|
+
showFullUnits?: boolean;
|
|
457
|
+
}
|
|
458
|
+
interface TimeCodeFormat {
|
|
459
|
+
type: "timecode";
|
|
460
|
+
}
|
|
461
|
+
type DurationPrecision = "DAYS" | "HOURS" | "MINUTES" | "SECONDS" | "AUTO";
|
|
462
|
+
type DurationBaseValue = "SECONDS" | "MILLISECONDS";
|
|
463
|
+
/**
|
|
464
|
+
* Scale numeric values by the specified factor.
|
|
465
|
+
*/
|
|
466
|
+
interface NumberFormatScale {
|
|
467
|
+
type: "scale";
|
|
468
|
+
scaleType: NumberScaleType;
|
|
469
|
+
baseFormatOptions: NumberFormatOptions;
|
|
470
|
+
}
|
|
471
|
+
type NumberScaleType = "THOUSANDS" | "MILLIONS" | "BILLIONS";
|
|
472
|
+
/**
|
|
473
|
+
* Display values as ratios with different scaling factors.
|
|
474
|
+
*/
|
|
475
|
+
interface NumberFormatRatio {
|
|
476
|
+
type: "ratio";
|
|
477
|
+
ratioType: NumberRatioType;
|
|
478
|
+
baseFormatOptions: NumberFormatOptions;
|
|
479
|
+
}
|
|
480
|
+
type NumberRatioType = "PERCENTAGE" | "PER_MILLE" | "BASIS_POINTS";
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Formatting configuration for property values.
|
|
484
|
+
*/
|
|
485
|
+
type PropertyValueFormattingRule = PropertyNumberFormattingRule | PropertyTimestampFormattingRule | PropertyDateFormattingRule | PropertyBooleanFormattingRule | PropertyKnownTypeFormattingRule;
|
|
486
|
+
|
|
300
487
|
type VersionString<Major extends number, Minor extends number, Patch extends number> = `${Major}.${Minor}.${Patch}`;
|
|
301
488
|
|
|
302
489
|
type WirePropertyTypes = BaseWirePropertyTypes | Record<string, BaseWirePropertyTypes>;
|
|
@@ -351,6 +538,7 @@ declare namespace ObjectMetadata {
|
|
|
351
538
|
multiplicity?: boolean;
|
|
352
539
|
nullable?: boolean;
|
|
353
540
|
valueTypeApiName?: string;
|
|
541
|
+
valueFormatting?: PropertyValueFormattingRule;
|
|
354
542
|
}
|
|
355
543
|
interface Link<Q extends ObjectTypeDefinition, M extends boolean> {
|
|
356
544
|
__OsdkLinkTargetType?: Q;
|
|
@@ -779,6 +967,10 @@ declare namespace Osdk {
|
|
|
779
967
|
ObjectMetadata: ObjectMetadata;
|
|
780
968
|
InterfaceMetadata: InterfaceMetadata;
|
|
781
969
|
};
|
|
970
|
+
readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue: <PropertyApiName extends PropertyKeys<Q>>(propertyApiName: PropertyApiName, options?: {
|
|
971
|
+
locale?: string;
|
|
972
|
+
timezoneId?: string;
|
|
973
|
+
}) => string | undefined;
|
|
782
974
|
} & (IsNever<OPTIONS> extends true ? {} : IsAny<OPTIONS> extends true ? {} : "$rid" extends OPTIONS ? {
|
|
783
975
|
readonly $rid: string;
|
|
784
976
|
} : {});
|
|
@@ -1089,7 +1281,7 @@ declare namespace DerivedProperty {
|
|
|
1089
1281
|
};
|
|
1090
1282
|
interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
|
|
1091
1283
|
}
|
|
1092
|
-
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {
|
|
1284
|
+
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {
|
|
1093
1285
|
}
|
|
1094
1286
|
export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
|
|
1095
1287
|
}
|
|
@@ -1105,6 +1297,15 @@ type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boole
|
|
|
1105
1297
|
type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
1106
1298
|
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.SelectPropertyBuilder<LinkedType<Q, L>, false>;
|
|
1107
1299
|
};
|
|
1300
|
+
type Constant<Q extends ObjectOrInterfaceDefinition> = {
|
|
1301
|
+
readonly constant: {
|
|
1302
|
+
readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>;
|
|
1303
|
+
readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
|
|
1304
|
+
readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>;
|
|
1305
|
+
readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
1306
|
+
readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>;
|
|
1307
|
+
};
|
|
1308
|
+
};
|
|
1108
1309
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
1109
1310
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
1110
1311
|
limit: number;
|
|
@@ -1399,4 +1600,4 @@ type ExtractImplementingTypes<T extends InterfaceDefinition> = CompileTimeMetada
|
|
|
1399
1600
|
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> extends MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED>, NearestNeighbors<Q>, NarrowToType<Q> {
|
|
1400
1601
|
}
|
|
1401
1602
|
|
|
1402
|
-
export { isOk as $, type AttachmentUpload as A, type GroupByClause as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type GroupByRange as E, type AsyncIterArgs as F, type GeoFilterOptions as G, type Augment as H, type InterfaceDefinition as I, type Augments as J, type FetchPageArgs as K, NullabilityAdherence as L, type MediaReference as M, type NotWhereClause as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, ObjectSetArgs as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type SelectArg as T, type SelectArgToKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type FetchPageResult as X, type SingleOsdkResult as Y, type Media as Z, type MediaMetadata as _, type MediaUpload as a, type Result as a0, type BaseObjectSet as a1, ObjectSetSubscription as a2, InterfaceMetadata as a3, PropertyKeys as a4, type ObjectSpecifier as a5, ObjectMetadata as a6, type PropertyDef as a7, type VersionBound as a8, SimplePropertyDef as a9, type BaseWirePropertyTypes as
|
|
1603
|
+
export { isOk as $, type AttachmentUpload as A, type GroupByClause as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type GroupByRange as E, type AsyncIterArgs as F, type GeoFilterOptions as G, type Augment as H, type InterfaceDefinition as I, type Augments as J, type FetchPageArgs as K, NullabilityAdherence as L, type MediaReference as M, type NotWhereClause as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, ObjectSetArgs as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type SelectArg as T, type SelectArgToKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type FetchPageResult as X, type SingleOsdkResult as Y, type Media as Z, type MediaMetadata as _, type MediaUpload as a, type ExtractOptions as a$, type Result as a0, type BaseObjectSet as a1, ObjectSetSubscription as a2, InterfaceMetadata as a3, PropertyKeys as a4, type ObjectSpecifier as a5, ObjectMetadata as a6, type PropertyDef as a7, type VersionBound as a8, SimplePropertyDef as a9, type NumberFormatScale as aA, type NumberFormatStandard as aB, type NumberFormatStandardUnit as aC, type NumberRatioType as aD, type NumberRoundingMode as aE, type NumberScaleType as aF, type PropertyNumberFormattingRule as aG, type PropertyNumberFormattingRuleType as aH, type TimeCodeFormat as aI, type PropertyValueFormattingRule as aJ, type PropertyTypeReference as aK, type PropertyTypeReferenceOrStringConstant as aL, type StringConstant as aM, type BaseWirePropertyTypes as aN, type WirePropertyTypes as aO, type PrimaryKeyType as aP, type ConvertProps as aQ, type MaybeScore as aR, Osdk as aS, type PageResult as aT, TimeseriesDurationMapping as aU, type GeotimeSeriesProperty as aV, type TimeSeriesPoint as aW, type TimeSeriesProperty as aX, type TimeSeriesQuery as aY, type LinkedType as aZ, type LinkNames as a_, type PropertyBooleanFormattingRule as aa, type DatetimeFormat as ab, type DatetimeLocalizedFormat as ac, type DatetimeLocalizedFormatType as ad, type DatetimeStringFormat as ae, type DatetimeTimezone as af, type DatetimeTimezoneStatic as ag, type DatetimeTimezoneUser as ah, type PropertyDateFormattingRule as ai, type PropertyTimestampFormattingRule as aj, type KnownType as ak, type PropertyKnownTypeFormattingRule as al, type Affix as am, type DurationBaseValue as an, type DurationFormatStyle as ao, type DurationPrecision as ap, type HumanReadableFormat as aq, type NumberFormatAffix as ar, type NumberFormatCurrency as as, type NumberFormatCurrencyStyle as at, type NumberFormatCustomUnit as au, type NumberFormatDuration as av, type NumberFormatFixedValues as aw, type NumberFormatNotation as ax, type NumberFormatOptions as ay, type NumberFormatRatio as az, type Attachment as b, type MinimalObjectSet as b0, type ObjectIdentifiers as c, type OsdkObjectPrimaryKeyType as d, type ObjectSet as e, type OsdkMetadata as f, type ObjectOrInterfaceDefinition as g, type PrimaryKeyTypes as h, type OsdkBase as i, type AggregateOpts as j, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as k, type AggregationResultsWithGroups as l, type AggregationResultsWithoutGroups as m, type AggregationClause as n, type AggregationsResults as o, type AndWhereClause as p, type GeoFilter_Intersects as q, type GeoFilter_Within as r, type OrWhereClause as s, type PossibleWhereClauseFilters as t, type OsdkObjectCreatePropertyType as u, type OsdkObjectPropertyType as v, type OsdkObjectLinksObject as w, DerivedProperty as x, DurationMapping as y, type AllGroupByValues as z };
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Attachment, O as ObjectTypeDefinition, c as ObjectIdentifiers, d as OsdkObjectPrimaryKeyType, e as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, f as OsdkMetadata, R as ReleaseStatus, g as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, h as PrimaryKeyTypes, i as OsdkBase } from './ObjectSet-
|
|
2
|
-
export { j as AggregateOpts, k as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, l as AggregationResultsWithGroups, m as AggregationResultsWithoutGroups, o as AggregationsResults, z as AllGroupByValues, p as AndWhereClause, F as AsyncIterArgs, H as Augment, J as Augments, a1 as BaseObjectSet,
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Attachment, O as ObjectTypeDefinition, c as ObjectIdentifiers, d as OsdkObjectPrimaryKeyType, e as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, f as OsdkMetadata, R as ReleaseStatus, g as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, h as PrimaryKeyTypes, i as OsdkBase } from './ObjectSet-Dtb6G0ll.cjs';
|
|
2
|
+
export { am as Affix, j as AggregateOpts, k as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, l as AggregationResultsWithGroups, m as AggregationResultsWithoutGroups, o as AggregationsResults, z as AllGroupByValues, p as AndWhereClause, F as AsyncIterArgs, H as Augment, J as Augments, a1 as BaseObjectSet, aN as BaseWirePropertyTypes, aQ as ConvertProps, ab as DatetimeFormat, ac as DatetimeLocalizedFormat, ad as DatetimeLocalizedFormatType, ae as DatetimeStringFormat, af as DatetimeTimezone, ag as DatetimeTimezoneStatic, ah as DatetimeTimezoneUser, x as DerivedProperty, D as DistanceUnitMapping, an as DurationBaseValue, ao as DurationFormatStyle, y as DurationMapping, ap as DurationPrecision, K as FetchPageArgs, X as FetchPageResult, G as GeoFilterOptions, q as GeoFilter_Intersects, r as GeoFilter_Within, aV as GeotimeSeriesProperty, B as GroupByClause, E as GroupByRange, aq as HumanReadableFormat, a3 as InterfaceMetadata, ak as KnownType, a_ as LinkNames, aZ as LinkedType, aR as MaybeScore, Z as Media, _ as MediaMetadata, N as NotWhereClause, L as NullabilityAdherence, ar as NumberFormatAffix, as as NumberFormatCurrency, at as NumberFormatCurrencyStyle, au as NumberFormatCustomUnit, av as NumberFormatDuration, aw as NumberFormatFixedValues, ax as NumberFormatNotation, ay as NumberFormatOptions, az as NumberFormatRatio, aA as NumberFormatScale, aB as NumberFormatStandard, aC as NumberFormatStandardUnit, aD as NumberRatioType, aE as NumberRoundingMode, aF as NumberScaleType, a6 as ObjectMetadata, Q as ObjectSetArgs, a2 as ObjectSetSubscription, a5 as ObjectSpecifier, s as OrWhereClause, aS as Osdk, u as OsdkObjectCreatePropertyType, w as OsdkObjectLinksObject, v as OsdkObjectPropertyType, aT as PageResult, t as PossibleWhereClauseFilters, aP as PrimaryKeyType, aa as PropertyBooleanFormattingRule, ai as PropertyDateFormattingRule, a7 as PropertyDef, a4 as PropertyKeys, al as PropertyKnownTypeFormattingRule, aG as PropertyNumberFormattingRule, aH as PropertyNumberFormattingRuleType, aj as PropertyTimestampFormattingRule, aK as PropertyTypeReference, aL as PropertyTypeReferenceOrStringConstant, aJ as PropertyValueFormattingRule, a0 as Result, T as SelectArg, U as SelectArgToKeys, a9 as SimplePropertyDef, S as SingleLinkAccessor, Y as SingleOsdkResult, aM as StringConstant, aI as TimeCodeFormat, aW as TimeSeriesPoint, aX as TimeSeriesProperty, aY as TimeSeriesQuery, aU as TimeseriesDurationMapping, V as ValidAggregationKeys, a8 as VersionBound, W as WhereClause, aO as WirePropertyTypes, $ as isOk } from './ObjectSet-Dtb6G0ll.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as ObjectOrInterfaceDefinition, a4 as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, L as NullabilityAdherence, T as SelectArg,
|
|
2
|
-
export {
|
|
1
|
+
import { g as ObjectOrInterfaceDefinition, a4 as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, L as NullabilityAdherence, T as SelectArg, aS as Osdk, a$ as ExtractOptions, K as FetchPageArgs, X as FetchPageResult, i as OsdkBase } from '../ObjectSet-Dtb6G0ll.cjs';
|
|
2
|
+
export { b0 as MinimalObjectSet } from '../ObjectSet-Dtb6G0ll.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OsdkObjectFrom.js","names":["Osdk"],"sources":["OsdkObjectFrom.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 {\n DefaultToFalse,\n OsdkObjectLinksObject,\n} from \"./definitions/LinkDefinitions.js\";\nimport type {\n NullabilityAdherence,\n ObjectSetArgs,\n} from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\ntype NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}`\n ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}`\n : Before\n : never;\n\ntype MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> =\n S extends `${NamespaceOf<S>}.${infer Rest}`\n ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S\n : S;\n\nexport type PropMapToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n> = NonNullable<\n CompileTimeMetadata<FROM>[\"inverseInterfaceMap\"]\n>[ApiNameAsString<TO>];\n\nexport type MapPropNamesToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n P extends ValidOsdkPropParams<FROM>,\n> = MaybeStripNamespaces<\n PropMapToInterface<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>],\n TO\n>;\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport type MaybeScore<\n T extends Osdk.Instance<any>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>,\n> = ORDER_BY_OPTIONS extends \"relevance\" ? T & { $score: number } : T;\n\nexport namespace Osdk {\n export type Instance<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n & Pick<\n CompileTimeMetadata<Q>[\"props\"],\n // If there aren't any additional properties, then we want GetPropsKeys to default to PropertyKeys<Q>\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n & ([R] extends [never] ? {}\n : { [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]> })\n & {\n readonly $link: Q extends { linksType?: any } ? Q[\"linksType\"]\n : Q extends ObjectOrInterfaceDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: ObjectMetadata;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n }\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0GA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AA0BA;AACA;AACA;AAFA,WA2BiBA,IAAI;AAsDrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"OsdkObjectFrom.js","names":["Osdk"],"sources":["OsdkObjectFrom.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 {\n DefaultToFalse,\n OsdkObjectLinksObject,\n} from \"./definitions/LinkDefinitions.js\";\nimport type {\n NullabilityAdherence,\n ObjectSetArgs,\n} from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\ntype NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}`\n ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}`\n : Before\n : never;\n\ntype MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> =\n S extends `${NamespaceOf<S>}.${infer Rest}`\n ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S\n : S;\n\nexport type PropMapToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n> = NonNullable<\n CompileTimeMetadata<FROM>[\"inverseInterfaceMap\"]\n>[ApiNameAsString<TO>];\n\nexport type MapPropNamesToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n P extends ValidOsdkPropParams<FROM>,\n> = MaybeStripNamespaces<\n PropMapToInterface<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>],\n TO\n>;\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport type MaybeScore<\n T extends Osdk.Instance<any>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>,\n> = ORDER_BY_OPTIONS extends \"relevance\" ? T & { $score: number } : T;\n\nexport namespace Osdk {\n export type Instance<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n & Pick<\n CompileTimeMetadata<Q>[\"props\"],\n // If there aren't any additional properties, then we want GetPropsKeys to default to PropertyKeys<Q>\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n & ([R] extends [never] ? {}\n : { [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]> })\n & {\n readonly $link: Q extends { linksType?: any } ? Q[\"linksType\"]\n : Q extends ObjectOrInterfaceDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: ObjectMetadata;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue: <\n PropertyApiName extends PropertyKeys<Q>,\n >(\n propertyApiName: PropertyApiName,\n options?: { locale?: string; timezoneId?: string },\n ) => string | undefined;\n }\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0GA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AA0BA;AACA;AACA;AAFA,WA2BiBA,IAAI;AA6DrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.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 { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Creator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n > = (\n baseObjectSet: Builder<Q, false>,\n ) =>\n | Definition<T, Q>\n | NumericPropertyDefinition<T, Q>\n | DatetimePropertyDefinition<T, Q>;\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: Creator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.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 { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Creator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n > = (\n baseObjectSet: Builder<Q, false>,\n ) =>\n | Definition<T, Q>\n | NumericPropertyDefinition<T, Q>\n | DatetimePropertyDefinition<T, Q>;\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: Creator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Constant<Q extends ObjectOrInterfaceDefinition> = {\n readonly constant: {\n readonly double: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly integer: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"integer\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly long: (\n value: string,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"long\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly datetime: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"datetime\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly timestamp: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"timestamp\", \"non-nullable\", \"single\">,\n Q\n >;\n };\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","ignoreList":[]}
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["NULL_VALUE","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 { NULL_VALUE } from \"./actions/NullValue.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 AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} 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 { Logger } from \"./Logger.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 ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} 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 {\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 InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, 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;;AAUA,SAASA,UAAU,QAAQ,wBAAwB;AASnD,SAASC,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AAqC5D,SAASC,IAAI,QAAQ,oBAAoB;;
|
|
1
|
+
{"version":3,"file":"index.js","names":["NULL_VALUE","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 { NULL_VALUE } from \"./actions/NullValue.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 AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} 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 { Logger } from \"./Logger.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 ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} 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 {\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 InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nexport type { PropertyBooleanFormattingRule } from \"./ontology/valueFormatting/PropertyBooleanFormattingRule.js\";\nexport type {\n DatetimeFormat,\n DatetimeLocalizedFormat,\n DatetimeLocalizedFormatType,\n DatetimeStringFormat,\n DatetimeTimezone,\n DatetimeTimezoneStatic,\n DatetimeTimezoneUser,\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"./ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js\";\nexport type {\n KnownType,\n PropertyKnownTypeFormattingRule,\n} from \"./ontology/valueFormatting/PropertyKnownTypeFormattingRule.js\";\nexport type {\n Affix,\n DurationBaseValue,\n DurationFormatStyle,\n DurationPrecision,\n HumanReadableFormat,\n NumberFormatAffix,\n NumberFormatCurrency,\n NumberFormatCurrencyStyle,\n NumberFormatCustomUnit,\n NumberFormatDuration,\n NumberFormatFixedValues,\n NumberFormatNotation,\n NumberFormatOptions,\n NumberFormatRatio,\n NumberFormatScale,\n NumberFormatStandard,\n NumberFormatStandardUnit,\n NumberRatioType,\n NumberRoundingMode,\n NumberScaleType,\n PropertyNumberFormattingRule,\n PropertyNumberFormattingRuleType,\n TimeCodeFormat,\n} from \"./ontology/valueFormatting/PropertyNumberFormattingRule.js\";\nexport type { PropertyValueFormattingRule } from \"./ontology/valueFormatting/PropertyValueFormattingRule.js\";\nexport type {\n PropertyTypeReference,\n PropertyTypeReferenceOrStringConstant,\n StringConstant,\n} from \"./ontology/valueFormatting/PropertyValueFormattingUtils.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, 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;;AAUA,SAASA,UAAU,QAAQ,wBAAwB;AASnD,SAASC,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AAqC5D,SAASC,IAAI,QAAQ,oBAAoB;;AA+FzC;;AAUA,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
|
|
@@ -491,6 +491,17 @@ describe("ObjectSet", () => {
|
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
493
|
});
|
|
494
|
+
it("allows adding literals via base.constant", () => {
|
|
495
|
+
fauxObjectSet.withProperties({
|
|
496
|
+
"myProp1": base => {
|
|
497
|
+
const plus = base.pivotTo("lead").selectProperty("employeeId").add(base.constant.double(1));
|
|
498
|
+
expectTypeOf(plus).toEqualTypeOf();
|
|
499
|
+
const intPlusIntReturnsInt = base.pivotTo("lead").selectProperty("employeeId").add(base.constant.integer(1));
|
|
500
|
+
expectTypeOf(intPlusIntReturnsInt).toEqualTypeOf();
|
|
501
|
+
return plus;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
});
|
|
494
505
|
it("allows correctly typed nested property definitions", () => {
|
|
495
506
|
fauxObjectSet.withProperties({
|
|
496
507
|
"myProp1": base => {
|
|
@@ -536,6 +547,17 @@ describe("ObjectSet", () => {
|
|
|
536
547
|
}
|
|
537
548
|
});
|
|
538
549
|
});
|
|
550
|
+
it("allows adding literals via base.constant", () => {
|
|
551
|
+
fauxObjectSet.withProperties({
|
|
552
|
+
"myProp1": base => {
|
|
553
|
+
const dateAndDateReturnDate = base.pivotTo("lead").selectProperty("dateOfJoining").min(base.constant.datetime("2025-01-01T00:00:00Z"));
|
|
554
|
+
expectTypeOf(dateAndDateReturnDate).toEqualTypeOf();
|
|
555
|
+
const dateAndTimeReturnTime = base.pivotTo("lead").selectProperty("dateOfJoining").min(base.constant.timestamp("2025-01-01T00:00:00Z"));
|
|
556
|
+
expectTypeOf(dateAndTimeReturnTime).toEqualTypeOf();
|
|
557
|
+
return dateAndTimeReturnTime;
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
});
|
|
539
561
|
it("allows correctly typed nested property definitions", () => {
|
|
540
562
|
fauxObjectSet.withProperties({
|
|
541
563
|
"myProp1": base => {
|