@osdk/api 2.18.0 → 2.18.1-main-4bc17ccb2e8d76e9ed34e72c0f92d549b273f5da

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 (37) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/browser/OsdkObjectFrom.js.map +1 -1
  3. package/build/browser/object/FetchPageArgs.js.map +1 -1
  4. package/build/browser/object/FetchPageResult.js.map +1 -1
  5. package/build/browser/objectSet/ObjectSet.js.map +1 -1
  6. package/build/browser/ontology/ObjectTypeDefinition.js.map +1 -1
  7. package/build/browser/ontology/PropertyModifiers.js +2 -0
  8. package/build/browser/ontology/PropertyModifiers.js.map +1 -0
  9. package/build/browser/test/EmployeeApiTest.js.map +1 -1
  10. package/build/cjs/{ObjectSet-Cfm7EbMN.d.cts → ObjectSet-CsJQ0rYb.d.cts} +93 -9
  11. package/build/cjs/index.d.cts +2 -2
  12. package/build/cjs/public/shapes-internal.d.cts +2 -2
  13. package/build/cjs/public/unstable.d.cts +4 -4
  14. package/build/cjs/{shapes-internal-BDgWwxSG.d.cts → shapes-internal-BqlLqPlf.d.cts} +1 -1
  15. package/build/esm/OsdkObjectFrom.js.map +1 -1
  16. package/build/esm/object/FetchPageArgs.js.map +1 -1
  17. package/build/esm/object/FetchPageResult.js.map +1 -1
  18. package/build/esm/objectSet/ObjectSet.js.map +1 -1
  19. package/build/esm/ontology/ObjectTypeDefinition.js.map +1 -1
  20. package/build/esm/ontology/PropertyModifiers.js +2 -0
  21. package/build/esm/ontology/PropertyModifiers.js.map +1 -0
  22. package/build/esm/test/EmployeeApiTest.js.map +1 -1
  23. package/build/types/OsdkObjectFrom.d.ts +9 -2
  24. package/build/types/OsdkObjectFrom.d.ts.map +1 -1
  25. package/build/types/object/FetchPageArgs.d.ts +8 -3
  26. package/build/types/object/FetchPageArgs.d.ts.map +1 -1
  27. package/build/types/object/FetchPageResult.d.ts +6 -2
  28. package/build/types/object/FetchPageResult.d.ts.map +1 -1
  29. package/build/types/objectSet/ObjectSet.d.ts +12 -7
  30. package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
  31. package/build/types/ontology/ObjectTypeDefinition.d.ts +11 -1
  32. package/build/types/ontology/ObjectTypeDefinition.d.ts.map +1 -1
  33. package/build/types/ontology/PropertyModifiers.d.ts +50 -0
  34. package/build/types/ontology/PropertyModifiers.d.ts.map +1 -0
  35. package/build/types/test/EmployeeApiTest.d.ts +41 -1
  36. package/build/types/test/EmployeeApiTest.d.ts.map +1 -1
  37. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @osdk/api
2
2
 
3
+ ## 2.18.1-main-4bc17ccb2e8d76e9ed34e72c0f92d549b273f5da
4
+
5
+ ### Patch Changes
6
+
7
+ - 02c796c: Array Reducers and Struct Main Value support
8
+
3
9
  ## 2.18.0
4
10
 
5
11
  ## 2.17.0
