@osdk/api 2.78.0 → 2.78.1-main-86c708bd9cdef1d9a8d438a9fa0bc38f7d8116ea
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-KOpaT65h.d.cts → ObjectSet-nMjmo9Nl.d.cts} +67 -6
- package/build/cjs/{QueryDefinition-Clf2t3YO.d.cts → QueryDefinition-C-nXVNTF.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-BCtUZ3Iw.d.cts → shapes-internal-BweCRR-N.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 +21 -2
- package/build/types/object/FetchPageArgs.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.d.ts +46 -4
- package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @osdk/api
|
|
2
2
|
|
|
3
|
+
## 2.78.1-main-86c708bd9cdef1d9a8d438a9fa0bc38f7d8116ea
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 86c708b: Recommend $select in object loading snippets and JSDoc, stop collecting asyncIter() into arrays in "load all objects" snippets, and document snapshot behavior of fetchPage vs asyncIter
|
|
8
|
+
|
|
3
9
|
## 2.78.0
|
|
4
10
|
|
|
5
11
|
## 2.77.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type {\n ApplyModifiersArg,\n PropertyModifierValue,\n} from \"../ontology/PropertyModifiers.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n >\n extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * API
|
|
1
|
+
{"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type {\n ApplyModifiersArg,\n PropertyModifierValue,\n} from \"../ontology/PropertyModifiers.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n >\n extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * The properties to load for each object. If omitted, the API loads its default property\n * set (vector properties, for example, are not included). The primary key is always\n * returned, even when it is not selected.\n *\n * Select only the properties your code needs. Loading unused properties wastes bandwidth\n * and compute and can slow down retrieval, and reading fewer properties afterwards does\n * not avoid the cost of fetching them.\n *\n * Ontology-defined derived properties are not returned by default and must be\n * included in `$select`.\n * Include any other properties you need in the same selection.\n * Runtime-defined derived properties added via `.withProperties(...)` are returned\n * by default only when `$select` is omitted. If you pass `$select`, include them\n * in the selection as well.\n *\n * @example\n * ```ts\n * // Assume leadName is an ontology-defined derived property on Employee.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"leadName\"],\n * });\n *\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"leadName\"],\n * })) {\n * console.log(employee.fullName, employee.leadName);\n * }\n * ```\n */\n $select?: readonly L[];\n $includeRid?: R;\n $loadPropertySecurityMetadata?: PROPERTY_SECURITIES;\n $UNSTABLE_loadOntologyDefinedDerivedProperties?: boolean;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never,\n> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> =\n A extends SelectArg<Q, never>\n ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[]\n ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {},\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n DEFAULT_LOAD_LEVEL extends PropertyModifierValue | undefined =\n PropertyModifierValue,\n> extends AsyncIterArgs<\n Q,\n K,\n R,\n A,\n S,\n T,\n RDP_KEYS,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n> {\n $nextPageToken?: string;\n /**\n * The number of objects in one page. This does not limit the total number of objects:\n * continue with `nextPageToken` to load further pages.\n */\n $pageSize?: number;\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n /**\n * Best-effort load level applied to every property without listing them:\n * reducers and struct main values where defined, other properties unchanged.\n * A per-property `$applyModifiers` entry wins.\n *\n * @experimental\n */\n $EXPERIMENTAL_defaultLoadLevel?: DEFAULT_LOAD_LEVEL;\n /**\n * Ensures paging consistency by freezing the view at the time of query to prevent duplicate or missing items. Setting $snapshot to false ensures that you will always get the latest results.\n *\n * Without a snapshot, if objects are added, removed, or edited between requests, later pages\n * may repeat or skip objects. A snapshot configured for a function run still applies even\n * when this is `false`. With a snapshot, pass `$snapshot: true` on every page request; paging\n * fails if the snapshot expires or the backend detects a paging inconsistency\n * (`PagingInconsistencyDetected`). Stream-backed object types do not provide this snapshot\n * guarantee across pages. `asyncIter()` always requests a snapshot.\n * @default false\n */\n $snapshot?: boolean;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n>\n extends\n SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n $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 runtime-defined derived properties to objects in this object set.\n * @param clause - A map of new property names to a function that derives each property from the base object set\n * @example\n * ```ts\n * const employeesWithLeadCount = await client(Employee)\n * .withProperties({\n * leadCount: (baseObjectSet) =>\n * baseObjectSet.pivotTo(\"lead\").aggregate(\"$count\"),\n * })\n * .fetchPage();\n * ```\n * @returns an object set with the derived properties available for selection\n */\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(clause: {\n [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]>;\n }) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW\n ? NEW[NN]\n : NN extends keyof RDPs\n ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends BaseObjectSet<Q> | Record<string, SimplePropertyDef> =\n never,\n> extends ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n> {}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * ```ts\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n * .aggregate({\n * $select: {\n * $count: \"unordered\",\n * \"latitude:max\": \"unordered\",\n * \"latitude:min\": \"unordered\",\n * \"latitude:avg\": \"unordered\",\n * },\n * $groupBy: {\n * usState: \"exact\",\n * longitude: {\n * $fixedWidth: 10,\n * },\n * },\n * });\n * ```\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * ```ts\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * ```ts\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * ```ts\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @example\n * ```ts\n * const linkedEmployees = await client(Office)\n * .pivotTo(\"employees\")\n * .fetchPage();\n * ```\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns the object with the specified primary key\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const result = await client(Employee).fetchOneWithErrors(12345);\n * if (isOk(result)) {\n * const employee = result.value;\n * }\n * ```\n * @returns the object wrapped in a result, or an error if the fetch fails\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @example\n * ```ts\n * const subscription = client(Employee).subscribe(\n * {\n * onChange(update) {\n * // Handle ADDED_OR_UPDATED / REMOVED events\n * },\n * onSuccessfulSubscription() {},\n * onError(err) {},\n * onOutOfDate() {},\n * },\n * { properties: [\"fullName\", \"salary\"] },\n * );\n * subscription.unsubscribe();\n * ```\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @example\n * ```ts\n * const employees = client(Person).narrowToType(Employee);\n * ```\n * @returns an object set of the specified type.\n */\n readonly narrowToType: <\n CONVERT_TO extends RestrictToImplementingObjectTypes<Q>,\n >(\n type: CONVERT_TO,\n ) => ObjectSet<CONVERT_TO>;\n}\n\ntype RestrictToImplementingObjectTypes<T extends ObjectOrInterfaceDefinition> =\n T extends ObjectTypeDefinition\n ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition\n ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string\n ? InterfaceDefinition & { apiName: API_NAME }\n : never\n : never;\n\ntype ExtractImplementingTypes<T extends InterfaceDefinition> =\n CompileTimeMetadata<T> extends {\n implementedBy: ReadonlyArray<infer API_NAME extends string>;\n }\n ? (ObjectTypeDefinition & { apiName: API_NAME }) | InterfaceDefinition\n : InterfaceDefinition;\n\ninterface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Batch load links on an object set. This is an experimental method that may change while in beta.\n * Use this method in conjunction with `.asyncIter()` and `.pivotTo(...).asyncIter()` to build an\n * object graph in memory.\n *\n * Please keep these limitations in mind:\n * - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * - The backend API fetches pages of *n* objects at a time. If, for any page of *n* objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * - This method does not support OSv1 links and will throw an exception if links provided are backed by OSv1.\n * - This method currently does not support interface links, but support will be added in the near future.\n *\n * @param links - The link type api names to load on each object in the object set\n * @example\n * ```ts\n * for await (\n * const { source, target, linkType } of venturesObjectSet\n * .experimental_asyncIterLinks([\"employees\"])\n * ) {\n * graph.addEdge(source, target, linkType);\n * }\n * ```\n * @returns an async iterator that yields directed link instances pairing each source object with its linked target\n */\n readonly experimental_asyncIterLinks: <\n LINK_TYPE_API_NAME extends LinkTypeApiNamesFor<Q>,\n >(\n links: LINK_TYPE_API_NAME[],\n ) => AsyncIterableIterator<\n MinimalDirectedObjectLinkInstance<Q, LINK_TYPE_API_NAME>\n >;\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n>\n extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n NearestNeighbors<Q>,\n NarrowToType<Q> {}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type {\n ApplyModifiersArg,\n PropertyModifierValue,\n} from \"../ontology/PropertyModifiers.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type {\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./ObjectSetLinks.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = keyof D extends never\n ? Q\n : DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>,\n> = [D] extends [never]\n ? {}\n : D extends BaseObjectSet<any>\n ? {}\n : D extends Record<string, SimplePropertyDef>\n ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never]\n ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L\n ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any, any, any> = never,\n> = SubSelectKeysHelper<Q, Extract$Select<X>>;\n\ntype NOOP<T> = T extends (...args: any[]) => any\n ? T\n : T extends abstract new (...args: any[]) => any\n ? T\n : { [K in keyof T]: T[K] };\n\ntype SubSelectRDPsHelper<\n X extends ValidFetchPageArgs<any, any, any> | ValidAsyncIterArgs<any, any>,\n DEFAULT extends string,\n> = [X] extends [never] ? DEFAULT : (X[\"$select\"] & string[])[number] & DEFAULT;\n\ntype SubSelectRDPs<\n RDPs extends Record<string, SimplePropertyDef>,\n X extends ValidFetchPageArgs<any, RDPs, any> | ValidAsyncIterArgs<any, RDPs>,\n> = [RDPs] extends [never]\n ? never\n : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K] }>;\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n>\n extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs, ORDER_BY_OPTIONS>,\n Where<Q, RDPs>,\n AsyncIterLinks<Q>,\n Subscribe<MergeObjectSet<Q, RDPs>> {}\n\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never]\n ? never\n :\n | ExtractRidOption<X[\"$includeRid\"] extends true ? true : false>\n | ExtractAllPropertiesOption<\n X[\"$includeAllBaseObjectProperties\"] extends true ? true : false\n >;\n\ntype Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<\n X[\"$select\"]\n>[number];\n\ntype ExtractModifiers<Q extends ObjectOrInterfaceDefinition, X> = [X] extends [\n never,\n]\n ? {}\n : X extends { $applyModifiers: infer M extends ApplyModifiersArg<Q> }\n ? M\n : {};\n\ntype ModifiersToSelectStrings<M> = {\n [K in keyof M]: K extends string\n ? M[K] extends PropertyModifierValue\n ? `${K}:${M[K]}`\n : never\n : never;\n}[keyof M];\n\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly fetchPage: FetchPageSignature<Q, RDPs>;\n readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;\n}\n\ntype ValidFetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>>,\n> = ObjectSetArgs.FetchPage<\n Q,\n PropertyKeys<Q>,\n boolean,\n string & keyof RDPs,\n ORDER_BY_OPTIONS\n>;\n\ntype ValidAsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> =\n | ObjectSetArgs.AsyncIter<Q, PropertyKeys<Q>, false, string & keyof RDPs>\n | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;\n\ninterface FetchPageSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $select: [\"name\"],\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n * const myObjsResult = myObjs.data;\n * ```\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $select: [\"name\"],\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n *\n * if (isOk(myObjs)) {\n * const myObjsResult = myObjs.value.data;\n * }\n * ```\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * ```ts\n * await client(Office).where({\n * meetingRooms: { $contains: \"Grand Central\" },\n * meetingRoomCapacities: { $contains: 30 },\n * });\n * ```\n * @returns an objectSet\n */\n readonly where: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => this;\n}\n\ninterface AsyncIterSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n _ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * Returns an async iterator to load all objects of this type\n *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Adds runtime-defined derived properties to objects in this object set.\n * @param clause - A map of new property names to a function that derives each property from the base object set\n * @example\n * ```ts\n * const employeesWithLeadCount = await client(Employee)\n * .withProperties({\n * leadCount: (baseObjectSet) =>\n * baseObjectSet.pivotTo(\"lead\").aggregate(\"$count\"),\n * })\n * .fetchPage();\n * ```\n * @returns an object set with the derived properties available for selection\n */\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(clause: {\n [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]>;\n }) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW\n ? NEW[NN]\n : NN extends keyof RDPs\n ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends BaseObjectSet<Q> | Record<string, SimplePropertyDef> =\n never,\n> extends ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n> {}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * ```ts\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n * .aggregate({\n * $select: {\n * $count: \"unordered\",\n * \"latitude:max\": \"unordered\",\n * \"latitude:min\": \"unordered\",\n * \"latitude:avg\": \"unordered\",\n * },\n * $groupBy: {\n * usState: \"exact\",\n * longitude: {\n * $fixedWidth: 10,\n * },\n * },\n * });\n * ```\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * ```ts\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * ```ts\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * ```ts\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @example\n * ```ts\n * const linkedEmployees = await client(Office)\n * .pivotTo(\"employees\")\n * .fetchPage();\n * ```\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns the object with the specified primary key\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const result = await client(Employee).fetchOneWithErrors(12345);\n * if (isOk(result)) {\n * const employee = result.value;\n * }\n * ```\n * @returns the object wrapped in a result, or an error if the fetch fails\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @example\n * ```ts\n * const subscription = client(Employee).subscribe(\n * {\n * onChange(update) {\n * // Handle ADDED_OR_UPDATED / REMOVED events\n * },\n * onSuccessfulSubscription() {},\n * onError(err) {},\n * onOutOfDate() {},\n * },\n * { properties: [\"fullName\", \"salary\"] },\n * );\n * subscription.unsubscribe();\n * ```\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @example\n * ```ts\n * const employees = client(Person).narrowToType(Employee);\n * ```\n * @returns an object set of the specified type.\n */\n readonly narrowToType: <\n CONVERT_TO extends RestrictToImplementingObjectTypes<Q>,\n >(\n type: CONVERT_TO,\n ) => ObjectSet<CONVERT_TO>;\n}\n\ntype RestrictToImplementingObjectTypes<T extends ObjectOrInterfaceDefinition> =\n T extends ObjectTypeDefinition\n ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition\n ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string\n ? InterfaceDefinition & { apiName: API_NAME }\n : never\n : never;\n\ntype ExtractImplementingTypes<T extends InterfaceDefinition> =\n CompileTimeMetadata<T> extends {\n implementedBy: ReadonlyArray<infer API_NAME extends string>;\n }\n ? (ObjectTypeDefinition & { apiName: API_NAME }) | InterfaceDefinition\n : InterfaceDefinition;\n\ninterface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Batch load links on an object set. This is an experimental method that may change while in beta.\n * Use this method in conjunction with `.asyncIter()` and `.pivotTo(...).asyncIter()` to build an\n * object graph in memory.\n *\n * Please keep these limitations in mind:\n * - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * - The backend API fetches pages of *n* objects at a time. If, for any page of *n* objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * - This method does not support OSv1 links and will throw an exception if links provided are backed by OSv1.\n * - This method currently does not support interface links, but support will be added in the near future.\n *\n * @param links - The link type api names to load on each object in the object set\n * @example\n * ```ts\n * for await (\n * const { source, target, linkType } of venturesObjectSet\n * .experimental_asyncIterLinks([\"employees\"])\n * ) {\n * graph.addEdge(source, target, linkType);\n * }\n * ```\n * @returns an async iterator that yields directed link instances pairing each source object with its linked target\n */\n readonly experimental_asyncIterLinks: <\n LINK_TYPE_API_NAME extends LinkTypeApiNamesFor<Q>,\n >(\n links: LINK_TYPE_API_NAME[],\n ) => AsyncIterableIterator<\n MinimalDirectedObjectLinkInstance<Q, LINK_TYPE_API_NAME>\n >;\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n>\n extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n NearestNeighbors<Q>,\n NarrowToType<Q> {}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1368,8 +1368,16 @@ declare namespace ObjectSetArgs {
|
|
|
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
1370
|
/**
|
|
1371
|
-
*
|
|
1372
|
-
*
|
|
1371
|
+
* The properties to load for each object. If omitted, the API loads its default property
|
|
1372
|
+
* set (vector properties, for example, are not included). The primary key is always
|
|
1373
|
+
* returned, even when it is not selected.
|
|
1374
|
+
*
|
|
1375
|
+
* Select only the properties your code needs. Loading unused properties wastes bandwidth
|
|
1376
|
+
* and compute and can slow down retrieval, and reading fewer properties afterwards does
|
|
1377
|
+
* not avoid the cost of fetching them.
|
|
1378
|
+
*
|
|
1379
|
+
* Ontology-defined derived properties are not returned by default and must be
|
|
1380
|
+
* included in `$select`.
|
|
1373
1381
|
* Include any other properties you need in the same selection.
|
|
1374
1382
|
* Runtime-defined derived properties added via `.withProperties(...)` are returned
|
|
1375
1383
|
* by default only when `$select` is omitted. If you pass `$select`, include them
|
|
@@ -1399,6 +1407,10 @@ interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends string = P
|
|
|
1399
1407
|
type SelectArgToKeys<Q extends ObjectOrInterfaceDefinition, A extends SelectArg<Q, any, any>> = A extends SelectArg<Q, never> ? PropertyKeys<Q> : A["$select"] extends readonly string[] ? A["$select"][number] : PropertyKeys<Q>;
|
|
1400
1408
|
interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {}, PROPERTY_SECURITIES extends boolean = false, MODIFIERS extends ApplyModifiersArg<Q> = {}, DEFAULT_LOAD_LEVEL extends PropertyModifierValue | undefined = PropertyModifierValue> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS, PROPERTY_SECURITIES, MODIFIERS> {
|
|
1401
1409
|
$nextPageToken?: string;
|
|
1410
|
+
/**
|
|
1411
|
+
* The number of objects in one page. This does not limit the total number of objects:
|
|
1412
|
+
* continue with `nextPageToken` to load further pages.
|
|
1413
|
+
*/
|
|
1402
1414
|
$pageSize?: number;
|
|
1403
1415
|
$applyModifiers?: ApplyModifiersArg<Q> & MODIFIERS & {
|
|
1404
1416
|
[P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never;
|
|
@@ -1413,6 +1425,13 @@ interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string
|
|
|
1413
1425
|
$EXPERIMENTAL_defaultLoadLevel?: DEFAULT_LOAD_LEVEL;
|
|
1414
1426
|
/**
|
|
1415
1427
|
* 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.
|
|
1428
|
+
*
|
|
1429
|
+
* Without a snapshot, if objects are added, removed, or edited between requests, later pages
|
|
1430
|
+
* may repeat or skip objects. A snapshot configured for a function run still applies even
|
|
1431
|
+
* when this is `false`. With a snapshot, pass `$snapshot: true` on every page request; paging
|
|
1432
|
+
* fails if the snapshot expires or the backend detects a paging inconsistency
|
|
1433
|
+
* (`PagingInconsistencyDetected`). Stream-backed object types do not provide this snapshot
|
|
1434
|
+
* guarantee across pages. `asyncIter()` always requests a snapshot.
|
|
1416
1435
|
* @default false
|
|
1417
1436
|
*/
|
|
1418
1437
|
$snapshot?: boolean;
|
|
@@ -2291,10 +2310,18 @@ type ValidAsyncIterArgs<Q extends ObjectOrInterfaceDefinition, RDPs extends Reco
|
|
|
2291
2310
|
interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
2292
2311
|
/**
|
|
2293
2312
|
* Gets a page of objects of this type, with a result wrapper
|
|
2313
|
+
*
|
|
2314
|
+
* Without `$select`, loads the API's default property set, and reading fewer properties
|
|
2315
|
+
* afterwards does not avoid the cost of fetching them, so select only the properties you
|
|
2316
|
+
* read. `$pageSize` sizes one page; it does not limit the total number of
|
|
2317
|
+
* objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot
|
|
2318
|
+
* configured for a function run still applies), so if objects change between requests,
|
|
2319
|
+
* later pages may repeat or skip objects.
|
|
2294
2320
|
* @param args - Args to specify next page token and page size, if applicable
|
|
2295
2321
|
* @example
|
|
2296
2322
|
* ```ts
|
|
2297
2323
|
* const myObjs = await objectSet.fetchPage({
|
|
2324
|
+
* $select: ["name"],
|
|
2298
2325
|
* $pageSize: 10,
|
|
2299
2326
|
* $nextPageToken: "nextPage",
|
|
2300
2327
|
* });
|
|
@@ -2327,10 +2354,18 @@ interface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {
|
|
|
2327
2354
|
interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, PROPERTY_SECURITIES extends boolean = false> {
|
|
2328
2355
|
/**
|
|
2329
2356
|
* Gets a page of objects of this type, with a result wrapper
|
|
2357
|
+
*
|
|
2358
|
+
* Without `$select`, loads the API's default property set, and reading fewer properties
|
|
2359
|
+
* afterwards does not avoid the cost of fetching them, so select only the properties you
|
|
2360
|
+
* read. `$pageSize` sizes one page; it does not limit the total number of
|
|
2361
|
+
* objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot
|
|
2362
|
+
* configured for a function run still applies), so if objects change between requests,
|
|
2363
|
+
* later pages may repeat or skip objects.
|
|
2330
2364
|
* @param args - Args to specify next page token and page size, if applicable
|
|
2331
2365
|
* @example
|
|
2332
2366
|
* ```ts
|
|
2333
2367
|
* const myObjs = await objectSet.fetchPage({
|
|
2368
|
+
* $select: ["name"],
|
|
2334
2369
|
* $pageSize: 10,
|
|
2335
2370
|
* $nextPageToken: "nextPage",
|
|
2336
2371
|
* });
|
|
@@ -2361,10 +2396,23 @@ interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<strin
|
|
|
2361
2396
|
interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, _ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}, PROPERTY_SECURITIES extends boolean = false> {
|
|
2362
2397
|
/**
|
|
2363
2398
|
* Returns an async iterator to load all objects of this type
|
|
2364
|
-
*
|
|
2399
|
+
*
|
|
2400
|
+
* Fetches page after page until every matching object has been loaded, and always requests a
|
|
2401
|
+
* consistent snapshot. For non-stream-backed object types, a completed traversal returns each
|
|
2402
|
+
* object exactly once even if the underlying data changes. If the snapshot expires or the
|
|
2403
|
+
* backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.
|
|
2404
|
+
* Stream-backed object types do not provide this snapshot guarantee across pages: changes
|
|
2405
|
+
* during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.
|
|
2406
|
+
*
|
|
2407
|
+
* Without `$select`, loads the API's default property set, and reading fewer properties
|
|
2408
|
+
* afterwards does not avoid the cost of fetching them, so select only the properties you
|
|
2409
|
+
* read, and handle each object as it arrives instead of collecting every object
|
|
2410
|
+
* into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N
|
|
2411
|
+
* objects use `fetchPage()`.
|
|
2412
|
+
* @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)
|
|
2365
2413
|
* @example
|
|
2366
2414
|
* ```ts
|
|
2367
|
-
* for await (const obj of myObjectSet.asyncIter()) {
|
|
2415
|
+
* for await (const obj of myObjectSet.asyncIter({ $select: ["name"] })) {
|
|
2368
2416
|
* // Handle obj
|
|
2369
2417
|
* }
|
|
2370
2418
|
* ```
|
|
@@ -2373,10 +2421,23 @@ interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
|
|
|
2373
2421
|
<X extends ValidAsyncIterArgs<Q, RDPs> = never>(args?: X): AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>;
|
|
2374
2422
|
/**
|
|
2375
2423
|
* Returns an async iterator to load all objects of this type
|
|
2376
|
-
*
|
|
2424
|
+
*
|
|
2425
|
+
* Fetches page after page until every matching object has been loaded, and always requests a
|
|
2426
|
+
* consistent snapshot. For non-stream-backed object types, a completed traversal returns each
|
|
2427
|
+
* object exactly once even if the underlying data changes. If the snapshot expires or the
|
|
2428
|
+
* backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.
|
|
2429
|
+
* Stream-backed object types do not provide this snapshot guarantee across pages: changes
|
|
2430
|
+
* during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.
|
|
2431
|
+
*
|
|
2432
|
+
* Without `$select`, loads the API's default property set, and reading fewer properties
|
|
2433
|
+
* afterwards does not avoid the cost of fetching them, so select only the properties you
|
|
2434
|
+
* read, and handle each object as it arrives instead of collecting every object
|
|
2435
|
+
* into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N
|
|
2436
|
+
* objects use `fetchPage()`.
|
|
2437
|
+
* @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)
|
|
2377
2438
|
* @example
|
|
2378
2439
|
* ```ts
|
|
2379
|
-
* for await (const obj of myObjectSet.asyncIter()) {
|
|
2440
|
+
* for await (const obj of myObjectSet.asyncIter({ $select: ["name"] })) {
|
|
2380
2441
|
* // Handle obj
|
|
2381
2442
|
* }
|
|
2382
2443
|
* ```
|
|
@@ -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-nMjmo9Nl.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-nMjmo9Nl.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-nMjmo9Nl.cjs';
|
|
3
|
+
import { A as AggregationKeyTypes, a as AggregationRangeKeyTypes, b as AggregationValueTypes } from './QueryDefinition-C-nXVNTF.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-C-nXVNTF.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-BweCRR-N.cjs';
|
|
2
|
+
import '../ObjectSet-nMjmo9Nl.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as OsdkMetadata, 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 { a as OsdkMetadata, 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-nMjmo9Nl.cjs';
|
|
2
|
+
export { c7 as MinimalObjectSet } from '../ObjectSet-nMjmo9Nl.cjs';
|
|
3
|
+
import { d as QueryDefinition } from '../QueryDefinition-C-nXVNTF.cjs';
|
|
4
|
+
import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-BweCRR-N.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-BweCRR-N.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-nMjmo9Nl.cjs';
|
|
2
2
|
|
|
3
3
|
declare const SourcePrimaryKeySymbol: unique symbol;
|
|
4
4
|
declare function isSourcePkSymbol(value: unknown): value is symbol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type {\n ApplyModifiersArg,\n PropertyModifierValue,\n} from \"../ontology/PropertyModifiers.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n >\n extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * API
|
|
1
|
+
{"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type {\n ApplyModifiersArg,\n PropertyModifierValue,\n} from \"../ontology/PropertyModifiers.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n >\n extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * The properties to load for each object. If omitted, the API loads its default property\n * set (vector properties, for example, are not included). The primary key is always\n * returned, even when it is not selected.\n *\n * Select only the properties your code needs. Loading unused properties wastes bandwidth\n * and compute and can slow down retrieval, and reading fewer properties afterwards does\n * not avoid the cost of fetching them.\n *\n * Ontology-defined derived properties are not returned by default and must be\n * included in `$select`.\n * Include any other properties you need in the same selection.\n * Runtime-defined derived properties added via `.withProperties(...)` are returned\n * by default only when `$select` is omitted. If you pass `$select`, include them\n * in the selection as well.\n *\n * @example\n * ```ts\n * // Assume leadName is an ontology-defined derived property on Employee.\n * const page = await client(Employee).fetchPage({\n * $select: [\"fullName\", \"leadName\"],\n * });\n *\n * for await (const employee of client(Employee).asyncIter({\n * $select: [\"fullName\", \"leadName\"],\n * })) {\n * console.log(employee.fullName, employee.leadName);\n * }\n * ```\n */\n $select?: readonly L[];\n $includeRid?: R;\n $loadPropertySecurityMetadata?: PROPERTY_SECURITIES;\n $UNSTABLE_loadOntologyDefinedDerivedProperties?: boolean;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never,\n> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> =\n A extends SelectArg<Q, never>\n ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[]\n ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {},\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n DEFAULT_LOAD_LEVEL extends PropertyModifierValue | undefined =\n PropertyModifierValue,\n> extends AsyncIterArgs<\n Q,\n K,\n R,\n A,\n S,\n T,\n RDP_KEYS,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n> {\n $nextPageToken?: string;\n /**\n * The number of objects in one page. This does not limit the total number of objects:\n * continue with `nextPageToken` to load further pages.\n */\n $pageSize?: number;\n $applyModifiers?: ApplyModifiersArg<Q> &\n MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>]: never };\n /**\n * Best-effort load level applied to every property without listing them:\n * reducers and struct main values where defined, other properties unchanged.\n * A per-property `$applyModifiers` entry wins.\n *\n * @experimental\n */\n $EXPERIMENTAL_defaultLoadLevel?: DEFAULT_LOAD_LEVEL;\n /**\n * Ensures paging consistency by freezing the view at the time of query to prevent duplicate or missing items. Setting $snapshot to false ensures that you will always get the latest results.\n *\n * Without a snapshot, if objects are added, removed, or edited between requests, later pages\n * may repeat or skip objects. A snapshot configured for a function run still applies even\n * when this is `false`. With a snapshot, pass `$snapshot: true` on every page request; paging\n * fails if the snapshot expires or the backend detects a paging inconsistency\n * (`PagingInconsistencyDetected`). Stream-backed object types do not provide this snapshot\n * guarantee across pages. `asyncIter()` always requests a snapshot.\n * @default false\n */\n $snapshot?: boolean;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n PROPERTY_SECURITIES extends boolean = false,\n MODIFIERS extends ApplyModifiersArg<Q> = {},\n>\n extends\n SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n $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 runtime-defined derived properties to objects in this object set.\n * @param clause - A map of new property names to a function that derives each property from the base object set\n * @example\n * ```ts\n * const employeesWithLeadCount = await client(Employee)\n * .withProperties({\n * leadCount: (baseObjectSet) =>\n * baseObjectSet.pivotTo(\"lead\").aggregate(\"$count\"),\n * })\n * .fetchPage();\n * ```\n * @returns an object set with the derived properties available for selection\n */\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(clause: {\n [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]>;\n }) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW\n ? NEW[NN]\n : NN extends keyof RDPs\n ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends BaseObjectSet<Q> | Record<string, SimplePropertyDef> =\n never,\n> extends ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n> {}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * ```ts\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n * .aggregate({\n * $select: {\n * $count: \"unordered\",\n * \"latitude:max\": \"unordered\",\n * \"latitude:min\": \"unordered\",\n * \"latitude:avg\": \"unordered\",\n * },\n * $groupBy: {\n * usState: \"exact\",\n * longitude: {\n * $fixedWidth: 10,\n * },\n * },\n * });\n * ```\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * ```ts\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * ```ts\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * ```ts\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @example\n * ```ts\n * const linkedEmployees = await client(Office)\n * .pivotTo(\"employees\")\n * .fetchPage();\n * ```\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns the object with the specified primary key\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const result = await client(Employee).fetchOneWithErrors(12345);\n * if (isOk(result)) {\n * const employee = result.value;\n * }\n * ```\n * @returns the object wrapped in a result, or an error if the fetch fails\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @example\n * ```ts\n * const subscription = client(Employee).subscribe(\n * {\n * onChange(update) {\n * // Handle ADDED_OR_UPDATED / REMOVED events\n * },\n * onSuccessfulSubscription() {},\n * onError(err) {},\n * onOutOfDate() {},\n * },\n * { properties: [\"fullName\", \"salary\"] },\n * );\n * subscription.unsubscribe();\n * ```\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @example\n * ```ts\n * const employees = client(Person).narrowToType(Employee);\n * ```\n * @returns an object set of the specified type.\n */\n readonly narrowToType: <\n CONVERT_TO extends RestrictToImplementingObjectTypes<Q>,\n >(\n type: CONVERT_TO,\n ) => ObjectSet<CONVERT_TO>;\n}\n\ntype RestrictToImplementingObjectTypes<T extends ObjectOrInterfaceDefinition> =\n T extends ObjectTypeDefinition\n ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition\n ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string\n ? InterfaceDefinition & { apiName: API_NAME }\n : never\n : never;\n\ntype ExtractImplementingTypes<T extends InterfaceDefinition> =\n CompileTimeMetadata<T> extends {\n implementedBy: ReadonlyArray<infer API_NAME extends string>;\n }\n ? (ObjectTypeDefinition & { apiName: API_NAME }) | InterfaceDefinition\n : InterfaceDefinition;\n\ninterface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Batch load links on an object set. This is an experimental method that may change while in beta.\n * Use this method in conjunction with `.asyncIter()` and `.pivotTo(...).asyncIter()` to build an\n * object graph in memory.\n *\n * Please keep these limitations in mind:\n * - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * - The backend API fetches pages of *n* objects at a time. If, for any page of *n* objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * - This method does not support OSv1 links and will throw an exception if links provided are backed by OSv1.\n * - This method currently does not support interface links, but support will be added in the near future.\n *\n * @param links - The link type api names to load on each object in the object set\n * @example\n * ```ts\n * for await (\n * const { source, target, linkType } of venturesObjectSet\n * .experimental_asyncIterLinks([\"employees\"])\n * ) {\n * graph.addEdge(source, target, linkType);\n * }\n * ```\n * @returns an async iterator that yields directed link instances pairing each source object with its linked target\n */\n readonly experimental_asyncIterLinks: <\n LINK_TYPE_API_NAME extends LinkTypeApiNamesFor<Q>,\n >(\n links: LINK_TYPE_API_NAME[],\n ) => AsyncIterableIterator<\n MinimalDirectedObjectLinkInstance<Q, LINK_TYPE_API_NAME>\n >;\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n>\n extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n NearestNeighbors<Q>,\n NarrowToType<Q> {}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type {\n ApplyModifiersArg,\n PropertyModifierValue,\n} from \"../ontology/PropertyModifiers.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type {\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./ObjectSetLinks.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = keyof D extends never\n ? Q\n : DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>,\n> = [D] extends [never]\n ? {}\n : D extends BaseObjectSet<any>\n ? {}\n : D extends Record<string, SimplePropertyDef>\n ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never]\n ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L\n ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any, any, any> = never,\n> = SubSelectKeysHelper<Q, Extract$Select<X>>;\n\ntype NOOP<T> = T extends (...args: any[]) => any\n ? T\n : T extends abstract new (...args: any[]) => any\n ? T\n : { [K in keyof T]: T[K] };\n\ntype SubSelectRDPsHelper<\n X extends ValidFetchPageArgs<any, any, any> | ValidAsyncIterArgs<any, any>,\n DEFAULT extends string,\n> = [X] extends [never] ? DEFAULT : (X[\"$select\"] & string[])[number] & DEFAULT;\n\ntype SubSelectRDPs<\n RDPs extends Record<string, SimplePropertyDef>,\n X extends ValidFetchPageArgs<any, RDPs, any> | ValidAsyncIterArgs<any, RDPs>,\n> = [RDPs] extends [never]\n ? never\n : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K] }>;\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n>\n extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs, ORDER_BY_OPTIONS>,\n Where<Q, RDPs>,\n AsyncIterLinks<Q>,\n Subscribe<MergeObjectSet<Q, RDPs>> {}\n\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never]\n ? never\n :\n | ExtractRidOption<X[\"$includeRid\"] extends true ? true : false>\n | ExtractAllPropertiesOption<\n X[\"$includeAllBaseObjectProperties\"] extends true ? true : false\n >;\n\ntype Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<\n X[\"$select\"]\n>[number];\n\ntype ExtractModifiers<Q extends ObjectOrInterfaceDefinition, X> = [X] extends [\n never,\n]\n ? {}\n : X extends { $applyModifiers: infer M extends ApplyModifiersArg<Q> }\n ? M\n : {};\n\ntype ModifiersToSelectStrings<M> = {\n [K in keyof M]: K extends string\n ? M[K] extends PropertyModifierValue\n ? `${K}:${M[K]}`\n : never\n : never;\n}[keyof M];\n\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly fetchPage: FetchPageSignature<Q, RDPs>;\n readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;\n}\n\ntype ValidFetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>>,\n> = ObjectSetArgs.FetchPage<\n Q,\n PropertyKeys<Q>,\n boolean,\n string & keyof RDPs,\n ORDER_BY_OPTIONS\n>;\n\ntype ValidAsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> =\n | ObjectSetArgs.AsyncIter<Q, PropertyKeys<Q>, false, string & keyof RDPs>\n | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;\n\ninterface FetchPageSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $select: [\"name\"],\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n * const myObjsResult = myObjs.data;\n * ```\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<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 *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read. `$pageSize` sizes one page; it does not limit the total number of\n * objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot\n * configured for a function run still applies), so if objects change between requests,\n * later pages may repeat or skip objects.\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * ```ts\n * const myObjs = await objectSet.fetchPage({\n * $select: [\"name\"],\n * $pageSize: 10,\n * $nextPageToken: \"nextPage\",\n * });\n *\n * if (isOk(myObjs)) {\n * const myObjsResult = myObjs.value.data;\n * }\n * ```\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n | Exclude<\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n keyof MODIFIERS\n >\n | ModifiersToSelectStrings<MODIFIERS>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * ```ts\n * await client(Office).where({\n * meetingRooms: { $contains: \"Grand Central\" },\n * meetingRoomCapacities: { $contains: 30 },\n * });\n * ```\n * @returns an objectSet\n */\n readonly where: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => this;\n}\n\ninterface AsyncIterSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n _ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> {\n /**\n * Returns an async iterator to load all objects of this type\n *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n *\n * Fetches page after page until every matching object has been loaded, and always requests a\n * consistent snapshot. For non-stream-backed object types, a completed traversal returns each\n * object exactly once even if the underlying data changes. If the snapshot expires or the\n * backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.\n * Stream-backed object types do not provide this snapshot guarantee across pages: changes\n * during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.\n *\n * Without `$select`, loads the API's default property set, and reading fewer properties\n * afterwards does not avoid the cost of fetching them, so select only the properties you\n * read, and handle each object as it arrives instead of collecting every object\n * into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N\n * objects use `fetchPage()`.\n * @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)\n * @example\n * ```ts\n * for await (const obj of myObjectSet.asyncIter({ $select: [\"name\"] })) {\n * // Handle obj\n * }\n * ```\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n const MODIFIERS extends ApplyModifiersArg<Q> = {},\n >(\n args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Adds runtime-defined derived properties to objects in this object set.\n * @param clause - A map of new property names to a function that derives each property from the base object set\n * @example\n * ```ts\n * const employeesWithLeadCount = await client(Employee)\n * .withProperties({\n * leadCount: (baseObjectSet) =>\n * baseObjectSet.pivotTo(\"lead\").aggregate(\"$count\"),\n * })\n * .fetchPage();\n * ```\n * @returns an object set with the derived properties available for selection\n */\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(clause: {\n [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]>;\n }) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW\n ? NEW[NN]\n : NN extends keyof RDPs\n ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends BaseObjectSet<Q> | Record<string, SimplePropertyDef> =\n never,\n> extends ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n> {}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * ```ts\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n * .aggregate({\n * $select: {\n * $count: \"unordered\",\n * \"latitude:max\": \"unordered\",\n * \"latitude:min\": \"unordered\",\n * \"latitude:avg\": \"unordered\",\n * },\n * $groupBy: {\n * usState: \"exact\",\n * longitude: {\n * $fixedWidth: 10,\n * },\n * },\n * });\n * ```\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * ```ts\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * ```ts\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * ```ts\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n * simpleFilteredEmployeeObjectSet,\n * );\n * ```\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @example\n * ```ts\n * const linkedEmployees = await client(Office)\n * .pivotTo(\"employees\")\n * .fetchPage();\n * ```\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns the object with the specified primary key\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n * @param primaryKey - The primary key of the object to fetch\n * @param options - Optional select/include options to refine the returned object\n * @example\n * ```ts\n * const result = await client(Employee).fetchOneWithErrors(12345);\n * if (isOk(result)) {\n * const employee = result.value;\n * }\n * ```\n * @returns the object wrapped in a result, or an error if the fetch fails\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n PROPERTY_SECURITIES extends boolean = false,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>,\n ): Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, false, PROPERTY_SECURITIES>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @example\n * ```ts\n * const subscription = client(Employee).subscribe(\n * {\n * onChange(update) {\n * // Handle ADDED_OR_UPDATED / REMOVED events\n * },\n * onSuccessfulSubscription() {},\n * onError(err) {},\n * onOutOfDate() {},\n * },\n * { properties: [\"fullName\", \"salary\"] },\n * );\n * subscription.unsubscribe();\n * ```\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @example\n * ```ts\n * const employees = client(Person).narrowToType(Employee);\n * ```\n * @returns an object set of the specified type.\n */\n readonly narrowToType: <\n CONVERT_TO extends RestrictToImplementingObjectTypes<Q>,\n >(\n type: CONVERT_TO,\n ) => ObjectSet<CONVERT_TO>;\n}\n\ntype RestrictToImplementingObjectTypes<T extends ObjectOrInterfaceDefinition> =\n T extends ObjectTypeDefinition\n ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition\n ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string\n ? InterfaceDefinition & { apiName: API_NAME }\n : never\n : never;\n\ntype ExtractImplementingTypes<T extends InterfaceDefinition> =\n CompileTimeMetadata<T> extends {\n implementedBy: ReadonlyArray<infer API_NAME extends string>;\n }\n ? (ObjectTypeDefinition & { apiName: API_NAME }) | InterfaceDefinition\n : InterfaceDefinition;\n\ninterface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Batch load links on an object set. This is an experimental method that may change while in beta.\n * Use this method in conjunction with `.asyncIter()` and `.pivotTo(...).asyncIter()` to build an\n * object graph in memory.\n *\n * Please keep these limitations in mind:\n * - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * - The backend API fetches pages of *n* objects at a time. If, for any page of *n* objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * - This method does not support OSv1 links and will throw an exception if links provided are backed by OSv1.\n * - This method currently does not support interface links, but support will be added in the near future.\n *\n * @param links - The link type api names to load on each object in the object set\n * @example\n * ```ts\n * for await (\n * const { source, target, linkType } of venturesObjectSet\n * .experimental_asyncIterLinks([\"employees\"])\n * ) {\n * graph.addEdge(source, target, linkType);\n * }\n * ```\n * @returns an async iterator that yields directed link instances pairing each source object with its linked target\n */\n readonly experimental_asyncIterLinks: <\n LINK_TYPE_API_NAME extends LinkTypeApiNamesFor<Q>,\n >(\n links: LINK_TYPE_API_NAME[],\n ) => AsyncIterableIterator<\n MinimalDirectedObjectLinkInstance<Q, LINK_TYPE_API_NAME>\n >;\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n>\n extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n NearestNeighbors<Q>,\n NarrowToType<Q> {}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -49,8 +49,16 @@ export interface SelectArg<
|
|
|
49
49
|
PROPERTY_SECURITIES extends boolean = false
|
|
50
50
|
> {
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
52
|
+
* The properties to load for each object. If omitted, the API loads its default property
|
|
53
|
+
* set (vector properties, for example, are not included). The primary key is always
|
|
54
|
+
* returned, even when it is not selected.
|
|
55
|
+
*
|
|
56
|
+
* Select only the properties your code needs. Loading unused properties wastes bandwidth
|
|
57
|
+
* and compute and can slow down retrieval, and reading fewer properties afterwards does
|
|
58
|
+
* not avoid the cost of fetching them.
|
|
59
|
+
*
|
|
60
|
+
* Ontology-defined derived properties are not returned by default and must be
|
|
61
|
+
* included in `$select`.
|
|
54
62
|
* Include any other properties you need in the same selection.
|
|
55
63
|
* Runtime-defined derived properties added via `.withProperties(...)` are returned
|
|
56
64
|
* by default only when `$select` is omitted. If you pass `$select`, include them
|
|
@@ -98,6 +106,10 @@ export interface FetchPageArgs<
|
|
|
98
106
|
DEFAULT_LOAD_LEVEL extends PropertyModifierValue | undefined = PropertyModifierValue
|
|
99
107
|
> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS, PROPERTY_SECURITIES, MODIFIERS> {
|
|
100
108
|
$nextPageToken?: string;
|
|
109
|
+
/**
|
|
110
|
+
* The number of objects in one page. This does not limit the total number of objects:
|
|
111
|
+
* continue with `nextPageToken` to load further pages.
|
|
112
|
+
*/
|
|
101
113
|
$pageSize?: number;
|
|
102
114
|
$applyModifiers?: ApplyModifiersArg<Q> & MODIFIERS & { [P in Exclude<keyof MODIFIERS, PropertyKeys<Q>>] : never };
|
|
103
115
|
/**
|
|
@@ -110,6 +122,13 @@ export interface FetchPageArgs<
|
|
|
110
122
|
$EXPERIMENTAL_defaultLoadLevel?: DEFAULT_LOAD_LEVEL;
|
|
111
123
|
/**
|
|
112
124
|
* 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.
|
|
125
|
+
*
|
|
126
|
+
* Without a snapshot, if objects are added, removed, or edited between requests, later pages
|
|
127
|
+
* may repeat or skip objects. A snapshot configured for a function run still applies even
|
|
128
|
+
* when this is `false`. With a snapshot, pass `$snapshot: true` on every page request; paging
|
|
129
|
+
* fails if the snapshot expires or the backend detects a paging inconsistency
|
|
130
|
+
* (`PagingInconsistencyDetected`). Stream-backed object types do not provide this snapshot
|
|
131
|
+
* guarantee across pages. `asyncIter()` always requests a snapshot.
|
|
113
132
|
* @default false
|
|
114
133
|
*/
|
|
115
134
|
$snapshot?: boolean;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BA,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;;;;;CAKA;CACA,kBAAkB,kBAAkB,KAClC,eAAe,KAAK,cAAc,WAAW,aAAa;;;;;;;;CAQ5D,iCAAiC;;;;;;;;;;;;CAYjC;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"}
|
|
@@ -69,10 +69,18 @@ interface FetchPageSignature<
|
|
|
69
69
|
> {
|
|
70
70
|
/**
|
|
71
71
|
* Gets a page of objects of this type, with a result wrapper
|
|
72
|
+
*
|
|
73
|
+
* Without `$select`, loads the API's default property set, and reading fewer properties
|
|
74
|
+
* afterwards does not avoid the cost of fetching them, so select only the properties you
|
|
75
|
+
* read. `$pageSize` sizes one page; it does not limit the total number of
|
|
76
|
+
* objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot
|
|
77
|
+
* configured for a function run still applies), so if objects change between requests,
|
|
78
|
+
* later pages may repeat or skip objects.
|
|
72
79
|
* @param args - Args to specify next page token and page size, if applicable
|
|
73
80
|
* @example
|
|
74
81
|
* ```ts
|
|
75
82
|
* const myObjs = await objectSet.fetchPage({
|
|
83
|
+
* $select: ["name"],
|
|
76
84
|
* $pageSize: 10,
|
|
77
85
|
* $nextPageToken: "nextPage",
|
|
78
86
|
* });
|
|
@@ -118,10 +126,18 @@ interface FetchPageWithErrorsSignature<
|
|
|
118
126
|
> {
|
|
119
127
|
/**
|
|
120
128
|
* Gets a page of objects of this type, with a result wrapper
|
|
129
|
+
*
|
|
130
|
+
* Without `$select`, loads the API's default property set, and reading fewer properties
|
|
131
|
+
* afterwards does not avoid the cost of fetching them, so select only the properties you
|
|
132
|
+
* read. `$pageSize` sizes one page; it does not limit the total number of
|
|
133
|
+
* objects. Does not request a snapshot unless `$snapshot: true` is passed (a snapshot
|
|
134
|
+
* configured for a function run still applies), so if objects change between requests,
|
|
135
|
+
* later pages may repeat or skip objects.
|
|
121
136
|
* @param args - Args to specify next page token and page size, if applicable
|
|
122
137
|
* @example
|
|
123
138
|
* ```ts
|
|
124
139
|
* const myObjs = await objectSet.fetchPage({
|
|
140
|
+
* $select: ["name"],
|
|
125
141
|
* $pageSize: 10,
|
|
126
142
|
* $nextPageToken: "nextPage",
|
|
127
143
|
* });
|
|
@@ -168,10 +184,23 @@ interface AsyncIterSignature<
|
|
|
168
184
|
> {
|
|
169
185
|
/**
|
|
170
186
|
* Returns an async iterator to load all objects of this type
|
|
171
|
-
*
|
|
187
|
+
*
|
|
188
|
+
* Fetches page after page until every matching object has been loaded, and always requests a
|
|
189
|
+
* consistent snapshot. For non-stream-backed object types, a completed traversal returns each
|
|
190
|
+
* object exactly once even if the underlying data changes. If the snapshot expires or the
|
|
191
|
+
* backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.
|
|
192
|
+
* Stream-backed object types do not provide this snapshot guarantee across pages: changes
|
|
193
|
+
* during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.
|
|
194
|
+
*
|
|
195
|
+
* Without `$select`, loads the API's default property set, and reading fewer properties
|
|
196
|
+
* afterwards does not avoid the cost of fetching them, so select only the properties you
|
|
197
|
+
* read, and handle each object as it arrives instead of collecting every object
|
|
198
|
+
* into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N
|
|
199
|
+
* objects use `fetchPage()`.
|
|
200
|
+
* @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)
|
|
172
201
|
* @example
|
|
173
202
|
* ```ts
|
|
174
|
-
* for await (const obj of myObjectSet.asyncIter()) {
|
|
203
|
+
* for await (const obj of myObjectSet.asyncIter({ $select: ["name"] })) {
|
|
175
204
|
* // Handle obj
|
|
176
205
|
* }
|
|
177
206
|
* ```
|
|
@@ -180,10 +209,23 @@ interface AsyncIterSignature<
|
|
|
180
209
|
<X extends ValidAsyncIterArgs<Q, RDPs> = never>(args?: X): AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>;
|
|
181
210
|
/**
|
|
182
211
|
* Returns an async iterator to load all objects of this type
|
|
183
|
-
*
|
|
212
|
+
*
|
|
213
|
+
* Fetches page after page until every matching object has been loaded, and always requests a
|
|
214
|
+
* consistent snapshot. For non-stream-backed object types, a completed traversal returns each
|
|
215
|
+
* object exactly once even if the underlying data changes. If the snapshot expires or the
|
|
216
|
+
* backend detects a paging inconsistency (`PagingInconsistencyDetected`), iteration throws.
|
|
217
|
+
* Stream-backed object types do not provide this snapshot guarantee across pages: changes
|
|
218
|
+
* during traversal can cause iteration to throw, and exactly-once traversal is not guaranteed.
|
|
219
|
+
*
|
|
220
|
+
* Without `$select`, loads the API's default property set, and reading fewer properties
|
|
221
|
+
* afterwards does not avoid the cost of fetching them, so select only the properties you
|
|
222
|
+
* read, and handle each object as it arrives instead of collecting every object
|
|
223
|
+
* into an array. For counts, sums, or group-bys use `aggregate()`; for a sample or the first N
|
|
224
|
+
* objects use `fetchPage()`.
|
|
225
|
+
* @param args - Optional args to refine the iteration (e.g., `$select`, `$orderBy`)
|
|
184
226
|
* @example
|
|
185
227
|
* ```ts
|
|
186
|
-
* for await (const obj of myObjectSet.asyncIter()) {
|
|
228
|
+
* for await (const obj of myObjectSet.asyncIter({ $select: ["name"] })) {
|
|
187
229
|
* // Handle obj
|
|
188
230
|
* }
|
|
189
231
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,qBAAqB,+BAAgC;AACnE,cAAc,sEAAsE,yCAA0C;AAC9H,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,uBAAuB,yCAA0C;AAC/E,cACE,eACA,UACA,eACA,sBACA,eACA,iBACK,4BAA6B;AACpC,cAAc,cAAc,qBAAsB;AAClD,cAAc,2BAA2B,oCAAqC;AAC9E,cACE,oCACA,6BACA,oBACK,kCAAmC;AAC1C,cACE,qBACA,4BACK,qCAAsC;AAC7C,cACE,mBACA,6BACK,kCAAmC;AAC1C,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,sBAAsB,gBAAiB;AACrD,cACE,4BACA,gBACA,kBACA,YACA,YACK,sBAAuB;AAC9B,cAAc,kBAAkB,kBAAmB;AACnD,cAAc,YAAY,iBAAiB,sBAAuB;AAClE,cAAc,qBAAqB,oBAAqB;AACxD,cACE,qBACA,yCACK,qBAAsB;AAC7B,cAAc,6BAA6B,wBAAyB;KAE/D;CACH,UAAU;CACV,UAAU,eAAe,qBAAqB,CAAE;UACxC,kBACN,IACA,mCAAmC,sBAAsB,GAAG;KAE3D,WACH,UAAU,qBAAqB,eAAe,uBAC3C,qBACD,CAAE,IACF,UAAU,qBACR,CAAE,IACF,UAAU,eAAe,qBACvB,IACA,CAAE;KAOL;CACH,UAAU;CACV;KACG,qBACD,aAAa,KACb,aAAa,WAAW,IACtB,aAAa,KACb,IAAI,aAAa;KAElB;CACH,UAAU;CACV,UAAU,UAAU,GAAG,aAAa;IAClC,oBAAoB,GAAG,eAAe;KAErC,KAAK,KAAK,WAAW,GAAG,sBACzB,IACA,wBAAwB,GAAG,sBACzB,OACG,WAAW,KAAI,EAAE;KAErB;CACH,UAAU,oCAAoC;CAC9C;KACG,qBAAqB,WAAW,EAAE,iCAAiC;KAEnE;CACH,aAAa,eAAe;CAC5B,UAAU,wBAAwB,aAAa,wBAAwB;KACpE,gCAED,QAAQ,KAAK,oBAAoB,kBAAkB,SAAQ,KAAK;AAEpE,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;CACnD,yBAAyB,cAAc,eAAe,aAAa,MAAM,CAAE;UAGzE,cAAc,IACd,UAAU,GAAG,OACb,UAAU,GAAG,MAAM,mBACnB,MAAM,GAAG,OACT,eAAe,IACf,UAAU,eAAe,GAAG,OAAO,CAAE;AAEzC,YAAY,gBACV,UAAU,qDACP,6BAGG,iBAAiB,EAAE,uBAAuB,OAAO,OAAO,SACxD,2BACE,EAAE,2CAA2C,OAAO,OAAO;KAGhE,eAAe,UAAU,2BAA2B,YACvD,EAAE;KAWC,yBAAyB,QAC3B,WAAW,KAAI,mBACZ,EAAE,WAAW,2BACR,KAAK,EAAE,6BAGV;UAEE;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;UACS,WAAW,mBAAmB,GAAG;UACjC,qBAAqB,6BAA6B,GAAG;AAC/D;KAEI;CACH,UAAU;CACV,aAAa,eAAe;CAC5B,yBAAyB,cAAc,eAAe,aAAa;IACjE,cAAc,UAChB,GACA,aAAa,4BAEE,MACf;KAGG;CACH,UAAU;CACV,aAAa,eAAe;IAE1B,cAAc,UAAU,GAAG,aAAa,IAAI,sBAAsB,QAClE,cAAc,yBAAyB,qBAAqB;UAEtD;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD
|
|
1
|
+
{"mappings":"AAgBA,cAAc,qBAAqB,+BAAgC;AACnE,cAAc,sEAAsE,yCAA0C;AAC9H,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,uBAAuB,yCAA0C;AAC/E,cACE,eACA,UACA,eACA,sBACA,eACA,iBACK,4BAA6B;AACpC,cAAc,cAAc,qBAAsB;AAClD,cAAc,2BAA2B,oCAAqC;AAC9E,cACE,oCACA,6BACA,oBACK,kCAAmC;AAC1C,cACE,qBACA,4BACK,qCAAsC;AAC7C,cACE,mBACA,6BACK,kCAAmC;AAC1C,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,sBAAsB,gBAAiB;AACrD,cACE,4BACA,gBACA,kBACA,YACA,YACK,sBAAuB;AAC9B,cAAc,kBAAkB,kBAAmB;AACnD,cAAc,YAAY,iBAAiB,sBAAuB;AAClE,cAAc,qBAAqB,oBAAqB;AACxD,cACE,qBACA,yCACK,qBAAsB;AAC7B,cAAc,6BAA6B,wBAAyB;KAE/D;CACH,UAAU;CACV,UAAU,eAAe,qBAAqB,CAAE;UACxC,kBACN,IACA,mCAAmC,sBAAsB,GAAG;KAE3D,WACH,UAAU,qBAAqB,eAAe,uBAC3C,qBACD,CAAE,IACF,UAAU,qBACR,CAAE,IACF,UAAU,eAAe,qBACvB,IACA,CAAE;KAOL;CACH,UAAU;CACV;KACG,qBACD,aAAa,KACb,aAAa,WAAW,IACtB,aAAa,KACb,IAAI,aAAa;KAElB;CACH,UAAU;CACV,UAAU,UAAU,GAAG,aAAa;IAClC,oBAAoB,GAAG,eAAe;KAErC,KAAK,KAAK,WAAW,GAAG,sBACzB,IACA,wBAAwB,GAAG,sBACzB,OACG,WAAW,KAAI,EAAE;KAErB;CACH,UAAU,oCAAoC;CAC9C;KACG,qBAAqB,WAAW,EAAE,iCAAiC;KAEnE;CACH,aAAa,eAAe;CAC5B,UAAU,wBAAwB,aAAa,wBAAwB;KACpE,gCAED,QAAQ,KAAK,oBAAoB,kBAAkB,SAAQ,KAAK;AAEpE,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;CACnD,yBAAyB,cAAc,eAAe,aAAa,MAAM,CAAE;UAGzE,cAAc,IACd,UAAU,GAAG,OACb,UAAU,GAAG,MAAM,mBACnB,MAAM,GAAG,OACT,eAAe,IACf,UAAU,eAAe,GAAG,OAAO,CAAE;AAEzC,YAAY,gBACV,UAAU,qDACP,6BAGG,iBAAiB,EAAE,uBAAuB,OAAO,OAAO,SACxD,2BACE,EAAE,2CAA2C,OAAO,OAAO;KAGhE,eAAe,UAAU,2BAA2B,YACvD,EAAE;KAWC,yBAAyB,QAC3B,WAAW,KAAI,mBACZ,EAAE,WAAW,2BACR,KAAK,EAAE,6BAGV;UAEE;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;UACS,WAAW,mBAAmB,GAAG;UACjC,qBAAqB,6BAA6B,GAAG;AAC/D;KAEI;CACH,UAAU;CACV,aAAa,eAAe;CAC5B,yBAAyB,cAAc,eAAe,aAAa;IACjE,cAAc,UAChB,GACA,aAAa,4BAEE,MACf;KAGG;CACH,UAAU;CACV,aAAa,eAAe;IAE1B,cAAc,UAAU,GAAG,aAAa,IAAI,sBAAsB,QAClE,cAAc,yBAAyB,qBAAqB;UAEtD;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;;;;;;;;;;;;;;;;;;;;EAuBE,UAAU,aAAa,qBAAqB;EAC5C;QACM,UAAU;EAChB,UAAU,uBAAuB,qBAAqB;EACtD,oBAAoB;EACpB,yBAAyB,cAAc,eAAe,KAAK,CAAE;EAC7D,sCAAsC;EACtC,kBAAkB,kBAAkB,KAAK,CAAE;GAE3CA,OAAO,cACL,GACA,GACA,GACA,GACA,GACA,UAEA,kBACA,qBACA,aAED,QACD,WACE,WACE,KAAK,SACH,GACA,eAAe,GAAG,GAAG,GAAG,sBACtB,QACE,QAAQ,cAAc,GAAG,mBAAmB,eACtC,aAER,yBAAyB,YAC3B,cAAc,MAAM,mBAAmB,SAEzC;AAIP;UAES,iBAAiB,UAAU,6BAA6B;;;;;;;;;;;;;;;;;;UAkBvD,mBACPC,0BACAC,sBACAC,UAAU,aAAa,SAAS,GAAG;AAEtC;UAES;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;CACnD,sCAAsC;EACtC;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BE,UAAU,aAAa,qBAAqB;EAC5C;QACM,UAAU;EAChB,UAAU,uBAAuB,qBAAqB;EACtD,oBAAoB;EACpB,yBAAyB,cAAc,eAAe,KAAK,CAAE;QACvD,kBAAkB,kBAAkB,KAAK,CAAE;GAEjDH,OAAO,cACL,GACA,GACA,GACA,GACA,GACA,UAEA,kBACA,qBACA,aAED,QACD,OACE,WACE,WACE,KAAK,SACH,GACA,eAAe,GAAG,GAAG,GAAG,sBACtB,QACE,QAAQ,cAAc,GAAG,mBAAmB,eACtC,aAER,yBAAyB,YAC3B,cAAc,MAAM,mBAAmB,SAEzC;AAKT;UAGS;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;;;;;;;;;;UAaS,QAAQI,QAAQ,YAAY,eAAe,GAAG;AACxD;UAES;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;CACnD,0BAA0B,cAAc,eAAe,aAAa,MAAM,CAAE;CAC5E,sCAAsC;EACtC;;;;;;;;;;;;;;;;;;;;;;;;;EAyBC,UAAU,mBAAmB,GAAG,eAC/BC,OAAO,IACN,sBACD,KAAK,SACH,GACA,gBAAgB,IAChB,cAAc,GAAG,IACjB,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BtB,UAAU,aAAa,qBAAqB;EAC5C;QACM,UAAU;EAChB,UAAU,uBAAuB,qBAAqB;EACtD,oBAAoB;EACpB,yBAAyB,cAAc,eAAe,aAAa,MAAM,CAAE;QACrE,kBAAkB,kBAAkB,KAAK,CAAE;GAEjDC,OAAO,cACL,GACA,GACA,GACA,GACA,GACA,UAEA,kBACA,qBACA,aAED,sBACD,WACE,KAAK,SACH,GACA,eAAe,GAAG,GAAG,GAAG,sBACxB,QAAQ,cAAc,GAAG,mBAAmB,SAC5C,cAAc,MAAM,mBAAmB,SAEzC;AAGL;UAES;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;CACnD,yBAAyB,cAAc,eAAe,aAAa,MAAM,CAAE;EAC3E;CACA,WAAW,mBAAmB,GAAG,MAAM;AACxC;UAES;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;;;;;;;;;;;;UAeS,iBACP,YAAY,eAAe,oBAC3BC,WACC,WAAW,OAAM,gBAAgB,QAAQ,GAAG,IAAI,UAC7C,UACJ,MAEG,YAAY,YAAY,QAAO,iBAAiB,MAC7C,IAAI,MACJ,iBAAiB,OACf,KAAK;AAIhB;AAED,iBAAiB;CACf,UAAU;CAGV,sBAAsB,cAAc,KAAK,eAAe;UAEhD,sBACR,GACA,WAAW,gBACX,eAAe,GAAG,WAAW,iBAC7B,CAAE;UAGM,UAAU,UAAU,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;UAyBhD,YAAY,WAAW,cAAc,IAC5CC,KAAK,+DAA+D,GAAG,QACpE,QAAQ,oBAAoB,GAAG;AACrC;UAGS,cAAc,UAAU,6BAA6B;;;;;;;;;;;;UAYpD,QACP,GAAG,YAAY,cAAc,oBAAoB,GAAG;;;;;;;;;;;;UAc7C,YACP,GAAG,YAAY,cAAc,oBAAoB,GAAG;;;;;;;;;;;;UAc7C,WACP,GAAG,YAAY,cAAc,oBAAoB,GAAG;AAEvD;UAGS,QAAQ,UAAU,6BAA6B;;;;;;;;;;;;UAY9C,UAAU,UAAU,UAAU,IACrCC,MAAM,MACH,UAAU,WAAW,GAAG;AAC9B;UAES;CACR,UAAU;CACV,aAAa,eAAe;EAC5B;;;;;;;;;;;;QAYQ,UAAU,aAAa,qBAAqB;QAC5C;QACA,UAAU,QAAQ,UAAU,qBAAqB;EACvD,sCAAsC;GAEtCC,YAAY,eAAe,IAC3BC,UAAU,UAAU,GAAG,GAAG,GAAG,UAAU,uBACtC,QACD,KAAK,SACH,GACA,eAAe,GAAG,GAAG,OAAO,sBAC5B,QAAQ,cAAc,GAAG;EAAE,SAAS,MAAM;CAAI,KAC9C,cAAc,MAAM;EAAE,SAAS,MAAM;CAAI;AAG9C;UAES;CACR,UAAU;CACV,aAAa,eAAe;EAC5B;;;;;;;;;;;;;;;QAeQ,UAAU,aAAa,qBAAqB;QAC5C;QACA,UAAU,QAAQ,UAAU,qBAAqB;EACvD,sCAAsC;GAEtCD,YAAY,eAAe,IAC3BC,UAAU,UAAU,GAAG,GAAG,GAAG,UAAU,uBACtC,QACD,OACE,KAAK,SACH,GACA,eAAe,GAAG,GAAG,OAAO,sBAC5B,QAAQ,cAAc,GAAG;EAAE,SAAS,MAAM;CAAI,KAC9C,cAAc,MAAM;EAAE,SAAS,MAAM;CAAI;AAIhD;UAES;CACR,UAAU;CACV,aAAa,eAAe;EAC5B;CACA,UAAU,UAAU,uBAAuB,kBAAkB,GAAG;CAChE,oBAAoB,UAAU,uBAC1B,4BAA4B,GAAG;AAEpC;UAGS,UAAU,UAAU,6BAA6B;;;;;;;;;;;;;;;;;;;;;;UAsBhD;QACD,UAAU,aAAa;QACvB,oBAAoB;GAE1BC,UAAU,sBAAsB,SAAS,GAAG,GAAG,IAC/CC,OAAO,sBAAsB,QAAQ,GAAG,GAAG,OACxC;EAAE;CAAyB;AACjC;UAES,aAAa,UAAU,6BAA6B;;;;;;;;;;;;;UAanD,eACP,mBAAmB,kCAAkC,IAErDC,MAAM,eACH,UAAU;AAChB;KAEI,kCAAkC,UAAU,+BAC/C,UAAU,uBACN,6BAA6B,KAC7B,UAAU,sBACR,yBAAyB;KAG5B,6BAA6B,UAAU,wBAC1C,oBAAoB,WAAW;CAAE,YAAY,oBAAoB;AAAW,IACxE,0BACE,sBAAsB;CAAE,SAAS;AAAU;KAI9C,yBAAyB,UAAU,uBACtC,oBAAoB,WAAW;CAC7B,eAAe,oBAAoB;AACpC,KACI,uBAAuB;CAAE,SAAS;AAAU,KAAI,sBACjD;UAEI,eAAe,UAAU,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;UAyBrD,8BACP,2BAA2B,oBAAoB,IAE/CC,OAAO,yBACJ,sBACH,kCAAkC,GAAG;AAExC;UAES;CACR,UAAU;CACV,UAAU,eAAe;CACzB,eAAe,8BAA8B;CAC7C,yBAAyB,cAAc,eAAe,aAAa,MAAM,CAAE;UAGzE,iBAAiB,GAAG,GAAG,mBACvB,eAAe,GAAG,IAClB,UAAU,SACV,cAAc,SACd,QAAQ,IACR,SAAS,GAAG,IACZ,iBAAiB,IACjB,aAAa,GAAG,CAAE","names":["args?: FetchPageArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >","query: string | number[]","numNeighbors: number","property: PropertyKeys.Filtered<Q, \"vector\">","clause: WhereClause<MergeObjectSet<Q, RDPs>>","args?: X","args?: AsyncIterArgs<\n Q,\n L,\n R,\n A,\n S,\n T,\n never,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES,\n MODIFIERS\n >","clause: {\n [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]>;\n }","req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>","type: L","primaryKey: PrimaryKeyType<Q>","options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>","listener: ObjectSetSubscription.Listener<Q, P, R>","opts?: ObjectSetSubscription.Options<Q, P, R>","type: CONVERT_TO","links: LINK_TYPE_API_NAME[]"],"sources":["../../../src/objectSet/ObjectSet.ts"],"version":3,"file":"ObjectSet.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/api",
|
|
3
|
-
"version": "2.78.
|
|
3
|
+
"version": "2.78.1-main-86c708bd9cdef1d9a8d438a9fa0bc38f7d8116ea",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@microsoft/api-extractor": "^7.52.11",
|
|
58
58
|
"ts-expect": "^1.3.0",
|
|
59
59
|
"typescript": "~5.5.4",
|
|
60
|
-
"@osdk/monorepo.
|
|
61
|
-
"@osdk/monorepo.
|
|
60
|
+
"@osdk/monorepo.api-extractor": "~0.7.0",
|
|
61
|
+
"@osdk/monorepo.tsconfig": "~0.7.0"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|