@osdk/api 2.7.0-beta.1 → 2.7.0-beta.10

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 (65) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/build/browser/OsdkObjectFrom.js.map +1 -1
  3. package/build/browser/aggregate/BaseFilter.js.map +1 -1
  4. package/build/browser/aggregate/BooleanFilter.js.map +1 -1
  5. package/build/browser/aggregate/StringFilter.js.map +1 -1
  6. package/build/browser/experimental/fetchOneByRid.js.map +1 -1
  7. package/build/browser/index.js +0 -1
  8. package/build/browser/index.js.map +1 -1
  9. package/build/browser/object/FetchPageArgs.js.map +1 -1
  10. package/build/browser/object/Media.js.map +1 -1
  11. package/build/browser/object/PropertySecurity.js +2 -0
  12. package/build/browser/object/PropertySecurity.js.map +1 -0
  13. package/build/browser/objectSet/ObjectSet.js.map +1 -1
  14. package/build/browser/objectSet/ObjectSet.test.js +45 -1
  15. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  16. package/build/browser/objectSet/ObjectSetLinks.js +2 -0
  17. package/build/browser/objectSet/ObjectSetLinks.js.map +1 -0
  18. package/build/browser/ontology/QueryDefinition.js.map +1 -1
  19. package/build/cjs/{ObjectSet-Dtb6G0ll.d.cts → ObjectSet-DlNhU1QE.d.cts} +127 -18
  20. package/build/cjs/index.cjs +0 -4
  21. package/build/cjs/index.cjs.map +1 -1
  22. package/build/cjs/index.d.cts +3 -7
  23. package/build/cjs/public/unstable.d.cts +3 -3
  24. package/build/esm/OsdkObjectFrom.js.map +1 -1
  25. package/build/esm/aggregate/BaseFilter.js.map +1 -1
  26. package/build/esm/aggregate/BooleanFilter.js.map +1 -1
  27. package/build/esm/aggregate/StringFilter.js.map +1 -1
  28. package/build/esm/experimental/fetchOneByRid.js.map +1 -1
  29. package/build/esm/index.js +0 -1
  30. package/build/esm/index.js.map +1 -1
  31. package/build/esm/object/FetchPageArgs.js.map +1 -1
  32. package/build/esm/object/Media.js.map +1 -1
  33. package/build/esm/object/PropertySecurity.js +2 -0
  34. package/build/esm/object/PropertySecurity.js.map +1 -0
  35. package/build/esm/objectSet/ObjectSet.js.map +1 -1
  36. package/build/esm/objectSet/ObjectSet.test.js +45 -1
  37. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  38. package/build/esm/objectSet/ObjectSetLinks.js +2 -0
  39. package/build/esm/objectSet/ObjectSetLinks.js.map +1 -0
  40. package/build/esm/ontology/QueryDefinition.js.map +1 -1
  41. package/build/types/OsdkObjectFrom.d.ts +17 -8
  42. package/build/types/OsdkObjectFrom.d.ts.map +1 -1
  43. package/build/types/aggregate/BaseFilter.d.ts +3 -0
  44. package/build/types/aggregate/BaseFilter.d.ts.map +1 -1
  45. package/build/types/aggregate/BooleanFilter.d.ts.map +1 -1
  46. package/build/types/aggregate/StringFilter.d.ts +3 -0
  47. package/build/types/aggregate/StringFilter.d.ts.map +1 -1
  48. package/build/types/experimental/fetchOneByRid.d.ts +2 -3
  49. package/build/types/experimental/fetchOneByRid.d.ts.map +1 -1
  50. package/build/types/index.d.ts +2 -1
  51. package/build/types/index.d.ts.map +1 -1
  52. package/build/types/object/FetchPageArgs.d.ts +9 -5
  53. package/build/types/object/FetchPageArgs.d.ts.map +1 -1
  54. package/build/types/object/Media.d.ts +2 -0
  55. package/build/types/object/Media.d.ts.map +1 -1
  56. package/build/types/object/PropertySecurity.d.ts +61 -0
  57. package/build/types/object/PropertySecurity.d.ts.map +1 -0
  58. package/build/types/objectSet/ObjectSet.d.ts +33 -12
  59. package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
  60. package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -1
  61. package/build/types/objectSet/ObjectSetLinks.d.ts +24 -0
  62. package/build/types/objectSet/ObjectSetLinks.d.ts.map +1 -0
  63. package/build/types/ontology/QueryDefinition.d.ts +0 -4
  64. package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
  65. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @osdk/api
2
2
 
