@osdk/api 2.91.0 → 2.91.1-main-8aa522dafda38bf56948bcf5dcc07e46519e06de

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @osdk/api
2
2
 
3
+ ## 2.91.1-main-8aa522dafda38bf56948bcf5dcc07e46519e06de
4
+
5
+ ### Patch Changes
6
+
7
+ - 749af7f: Restore property name suggestions inside `$orderBy` objects while preserving relevance ordering.
8
+
3
9
  ## 2.91.0
4
10
 
5
11
  ## 2.90.0
@@ -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\";\nimport type {\n ApplyModifiersArg,\n PropertyModifierValue,\n} 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 >\n extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\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 /**\n * The properties to load for each object. If omitted, the API loads its default property\n * set (vector properties, for example, are not included). The primary key is always\n * returned, even when it is not selected.\n *\n * Select only the properties your code needs. Loading unused properties wastes bandwidth\n * and compute and can slow down retrieval, and reading fewer properties afterwards does\n * not avoid the cost of fetching them.\n *\n * Ontology-defined derived properties are not returned by default and must be\n * included in `$select`.\n * Include any other properties you need in the same selection.\n * Runtime-defined derived properties added via `.withProperties(...)` are returned\n * by default only when `$select` is omitted. If you pass `$select`, include them\n * in the selection as well.\n *\n * @example\n * ```ts\n * // Assume leadName is an ontology-defined derived property on Employee.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"leadName\"],\n * });\n *\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"leadName\"],\n * })) {\n * console.log(employee.fullName, employee.leadName);\n * }\n * ```\n */\n $select?: readonly L[];\n $includeRid?: R;\n $loadPropertySecurityMetadata?: PROPERTY_SECURITIES;\n $UNSTABLE_loadOntologyDefinedDerivedProperties?: boolean;\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\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> =\n A extends SelectArg<Q, never>\n ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[]\n ? 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 DEFAULT_LOAD_LEVEL extends PropertyModifierValue | undefined =\n PropertyModifierValue,\n> extends 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 $nextPageToken?: string;\n /**\n * The number of objects in one page. This does not limit the total number of objects:\n * continue with `nextPageToken` to load further pages.\n */\n $pageSize?: number;\n /**\n * Applies ontology-configured reducers or struct main values to properties by API name.\n * Only properties with the corresponding configuration in the generated SDK accept a modifier:\n *\n * - `\"applyReducers\"`: reduces an array to a single element using its configured reducers.\n * - `\"applyMainValue\"`: extracts a struct's configured main value. One main-value field\n * returns that field's value; multiple fields return a struct containing only those fields.\n * - `\"applyReducersAndExtractMainValue\"`: reduces a struct array, then extracts its main value.\n * Requires both reducers and a main value.\n *\n * When passing `$select`, include every modified property using its plain API name, along\n * with any other properties you need. Unlisted properties are not modified by this option.\n * The returned property types reflect the modifiers, preserving property nullability.\n * For an explicit `Osdk.Instance` type, use `\"propertyApiName:modifier\"` in its property keys.\n *\n * @example\n * ```ts\n * // Assume these properties have reducers and/or main values configured in the ontology.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"performanceScores\", \"employeeProfile\", \"bonusHistory\"],\n * $applyModifiers: {\n * performanceScores: \"applyReducers\",\n * employeeProfile: \"applyMainValue\",\n * bonusHistory: \"applyReducersAndExtractMainValue\",\n * },\n * });\n * ```\n */\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n /**\n * Best-effort load level applied to every property without listing them:\n * reducers and struct main values where defined, other properties unchanged.\n * A per-property `$applyModifiers` entry wins.\n *\n * @experimental\n */\n $EXPERIMENTAL_defaultLoadLevel?: DEFAULT_LOAD_LEVEL;\n /**\n * Ensures paging consistency by freezing the view at the time of query to prevent duplicate or missing items. Setting $snapshot to false ensures that you will always get the latest results.\n *\n * Without a snapshot, if objects are added, removed, or edited between requests, later pages\n * may repeat or skip objects. A snapshot configured for a function run still applies even\n * when this is `false`. With a snapshot, pass `$snapshot: true` on every page request; paging\n * fails if the snapshot expires or the backend detects a paging inconsistency\n * (`PagingInconsistencyDetected`). Stream-backed object types do not provide this snapshot\n * guarantee across pages. `asyncIter()` always requests a snapshot.\n * @default false\n */\n $snapshot?: boolean;\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>\n extends\n SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n /**\n * Applies ontology-configured reducers or struct main values to properties by API name\n * on every page loaded by the iterator. Only properties with the corresponding\n * configuration in the generated SDK accept a modifier:\n *\n * - `\"applyReducers\"`: reduces an array to a single element using its configured reducers.\n * - `\"applyMainValue\"`: extracts a struct's configured main value. One main-value field\n * returns that field's value; multiple fields return a struct containing only those fields.\n * - `\"applyReducersAndExtractMainValue\"`: reduces a struct array, then extracts its main value.\n * Requires both reducers and a main value.\n *\n * When passing `$select`, include every modified property using its plain API name, along\n * with any other properties you need. Unlisted properties are not modified by this option.\n *\n * @example\n * ```ts\n * // Assume performanceScores has reducers configured in the ontology.\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"performanceScores\"],\n * $applyModifiers: { performanceScores: \"applyReducers\" },\n * })) {\n * console.log(employee.fullName, employee.performanceScores);\n * }\n * ```\n */\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n}\n\nexport type Augment<X extends ObjectOrInterfaceDefinition, T extends string> = {\n [K in CompileTimeMetadata<X>[\"apiName\"]]: T[];\n};\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,WA2BiBA,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 {\n ApplyModifiersArg,\n PropertyModifierValue,\n} 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 & (ORDER_BY_OPTIONS | OrderByOptions<L>);\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 >\n extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\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 /**\n * The properties to load for each object. If omitted, the API loads its default property\n * set (vector properties, for example, are not included). The primary key is always\n * returned, even when it is not selected.\n *\n * Select only the properties your code needs. Loading unused properties wastes bandwidth\n * and compute and can slow down retrieval, and reading fewer properties afterwards does\n * not avoid the cost of fetching them.\n *\n * Ontology-defined derived properties are not returned by default and must be\n * included in `$select`.\n * Include any other properties you need in the same selection.\n * Runtime-defined derived properties added via `.withProperties(...)` are returned\n * by default only when `$select` is omitted. If you pass `$select`, include them\n * in the selection as well.\n *\n * @example\n * ```ts\n * // Assume leadName is an ontology-defined derived property on Employee.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"leadName\"],\n * });\n *\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"leadName\"],\n * })) {\n * console.log(employee.fullName, employee.leadName);\n * }\n * ```\n */\n $select?: readonly L[];\n $includeRid?: R;\n $loadPropertySecurityMetadata?: PROPERTY_SECURITIES;\n $UNSTABLE_loadOntologyDefinedDerivedProperties?: boolean;\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\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> =\n A extends SelectArg<Q, never>\n ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[]\n ? 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 DEFAULT_LOAD_LEVEL extends PropertyModifierValue | undefined =\n PropertyModifierValue,\n> extends 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 $nextPageToken?: string;\n /**\n * The number of objects in one page. This does not limit the total number of objects:\n * continue with `nextPageToken` to load further pages.\n */\n $pageSize?: number;\n /**\n * Applies ontology-configured reducers or struct main values to properties by API name.\n * Only properties with the corresponding configuration in the generated SDK accept a modifier:\n *\n * - `\"applyReducers\"`: reduces an array to a single element using its configured reducers.\n * - `\"applyMainValue\"`: extracts a struct's configured main value. One main-value field\n * returns that field's value; multiple fields return a struct containing only those fields.\n * - `\"applyReducersAndExtractMainValue\"`: reduces a struct array, then extracts its main value.\n * Requires both reducers and a main value.\n *\n * When passing `$select`, include every modified property using its plain API name, along\n * with any other properties you need. Unlisted properties are not modified by this option.\n * The returned property types reflect the modifiers, preserving property nullability.\n * For an explicit `Osdk.Instance` type, use `\"propertyApiName:modifier\"` in its property keys.\n *\n * @example\n * ```ts\n * // Assume these properties have reducers and/or main values configured in the ontology.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"performanceScores\", \"employeeProfile\", \"bonusHistory\"],\n * $applyModifiers: {\n * performanceScores: \"applyReducers\",\n * employeeProfile: \"applyMainValue\",\n * bonusHistory: \"applyReducersAndExtractMainValue\",\n * },\n * });\n * ```\n */\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n /**\n * Best-effort load level applied to every property without listing them:\n * reducers and struct main values where defined, other properties unchanged.\n * A per-property `$applyModifiers` entry wins.\n *\n * @experimental\n */\n $EXPERIMENTAL_defaultLoadLevel?: DEFAULT_LOAD_LEVEL;\n /**\n * Ensures paging consistency by freezing the view at the time of query to prevent duplicate or missing items. Setting $snapshot to false ensures that you will always get the latest results.\n *\n * Without a snapshot, if objects are added, removed, or edited between requests, later pages\n * may repeat or skip objects. A snapshot configured for a function run still applies even\n * when this is `false`. With a snapshot, pass `$snapshot: true` on every page request; paging\n * fails if the snapshot expires or the backend detects a paging inconsistency\n * (`PagingInconsistencyDetected`). Stream-backed object types do not provide this snapshot\n * guarantee across pages. `asyncIter()` always requests a snapshot.\n * @default false\n */\n $snapshot?: boolean;\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>\n extends\n SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n /**\n * Applies ontology-configured reducers or struct main values to properties by API name\n * on every page loaded by the iterator. Only properties with the corresponding\n * configuration in the generated SDK accept a modifier:\n *\n * - `\"applyReducers\"`: reduces an array to a single element using its configured reducers.\n * - `\"applyMainValue\"`: extracts a struct's configured main value. One main-value field\n * returns that field's value; multiple fields return a struct containing only those fields.\n * - `\"applyReducersAndExtractMainValue\"`: reduces a struct array, then extracts its main value.\n * Requires both reducers and a main value.\n *\n * When passing `$select`, include every modified property using its plain API name, along\n * with any other properties you need. Unlisted properties are not modified by this option.\n *\n * @example\n * ```ts\n * // Assume performanceScores has reducers configured in the ontology.\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"performanceScores\"],\n * $applyModifiers: { performanceScores: \"applyReducers\" },\n * })) {\n * console.log(employee.fullName, employee.performanceScores);\n * }\n * ```\n */\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n}\n\nexport type Augment<X extends ObjectOrInterfaceDefinition, T extends string> = {\n [K in CompileTimeMetadata<X>[\"apiName\"]]: T[];\n};\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,WA2BiBA,oBAAoB;AAAA,WAIpBC,aAAa","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 {\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> = keyof D extends never\n ? Q\n : DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>,\n> = [D] extends [never]\n ? {}\n : D extends BaseObjectSet<any>\n ? {}\n : D extends Record<string, SimplePropertyDef>\n ? 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]\n ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L\n ? 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\n ? T\n : T extends abstract new (...args: any[]) => any\n ? 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 : (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]\n ? 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>\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\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never]\n ? 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<Q extends ObjectOrInterfaceDefinition, X> = [X] extends [\n never,\n]\n ? {}\n : X extends { $applyModifiers: infer M extends ApplyModifiersArg<Q> }\n ? M\n : {};\n\ntype ModifiersToSelectStrings<M> = {\n [K in keyof M]: K extends string\n ? M[K] extends PropertyModifierValue\n ? `${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<Q, PropertyKeys<Q>, false, string & keyof RDPs>\n | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;\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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\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 * $select: [\"name\"],\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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\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 * $select: [\"name\"],\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: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => 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 *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\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 *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\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 runtime-defined 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 >(clause: {\n [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\n ? NEW[NN]\n : NN extends keyof RDPs\n ? 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 BaseObjectSet<Q> | Record<string, SimplePropertyDef> =\n never,\n> extends ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n> {}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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\n ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition\n ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string\n ? 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 }\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>\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"],"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> = keyof D extends never\n ? Q\n : DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>,\n> = [D] extends [never]\n ? {}\n : D extends BaseObjectSet<any>\n ? {}\n : D extends Record<string, SimplePropertyDef>\n ? 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]\n ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L\n ? 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\n ? T\n : T extends abstract new (...args: any[]) => any\n ? 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 : (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]\n ? 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>\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\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never]\n ? 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<Q extends ObjectOrInterfaceDefinition, X> = [X] extends [\n never,\n]\n ? {}\n : X extends { $applyModifiers: infer M extends ApplyModifiersArg<Q> }\n ? M\n : {};\n\ntype ModifiersToSelectStrings<M> = {\n [K in keyof M]: K extends string\n ? M[K] extends PropertyModifierValue\n ? `${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<Q, PropertyKeys<Q>, false, string & keyof RDPs>\n | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;\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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\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 * $select: [\"name\"],\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<\n PropertyKeys<Q> | (string & keyof RDPs)\n > = {},\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 string & keyof RDPs,\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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\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 * $select: [\"name\"],\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<\n PropertyKeys<Q> | (string & keyof RDPs)\n > = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n string & keyof RDPs,\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: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => 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 *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\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 *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\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<\n PropertyKeys<Q> | (string & keyof RDPs)\n > = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n string & keyof RDPs,\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 runtime-defined 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 >(clause: {\n [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\n ? NEW[NN]\n : NN extends keyof RDPs\n ? 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 BaseObjectSet<Q> | Record<string, SimplePropertyDef> =\n never,\n> extends ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n> {}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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\n ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition\n ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string\n ? 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 }\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>\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"],"mappings":"","ignoreList":[]}
@@ -1373,7 +1373,7 @@ declare namespace ObjectSetArgs {
1373
1373
  [K in L]?: "asc" | "desc";
1374
1374
  } | "relevance";