@@ -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 { 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
+ {"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 {\n ApplyModifiersToProps,\n PropertyModifierValue,\n PropsWithBoth,\n PropsWithOnlyMainValue,\n PropsWithOnlyReducers,\n} from \"./ontology/PropertyModifiers.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\ntype ReducedValues<Q extends ObjectOrInterfaceDefinition> =\n | `${PropsWithOnlyMainValue<Q> & string}:applyMainValue`\n | `${PropsWithOnlyReducers<Q> & string}:applyReducers`\n | `${PropsWithBoth<Q> & string}:applyMainValue`\n | `${PropsWithBoth<Q> & string}:applyReducers`\n | `${PropsWithBoth<Q> & string}:applyReducersAndExtractMainValue`;\n\ntype ExtractPropNameFromP<S> = S extends `${infer Prop}:${string}` ? Prop : S;\n\ntype GetPropNamesFromP<P> = [P] extends [string] ? ExtractPropNameFromP<P>\n : never;\n\ntype HasAnyModifiers<P> = P extends `${string}:${string}` ? true : never;\ntype HasModifiers<P> = IsAny<P> extends true ? false\n : [HasAnyModifiers<P>] extends [never] ? false\n : true;\n\ntype BuildModifiersFromP<P> = {\n [K in P as K extends `${infer Prop}:${string}` ? Prop : never]: K extends\n `${string}:${infer Mod extends PropertyModifierValue}` ? Mod : never;\n};\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> | ReducedValues<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n // When P is just property keys (no `:modifier` strings), the deferred\n // `HasModifiers<P>` conditional in the modifier path keeps the resulting\n // Instance symbolic — this blocks structural assignability checks across\n // package boundaries (e.g. `Osdk.Instance<Employee> extends\n // ObjectLocator<Employee>` in `@osdk/functions`' edit-batch inference).\n // Short-circuit to the plain `Pick<Compile, ...>` shape for that case so\n // Instance simplifies eagerly; only fall through to the modifier path when\n // P actually carries modifier strings.\n & ([P] extends [PropertyKeys<Q>] ? Pick<\n CompileTimeMetadata<Q>[\"props\"],\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n : Pick<\n HasModifiers<P> extends true\n ? ApplyModifiersToProps<Q, BuildModifiersFromP<P>>\n : CompileTimeMetadata<Q>[\"props\"],\n GetPropsKeys<Q, GetPropNamesFromP<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\ntype HasKeys<T> = keyof T extends never ? false : true;\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;AAsHA;AACA;AACA;AACA;AACA;AACA;AACA;AA4BA;AA0BA;AACA;AACA;AAFA,WAiDiBA,IAAI;AA6FrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAgBA","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 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
+ {"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\";\nimport type { ApplyModifiersArg } from \"../ontology/PropertyModifiers.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 MODIFIERS extends ApplyModifiersArg<Q> = {},\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 MODIFIERS\n >\n{\n $nextPageToken?: string;\n $pageSize?: number;\n $applyModifiers?:\n & ApplyModifiersArg<Q>\n & MODIFIERS\n & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\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 MODIFIERS extends ApplyModifiersArg<Q> = {},\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 $applyModifiers?:\n & ApplyModifiersArg<Q>\n & MODIFIERS\n & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: 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,WAwBiBA,oBAAoB;AAAA,WAIpBC,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchPageResult.js","names":[],"sources":["FetchPageResult.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 { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type {\n ExtractOptions,\n IsNever,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { NullabilityAdherence, ObjectSetArgs } from \"./FetchPageArgs.js\";\n\n/** exposed for a test */\nexport type RespectNullability<S extends NullabilityAdherence> = S extends false\n ? false\n : true;\n\n/** exposed for a test */\nexport type UnionIfFalse<S extends string, JUST_S_IF_TRUE extends boolean, E> =\n IsNever<S> extends true ? never\n : JUST_S_IF_TRUE extends true ? S\n : S | E;\n\n/** exposed for a test */\nexport type UnionIfTrue<\n S extends string,\n UNION_IF_TRUE extends boolean,\n E extends string,\n> = IsNever<S> extends true ? never\n : UNION_IF_TRUE extends true ? S | E\n : S;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type FetchPageResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> = PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n PropertyKeys<Q> extends L ? never : L\n >,\n ORDER_BY_OPTIONS\n >\n>;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type SingleOsdkResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> | (keyof RDPs & string),\n R extends boolean,\n S extends NullabilityAdherence,\n RDPs extends Record<string, SimplePropertyDef> = {},\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n> = MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >,\n ORDER_BY_OPTIONS\n>;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FetchPageResult.js","names":[],"sources":["FetchPageResult.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 {\n ApplyModifiersArg,\n PropertyModifierValue,\n} from \"../ontology/PropertyModifiers.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type {\n ExtractOptions,\n IsNever,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { NullabilityAdherence, ObjectSetArgs } from \"./FetchPageArgs.js\";\n\n/** exposed for a test */\nexport type RespectNullability<S extends NullabilityAdherence> = S extends false\n ? false\n : true;\n\n/** exposed for a test */\nexport type UnionIfFalse<S extends string, JUST_S_IF_TRUE extends boolean, E> =\n IsNever<S> extends true ? never\n : JUST_S_IF_TRUE extends true ? S\n : S | E;\n\n/** exposed for a test */\nexport type UnionIfTrue<\n S extends string,\n UNION_IF_TRUE extends boolean,\n E extends string,\n> = IsNever<S> extends true ? never\n : UNION_IF_TRUE extends true ? S | E\n : S;\n\ntype ModifiersToSelectStrings<M> = {\n [K in keyof M]: K extends string\n ? M[K] extends PropertyModifierValue ? `${K}:${M[K]}`\n : never\n : never;\n}[keyof M];\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type FetchPageResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n> = PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<PropertyKeys<Q> extends L ? never : L, keyof MODIFIERS>\n | ModifiersToSelectStrings<MODIFIERS>,\n {}\n >,\n ORDER_BY_OPTIONS\n >\n>;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type SingleOsdkResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> | (keyof RDPs & string),\n R extends boolean,\n S extends NullabilityAdherence,\n RDPs extends Record<string, SimplePropertyDef> = {},\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n> = MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >,\n ORDER_BY_OPTIONS\n>;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type {\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./ObjectSetLinks.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends\n | BaseObjectSet<any>\n | Record<string, SimplePropertyDef>,\n> = [D] extends [never] ? {}\n : D extends BaseObjectSet<any> ? {}\n : D extends Record<string, SimplePropertyDef> ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never] ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any, 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 Subscribe<MergeObjectSet<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 * ```ts\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 &le; 500.\n * @param property - The property key with a defined embedding model to search over.\n * @example\n * ```ts\n * const result = await client(Document)\n * .nearestNeighbors(\"coffee\", 5, \"embedding\")\n * .fetchPage();\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 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 * ```ts\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 * ```\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 * ```ts\n * await client(Office).where({\n * meetingRooms: { $contains: \"Grand Central\" },\n * meetingRoomCapacities: { $contains: 30 },\n * });\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 * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\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 * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\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 /**\n * Adds derived properties to objects in this object set\n * @param clause - A map of new property names to a function that derives each property from the base object set\n * @example\n * ```ts\n * const employeesWithLeadCount = await client(Employee)\n * .withProperties({\n * leadCount: (baseObjectSet) =>\n * baseObjectSet.pivotTo(\"lead\").aggregate(\"$count\"),\n * })\n * .fetchPage();\n * ```\n * @returns an object set with the derived properties available for selection\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 * ```ts\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 * ```ts\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n * simpleFilteredEmployeeObjectSet,\n * );\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 * ```ts\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n * simpleFilteredEmployeeObjectSet,\n * );\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 * ```ts\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n * simpleFilteredEmployeeObjectSet,\n * );\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 * @example\n * ```ts\n * const linkedEmployees = await client(Office)\n * .pivotTo(\"employees\")\n * .fetchPage();\n * ```\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 * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns the object with the specified primary key\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 * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const result = await client(Employee).fetchOneWithErrors(12345);\n * if (isOk(result)) {\n * const employee = result.value;\n * }\n * ```\n * @returns the object wrapped in a result, or an error if the fetch fails\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 * @example\n * ```ts\n * const subscription = client(Employee).subscribe(\n * {\n * onChange(update) {\n * // Handle ADDED_OR_UPDATED / REMOVED events\n * },\n * onSuccessfulSubscription() {},\n * onError(err) {},\n * onOutOfDate() {},\n * },\n * { properties: [\"fullName\", \"salary\"] },\n * );\n * subscription.unsubscribe();\n * ```\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @example\n * ```ts\n * const employees = client(Person).narrowToType(Employee);\n * ```\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 * @param links - The link type api names to load on each object in the object set\n * @example\n * ```ts\n * for await (\n * const { source, target, linkType } of venturesObjectSet\n * .experimental_asyncIterLinks([\"employees\"])\n * ) {\n * graph.addEdge(source, target, linkType);\n * }\n * ```\n * @returns an async iterator that yields directed link instances pairing each source object with its linked target\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 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 {\n ApplyModifiersArg,\n PropertyModifierValue,\n} from \"../ontology/PropertyModifiers.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 Subscribe<MergeObjectSet<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\ntype ExtractModifiers<\n Q extends ObjectOrInterfaceDefinition,\n X,\n> = [X] extends [never] ? {}\n : X extends { $applyModifiers: infer M extends ApplyModifiersArg<Q> } ? M\n : {};\n\ntype ModifiersToSelectStrings<M> = {\n [K in keyof M]: K extends string\n ? M[K] extends PropertyModifierValue ? `${K}:${M[K]}`\n : never\n : never;\n}[keyof M];\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 * ```ts\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 MODIFIERS extends ApplyModifiersArg<Q> = {},\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 MODIFIERS\n >,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\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 &le; 500.\n * @param property - The property key with a defined embedding model to search over.\n * @example\n * ```ts\n * const result = await client(Document)\n * .nearestNeighbors(\"coffee\", 5, \"embedding\")\n * .fetchPage();\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 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 * ```ts\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 * ```\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 const MODIFIERS extends ApplyModifiersArg<Q> = {},\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 MODIFIERS\n >,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\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 * ```ts\n * await client(Office).where({\n * meetingRooms: { $contains: \"Grand Central\" },\n * meetingRoomCapacities: { $contains: 30 },\n * });\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 * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\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 * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\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 const MODIFIERS extends ApplyModifiersArg<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 MODIFIERS\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 /**\n * Adds derived properties to objects in this object set\n * @param clause - A map of new property names to a function that derives each property from the base object set\n * @example\n * ```ts\n * const employeesWithLeadCount = await client(Employee)\n * .withProperties({\n * leadCount: (baseObjectSet) =>\n * baseObjectSet.pivotTo(\"lead\").aggregate(\"$count\"),\n * })\n * .fetchPage();\n * ```\n * @returns an object set with the derived properties available for selection\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 * ```ts\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 * ```ts\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n * simpleFilteredEmployeeObjectSet,\n * );\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 * ```ts\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n * simpleFilteredEmployeeObjectSet,\n * );\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 * ```ts\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n * simpleFilteredEmployeeObjectSet,\n * );\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 * @example\n * ```ts\n * const linkedEmployees = await client(Office)\n * .pivotTo(\"employees\")\n * .fetchPage();\n * ```\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 * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns the object with the specified primary key\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 * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const result = await client(Employee).fetchOneWithErrors(12345);\n * if (isOk(result)) {\n * const employee = result.value;\n * }\n * ```\n * @returns the object wrapped in a result, or an error if the fetch fails\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 * @example\n * ```ts\n * const subscription = client(Employee).subscribe(\n * {\n * onChange(update) {\n * // Handle ADDED_OR_UPDATED / REMOVED events\n * },\n * onSuccessfulSubscription() {},\n * onError(err) {},\n * onOutOfDate() {},\n * },\n * { properties: [\"fullName\", \"salary\"] },\n * );\n * subscription.unsubscribe();\n * ```\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @example\n * ```ts\n * const employees = client(Person).narrowToType(Employee);\n * ```\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 * @param links - The link type api names to load on each object in the object set\n * @example\n * ```ts\n * for await (\n * const { source, target, linkType } of venturesObjectSet\n * .experimental_asyncIterLinks([\"employees\"])\n * ) {\n * graph.addEdge(source, target, linkType);\n * }\n * ```\n * @returns an async iterator that yields directed link instances pairing each source object with its linked target\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 NearestNeighbors<Q>,\n NarrowToType<Q>\n{\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectTypeDefinition.js","names":["ObjectMetadata"],"sources":["ObjectTypeDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ObjectOrInterface.js\";\nimport type { PrimaryKeyTypes } from \"./PrimaryKeyTypes.js\";\nimport type { PropertyValueFormattingRule } from \"./valueFormatting/PropertyValueFormattingRule.js\";\nimport type { VersionString } from \"./VersionString.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type CompileTimeMetadata<T extends { __DefinitionMetadata?: {} }> =\n NonNullable<\n T[\"__DefinitionMetadata\"]\n >;\n\nexport type ObjectTypePropertyDefinitionFrom2<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][P];\n\nexport type ObjectInterfaceBaseMetadata = {\n type: \"object\" | \"interface\";\n apiName: string;\n displayName: string;\n description: string | undefined;\n properties: Record<any, ObjectMetadata.Property>;\n rid: string;\n /**\n * Represents the \"super interfaces\" of this object.\n *\n * Optional because they may not exist on legacy.\n */\n implements?: ReadonlyArray<string>;\n};\n\nexport interface ObjectInterfaceCompileDefinition {\n type: \"object\" | \"interface\";\n objectSet?: any;\n props?: any;\n strictProps?: any;\n linksType?: any;\n}\n\nexport interface VersionBound<V extends VersionString<any, any, any>> {\n __expectedClientVersion?: V;\n}\n\nexport interface ObjectMetadata extends ObjectInterfaceBaseMetadata {\n type: \"object\";\n primaryKeyApiName: keyof this[\"properties\"];\n titleProperty: keyof this[\"properties\"];\n links: Record<\n string,\n ObjectMetadata.Link<any, any>\n >;\n primaryKeyType: PrimaryKeyTypes;\n icon: Icon | undefined;\n visibility: ObjectTypeVisibility | undefined;\n pluralDisplayName: string;\n status: ReleaseStatus | undefined;\n interfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* InterfaceType property api name */ string,\n /* ObjectType property api name */ string\n >\n >;\n inverseInterfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* ObjectType property api name */ string,\n /* InterfaceType property api name */ string\n >\n >;\n}\n\nexport namespace ObjectMetadata {\n export interface Property {\n readonly?: boolean;\n displayName?: string;\n description?: string;\n type: WirePropertyTypes;\n multiplicity?: boolean;\n nullable?: boolean;\n valueTypeApiName?: string;\n valueFormatting?: PropertyValueFormattingRule;\n }\n\n export interface Link<\n Q extends ObjectTypeDefinition,\n M extends boolean,\n > {\n __OsdkLinkTargetType?: Q;\n targetType: Q[\"apiName\"];\n multiplicity: M;\n }\n}\n\nexport interface ObjectTypeDefinition {\n type: \"object\";\n apiName: string;\n primaryKeyApiName?: string;\n primaryKeyType?: PrimaryKeyTypes;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ObjectMetadata\n & ObjectInterfaceCompileDefinition;\n}\n\nexport type ObjectTypeLinkKeysFrom2<\n Q extends ObjectOrInterfaceDefinition,\n> =\n & keyof CompileTimeMetadata<Q>[\"links\"]\n & string;\n\nexport interface PropertyDef<\n T extends WirePropertyTypes,\n N extends \"nullable\" | \"non-nullable\" = \"nullable\",\n M extends \"array\" | \"single\" = \"single\",\n> extends ObjectMetadata.Property {\n type: T;\n multiplicity: M extends \"array\" ? true : false;\n nullable: N extends \"nullable\" ? true : false;\n}\n\nexport type ReleaseStatus =\n | \"ACTIVE\"\n | \"EXPERIMENTAL\"\n | \"DEPRECATED\"\n | \"ENDORSED\";\n\ntype ObjectTypeVisibility = \"NORMAL\" | \"PROMINENT\" | \"HIDDEN\";\n\ntype BlueprintIcon = {\n type: \"blueprint\";\n color: string;\n name: string;\n};\n\ntype Icon = BlueprintIcon;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA4FiBA,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"ObjectTypeDefinition.js","names":["ObjectMetadata"],"sources":["ObjectTypeDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ObjectOrInterface.js\";\nimport type { PrimaryKeyTypes } from \"./PrimaryKeyTypes.js\";\nimport type { PropertyValueFormattingRule } from \"./valueFormatting/PropertyValueFormattingRule.js\";\nimport type { VersionString } from \"./VersionString.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type CompileTimeMetadata<T extends { __DefinitionMetadata?: {} }> =\n NonNullable<\n T[\"__DefinitionMetadata\"]\n >;\n\nexport type ObjectTypePropertyDefinitionFrom2<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][P];\n\nexport type ObjectInterfaceBaseMetadata = {\n type: \"object\" | \"interface\";\n apiName: string;\n displayName: string;\n description: string | undefined;\n properties: Record<any, ObjectMetadata.Property>;\n rid: string;\n /**\n * Represents the \"super interfaces\" of this object.\n *\n * Optional because they may not exist on legacy.\n */\n implements?: ReadonlyArray<string>;\n};\n\nexport interface ObjectInterfaceCompileDefinition {\n type: \"object\" | \"interface\";\n objectSet?: any;\n props?: any;\n strictProps?: any;\n linksType?: any;\n}\n\nexport interface VersionBound<V extends VersionString<any, any, any>> {\n __expectedClientVersion?: V;\n}\n\nexport interface ObjectMetadata extends ObjectInterfaceBaseMetadata {\n type: \"object\";\n primaryKeyApiName: keyof this[\"properties\"];\n titleProperty: keyof this[\"properties\"];\n links: Record<\n string,\n ObjectMetadata.Link<any, any>\n >;\n primaryKeyType: PrimaryKeyTypes;\n icon: Icon | undefined;\n visibility: ObjectTypeVisibility | undefined;\n pluralDisplayName: string;\n status: ReleaseStatus | undefined;\n interfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* InterfaceType property api name */ string,\n /* ObjectType property api name */ string\n >\n >;\n inverseInterfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* ObjectType property api name */ string,\n /* InterfaceType property api name */ string\n >\n >;\n}\n\nexport namespace ObjectMetadata {\n export interface Property {\n readonly?: boolean;\n displayName?: string;\n description?: string;\n type: WirePropertyTypes;\n multiplicity?: boolean;\n nullable?: boolean;\n valueTypeApiName?: string;\n valueFormatting?: PropertyValueFormattingRule;\n mainValue?: {\n fields: readonly string[];\n };\n hasReducers?: boolean;\n }\n\n export interface Link<\n Q extends ObjectTypeDefinition,\n M extends boolean,\n > {\n __OsdkLinkTargetType?: Q;\n targetType: Q[\"apiName\"];\n multiplicity: M;\n }\n}\n\nexport interface ObjectTypeDefinition {\n type: \"object\";\n apiName: string;\n primaryKeyApiName?: string;\n primaryKeyType?: PrimaryKeyTypes;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ObjectMetadata\n & ObjectInterfaceCompileDefinition;\n}\n\nexport type ObjectTypeLinkKeysFrom2<\n Q extends ObjectOrInterfaceDefinition,\n> =\n & keyof CompileTimeMetadata<Q>[\"links\"]\n & string;\n\nexport interface PropertyDef<\n T extends WirePropertyTypes,\n N extends \"nullable\" | \"non-nullable\" = \"nullable\",\n M extends \"array\" | \"single\" = \"single\",\n MAIN_VALUE_FIELDS extends readonly string[] | undefined = undefined,\n HAS_REDUCERS extends boolean = false,\n> extends ObjectMetadata.Property {\n type: T;\n multiplicity: M extends \"array\" ? true : false;\n nullable: N extends \"nullable\" ? true : false;\n mainValue: MAIN_VALUE_FIELDS extends readonly string[]\n ? { fields: MAIN_VALUE_FIELDS }\n : undefined;\n hasReducers: HAS_REDUCERS;\n}\n\nexport type ReleaseStatus =\n | \"ACTIVE\"\n | \"EXPERIMENTAL\"\n | \"DEPRECATED\"\n | \"ENDORSED\";\n\ntype ObjectTypeVisibility = \"NORMAL\" | \"PROMINENT\" | \"HIDDEN\";\n\ntype BlueprintIcon = {\n type: \"blueprint\";\n color: string;\n name: string;\n};\n\ntype Icon = BlueprintIcon;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA4FiBA,cAAc","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PropertyModifiers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyModifiers.js","names":[],"sources":["PropertyModifiers.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 { GetClientPropertyValueFromWire } from \"../mapping/PropertyValueMapping.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n} from \"./ObjectTypeDefinition.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\n/** Modifier values users can specify */\nexport type PropertyModifierValue =\n | \"applyMainValue\"\n | \"applyReducers\"\n | \"applyReducersAndExtractMainValue\";\n\nexport type MainValueTypeOf<P extends ObjectMetadata.Property> =\n P[\"mainValue\"] extends { fields: readonly [infer Single extends string] }\n ? P[\"type\"] extends Record<string, WirePropertyTypes>\n ? Single extends keyof P[\"type\"]\n ? GetClientPropertyValueFromWire<P[\"type\"][Single]>\n : never\n : never\n : P[\"mainValue\"] extends { fields: readonly (infer F extends string)[] }\n ? P[\"type\"] extends Record<string, WirePropertyTypes> ? {\n [K in F & keyof P[\"type\"]]: GetClientPropertyValueFromWire<\n P[\"type\"][K]\n >;\n }\n : never\n : never;\n\n/**\n * Extract the reduced type from an array property.\n * The reduced type is the element type (non-array).\n */\nexport type ReducedTypeOf<P extends ObjectMetadata.Property> =\n P[\"hasReducers\"] extends true\n ? P[\"type\"] extends WirePropertyTypes\n ? GetClientPropertyValueFromWire<P[\"type\"]>\n : never\n : never;\n\n/** Get keys of properties that have mainValue defined */\nexport type PropsWithMainValue<Q extends ObjectOrInterfaceDefinition> = {\n [K in PropertyKeys<Q>]: CompileTimeMetadata<Q>[\"properties\"][K] extends\n { mainValue: { fields: readonly string[] } } ? K\n : never;\n}[PropertyKeys<Q>];\n\n/** Get keys of properties that have reducers defined */\nexport type PropsWithReducers<Q extends ObjectOrInterfaceDefinition> = {\n [K in PropertyKeys<Q>]: CompileTimeMetadata<Q>[\"properties\"][K] extends\n { hasReducers: true } ? K\n : never;\n}[PropertyKeys<Q>];\n\n/**\n * Apply a single modifier to a property type.\n * - \"applyMainValue\" -> returns struct with only main value fields\n * - \"applyReducers\" -> returns single element type (not array)\n * - \"applyReducersAndExtractMainValue\" -> returns single element with only main value fields\n */\nexport type ApplyModifierToProperty<\n P extends ObjectMetadata.Property,\n M extends PropertyModifierValue,\n> = M extends \"applyMainValue\"\n ? MainValueTypeOf<P> | (P[\"nullable\"] extends true ? undefined : never)\n : M extends \"applyReducers\"\n ? ReducedTypeOf<P> | (P[\"nullable\"] extends true ? undefined : never)\n : M extends \"applyReducersAndExtractMainValue\"\n ? MainValueOfReduced<P> | (P[\"nullable\"] extends true ? undefined : never)\n : never;\n\ntype MainValueOfReduced<P extends ObjectMetadata.Property> =\n P[\"mainValue\"] extends { fields: readonly [infer Single extends string] }\n ? P[\"type\"] extends Record<string, WirePropertyTypes>\n ? Single extends keyof P[\"type\"]\n ? GetClientPropertyValueFromWire<P[\"type\"][Single]>\n : never\n : never\n : P[\"mainValue\"] extends { fields: readonly (infer F extends string)[] }\n ? P[\"type\"] extends Record<string, WirePropertyTypes> ? {\n [K in F & keyof P[\"type\"]]: GetClientPropertyValueFromWire<\n P[\"type\"][K]\n >;\n }\n : never\n : never;\n\nexport type PropsWithBoth<Q extends ObjectOrInterfaceDefinition> =\n & PropsWithMainValue<Q>\n & PropsWithReducers<Q>;\n\nexport type PropsWithOnlyMainValue<Q extends ObjectOrInterfaceDefinition> =\n Exclude<PropsWithMainValue<Q>, PropsWithReducers<Q>>;\n\nexport type PropsWithOnlyReducers<Q extends ObjectOrInterfaceDefinition> =\n Exclude<PropsWithReducers<Q>, PropsWithMainValue<Q>>;\n\nexport type ApplyModifiersArg<\n Q extends ObjectOrInterfaceDefinition,\n> =\n & {\n [P in PropsWithOnlyMainValue<Q>]?: \"applyMainValue\";\n }\n & {\n [P in PropsWithOnlyReducers<Q>]?: \"applyReducers\";\n }\n & {\n [P in PropsWithBoth<Q>]?:\n | \"applyMainValue\"\n | \"applyReducers\"\n | \"applyReducersAndExtractMainValue\";\n };\n\nexport type ApplyModifiersToProps<\n Q extends ObjectOrInterfaceDefinition,\n MODIFIERS extends Record<string, PropertyModifierValue>,\n> = {\n [K in PropertyKeys<Q>]: K extends keyof MODIFIERS\n ? MODIFIERS[K] extends PropertyModifierValue ? ApplyModifierToProperty<\n CompileTimeMetadata<Q>[\"properties\"][K],\n MODIFIERS[K]\n >\n : CompileTimeMetadata<Q>[\"props\"][K]\n : CompileTimeMetadata<Q>[\"props\"][K];\n};\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"EmployeeApiTest.js","names":["EmployeeApiTest","type","apiName","primaryKeyApiName","primaryKeyType"],"sources":["EmployeeApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nexport namespace EmployeeApiTest {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\"\n | \"attachment\"\n | \"geopoint\"\n | \"timeseries\"\n | \"mediaReference\"\n | \"geotimeSeriesReference\"\n | \"isActive\"\n | \"yearsOfExperience\"\n | \"rank\"\n | \"performanceScore\"\n | \"hourlyRate\"\n | \"dateOfJoining\"\n | \"lastUpdated\"\n | \"skillSet\"\n | \"skillSetEmbedding\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<EmployeeApiTest>;\n readonly peeps: EmployeeApiTest.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n readonly attachment: $PropType[\"attachment\"] | undefined;\n readonly geopoint: $PropType[\"geopoint\"] | undefined;\n readonly timeseries: $PropType[\"numericTimeseries\"] | undefined;\n readonly mediaReference: $PropType[\"mediaReference\"] | undefined;\n readonly geotimeSeriesReference:\n | $PropType[\"geotimeSeriesReference\"]\n | undefined;\n readonly isActive: $PropType[\"boolean\"] | undefined;\n readonly yearsOfExperience: $PropType[\"long\"] | undefined;\n readonly rank: $PropType[\"short\"] | undefined;\n readonly performanceScore: $PropType[\"double\"] | undefined;\n readonly hourlyRate: $PropType[\"float\"] | undefined;\n readonly dateOfJoining: $PropType[\"datetime\"] | undefined;\n readonly lastUpdated: $PropType[\"timestamp\"] | undefined;\n readonly skillSet: $PropType[\"string\"] | undefined;\n readonly skillSetEmbedding: $PropType[\"vector\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<EmployeeApiTest, EmployeeApiTest.ObjectSet>\n {}\n}\n\nexport interface EmployeeApiTest extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n __DefinitionMetadata?: {\n objectSet: EmployeeApiTest.ObjectSet;\n props: EmployeeApiTest.Props;\n linksType: EmployeeApiTest.Links;\n strictProps: EmployeeApiTest.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<EmployeeApiTest, false>;\n peeps: $ObjectMetadata.Link<EmployeeApiTest, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n attachment: $PropertyDef<\"attachment\", \"nullable\", \"single\">;\n geopoint: $PropertyDef<\"geopoint\", \"nullable\", \"single\">;\n timeseries: $PropertyDef<\"numericTimeseries\", \"nullable\", \"single\">;\n mediaReference: $PropertyDef<\"mediaReference\", \"nullable\", \"single\">;\n geotimeSeriesReference: $PropertyDef<\n \"geotimeSeriesReference\",\n \"nullable\",\n \"single\"\n >;\n isActive: $PropertyDef<\"boolean\", \"nullable\", \"single\">;\n yearsOfExperience: $PropertyDef<\"long\", \"nullable\", \"single\">;\n rank: $PropertyDef<\"short\", \"nullable\", \"single\">;\n performanceScore: $PropertyDef<\"double\", \"nullable\", \"single\">;\n hourlyRate: $PropertyDef<\"float\", \"nullable\", \"single\">;\n dateOfJoining: $PropertyDef<\"datetime\", \"nullable\", \"single\">;\n lastUpdated: $PropertyDef<\"timestamp\", \"nullable\", \"single\">;\n skillSet: $PropertyDef<\"string\", \"nullable\", \"single\">;\n skillSetEmbedding: $PropertyDef<\"vector\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nexport const EmployeeApiTest: EmployeeApiTest = {\n type: \"object\",\n apiName: \"Employee\",\n primaryKeyApiName: \"employeeId\",\n primaryKeyType: \"integer\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmIA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE,UAAU;EACnBC,iBAAiB,EAAE,YAAY;EAC/BC,cAAc,EAAE;AAClB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"EmployeeApiTest.js","names":["EmployeeApiTest","type","apiName","primaryKeyApiName","primaryKeyType"],"sources":["EmployeeApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nexport namespace EmployeeApiTest {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\"\n | \"attachment\"\n | \"geopoint\"\n | \"timeseries\"\n | \"mediaReference\"\n | \"geotimeSeriesReference\"\n | \"isActive\"\n | \"yearsOfExperience\"\n | \"rank\"\n | \"performanceScore\"\n | \"hourlyRate\"\n | \"dateOfJoining\"\n | \"lastUpdated\"\n | \"skillSet\"\n | \"skillSetEmbedding\"\n | \"addressStruct\"\n | \"salaryHistory\"\n | \"bonusHistory\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<EmployeeApiTest>;\n readonly peeps: EmployeeApiTest.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n readonly attachment: $PropType[\"attachment\"] | undefined;\n readonly geopoint: $PropType[\"geopoint\"] | undefined;\n readonly timeseries: $PropType[\"numericTimeseries\"] | undefined;\n readonly mediaReference: $PropType[\"mediaReference\"] | undefined;\n readonly geotimeSeriesReference:\n | $PropType[\"geotimeSeriesReference\"]\n | undefined;\n readonly isActive: $PropType[\"boolean\"] | undefined;\n readonly yearsOfExperience: $PropType[\"long\"] | undefined;\n readonly rank: $PropType[\"short\"] | undefined;\n readonly performanceScore: $PropType[\"double\"] | undefined;\n readonly hourlyRate: $PropType[\"float\"] | undefined;\n readonly dateOfJoining: $PropType[\"datetime\"] | undefined;\n readonly lastUpdated: $PropType[\"timestamp\"] | undefined;\n readonly skillSet: $PropType[\"string\"] | undefined;\n readonly skillSetEmbedding: $PropType[\"vector\"] | undefined;\n // Struct with mainValue for modifier tests\n readonly addressStruct:\n | { street: string; city: string; zipCode: string }\n | undefined;\n // Array with reducers for modifier tests\n readonly salaryHistory: number[] | undefined;\n // Array of structs with both mainValue and reducers for modifier tests\n readonly bonusHistory:\n | Array<{ year: number; amount: number }>\n | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<EmployeeApiTest, EmployeeApiTest.ObjectSet>\n {}\n}\n\nexport interface EmployeeApiTest extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n __DefinitionMetadata?: {\n objectSet: EmployeeApiTest.ObjectSet;\n props: EmployeeApiTest.Props;\n linksType: EmployeeApiTest.Links;\n strictProps: EmployeeApiTest.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<EmployeeApiTest, false>;\n peeps: $ObjectMetadata.Link<EmployeeApiTest, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n attachment: $PropertyDef<\"attachment\", \"nullable\", \"single\">;\n geopoint: $PropertyDef<\"geopoint\", \"nullable\", \"single\">;\n timeseries: $PropertyDef<\"numericTimeseries\", \"nullable\", \"single\">;\n mediaReference: $PropertyDef<\"mediaReference\", \"nullable\", \"single\">;\n geotimeSeriesReference: $PropertyDef<\n \"geotimeSeriesReference\",\n \"nullable\",\n \"single\"\n >;\n isActive: $PropertyDef<\"boolean\", \"nullable\", \"single\">;\n yearsOfExperience: $PropertyDef<\"long\", \"nullable\", \"single\">;\n rank: $PropertyDef<\"short\", \"nullable\", \"single\">;\n performanceScore: $PropertyDef<\"double\", \"nullable\", \"single\">;\n hourlyRate: $PropertyDef<\"float\", \"nullable\", \"single\">;\n dateOfJoining: $PropertyDef<\"datetime\", \"nullable\", \"single\">;\n lastUpdated: $PropertyDef<\"timestamp\", \"nullable\", \"single\">;\n skillSet: $PropertyDef<\"string\", \"nullable\", \"single\">;\n skillSetEmbedding: $PropertyDef<\"vector\", \"nullable\", \"single\">;\n // Struct with mainValue - main value fields are city and zipCode\n addressStruct: {\n type: { street: \"string\"; city: \"string\"; zipCode: \"string\" };\n nullable: true;\n multiplicity: false;\n mainValue: { fields: readonly [\"city\", \"zipCode\"] };\n };\n // Array with reducers (e.g., get max salary)\n salaryHistory: {\n type: \"integer\";\n nullable: true;\n multiplicity: true;\n hasReducers: true;\n };\n // Array of structs with both mainValue and reducers\n bonusHistory: {\n type: { year: \"integer\"; amount: \"integer\" };\n nullable: true;\n multiplicity: true;\n mainValue: { fields: readonly [\"amount\"] };\n hasReducers: true;\n };\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nexport const EmployeeApiTest: EmployeeApiTest = {\n type: \"object\",\n apiName: \"Employee\",\n primaryKeyApiName: \"employeeId\",\n primaryKeyType: \"integer\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsKA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE,UAAU;EACnBC,iBAAiB,EAAE,YAAY;EAC/BC,cAAc,EAAE;AAClB,CAAC","ignoreList":[]}
@@ -612,6 +612,10 @@ declare namespace ObjectMetadata {
612
612
  nullable?: boolean;
613
613
  valueTypeApiName?: string;
614
614
  valueFormatting?: PropertyValueFormattingRule;
615
+ mainValue?: {
616
+ fields: readonly string[];
617
+ };
618
+ hasReducers?: boolean;
615
619
  }
616
620
  interface Link<Q extends ObjectTypeDefinition, M extends boolean> {
617
621
  __OsdkLinkTargetType?: Q;
@@ -628,10 +632,14 @@ interface ObjectTypeDefinition {
628
632
  __DefinitionMetadata?: ObjectMetadata & ObjectInterfaceCompileDefinition;
629
633
  }
630
634
  type ObjectTypeLinkKeysFrom2<Q extends ObjectOrInterfaceDefinition> = keyof CompileTimeMetadata<Q>["links"] & string;
631
- interface PropertyDef<T extends WirePropertyTypes, N extends "nullable" | "non-nullable" = "nullable", M extends "array" | "single" = "single"> extends ObjectMetadata.Property {
635
+ interface PropertyDef<T extends WirePropertyTypes, N extends "nullable" | "non-nullable" = "nullable", M extends "array" | "single" = "single", MAIN_VALUE_FIELDS extends readonly string[] | undefined = undefined, HAS_REDUCERS extends boolean = false> extends ObjectMetadata.Property {
632
636
  type: T;
633
637
  multiplicity: M extends "array" ? true : false;
634
638
  nullable: N extends "nullable" ? true : false;
639
+ mainValue: MAIN_VALUE_FIELDS extends readonly string[] ? {
640
+ fields: MAIN_VALUE_FIELDS;
641
+ } : undefined;
642
+ hasReducers: HAS_REDUCERS;
635
643
  }
636
644
  type ReleaseStatus = "ACTIVE" | "EXPERIMENTAL" | "DEPRECATED" | "ENDORSED";
637
645
  type ObjectTypeVisibility = "NORMAL" | "PROMINENT" | "HIDDEN";
@@ -883,6 +891,62 @@ type MaybeNullable<GROUP, VALUE> = GROUP extends {
883
891
 
884
892
  type AggregationsResults<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = Exclude<keyof AO["$select"], ValidAggregationKeys<Q>> extends never ? unknown extends AO["$groupBy"] ? AggregationResultsWithoutGroups<Q, AO["$select"]> : Exclude<AO["$groupBy"], undefined> extends never ? AggregationResultsWithoutGroups<Q, AO["$select"]> : Exclude<keyof AO["$groupBy"], AggregatableKeys<Q>> extends never ? AggregationResultsWithGroups<Q, AO["$select"], AO["$groupBy"]> : `Sorry, the following are not valid groups for an aggregation: ${Exclude<keyof AO["$groupBy"] & string, AggregatableKeys<Q>>}` : `Sorry, the following are not valid selectors for an aggregation: ${Exclude<keyof AO["$select"] & string, ValidAggregationKeys<Q>>}`;
885
893
 
894
+ /** Modifier values users can specify */
895
+ type PropertyModifierValue = "applyMainValue" | "applyReducers" | "applyReducersAndExtractMainValue";
896
+ type MainValueTypeOf<P extends ObjectMetadata.Property> = P["mainValue"] extends {
897
+ fields: readonly [infer Single extends string];
898
+ } ? P["type"] extends Record<string, WirePropertyTypes> ? Single extends keyof P["type"] ? GetClientPropertyValueFromWire<P["type"][Single]> : never : never : P["mainValue"] extends {
899
+ fields: readonly (infer F extends string)[];
900
+ } ? P["type"] extends Record<string, WirePropertyTypes> ? {
901
+ [K in F & keyof P["type"]]: GetClientPropertyValueFromWire<P["type"][K]>;
902
+ } : never : never;
903
+ /**
904
+ * Extract the reduced type from an array property.
905
+ * The reduced type is the element type (non-array).
906
+ */
907
+ type ReducedTypeOf<P extends ObjectMetadata.Property> = P["hasReducers"] extends true ? P["type"] extends WirePropertyTypes ? GetClientPropertyValueFromWire<P["type"]> : never : never;
908
+ /** Get keys of properties that have mainValue defined */
909
+ type PropsWithMainValue<Q extends ObjectOrInterfaceDefinition> = {
910
+ [K in PropertyKeys<Q>]: CompileTimeMetadata<Q>["properties"][K] extends {
911
+ mainValue: {
912
+ fields: readonly string[];
913
+ };
914
+ } ? K : never;
915
+ }[PropertyKeys<Q>];
916
+ /** Get keys of properties that have reducers defined */
917
+ type PropsWithReducers<Q extends ObjectOrInterfaceDefinition> = {
918
+ [K in PropertyKeys<Q>]: CompileTimeMetadata<Q>["properties"][K] extends {
919
+ hasReducers: true;
920
+ } ? K : never;
921
+ }[PropertyKeys<Q>];
922
+ /**
923
+ * Apply a single modifier to a property type.
924
+ * - "applyMainValue" -> returns struct with only main value fields
925
+ * - "applyReducers" -> returns single element type (not array)
926
+ * - "applyReducersAndExtractMainValue" -> returns single element with only main value fields
927
+ */
928
+ type ApplyModifierToProperty<P extends ObjectMetadata.Property, M extends PropertyModifierValue> = M extends "applyMainValue" ? MainValueTypeOf<P> | (P["nullable"] extends true ? undefined : never) : M extends "applyReducers" ? ReducedTypeOf<P> | (P["nullable"] extends true ? undefined : never) : M extends "applyReducersAndExtractMainValue" ? MainValueOfReduced<P> | (P["nullable"] extends true ? undefined : never) : never;
929
+ type MainValueOfReduced<P extends ObjectMetadata.Property> = P["mainValue"] extends {
930
+ fields: readonly [infer Single extends string];
931
+ } ? P["type"] extends Record<string, WirePropertyTypes> ? Single extends keyof P["type"] ? GetClientPropertyValueFromWire<P["type"][Single]> : never : never : P["mainValue"] extends {
932
+ fields: readonly (infer F extends string)[];
933
+ } ? P["type"] extends Record<string, WirePropertyTypes> ? {
934
+ [K in F & keyof P["type"]]: GetClientPropertyValueFromWire<P["type"][K]>;
935
+ } : never : never;
936
+ type PropsWithBoth<Q extends ObjectOrInterfaceDefinition> = PropsWithMainValue<Q> & PropsWithReducers<Q>;
937
+ type PropsWithOnlyMainValue<Q extends ObjectOrInterfaceDefinition> = Exclude<PropsWithMainValue<Q>, PropsWithReducers<Q>>;
938
+ type PropsWithOnlyReducers<Q extends ObjectOrInterfaceDefinition> = Exclude<PropsWithReducers<Q>, PropsWithMainValue<Q>>;
939
+ type ApplyModifiersArg<Q extends ObjectOrInterfaceDefinition> = {
940
+ [P in PropsWithOnlyMainValue<Q>]?: "applyMainValue";
941
+ } & {
942
+ [P in PropsWithOnlyReducers<Q>]?: "applyReducers";
943
+ } & {
944
+ [P in PropsWithBoth<Q>]?: "applyMainValue" | "applyReducers" | "applyReducersAndExtractMainValue";
945
+ };
946
+ type ApplyModifiersToProps<Q extends ObjectOrInterfaceDefinition, MODIFIERS extends Record<string, PropertyModifierValue>> = {
947
+ [K in PropertyKeys<Q>]: K extends keyof MODIFIERS ? MODIFIERS[K] extends PropertyModifierValue ? ApplyModifierToProperty<CompileTimeMetadata<Q>["properties"][K], MODIFIERS[K]> : CompileTimeMetadata<Q>["props"][K] : CompileTimeMetadata<Q>["props"][K];
948
+ };
949
+
886
950
  type NullabilityAdherence = false | "throw" | "drop";
887
951
  declare namespace NullabilityAdherence {
888
952
  type Default = "throw";
@@ -915,13 +979,19 @@ interface SelectArg<Q extends ObjectOrInterfaceDefinition, L extends string = Pr
915
979
  interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {
916
980
  }
917
981
  type SelectArgToKeys<Q extends ObjectOrInterfaceDefinition, A extends SelectArg<Q, any, any>> = A extends SelectArg<Q, never> ? PropertyKeys<Q> : A["$select"] extends readonly string[] ? A["$select"][number] : PropertyKeys<Q>;
918
- interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {}, PROPERTY_SECURITIES extends boolean = false> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS, PROPERTY_SECURITIES> {
982
+ interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {}, PROPERTY_SECURITIES extends boolean = false, MODIFIERS extends ApplyModifiersArg<Q> = {}> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS, PROPERTY_SECURITIES, MODIFIERS> {
919
983
  $nextPageToken?: string;
920
984
  $pageSize?: number;
985
+ $applyModifiers?: ApplyModifiersArg<Q> & MODIFIERS & {
986
+ [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never;
987
+ };
921
988
  }
922
- interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never, PROPERTY_SECURITIES extends boolean = false> extends SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>, OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {
989
+ interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never, PROPERTY_SECURITIES extends boolean = false, MODIFIERS extends ApplyModifiersArg<Q> = {}> extends SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>, OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {
923
990
  $__UNSTABLE_useOldInterfaceApis?: boolean;
924
991
  $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
992
+ $applyModifiers?: ApplyModifiersArg<Q> & MODIFIERS & {
993
+ [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never;
994
+ };
925
995
  }
926
996
  type Augment<X extends ObjectOrInterfaceDefinition, T extends string> = {
927
997
  [K in CompileTimeMetadata<X>["apiName"]]: T[];
@@ -967,10 +1037,13 @@ interface PageResult<T> {
967
1037
 
968
1038
  /** exposed for a test */
969
1039
  type UnionIfTrue<S extends string, UNION_IF_TRUE extends boolean, E extends string> = IsNever<S> extends true ? never : UNION_IF_TRUE extends true ? S | E : S;
1040
+ type ModifiersToSelectStrings$1<M> = {
1041
+ [K in keyof M]: K extends string ? M[K] extends PropertyModifierValue ? `${K}:${M[K]}` : never : never;
1042
+ }[keyof M];
970
1043
  /**
971
1044
  * Helper type for converting fetch options into an Osdk object
972
1045
  */
973
- type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}, PROPERTY_SECURITIES extends boolean = false> = PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, PropertyKeys<Q> extends L ? never : L>, ORDER_BY_OPTIONS>>;
1046
+ type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}, PROPERTY_SECURITIES extends boolean = false, MODIFIERS extends ApplyModifiersArg<Q> = {}> = PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, Exclude<PropertyKeys<Q> extends L ? never : L, keyof MODIFIERS> | ModifiersToSelectStrings$1<MODIFIERS>, {}>, ORDER_BY_OPTIONS>>;
974
1047
  /**
975
1048
  * Helper type for converting fetch options into an Osdk object
976
1049
  */
@@ -1084,12 +1157,20 @@ type GetPropsKeys<Q extends ObjectOrInterfaceDefinition, P extends PropertyKeys<
1084
1157
  type MaybeScore<T extends Osdk.Instance<any>, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>> = ORDER_BY_OPTIONS extends "relevance" ? T & {
1085
1158
  $score: number;
1086
1159
  } : T;
1160
+ type ReducedValues<Q extends ObjectOrInterfaceDefinition> = `${PropsWithOnlyMainValue<Q> & string}:applyMainValue` | `${PropsWithOnlyReducers<Q> & string}:applyReducers` | `${PropsWithBoth<Q> & string}:applyMainValue` | `${PropsWithBoth<Q> & string}:applyReducers` | `${PropsWithBoth<Q> & string}:applyReducersAndExtractMainValue`;
1161
+ type ExtractPropNameFromP<S> = S extends `${infer Prop}:${string}` ? Prop : S;
1162
+ type GetPropNamesFromP<P> = [P] extends [string] ? ExtractPropNameFromP<P> : never;
1163
+ type HasAnyModifiers<P> = P extends `${string}:${string}` ? true : never;
1164
+ type HasModifiers<P> = IsAny<P> extends true ? false : [HasAnyModifiers<P>] extends [never] ? false : true;
1165
+ type BuildModifiersFromP<P> = {
1166
+ [K in P as K extends `${infer Prop}:${string}` ? Prop : never]: K extends `${string}:${infer Mod extends PropertyModifierValue}` ? Mod : never;
1167
+ };
1087
1168
  /**
1088
1169
  * Use `Osdk.Instance` or `YourType.OsdkInstance`
1089
1170
  */
1090
1171
  type Osdk<Q extends ObjectOrInterfaceDefinition, OPTIONS extends string = never, P extends PropertyKeys<Q> = PropertyKeys<Q>> = IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P> : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P> : (IsNever<Exclude<OPTIONS, "$rid">>) extends true ? Osdk.Instance<Q, OPTIONS & "$rid", P> : Osdk.Instance<Q, ("$rid" extends OPTIONS ? "$rid" : never), ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>>;
1091
1172
  declare namespace Osdk {
1092
- type Instance<Q extends ObjectOrInterfaceDefinition, OPTIONS extends never | "$rid" | "$allBaseProperties" | "$propertySecurities" = never, P extends PropertyKeys<Q> = PropertyKeys<Q>, R extends Record<string, SimplePropertyDef> = {}> = OsdkBase<Q> & Pick<CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, P, [R] extends [{}] ? false : true>> & ([R] extends [never] ? {} : {
1173
+ type Instance<Q extends ObjectOrInterfaceDefinition, OPTIONS extends never | "$rid" | "$allBaseProperties" | "$propertySecurities" = never, P extends PropertyKeys<Q> | ReducedValues<Q> = PropertyKeys<Q>, R extends Record<string, SimplePropertyDef> = {}> = OsdkBase<Q> & ([P] extends [PropertyKeys<Q>] ? Pick<CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, P, [R] extends [{}] ? false : true>> : Pick<HasModifiers<P> extends true ? ApplyModifiersToProps<Q, BuildModifiersFromP<P>> : CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, GetPropNamesFromP<P>, [R] extends [{}] ? false : true>>) & ([R] extends [never] ? {} : {
1093
1174
  [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]>;
1094
1175
  }) & {
1095
1176
  readonly $link: Q extends {
@@ -1744,6 +1825,9 @@ interface MinimalObjectSet<Q extends ObjectOrInterfaceDefinition, RDPs extends R
1744
1825
  }
1745
1826
  type ExtractOptions2<X extends FetchPageArgs<any, any, any, any, any, any, any>> = [X] extends [never] ? never : ExtractRidOption<X["$includeRid"] extends true ? true : false> | ExtractAllPropertiesOption<X["$includeAllBaseObjectProperties"] extends true ? true : false>;
1746
1827
  type Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<X["$select"]>[number];
1828
+ type ModifiersToSelectStrings<M> = {
1829
+ [K in keyof M]: K extends string ? M[K] extends PropertyModifierValue ? `${K}:${M[K]}` : never : never;
1830
+ }[keyof M];
1747
1831
  interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
1748
1832
  readonly fetchPage: FetchPageSignature<Q, RDPs>;
1749
1833
  readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;
@@ -1764,7 +1848,7 @@ interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
1764
1848
  * ```
1765
1849
  * @returns a page of objects
1766
1850
  */
1767
- <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}, PROPERTY_SECURITIES extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES>): Promise<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>;
1851
+ <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}, PROPERTY_SECURITIES extends boolean = false, MODIFIERS extends ApplyModifiersArg<Q> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES, MODIFIERS>): Promise<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, Exclude<NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, keyof MODIFIERS> | ModifiersToSelectStrings<MODIFIERS>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>;
1768
1852
  }
1769
1853
  interface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {
1770
1854
  /**
@@ -1803,7 +1887,7 @@ interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RD
1803
1887
  * ```
1804
1888
  * @returns a page of objects, wrapped in a result wrapper
1805
1889
  */
1806
- <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES>): Promise<Result<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>>;
1890
+ <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}, const MODIFIERS extends ApplyModifiersArg<Q> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES, MODIFIERS>): Promise<Result<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, Exclude<NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, keyof MODIFIERS> | ModifiersToSelectStrings<MODIFIERS>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>>;
1807
1891
  }
1808
1892
  interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
1809
1893
  /**
@@ -1820,7 +1904,7 @@ interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<strin
1820
1904
  */
1821
1905
  readonly where: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => this;
1822
1906
  }
1823
- interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}, PROPERTY_SECURITIES extends boolean = false> {
1907
+ interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, _ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}, PROPERTY_SECURITIES extends boolean = false> {
1824
1908
  /**
1825
1909
  * Returns an async iterator to load all objects of this type
1826
1910
  * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)
@@ -1844,7 +1928,7 @@ interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
1844
1928
  * ```
1845
1929
  * @returns an async iterator to load all objects
1846
1930
  */
1847
- <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}>(args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES>): AsyncIterableIterator<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>;
1931
+ <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}, const MODIFIERS extends ApplyModifiersArg<Q> = {}>(args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES, MODIFIERS>): AsyncIterableIterator<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>;
1848
1932
  }
1849
1933
  interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> {
1850
1934
  asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;
@@ -1,5 +1,5 @@
1
- import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Media, c as Attachment, O as ObjectTypeDefinition, d as ObjectIdentifiers, e as OsdkObjectPrimaryKeyType, f as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, g as OsdkMetadata, R as ReleaseStatus, h as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, i as PrimaryKeyTypes, j as OsdkBase } from './ObjectSet-Cfm7EbMN.cjs';
2
- export { k as Affix, l as AggregateOpts, m as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, o as AggregationResultsWithGroups, p as AggregationResultsWithoutGroups, q as AggregationsResults, r as AllGroupByValues, s as AndWhereClause, t as AsyncIterArgs, u as AttachmentMetadata, v as Augment, w as Augments, B as BaseObjectSet, x as BaseWirePropertyTypes, y as ConvertProps, D as DatetimeFormat, z as DatetimeLocalizedFormat, E as DatetimeLocalizedFormatType, F as DatetimeStringFormat, G as DatetimeTimezone, H as DatetimeTimezoneStatic, J as DatetimeTimezoneUser, K as DerivedProperty, L as DistanceUnitMapping, N as DurationBaseValue, Q as DurationFormatStyle, S as DurationMapping, T as DurationPrecision, U as FetchLinksPageResult, V as FetchPageArgs, W as FetchPageResult, X as GeoFilterOptions, Y as GeoFilter_Intersects, Z as GeoFilter_Within, _ as GeotimeSeriesProperty, $ as GroupByClause, a0 as GroupByRange, a1 as HumanReadableFormat, a2 as InterfaceMetadata, a3 as IntervalRule, a4 as KnownType, a5 as LinkNames, a6 as LinkTypeApiNamesFor, a7 as LinkedType, a8 as MaybeScore, a9 as MediaMetadata, aa as MediaPropertyLocation, ab as MinimalDirectedObjectLinkInstance, ac as NotWhereClause, ad as NullabilityAdherence, ae as NumberFormatAffix, af as NumberFormatCurrency, ag as NumberFormatCurrencyStyle, ah as NumberFormatCustomUnit, ai as NumberFormatDuration, aj as NumberFormatFixedValues, ak as NumberFormatNotation, al as NumberFormatOptions, am as NumberFormatRatio, an as NumberFormatScale, ao as NumberFormatStandard, ap as NumberFormatStandardUnit, aq as NumberRatioType, ar as NumberRoundingMode, as as NumberScaleType, at as ObjectMetadata, au as ObjectSetArgs, av as ObjectSetSubscription, aw as ObjectSpecifier, ax as OrWhereClause, ay as Osdk, az as OsdkObjectCreatePropertyType, aA as OsdkObjectLinksObject, aB as OsdkObjectPropertyType, aC as PageResult, aD as PossibleWhereClauseFilters, aE as PrimaryKeyType, aF as PropertyBooleanFormattingRule, aG as PropertyDateFormattingRule, aH as PropertyDef, aI as PropertyKeys, aJ as PropertyKnownTypeFormattingRule, aK as PropertyMarkings, aL as PropertyNumberFormattingRule, aM as PropertyNumberFormattingRuleType, aN as PropertySecurity, aO as PropertyTimestampFormattingRule, aP as PropertyTypeReference, aQ as PropertyTypeReferenceOrStringConstant, aR as PropertyValueFormattingRule, aS as Result, aT as SelectArg, aU as SelectArgToKeys, aV as SimplePropertyDef, aW as SingleLinkAccessor, aX as SingleOsdkResult, aY as StringConstant, aZ as TimeCodeFormat, a_ as TimeSeriesPoint, a$ as TimeSeriesProperty, b0 as TimeSeriesQuery, b1 as TimeseriesDurationMapping, b2 as ValidAggregationKeys, b3 as VersionBound, b4 as WhereClause, b5 as WirePropertyTypes, b6 as isOk } from './ObjectSet-Cfm7EbMN.cjs';
1
+ import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Media, c as Attachment, O as ObjectTypeDefinition, d as ObjectIdentifiers, e as OsdkObjectPrimaryKeyType, f as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, g as OsdkMetadata, R as ReleaseStatus, h as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, i as PrimaryKeyTypes, j as OsdkBase } from './ObjectSet-CsJQ0rYb.cjs';
2
+ export { k as Affix, l as AggregateOpts, m as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, o as AggregationResultsWithGroups, p as AggregationResultsWithoutGroups, q as AggregationsResults, r as AllGroupByValues, s as AndWhereClause, t as AsyncIterArgs, u as AttachmentMetadata, v as Augment, w as Augments, B as BaseObjectSet, x as BaseWirePropertyTypes, y as ConvertProps, D as DatetimeFormat, z as DatetimeLocalizedFormat, E as DatetimeLocalizedFormatType, F as DatetimeStringFormat, G as DatetimeTimezone, H as DatetimeTimezoneStatic, J as DatetimeTimezoneUser, K as DerivedProperty, L as DistanceUnitMapping, N as DurationBaseValue, Q as DurationFormatStyle, S as DurationMapping, T as DurationPrecision, U as FetchLinksPageResult, V as FetchPageArgs, W as FetchPageResult, X as GeoFilterOptions, Y as GeoFilter_Intersects, Z as GeoFilter_Within, _ as GeotimeSeriesProperty, $ as GroupByClause, a0 as GroupByRange, a1 as HumanReadableFormat, a2 as InterfaceMetadata, a3 as IntervalRule, a4 as KnownType, a5 as LinkNames, a6 as LinkTypeApiNamesFor, a7 as LinkedType, a8 as MaybeScore, a9 as MediaMetadata, aa as MediaPropertyLocation, ab as MinimalDirectedObjectLinkInstance, ac as NotWhereClause, ad as NullabilityAdherence, ae as NumberFormatAffix, af as NumberFormatCurrency, ag as NumberFormatCurrencyStyle, ah as NumberFormatCustomUnit, ai as NumberFormatDuration, aj as NumberFormatFixedValues, ak as NumberFormatNotation, al as NumberFormatOptions, am as NumberFormatRatio, an as NumberFormatScale, ao as NumberFormatStandard, ap as NumberFormatStandardUnit, aq as NumberRatioType, ar as NumberRoundingMode, as as NumberScaleType, at as ObjectMetadata, au as ObjectSetArgs, av as ObjectSetSubscription, aw as ObjectSpecifier, ax as OrWhereClause, ay as Osdk, az as OsdkObjectCreatePropertyType, aA as OsdkObjectLinksObject, aB as OsdkObjectPropertyType, aC as PageResult, aD as PossibleWhereClauseFilters, aE as PrimaryKeyType, aF as PropertyBooleanFormattingRule, aG as PropertyDateFormattingRule, aH as PropertyDef, aI as PropertyKeys, aJ as PropertyKnownTypeFormattingRule, aK as PropertyMarkings, aL as PropertyNumberFormattingRule, aM as PropertyNumberFormattingRuleType, aN as PropertySecurity, aO as PropertyTimestampFormattingRule, aP as PropertyTypeReference, aQ as PropertyTypeReferenceOrStringConstant, aR as PropertyValueFormattingRule, aS as Result, aT as SelectArg, aU as SelectArgToKeys, aV as SimplePropertyDef, aW as SingleLinkAccessor, aX as SingleOsdkResult, aY as StringConstant, aZ as TimeCodeFormat, a_ as TimeSeriesPoint, a$ as TimeSeriesProperty, b0 as TimeSeriesQuery, b1 as TimeseriesDurationMapping, b2 as ValidAggregationKeys, b3 as VersionBound, b4 as WhereClause, b5 as WirePropertyTypes, b6 as isOk } from './ObjectSet-CsJQ0rYb.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -1,4 +1,4 @@
1
- export { D as DerivedLinkConfig, k as NullabilityOp, l as ShapeDerivedLinkDef, m as ShapeLinkObjectSetDef, n as ShapeLinkOrderBy, o as ShapeLinkSegment, p as ShapeLinkSetOperation, q as ShapePropertyConfig } from '../shapes-internal-BDgWwxSG.cjs';
2
- import '../ObjectSet-Cfm7EbMN.cjs';
1
+ export { D as DerivedLinkConfig, k as NullabilityOp, l as ShapeDerivedLinkDef, m as ShapeLinkObjectSetDef, n as ShapeLinkOrderBy, o as ShapeLinkSegment, p as ShapeLinkSetOperation, q as ShapePropertyConfig } from '../shapes-internal-BqlLqPlf.cjs';
2
+ import '../ObjectSet-CsJQ0rYb.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';