3
+ ## 2.7.0-beta.10
4
+
5
+ ### Minor Changes
6
+
7
+ - db44f6b: Add property security metadata to objects when requested
8
+ - 24a1e29: Remove multiplicity tag from query param types
9
+
10
+ ## 2.7.0-beta.9
11
+
12
+ ## 2.7.0-beta.8
13
+
14
+ ## 2.7.0-beta.7
15
+
16
+ ## 2.7.0-beta.6
17
+
18
+ ### Minor Changes
19
+
20
+ - c9ca08d: Add TS docs for in filter
21
+
22
+ ## 2.7.0-beta.5
23
+
24
+ ## 2.7.0-beta.4
25
+
26
+ ### Minor Changes
27
+
28
+ - 1e3c147: Add experimental_asyncIterLinks method on object sets
29
+
30
+ ## 2.7.0-beta.3
31
+
32
+ ### Minor Changes
33
+
34
+ - 448763f: introduce new token field, note readToken as deprecated
35
+
36
+ ## 2.7.0-beta.2
37
+
3
38
  ## 2.6.0-beta.13
4
39
 
5
40
  ### 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":"BaseFilter.js","names":["EqFilter","BaseFilter"],"sources":["BaseFilter.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 { Just } from \"./Just.js\";\n\ntype EqFilterOption<T> = {\n \"$eq\": T;\n};\n\nexport namespace EqFilter {\n export interface $eq<T> extends Just<\"$eq\", EqFilterOption<T>> {}\n}\n\nexport interface BaseFilterOptions<T> extends EqFilterOption<T> {\n \"$ne\": T;\n \"$isNull\": boolean;\n \"$in\": ReadonlyArray<T>;\n}\n\nexport namespace BaseFilter {\n export interface $eq<T> extends Just<\"$eq\", BaseFilterOptions<T>> {}\n export interface $ne<T> extends Just<\"$ne\", BaseFilterOptions<T>> {}\n export interface $in<T> extends Just<\"$in\", BaseFilterOptions<T>> {}\n export interface $isNull<T> extends Just<\"$isNull\", BaseFilterOptions<T>> {}\n}\n\nexport type BaseFilter<T> =\n | BaseFilter.$eq<T>\n | BaseFilter.$ne<T>\n | BaseFilter.$in<T>\n | BaseFilter.$isNull<T>;\n\n/** @internal */\nexport type CatchThemAll<T> = CatchThemAllInternal<T, keyof T>;\n\n// extends for union distribution\n/** @internal */\ntype CatchThemAllInternal<T, K extends keyof T> = K extends keyof T\n ? { [k in K]: T[k] }\n : never;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAsBiBA,QAAQ;AAAA,WAURC,UAAU;AAa3B;AAGA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"BaseFilter.js","names":["EqFilter","BaseFilter"],"sources":["BaseFilter.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 { Just } from \"./Just.js\";\n\ntype EqFilterOption<T> = {\n \"$eq\": T;\n};\n\nexport namespace EqFilter {\n export interface $eq<T> extends Just<\"$eq\", EqFilterOption<T>> {}\n}\n\nexport interface BaseFilterOptions<T> extends EqFilterOption<T> {\n \"$ne\": T;\n \"$isNull\": boolean;\n /**\n * Matches any of the provided values. If an empty array is provided, the filter will match all objects.\n */\n \"$in\": ReadonlyArray<T>;\n}\n\nexport namespace BaseFilter {\n export interface $eq<T> extends Just<\"$eq\", BaseFilterOptions<T>> {}\n export interface $ne<T> extends Just<\"$ne\", BaseFilterOptions<T>> {}\n export interface $in<T> extends Just<\"$in\", BaseFilterOptions<T>> {}\n export interface $isNull<T> extends Just<\"$isNull\", BaseFilterOptions<T>> {}\n}\n\nexport type BaseFilter<T> =\n | BaseFilter.$eq<T>\n | BaseFilter.$ne<T>\n | BaseFilter.$in<T>\n | BaseFilter.$isNull<T>;\n\n/** @internal */\nexport type CatchThemAll<T> = CatchThemAllInternal<T, keyof T>;\n\n// extends for union distribution\n/** @internal */\ntype CatchThemAllInternal<T, K extends keyof T> = K extends keyof T\n ? { [k in K]: T[k] }\n : never;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAsBiBA,QAAQ;AAAA,WAaRC,UAAU;AAa3B;AAGA;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"BooleanFilter.js","names":["BooleanFilter","_typeCheck"],"sources":["BooleanFilter.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 { BaseFilterOptions, CatchThemAll } from \"./BaseFilter.js\";\nimport type { Just } from \"./Just.js\";\n\ninterface BooleanFilterOptions extends BaseFilterOptions<boolean> {}\n\nexport namespace BooleanFilter {\n export interface $eq extends Just<\"$eq\", BooleanFilterOptions> {}\n export interface $ne extends Just<\"$ne\", BooleanFilterOptions> {}\n export interface $isNull extends Just<\"$isNull\", BooleanFilterOptions> {}\n export interface $in extends Just<\"$in\", BooleanFilterOptions> {}\n}\nexport type BooleanFilter =\n | boolean\n | BooleanFilter.$eq\n | BooleanFilter.$ne\n | BooleanFilter.$in\n | BooleanFilter.$isNull;\n\n/** @internal */\nfunction _typeCheck() {\n const b: BooleanFilter = {} as CatchThemAll<BooleanFilterOptions>;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqBiBA,aAAa;AAa9B;AACA,SAASC,UAAUA,CAAA,EAAG,CAEtB","ignoreList":[]}
