@osdk/api 2.7.0-rc.15 → 2.8.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +1 -38
  2. package/build/browser/OsdkObjectFrom.js.map +1 -1
  3. package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
  4. package/build/browser/index.js.map +1 -1
  5. package/build/browser/object/FetchPageArgs.js.map +1 -1
  6. package/build/browser/object/PropertySecurity.js +2 -0
  7. package/build/browser/object/PropertySecurity.js.map +1 -0
  8. package/build/browser/objectSet/ObjectSet.js.map +1 -1
  9. package/build/browser/objectSet/ObjectSet.test.js +22 -0
  10. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  11. package/build/cjs/{ObjectSet-CADY0fcl.d.cts → ObjectSet-CqVqDXKn.d.cts} +102 -18
  12. package/build/cjs/index.d.cts +2 -2
  13. package/build/cjs/public/unstable.d.cts +2 -2
  14. package/build/esm/OsdkObjectFrom.js.map +1 -1
  15. package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
  16. package/build/esm/index.js.map +1 -1
  17. package/build/esm/object/FetchPageArgs.js.map +1 -1
  18. package/build/esm/object/PropertySecurity.js +2 -0
  19. package/build/esm/object/PropertySecurity.js.map +1 -0
  20. package/build/esm/objectSet/ObjectSet.js.map +1 -1
  21. package/build/esm/objectSet/ObjectSet.test.js +22 -0
  22. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  23. package/build/types/OsdkObjectFrom.d.ts +17 -8
  24. package/build/types/OsdkObjectFrom.d.ts.map +1 -1
  25. package/build/types/derivedProperties/DerivedProperty.d.ts +10 -1
  26. package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
  27. package/build/types/index.d.ts +2 -0
  28. package/build/types/index.d.ts.map +1 -1
  29. package/build/types/object/FetchPageArgs.d.ts +9 -5
  30. package/build/types/object/FetchPageArgs.d.ts.map +1 -1
  31. package/build/types/object/PropertySecurity.d.ts +61 -0
  32. package/build/types/object/PropertySecurity.d.ts.map +1 -0
  33. package/build/types/objectSet/ObjectSet.d.ts +16 -11
  34. package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
  35. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,10 +1,6 @@
1
1
  # @osdk/api
2
2
 
3
- ## 2.7.0-rc.15
4
-
5
- ### Patch Changes
6
-
7
- - 31cd835: Revert beta changes
3
+ ## 2.8.0-beta.2
8
4
 
9
5
  ## 2.7.0-beta.14
10
6
 
@@ -61,39 +57,6 @@
61
57
 
62
58
  ## 2.7.0-beta.2
63
59
 
64
- ## 2.6.0
65
-
66
- ### Patch Changes
67
-
68
- - 322c5bc: Simulated release
69
-
70
- - f7ae38a: Allow exact matching for arrays of structs
71
-
72
- - 486ef7e: Deprecate multiplicity in query params/outputs
73
-
74
- - ea077c6: Change asType to narrowToType
75
-
76
- - 3d7dc0a: introduce new token field, note readToken as deprecated
77
-
78
- - 2556c64: Fix asType types to accept any interface when casting from an interface with no implementing object types
79
-
80
- - 5a9cd8f: Remove NULL_VALUE from @osdk/api for RC
81
-
82
- - b307201: Add edits support for media reference.
83
-
84
- - e7bf02a: Add RDP support to React toolkit
85
-
86
- - a1ffb20: Use new ephemeral media upload endpoint.
87
-
88
- - b959085: Fix nested array query param type handling
89
-
90
- - af4f3bf: Remove the following features for RC:
91
- - Property formatting
92
- - Branching
93
- - Constant RDPs
94
-
95
- - e62c692: Allow all applicable filters for struct sub properties to be applied on struct arrays
96
-
97
60
  ## 2.6.0-beta.13
98
61
 