1375
1375
  interface OrderBy<ORDER_BY_OPTIONS extends OrderByOptions<L>, L extends string = never> {
1376
- $orderBy?: ORDER_BY_OPTIONS;
1376
+ $orderBy?: ORDER_BY_OPTIONS & (ORDER_BY_OPTIONS | OrderByOptions<L>);
1377
1377
  }
1378
1378
  interface AsyncIter<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never> extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {
1379
1379
  $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
@@ -2406,7 +2406,7 @@ interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
2406
2406
  * ```
2407
2407
  * @returns a page of objects
2408
2408
  */
2409
- <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>>>;
2409
+ <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> | (string & keyof RDPs)> = {}, PROPERTY_SECURITIES extends boolean = false, MODIFIERS extends ApplyModifiersArg<Q> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, string & keyof RDPs, 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>>>;
2410
2410
  }
2411
2411
  interface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {
2412
2412
  /**
@@ -2453,7 +2453,7 @@ interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RD
2453
2453
  * ```
2454
2454
  * @returns a page of objects, wrapped in a result wrapper
2455
2455
  */
2456
- <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>>>>;
2456
+ <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> | (string & keyof RDPs)> = {}, const MODIFIERS extends ApplyModifiersArg<Q> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, string & keyof RDPs, 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>>>>;
2457
2457
  }
