diff --git a/.changeset/giant-pianos-film.md b/.changeset/giant-pianos-film.md new file mode 100644 index 000000000..8ee99190e --- /dev/null +++ b/.changeset/giant-pianos-film.md @@ -0,0 +1,6 @@ +--- +"@osdk/client.api": minor +"@osdk/client": minor +--- + +Marks things as @internal to clean up API requirements diff --git a/etc/client.api.report.api.md b/etc/client.api.report.api.md index 4fe81915d..3ba2ce5b0 100644 --- a/etc/client.api.report.api.md +++ b/etc/client.api.report.api.md @@ -175,9 +175,8 @@ export interface BaseObjectSet { // Warning: (ae-forgotten-export) The symbol "ApiNameAsString" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DropDollarOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-internal-missing-underscore) The name "ConvertProps" should be prefixed with an underscore because the declaration is marked as @internal // -// @internal +// @public (undocumented) export type ConvertProps | InterfaceDefinition, TO extends ValidToFrom, P extends string = "$all"> = TO extends FROM ? P : TO extends ObjectTypeDefinition ? ((UnionIfTrue[ApiNameAsString][P extends "$all" ? (keyof FROM["properties"] extends NonNullable[ApiNameAsString] ? keyof FROM["properties"] : never) : DropDollarOptions

], P extends "$notStrict" ? true : false, "$notStrict">, P extends "$rid" ? true : false, "$rid">)) : UnionIfTrue ? P extends "$all" ? "$all" : FROM extends ObjectTypeDefinition ? DropDollarOptions