1
+ {"version":3,"file":"BooleanFilter.js","names":["BooleanFilter","_typeCheck"],"sources":["BooleanFilter.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 { BaseFilterOptions, CatchThemAll } from \"./BaseFilter.js\";\nimport type { Just } from \"./Just.js\";\n\ninterface BooleanFilterOptions extends BaseFilterOptions<boolean> {}\n\nexport namespace BooleanFilter {\n export interface $eq extends Just<\"$eq\", BooleanFilterOptions> {}\n export interface $ne extends Just<\"$ne\", BooleanFilterOptions> {}\n export interface $isNull extends Just<\"$isNull\", BooleanFilterOptions> {}\n /**\n * Matches any of the provided values. If an empty array is provided, the filter will match all objects.\n */\n export interface $in extends Just<\"$in\", BooleanFilterOptions> {}\n}\nexport type BooleanFilter =\n | boolean\n | BooleanFilter.$eq\n | BooleanFilter.$ne\n | BooleanFilter.$in\n | BooleanFilter.$isNull;\n\n/** @internal */\nfunction _typeCheck() {\n const b: BooleanFilter = {} as CatchThemAll<BooleanFilterOptions>;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqBiBA,aAAa;AAgB9B;AACA,SAASC,UAAUA,CAAA,EAAG,CAEtB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"StringFilter.js","names":["StringFilter","_typeCheck"],"sources":["StringFilter.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 { BaseFilterOptions, CatchThemAll } from \"./BaseFilter.js\";\nimport type { Just } from \"./Just.js\";\n\ninterface StringFilterOptions extends BaseFilterOptions<string> {\n \"$startsWith\": string;\n \"$containsAllTermsInOrder\": string;\n \"$containsAnyTerm\": string | { term: string; fuzzySearch?: boolean };\n \"$containsAllTerms\": string | { term: string; fuzzySearch?: boolean };\n \"$in\": ReadonlyArray<string>;\n}\n\nexport namespace StringFilter {\n export interface $eq extends Just<\"$eq\", StringFilterOptions> {}\n export interface $ne extends Just<\"$ne\", StringFilterOptions> {}\n export interface $isNull extends Just<\"$isNull\", StringFilterOptions> {}\n export interface $startsWith\n extends Just<\"$startsWith\", StringFilterOptions>\n {\n }\n export interface $containsAllTermsInOrder\n extends Just<\"$containsAllTermsInOrder\", StringFilterOptions>\n {\n }\n export interface $containsAnyTerm\n extends Just<\"$containsAnyTerm\", StringFilterOptions>\n {\n }\n export interface $containsAllTerms\n extends Just<\"$containsAllTerms\", StringFilterOptions>\n {\n }\n export interface $in extends Just<\"$in\", StringFilterOptions> {}\n}\n\nexport type StringFilter =\n | string\n | StringFilter.$eq\n | StringFilter.$ne\n | StringFilter.$isNull\n | StringFilter.$in\n | StringFilter.$startsWith\n | StringFilter.$containsAllTermsInOrder\n | StringFilter.$containsAnyTerm\n | StringFilter.$containsAllTerms;\n\n/** @internal */\nfunction _typeCheck() {\n const b: StringFilter = {} as CatchThemAll<StringFilterOptions>;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA2BiBA,YAAY;AAkC7B;AACA,SAASC,UAAUA,CAAA,EAAG,CAEtB","ignoreList":[]}
1
+ {"version":3,"file":"StringFilter.js","names":["StringFilter","_typeCheck"],"sources":["StringFilter.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 { BaseFilterOptions, CatchThemAll } from \"./BaseFilter.js\";\nimport type { Just } from \"./Just.js\";\n\ninterface StringFilterOptions extends BaseFilterOptions<string> {\n \"$startsWith\": string;\n \"$containsAllTermsInOrder\": string;\n \"$containsAnyTerm\": string | { term: string; fuzzySearch?: boolean };\n \"$containsAllTerms\": string | { term: string; fuzzySearch?: boolean };\n /**\n * Matches any of the provided values. If an empty array is provided, the filter will match all objects.\n */\n \"$in\": ReadonlyArray<string>;\n}\n\nexport namespace StringFilter {\n export interface $eq extends Just<\"$eq\", StringFilterOptions> {}\n export interface $ne extends Just<\"$ne\", StringFilterOptions> {}\n export interface $isNull extends Just<\"$isNull\", StringFilterOptions> {}\n export interface $startsWith\n extends Just<\"$startsWith\", StringFilterOptions>\n {\n }\n export interface $containsAllTermsInOrder\n extends Just<\"$containsAllTermsInOrder\", StringFilterOptions>\n {\n }\n export interface $containsAnyTerm\n extends Just<\"$containsAnyTerm\", StringFilterOptions>\n {\n }\n export interface $containsAllTerms\n extends Just<\"$containsAllTerms\", StringFilterOptions>\n {\n }\n export interface $in extends Just<\"$in\", StringFilterOptions> {}\n}\n\nexport type StringFilter =\n | string\n | StringFilter.$eq\n | StringFilter.$ne\n | StringFilter.$isNull\n | StringFilter.$in\n | StringFilter.$startsWith\n | StringFilter.$containsAllTermsInOrder\n | StringFilter.$containsAnyTerm\n | StringFilter.$containsAllTerms;\n\n/** @internal */\nfunction _typeCheck() {\n const b: StringFilter = {} as CatchThemAll<StringFilterOptions>;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA8BiBA,YAAY;AAkC7B;AACA,SAASC,UAAUA,CAAA,EAAG,CAEtB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchOneByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","name","type","version"],"sources":["fetchOneByRid.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 NullabilityAdherence,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\n\nimport type { PropertyKeys } from \"../ontology/ObjectOrInterface.js\";\nimport type { ObjectTypeDefinition } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchOneByRidFn = <\n Q extends ObjectTypeDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n>(\n objectType: Q,\n rid: string,\n options?: SelectArg<Q, L, R, S>,\n) => Promise<Osdk.Instance<Q, ExtractOptions<R, S>, L>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid: Experiment<\n \"2.1.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n { fetchOneByRid: fetchOneByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n type: \"experiment\",\n version: \"2.1.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuBA,OAAO,MAAMA,gDAIZ,GAAG;EACFC,IAAI,EAAE,kDAAkD;EACxDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchOneByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","name","type","version"],"sources":["fetchOneByRid.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 NullabilityAdherence,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchOneByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n>(\n objectType: Q,\n rid: string,\n options?: SelectArg<Q, L, R, S>,\n) => Promise<Osdk.Instance<Q, ExtractOptions<R, S>, L>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid: Experiment<\n \"2.1.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n { fetchOneByRid: fetchOneByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n type: \"experiment\",\n version: \"2.1.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,OAAO,MAAMA,gDAIZ,GAAG;EACFC,IAAI,EAAE,kDAAkD;EACxDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -14,7 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export { NULL_VALUE } from "./actions/NullValue.js";
18
17
  export { DistanceUnitMapping } from "./aggregate/WhereClause.js";
19
18
  export { DurationMapping } from "./groupby/GroupByClause.js";
20
19
  export { isOk } from "./object/Result.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["NULL_VALUE","DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport { NULL_VALUE } from \"./actions/NullValue.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport { type DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type { Logger } from \"./Logger.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nexport type { PropertyBooleanFormattingRule } from \"./ontology/valueFormatting/PropertyBooleanFormattingRule.js\";\nexport type {\n DatetimeFormat,\n DatetimeLocalizedFormat,\n DatetimeLocalizedFormatType,\n DatetimeStringFormat,\n DatetimeTimezone,\n DatetimeTimezoneStatic,\n DatetimeTimezoneUser,\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"./ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js\";\nexport type {\n KnownType,\n PropertyKnownTypeFormattingRule,\n} from \"./ontology/valueFormatting/PropertyKnownTypeFormattingRule.js\";\nexport type {\n Affix,\n DurationBaseValue,\n DurationFormatStyle,\n DurationPrecision,\n HumanReadableFormat,\n NumberFormatAffix,\n NumberFormatCurrency,\n NumberFormatCurrencyStyle,\n NumberFormatCustomUnit,\n NumberFormatDuration,\n NumberFormatFixedValues,\n NumberFormatNotation,\n NumberFormatOptions,\n NumberFormatRatio,\n NumberFormatScale,\n NumberFormatStandard,\n NumberFormatStandardUnit,\n NumberRatioType,\n NumberRoundingMode,\n NumberScaleType,\n PropertyNumberFormattingRule,\n PropertyNumberFormattingRuleType,\n TimeCodeFormat,\n} from \"./ontology/valueFormatting/PropertyNumberFormattingRule.js\";\nexport type { PropertyValueFormattingRule } from \"./ontology/valueFormatting/PropertyValueFormattingRule.js\";\nexport type {\n PropertyTypeReference,\n PropertyTypeReferenceOrStringConstant,\n StringConstant,\n} from \"./ontology/valueFormatting/PropertyValueFormattingUtils.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type {\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./queries/Aggregations.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,SAASA,UAAU,QAAQ,wBAAwB;AASnD,SAASC,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AAqC5D,SAASC,IAAI,QAAQ,oBAAoB;;AA+FzC;;AAUA,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
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":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches content of a media reference property\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n */\n getMediaReference(): MediaReference;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly fileName: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches content of a media reference property\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n */\n getMediaReference(): MediaReference;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n token?: string;\n /** @deprecated Use `token` instead */\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly fileName: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,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 { 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{\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 >(\n listener: ObjectSetSubscription.Listener<Q, P>,\n opts?: ObjectSetSubscription.Options<Q, P>,\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 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 >(\n listener: ObjectSetSubscription.Listener<Q, P>,\n opts?: ObjectSetSubscription.Options<Q, P>,\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":[]}
@@ -17,6 +17,17 @@
17
17
  import { describe, expectTypeOf, it, test, vi } from "vitest";
18
18
  import { EmployeeApiTest } from "../test/EmployeeApiTest.js";
19
19
  import { FooInterfaceApiTest } from "../test/FooInterfaceApiTest.js";
20
+ async function* asyncIterateLinkOnce() {
21
+ const obj = {
22
+ $apiName: undefined,
23
+ $primaryKey: undefined
24
+ };
25
+ yield Promise.resolve({
26
+ source: obj,
27
+ target: obj,
28
+ linkTypeApiName: undefined
29
+ });
30
+ }
20
31
  export function createMockObjectSet() {
21
32
  let fauxObject, fauxResults, fauxObjectSet;
22
33
 
@@ -56,7 +67,8 @@ export function createMockObjectSet() {
56
67
  }),
57
68
  nearestNeighbors: vi.fn(() => {
58
69
  return fauxObjectSet;
59
- })
70
+ }),
71
+ experimental_asyncIterLinks: vi.fn(asyncIterateLinkOnce)
60
72
  };
