@osdk/api 2.76.0 → 2.76.1-main-90da45384efe5511167b3842002d74856955da34
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 +6 -0
- package/build/browser/object/FetchPageArgs.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.js.map +1 -1
- package/build/cjs/{ObjectSet-DFvXRobo.d.cts → ObjectSet-KOpaT65h.d.cts} +23 -1
- package/build/cjs/{QueryDefinition-C2F2WJqk.d.cts → QueryDefinition-Clf2t3YO.d.cts} +1 -1
- package/build/cjs/index.d.cts +4 -4
- package/build/cjs/public/shapes-internal.d.cts +2 -2
- package/build/cjs/public/unstable.d.cts +5 -5
- package/build/cjs/{shapes-internal-Bq1nkSvZ.d.cts → shapes-internal-BCtUZ3Iw.d.cts} +1 -1
- package/build/esm/object/FetchPageArgs.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.js.map +1 -1
- package/build/types/object/FetchPageArgs.d.ts +22 -0
- package/build/types/object/FetchPageArgs.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @osdk/api
|
|
2
2
|
|
|
3
|
+
## 2.76.1-main-90da45384efe5511167b3842002d74856955da34
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2ab4d7c: Clarify that ontology-defined derived properties require explicit selection, distinguish runtime-defined derived properties, and add object-loading examples.
|
|
8
|
+
|
|
3
9
|
## 2.76.0
|
|
4
10
|
|
|
5
11
|
## 2.75.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 $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 $pageSize?: number;\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 * @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 $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;\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 * API names of the properties to return. Ontology-defined derived properties\n * are not returned by default and must be 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 $pageSize?: number;\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 * @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 $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 * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n * const myObjsResult = myObjs.data;\n * ```\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n * automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n * value, all objects will be returned. This value is limited to 1 ≤ numNeighbors ≤ 500.\n * @param property - The property key with a defined embedding model to search over.\n * @example\n * ```ts\n * const result = await client(Document)\n * .nearestNeighbors(\"coffee\", 5, \"embedding\")\n * .fetchPage();\n * ```\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n *\n * if (isOk(myObjs)) {\n * const myObjsResult = myObjs.value.data;\n * }\n * ```\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * ```ts\n * await client(Office).where({\n * meetingRooms: { $contains: \"Grand Central\" },\n * meetingRoomCapacities: { $contains: 30 },\n * });\n * ```\n * @returns an objectSet\n */\n readonly where: (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 * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Adds derived properties to objects in this object set\n * @param clause - A map of new property names to a function that derives each property from the base object set\n * @example\n * ```ts\n * const employeesWithLeadCount = await client(Employee)\n * .withProperties({\n * leadCount: (baseObjectSet) =>\n * baseObjectSet.pivotTo(\"lead\").aggregate(\"$count\"),\n * })\n * .fetchPage();\n * ```\n * @returns an object set with the derived properties available for selection\n */\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(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 * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n * const myObjsResult = myObjs.data;\n * ```\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n * automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n * value, all objects will be returned. This value is limited to 1 ≤ numNeighbors ≤ 500.\n * @param property - The property key with a defined embedding model to search over.\n * @example\n * ```ts\n * const result = await client(Document)\n * .nearestNeighbors(\"coffee\", 5, \"embedding\")\n * .fetchPage();\n * ```\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n *\n * if (isOk(myObjs)) {\n * const myObjsResult = myObjs.value.data;\n * }\n * ```\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * ```ts\n * await client(Office).where({\n * meetingRooms: { $contains: \"Grand Central\" },\n * meetingRoomCapacities: { $contains: 30 },\n * });\n * ```\n * @returns an objectSet\n */\n readonly where: (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 * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Adds 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":[]}
|
|
@@ -1367,6 +1367,28 @@ declare namespace ObjectSetArgs {
|
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
1369
|
interface SelectArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>, R extends boolean = false, S extends NullabilityAdherence = NullabilityAdherence.Default, RDP_KEYS extends string = never, PROPERTY_SECURITIES extends boolean = false> {
|
|
1370
|
+
/**
|
|
1371
|
+
* API names of the properties to return. Ontology-defined derived properties
|
|
1372
|
+
* are not returned by default and must be included in `$select`.
|
|
1373
|
+
* Include any other properties you need in the same selection.
|
|
1374
|
+
* Runtime-defined derived properties added via `.withProperties(...)` are returned
|
|
1375
|
+
* by default only when `$select` is omitted. If you pass `$select`, include them
|
|
1376
|
+
* in the selection as well.
|
|
1377
|
+
*
|
|
1378
|
+
* @example
|
|
1379
|
+
* ```ts
|
|
1380
|
+
* // Assume leadName is an ontology-defined derived property on Employee.
|
|
1381
|
+
* const page = await client(Employee).fetchPage({
|
|
1382
|
+
* $select: ["fullName", "leadName"],
|
|
1383
|
+
* });
|
|
1384
|
+
*
|
|
1385
|
+
* for await (const employee of client(Employee).asyncIter({
|
|
1386
|
+
* $select: ["fullName", "leadName"],
|
|
1387
|
+
* })) {
|
|
1388
|
+
* console.log(employee.fullName, employee.leadName);
|
|
1389
|
+
* }
|
|
1390
|
+
* ```
|
|
1391
|
+
*/
|
|
1370
1392
|
$select?: readonly L[];
|
|
1371
1393
|
$includeRid?: R;
|
|
1372
1394
|
$loadPropertySecurityMetadata?: PROPERTY_SECURITIES;
|
|
@@ -2367,7 +2389,7 @@ interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
|
|
|
2367
2389
|
}
|
|
2368
2390
|
interface WithProperties<Q extends ObjectOrInterfaceDefinition = any, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
2369
2391
|
/**
|
|
2370
|
-
* Adds derived properties to objects in this object set
|
|
2392
|
+
* Adds runtime-defined derived properties to objects in this object set.
|
|
2371
2393
|
* @param clause - A map of new property names to a function that derives each property from the base object set
|
|
2372
2394
|
* @example
|
|
2373
2395
|
* ```ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as ObjectOrInterfaceDefinition, a as OsdkMetadata, b as ObjectTypeDefinition } from './ObjectSet-
|
|
1
|
+
import { O as ObjectOrInterfaceDefinition, a as OsdkMetadata, b as ObjectTypeDefinition } from './ObjectSet-KOpaT65h.cjs';
|
|
2
2
|
|
|
3
3
|
interface QueryMetadata {
|
|
4
4
|
type: "query";
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AttachmentUpload, M as MediaReference, c as MediaUpload, d as Media, 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-
|
|
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, T as DataType, U as DatetimeFormat, V as DatetimeLocalizedFormat, W as DatetimeLocalizedFormatType, X as DatetimeStringFormat, Y as DatetimeTimezone, Z as DatetimeTimezoneStatic, _ as DatetimeTimezoneUser, $ as DerivedProperty, a0 as DicomDataElementKey, a1 as DicomMediaItemMetadata, a2 as DicomMediaType, a3 as DicomMetaInformation, a4 as DicomMetaInformationV1, a5 as Dimensions, a6 as DistanceUnitMapping, a7 as DocumentDecodeFormat, a8 as DocumentMediaItemMetadata, a9 as DurationBaseValue, aa as DurationFormatStyle, ab as DurationMapping, ac as DurationPrecision, ad as EmailAttachment, ae as EmailDecodeFormat, af as EmailMediaItemMetadata, ag as FetchLinksPageResult, ah as FetchPageArgs, ai as FetchPageResult, aj as FlipAxis, ak as GcpList, al as GeoFilterOptions, am as GeoFilter_Intersects, an as GeoFilter_Within, ao as GeoMetadata, ap as GeotimeSeriesProperty, aq as GpsMetadata, ar as GroundControlPoint, as as Group, at as GroupByClause, au as GroupByRange, av as GroupWrapper, aw as HumanReadableFormat, ax as ImageAttributeDomain, ay as ImageAttributeKey, az as ImageryDecodeFormat, aA as ImageryMediaItemMetadata, aB as InterfaceMetadata, aC as IntervalRule, aD as KnownType, aE as LinkNames, aF as LinkTypeApiNamesFor, aG as LinkedType, aH as Mailbox, aI as MailboxOrGroup, aJ as MailboxWrapper, aK as MaybeScore, aL as MediaFullMetadata, aM as MediaItemMetadata, aN as MediaMetadata, aO as MediaPropertyLocation, aP as MinimalDirectedObjectLinkInstance, aQ as Modality, aR as Model3dDecodeFormat, aS as Model3dMediaItemMetadata, aT as Model3dType, aU as NotWhereClause, aV as NullabilityAdherence, aW as NumberFormatAffix, aX as NumberFormatCurrency, aY as NumberFormatCurrencyStyle, aZ as NumberFormatCustomUnit, a_ as NumberFormatDuration, a$ as NumberFormatFixedValues, b0 as NumberFormatNotation, b1 as NumberFormatOptions, b2 as NumberFormatRatio, b3 as NumberFormatScale, b4 as NumberFormatStandard, b5 as NumberFormatStandardUnit, b6 as NumberRatioType, b7 as NumberRoundingMode, b8 as NumberScaleType, b9 as ObjectMetadata, ba as ObjectSetArgs, bb as ObjectSetSubscription, bc as ObjectSpecifier, bd as OrWhereClause, be as Orientation, bf as Osdk, bg as OsdkObjectCreatePropertyType, bh as OsdkObjectCreateWirePropertyType, bi as OsdkObjectLinksObject, bj as OsdkObjectPropertyType, bk as OsdkObjectUpdatePropertyType, bl as OsdkObjectUpdateWirePropertyType, bm as PageResult, bn as PaletteInterpretation, bo as PossibleWhereClauseFilters, bp as PrimaryKeyType, bq as PropertyBooleanFormattingRule, br as PropertyDateFormattingRule, bs as PropertyDef, bt as PropertyKeys, bu as PropertyKnownTypeFormattingRule, bv as PropertyMarkings, bw as PropertyNumberFormattingRule, bx as PropertyNumberFormattingRuleType, by as PropertySecurity, bz as PropertyTimestampFormattingRule, bA as PropertyTypeReference, bB as PropertyTypeReferenceOrStringConstant, bC as PropertyValueFormattingRule, bD as Result, bE as RotationAngle, bF as SelectArg, bG as SelectArgToKeys, bH as SimplePropertyDef, bI as SingleLinkAccessor, bJ as SingleOsdkResult, bK as SpreadsheetDecodeFormat, bL as SpreadsheetMediaItemMetadata, bM as StringConstant, bN as TimeCodeFormat, bO as TimeSeriesPoint, bP as TimeSeriesProperty, bQ as TimeSeriesQuery, bR as TimeseriesDurationMapping, bS as UnitInterpretation, bT as UnknownMediaItemMetadata, bU as UntypedMediaItemMetadata, bV as UpdateCipherText, bW as ValidAggregationKeys, bX as VersionBound, bY as VideoDecodeFormat, bZ as VideoMediaItemMetadata, b_ as VideoSpecification, b$ as WhereClause, c0 as WirePropertyTypes, c1 as isOk } from './ObjectSet-
|
|
3
|
-
import { A as AggregationKeyTypes, a as AggregationRangeKeyTypes, b as AggregationValueTypes } from './QueryDefinition-
|
|
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-
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, c as MediaUpload, d as Media, 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-KOpaT65h.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, T as DataType, U as DatetimeFormat, V as DatetimeLocalizedFormat, W as DatetimeLocalizedFormatType, X as DatetimeStringFormat, Y as DatetimeTimezone, Z as DatetimeTimezoneStatic, _ as DatetimeTimezoneUser, $ as DerivedProperty, a0 as DicomDataElementKey, a1 as DicomMediaItemMetadata, a2 as DicomMediaType, a3 as DicomMetaInformation, a4 as DicomMetaInformationV1, a5 as Dimensions, a6 as DistanceUnitMapping, a7 as DocumentDecodeFormat, a8 as DocumentMediaItemMetadata, a9 as DurationBaseValue, aa as DurationFormatStyle, ab as DurationMapping, ac as DurationPrecision, ad as EmailAttachment, ae as EmailDecodeFormat, af as EmailMediaItemMetadata, ag as FetchLinksPageResult, ah as FetchPageArgs, ai as FetchPageResult, aj as FlipAxis, ak as GcpList, al as GeoFilterOptions, am as GeoFilter_Intersects, an as GeoFilter_Within, ao as GeoMetadata, ap as GeotimeSeriesProperty, aq as GpsMetadata, ar as GroundControlPoint, as as Group, at as GroupByClause, au as GroupByRange, av as GroupWrapper, aw as HumanReadableFormat, ax as ImageAttributeDomain, ay as ImageAttributeKey, az as ImageryDecodeFormat, aA as ImageryMediaItemMetadata, aB as InterfaceMetadata, aC as IntervalRule, aD as KnownType, aE as LinkNames, aF as LinkTypeApiNamesFor, aG as LinkedType, aH as Mailbox, aI as MailboxOrGroup, aJ as MailboxWrapper, aK as MaybeScore, aL as MediaFullMetadata, aM as MediaItemMetadata, aN as MediaMetadata, aO as MediaPropertyLocation, aP as MinimalDirectedObjectLinkInstance, aQ as Modality, aR as Model3dDecodeFormat, aS as Model3dMediaItemMetadata, aT as Model3dType, aU as NotWhereClause, aV as NullabilityAdherence, aW as NumberFormatAffix, aX as NumberFormatCurrency, aY as NumberFormatCurrencyStyle, aZ as NumberFormatCustomUnit, a_ as NumberFormatDuration, a$ as NumberFormatFixedValues, b0 as NumberFormatNotation, b1 as NumberFormatOptions, b2 as NumberFormatRatio, b3 as NumberFormatScale, b4 as NumberFormatStandard, b5 as NumberFormatStandardUnit, b6 as NumberRatioType, b7 as NumberRoundingMode, b8 as NumberScaleType, b9 as ObjectMetadata, ba as ObjectSetArgs, bb as ObjectSetSubscription, bc as ObjectSpecifier, bd as OrWhereClause, be as Orientation, bf as Osdk, bg as OsdkObjectCreatePropertyType, bh as OsdkObjectCreateWirePropertyType, bi as OsdkObjectLinksObject, bj as OsdkObjectPropertyType, bk as OsdkObjectUpdatePropertyType, bl as OsdkObjectUpdateWirePropertyType, bm as PageResult, bn as PaletteInterpretation, bo as PossibleWhereClauseFilters, bp as PrimaryKeyType, bq as PropertyBooleanFormattingRule, br as PropertyDateFormattingRule, bs as PropertyDef, bt as PropertyKeys, bu as PropertyKnownTypeFormattingRule, bv as PropertyMarkings, bw as PropertyNumberFormattingRule, bx as PropertyNumberFormattingRuleType, by as PropertySecurity, bz as PropertyTimestampFormattingRule, bA as PropertyTypeReference, bB as PropertyTypeReferenceOrStringConstant, bC as PropertyValueFormattingRule, bD as Result, bE as RotationAngle, bF as SelectArg, bG as SelectArgToKeys, bH as SimplePropertyDef, bI as SingleLinkAccessor, bJ as SingleOsdkResult, bK as SpreadsheetDecodeFormat, bL as SpreadsheetMediaItemMetadata, bM as StringConstant, bN as TimeCodeFormat, bO as TimeSeriesPoint, bP as TimeSeriesProperty, bQ as TimeSeriesQuery, bR as TimeseriesDurationMapping, bS as UnitInterpretation, bT as UnknownMediaItemMetadata, bU as UntypedMediaItemMetadata, bV as UpdateCipherText, bW as ValidAggregationKeys, bX as VersionBound, bY as VideoDecodeFormat, bZ as VideoMediaItemMetadata, b_ as VideoSpecification, b$ as WhereClause, c0 as WirePropertyTypes, c1 as isOk } from './ObjectSet-KOpaT65h.cjs';
|
|
3
|
+
import { A as AggregationKeyTypes, a as AggregationRangeKeyTypes, b as AggregationValueTypes } from './QueryDefinition-Clf2t3YO.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-Clf2t3YO.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-
|
|
2
|
-
import '../ObjectSet-
|
|
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-BCtUZ3Iw.cjs';
|
|
2
|
+
import '../ObjectSet-KOpaT65h.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as CompileTimeMetadata, O as ObjectOrInterfaceDefinition, bt as PropertyKeys, aV as NullabilityAdherence, bF as SelectArg, bf as Osdk, c2 as ExtractOptions, c3 as ApplyModifiersArg, c4 as PropertyModifierValue, ah as FetchPageArgs, ai as FetchPageResult, j as OsdkBase, b as ObjectTypeDefinition, aF as LinkTypeApiNamesFor, f as ObjectIdentifiers, g as OsdkObjectPrimaryKeyType, c5 as LinkedObjectType, c6 as Just, bb as ObjectSetSubscription, d as Media } from '../ObjectSet-
|
|
2
|
-
export { c7 as MinimalObjectSet } from '../ObjectSet-
|
|
3
|
-
import { d as QueryDefinition } from '../QueryDefinition-
|
|
4
|
-
import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-
|
|
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-
|
|
1
|
+
import { C as CompileTimeMetadata, O as ObjectOrInterfaceDefinition, bt as PropertyKeys, aV as NullabilityAdherence, bF as SelectArg, bf as Osdk, c2 as ExtractOptions, c3 as ApplyModifiersArg, c4 as PropertyModifierValue, ah as FetchPageArgs, ai as FetchPageResult, j as OsdkBase, b as ObjectTypeDefinition, aF as LinkTypeApiNamesFor, f as ObjectIdentifiers, g as OsdkObjectPrimaryKeyType, c5 as LinkedObjectType, c6 as Just, bb as ObjectSetSubscription, d as Media } from '../ObjectSet-KOpaT65h.cjs';
|
|
2
|
+
export { c7 as MinimalObjectSet } from '../ObjectSet-KOpaT65h.cjs';
|
|
3
|
+
import { d as QueryDefinition } from '../QueryDefinition-Clf2t3YO.cjs';
|
|
4
|
+
import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-BCtUZ3Iw.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-BCtUZ3Iw.cjs';
|
|
6
6
|
import 'type-fest';
|
|
7
7
|
import 'geojson';
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as ObjectOrInterfaceDefinition, b$ as WhereClause, bt as PropertyKeys, C as CompileTimeMetadata, aE as LinkNames, aG as LinkedType, j as OsdkBase } from './ObjectSet-
|
|
1
|
+
import { O as ObjectOrInterfaceDefinition, b$ as WhereClause, bt as PropertyKeys, C as CompileTimeMetadata, aE as LinkNames, aG as LinkedType, j as OsdkBase } from './ObjectSet-KOpaT65h.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 $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 $pageSize?: number;\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 * @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 $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;\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 * API names of the properties to return. Ontology-defined derived properties\n * are not returned by default and must be 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 $pageSize?: number;\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 * @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 $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 * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n * const myObjsResult = myObjs.data;\n * ```\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n * automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n * value, all objects will be returned. This value is limited to 1 ≤ numNeighbors ≤ 500.\n * @param property - The property key with a defined embedding model to search over.\n * @example\n * ```ts\n * const result = await client(Document)\n * .nearestNeighbors(\"coffee\", 5, \"embedding\")\n * .fetchPage();\n * ```\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n *\n * if (isOk(myObjs)) {\n * const myObjsResult = myObjs.value.data;\n * }\n * ```\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * ```ts\n * await client(Office).where({\n * meetingRooms: { $contains: \"Grand Central\" },\n * meetingRoomCapacities: { $contains: 30 },\n * });\n * ```\n * @returns an objectSet\n */\n readonly where: (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 * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Adds derived properties to objects in this object set\n * @param clause - A map of new property names to a function that derives each property from the base object set\n * @example\n * ```ts\n * const employeesWithLeadCount = await client(Employee)\n * .withProperties({\n * leadCount: (baseObjectSet) =>\n * baseObjectSet.pivotTo(\"lead\").aggregate(\"$count\"),\n * })\n * .fetchPage();\n * ```\n * @returns an object set with the derived properties available for selection\n */\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(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 * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n * const myObjsResult = myObjs.data;\n * ```\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n * automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n * value, all objects will be returned. This value is limited to 1 ≤ numNeighbors ≤ 500.\n * @param property - The property key with a defined embedding model to search over.\n * @example\n * ```ts\n * const result = await client(Document)\n * .nearestNeighbors(\"coffee\", 5, \"embedding\")\n * .fetchPage();\n * ```\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n *\n * if (isOk(myObjs)) {\n * const myObjsResult = myObjs.value.data;\n * }\n * ```\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * ```ts\n * await client(Office).where({\n * meetingRooms: { $contains: \"Grand Central\" },\n * meetingRoomCapacities: { $contains: 30 },\n * });\n * ```\n * @returns an objectSet\n */\n readonly where: (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 * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`, `$pageSize`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter()) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Adds 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":[]}
|
|
@@ -48,6 +48,28 @@ export interface SelectArg<
|
|
|
48
48
|
RDP_KEYS extends string = never,
|
|
49
49
|
PROPERTY_SECURITIES extends boolean = false
|
|
50
50
|
> {
|
|
51
|
+
/**
|
|
52
|
+
* API names of the properties to return. Ontology-defined derived properties
|
|
53
|
+
* are not returned by default and must be included in `$select`.
|
|
54
|
+
* Include any other properties you need in the same selection.
|
|
55
|
+
* Runtime-defined derived properties added via `.withProperties(...)` are returned
|
|
56
|
+
* by default only when `$select` is omitted. If you pass `$select`, include them
|
|
57
|
+
* in the selection as well.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* // Assume leadName is an ontology-defined derived property on Employee.
|
|
62
|
+
* const page = await client(Employee).fetchPage({
|
|
63
|
+
* $select: ["fullName", "leadName"],
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* for await (const employee of client(Employee).asyncIter({
|
|
67
|
+
* $select: ["fullName", "leadName"],
|
|
68
|
+
* })) {
|
|
69
|
+
* console.log(employee.fullName, employee.leadName);
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
51
73
|
$select?: readonly L[];
|
|
52
74
|
$includeRid?: R;
|
|
53
75
|
$loadPropertySecurityMetadata?: PROPERTY_SECURITIES;
|
|
@@ -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,IAAI;CAC/D;WAEgB;EACf,UAAU;EACV,UAAU,aAAa;EACvB,oBAAoB;EACpB;EACA,yBAAyB,cAAc,eAAe;WAC9C,UAAU,GAAG,GAAG,GAAG,UAAU,kBAAkB;EACvD;EACA;CACD;;AAGH,iBAAiB;CACf,UAAU;CACV,mBAAmB,aAAa;CAChC,oBAAoB;CACpB,UAAU,uBAAuB,qBAAqB;CACtD;CACA,sCAAsC;EACtC
|
|
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,IAAI;CAC/D;WAEgB;EACf,UAAU;EACV,UAAU,aAAa;EACvB,oBAAoB;EACpB;EACA,yBAAyB,cAAc,eAAe;WAC9C,UAAU,GAAG,GAAG,GAAG,UAAU,kBAAkB;EACvD;EACA;CACD;;AAGH,iBAAiB;CACf,UAAU;CACV,mBAAmB,aAAa;CAChC,oBAAoB;CACpB,UAAU,uBAAuB,qBAAqB;CACtD;CACA,sCAAsC;EACtC;;;;;;;;;;;;;;;;;;;;;;;CAuBA,mBAAmB;CACnB,cAAc;CACd,gCAAgC;CAChC;AACD;AAED,iBAAiB;CACf,UAAU;CACV,mBAAmB,aAAa;CAChC,yBAAyB,cAAc,eAAe;UAC9C,cAAc,QAAQ,kBAAkB,GAAG,CAAE;AAEvD,YAAY;CACV,UAAU;CACV,UAAU,UAAU;IAEpB,UAAU,UAAU,YAChB,aAAa,KACb,EAAE,uCACA,EAAE,qBACF,aAAa;AAErB,iBAAiB;CACf,UAAU;CACV,mBAAmB,aAAa;CAChC,oBAAoB;CACpB,UAAU;CACV,UAAU,uBAAuB,qBAAqB;CACtD,oBAAoB;CACpB;CACA,yBAAyB,cAAc,eAAe,KAAK,CAAE;CAC7D,sCAAsC;CACtC,kBAAkB,kBAAkB,KAAK,CAAE;CAC3C,2BAA2B,oCACzB;UACM,cACR,GACA,GACA,GACA,GACA,GACA,GACA,UACA,kBACA,qBACA,WACA;CACA;CACA;CACA,kBAAkB,kBAAkB,KAClC,eAAe,KAAK,cAAc,WAAW,aAAa;;;;;;;;CAQ5D,iCAAiC;;;;;CAKjC;AACD;AAED,iBAAiB;CACf,UAAU;CACV,mBAAmB,aAAa;CAChC,oBAAoB;CACpB,UAAU;CACV,UAAU,uBAAuB,qBAAqB;CACtD,oBAAoB;CACpB;CACA,yBAAyB,cAAc,eAAe;CACtD,sCAAsC;CACtC,kBAAkB,kBAAkB,KAAK,CAAE;UAGzC,UAAU,GAAG,GAAG,GAAG,GAAG,UAAU,sBAChC,WAAW,GAAG,aAAa,KAAK,UAAU,kBAAkB;CAC9D,kCAAkC,aAAa,WAAW,IAAI;CAC9D,kBAAkB,kBAAkB,KAClC,eAAe,KAAK,cAAc,WAAW,aAAa;AAC7D;AAED,YAAY;CAAQ,UAAU;CAA6B;OACxD,KAAK,oBAAoB,GAAG,cAAa;AAG5C,YAAY,WAAW","names":[],"sources":["../../../src/object/FetchPageArgs.ts"],"version":3,"file":"FetchPageArgs.d.ts"}
|
|
@@ -211,7 +211,7 @@ interface WithProperties<
|
|
|
211
211
|
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
212
212
|
> {
|
|
213
213
|
/**
|
|
214
|
-
* Adds derived properties to objects in this object set
|
|
214
|
+
* Adds runtime-defined derived properties to objects in this object set.
|
|
215
215
|
* @param clause - A map of new property names to a function that derives each property from the base object set
|
|
216
216
|
* @example
|
|
217
217
|
* ```ts
|