extends keyof NonNullable[ApiNameAsString] ? NonNullable[ApiNameAsString][DropDollarOptions

] : never : never : never, P extends "$notStrict" ? true : false, "$notStrict">, P extends "$rid" ? true : false, "$rid">; // @public @@ -650,9 +649,7 @@ export type QueryReturnType> = T ext // @public (undocumented) export type QuerySignatureFromDef> = keyof T["parameters"] extends never ? () => Promise> : (params: QueryParameterType) => Promise>; -// Warning: (ae-internal-missing-underscore) The name "RespectNullability" should be prefixed with an underscore because the declaration is marked as @internal -// -// @internal +// @public export type RespectNullability = S extends false ? false : true; // Warning: (ae-forgotten-export) The symbol "ErrorResult" needs to be exported by the entry point index.d.ts @@ -679,10 +676,6 @@ export interface SingleLinkAccessor> { fetchOneWithErrors: , boolean>>(options?: A) => Promise extends false ? Osdk> : Osdk | "$rid">>>; } -// Warning: (ae-incompatible-release-tags) The symbol "SingleOsdkResult" is marked as @public, but its signature references "RespectNullability" which is marked as @internal -// Warning: (ae-incompatible-release-tags) The symbol "SingleOsdkResult" is marked as @public, but its signature references "UnionIfTrue" which is marked as @internal -// Warning: (ae-incompatible-release-tags) The symbol "SingleOsdkResult" is marked as @public, but its signature references "UnionIfFalse" which is marked as @internal -// // @public (undocumented) export type SingleOsdkResult, R extends boolean, S extends NullabilityAdherence> = ObjectOrInterfacePropertyKeysFrom2 extends L ? ([ DefaultToFalse, @@ -765,14 +758,10 @@ export type TimeSeriesQuery = { $unit?: never; }; -// Warning: (ae-internal-missing-underscore) The name "UnionIfFalse" should be prefixed with an underscore because the declaration is marked as @internal -// -// @internal +// @public export type UnionIfFalse = IsNever_2 extends true ? never : JUST_S_IF_TRUE extends true ? S : S | E; -// Warning: (ae-internal-missing-underscore) The name "UnionIfTrue" should be prefixed with an underscore because the declaration is marked as @internal -// -// @internal +// @public export type UnionIfTrue = IsNever_2 extends true ? never : UNION_IF_TRUE extends true ? S | E : S; // @public (undocumented) @@ -801,10 +790,9 @@ export type WhereClause> = OrWhe // Warnings were encountered during analysis: // -// src/OsdkObjectFrom.ts:102:4 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen -// src/OsdkObjectFrom.ts:103:4 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen -// src/OsdkObjectFrom.ts:159:5 - (ae-forgotten-export) The symbol "UnderlyingProps" needs to be exported by the entry point index.d.ts -// src/OsdkObjectFrom.ts:159:5 - (ae-incompatible-release-tags) The symbol "$as" is marked as @public, but its signature references "ConvertProps" which is marked as @internal +// src/OsdkObjectFrom.ts:100:4 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/OsdkObjectFrom.ts:101:4 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/OsdkObjectFrom.ts:157:5 - (ae-forgotten-export) The symbol "UnderlyingProps" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/etc/client.report.api.md b/etc/client.report.api.md index 61c15374f..1715044ae 100644 --- a/etc/client.report.api.md +++ b/etc/client.report.api.md @@ -24,7 +24,6 @@ import type { Logger } from 'pino'; import { NOOP } from '@osdk/client.api'; import type { ObjectOrInterfaceDefinition } from '@osdk/api'; import { ObjectSet } from '@osdk/client.api'; -import type { ObjectSet as ObjectSet_2 } from '@osdk/internal.foundry'; import type { ObjectTypeDefinition } from '@osdk/api'; import { Osdk } from '@osdk/client.api'; import { OsdkActionParameters } from '@osdk/client.api'; diff --git a/packages/client.api/package.json b/packages/client.api/package.json index 6f0bbceb8..1f9e230fb 100644 --- a/packages/client.api/package.json +++ b/packages/client.api/package.json @@ -28,7 +28,8 @@ "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { - "@osdk/api": "workspace:~" + "@osdk/api": "workspace:~", + "type-fest": "^4.18.2" }, "peerDependencies": { "@types/geojson": "*" @@ -42,7 +43,6 @@ "@osdk/monorepo.tsconfig": "workspace:~", "@osdk/monorepo.tsup": "workspace:~", "@types/geojson": "^7946.0.14", - "type-fest": "^4.18.2", "typescript": "^5.5.2" }, "publishConfig": { diff --git a/packages/client.api/src/OsdkObjectFrom.ts b/packages/client.api/src/OsdkObjectFrom.ts index 8265e50bf..b494d99cf 100644 --- a/packages/client.api/src/OsdkObjectFrom.ts +++ b/packages/client.api/src/OsdkObjectFrom.ts @@ -40,11 +40,9 @@ type ApiNameAsString = NonNullable< >; /** - * DO NOT EXPORT FROM PACKAGE * @param FROM - the interface or object type to convert from * @param TO - the interface or object type to convert to * @param P - the property(s) to convert - * @internal */ export type ConvertProps< FROM extends ObjectTypeDefinition | InterfaceDefinition, @@ -114,7 +112,7 @@ type UnderlyingProps< : Z : Z; -type IsNever = [T] extends [never] ? true : false; +export type IsNever = [T] extends [never] ? true : false; export type Osdk< Q extends ObjectTypeDefinition | InterfaceDefinition, diff --git a/packages/client.api/src/object/FetchPageResult.ts b/packages/client.api/src/object/FetchPageResult.ts index ffd9ddd64..b17bb232d 100644 --- a/packages/client.api/src/object/FetchPageResult.ts +++ b/packages/client.api/src/object/FetchPageResult.ts @@ -18,24 +18,23 @@ import type { ObjectOrInterfaceDefinition, ObjectOrInterfacePropertyKeysFrom2, } from "@osdk/api"; -import type { IsNever } from "type-fest"; import type { DefaultToFalse } from "../definitions/LinkDefinitions.js"; -import type { Osdk } from "../OsdkObjectFrom.js"; +import type { IsNever, Osdk } from "../OsdkObjectFrom.js"; import type { PageResult } from "../PageResult.js"; import type { NullabilityAdherence } from "./FetchPageArgs.js"; -/** @internal exposed for a test */ +/** exposed for a test */ export type RespectNullability = S extends false ? false : true; -/** @internal exposed for a test */ +/** exposed for a test */ export type UnionIfFalse = IsNever extends true ? never : JUST_S_IF_TRUE extends true ? S : S | E; -/** @internal exposed for a test */ +/** exposed for a test */ export type UnionIfTrue< S extends string, UNION_IF_TRUE extends boolean, diff --git a/packages/client/package.json b/packages/client/package.json index d02f602d4..09f74b266 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -47,6 +47,7 @@ "fetch-retry": "^6.0.0", "isomorphic-ws": "^5.0.0", "tiny-invariant": "^1.3.1", + "type-fest": "^4.18.2", "ws": "^8.18.0" }, "peerDependencies": { @@ -75,7 +76,6 @@ "pino": "^9.1.0", "pino-pretty": "^11.2.1", "ts-expect": "^1.3.0", - "type-fest": "^4.18.2", "typescript": "^5.5.2", "zod": "^3.23.8" }, diff --git a/packages/client/src/MinimalClientContext.ts b/packages/client/src/MinimalClientContext.ts index 787f4b16f..84b5624f1 100644 --- a/packages/client/src/MinimalClientContext.ts +++ b/packages/client/src/MinimalClientContext.ts @@ -31,6 +31,7 @@ export interface MinimalClient extends SharedClientContext { ontologyRid: string | Promise; ontologyProvider: OntologyProvider; logger?: Logger; + /** @internal */ objectSetFactory: ObjectSetFactory; clientCacheKey: ClientCacheKey; requestContext: RequestContext; diff --git a/packages/client/src/OsdkObjectFrom.test.ts b/packages/client/src/OsdkObjectFrom.test.ts index b81a287cc..dcf96d2bd 100644 --- a/packages/client/src/OsdkObjectFrom.test.ts +++ b/packages/client/src/OsdkObjectFrom.test.ts @@ -15,110 +15,10 @@ */ import type { ObjectOrInterfaceDefinition } from "@osdk/api"; -import type { ConvertProps, Osdk, ValidToFrom } from "@osdk/client.api"; +import type { Osdk, ValidToFrom } from "@osdk/client.api"; import type { Employee, FooInterface } from "@osdk/client.test.ontology"; import { describe, expectTypeOf, it } from "vitest"; -describe("ConvertProps", () => { - describe("converts from an interface to a concrete", () => { - it("handles single prop", () => { - expectTypeOf>() - .toEqualTypeOf<"fullName">(); - }); - it("handles $all", () => { - expectTypeOf>() - .toEqualTypeOf<"fullName">(); - }); - - it("converts non-strict nullness for handles single prop", () => { - expectTypeOf< - ConvertProps< - FooInterface, - Employee, - | "fooSpt" - | "$notStrict" - > - >() - .toEqualTypeOf<"fullName" | "$notStrict">(); - }); - it("converts non-strict nullness for $all", () => { - expectTypeOf< - ConvertProps - >() - .toEqualTypeOf<"fullName" | "$notStrict">(); - }); - it("handles $all | $rid", () => { - expectTypeOf>() - .toEqualTypeOf<"fullName" | "$rid">(); - }); - }); - - describe("converts from a concrete to an interface", () => { - describe("single prop", () => { - it("handles known prop", () => { - expectTypeOf>() - .toEqualTypeOf<"fooSpt">(); - }); - - it("resolves to never for unused", () => { - expectTypeOf>() - .toEqualTypeOf(); - }); - - it("resolves to never for unused when not strict", () => { - expectTypeOf< - ConvertProps - >() - .toEqualTypeOf(); - }); - - it("converts non-strict nullness for single prop", () => { - expectTypeOf< - ConvertProps - >() - .toEqualTypeOf<"fooSpt" | "$notStrict">(); - }); - - it("converts non-strict nullness for $all", () => { - expectTypeOf< - ConvertProps - >() - .toEqualTypeOf<"$all" | "$notStrict">(); - }); - }); - - describe("multiprop", () => { - it("resolves to known only", () => { - expectTypeOf< - ConvertProps - >() - .toEqualTypeOf<"fooSpt">(); - }); - - it("resolves to known only when not strict", () => { - expectTypeOf< - ConvertProps< - Employee, - FooInterface, - "peeps" | "fullName" | "$notStrict" - > - >() - .toEqualTypeOf<"fooSpt" | "$notStrict">(); - }); - }); - - it("handles $all", () => { - expectTypeOf>() - .toEqualTypeOf<"$all">(); - }); - - it("handles $all | $rid", () => { - expectTypeOf>() - .toEqualTypeOf<"$all" | "$rid">(); - }); - }); -}); - describe("Osdk", () => { class OsdkAsHelperClass< FROM extends ObjectOrInterfaceDefinition, diff --git a/packages/client/src/createClient.ts b/packages/client/src/createClient.ts index 71e248a57..0a9f1e764 100644 --- a/packages/client/src/createClient.ts +++ b/packages/client/src/createClient.ts @@ -54,6 +54,7 @@ class ActionInvoker> applyAction: (...args: any[]) => any; } +/** @internal */ export function createClientInternal( objectSetFactory: ObjectSetFactory, // first so i can bind baseUrl: string, diff --git a/packages/client/src/createMinimalClient.ts b/packages/client/src/createMinimalClient.ts index 7c9c807a8..963a6d43e 100644 --- a/packages/client/src/createMinimalClient.ts +++ b/packages/client/src/createMinimalClient.ts @@ -29,6 +29,7 @@ import { } from "./ontology/StandardOntologyProvider.js"; import { USER_AGENT } from "./util/UserAgent.js"; +/** @internal */ export function createMinimalClient( metadata: MinimalClientParams["metadata"], baseUrl: string, diff --git a/packages/client/src/internal/conversions/legacyToModernSingleAggregationResult.ts b/packages/client/src/internal/conversions/legacyToModernSingleAggregationResult.ts index 768d66a76..3861ca06c 100644 --- a/packages/client/src/internal/conversions/legacyToModernSingleAggregationResult.ts +++ b/packages/client/src/internal/conversions/legacyToModernSingleAggregationResult.ts @@ -26,6 +26,7 @@ import type { AggregateObjectsResponseV2 } from "@osdk/internal.foundry"; import invariant from "tiny-invariant"; import type { ArrayElement } from "../../util/ArrayElement.js"; +/** @internal */ export function legacyToModernSingleAggregationResult< Q extends ObjectOrInterfaceDefinition, AC extends UnorderedAggregationClause | OrderedAggregationClause, diff --git a/packages/client/src/internal/conversions/modernToLegacyAggregationClause.ts b/packages/client/src/internal/conversions/modernToLegacyAggregationClause.ts index 7cb2c7990..ee00c5290 100644 --- a/packages/client/src/internal/conversions/modernToLegacyAggregationClause.ts +++ b/packages/client/src/internal/conversions/modernToLegacyAggregationClause.ts @@ -25,6 +25,7 @@ import type { AggregationV2 } from "@osdk/internal.foundry"; const directionFieldMap = (dir?: "asc" | "desc" | "unordered") => dir === "asc" ? "ASC" : dir === "desc" ? "DESC" : undefined; +/** @internal */ export function modernToLegacyAggregationClause< AC extends UnorderedAggregationClause | OrderedAggregationClause, >(select: AC) { diff --git a/packages/client/src/internal/conversions/modernToLegacyGroupByClause.ts b/packages/client/src/internal/conversions/modernToLegacyGroupByClause.ts index 6eabe4096..22bab07be 100644 --- a/packages/client/src/internal/conversions/modernToLegacyGroupByClause.ts +++ b/packages/client/src/internal/conversions/modernToLegacyGroupByClause.ts @@ -25,6 +25,7 @@ import type { AggregationRangeV2, } from "@osdk/internal.foundry"; +/** @internal */ export function modernToLegacyGroupByClause( groupByClause: GroupByClause | undefined, ) { diff --git a/packages/client/src/internal/conversions/modernToLegacyWhereClause.ts b/packages/client/src/internal/conversions/modernToLegacyWhereClause.ts index c09cec132..29e718392 100644 --- a/packages/client/src/internal/conversions/modernToLegacyWhereClause.ts +++ b/packages/client/src/internal/conversions/modernToLegacyWhereClause.ts @@ -29,6 +29,7 @@ import type { SearchJsonQueryV2 } from "@osdk/internal.foundry"; import type { BBox, Position } from "geojson"; import invariant from "tiny-invariant"; +/** @internal */ export function modernToLegacyWhereClause< T extends ObjectOrInterfaceDefinition, >( diff --git a/packages/client/src/object/aggregate.ts b/packages/client/src/object/aggregate.ts index d8ab0de88..1da9d2147 100644 --- a/packages/client/src/object/aggregate.ts +++ b/packages/client/src/object/aggregate.ts @@ -36,7 +36,7 @@ import type { MinimalClient } from "../MinimalClientContext.js"; import { addUserAgentAndRequestContextHeaders } from "../util/addUserAgentAndRequestContextHeaders.js"; import type { ArrayElement } from "../util/ArrayElement.js"; -/** @deprecated use `aggregate` */ +/** @deprecated use `aggregate` @internal */ export async function aggregateOrThrow< Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts, @@ -52,6 +52,7 @@ export async function aggregateOrThrow< return aggregate(clientCtx, objectType, objectSet, req); } +/** @internal */ export async function aggregate< Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts, diff --git a/packages/client/src/object/convertWireToOsdkObjects.ts b/packages/client/src/object/convertWireToOsdkObjects.ts index cece42e85..9ddc2c937 100644 --- a/packages/client/src/object/convertWireToOsdkObjects.ts +++ b/packages/client/src/object/convertWireToOsdkObjects.ts @@ -19,17 +19,12 @@ import type { ObjectOrInterfaceDefinition, ObjectTypeDefinition, } from "@osdk/api"; -import type { - ConvertProps, - NullabilityAdherence, - Osdk, -} from "@osdk/client.api"; +import type { NullabilityAdherence, Osdk } from "@osdk/client.api"; import type { OntologyObjectV2 } from "@osdk/internal.foundry"; import invariant from "tiny-invariant"; import type { MinimalClient } from "../MinimalClientContext.js"; import { type FetchedObjectTypeDefinition, - InterfaceDefinitions, } from "../ontology/OntologyProvider.js"; import { createOsdkObject } from "./convertWireToOsdkObjects/createOsdkObject.js"; diff --git a/packages/client/src/object/convertWireToOsdkObjects/ObjectHolder.ts b/packages/client/src/object/convertWireToOsdkObjects/ObjectHolder.ts index 5c6704f7a..8c904ea17 100644 --- a/packages/client/src/object/convertWireToOsdkObjects/ObjectHolder.ts +++ b/packages/client/src/object/convertWireToOsdkObjects/ObjectHolder.ts @@ -27,6 +27,7 @@ import type { UnderlyingOsdkObject, } from "./InternalSymbols.js"; +/** @internal */ export interface ObjectHolderPrototypeOwnProps { readonly [ObjectDefRef]: FetchedObjectTypeDefinition; readonly [ClientRef]: MinimalClient; @@ -34,10 +35,12 @@ export interface ObjectHolderPrototypeOwnProps { readonly "$link": ReturnType; readonly "$updateInternalValues": (newValues: Record) => void; } +/** @internal */ export interface ObjectHolderOwnProperties { [RawObject]: OntologyObjectV2; } +/** @internal */ export interface ObjectHolder> extends ObjectHolderPrototypeOwnProps, ObjectHolderOwnProperties { diff --git a/packages/client/src/object/convertWireToOsdkObjects/createOsdkInterface.ts b/packages/client/src/object/convertWireToOsdkObjects/createOsdkInterface.ts index 6a2a9a001..b6eff4667 100644 --- a/packages/client/src/object/convertWireToOsdkObjects/createOsdkInterface.ts +++ b/packages/client/src/object/convertWireToOsdkObjects/createOsdkInterface.ts @@ -38,6 +38,7 @@ const handlerCache = createSimpleCache< createInterfaceProxyHandler, ); +/** @internal */ export function createOsdkInterface< Q extends FetchedObjectTypeDefinition, >( diff --git a/packages/client/src/object/convertWireToOsdkObjects/createOsdkObject.ts b/packages/client/src/object/convertWireToOsdkObjects/createOsdkObject.ts index 350d292c0..f35dd6a79 100644 --- a/packages/client/src/object/convertWireToOsdkObjects/createOsdkObject.ts +++ b/packages/client/src/object/convertWireToOsdkObjects/createOsdkObject.ts @@ -65,6 +65,7 @@ const objectPrototypeCache = createClientCache( }, ); +/** @internal */ export function createOsdkObject< Q extends FetchedObjectTypeDefinition, >( diff --git a/packages/client/src/object/convertWireToOsdkObjects/getDollarAs.ts b/packages/client/src/object/convertWireToOsdkObjects/getDollarAs.ts index a7449128a..1708f8099 100644 --- a/packages/client/src/object/convertWireToOsdkObjects/getDollarAs.ts +++ b/packages/client/src/object/convertWireToOsdkObjects/getDollarAs.ts @@ -26,6 +26,7 @@ import type { InterfaceHolder } from "./InterfaceHolder.js"; import { UnderlyingOsdkObject } from "./InternalSymbols.js"; import type { ObjectHolder } from "./ObjectHolder.js"; +/** @internal */ export type DollarAsFn = < Q extends FetchedObjectTypeDefinition, NEW_Q extends ObjectOrInterfaceDefinition, diff --git a/packages/client/src/object/convertWireToOsdkObjects/getDollarLink.ts b/packages/client/src/object/convertWireToOsdkObjects/getDollarLink.ts index 72f924ba8..e3bdddec8 100644 --- a/packages/client/src/object/convertWireToOsdkObjects/getDollarLink.ts +++ b/packages/client/src/object/convertWireToOsdkObjects/getDollarLink.ts @@ -30,6 +30,7 @@ import type { ObjectHolderOwnProperties, } from "./ObjectHolder.js"; +/** @internal */ export function get$link( holder: ObjectHolder, ): OsdkObjectLinksObject { diff --git a/packages/client/src/object/fetchPage.ts b/packages/client/src/object/fetchPage.ts index a38c15bf1..873c2f648 100644 --- a/packages/client/src/object/fetchPage.ts +++ b/packages/client/src/object/fetchPage.ts @@ -171,6 +171,14 @@ export async function fetchPageWithErrorsInternal< } } +/** + * @param client + * @param objectType + * @param args + * @param objectSet + * @returns + * @internal + */ export async function fetchPage< Q extends ObjectOrInterfaceDefinition, L extends ObjectOrInterfacePropertyKeysFrom2, @@ -188,6 +196,7 @@ export async function fetchPage< return fetchPageInternal(client, objectType, objectSet, args); } +/** @internal */ export async function fetchPageWithErrors< Q extends ObjectOrInterfaceDefinition, L extends ObjectOrInterfacePropertyKeysFrom2, @@ -235,6 +244,7 @@ function applyFetchArgs< return body; } +/** @internal */ export async function fetchObjectPage< Q extends ObjectTypeDefinition, L extends ObjectOrInterfacePropertyKeysFrom2, diff --git a/packages/client/src/object/fetchSingle.ts b/packages/client/src/object/fetchSingle.ts index 5eb322477..fa59eddef 100644 --- a/packages/client/src/object/fetchSingle.ts +++ b/packages/client/src/object/fetchSingle.ts @@ -26,6 +26,7 @@ import { PalantirApiError } from "@osdk/shared.net.errors"; import type { MinimalClient } from "../MinimalClientContext.js"; import { fetchPage } from "./fetchPage.js"; +/** @internal */ export async function fetchSingle< Q extends ObjectOrInterfaceDefinition, const A extends FetchPageArgs, @@ -59,6 +60,7 @@ export async function fetchSingle< return result.data[0] as any; } +/** @internal */ export async function fetchSingleWithErrors< Q extends ObjectOrInterfaceDefinition, const A extends FetchPageArgs, diff --git a/packages/client/src/objectSet/ObjectSetFactory.ts b/packages/client/src/objectSet/ObjectSetFactory.ts index 5f74b901a..aa882c1de 100644 --- a/packages/client/src/objectSet/ObjectSetFactory.ts +++ b/packages/client/src/objectSet/ObjectSetFactory.ts @@ -19,6 +19,7 @@ import type { ObjectSet } from "@osdk/client.api"; import type { ObjectSet as WireObjectSet } from "@osdk/internal.foundry"; import type { MinimalClient } from "../MinimalClientContext.js"; +/** @internal */ export type ObjectSetFactory< Q extends ObjectOrInterfaceDefinition, R extends ObjectSet, diff --git a/packages/client/src/objectSet/ObjectSetListenerWebsocket.ts b/packages/client/src/objectSet/ObjectSetListenerWebsocket.ts index 364d77773..f96ae5ab9 100644 --- a/packages/client/src/objectSet/ObjectSetListenerWebsocket.ts +++ b/packages/client/src/objectSet/ObjectSetListenerWebsocket.ts @@ -99,6 +99,7 @@ function subscriptionIsDone(sub: Subscription) { return sub.status === "done" || sub.status === "error"; } +/** @internal */ export class ObjectSetListenerWebsocket { static #instances = new WeakMap< ClientCacheKey, diff --git a/packages/client/src/objectSet/createObjectSet.ts b/packages/client/src/objectSet/createObjectSet.ts index 10d0d3903..87943feaf 100644 --- a/packages/client/src/objectSet/createObjectSet.ts +++ b/packages/client/src/objectSet/createObjectSet.ts @@ -49,6 +49,7 @@ function isObjectTypeDefinition( return def.type === "object"; } +/* @internal */ export function isObjectSet(o: any): o is ObjectSet { return o != null && typeof o === "object" && isWireObjectSet(objectSetDefinitions.get(o)); @@ -66,6 +67,7 @@ const objectSetDefinitions = new WeakMap< WireObjectSet >(); +/** @internal */ export function createObjectSet( objectType: Q, clientCtx: MinimalClient, diff --git a/packages/client/src/objectSet/createUnstableObjectSet.ts b/packages/client/src/objectSet/createUnstableObjectSet.ts index 9bafadad9..de3acd45c 100644 --- a/packages/client/src/objectSet/createUnstableObjectSet.ts +++ b/packages/client/src/objectSet/createUnstableObjectSet.ts @@ -53,6 +53,7 @@ export interface UNSTABLE_ObjectSet ) => UNSTABLE_ObjectSet>; } +/** @internal */ export function UNSTABLE_createObjectSet( objectType: Q, clientCtx: MinimalClient, diff --git a/packages/client/src/objectSet/toConjureObjectSet.ts b/packages/client/src/objectSet/toConjureObjectSet.ts index 5d3f4f85d..e7ad73bcc 100644 --- a/packages/client/src/objectSet/toConjureObjectSet.ts +++ b/packages/client/src/objectSet/toConjureObjectSet.ts @@ -23,6 +23,7 @@ import type { ObjectSet, SearchJsonQueryV2 } from "@osdk/internal.foundry"; import type { ObjectPropertyMapping } from "../__unstable/ConjureSupport.js"; import { conjureUnionType } from "./conjureUnionType.js"; +/** @internal */ export function toConjureObjectSet< O extends OntologyDefinition, K extends ObjectTypeKeysFrom, @@ -81,6 +82,7 @@ export function toConjureObjectSet< } } +/** @internal */ export async function getObjectSetBaseType(objectSet: ObjectSet) { switch (objectSet.type) { case "base": diff --git a/packages/client/src/util/WireObjectSet.ts b/packages/client/src/util/WireObjectSet.ts index ec90de47d..b0f42a886 100644 --- a/packages/client/src/util/WireObjectSet.ts +++ b/packages/client/src/util/WireObjectSet.ts @@ -27,6 +27,7 @@ const WIRE_OBJECT_SET_TYPES = new Set([ "union", ]); +/** @internal */ export function isWireObjectSet(o: any): o is WireObjectSet { return o != null && typeof o === "object" && WIRE_OBJECT_SET_TYPES.has(o.type); diff --git a/packages/client/src/util/isOntologyObjectV2.ts b/packages/client/src/util/isOntologyObjectV2.ts index e9e879c80..d453d9d1e 100644 --- a/packages/client/src/util/isOntologyObjectV2.ts +++ b/packages/client/src/util/isOntologyObjectV2.ts @@ -16,6 +16,7 @@ import type { OntologyObjectV2 } from "@osdk/internal.foundry"; +/** @internal */ export function isOntologyObjectV2(o: any): o is OntologyObjectV2 { return o && typeof o === "object" && typeof o.__apiName === "string" && o.__primaryKey != null; diff --git a/packages/client/src/util/toDataValue.ts b/packages/client/src/util/toDataValue.ts index 2560e6a68..f1b3563d2 100644 --- a/packages/client/src/util/toDataValue.ts +++ b/packages/client/src/util/toDataValue.ts @@ -26,6 +26,7 @@ import { isWireObjectSet } from "./WireObjectSet.js"; * Marshall user-facing data into the wire DataValue type * * @see DataValue for the expected payloads + * @internal */ export async function toDataValue( value: unknown, diff --git a/packages/client/src/util/toDataValueQueries.ts b/packages/client/src/util/toDataValueQueries.ts index 1f1ad8d5b..2967ce1ff 100644 --- a/packages/client/src/util/toDataValueQueries.ts +++ b/packages/client/src/util/toDataValueQueries.ts @@ -26,6 +26,7 @@ import { isWireObjectSet } from "./WireObjectSet.js"; * Marshall user-facing data into the wire DataValue type * * @see DataValue for the expected payloads + * @internal */ export async function toDataValueQueries( value: unknown, diff --git a/packages/monorepo.tsconfig/base.json b/packages/monorepo.tsconfig/base.json index 34ed4486a..46e2f9df8 100644 --- a/packages/monorepo.tsconfig/base.json +++ b/packages/monorepo.tsconfig/base.json @@ -16,6 +16,7 @@ "strict": true, "skipLibCheck": true, - "resolveJsonModule": true + "resolveJsonModule": true, + "stripInternal": true } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6b232866..e71ce79c6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -651,6 +651,9 @@ importers: tiny-invariant: specifier: ^1.3.1 version: 1.3.3 + type-fest: + specifier: ^4.18.2 + version: 4.18.2 ws: specifier: ^8.18.0 version: 8.18.0 @@ -703,9 +706,6 @@ importers: ts-expect: specifier: ^1.3.0 version: 1.3.0 - type-fest: - specifier: ^4.18.2 - version: 4.18.2 typescript: specifier: ^5.5.2 version: 5.5.2 @@ -718,6 +718,9 @@ importers: '@osdk/api': specifier: workspace:~ version: link:../api + type-fest: + specifier: ^4.18.2 + version: 4.18.2 devDependencies: '@microsoft/api-documenter': specifier: ^7.25.3 @@ -740,9 +743,6 @@ importers: '@types/geojson': specifier: ^7946.0.14 version: 7946.0.14 - type-fest: - specifier: ^4.18.2 - version: 4.18.2 typescript: specifier: ^5.5.2 version: 5.5.2