2458
2458
  interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
2459
2459
  /**
@@ -2520,7 +2520,7 @@ interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
2520
2520
  * ```
2521
2521
  * @returns an async iterator to load all objects
2522
2522
  */
2523
- <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>>;
2523
+ <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> | (string & keyof RDPs)> = {}, const MODIFIERS extends ApplyModifiersArg<Q> = {}>(args?: AsyncIterArgs<Q, L, R, A, S, T, string & keyof RDPs, 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>>;
2524
2524
  }
2525
2525
  interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> {
2526
2526
  asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;
@@ -1,4 +1,4 @@
1
- import { O as ObjectOrInterfaceDefinition, a as OsdkMetadata, b as ObjectTypeDefinition } from './ObjectSet-DDFyl39-.cjs';
1
+ import { O as ObjectOrInterfaceDefinition, a as OsdkMetadata, b as ObjectTypeDefinition } from './ObjectSet-D8f3J-vg.cjs';
2
2
 
3
3
  interface QueryMetadata {
4
4
  type: "query";
@@ -1,7 +1,7 @@
1
- import { A as AttachmentUpload, M as MediaReference, c as MediaUpload, d as Media, T as TimeSeriesReference, e as Attachment, b as ObjectTypeDefinition, f as ObjectIdentifiers, g as OsdkObjectPrimaryKeyType, h as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, a as OsdkMetadata, R as ReleaseStatus, P as PropertyValueWireToClient, i as PrimaryKeyTypes, O as ObjectOrInterfaceDefinition, j as OsdkBase } from './ObjectSet-DDFyl39-.cjs';
2
- export { k as AffineTransform, l as Affix, m as AggregateOpts, n as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, o as AggregationClause, p as AggregationResultsWithGroups, q as AggregationResultsWithoutGroups, r as AggregationsResults, s as AllGroupByValues, t as AndWhereClause, u as AsyncIterArgs, v as AttachmentMetadata, w as AudioDecodeFormat, x as AudioMediaItemMetadata, y as AudioSpecification, z as Augment, B as Augments, D as BandInfo, E as BaseObjectSet, F as BaseWirePropertyTypes, G as CipherChannelStrategy, H as CipherText, J as CipherTextValue, K as ColorInterpretation, L as CommonDicomDataElements, N as ConvertProps, Q as CoordinateReferenceSystem, S as CreateCipherText, U as DataType, V as DatetimeFormat, W as DatetimeLocalizedFormat, X as DatetimeLocalizedFormatType, Y as DatetimeStringFormat, Z as DatetimeTimezone, _ as DatetimeTimezoneStatic, $ as DatetimeTimezoneUser, a0 as DerivedProperty, a1 as DicomDataElementKey, a2 as DicomMediaItemMetadata, a3 as DicomMediaType, a4 as DicomMetaInformation, a5 as DicomMetaInformationV1, a6 as Dimensions, a7 as DistanceUnitMapping, a8 as DocumentDecodeFormat, a9 as DocumentMediaItemMetadata, aa as DurationBaseValue, ab as DurationFormatStyle, ac as DurationMapping, ad as DurationPrecision, ae as EmailAttachment, af as EmailDecodeFormat, ag as EmailMediaItemMetadata, ah as FetchLinksPageResult, ai as FetchPageArgs, aj as FetchPageResult, ak as FlipAxis, al as GcpList, am as GeoFilterOptions, an as GeoFilter_Intersects, ao as GeoFilter_Within, ap as GeoMetadata, aq as GeotimeSeriesProperty, ar as GpsMetadata, as as GroundControlPoint, at as Group, au as GroupByClause, av as GroupByRange, aw as GroupWrapper, ax as HumanReadableFormat, ay as ImageAttributeDomain, az as ImageAttributeKey, aA as ImageryDecodeFormat, aB as ImageryMediaItemMetadata, aC as InterfaceMetadata, aD as IntervalRule, aE as KnownType, aF as LinkNames, aG as LinkTypeApiNamesFor, aH as LinkedType, aI as Mailbox, aJ as MailboxOrGroup, aK as MailboxWrapper, aL as MaybeScore, aM as MediaFullMetadata, aN as MediaItemMetadata, aO as MediaMetadata, aP as MediaPropertyLocation, aQ as MinimalDirectedObjectLinkInstance, aR as Modality, aS as Model3dDecodeFormat, aT as Model3dMediaItemMetadata, aU as Model3dType, aV as NotWhereClause, aW as NullabilityAdherence, aX as NumberFormatAffix, aY as NumberFormatCurrency, aZ as NumberFormatCurrencyStyle, a_ as NumberFormatCustomUnit, a$ as NumberFormatDuration, b0 as NumberFormatFixedValues, b1 as NumberFormatNotation, b2 as NumberFormatOptions, b3 as NumberFormatRatio, b4 as NumberFormatScale, b5 as NumberFormatStandard, b6 as NumberFormatStandardUnit, b7 as NumberRatioType, b8 as NumberRoundingMode, b9 as NumberScaleType, ba as ObjectMetadata, bb as ObjectSetArgs, bc as ObjectSetSubscription, bd as ObjectSpecifier, be as OrWhereClause, bf as Orientation, bg as Osdk, bh as OsdkObjectCreatePropertyType, bi as OsdkObjectCreateWirePropertyType, bj as OsdkObjectLinksObject, bk as OsdkObjectPropertyType, bl as OsdkObjectUpdatePropertyType, bm as OsdkObjectUpdateWirePropertyType, bn as PageResult, bo as PaletteInterpretation, bp as PossibleWhereClauseFilters, bq as PrimaryKeyType, br as PropertyBooleanFormattingRule, bs as PropertyDateFormattingRule, bt as PropertyDef, bu as PropertyKeys, bv as PropertyKnownTypeFormattingRule, bw as PropertyMarkings, bx as PropertyNumberFormattingRule, by as PropertyNumberFormattingRuleType, bz as PropertySecurity, bA as PropertyTimestampFormattingRule, bB as PropertyTypeReference, bC as PropertyTypeReferenceOrStringConstant, bD as PropertyValueFormattingRule, bE as Result, bF as RotationAngle, bG as SelectArg, bH as SelectArgToKeys, bI as SimplePropertyDef, bJ as SingleLinkAccessor, bK as SingleOsdkResult, bL as SpreadsheetDecodeFormat, bM as SpreadsheetMediaItemMetadata, bN as StringConstant, bO as TimeCodeFormat, bP as TimeSeriesPoint, bQ as TimeSeriesProperty, bR as TimeSeriesQuery, bS as TimeseriesDurationMapping, bT as UnitInterpretation, bU as UnknownMediaItemMetadata, bV as UntypedMediaItemMetadata, bW as UpdateCipherText, bX as ValidAggregationKeys, bY as VersionBound, bZ as VideoDecodeFormat, b_ as VideoMediaItemMetadata, b$ as VideoSpecification, c0 as WhereClause, c1 as WirePropertyTypes, c2 as isOk } from './ObjectSet-DDFyl39-.cjs';
3
- import { A as AggregationKeyTypes, a as AggregationRangeKeyTypes, b as AggregationValueTypes } from './QueryDefinition-BirZ8Xtb.cjs';
4
- export { I as InterfaceQueryDataType, O as ObjectQueryDataType, c as ObjectSetQueryDataType, Q as QueryDataTypeDefinition, d as QueryDefinition, e as QueryMetadata, f as QueryParameterDefinition, T as ThreeDimensionalQueryAggregationDefinition, g as TwoDimensionalQueryAggregationDefinition } from './QueryDefinition-BirZ8Xtb.cjs';
1
+ import { A as AttachmentUpload, M as MediaReference, c as MediaUpload, d as Media, T as TimeSeriesReference, e as Attachment, b as ObjectTypeDefinition, f as ObjectIdentifiers, g as OsdkObjectPrimaryKeyType, h as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, a as OsdkMetadata, R as ReleaseStatus, P as PropertyValueWireToClient, i as PrimaryKeyTypes, O as ObjectOrInterfaceDefinition, j as OsdkBase } from './ObjectSet-D8f3J-vg.cjs';
2
+ export { k as AffineTransform, l as Affix, m as AggregateOpts, n as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, o as AggregationClause, p as AggregationResultsWithGroups, q as AggregationResultsWithoutGroups, r as AggregationsResults, s as AllGroupByValues, t as AndWhereClause, u as AsyncIterArgs, v as AttachmentMetadata, w as AudioDecodeFormat, x as AudioMediaItemMetadata, y as AudioSpecification, z as Augment, B as Augments, D as BandInfo, E as BaseObjectSet, F as BaseWirePropertyTypes, G as CipherChannelStrategy, H as CipherText, J as CipherTextValue, K as ColorInterpretation, L as CommonDicomDataElements, N as ConvertProps, Q as CoordinateReferenceSystem, S as CreateCipherText, U as DataType, V as DatetimeFormat, W as DatetimeLocalizedFormat, X as DatetimeLocalizedFormatType, Y as DatetimeStringFormat, Z as DatetimeTimezone, _ as DatetimeTimezoneStatic, $ as DatetimeTimezoneUser, a0 as DerivedProperty, a1 as DicomDataElementKey, a2 as DicomMediaItemMetadata, a3 as DicomMediaType, a4 as DicomMetaInformation, a5 as DicomMetaInformationV1, a6 as Dimensions, a7 as DistanceUnitMapping, a8 as DocumentDecodeFormat, a9 as DocumentMediaItemMetadata, aa as DurationBaseValue, ab as DurationFormatStyle, ac as DurationMapping, ad as DurationPrecision, ae as EmailAttachment, af as EmailDecodeFormat, ag as EmailMediaItemMetadata, ah as FetchLinksPageResult, ai as FetchPageArgs, aj as FetchPageResult, ak as FlipAxis, al as GcpList, am as GeoFilterOptions, an as GeoFilter_Intersects, ao as GeoFilter_Within, ap as GeoMetadata, aq as GeotimeSeriesProperty, ar as GpsMetadata, as as GroundControlPoint, at as Group, au as GroupByClause, av as GroupByRange, aw as GroupWrapper, ax as HumanReadableFormat, ay as ImageAttributeDomain, az as ImageAttributeKey, aA as ImageryDecodeFormat, aB as ImageryMediaItemMetadata, aC as InterfaceMetadata, aD as IntervalRule, aE as KnownType, aF as LinkNames, aG as LinkTypeApiNamesFor, aH as LinkedType, aI as Mailbox, aJ as MailboxOrGroup, aK as MailboxWrapper, aL as MaybeScore, aM as MediaFullMetadata, aN as MediaItemMetadata, aO as MediaMetadata, aP as MediaPropertyLocation, aQ as MinimalDirectedObjectLinkInstance, aR as Modality, aS as Model3dDecodeFormat, aT as Model3dMediaItemMetadata, aU as Model3dType, aV as NotWhereClause, aW as NullabilityAdherence, aX as NumberFormatAffix, aY as NumberFormatCurrency, aZ as NumberFormatCurrencyStyle, a_ as NumberFormatCustomUnit, a$ as NumberFormatDuration, b0 as NumberFormatFixedValues, b1 as NumberFormatNotation, b2 as NumberFormatOptions, b3 as NumberFormatRatio, b4 as NumberFormatScale, b5 as NumberFormatStandard, b6 as NumberFormatStandardUnit, b7 as NumberRatioType, b8 as NumberRoundingMode, b9 as NumberScaleType, ba as ObjectMetadata, bb as ObjectSetArgs, bc as ObjectSetSubscription, bd as ObjectSpecifier, be as OrWhereClause, bf as Orientation, bg as Osdk, bh as OsdkObjectCreatePropertyType, bi as OsdkObjectCreateWirePropertyType, bj as OsdkObjectLinksObject, bk as OsdkObjectPropertyType, bl as OsdkObjectUpdatePropertyType, bm as OsdkObjectUpdateWirePropertyType, bn as PageResult, bo as PaletteInterpretation, bp as PossibleWhereClauseFilters, bq as PrimaryKeyType, br as PropertyBooleanFormattingRule, bs as PropertyDateFormattingRule, bt as PropertyDef, bu as PropertyKeys, bv as PropertyKnownTypeFormattingRule, bw as PropertyMarkings, bx as PropertyNumberFormattingRule, by as PropertyNumberFormattingRuleType, bz as PropertySecurity, bA as PropertyTimestampFormattingRule, bB as PropertyTypeReference, bC as PropertyTypeReferenceOrStringConstant, bD as PropertyValueFormattingRule, bE as Result, bF as RotationAngle, bG as SelectArg, bH as SelectArgToKeys, bI as SimplePropertyDef, bJ as SingleLinkAccessor, bK as SingleOsdkResult, bL as SpreadsheetDecodeFormat, bM as SpreadsheetMediaItemMetadata, bN as StringConstant, bO as TimeCodeFormat, bP as TimeSeriesPoint, bQ as TimeSeriesProperty, bR as TimeSeriesQuery, bS as TimeseriesDurationMapping, bT as UnitInterpretation, bU as UnknownMediaItemMetadata, bV as UntypedMediaItemMetadata, bW as UpdateCipherText, bX as ValidAggregationKeys, bY as VersionBound, bZ as VideoDecodeFormat, b_ as VideoMediaItemMetadata, b$ as VideoSpecification, c0 as WhereClause, c1 as WirePropertyTypes, c2 as isOk } from './ObjectSet-D8f3J-vg.cjs';
3
+ import { A as AggregationKeyTypes, a as AggregationRangeKeyTypes, b as AggregationValueTypes } from './QueryDefinition-BTvkSoig.cjs';
4
+ export { I as InterfaceQueryDataType, O as ObjectQueryDataType, c as ObjectSetQueryDataType, Q as QueryDataTypeDefinition, d as QueryDefinition, e as QueryMetadata, f as QueryParameterDefinition, T as ThreeDimensionalQueryAggregationDefinition, g as TwoDimensionalQueryAggregationDefinition } from './QueryDefinition-BTvkSoig.cjs';
5
5
  import 'type-fest';
6
6
  import 'geojson';
7
7
 
@@ -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-CVGh64DZ.cjs';
2
- import '../ObjectSet-DDFyl39-.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-C-3-iY6M.cjs';
2
+ import '../ObjectSet-D8f3J-vg.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
@@ -1,8 +1,8 @@
1
- import { b as ObjectTypeDefinition, f as ObjectIdentifiers, g as OsdkObjectPrimaryKeyType, h as ObjectSet, j as OsdkBase, a as OsdkMetadata, C as CompileTimeMetadata, O as ObjectOrInterfaceDefinition, bu as PropertyKeys, aW as NullabilityAdherence, bG as SelectArg, bg as Osdk, c3 as ExtractOptions, c4 as ApplyModifiersArg, c5 as PropertyModifierValue, ai as FetchPageArgs, aj as FetchPageResult, aG as LinkTypeApiNamesFor, c6 as LinkedObjectType, c7 as Just, bc as ObjectSetSubscription, d as Media } from '../ObjectSet-DDFyl39-.cjs';
2
- export { c8 as MinimalObjectSet } from '../ObjectSet-DDFyl39-.cjs';
3
- import { d as QueryDefinition } from '../QueryDefinition-BirZ8Xtb.cjs';
4
- import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-CVGh64DZ.cjs';
5
- export { L as LinkLoadConfig, c as LinkStatus, N as NullabilityViolation, d as ShapeBaseType, e as ShapeDerivedLinks, f as ShapeInstance, g as ShapeLinkResult, h as ShapeNullabilityError, i as SourcePrimaryKeySymbol, j as isSourcePkSymbol } from '../shapes-internal-CVGh64DZ.cjs';
1
+ import { b as ObjectTypeDefinition, f as ObjectIdentifiers, g as OsdkObjectPrimaryKeyType, h as ObjectSet, j as OsdkBase, a as OsdkMetadata, C as CompileTimeMetadata, O as ObjectOrInterfaceDefinition, bu as PropertyKeys, aW as NullabilityAdherence, bG as SelectArg, bg as Osdk, c3 as ExtractOptions, c4 as ApplyModifiersArg, c5 as PropertyModifierValue, ai as FetchPageArgs, aj as FetchPageResult, aG as LinkTypeApiNamesFor, c6 as LinkedObjectType, c7 as Just, bc as ObjectSetSubscription, d as Media } from '../ObjectSet-D8f3J-vg.cjs';
2
+ export { c8 as MinimalObjectSet } from '../ObjectSet-D8f3J-vg.cjs';
3
+ import { d as QueryDefinition } from '../QueryDefinition-BTvkSoig.cjs';
4
+ import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-C-3-iY6M.cjs';
5
+ export { L as LinkLoadConfig, c as LinkStatus, N as NullabilityViolation, d as ShapeBaseType, e as ShapeDerivedLinks, f as ShapeInstance, g as ShapeLinkResult, h as ShapeNullabilityError, i as SourcePrimaryKeySymbol, j as isSourcePkSymbol } from '../shapes-internal-C-3-iY6M.cjs';
6
6
  import 'type-fest';
7
7
  import 'geojson';
8
8
 
@@ -1,4 +1,4 @@
1
- import { O as ObjectOrInterfaceDefinition, c0 as WhereClause, bu as PropertyKeys, C as CompileTimeMetadata, aF as LinkNames, aH as LinkedType, j as OsdkBase } from './ObjectSet-DDFyl39-.cjs';
1
+ import { O as ObjectOrInterfaceDefinition, c0 as WhereClause, bu as PropertyKeys, C as CompileTimeMetadata, aF as LinkNames, aH as LinkedType, j as OsdkBase } from './ObjectSet-D8f3J-vg.cjs';
2
2
 
3
3
  declare const SourcePrimaryKeySymbol: unique symbol;
4
4
  declare function isSourcePkSymbol(value: unknown): value is symbol;
@@ -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\";\nimport type {\n ApplyModifiersArg,\n PropertyModifierValue,\n} 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 >\n extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\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 /**\n * The properties to load for each object. If omitted, the API loads its default property\n * set (vector properties, for example, are not included). The primary key is always\n * returned, even when it is not selected.\n *\n * Select only the properties your code needs. Loading unused properties wastes bandwidth\n * and compute and can slow down retrieval, and reading fewer properties afterwards does\n * not avoid the cost of fetching them.\n *\n * Ontology-defined derived properties are not returned by default and must be\n * included in `$select`.\n * Include any other properties you need in the same selection.\n * Runtime-defined derived properties added via `.withProperties(...)` are returned\n * by default only when `$select` is omitted. If you pass `$select`, include them\n * in the selection as well.\n *\n * @example\n * ```ts\n * // Assume leadName is an ontology-defined derived property on Employee.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"leadName\"],\n * });\n *\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"leadName\"],\n * })) {\n * console.log(employee.fullName, employee.leadName);\n * }\n * ```\n */\n $select?: readonly L[];\n $includeRid?: R;\n $loadPropertySecurityMetadata?: PROPERTY_SECURITIES;\n $UNSTABLE_loadOntologyDefinedDerivedProperties?: boolean;\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\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> =\n A extends SelectArg<Q, never>\n ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[]\n ? 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 DEFAULT_LOAD_LEVEL extends PropertyModifierValue | undefined =\n PropertyModifierValue,\n> extends 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 $nextPageToken?: string;\n /**\n * The number of objects in one page. This does not limit the total number of objects:\n * continue with `nextPageToken` to load further pages.\n */\n $pageSize?: number;\n /**\n * Applies ontology-configured reducers or struct main values to properties by API name.\n * Only properties with the corresponding configuration in the generated SDK accept a modifier:\n *\n * - `\"applyReducers\"`: reduces an array to a single element using its configured reducers.\n * - `\"applyMainValue\"`: extracts a struct's configured main value. One main-value field\n * returns that field's value; multiple fields return a struct containing only those fields.\n * - `\"applyReducersAndExtractMainValue\"`: reduces a struct array, then extracts its main value.\n * Requires both reducers and a main value.\n *\n * When passing `$select`, include every modified property using its plain API name, along\n * with any other properties you need. Unlisted properties are not modified by this option.\n * The returned property types reflect the modifiers, preserving property nullability.\n * For an explicit `Osdk.Instance` type, use `\"propertyApiName:modifier\"` in its property keys.\n *\n * @example\n * ```ts\n * // Assume these properties have reducers and/or main values configured in the ontology.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"performanceScores\", \"employeeProfile\", \"bonusHistory\"],\n * $applyModifiers: {\n * performanceScores: \"applyReducers\",\n * employeeProfile: \"applyMainValue\",\n * bonusHistory: \"applyReducersAndExtractMainValue\",\n * },\n * });\n * ```\n */\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n /**\n * Best-effort load level applied to every property without listing them:\n * reducers and struct main values where defined, other properties unchanged.\n * A per-property `$applyModifiers` entry wins.\n *\n * @experimental\n */\n $EXPERIMENTAL_defaultLoadLevel?: DEFAULT_LOAD_LEVEL;\n /**\n * Ensures paging consistency by freezing the view at the time of query to prevent duplicate or missing items. Setting $snapshot to false ensures that you will always get the latest results.\n *\n * Without a snapshot, if objects are added, removed, or edited between requests, later pages\n * may repeat or skip objects. A snapshot configured for a function run still applies even\n * when this is `false`. With a snapshot, pass `$snapshot: true` on every page request; paging\n * fails if the snapshot expires or the backend detects a paging inconsistency\n * (`PagingInconsistencyDetected`). Stream-backed object types do not provide this snapshot\n * guarantee across pages. `asyncIter()` always requests a snapshot.\n * @default false\n */\n $snapshot?: boolean;\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>\n extends\n SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n /**\n * Applies ontology-configured reducers or struct main values to properties by API name\n * on every page loaded by the iterator. Only properties with the corresponding\n * configuration in the generated SDK accept a modifier:\n *\n * - `\"applyReducers\"`: reduces an array to a single element using its configured reducers.\n * - `\"applyMainValue\"`: extracts a struct's configured main value. One main-value field\n * returns that field's value; multiple fields return a struct containing only those fields.\n * - `\"applyReducersAndExtractMainValue\"`: reduces a struct array, then extracts its main value.\n * Requires both reducers and a main value.\n *\n * When passing `$select`, include every modified property using its plain API name, along\n * with any other properties you need. Unlisted properties are not modified by this option.\n *\n * @example\n * ```ts\n * // Assume performanceScores has reducers configured in the ontology.\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"performanceScores\"],\n * $applyModifiers: { performanceScores: \"applyReducers\" },\n * })) {\n * console.log(employee.fullName, employee.performanceScores);\n * }\n * ```\n */\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n}\n\nexport type Augment<X extends ObjectOrInterfaceDefinition, T extends string> = {\n [K in CompileTimeMetadata<X>[\"apiName\"]]: T[];\n};\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,WA2BiBA,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 {\n ApplyModifiersArg,\n PropertyModifierValue,\n} 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 & (ORDER_BY_OPTIONS | OrderByOptions<L>);\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 >\n extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\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 /**\n * The properties to load for each object. If omitted, the API loads its default property\n * set (vector properties, for example, are not included). The primary key is always\n * returned, even when it is not selected.\n *\n * Select only the properties your code needs. Loading unused properties wastes bandwidth\n * and compute and can slow down retrieval, and reading fewer properties afterwards does\n * not avoid the cost of fetching them.\n *\n * Ontology-defined derived properties are not returned by default and must be\n * included in `$select`.\n * Include any other properties you need in the same selection.\n * Runtime-defined derived properties added via `.withProperties(...)` are returned\n * by default only when `$select` is omitted. If you pass `$select`, include them\n * in the selection as well.\n *\n * @example\n * ```ts\n * // Assume leadName is an ontology-defined derived property on Employee.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"leadName\"],\n * });\n *\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"leadName\"],\n * })) {\n * console.log(employee.fullName, employee.leadName);\n * }\n * ```\n */\n $select?: readonly L[];\n $includeRid?: R;\n $loadPropertySecurityMetadata?: PROPERTY_SECURITIES;\n $UNSTABLE_loadOntologyDefinedDerivedProperties?: boolean;\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\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> =\n A extends SelectArg<Q, never>\n ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[]\n ? 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 DEFAULT_LOAD_LEVEL extends PropertyModifierValue | undefined =\n PropertyModifierValue,\n> extends 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 $nextPageToken?: string;\n /**\n * The number of objects in one page. This does not limit the total number of objects:\n * continue with `nextPageToken` to load further pages.\n */\n $pageSize?: number;\n /**\n * Applies ontology-configured reducers or struct main values to properties by API name.\n * Only properties with the corresponding configuration in the generated SDK accept a modifier:\n *\n * - `\"applyReducers\"`: reduces an array to a single element using its configured reducers.\n * - `\"applyMainValue\"`: extracts a struct's configured main value. One main-value field\n * returns that field's value; multiple fields return a struct containing only those fields.\n * - `\"applyReducersAndExtractMainValue\"`: reduces a struct array, then extracts its main value.\n * Requires both reducers and a main value.\n *\n * When passing `$select`, include every modified property using its plain API name, along\n * with any other properties you need. Unlisted properties are not modified by this option.\n * The returned property types reflect the modifiers, preserving property nullability.\n * For an explicit `Osdk.Instance` type, use `\"propertyApiName:modifier\"` in its property keys.\n *\n * @example\n * ```ts\n * // Assume these properties have reducers and/or main values configured in the ontology.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"performanceScores\", \"employeeProfile\", \"bonusHistory\"],\n * $applyModifiers: {\n * performanceScores: \"applyReducers\",\n * employeeProfile: \"applyMainValue\",\n * bonusHistory: \"applyReducersAndExtractMainValue\",\n * },\n * });\n * ```\n */\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n /**\n * Best-effort load level applied to every property without listing them:\n * reducers and struct main values where defined, other properties unchanged.\n * A per-property `$applyModifiers` entry wins.\n *\n * @experimental\n */\n $EXPERIMENTAL_defaultLoadLevel?: DEFAULT_LOAD_LEVEL;\n /**\n * Ensures paging consistency by freezing the view at the time of query to prevent duplicate or missing items. Setting $snapshot to false ensures that you will always get the latest results.\n *\n * Without a snapshot, if objects are added, removed, or edited between requests, later pages\n * may repeat or skip objects. A snapshot configured for a function run still applies even\n * when this is `false`. With a snapshot, pass `$snapshot: true` on every page request; paging\n * fails if the snapshot expires or the backend detects a paging inconsistency\n * (`PagingInconsistencyDetected`). Stream-backed object types do not provide this snapshot\n * guarantee across pages. `asyncIter()` always requests a snapshot.\n * @default false\n */\n $snapshot?: boolean;\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>\n extends\n SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n /**\n * Applies ontology-configured reducers or struct main values to properties by API name\n * on every page loaded by the iterator. Only properties with the corresponding\n * configuration in the generated SDK accept a modifier:\n *\n * - `\"applyReducers\"`: reduces an array to a single element using its configured reducers.\n * - `\"applyMainValue\"`: extracts a struct's configured main value. One main-value field\n * returns that field's value; multiple fields return a struct containing only those fields.\n * - `\"applyReducersAndExtractMainValue\"`: reduces a struct array, then extracts its main value.\n * Requires both reducers and a main value.\n *\n * When passing `$select`, include every modified property using its plain API name, along\n * with any other properties you need. Unlisted properties are not modified by this option.\n *\n * @example\n * ```ts\n * // Assume performanceScores has reducers configured in the ontology.\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"performanceScores\"],\n * $applyModifiers: { performanceScores: \"applyReducers\" },\n * })) {\n * console.log(employee.fullName, employee.performanceScores);\n * }\n * ```\n */\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n}\n\nexport type Augment<X extends ObjectOrInterfaceDefinition, T extends string> = {\n [K in CompileTimeMetadata<X>[\"apiName\"]]: T[];\n};\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,WA2BiBA,oBAAoB;AAAA,WAIpBC,aAAa","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 {\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> = keyof D extends never\n ? Q\n : DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>,\n> = [D] extends [never]\n ? {}\n : D extends BaseObjectSet<any>\n ? {}\n : D extends Record<string, SimplePropertyDef>\n ? 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]\n ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L\n ? 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\n ? T\n : T extends abstract new (...args: any[]) => any\n ? 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 : (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]\n ? 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>\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\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never]\n ? 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<Q extends ObjectOrInterfaceDefinition, X> = [X] extends [\n never,\n]\n ? {}\n : X extends { $applyModifiers: infer M extends ApplyModifiersArg<Q> }\n ? M\n : {};\n\ntype ModifiersToSelectStrings<M> = {\n [K in keyof M]: K extends string\n ? M[K] extends PropertyModifierValue\n ? `${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<Q, PropertyKeys<Q>, false, string & keyof RDPs>\n | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;\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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\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 * $select: [\"name\"],\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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\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 * $select: [\"name\"],\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: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => 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 *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\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 *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\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 runtime-defined 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 >(clause: {\n [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\n ? NEW[NN]\n : NN extends keyof RDPs\n ? 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 BaseObjectSet<Q> | Record<string, SimplePropertyDef> =\n never,\n> extends ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n> {}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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\n ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition\n ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string\n ? 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 }\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>\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"],"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> = keyof D extends never\n ? Q\n : DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>,\n> = [D] extends [never]\n ? {}\n : D extends BaseObjectSet<any>\n ? {}\n : D extends Record<string, SimplePropertyDef>\n ? 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]\n ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L\n ? 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\n ? T\n : T extends abstract new (...args: any[]) => any\n ? 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 : (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]\n ? 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>\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\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never]\n ? 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<Q extends ObjectOrInterfaceDefinition, X> = [X] extends [\n never,\n]\n ? {}\n : X extends { $applyModifiers: infer M extends ApplyModifiersArg<Q> }\n ? M\n : {};\n\ntype ModifiersToSelectStrings<M> = {\n [K in keyof M]: K extends string\n ? M[K] extends PropertyModifierValue\n ? `${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<Q, PropertyKeys<Q>, false, string & keyof RDPs>\n | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;\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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\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 * $select: [\"name\"],\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<\n PropertyKeys<Q> | (string & keyof RDPs)\n > = {},\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 string & keyof RDPs,\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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\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 * $select: [\"name\"],\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<\n PropertyKeys<Q> | (string & keyof RDPs)\n > = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n string & keyof RDPs,\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: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => 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 *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\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 *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\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<\n PropertyKeys<Q> | (string & keyof RDPs)\n > = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n string & keyof RDPs,\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 runtime-defined 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 >(clause: {\n [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\n ? NEW[NN]\n : NN extends keyof RDPs\n ? 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 BaseObjectSet<Q> | Record<string, SimplePropertyDef> =\n never,\n> extends ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n> {}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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<Q extends ObjectOrInterfaceDefinition> {\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\n ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition\n ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string\n ? 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 }\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>\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"],"mappings":"","ignoreList":[]}
@@ -18,7 +18,7 @@ export declare namespace ObjectSetArgs {
18
18
  ORDER_BY_OPTIONS extends OrderByOptions<L>,
19
19
  L extends string = never
20
20
  > {
21
- $orderBy?: ORDER_BY_OPTIONS;
21
+ $orderBy?: ORDER_BY_OPTIONS & (ORDER_BY_OPTIONS | OrderByOptions<L>);
22
22
  }
23
23
  interface AsyncIter<
24
24
  Q extends ObjectOrInterfaceDefinition,
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cACE,mBACA,6BACK,kCAAmC;AAE1C,YAAY,uBAAuB,QAAQ,UAAU;AACrD,yBAAiB;MACH,UAAU;;AAGxB,yBAAiB;WACE;EACf;EACA;GACA;EACA,oBAAoB,cAAc;EAClC;CACD;MAEW,eAAe,uBAEpB,KAAK,MAAK,QAAQ,WAErB;WAEa;EACf,yBAAyB,eAAe;EACxC;GACA;EACA,WAAW;CACZ;WAEgB;EACf,UAAU;EACV,UAAU,aAAa;EACvB,oBAAoB;EACpB;EACA,yBAAyB,cAAc,eAAe;WAE9C,OAAO,GAAG,WAAW,QAAQ,kBAAkB,GAAG;EAC1D,kCAAkC,aAAa,WAAW,IAA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 @@ interface FetchPageSignature<
94
94
  const A extends Augments,
95
95
  S extends NullabilityAdherence = NullabilityAdherence.Default,
96
96
  T extends boolean = false,
97
- ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},
97
+ ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q> | (string & keyof RDPs)> = {},
98
98
  PROPERTY_SECURITIES extends boolean = false,