99
62
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"OsdkObjectFrom.js","names":["Osdk"],"sources":["OsdkObjectFrom.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n DefaultToFalse,\n OsdkObjectLinksObject,\n} from \"./definitions/LinkDefinitions.js\";\nimport type {\n NullabilityAdherence,\n ObjectSetArgs,\n} from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\ntype NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}`\n ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}`\n : Before\n : never;\n\ntype MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> =\n S extends `${NamespaceOf<S>}.${infer Rest}`\n ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S\n : S;\n\nexport type PropMapToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n> = NonNullable<\n CompileTimeMetadata<FROM>[\"inverseInterfaceMap\"]\n>[ApiNameAsString<TO>];\n\nexport type MapPropNamesToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n P extends ValidOsdkPropParams<FROM>,\n> = MaybeStripNamespaces<\n PropMapToInterface<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>],\n TO\n>;\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport type MaybeScore<\n T extends Osdk.Instance<any>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>,\n> = ORDER_BY_OPTIONS extends \"relevance\" ? T & { $score: number } : T;\n\nexport namespace Osdk {\n export type Instance<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n & Pick<\n CompileTimeMetadata<Q>[\"props\"],\n // If there aren't any additional properties, then we want GetPropsKeys to default to PropertyKeys<Q>\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n & ([R] extends [never] ? {}\n : { [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]> })\n & {\n readonly $link: Q extends { linksType?: any } ? Q[\"linksType\"]\n : Q extends ObjectOrInterfaceDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: ObjectMetadata;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue: <\n PropertyApiName extends PropertyKeys<Q>,\n >(\n propertyApiName: PropertyApiName,\n options?: { locale?: string; timezoneId?: string },\n ) => string | undefined;\n }\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0GA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AA0BA;AACA;AACA;AAFA,WA2BiBA,IAAI;AA6DrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
1
+ {"version":3,"file":"OsdkObjectFrom.js","names":["Osdk"],"sources":["OsdkObjectFrom.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n DefaultToFalse,\n OsdkObjectLinksObject,\n} from \"./definitions/LinkDefinitions.js\";\nimport type {\n NullabilityAdherence,\n ObjectSetArgs,\n} from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type { PropertySecurity } from \"./object/PropertySecurity.js\";\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends\n | never\n | \"$rid\"\n | \"$allBaseProperties\"\n | \"$propertySecurities\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\ntype NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}`\n ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}`\n : Before\n : never;\n\ntype MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> =\n S extends `${NamespaceOf<S>}.${infer Rest}`\n ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S\n : S;\n\nexport type PropMapToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n> = NonNullable<\n CompileTimeMetadata<FROM>[\"inverseInterfaceMap\"]\n>[ApiNameAsString<TO>];\n\nexport type MapPropNamesToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n P extends ValidOsdkPropParams<FROM>,\n> = MaybeStripNamespaces<\n PropMapToInterface<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>],\n TO\n>;\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends\n | never\n | \"$rid\"\n | \"$allBaseProperties\"\n | \"$propertySecurities\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport type MaybeScore<\n T extends Osdk.Instance<any>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>,\n> = ORDER_BY_OPTIONS extends \"relevance\" ? T & { $score: number } : T;\n\nexport namespace Osdk {\n export type Instance<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends\n | never\n | \"$rid\"\n | \"$allBaseProperties\"\n | \"$propertySecurities\" = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n & Pick<\n CompileTimeMetadata<Q>[\"props\"],\n // If there aren't any additional properties, then we want GetPropsKeys to default to PropertyKeys<Q>\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n & ([R] extends [never] ? {}\n : { [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]> })\n & {\n readonly $link: Q extends { linksType?: any } ? Q[\"linksType\"]\n : Q extends ObjectOrInterfaceDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: ObjectMetadata;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue: <\n PropertyApiName extends PropertyKeys<Q>,\n >(\n propertyApiName: PropertyApiName,\n options?: { locale?: string; timezoneId?: string },\n ) => string | undefined;\n }\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$propertySecurities\" extends OPTIONS ? {\n readonly $propertySecurities: ObjectPropertySecurities<\n Q,\n GetPropsKeys<\n Q,\n P,\n [R] extends [{}] ? false : true\n >\n >;\n }\n : {})\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractPropertySecurityOption<S extends boolean> = // comment for readability\n IsNever<S> extends true ? never\n : DefaultToFalse<S> extends false ? never\n : \"$propertySecurities\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n RID extends boolean,\n UNUSED extends NullabilityAdherence = NullabilityAdherence.Default,\n ALL_PROPERTIES extends boolean = false,\n PROPERTY_SECURITIES extends boolean = false,\n> =\n | ExtractRidOption<RID>\n | ExtractAllPropertiesOption<ALL_PROPERTIES>\n | ExtractPropertySecurityOption<PROPERTY_SECURITIES>;\n\ntype ObjectPropertySecurities<\n Q extends ObjectOrInterfaceDefinition,\n T extends PropertyKeys<Q>,\n> = {\n [K in T]: CompileTimeMetadata<Q>[\"properties\"][K][\"multiplicity\"] extends true\n ? PropertySecurity[][]\n : PropertySecurity[];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA+GA;AACA;AACA;AACA;AACA;AACA;AACA;AA4BA;AA0BA;AACA;AACA;AAFA,WA2BiBA,IAAI;AA8ErB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAgBA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Creator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n > = (\n baseObjectSet: Builder<Q, false>,\n ) =>\n | Definition<T, Q>\n | NumericPropertyDefinition<T, Q>\n | DatetimePropertyDefinition<T, Q>;\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: Creator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Creator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n > = (\n baseObjectSet: Builder<Q, false>,\n ) =>\n | Definition<T, Q>\n | NumericPropertyDefinition<T, Q>\n | DatetimePropertyDefinition<T, Q>;\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: Creator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Constant<Q extends ObjectOrInterfaceDefinition> = {\n readonly constant: {\n readonly double: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly integer: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"integer\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly long: (\n value: string,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"long\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly datetime: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"datetime\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly timestamp: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"timestamp\", \"non-nullable\", \"single\">,\n Q\n >;\n };\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport { type DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type { Logger } from \"./Logger.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nexport type { PropertyBooleanFormattingRule } from \"./ontology/valueFormatting/PropertyBooleanFormattingRule.js\";\nexport type {\n DatetimeFormat,\n DatetimeLocalizedFormat,\n DatetimeLocalizedFormatType,\n DatetimeStringFormat,\n DatetimeTimezone,\n DatetimeTimezoneStatic,\n DatetimeTimezoneUser,\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"./ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js\";\nexport type {\n KnownType,\n PropertyKnownTypeFormattingRule,\n} from \"./ontology/valueFormatting/PropertyKnownTypeFormattingRule.js\";\nexport type {\n Affix,\n DurationBaseValue,\n DurationFormatStyle,\n DurationPrecision,\n HumanReadableFormat,\n NumberFormatAffix,\n NumberFormatCurrency,\n NumberFormatCurrencyStyle,\n NumberFormatCustomUnit,\n NumberFormatDuration,\n NumberFormatFixedValues,\n NumberFormatNotation,\n NumberFormatOptions,\n NumberFormatRatio,\n NumberFormatScale,\n NumberFormatStandard,\n NumberFormatStandardUnit,\n NumberRatioType,\n NumberRoundingMode,\n NumberScaleType,\n PropertyNumberFormattingRule,\n PropertyNumberFormattingRuleType,\n TimeCodeFormat,\n} from \"./ontology/valueFormatting/PropertyNumberFormattingRule.js\";\nexport type { PropertyValueFormattingRule } from \"./ontology/valueFormatting/PropertyValueFormattingRule.js\";\nexport type {\n PropertyTypeReference,\n PropertyTypeReferenceOrStringConstant,\n StringConstant,\n} from \"./ontology/valueFormatting/PropertyValueFormattingUtils.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type {\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./queries/Aggregations.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AAqC5D,SAASC,IAAI,QAAQ,oBAAoB;;AA+FzC;;AAUA,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport { type DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type { Logger } from \"./Logger.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} from \"./object/Media.js\";\nexport 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;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AAyC5D,SAASC,IAAI,QAAQ,oBAAoB;;AAoGzC;;AAUA,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never,\n> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {},\n> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n> extends\n SelectArg<Q, K, R, S, RDP_KEYS>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS>\n{\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB;AAAA,WAIpBC,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n PROPERTY_SECURITIES extends boolean = false,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n $loadPropertySecurityMetadata?: PROPERTY_SECURITIES;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never,\n> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> extends\n AsyncIterArgs<\n Q,\n K,\n R,\n A,\n S,\n T,\n RDP_KEYS,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES\n >\n{\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n PROPERTY_SECURITIES extends boolean = false,\n> extends\n SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS>\n{\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB;AAAA,WAIpBC,aAAa","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PropertySecurity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertySecurity.js","names":[],"sources":["PropertySecurity.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A discriminated union representing different types of property security outcomes.\n *\n * @discriminator type - The type field determines which security outcome is represented:\n * - \"propertyMarkings\": Successfully computed security markings for the property\n * - \"unsupportedPolicy\": The property is backed by a restricted view that doesn't support property securities\n * - \"errorComputingSecurity\": The server was unable to load the securities of the property\n */\nexport type PropertySecurity =\n | ({\n type: \"propertyMarkings\";\n } & PropertyMarkings)\n | ({\n type: \"unsupportedPolicy\";\n })\n | ({\n type: \"errorComputingSecurity\";\n });\n\n/**\n * All marking requirements applicable to a property value.\n *\n * Markings represent security classifications or access control requirements\n * that must be satisfied to access the property value.\n */\nexport interface PropertyMarkings {\n /**\n * The conjunctive set of markings required to access the property value.\n * All markings from a conjunctive set must be met for access.\n */\n conjunctive?: Array<MarkingId>;\n /**\n * The disjunctive set of markings required to access the property value.\n *\n * Disjunctive markings are represented as a conjunctive list of disjunctive sets.\n * The top-level array is a conjunction of sets, where each inner array should be\n * treated as a unit where any marking within the set can satisfy the set.\n * All sets within the top level array must be satisfied.\n */\n disjunctive?: Array<Array<MarkingId>>;\n /**\n * The conjunctive set of markings for the container of this property value,\n * such as the project of a dataset. These markings may differ from the marking\n * on the actual property value, but still must be satisfied for accessing the property.\n *\n * All markings from a conjunctive set must be met for access.\n */\n containerConjunctive?: Array<MarkingId>;\n /**\n * The disjunctive set of markings for the container of this property value,\n * such as the project of a dataset. These markings may differ from the marking\n * on the actual property value, but still must be satisfied for accessing the property.\n *\n * Disjunctive markings are represented as a conjunctive list of disjunctive sets.\n * The top-level array is a conjunction of sets, where each inner array should be\n * treated as a unit where any marking within the set can satisfy the set.\n * All sets within the top level array must be satisfied.\n */\n containerDisjunctive?: Array<Array<MarkingId>>;\n}\n\n/**\n * A unique identifier for a security marking.\n * Markings represent security classifications or access control requirements.\n */\nexport type MarkingId = string;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type {\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./ObjectSetLinks.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends\n | BaseObjectSet<any>\n | Record<string, SimplePropertyDef>,\n> = [D] extends [never] ? {}\n : D extends BaseObjectSet<any> ? {}\n : D extends Record<string, SimplePropertyDef> ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never] ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never,\n> = SubSelectKeysHelper<Q, Extract$Select<X>>;\n\ntype NOOP<T> = T extends (...args: any[]) => any ? T\n : T extends abstract new(...args: any[]) => any ? T\n : { [K in keyof T]: T[K] };\n\ntype SubSelectRDPsHelper<\n X extends ValidFetchPageArgs<any, any, any> | ValidAsyncIterArgs<any, any>,\n DEFAULT extends string,\n> = [X] extends [never] ? DEFAULT\n : (X[\"$select\"] & string[])[number] & DEFAULT;\n\ntype SubSelectRDPs<\n RDPs extends Record<string, SimplePropertyDef>,\n X extends ValidFetchPageArgs<any, RDPs, any> | ValidAsyncIterArgs<any, RDPs>,\n> = [RDPs] extends [never] ? never\n : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K] }>;\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs, ORDER_BY_OPTIONS>,\n Where<Q, RDPs>,\n AsyncIterLinks<Q>\n{\n}\n\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never] ? never\n :\n | ExtractRidOption<X[\"$includeRid\"] extends true ? true : false>\n | ExtractAllPropertiesOption<\n X[\"$includeAllBaseObjectProperties\"] extends true ? true : false\n >;\n\ntype Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<\n X[\"$select\"]\n>[number];\n\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly fetchPage: FetchPageSignature<Q, RDPs>;\n readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;\n}\n\ntype ValidFetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>>,\n> = ObjectSetArgs.FetchPage<\n Q,\n PropertyKeys<Q>,\n boolean,\n string & keyof RDPs,\n ORDER_BY_OPTIONS\n>;\n\ntype ValidAsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> =\n | ObjectSetArgs.AsyncIter<\n Q,\n PropertyKeys<Q>,\n false,\n string & keyof RDPs\n >\n | AsyncIterArgs<\n Q,\n never,\n any,\n any,\n any,\n true,\n string & keyof RDPs\n >;\n\ninterface FetchPageSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n const myObjsResult = myObjs.data;\n\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n value, all objects will be returned. This value is limited to 1 &le; numNeighbors &ge; 500.\n * @param property - The property key with a defined embedding model to search over.\n *\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * await client(Office).where({\n meetingRooms: { $contains: \"Grand Central\" },\n meetingRoomCapacities: { $contains: 30 },\n});\n* @returns an objectSet\n */\n readonly where: (\n clause: WhereClause<MergeObjectSet<Q, RDPs>>,\n ) => this;\n}\n\ninterface AsyncIterSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n >(\n args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(\n clause: { [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]> },\n ) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN]\n : NN extends keyof RDPs ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends\n | BaseObjectSet<Q>\n | Record<string, SimplePropertyDef> = never,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n >\n{\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n .aggregate({\n $select: {\n $count: \"unordered\",\n \"latitude:max\": \"unordered\",\n \"latitude:min\": \"unordered\",\n \"latitude:avg\": \"unordered\",\n },\n $groupBy: {\n usState: \"exact\",\n longitude: {\n $fixedWidth: 10,\n },\n },\n });\n\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ): Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ): Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @returns an object set of the specified type.\n */\n readonly narrowToType: <\n CONVERT_TO extends RestrictToImplementingObjectTypes<Q>,\n >(\n type: CONVERT_TO,\n ) => ObjectSet<CONVERT_TO>;\n}\n\ntype RestrictToImplementingObjectTypes<T extends ObjectOrInterfaceDefinition> =\n T extends ObjectTypeDefinition ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string ? InterfaceDefinition & { apiName: API_NAME }\n : never\n : never;\n\ntype ExtractImplementingTypes<T extends InterfaceDefinition> =\n CompileTimeMetadata<T> extends\n { implementedBy: ReadonlyArray<infer API_NAME extends string> }\n ? (ObjectTypeDefinition & { apiName: API_NAME }) | InterfaceDefinition\n : InterfaceDefinition;\n\ninterface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Batch load links on an object set. This is an experimental method that may change while in beta.\n * Use this method in conjunction with `.asyncIter()` and `.pivotTo(...).asyncIter()` to build an\n * object graph in memory.\n *\n * Please keep these limitations in mind:\n * - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * - The backend API fetches pages of *n* objects at a time. If, for any page of *n* objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * - This method does not support OSv1 links and will throw an exception if links provided are backed by OSv1.\n * - This method currently does not support interface links, but support will be added in the near future.\n */\n readonly experimental_asyncIterLinks: <\n LINK_TYPE_API_NAME extends LinkTypeApiNamesFor<Q>,\n >(\n links: LINK_TYPE_API_NAME[],\n ) => AsyncIterableIterator<\n MinimalDirectedObjectLinkInstance<Q, LINK_TYPE_API_NAME>\n >;\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n Subscribe<MERGED>,\n NearestNeighbors<Q>,\n NarrowToType<Q>\n{\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type {\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./ObjectSetLinks.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends\n | BaseObjectSet<any>\n | Record<string, SimplePropertyDef>,\n> = [D] extends [never] ? {}\n : D extends BaseObjectSet<any> ? {}\n : D extends Record<string, SimplePropertyDef> ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never] ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any, any, any> = never,\n> = SubSelectKeysHelper<Q, Extract$Select<X>>;\n\ntype NOOP<T> = T extends (...args: any[]) => any ? T\n : T extends abstract new(...args: any[]) => any ? T\n : { [K in keyof T]: T[K] };\n\ntype SubSelectRDPsHelper<\n X extends ValidFetchPageArgs<any, any, any> | ValidAsyncIterArgs<any, any>,\n DEFAULT extends string,\n> = [X] extends [never] ? DEFAULT\n : (X[\"$select\"] & string[])[number] & DEFAULT;\n\ntype SubSelectRDPs<\n RDPs extends Record<string, SimplePropertyDef>,\n X extends ValidFetchPageArgs<any, RDPs, any> | ValidAsyncIterArgs<any, RDPs>,\n> = [RDPs] extends [never] ? never\n : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K] }>;\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs, ORDER_BY_OPTIONS>,\n Where<Q, RDPs>,\n AsyncIterLinks<Q>\n{\n}\n\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never] ? never\n :\n | ExtractRidOption<X[\"$includeRid\"] extends true ? true : false>\n | ExtractAllPropertiesOption<\n X[\"$includeAllBaseObjectProperties\"] extends true ? true : false\n >;\n\ntype Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<\n X[\"$select\"]\n>[number];\n\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly fetchPage: FetchPageSignature<Q, RDPs>;\n readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;\n}\n\ntype ValidFetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>>,\n> = ObjectSetArgs.FetchPage<\n Q,\n PropertyKeys<Q>,\n boolean,\n string & keyof RDPs,\n ORDER_BY_OPTIONS\n>;\n\ntype ValidAsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> =\n | ObjectSetArgs.AsyncIter<\n Q,\n PropertyKeys<Q>,\n false,\n string & keyof RDPs\n >\n | AsyncIterArgs<\n Q,\n never,\n any,\n any,\n any,\n true,\n string & keyof RDPs\n >;\n\ninterface FetchPageSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n const myObjsResult = myObjs.data;\n\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n PROPERTY_SECURITIES extends boolean = false,\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES\n >,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n value, all objects will be returned. This value is limited to 1 &le; numNeighbors &ge; 500.\n * @param property - The property key with a defined embedding model to search over.\n *\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES\n >,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * await client(Office).where({\n meetingRooms: { $contains: \"Grand Central\" },\n meetingRoomCapacities: { $contains: 30 },\n});\n* @returns an objectSet\n */\n readonly where: (\n clause: WhereClause<MergeObjectSet<Q, RDPs>>,\n ) => this;\n}\n\ninterface AsyncIterSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES\n >,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(\n clause: { [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]> },\n ) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN]\n : NN extends keyof RDPs ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends\n | BaseObjectSet<Q>\n | Record<string, SimplePropertyDef> = never,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n >\n{\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n .aggregate({\n $select: {\n $count: \"unordered\",\n \"latitude:max\": \"unordered\",\n \"latitude:min\": \"unordered\",\n \"latitude:avg\": \"unordered\",\n },\n $groupBy: {\n usState: \"exact\",\n longitude: {\n $fixedWidth: 10,\n },\n },\n });\n\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @returns an object set of the specified type.\n */\n readonly narrowToType: <\n CONVERT_TO extends RestrictToImplementingObjectTypes<Q>,\n >(\n type: CONVERT_TO,\n ) => ObjectSet<CONVERT_TO>;\n}\n\ntype RestrictToImplementingObjectTypes<T extends ObjectOrInterfaceDefinition> =\n T extends ObjectTypeDefinition ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string ? InterfaceDefinition & { apiName: API_NAME }\n : never\n : never;\n\ntype ExtractImplementingTypes<T extends InterfaceDefinition> =\n CompileTimeMetadata<T> extends\n { implementedBy: ReadonlyArray<infer API_NAME extends string> }\n ? (ObjectTypeDefinition & { apiName: API_NAME }) | InterfaceDefinition\n : InterfaceDefinition;\n\ninterface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Batch load links on an object set. This is an experimental method that may change while in beta.\n * Use this method in conjunction with `.asyncIter()` and `.pivotTo(...).asyncIter()` to build an\n * object graph in memory.\n *\n * Please keep these limitations in mind:\n * - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * - The backend API fetches pages of *n* objects at a time. If, for any page of *n* objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * - This method does not support OSv1 links and will throw an exception if links provided are backed by OSv1.\n * - This method currently does not support interface links, but support will be added in the near future.\n */\n readonly experimental_asyncIterLinks: <\n LINK_TYPE_API_NAME extends LinkTypeApiNamesFor<Q>,\n >(\n links: LINK_TYPE_API_NAME[],\n ) => AsyncIterableIterator<\n MinimalDirectedObjectLinkInstance<Q, LINK_TYPE_API_NAME>\n >;\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n Subscribe<MERGED>,\n NearestNeighbors<Q>,\n NarrowToType<Q>\n{\n}\n"],"mappings":"","ignoreList":[]}
@@ -503,6 +503,17 @@ describe("ObjectSet", () => {
503
503
  }
504
504
  });
505
505
  });
