@osdk/api 2.8.0-beta.26 → 2.8.0-beta.28
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 +10 -0
- package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/object/Media.js.map +1 -1
- package/build/browser/public/shapes-internal.js +2 -0
- package/build/browser/public/shapes-internal.js.map +1 -0
- package/build/browser/public/unstable.js +2 -0
- package/build/browser/public/unstable.js.map +1 -1
- package/build/browser/shapes/InlineShapeConfig.js +2 -0
- package/build/browser/shapes/InlineShapeConfig.js.map +1 -0
- package/build/browser/shapes/ShapeDefinition.js +59 -0
- package/build/browser/shapes/ShapeDefinition.js.map +1 -0
- package/build/browser/shapes/computeShapeId.js +97 -0
- package/build/browser/shapes/computeShapeId.js.map +1 -0
- package/build/browser/shapes/index.js +23 -0
- package/build/browser/shapes/index.js.map +1 -0
- package/build/browser/shapes/internal.js +2 -0
- package/build/browser/shapes/internal.js.map +1 -0
- package/build/cjs/{ObjectSet-By-T_QQB.d.cts → ObjectSet-DkBNIajH.d.cts} +16 -11
- package/build/cjs/index.d.cts +2 -2
- package/build/cjs/public/shapes-internal.cjs +4 -0
- package/build/cjs/public/shapes-internal.cjs.map +1 -0
- package/build/cjs/public/shapes-internal.d.cts +4 -0
- package/build/cjs/public/unstable.cjs +20 -0
- package/build/cjs/public/unstable.cjs.map +1 -1
- package/build/cjs/public/unstable.d.cts +39 -3
- package/build/cjs/shapes-internal-DBznJX3f.d.cts +152 -0
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/object/Media.js.map +1 -1
- package/build/esm/public/shapes-internal.js +2 -0
- package/build/esm/public/shapes-internal.js.map +1 -0
- package/build/esm/public/unstable.js +2 -0
- package/build/esm/public/unstable.js.map +1 -1
- package/build/esm/shapes/InlineShapeConfig.js +2 -0
- package/build/esm/shapes/InlineShapeConfig.js.map +1 -0
- package/build/esm/shapes/ShapeDefinition.js +59 -0
- package/build/esm/shapes/ShapeDefinition.js.map +1 -0
- package/build/esm/shapes/computeShapeId.js +97 -0
- package/build/esm/shapes/computeShapeId.js.map +1 -0
- package/build/esm/shapes/index.js +23 -0
- package/build/esm/shapes/index.js.map +1 -0
- package/build/esm/shapes/internal.js +2 -0
- package/build/esm/shapes/internal.js.map +1 -0
- package/build/types/derivedProperties/DerivedProperty.d.ts +1 -10
- package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/object/Media.d.ts +14 -0
- package/build/types/object/Media.d.ts.map +1 -1
- package/build/types/public/shapes-internal.d.ts +1 -0
- package/build/types/public/shapes-internal.d.ts.map +1 -0
- package/build/types/public/unstable.d.ts +2 -0
- package/build/types/public/unstable.d.ts.map +1 -1
- package/build/types/shapes/InlineShapeConfig.d.ts +29 -0
- package/build/types/shapes/InlineShapeConfig.d.ts.map +1 -0
- package/build/types/shapes/ShapeDefinition.d.ts +167 -0
- package/build/types/shapes/ShapeDefinition.d.ts.map +1 -0
- package/build/types/shapes/computeShapeId.d.ts +14 -0
- package/build/types/shapes/computeShapeId.d.ts.map +1 -0
- package/build/types/shapes/index.d.ts +3 -0
- package/build/types/shapes/index.d.ts.map +1 -0
- package/build/types/shapes/internal.d.ts +1 -0
- package/build/types/shapes/internal.d.ts.map +1 -0
- package/package.json +10 -1
- package/shapes-internal.d.ts +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @osdk/api
|
|
2
2
|
|
|
3
|
+
## 2.8.0-beta.28
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f294f5a: Remove literal support before GA.
|
|
8
|
+
- d284bf2: add media types, caching, and metadata query
|
|
9
|
+
- b68cebd: add shape type definitions with opaque internal fields and shapes-internal export path
|
|
10
|
+
|
|
11
|
+
## 2.8.0-beta.27
|
|
12
|
+
|
|
3
13
|
## 2.8.0-beta.26
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -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
|
|
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 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":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport type { IntervalRule } from \"./aggregate/IntervalRule.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 {\n Attachment,\n AttachmentMetadata,\n AttachmentUpload,\n} 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 type {\n PropertyMarkings,\n PropertySecurity,\n} from \"./object/PropertySecurity.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 {\n FetchLinksPageResult,\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./objectSet/ObjectSetLinks.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;;AAmBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport type { IntervalRule } from \"./aggregate/IntervalRule.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 {\n Attachment,\n AttachmentMetadata,\n AttachmentUpload,\n} 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 MediaPropertyLocation,\n MediaReference,\n MediaUpload,\n} from \"./object/Media.js\";\nexport type {\n PropertyMarkings,\n PropertySecurity,\n} from \"./object/PropertySecurity.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 {\n FetchLinksPageResult,\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./objectSet/ObjectSetLinks.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;;AAmBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AA8C5D,SAASC,IAAI,QAAQ,oBAAoB;;AAoGzC;;AAUA,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches content of a media reference property\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n */\n getMediaReference(): MediaReference;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n token?: string;\n /** @deprecated Use `token` instead */\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly fileName: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches content of a media reference property\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n */\n getMediaReference(): MediaReference;\n /**\n * Returns the source location of this media (object type, primary key, property name).\n *\n * Optional because not all media has a source location (e.g., transient/uploaded media).\n */\n getMediaSourceLocation?(): MediaPropertyLocation;\n}\n\n/**\n * Location of a media property on an object.\n */\nexport interface MediaPropertyLocation {\n objectType: string;\n primaryKey: string | number;\n propertyName: string;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n token?: string;\n /** @deprecated Use `token` instead */\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly fileName: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shapes-internal.js","names":[],"sources":["shapes-internal.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type {\n DerivedLinkConfig,\n NullabilityOp,\n ShapeDerivedLinkDef,\n ShapeLinkObjectSetDef,\n ShapeLinkOrderBy,\n ShapeLinkSegment,\n ShapeLinkSetOperation,\n ShapePropertyConfig,\n} from \"../shapes/internal.js\";\n"],"mappings":"","ignoreList":[]}
|
|
@@ -18,4 +18,6 @@ export { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from "../expe
|
|
|
18
18
|
export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from "../experimental/fetchOneByRid.js";
|
|
19
19
|
export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid } from "../experimental/fetchPageByRid.js";
|
|
20
20
|
export { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from "../experimental/getBulkLinks.js";
|
|
21
|
+
// Shapes (unstable — will graduate to @osdk/api/shapes when stable)
|
|
22
|
+
export { isSourcePkSymbol, ShapeNullabilityError, SourcePrimaryKeySymbol } from "../shapes/index.js";
|
|
21
23
|
//# sourceMappingURL=unstable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unstable.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks"],"sources":["unstable.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { Experiment, ExperimentFns } from \"../experimental/Experiment.js\";\n\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \"../experimental/createMediaReference.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from \"../experimental/fetchOneByRid.js\";\nexport {\n __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid,\n type FetchPageByRidPayload,\n} from \"../experimental/fetchPageByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from \"../experimental/getBulkLinks.js\";\n\nexport type { EXPERIMENTAL_BulkLinkResult } from \"../objectSet/BulkLinkResult.js\";\nexport type { MinimalObjectSet } from \"../objectSet/ObjectSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,uDAAuD,QAAQ,yCAAyC;AACjH,SAASC,gDAAgD,QAAQ,kCAAkC;AACnG,SACEC,iDAAiD,QAE5C,mCAAmC;AAC1C,SAASC,+CAA+C,QAAQ,iCAAiC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"unstable.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks","isSourcePkSymbol","ShapeNullabilityError","SourcePrimaryKeySymbol"],"sources":["unstable.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { Experiment, ExperimentFns } from \"../experimental/Experiment.js\";\n\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \"../experimental/createMediaReference.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from \"../experimental/fetchOneByRid.js\";\nexport {\n __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid,\n type FetchPageByRidPayload,\n} from \"../experimental/fetchPageByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from \"../experimental/getBulkLinks.js\";\n\nexport type { EXPERIMENTAL_BulkLinkResult } from \"../objectSet/BulkLinkResult.js\";\nexport type { MinimalObjectSet } from \"../objectSet/ObjectSet.js\";\n\n// Shapes (unstable — will graduate to @osdk/api/shapes when stable)\nexport {\n isSourcePkSymbol,\n ShapeNullabilityError,\n SourcePrimaryKeySymbol,\n} from \"../shapes/index.js\";\n\nexport type {\n InferShapeDefinition,\n InlineLinkConfig,\n InlineShapeConfig,\n LinkLoadConfig,\n LinkStatus,\n NullabilityViolation,\n PropertyType,\n RequiredProperty,\n ShapeBaseType,\n ShapeBuilder,\n ShapeDefinition,\n ShapeDerivedLinks,\n ShapeInstance,\n ShapeLinkBuilder,\n ShapeLinkResult,\n} from \"../shapes/index.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,uDAAuD,QAAQ,yCAAyC;AACjH,SAASC,gDAAgD,QAAQ,kCAAkC;AACnG,SACEC,iDAAiD,QAE5C,mCAAmC;AAC1C,SAASC,+CAA+C,QAAQ,iCAAiC;AAKjG;AACA,SACEC,gBAAgB,EAChBC,qBAAqB,EACrBC,sBAAsB,QACjB,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineShapeConfig.js","names":[],"sources":["InlineShapeConfig.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n PropertyType,\n RequiredProperty,\n ShapeDefinition,\n ShapeLinkBuilder,\n} from \"./ShapeDefinition.js\";\n\nexport interface InlineShapeConfig<\n BASE extends ObjectOrInterfaceDefinition,\n> {\n readonly require?: readonly PropertyKeys<BASE>[];\n readonly select?: readonly PropertyKeys<BASE>[];\n readonly dropIfNull?: readonly PropertyKeys<BASE>[];\n readonly defaults?: {\n readonly [K in PropertyKeys<BASE>]?: NonNullable<PropertyType<BASE, K>>;\n };\n readonly transforms?: {\n readonly [K in PropertyKeys<BASE>]?: (\n value: PropertyType<BASE, K>,\n ) => unknown;\n };\n readonly links?: Record<string, InlineLinkConfig<BASE>>;\n}\n\nexport interface InlineLinkConfig<\n SOURCE extends ObjectOrInterfaceDefinition,\n> {\n readonly via: (\n builder: ShapeLinkBuilder<SOURCE, SOURCE>,\n ) => ShapeLinkBuilder<SOURCE, ObjectOrInterfaceDefinition>;\n readonly target?: ShapeDefinition<ObjectOrInterfaceDefinition>;\n readonly defer?: boolean;\n}\n\n// --- Type-level inference helpers ---\n\ntype ArrayElement<T> = T extends readonly (infer E)[] ? E : never;\n\nexport type InferInlineProps<\n BASE extends ObjectOrInterfaceDefinition,\n C extends InlineShapeConfig<BASE>,\n> =\n & {\n [K in ArrayElement<C[\"require\"]> & PropertyKeys<BASE>]: RequiredProperty<\n PropertyType<BASE, K>\n >;\n }\n & {\n [K in ArrayElement<C[\"select\"]> & PropertyKeys<BASE>]: PropertyType<\n BASE,\n K\n >;\n }\n & {\n [K in ArrayElement<C[\"dropIfNull\"]> & PropertyKeys<BASE>]: RequiredProperty<\n PropertyType<BASE, K>\n >;\n }\n & {\n [K in keyof C[\"defaults\"] & PropertyKeys<BASE>]: NonNullable<\n PropertyType<BASE, K>\n >;\n }\n & {\n [K in keyof C[\"transforms\"] & PropertyKeys<BASE>]: C[\"transforms\"] extends\n Record<K, (v: PropertyType<BASE, K>) => infer R> ? R : never;\n };\n\nexport type InferInlineLinks<\n BASE extends ObjectOrInterfaceDefinition,\n C extends InlineShapeConfig<BASE>,\n> = C[\"links\"] extends Record<string, InlineLinkConfig<BASE>> ? {\n [K in keyof C[\"links\"] & string]: C[\"links\"][K][\"target\"] extends\n ShapeDefinition<ObjectOrInterfaceDefinition> ? C[\"links\"][K][\"target\"]\n : ShapeDefinition<ObjectOrInterfaceDefinition>;\n }\n : {};\n\nexport type InferShapeDefinition<\n BASE extends ObjectOrInterfaceDefinition,\n C extends InlineShapeConfig<BASE>,\n> = ShapeDefinition<\n BASE,\n InferInlineProps<BASE, C>,\n InferInlineLinks<BASE, C>\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export const SourcePrimaryKeySymbol = Symbol.for("osdk.query.$sourcePk");
|
|
18
|
+
const LegacyShapesSymbol = Symbol.for("osdk.shapes.$primaryKey");
|
|
19
|
+
export function isSourcePkSymbol(value) {
|
|
20
|
+
return typeof value === "symbol" && (value === SourcePrimaryKeySymbol || value === LegacyShapesSymbol);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Configuration for how a derived link is loaded at runtime. */
|
|
24
|
+
|
|
25
|
+
/** The result of calling `ShapeLinkBuilder.as()`, binding a link traversal to a target shape. */
|
|
26
|
+
|
|
27
|
+
/** A single link traversal step in a derived link's object set definition. */
|
|
28
|
+
|
|
29
|
+
/** Sort clause for a derived link's result set. */
|
|
30
|
+
|
|
31
|
+
/** A set operation (union/intersect/subtract) applied to a derived link's object set. */
|
|
32
|
+
|
|
33
|
+
/** Serializable definition of a derived link's object set: link traversals, filters, ordering, and set operations. */
|
|
34
|
+
|
|
35
|
+
/** How a shape handles null values for a selected property. */
|
|
36
|
+
|
|
37
|
+
/** Per-property configuration stored in a shape's `__props` map. */
|
|
38
|
+
|
|
39
|
+
/** A derived link definition stored in a shape's `__derivedLinks` array. */
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Type projection from an OSDK type. `__props` is the single source of truth for property config.
|
|
43
|
+
*
|
|
44
|
+
* @typeParam BASE - The base ObjectTypeDefinition or InterfaceDefinition
|
|
45
|
+
* @typeParam SELECTED_PROPS - Record of selected properties and their transformed types
|
|
46
|
+
* @typeParam DERIVED_LINKS - Record of derived link names to their result types
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
export class ShapeNullabilityError extends Error {
|
|
50
|
+
constructor(shape, violations) {
|
|
51
|
+
const props = violations.map(v => v.property).join(", ");
|
|
52
|
+
const shapeName = shape.__debugName ?? shape.__shapeId;
|
|
53
|
+
super(`Shape "${shapeName}" requires these properties to be non-null: ${props}`);
|
|
54
|
+
this.shape = shape;
|
|
55
|
+
this.violations = violations;
|
|
56
|
+
this.name = "ShapeNullabilityError";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=ShapeDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDefinition.js","names":["SourcePrimaryKeySymbol","Symbol","for","LegacyShapesSymbol","isSourcePkSymbol","value","ShapeNullabilityError","Error","constructor","shape","violations","props","map","v","property","join","shapeName","__debugName","__shapeId","name"],"sources":["ShapeDefinition.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 { 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 { OsdkBase } from \"../OsdkBase.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\n\nexport const SourcePrimaryKeySymbol: unique symbol = Symbol.for(\n \"osdk.query.$sourcePk\",\n);\n\nconst LegacyShapesSymbol = Symbol.for(\"osdk.shapes.$primaryKey\");\n\nexport function isSourcePkSymbol(value: unknown): value is symbol {\n return (\n typeof value === \"symbol\"\n && (value === SourcePrimaryKeySymbol || value === LegacyShapesSymbol)\n );\n}\n\ndeclare const ShapeDefinitionBrand: unique symbol;\n\ndeclare const ShapeLinkResultBrand: unique symbol;\n\n/** Configuration for how a derived link is loaded at runtime. */\nexport interface DerivedLinkConfig {\n defer?: boolean;\n}\n\n/** The result of calling `ShapeLinkBuilder.as()`, binding a link traversal to a target shape. */\nexport interface ShapeLinkResult<\n TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition>,\n> {\n readonly __linkResultBrand: typeof ShapeLinkResultBrand;\n readonly targetShape: TARGET_SHAPE;\n readonly objectSetDef: ShapeLinkObjectSetDef;\n readonly config: DerivedLinkConfig;\n}\n\n/** A single link traversal step in a derived link's object set definition. */\nexport interface ShapeLinkSegment {\n readonly type: \"pivotTo\";\n readonly linkName: string;\n readonly sourceType?: string;\n readonly targetType?: string;\n}\n\n/** Sort clause for a derived link's result set. */\nexport interface ShapeLinkOrderBy {\n readonly property: string;\n readonly direction: \"asc\" | \"desc\";\n}\n\n/** A set operation (union/intersect/subtract) applied to a derived link's object set. */\nexport interface ShapeLinkSetOperation {\n readonly type: \"union\" | \"intersect\" | \"subtract\";\n readonly other: ShapeLinkObjectSetDef;\n}\n\n/** Serializable definition of a derived link's object set: link traversals, filters, ordering, and set operations. */\nexport interface ShapeLinkObjectSetDef {\n readonly segments: readonly ShapeLinkSegment[];\n readonly where?: WhereClause<ObjectOrInterfaceDefinition>;\n readonly orderBy?: readonly ShapeLinkOrderBy[];\n readonly limit?: number;\n readonly distinct?: boolean;\n readonly setOperations?: readonly ShapeLinkSetOperation[];\n}\n\n/** How a shape handles null values for a selected property. */\nexport type NullabilityOp =\n | { type: \"require\" }\n | { type: \"dropIfNull\" }\n | { type: \"withDefault\"; defaultValue: unknown }\n | { type: \"withTransform\"; transform: (value: unknown) => unknown }\n | { type: \"select\" };\n\n/** Per-property configuration stored in a shape's `__props` map. */\nexport interface ShapePropertyConfig {\n readonly nullabilityOp: NullabilityOp;\n}\n\n/** A derived link definition stored in a shape's `__derivedLinks` array. */\nexport interface ShapeDerivedLinkDef<\n TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition> =\n ShapeDefinition<ObjectOrInterfaceDefinition>,\n> {\n readonly name: string;\n readonly objectSetDef: ShapeLinkObjectSetDef;\n readonly targetShape: TARGET_SHAPE;\n readonly config: DerivedLinkConfig;\n}\n\n/**\n * Type projection from an OSDK type. `__props` is the single source of truth for property config.\n *\n * @typeParam BASE - The base ObjectTypeDefinition or InterfaceDefinition\n * @typeParam SELECTED_PROPS - Record of selected properties and their transformed types\n * @typeParam DERIVED_LINKS - Record of derived link names to their result types\n */\nexport interface ShapeDefinition<\n BASE extends ObjectOrInterfaceDefinition,\n SELECTED_PROPS extends Record<string, unknown> = {},\n DERIVED_LINKS extends Record<\n string,\n ShapeDefinition<ObjectOrInterfaceDefinition>\n > = {},\n> {\n readonly [ShapeDefinitionBrand]: true;\n readonly __shapeId: string;\n readonly __debugName: string | undefined;\n readonly __baseType: BASE;\n readonly __baseTypeApiName: string;\n readonly __props: Readonly<Record<string, unknown>>;\n readonly __derivedLinks: readonly unknown[];\n readonly __selectedPropsType: SELECTED_PROPS;\n readonly __derivedLinksType: DERIVED_LINKS;\n}\n\nexport type ShapeBaseType<\n S extends ShapeDefinition<ObjectOrInterfaceDefinition>,\n> = S extends ShapeDefinition<infer BASE, infer _P, infer _L> ? BASE : never;\n\nexport type ShapeSelectedProps<\n S extends ShapeDefinition<ObjectOrInterfaceDefinition>,\n> = S extends ShapeDefinition<infer _B, infer PROPS, infer _L> ? PROPS : never;\n\nexport type ShapeDerivedLinks<\n S extends ShapeDefinition<ObjectOrInterfaceDefinition>,\n> = S extends ShapeDefinition<infer _B, infer _P, infer LINKS> ? LINKS : never;\n\nexport type ShapeInstance<\n S extends ShapeDefinition<ObjectOrInterfaceDefinition>,\n> = S extends ShapeDefinition<infer BASE, infer PROPS, infer LINKS> ?\n & OsdkBase<BASE>\n & { readonly $rid: string }\n & PROPS\n & {\n [K in keyof LINKS]: LINKS[K] extends\n ShapeDefinition<ObjectOrInterfaceDefinition> ? ShapeInstance<LINKS[K]>[]\n : never;\n }\n : never;\n\nexport type PropertyType<\n BASE extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<BASE>,\n> = CompileTimeMetadata<BASE>[\"props\"][K];\n\nexport type RequiredProperty<T> = NonNullable<T>;\n\nexport interface ShapeLinkBuilder<\n SOURCE extends ObjectOrInterfaceDefinition,\n CURRENT extends ObjectOrInterfaceDefinition,\n> {\n pivotTo<L extends LinkNames<CURRENT>>(\n link: L,\n ): ShapeLinkBuilder<SOURCE, LinkedType<CURRENT, L>>;\n\n where(clause: WhereClause<CURRENT>): ShapeLinkBuilder<SOURCE, CURRENT>;\n\n union(\n ...others: ShapeLinkBuilder<SOURCE, CURRENT>[]\n ): ShapeLinkBuilder<SOURCE, CURRENT>;\n\n intersect(\n ...others: ShapeLinkBuilder<SOURCE, CURRENT>[]\n ): ShapeLinkBuilder<SOURCE, CURRENT>;\n\n subtract(\n ...others: ShapeLinkBuilder<SOURCE, CURRENT>[]\n ): ShapeLinkBuilder<SOURCE, CURRENT>;\n\n orderBy<K extends PropertyKeys<CURRENT>>(\n property: K,\n direction?: \"asc\" | \"desc\",\n ): ShapeLinkBuilder<SOURCE, CURRENT>;\n\n limit(n: number): ShapeLinkBuilder<SOURCE, CURRENT>;\n\n distinct(): ShapeLinkBuilder<SOURCE, CURRENT>;\n\n as<TARGET_SHAPE extends ShapeDefinition<CURRENT>>(\n shape: TARGET_SHAPE,\n config?: DerivedLinkConfig,\n ): ShapeLinkResult<TARGET_SHAPE>;\n\n readonly $primaryKey: symbol;\n}\n\nexport interface ShapeLinkBuilderInternal\n extends\n ShapeLinkBuilder<ObjectOrInterfaceDefinition, ObjectOrInterfaceDefinition>\n{\n toObjectSetDef(): ShapeLinkObjectSetDef;\n}\n\nexport interface ShapeBuilder<\n BASE extends ObjectOrInterfaceDefinition,\n PROPS extends Record<string, unknown> = {},\n LINKS extends Record<\n string,\n ShapeDefinition<ObjectOrInterfaceDefinition>\n > = {},\n> {\n select<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(\n ...props: K[]\n ): ShapeBuilder<\n BASE,\n PROPS & { [P in K]: PropertyType<BASE, P> },\n LINKS\n >;\n\n require<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(\n ...props: K[]\n ): ShapeBuilder<\n BASE,\n PROPS & { [P in K]: RequiredProperty<PropertyType<BASE, P>> },\n LINKS\n >;\n\n dropIfNull<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(\n ...props: K[]\n ): ShapeBuilder<\n BASE,\n PROPS & { [P in K]: RequiredProperty<PropertyType<BASE, P>> },\n LINKS\n >;\n\n withDefault<\n K extends Exclude<PropertyKeys<BASE>, keyof PROPS>,\n V extends NonNullable<PropertyType<BASE, K>>,\n >(\n prop: K,\n defaultValue: V,\n ): ShapeBuilder<\n BASE,\n PROPS & { [P in K]: NonNullable<PropertyType<BASE, P>> },\n LINKS\n >;\n\n withTransform<\n K extends Exclude<PropertyKeys<BASE>, keyof PROPS>,\n R,\n >(\n prop: K,\n transform: (value: PropertyType<BASE, K>) => R,\n ): ShapeBuilder<BASE, PROPS & { [P in K]: R }, LINKS>;\n\n deriveLink<\n NAME extends string,\n TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition>,\n >(\n name: NAME,\n builder: (\n linkBuilder: ShapeLinkBuilder<BASE, BASE>,\n ) => ShapeLinkResult<TARGET_SHAPE>,\n ): ShapeBuilder<BASE, PROPS, LINKS & { [K in NAME]: TARGET_SHAPE }>;\n\n build(): ShapeDefinition<BASE, PROPS, LINKS>;\n}\n\nexport interface LinkLoadConfig {\n pageSize?: number;\n autoFetchMore?: boolean | number;\n streamUpdates?: boolean;\n defer?: boolean;\n}\n\nexport interface LinkStatus {\n isLoading: boolean;\n error: Error | undefined;\n hasMore: boolean;\n fetchMore: () => Promise<void>;\n}\n\nexport interface NullabilityViolation {\n property: string;\n primaryKey: unknown;\n constraint: \"require\" | \"dropIfNull\" | \"transformError\";\n}\n\nexport class ShapeNullabilityError extends Error {\n constructor(\n public readonly shape: ShapeDefinition<ObjectOrInterfaceDefinition>,\n public readonly violations: readonly NullabilityViolation[],\n ) {\n const props = violations.map((v) => v.property).join(\", \");\n const shapeName = shape.__debugName ?? shape.__shapeId;\n super(\n `Shape \"${shapeName}\" requires these properties to be non-null: ${props}`,\n );\n this.name = \"ShapeNullabilityError\";\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA,OAAO,MAAMA,sBAAqC,GAAGC,MAAM,CAACC,GAAG,CAC7D,sBACF,CAAC;AAED,MAAMC,kBAAkB,GAAGF,MAAM,CAACC,GAAG,CAAC,yBAAyB,CAAC;AAEhE,OAAO,SAASE,gBAAgBA,CAACC,KAAc,EAAmB;EAChE,OACE,OAAOA,KAAK,KAAK,QAAQ,KACrBA,KAAK,KAAKL,sBAAsB,IAAIK,KAAK,KAAKF,kBAAkB,CAAC;AAEzE;;AAMA;;AAKA;;AAUA;;AAQA;;AAMA;;AAMA;;AAUA;;AAQA;;AAKA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuLA,OAAO,MAAMG,qBAAqB,SAASC,KAAK,CAAC;EAC/CC,WAAWA,CACOC,KAAmD,EACnDC,UAA2C,EAC3D;IACA,MAAMC,KAAK,GAAGD,UAAU,CAACE,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,QAAQ,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAC1D,MAAMC,SAAS,GAAGP,KAAK,CAACQ,WAAW,IAAIR,KAAK,CAACS,SAAS;IACtD,KAAK,CACH,UAAUF,SAAS,+CAA+CL,KAAK,EACzE,CAAC;IAAC,KAPcF,KAAmD,GAAnDA,KAAmD;IAAA,KACnDC,UAA2C,GAA3CA,UAA2C;IAO3D,IAAI,CAACS,IAAI,GAAG,uBAAuB;EACrC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
function sortedStringify(obj) {
|
|
18
|
+
return JSON.stringify(obj, (_, v) => v && typeof v === "object" && !Array.isArray(v) ? Object.fromEntries(Object.entries(v).sort(([a], [b]) => a.localeCompare(b))) : v);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Computes a stable, deterministic identifier for a shape definition.
|
|
23
|
+
* The ID uniquely represents the combination of base type, property
|
|
24
|
+
* selections/nullability configs, and derived link definitions so
|
|
25
|
+
* that identical shapes produce the same ID across calls.
|
|
26
|
+
*/
|
|
27
|
+
export function computeShapeId(input) {
|
|
28
|
+
const canonical = canonicalizeShapeInput(input);
|
|
29
|
+
return simpleHash(sortedStringify(canonical));
|
|
30
|
+
}
|
|
31
|
+
function canonicalizeShapeInput(input) {
|
|
32
|
+
const sortedPropKeys = [...Object.keys(input.props)].sort();
|
|
33
|
+
const canonicalProps = {};
|
|
34
|
+
for (const key of sortedPropKeys) {
|
|
35
|
+
const config = input.props[key];
|
|
36
|
+
const op = config.nullabilityOp;
|
|
37
|
+
canonicalProps[key] = op.type === "withDefault" ? {
|
|
38
|
+
type: op.type,
|
|
39
|
+
defaultValue: op.defaultValue
|
|
40
|
+
} : op.type;
|
|
41
|
+
}
|
|
42
|
+
const canonicalLinks = input.derivedLinks.map(link => ({
|
|
43
|
+
name: link.name,
|
|
44
|
+
objectSetDef: canonicalizeObjectSetDef(link.objectSetDef),
|
|
45
|
+
targetShapeId: link.targetShape.__shapeId
|
|
46
|
+
}));
|
|
47
|
+
canonicalLinks.sort((a, b) => a.name.localeCompare(b.name));
|
|
48
|
+
return {
|
|
49
|
+
baseType: input.baseTypeApiName,
|
|
50
|
+
props: canonicalProps,
|
|
51
|
+
links: canonicalLinks
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function canonicalizeObjectSetDef(def) {
|
|
55
|
+
const result = {
|
|
56
|
+
segments: def.segments.map(seg => ({
|
|
57
|
+
type: seg.type,
|
|
58
|
+
linkName: seg.linkName,
|
|
59
|
+
sourceType: seg.sourceType
|
|
60
|
+
}))
|
|
61
|
+
};
|
|
62
|
+
if (def.where) {
|
|
63
|
+
result.where = JSON.parse(sortedStringify(def.where));
|
|
64
|
+
}
|
|
65
|
+
if (def.orderBy && def.orderBy.length > 0) {
|
|
66
|
+
result.orderBy = def.orderBy.map(o => ({
|
|
67
|
+
property: o.property,
|
|
68
|
+
direction: o.direction
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
if (def.limit !== undefined) {
|
|
72
|
+
result.limit = def.limit;
|
|
73
|
+
}
|
|
74
|
+
if (def.distinct) {
|
|
75
|
+
result.distinct = true;
|
|
76
|
+
}
|
|
77
|
+
if (def.setOperations && def.setOperations.length > 0) {
|
|
78
|
+
result.setOperations = def.setOperations.map(op => ({
|
|
79
|
+
type: op.type,
|
|
80
|
+
other: canonicalizeObjectSetDef(op.other)
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Shape IDs are used for cache keying and equality, not security,
|
|
87
|
+
// so 32-bit is sufficient.
|
|
88
|
+
function simpleHash(str) {
|
|
89
|
+
let hash = 5381;
|
|
90
|
+
for (let i = 0; i < str.length; i++) {
|
|
91
|
+
const char = str.charCodeAt(i);
|
|
92
|
+
hash = (hash << 5) + hash ^ char;
|
|
93
|
+
}
|
|
94
|
+
const positiveHash = hash >>> 0;
|
|
95
|
+
return positiveHash.toString(16).padStart(8, "0");
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=computeShapeId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeShapeId.js","names":["sortedStringify","obj","JSON","stringify","_","v","Array","isArray","Object","fromEntries","entries","sort","a","b","localeCompare","computeShapeId","input","canonical","canonicalizeShapeInput","simpleHash","sortedPropKeys","keys","props","canonicalProps","key","config","op","nullabilityOp","type","defaultValue","canonicalLinks","derivedLinks","map","link","name","objectSetDef","canonicalizeObjectSetDef","targetShapeId","targetShape","__shapeId","baseType","baseTypeApiName","links","def","result","segments","seg","linkName","sourceType","where","parse","orderBy","length","o","property","direction","limit","undefined","distinct","setOperations","other","str","hash","i","char","charCodeAt","positiveHash","toString","padStart"],"sources":["computeShapeId.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ShapeDerivedLinkDef,\n ShapeLinkObjectSetDef,\n ShapePropertyConfig,\n} from \"./ShapeDefinition.js\";\n\ninterface ShapeIdInput {\n baseTypeApiName: string;\n props: Record<string, ShapePropertyConfig>;\n derivedLinks: readonly ShapeDerivedLinkDef[];\n}\n\nfunction sortedStringify(obj: unknown): string {\n return JSON.stringify(\n obj,\n (_, v) =>\n v && typeof v === \"object\" && !Array.isArray(v)\n ? Object.fromEntries(\n Object.entries(v).sort(([a], [b]) => a.localeCompare(b)),\n )\n : v,\n );\n}\n\n/**\n * Computes a stable, deterministic identifier for a shape definition.\n * The ID uniquely represents the combination of base type, property\n * selections/nullability configs, and derived link definitions so\n * that identical shapes produce the same ID across calls.\n */\nexport function computeShapeId(input: ShapeIdInput): string {\n const canonical = canonicalizeShapeInput(input);\n return simpleHash(sortedStringify(canonical));\n}\n\nfunction canonicalizeShapeInput(\n input: ShapeIdInput,\n): Record<string, unknown> {\n const sortedPropKeys = [...Object.keys(input.props)].sort();\n const canonicalProps: Record<string, unknown> = {};\n\n for (const key of sortedPropKeys) {\n const config = input.props[key];\n const op = config.nullabilityOp;\n canonicalProps[key] = op.type === \"withDefault\"\n ? { type: op.type, defaultValue: op.defaultValue }\n : op.type;\n }\n\n const canonicalLinks = input.derivedLinks.map((link) => ({\n name: link.name,\n objectSetDef: canonicalizeObjectSetDef(link.objectSetDef),\n targetShapeId: link.targetShape.__shapeId,\n }));\n canonicalLinks.sort((a, b) => a.name.localeCompare(b.name));\n\n return {\n baseType: input.baseTypeApiName,\n props: canonicalProps,\n links: canonicalLinks,\n };\n}\n\nfunction canonicalizeObjectSetDef(\n def: ShapeLinkObjectSetDef,\n): Record<string, unknown> {\n const result: Record<string, unknown> = {\n segments: def.segments.map((seg) => ({\n type: seg.type,\n linkName: seg.linkName,\n sourceType: seg.sourceType,\n })),\n };\n\n if (def.where) {\n result.where = JSON.parse(sortedStringify(def.where));\n }\n\n if (def.orderBy && def.orderBy.length > 0) {\n result.orderBy = def.orderBy.map((o) => ({\n property: o.property,\n direction: o.direction,\n }));\n }\n\n if (def.limit !== undefined) {\n result.limit = def.limit;\n }\n\n if (def.distinct) {\n result.distinct = true;\n }\n\n if (def.setOperations && def.setOperations.length > 0) {\n result.setOperations = def.setOperations.map((op) => ({\n type: op.type,\n other: canonicalizeObjectSetDef(op.other),\n }));\n }\n\n return result;\n}\n\n// Shape IDs are used for cache keying and equality, not security,\n// so 32-bit is sufficient.\nfunction simpleHash(str: string): string {\n let hash = 5381;\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i);\n hash = ((hash << 5) + hash) ^ char;\n }\n\n const positiveHash = hash >>> 0;\n return positiveHash.toString(16).padStart(8, \"0\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA,SAASA,eAAeA,CAACC,GAAY,EAAU;EAC7C,OAAOC,IAAI,CAACC,SAAS,CACnBF,GAAG,EACH,CAACG,CAAC,EAAEC,CAAC,KACHA,CAAC,IAAI,OAAOA,CAAC,KAAK,QAAQ,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAC3CG,MAAM,CAACC,WAAW,CAClBD,MAAM,CAACE,OAAO,CAACL,CAAC,CAAC,CAACM,IAAI,CAAC,CAAC,CAACC,CAAC,CAAC,EAAE,CAACC,CAAC,CAAC,KAAKD,CAAC,CAACE,aAAa,CAACD,CAAC,CAAC,CACzD,CAAC,GACCR,CACR,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,cAAcA,CAACC,KAAmB,EAAU;EAC1D,MAAMC,SAAS,GAAGC,sBAAsB,CAACF,KAAK,CAAC;EAC/C,OAAOG,UAAU,CAACnB,eAAe,CAACiB,SAAS,CAAC,CAAC;AAC/C;AAEA,SAASC,sBAAsBA,CAC7BF,KAAmB,EACM;EACzB,MAAMI,cAAc,GAAG,CAAC,GAAGZ,MAAM,CAACa,IAAI,CAACL,KAAK,CAACM,KAAK,CAAC,CAAC,CAACX,IAAI,CAAC,CAAC;EAC3D,MAAMY,cAAuC,GAAG,CAAC,CAAC;EAElD,KAAK,MAAMC,GAAG,IAAIJ,cAAc,EAAE;IAChC,MAAMK,MAAM,GAAGT,KAAK,CAACM,KAAK,CAACE,GAAG,CAAC;IAC/B,MAAME,EAAE,GAAGD,MAAM,CAACE,aAAa;IAC/BJ,cAAc,CAACC,GAAG,CAAC,GAAGE,EAAE,CAACE,IAAI,KAAK,aAAa,GAC3C;MAAEA,IAAI,EAAEF,EAAE,CAACE,IAAI;MAAEC,YAAY,EAAEH,EAAE,CAACG;IAAa,CAAC,GAChDH,EAAE,CAACE,IAAI;EACb;EAEA,MAAME,cAAc,GAAGd,KAAK,CAACe,YAAY,CAACC,GAAG,CAAEC,IAAI,KAAM;IACvDC,IAAI,EAAED,IAAI,CAACC,IAAI;IACfC,YAAY,EAAEC,wBAAwB,CAACH,IAAI,CAACE,YAAY,CAAC;IACzDE,aAAa,EAAEJ,IAAI,CAACK,WAAW,CAACC;EAClC,CAAC,CAAC,CAAC;EACHT,cAAc,CAACnB,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACsB,IAAI,CAACpB,aAAa,CAACD,CAAC,CAACqB,IAAI,CAAC,CAAC;EAE3D,OAAO;IACLM,QAAQ,EAAExB,KAAK,CAACyB,eAAe;IAC/BnB,KAAK,EAAEC,cAAc;IACrBmB,KAAK,EAAEZ;EACT,CAAC;AACH;AAEA,SAASM,wBAAwBA,CAC/BO,GAA0B,EACD;EACzB,MAAMC,MAA+B,GAAG;IACtCC,QAAQ,EAAEF,GAAG,CAACE,QAAQ,CAACb,GAAG,CAAEc,GAAG,KAAM;MACnClB,IAAI,EAAEkB,GAAG,CAAClB,IAAI;MACdmB,QAAQ,EAAED,GAAG,CAACC,QAAQ;MACtBC,UAAU,EAAEF,GAAG,CAACE;IAClB,CAAC,CAAC;EACJ,CAAC;EAED,IAAIL,GAAG,CAACM,KAAK,EAAE;IACbL,MAAM,CAACK,KAAK,GAAG/C,IAAI,CAACgD,KAAK,CAAClD,eAAe,CAAC2C,GAAG,CAACM,KAAK,CAAC,CAAC;EACvD;EAEA,IAAIN,GAAG,CAACQ,OAAO,IAAIR,GAAG,CAACQ,OAAO,CAACC,MAAM,GAAG,CAAC,EAAE;IACzCR,MAAM,CAACO,OAAO,GAAGR,GAAG,CAACQ,OAAO,CAACnB,GAAG,CAAEqB,CAAC,KAAM;MACvCC,QAAQ,EAAED,CAAC,CAACC,QAAQ;MACpBC,SAAS,EAAEF,CAAC,CAACE;IACf,CAAC,CAAC,CAAC;EACL;EAEA,IAAIZ,GAAG,CAACa,KAAK,KAAKC,SAAS,EAAE;IAC3Bb,MAAM,CAACY,KAAK,GAAGb,GAAG,CAACa,KAAK;EAC1B;EAEA,IAAIb,GAAG,CAACe,QAAQ,EAAE;IAChBd,MAAM,CAACc,QAAQ,GAAG,IAAI;EACxB;EAEA,IAAIf,GAAG,CAACgB,aAAa,IAAIhB,GAAG,CAACgB,aAAa,CAACP,MAAM,GAAG,CAAC,EAAE;IACrDR,MAAM,CAACe,aAAa,GAAGhB,GAAG,CAACgB,aAAa,CAAC3B,GAAG,CAAEN,EAAE,KAAM;MACpDE,IAAI,EAAEF,EAAE,CAACE,IAAI;MACbgC,KAAK,EAAExB,wBAAwB,CAACV,EAAE,CAACkC,KAAK;IAC1C,CAAC,CAAC,CAAC;EACL;EAEA,OAAOhB,MAAM;AACf;;AAEA;AACA;AACA,SAASzB,UAAUA,CAAC0C,GAAW,EAAU;EACvC,IAAIC,IAAI,GAAG,IAAI;EACf,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,GAAG,CAACT,MAAM,EAAEW,CAAC,EAAE,EAAE;IACnC,MAAMC,IAAI,GAAGH,GAAG,CAACI,UAAU,CAACF,CAAC,CAAC;IAC9BD,IAAI,GAAI,CAACA,IAAI,IAAI,CAAC,IAAIA,IAAI,GAAIE,IAAI;EACpC;EAEA,MAAME,YAAY,GAAGJ,IAAI,KAAK,CAAC;EAC/B,OAAOI,YAAY,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AACnD","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// Core types
|
|
18
|
+
|
|
19
|
+
// Inline shape config types
|
|
20
|
+
|
|
21
|
+
// Error types and runtime values
|
|
22
|
+
export { isSourcePkSymbol, ShapeNullabilityError, SourcePrimaryKeySymbol } from "./ShapeDefinition.js";
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["isSourcePkSymbol","ShapeNullabilityError","SourcePrimaryKeySymbol"],"sources":["index.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// Core types\nexport type {\n LinkLoadConfig,\n LinkStatus,\n NullabilityViolation,\n PropertyType,\n RequiredProperty,\n ShapeBaseType,\n ShapeBuilder,\n ShapeDefinition,\n ShapeDerivedLinks,\n ShapeInstance,\n ShapeLinkBuilder,\n ShapeLinkResult,\n} from \"./ShapeDefinition.js\";\n\n// Inline shape config types\nexport type {\n InferShapeDefinition,\n InlineLinkConfig,\n InlineShapeConfig,\n} from \"./InlineShapeConfig.js\";\n\n// Error types and runtime values\nexport {\n isSourcePkSymbol,\n ShapeNullabilityError,\n SourcePrimaryKeySymbol,\n} from \"./ShapeDefinition.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAgBA;;AAOA;AACA,SACEA,gBAAgB,EAChBC,qBAAqB,EACrBC,sBAAsB,QACjB,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","names":[],"sources":["internal.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type {\n DerivedLinkConfig,\n NullabilityOp,\n ShapeDerivedLinkDef,\n ShapeLinkObjectSetDef,\n ShapeLinkOrderBy,\n ShapeLinkSegment,\n ShapeLinkSetOperation,\n ShapePropertyConfig,\n} from \"./ShapeDefinition.js\";\n"],"mappings":"","ignoreList":[]}
|
|
@@ -36,6 +36,20 @@ interface Media {
|
|
|
36
36
|
* Returns the media reference
|
|
37
37
|
*/
|
|
38
38
|
getMediaReference(): MediaReference;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the source location of this media (object type, primary key, property name).
|
|
41
|
+
*
|
|
42
|
+
* Optional because not all media has a source location (e.g., transient/uploaded media).
|
|
43
|
+
*/
|
|
44
|
+
getMediaSourceLocation?(): MediaPropertyLocation;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Location of a media property on an object.
|
|
48
|
+
*/
|
|
49
|
+
interface MediaPropertyLocation {
|
|
50
|
+
objectType: string;
|
|
51
|
+
primaryKey: string | number;
|
|
52
|
+
propertyName: string;
|
|
39
53
|
}
|
|
40
54
|
/**
|
|
41
55
|
* Unique identifier of a media item in Foundry.
|
|
@@ -1445,7 +1459,7 @@ declare namespace DerivedProperty {
|
|
|
1445
1459
|
};
|
|
1446
1460
|
interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
|
|
1447
1461
|
}
|
|
1448
|
-
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q
|
|
1462
|
+
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {
|
|
1449
1463
|
}
|
|
1450
1464
|
export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
|
|
1451
1465
|
}
|
|
@@ -1461,15 +1475,6 @@ type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boole
|
|
|
1461
1475
|
type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
1462
1476
|
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>;
|
|
1463
1477
|
};
|
|
1464
|
-
type Constant<Q extends ObjectOrInterfaceDefinition> = {
|
|
1465
|
-
readonly constant: {
|
|
1466
|
-
readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>;
|
|
1467
|
-
readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
|
|
1468
|
-
readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>;
|
|
1469
|
-
readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
1470
|
-
readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>;
|
|
1471
|
-
};
|
|
1472
|
-
};
|
|
1473
1478
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
1474
1479
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
1475
1480
|
limit: number;
|
|
@@ -1808,4 +1813,4 @@ interface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1808
1813
|
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> {
|
|
1809
1814
|
}
|
|
1810
1815
|
|
|
1811
|
-
export { type
|
|
1816
|
+
export { type Augment as $, type AttachmentUpload as A, type PossibleWhereClauseFilters as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type ExtractOptions as E, type FetchPageArgs as F, type GeoFilterOptions as G, type OsdkObjectCreatePropertyType as H, type InterfaceDefinition as I, type OsdkObjectPropertyType as J, type OsdkObjectLinksObject as K, type SingleLinkAccessor as L, type MediaReference as M, NullabilityAdherence as N, type ObjectOrInterfaceDefinition as O, PropertyKeys as P, DerivedProperty as Q, type ReleaseStatus as R, type SelectArg as S, DurationMapping as T, type AllGroupByValues as U, type ValidAggregationKeys as V, type WhereClause as W, type GroupByClause as X, type GroupByRange as Y, type AttachmentMetadata as Z, type AsyncIterArgs as _, Osdk as a, type ConvertProps as a$, type Augments as a0, ObjectSetArgs as a1, type SelectArgToKeys as a2, type SingleOsdkResult as a3, type MediaMetadata as a4, type MediaPropertyLocation as a5, type PropertyMarkings as a6, type PropertySecurity as a7, isOk as a8, type Result as a9, type DurationPrecision as aA, type HumanReadableFormat as aB, type NumberFormatAffix as aC, type NumberFormatCurrency as aD, type NumberFormatCurrencyStyle as aE, type NumberFormatCustomUnit as aF, type NumberFormatDuration as aG, type NumberFormatFixedValues as aH, type NumberFormatNotation as aI, type NumberFormatOptions as aJ, type NumberFormatRatio as aK, type NumberFormatScale as aL, type NumberFormatStandard as aM, type NumberFormatStandardUnit as aN, type NumberRatioType as aO, type NumberRoundingMode as aP, type NumberScaleType as aQ, type PropertyNumberFormattingRule as aR, type PropertyNumberFormattingRuleType as aS, type TimeCodeFormat as aT, type PropertyValueFormattingRule as aU, type PropertyTypeReference as aV, type PropertyTypeReferenceOrStringConstant as aW, type StringConstant as aX, type BaseWirePropertyTypes as aY, type WirePropertyTypes as aZ, type PrimaryKeyType as a_, type BaseObjectSet as aa, type FetchLinksPageResult as ab, type LinkTypeApiNamesFor as ac, type MinimalDirectedObjectLinkInstance as ad, ObjectSetSubscription as ae, InterfaceMetadata as af, type ObjectSpecifier as ag, ObjectMetadata as ah, type PropertyDef as ai, type VersionBound as aj, SimplePropertyDef as ak, type PropertyBooleanFormattingRule as al, type DatetimeFormat as am, type DatetimeLocalizedFormat as an, type DatetimeLocalizedFormatType as ao, type DatetimeStringFormat as ap, type DatetimeTimezone as aq, type DatetimeTimezoneStatic as ar, type DatetimeTimezoneUser as as, type PropertyDateFormattingRule as at, type PropertyTimestampFormattingRule as au, type KnownType as av, type PropertyKnownTypeFormattingRule as aw, type Affix as ax, type DurationBaseValue as ay, type DurationFormatStyle as az, type FetchPageResult as b, type MaybeScore as b0, type PageResult as b1, TimeseriesDurationMapping as b2, type GeotimeSeriesProperty as b3, type TimeSeriesPoint as b4, type TimeSeriesProperty as b5, type TimeSeriesQuery as b6, type LinkedType as b7, type LinkNames as b8, type OsdkBase as c, type MinimalObjectSet as d, type MediaUpload as e, type Media as f, type Attachment as g, type ObjectTypeDefinition as h, type ObjectIdentifiers as i, type OsdkObjectPrimaryKeyType as j, type ObjectSet as k, type OsdkMetadata as l, type PropertyValueWireToClient as m, type PrimaryKeyTypes as n, type AggregateOpts as o, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as p, type AggregationResultsWithGroups as q, type AggregationResultsWithoutGroups as r, type AggregationClause as s, type AggregationsResults as t, type IntervalRule as u, type AndWhereClause as v, type GeoFilter_Intersects as w, type GeoFilter_Within as x, type NotWhereClause as y, type OrWhereClause as z };
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AttachmentUpload, M as MediaReference,
|
|
2
|
-
export {
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, e as MediaUpload, f as Media, g as Attachment, h as ObjectTypeDefinition, i as ObjectIdentifiers, j as OsdkObjectPrimaryKeyType, k as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, l as OsdkMetadata, R as ReleaseStatus, O as ObjectOrInterfaceDefinition, m as PropertyValueWireToClient, n as PrimaryKeyTypes, c as OsdkBase } from './ObjectSet-DkBNIajH.cjs';
|
|
2
|
+
export { ax as Affix, o as AggregateOpts, p as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, s as AggregationClause, q as AggregationResultsWithGroups, r as AggregationResultsWithoutGroups, t as AggregationsResults, U as AllGroupByValues, v as AndWhereClause, _ as AsyncIterArgs, Z as AttachmentMetadata, $ as Augment, a0 as Augments, aa as BaseObjectSet, aY as BaseWirePropertyTypes, a$ as ConvertProps, am as DatetimeFormat, an as DatetimeLocalizedFormat, ao as DatetimeLocalizedFormatType, ap as DatetimeStringFormat, aq as DatetimeTimezone, ar as DatetimeTimezoneStatic, as as DatetimeTimezoneUser, Q as DerivedProperty, D as DistanceUnitMapping, ay as DurationBaseValue, az as DurationFormatStyle, T as DurationMapping, aA as DurationPrecision, ab as FetchLinksPageResult, F as FetchPageArgs, b as FetchPageResult, G as GeoFilterOptions, w as GeoFilter_Intersects, x as GeoFilter_Within, b3 as GeotimeSeriesProperty, X as GroupByClause, Y as GroupByRange, aB as HumanReadableFormat, af as InterfaceMetadata, u as IntervalRule, av as KnownType, b8 as LinkNames, ac as LinkTypeApiNamesFor, b7 as LinkedType, b0 as MaybeScore, a4 as MediaMetadata, a5 as MediaPropertyLocation, ad as MinimalDirectedObjectLinkInstance, y as NotWhereClause, N as NullabilityAdherence, aC as NumberFormatAffix, aD as NumberFormatCurrency, aE as NumberFormatCurrencyStyle, aF as NumberFormatCustomUnit, aG as NumberFormatDuration, aH as NumberFormatFixedValues, aI as NumberFormatNotation, aJ as NumberFormatOptions, aK as NumberFormatRatio, aL as NumberFormatScale, aM as NumberFormatStandard, aN as NumberFormatStandardUnit, aO as NumberRatioType, aP as NumberRoundingMode, aQ as NumberScaleType, ah as ObjectMetadata, a1 as ObjectSetArgs, ae as ObjectSetSubscription, ag as ObjectSpecifier, z as OrWhereClause, a as Osdk, H as OsdkObjectCreatePropertyType, K as OsdkObjectLinksObject, J as OsdkObjectPropertyType, b1 as PageResult, B as PossibleWhereClauseFilters, a_ as PrimaryKeyType, al as PropertyBooleanFormattingRule, at as PropertyDateFormattingRule, ai as PropertyDef, P as PropertyKeys, aw as PropertyKnownTypeFormattingRule, a6 as PropertyMarkings, aR as PropertyNumberFormattingRule, aS as PropertyNumberFormattingRuleType, a7 as PropertySecurity, au as PropertyTimestampFormattingRule, aV as PropertyTypeReference, aW as PropertyTypeReferenceOrStringConstant, aU as PropertyValueFormattingRule, a9 as Result, S as SelectArg, a2 as SelectArgToKeys, ak as SimplePropertyDef, L as SingleLinkAccessor, a3 as SingleOsdkResult, aX as StringConstant, aT as TimeCodeFormat, b4 as TimeSeriesPoint, b5 as TimeSeriesProperty, b6 as TimeSeriesQuery, b2 as TimeseriesDurationMapping, V as ValidAggregationKeys, aj as VersionBound, W as WhereClause, aZ as WirePropertyTypes, a8 as isOk } from './ObjectSet-DkBNIajH.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"shapes-internal.cjs"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { D as DerivedLinkConfig, k as NullabilityOp, l as ShapeDerivedLinkDef, m as ShapeLinkObjectSetDef, n as ShapeLinkOrderBy, o as ShapeLinkSegment, p as ShapeLinkSetOperation, q as ShapePropertyConfig } from '../shapes-internal-DBznJX3f.cjs';
|
|
2
|
+
import '../ObjectSet-DkBNIajH.cjs';
|
|
3
|
+
import 'type-fest';
|
|
4
|
+
import 'geojson';
|
|
@@ -28,9 +28,29 @@ var __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {
|
|
|
28
28
|
version: "2.0.8"
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
// src/shapes/ShapeDefinition.ts
|
|
32
|
+
var SourcePrimaryKeySymbol = Symbol.for("osdk.query.$sourcePk");
|
|
33
|
+
var LegacyShapesSymbol = Symbol.for("osdk.shapes.$primaryKey");
|
|
34
|
+
function isSourcePkSymbol(value) {
|
|
35
|
+
return typeof value === "symbol" && (value === SourcePrimaryKeySymbol || value === LegacyShapesSymbol);
|
|
36
|
+
}
|
|
37
|
+
var ShapeNullabilityError = class extends Error {
|
|
38
|
+
constructor(shape, violations) {
|
|
39
|
+
const props = violations.map((v) => v.property).join(", ");
|
|
40
|
+
const shapeName = shape.__debugName ?? shape.__shapeId;
|
|
41
|
+
super(`Shape "${shapeName}" requires these properties to be non-null: ${props}`);
|
|
42
|
+
this.shape = shape;
|
|
43
|
+
this.violations = violations;
|
|
44
|
+
this.name = "ShapeNullabilityError";
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
exports.ShapeNullabilityError = ShapeNullabilityError;
|
|
49
|
+
exports.SourcePrimaryKeySymbol = SourcePrimaryKeySymbol;
|
|
31
50
|
exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference;
|
|
32
51
|
exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid;
|
|
33
52
|
exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid;
|
|
34
53
|
exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks;
|
|
54
|
+
exports.isSourcePkSymbol = isSourcePkSymbol;
|
|
35
55
|
//# sourceMappingURL=unstable.cjs.map
|
|
36
56
|
//# sourceMappingURL=unstable.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/experimental/createMediaReference.ts","../../../src/experimental/fetchOneByRid.ts","../../../src/experimental/fetchPageByRid.ts","../../../src/experimental/getBulkLinks.ts"],"names":[],"mappings":";;;AA6BO,IAAM,uDAA0D,GAAA;AAAA,EACrE,IAAM,EAAA,yDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACjBO,IAAM,gDAAmD,GAAA;AAAA,EAC9D,IAAM,EAAA,kDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,iDAAoD,GAAA;AAAA,EAC/D,IAAM,EAAA,mDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,+CAAkD,GAAA;AAAA,EAC7D,IAAM,EAAA,iDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX","file":"unstable.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @experimental This feature is experimental and might change in the future.\n *\n * Uploads a media item to the media property of the specified object type.\n *\n * @param data - Data to upload as media item\n * @param fileName - Name that will be assigned as path to the uploaded media item.\n * @param objectType - Object type to which the media item will be uploaded.\n * @param propertyType - Media reference property of the corresponding object type to which the media item will be uploaded.\n *\n * @returns media reference of the uploaded media item.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks\",\n type: \"experiment\",\n version: \"2.0.8\"\n};"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/experimental/createMediaReference.ts","../../../src/experimental/fetchOneByRid.ts","../../../src/experimental/fetchPageByRid.ts","../../../src/experimental/getBulkLinks.ts","../../../src/shapes/ShapeDefinition.ts"],"names":[],"mappings":";;;AA6BO,IAAM,uDAA0D,GAAA;AAAA,EACrE,IAAM,EAAA,yDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACjBO,IAAM,gDAAmD,GAAA;AAAA,EAC9D,IAAM,EAAA,kDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,iDAAoD,GAAA;AAAA,EAC/D,IAAM,EAAA,mDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,+CAAkD,GAAA;AAAA,EAC7D,IAAM,EAAA,iDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJa,IAAA,sBAAA,GAAyB,MAAO,CAAA,GAAA,CAAI,sBAAsB;AACvE,IAAM,kBAAA,GAAqB,MAAO,CAAA,GAAA,CAAI,yBAAyB,CAAA;AACxD,SAAS,iBAAiB,KAAO,EAAA;AACtC,EAAA,OAAO,OAAO,KAAA,KAAU,QAAa,KAAA,KAAA,KAAU,0BAA0B,KAAU,KAAA,kBAAA,CAAA;AACrF;AA4Ba,IAAA,qBAAA,GAAN,cAAoC,KAAM,CAAA;AAAA,EAC/C,WAAA,CAAY,OAAO,UAAY,EAAA;AAC7B,IAAM,MAAA,KAAA,GAAQ,WAAW,GAAI,CAAA,CAAA,CAAA,KAAK,EAAE,QAAQ,CAAA,CAAE,KAAK,IAAI,CAAA;AACvD,IAAM,MAAA,SAAA,GAAY,KAAM,CAAA,WAAA,IAAe,KAAM,CAAA,SAAA;AAC7C,IAAA,KAAA,CAAM,CAAU,OAAA,EAAA,SAAS,CAA+C,4CAAA,EAAA,KAAK,CAAE,CAAA,CAAA;AAC/E,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA;AACb,IAAA,IAAA,CAAK,UAAa,GAAA,UAAA;AAClB,IAAA,IAAA,CAAK,IAAO,GAAA,uBAAA;AAAA;AAEhB","file":"unstable.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @experimental This feature is experimental and might change in the future.\n *\n * Uploads a media item to the media property of the specified object type.\n *\n * @param data - Data to upload as media item\n * @param fileName - Name that will be assigned as path to the uploaded media item.\n * @param objectType - Object type to which the media item will be uploaded.\n * @param propertyType - Media reference property of the corresponding object type to which the media item will be uploaded.\n *\n * @returns media reference of the uploaded media item.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks\",\n type: \"experiment\",\n version: \"2.0.8\"\n};","/*\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 const SourcePrimaryKeySymbol = Symbol.for(\"osdk.query.$sourcePk\");\nconst LegacyShapesSymbol = Symbol.for(\"osdk.shapes.$primaryKey\");\nexport function isSourcePkSymbol(value) {\n return typeof value === \"symbol\" && (value === SourcePrimaryKeySymbol || value === LegacyShapesSymbol);\n}\n\n/** Configuration for how a derived link is loaded at runtime. */\n\n/** The result of calling `ShapeLinkBuilder.as()`, binding a link traversal to a target shape. */\n\n/** A single link traversal step in a derived link's object set definition. */\n\n/** Sort clause for a derived link's result set. */\n\n/** A set operation (union/intersect/subtract) applied to a derived link's object set. */\n\n/** Serializable definition of a derived link's object set: link traversals, filters, ordering, and set operations. */\n\n/** How a shape handles null values for a selected property. */\n\n/** Per-property configuration stored in a shape's `__props` map. */\n\n/** A derived link definition stored in a shape's `__derivedLinks` array. */\n\n/**\n * Type projection from an OSDK type. `__props` is the single source of truth for property config.\n *\n * @typeParam BASE - The base ObjectTypeDefinition or InterfaceDefinition\n * @typeParam SELECTED_PROPS - Record of selected properties and their transformed types\n * @typeParam DERIVED_LINKS - Record of derived link names to their result types\n */\n\nexport class ShapeNullabilityError extends Error {\n constructor(shape, violations) {\n const props = violations.map(v => v.property).join(\", \");\n const shapeName = shape.__debugName ?? shape.__shapeId;\n super(`Shape \"${shapeName}\" requires these properties to be non-null: ${props}`);\n this.shape = shape;\n this.violations = violations;\n this.name = \"ShapeNullabilityError\";\n }\n}"]}
|