99
99
  MODIFIERS extends ApplyModifiersArg<Q> = {}
100
- >(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>>>;
100
+ >(args?: FetchPageArgs<Q, L, R, A, S, T, string & keyof RDPs, 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>>>;
101
101
  }
102
102
  interface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {
103
103
  /**
@@ -154,9 +154,9 @@ interface FetchPageWithErrorsSignature<
154
154
  const A extends Augments,
155
155
  S extends NullabilityAdherence = NullabilityAdherence.Default,
156
156
  T extends boolean = false,
157
- ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},
157
+ ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q> | (string & keyof RDPs)> = {},
158
158
  const MODIFIERS extends ApplyModifiersArg<Q> = {}
159
- >(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>>>>;
159
+ >(args?: FetchPageArgs<Q, L, R, A, S, T, string & keyof RDPs, 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>>>>;
160
160
  }
161
161
  interface Where<
162
162
  Q extends ObjectOrInterfaceDefinition,
@@ -237,9 +237,9 @@ interface AsyncIterSignature<
237
237
  const A extends Augments,
238
238
  S extends NullabilityAdherence = NullabilityAdherence.Default,
239
239
  T extends boolean = false,
240
- ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},
240
+ ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q> | (string & keyof RDPs)> = {},
241
241
  const MODIFIERS extends ApplyModifiersArg<Q> = {}
242
- >(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>>;
242
+ >(args?: AsyncIterArgs<Q, L, R, A, S, T, string & keyof RDPs, 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>>;
243
243
  }
244
244
  interface AsyncIter<
245
245
  Q extends ObjectOrInterfaceDefinition,
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,qBAAqB,+BAAgC;AACnE,cAAc,sEAAsE,yCAA0C;AAC9H,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,uBAAuB,yCAA0C;AAC/E,cACE,eACA,UACA,eACA,sBACA,eACA,iBACK,4BAA6B;AACpC,cAAc,cAAc,qBAAsB;AAClD,cAAc,2BAA2B,oCAAqC;AAC9E,cACE,oCACA,6BACA,oBACK,kCAAmC;AAC1C,cACE,qBACA,4BACK,qCAAsC;AAC7C,cACE,mBACA,6BACK,kCAAmC;AAC1C,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,sBAAsB,gBAAiB;AACrD,cACE,4BACA,gBACA,kBACA,YACA,YACK,sBAAuB;AAC9B,cAAc,kBAAkB,kBAAmB;AACnD,cAAc,YAAY,iBAAiB,sBAAuB;AAClE,cAAc,qBAAqB,oBAAqB;AACxD,cACE,qBACA,yCACK,qBAAsB;AAC7B,cAAc,6BAA6B,wBAAyB;KAE/D;CACH,UAAU;CACV,UAAU,eAAe,qBAAqB,CAAE;UACxC,kBACN,IACA,mCAAmC,sBAAsB,GAAG;KAE3D,WACH,UAAU,qBAAqB,eAAe,uBAC3C,qBACD,CAAE,IACF,UAAU,qBACR,CAAE,IACF,UAAU,eAAe,qBACvB,IACA,CAAE;KAOL;CACH,UAAU;CACV;KACG,qBACD,aAAa,KACb,aAAa,WAAW,IACtB,aAAa,KACb,I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Q,GAAG,GAAG,OACxC;EAAE;CAAyB;AACjC;UAES,aAAa,UAAU,6BAA6B;;;;;;;;;;;;;UAanD,eACP,mBAAmB,kCAAkC,IAErDC,MAAM,eACH,UAAU;AAChB;KAEI,kCAAkC,UAAU,+BAC/C,UAAU,uBACN,6BAA6B,KAC7B,UAAU,sBACR,yBAAyB;KAG5B,6BAA6B,UAAU,wBAC1C,oBAAoB,WAAW;CAAE,YAAY,oBAAoB;AAAW,IACxE,0BACE,sBAAsB;CAAE,SAAS;AAAU;KAI9C,yBAAyB,UAAU,uBACtC,oBAAoB,WAAW;CAC7B,eAAe,oBAAoB;AACpC,KACI,uBAAuB;CAAE,SAAS;AAAU,KAAI,sBACjD;UAEI,eAAe,UAAU,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;UAyBrD,8BACP,2BAA2B,oBAAoB,IAE/CC,OAAO,yBACJ,sBACH,kCAAkC,GAAG;AAExC;UAES;CACR,UAAU;CACV,UAAU,eAAe;CACzB,eAAe,8BAA8B;CAC7C,yBAAyB,cAAc,eAAe,aAAa,MAAM,CAAE;UAGzE,iBAAiB,GAAG,GAAG,mBACvB,eAAe,GAAG,IAClB,UAAU,SACV,cAAc,SACd,QAAQ,IACR,SAAS,GAAG,IACZ,iBAAiB,IACjB,aAAa,GAAG,CAAE","names":["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 >","query: string | number[]","numNeighbors: number","property: PropertyKeys.Filtered<Q, \"vector\">","clause: WhereClause<MergeObjectSet<Q, RDPs>>","args?: X","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 >","clause: {\n [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]>;\n }","req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>","type: L","primaryKey: PrimaryKeyType<Q>","options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>","listener: ObjectSetSubscription.Listener<Q, P, R>","opts?: ObjectSetSubscription.Options<Q, P, R>","type: CONVERT_TO","links: LINK_TYPE_API_NAME[]"],"sources":["../../../src/objectSet/ObjectSet.ts"],"version":3,"file":"ObjectSet.d.ts"}
1
+ {"mappings":"AAgBA,cAAc,qBAAqB,+BAAgC;AACnE,cAAc,sEAAsE,yCAA0C;AAC9H,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,uBAAuB,yCAA0C;AAC/E,cACE,eACA,UACA,eACA,sBACA,eACA,iBACK,4BAA6B;AACpC,cAAc,cAAc,qBAAsB;AAClD,cAAc,2BAA2B,oCAAqC;AAC9E,cACE,oCACA,6BACA,oBACK,kCAAmC;AAC1C,cACE,qBACA,4BACK,qCAAsC;AAC7C,cACE,mBACA,6BACK,kCAAmC;AAC1C,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,sBAAsB,gBAAiB;AACrD,cACE,4BACA,gBACA,kBACA,YACA,YACK,sBAAuB;AAC9B,cAAc,kBAAkB,kBAAmB;AACnD,cAAc,YAAY,iBAAiB,sBAAuB;AAClE,cAAc,qBAAqB,oBAAqB;AACxD,cACE,qBACA,yCACK,qBAAsB;AAC7B,cAAc,6BAA6B,wBAAyB;KAE/D;CACH,UAAU;CACV,UAAU,eAAe,qBAAqB,CAAE;UACxC,kBACN,IACA,mCAAmC,sBAAsB,GAAG;KAE3D,WACH,UAAU,qBAAqB,eAAe,uBAC3C,qBACD,CAAE,IACF,UAAU,qBACR,CAAE,IACF,UAAU,eAAe,qBACvB,IACA,CAAE;KAOL;CACH,UAAU;CACV;KACG,qBACD,aAAa,KACb,aAAa,WAAW,IACtB,aAAa,KACb,IAAI,aAAa;KAElB;CACH,UAAU;CACV,UAAU,UAAU,GAAG,aAAa;IAClC,oBAAoB,GAAG,eAAe;KAErC,KAAK,KAAK,WA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,6BAA6B;;;;;;;;;;;;;UAanD,eACP,mBAAmB,kCAAkC,IAErDC,MAAM,eACH,UAAU;AAChB;KAEI,kCAAkC,UAAU,+BAC/C,UAAU,uBACN,6BAA6B,KAC7B,UAAU,sBACR,yBAAyB;KAG5B,6BAA6B,UAAU,wBAC1C,oBAAoB,WAAW;CAAE,YAAY,oBAAoB;AAAW,IACxE,0BACE,sBAAsB;CAAE,SAAS;AAAU;KAI9C,yBAAyB,UAAU,uBACtC,oBAAoB,WAAW;CAC7B,eAAe,oBAAoB;AACpC,KACI,uBAAuB;CAAE,SAAS;AAAU,KAAI,sBACjD;UAEI,eAAe,UAAU,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;UAyBrD,8BACP,2BAA2B,oBAAoB,IAE/CC,OAAO,yBACJ,sBACH,kCAAkC,GAAG;AAExC;UAES;CACR,UAAU;CACV,UAAU,eAAe;CACzB,eAAe,8BAA8B;CAC7C,yBAAyB,cAAc,eAAe,aAAa,MAAM,CAAE;UAGzE,iBAAiB,GAAG,GAAG,mBACvB,eAAe,GAAG,IAClB,UAAU,SACV,cAAc,SACd,QAAQ,IACR,SAAS,GAAG,IACZ,iBAAiB,IACjB,aAAa,GAAG,CAAE","names":["args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n string & keyof RDPs,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >","query: string | number[]","numNeighbors: number","property: PropertyKeys.Filtered<Q, \"vector\">","clause: WhereClause<MergeObjectSet<Q, RDPs>>","args?: X","args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n string & keyof RDPs,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >","clause: {\n [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]>;\n }","req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>","type: L","primaryKey: PrimaryKeyType<Q>","options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>","listener: ObjectSetSubscription.Listener<Q, P, R>","opts?: ObjectSetSubscription.Options<Q, P, R>","type: CONVERT_TO","links: LINK_TYPE_API_NAME[]"],"sources":["../../../src/objectSet/ObjectSet.ts"],"version":3,"file":"ObjectSet.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/api",
3
- "version": "2.91.0",
3
+ "version": "2.91.1-main-8aa522dafda38bf56948bcf5dcc07e46519e06de",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",