506
+ it("allows adding literals via base.constant", () => {
507
+ fauxObjectSet.withProperties({
508
+ "myProp1": base => {
509
+ const plus = base.pivotTo("lead").selectProperty("employeeId").add(base.constant.double(1));
510
+ expectTypeOf(plus).toEqualTypeOf();
511
+ const intPlusIntReturnsInt = base.pivotTo("lead").selectProperty("employeeId").add(base.constant.integer(1));
512
+ expectTypeOf(intPlusIntReturnsInt).toEqualTypeOf();
513
+ return plus;
514
+ }
515
+ });
516
+ });
506
517
  it("allows correctly typed nested property definitions", () => {
507
518
  fauxObjectSet.withProperties({
508
519
  "myProp1": base => {
@@ -548,6 +559,17 @@ describe("ObjectSet", () => {
548
559
  }
549
560
  });
550
561
  });
562
+ it("allows adding literals via base.constant", () => {
563
+ fauxObjectSet.withProperties({
564
+ "myProp1": base => {
565
+ const dateAndDateReturnDate = base.pivotTo("lead").selectProperty("dateOfJoining").min(base.constant.datetime("2025-01-01T00:00:00Z"));
566
+ expectTypeOf(dateAndDateReturnDate).toEqualTypeOf();
567
+ const dateAndTimeReturnTime = base.pivotTo("lead").selectProperty("dateOfJoining").min(base.constant.timestamp("2025-01-01T00:00:00Z"));
568
+ expectTypeOf(dateAndTimeReturnTime).toEqualTypeOf();
569
+ return dateAndTimeReturnTime;
570
+ }
571
+ });
572
+ });
551
573
  it("allows correctly typed nested property definitions", () => {
552
574
  fauxObjectSet.withProperties({
553
575
  "myProp1": base => {