61
73
  return fauxObjectSet;
62
74
  }
@@ -688,5 +700,37 @@ describe("ObjectSet", () => {
688
700
  expectTypeOf().toEqualTypeOf();
689
701
  });
690
702
  });
703
+ describe("asyncIterLinks", async () => {
704
+ it("typechecks self-referential one link", async () => {
705
+ for await (const {
706
+ source,
707
+ target,
708
+ linkType
709
+ } of fauxObjectSet.experimental_asyncIterLinks(["lead"])) {
710
+ expectTypeOf(source).toEqualTypeOf();
711
+ expectTypeOf(target).toEqualTypeOf();
712
+ expectTypeOf(source.$apiName).toBeString();
713
+ expectTypeOf(target.$apiName).toBeString();
714
+ expectTypeOf(source.$primaryKey).toBeNumber();
715
+ expectTypeOf(target.$primaryKey).toBeNumber();
716
+ expectTypeOf(linkType).toEqualTypeOf();
717
+ }
718
+ });
719
+ it("typechecks self-referential multiple links", async () => {
720
+ for await (const {
721
+ source,
722
+ target,
723
+ linkType
724
+ } of fauxObjectSet.experimental_asyncIterLinks(["lead", "peeps"])) {
725
+ expectTypeOf(source).toEqualTypeOf();
726
+ expectTypeOf(target).toEqualTypeOf();
727
+ expectTypeOf(source.$apiName).toBeString();
728
+ expectTypeOf(target.$apiName).toBeString();
729
+ expectTypeOf(source.$primaryKey).toBeNumber();
730
+ expectTypeOf(target.$primaryKey).toBeNumber();
731
+ expectTypeOf(linkType).toEqualTypeOf();
732
+ }
733
+ });
734
+ });
691
735
  });
692
736
  //# sourceMappingURL=ObjectSet.test.js.map