From 91cfa3afa348ff2dba96a9a6ff228583e95f636b Mon Sep 17 00:00:00 2001 From: ssanjay1 <67482244+ssanjay1@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:06:39 -0500 Subject: [PATCH] URL parsing fixes (#938) * url parsing fixes * add test * add changeset * update default multipass * add more tests * remove console log * refactor endpoint stubs * self review fixes * update OSW * fix lock file and add changeset * fix test url * add test --- .changeset/great-shoes-dream.md | 12 ++ .changeset/popular-forks-knock.md | 8 ++ packages/cli.cmd.typescript/package.json | 4 +- packages/client/package.json | 4 +- packages/client/src/actions/actions.test.ts | 25 ++++ packages/client/src/createClient.test.ts | 42 ++++++ packages/client/src/createMinimalClient.ts | 7 +- packages/client/src/object/object.test.ts | 31 ++++ .../ObjectSetListenerWebsocket.test.ts | 15 +- .../objectSet/ObjectSetListenerWebsocket.ts | 19 ++- packages/foundry-sdk-generator/package.json | 10 +- packages/generator-converters/package.json | 2 +- packages/generator/package.json | 2 +- packages/maker/package.json | 2 +- packages/monorepo.cspell/dict.test-words.txt | 1 + .../oauth/src/AuthorizationServer.test.ts | 72 ++++++++++ .../src/createConfidentialOauthClient.ts | 2 +- packages/oauth/src/createPublicOauthClient.ts | 4 +- packages/oauth/src/utils.ts | 2 +- packages/shared.test/package.json | 8 +- .../src/handlers/actionEndpoints.ts | 10 ++ .../src/handlers/objectSetEndpoints.ts | 72 ++++++---- .../src/handlers/ontologyMetadataEndpoints.ts | 88 ++++++++---- .../src/handlers/util/handleOpenApiCall.ts | 3 +- pnpm-lock.yaml | 136 +++++++++--------- 25 files changed, 430 insertions(+), 151 deletions(-) create mode 100644 .changeset/great-shoes-dream.md create mode 100644 .changeset/popular-forks-knock.md create mode 100644 packages/oauth/src/AuthorizationServer.test.ts diff --git a/.changeset/great-shoes-dream.md b/.changeset/great-shoes-dream.md new file mode 100644 index 000000000..b101fd56a --- /dev/null +++ b/.changeset/great-shoes-dream.md @@ -0,0 +1,12 @@ +--- +"@osdk/foundry-sdk-generator": patch +"@osdk/generator-converters": patch +"@osdk/cli.cmd.typescript": patch +"@osdk/shared.test": patch +"@osdk/generator": patch +"@osdk/client": patch +"@osdk/maker": patch +"@osdk/oauth": patch +--- + +Fixing url parsing for client. diff --git a/.changeset/popular-forks-knock.md b/.changeset/popular-forks-knock.md new file mode 100644 index 000000000..3f2c14765 --- /dev/null +++ b/.changeset/popular-forks-knock.md @@ -0,0 +1,8 @@ +--- +"@osdk/shared.net.platformapi": patch +"@osdk/shared.test": patch +"@osdk/client": patch +"@osdk/oauth": patch +--- + +Fixing URL parsing for custom entry points. diff --git a/packages/cli.cmd.typescript/package.json b/packages/cli.cmd.typescript/package.json index b6cdf8c39..9fa948cc5 100644 --- a/packages/cli.cmd.typescript/package.json +++ b/packages/cli.cmd.typescript/package.json @@ -32,8 +32,8 @@ "@arethetypeswrong/cli": "^0.15.2", "@osdk/cli.common": "workspace:~", "@osdk/generator": "workspace:~", - "@osdk/internal.foundry.core": "2.5.0", - "@osdk/internal.foundry.ontologiesv2": "2.5.0", + "@osdk/internal.foundry.core": "2.6.0-beta.0", + "@osdk/internal.foundry.ontologiesv2": "2.6.0-beta.0", "@osdk/shared.net": "workspace:~", "consola": "^3.2.3", "fast-deep-equal": "^3.1.3", diff --git a/packages/client/package.json b/packages/client/package.json index 6136f0836..25397518d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -35,8 +35,8 @@ "@osdk/api": "workspace:~", "@osdk/client.unstable": "workspace:*", "@osdk/generator-converters": "workspace:*", - "@osdk/internal.foundry.core": "2.5.0", - "@osdk/internal.foundry.ontologiesv2": "2.5.0", + "@osdk/internal.foundry.core": "2.6.0-beta.0", + "@osdk/internal.foundry.ontologiesv2": "2.6.0-beta.0", "@osdk/shared.client": "^1.0.1", "@osdk/shared.client.impl": "workspace:~", "@osdk/shared.client2": "^1.0.0", diff --git a/packages/client/src/actions/actions.test.ts b/packages/client/src/actions/actions.test.ts index 6bd7a04a4..a01f37e9c 100644 --- a/packages/client/src/actions/actions.test.ts +++ b/packages/client/src/actions/actions.test.ts @@ -47,6 +47,7 @@ import { remapActionResponse } from "./applyAction.js"; describe("actions", () => { let client: Client; + let customEntryPointClient: Client; beforeAll(async () => { apiServer.listen(); @@ -55,6 +56,11 @@ describe("actions", () => { $ontologyRid, async () => "myAccessToken", ); + customEntryPointClient = createClient( + "https://stack.palantirCustom.com/foo/first/someStuff", + $ontologyRid, + async () => "myAccessToken", + ); }); afterAll(() => { @@ -124,6 +130,25 @@ describe("actions", () => { `); }); + it("returns validation directly on validateOnly mode, with custom entry point in URL", async () => { + const result = await customEntryPointClient(moveOffice).applyAction({ + officeId: "SEA", + newAddress: "456 Pike Place", + newCapacity: 40, + }, { + $validateOnly: true, + }); + expectTypeOf().toEqualTypeOf(); + + expect(result).toMatchInlineSnapshot(` + { + "parameters": {}, + "result": "INVALID", + "submissionCriteria": [], + } + `); + }); + it("throws on validation errors", async () => { try { const result = await client(moveOffice).applyAction({ diff --git a/packages/client/src/createClient.test.ts b/packages/client/src/createClient.test.ts index f02bdead4..c95452eb6 100644 --- a/packages/client/src/createClient.test.ts +++ b/packages/client/src/createClient.test.ts @@ -15,6 +15,7 @@ */ import { Task } from "@osdk/client.test.ontology"; +import * as SharedClientContext from "@osdk/shared.client.impl"; import { mockFetchResponse, MockOntology } from "@osdk/shared.test"; import type { MockedFunction } from "vitest"; import { beforeEach, describe, expect, it, vi } from "vitest"; @@ -67,4 +68,45 @@ describe(createClient, () => { ]); }); }); + + describe("check url formatting", () => { + it("urls are correctly formatted", async () => { + const spy = vi.spyOn(SharedClientContext, "createSharedClientContext"); + createClient( + "https://mock.com", + MockOntology.metadata.ontologyRid, + async () => "Token", + undefined, + fetchFunction, + ); + expect(spy.mock.calls[0][0]).toBe("https://mock.com/"); + + createClient( + "https://mock1.com/", + MockOntology.metadata.ontologyRid, + async () => "Token", + undefined, + fetchFunction, + ); + expect(spy.mock.calls[1][0]).toBe("https://mock1.com/"); + + createClient( + "https://mock2.com/stuff/first/foo", + MockOntology.metadata.ontologyRid, + async () => "Token", + undefined, + fetchFunction, + ); + expect(spy.mock.calls[2][0]).toBe("https://mock2.com/stuff/first/foo/"); + + createClient( + "https://mock3.com/stuff/first/foo/", + MockOntology.metadata.ontologyRid, + async () => "Token", + undefined, + fetchFunction, + ); + expect(spy.mock.calls[3][0]).toBe("https://mock3.com/stuff/first/foo/"); + }); + }); }); diff --git a/packages/client/src/createMinimalClient.ts b/packages/client/src/createMinimalClient.ts index c2faa72f7..9af12c264 100644 --- a/packages/client/src/createMinimalClient.ts +++ b/packages/client/src/createMinimalClient.ts @@ -56,10 +56,13 @@ export function createMinimalClient( throw new Error(`Invalid stack URL: ${baseUrl}${hint}`); } } - + const processedBaseUrl = new URL(baseUrl); + processedBaseUrl.pathname += processedBaseUrl.pathname.endsWith("/") + ? "" + : "/"; const minimalClient: MinimalClient = { ...createSharedClientContext( - baseUrl, + processedBaseUrl.toString(), tokenProvider, USER_AGENT, fetchFn, diff --git a/packages/client/src/object/object.test.ts b/packages/client/src/object/object.test.ts index 42d7998ad..ea66c4209 100644 --- a/packages/client/src/object/object.test.ts +++ b/packages/client/src/object/object.test.ts @@ -36,6 +36,7 @@ function asV2Object(o: any, includeRid?: boolean) { describe("OsdkObject", () => { describe("link", () => { let client: Client; + let customEntryPointClient: Client; beforeAll(async () => { apiServer.listen(); @@ -44,6 +45,11 @@ describe("OsdkObject", () => { $ontologyRid, async () => "myAccessToken", ); + customEntryPointClient = createClient( + "https://stack.palantirCustom.com/foo/first/someStuff", + $ontologyRid, + async () => "myAccessToken", + ); }); afterAll(() => { @@ -75,6 +81,31 @@ describe("OsdkObject", () => { // it should have the prototype that we assign at hydration time expect(Object.keys(employee.$link.lead)).toBeDefined(); }); + it("loads an employee with custom client", async () => { + const result = await customEntryPointClient(Employee).where({ + employeeId: stubData.employee1.employeeId, + }).fetchPage(); + + // we should get the employee we requested + const employee = result.data[0]; + expect(JSON.stringify(employee)).toBeDefined(); + expect(employee).toMatchObject({ + "$apiName": "Employee", + "$objectType": "Employee", + "$primaryKey": 50030, + "class": "Red", + "employeeId": 50030, + "employeeStatus": expect.anything(), + "fullName": "John Doe", + "office": "NYC", + "startDate": "2019-01-01", + }); + + employee.startDate; + + // it should have the prototype that we assign at hydration time + expect(Object.keys(employee.$link.lead)).toBeDefined(); + }); it("traverses the link from an employee to their lead", async () => { const result = await client(Employee).where({ diff --git a/packages/client/src/objectSet/ObjectSetListenerWebsocket.test.ts b/packages/client/src/objectSet/ObjectSetListenerWebsocket.test.ts index 0832a9456..dbbad184a 100644 --- a/packages/client/src/objectSet/ObjectSetListenerWebsocket.test.ts +++ b/packages/client/src/objectSet/ObjectSetListenerWebsocket.test.ts @@ -45,7 +45,10 @@ import { z } from "zod"; import { createMinimalClient } from "../createMinimalClient.js"; import type { Logger } from "../Logger.js"; import type { MinimalClient } from "../MinimalClientContext.js"; -import { ObjectSetListenerWebsocket } from "./ObjectSetListenerWebsocket.js"; +import { + constructWebsocketUrl, + ObjectSetListenerWebsocket, +} from "./ObjectSetListenerWebsocket.js"; // it needs to be hoisted because its referenced from our mocked WebSocket // which must be hoisted to work @@ -78,7 +81,7 @@ const rootLogger = await vi.hoisted(async (): Promise => { // make local uses of WebSocket typed right const MockedWebSocket = ImportedWebSocket as unknown as MockedWebSocket; -const STACK = "https://stack.palantir.com"; +const STACK = "https://stack.palantirCustom.com/foo/first/someStuff/"; vi.mock("isomorphic-ws", async (importOriginal) => { const original = await importOriginal< @@ -129,7 +132,6 @@ describe("ObjectSetListenerWebsocket", async () => { async () => "myAccessToken", { logger: rootLogger }, ); - client = new ObjectSetListenerWebsocket({ ...minimalClient, logger: rootLogger.child({ oslwInst: oslwInst++ }), @@ -380,6 +382,13 @@ describe("ObjectSetListenerWebsocket", async () => { expect(listener.onChange).not.toHaveBeenCalled(); expect(listener.onError).not.toHaveBeenCalled(); }); + + it("should create url correctly", () => { + expect(constructWebsocketUrl(STACK, "ontologyRid1").toString()) + .toEqual( + "wss://stack.palantircustom.com/foo/first/someStuff/api/v2/ontologySubscriptions/ontologies/ontologyRid1/streamSubscriptions", + ); + }); }); }); }); diff --git a/packages/client/src/objectSet/ObjectSetListenerWebsocket.ts b/packages/client/src/objectSet/ObjectSetListenerWebsocket.ts index a25ed2466..450b19147 100644 --- a/packages/client/src/objectSet/ObjectSetListenerWebsocket.ts +++ b/packages/client/src/objectSet/ObjectSetListenerWebsocket.ts @@ -332,9 +332,8 @@ export class ObjectSetListenerWebsocket { async #ensureWebsocket() { if (this.#ws == null) { const { baseUrl, tokenProvider } = this.#client; - const base = new URL(baseUrl); - const url = - `wss://${base.host}/api/v2/ontologySubscriptions/ontologies/${this.#client.ontologyRid}/streamSubscriptions`; + const url = constructWebsocketUrl(baseUrl, this.#client.ontologyRid); + const token = await tokenProvider(); // tokenProvider is async, there could potentially be a race to create the websocket. @@ -592,3 +591,17 @@ export class ObjectSetListenerWebsocket { } }; } + +/** @internal */ +export function constructWebsocketUrl( + baseUrl: string, + ontologyRid: string | Promise, +) { + const base = new URL(baseUrl); + const url = new URL( + `api/v2/ontologySubscriptions/ontologies/${ontologyRid}/streamSubscriptions`, + base, + ); + url.protocol = url.protocol.replace("https", "wss"); + return url; +} diff --git a/packages/foundry-sdk-generator/package.json b/packages/foundry-sdk-generator/package.json index c69937a21..66c56d0dc 100644 --- a/packages/foundry-sdk-generator/package.json +++ b/packages/foundry-sdk-generator/package.json @@ -33,12 +33,12 @@ "dependencies": { "@osdk/api": "workspace:*", "@osdk/client": "workspace:*", - "@osdk/foundry.core": "2.5.0", - "@osdk/foundry.thirdpartyapplications": "2.5.0", + "@osdk/foundry.core": "2.6.0-beta.0", + "@osdk/foundry.thirdpartyapplications": "2.6.0-beta.0", "@osdk/generator": "workspace:*", - "@osdk/internal.foundry.core": "2.5.0", - "@osdk/internal.foundry.ontologies": "2.5.0", - "@osdk/internal.foundry.ontologiesv2": "2.5.0", + "@osdk/internal.foundry.core": "2.6.0-beta.0", + "@osdk/internal.foundry.ontologies": "2.6.0-beta.0", + "@osdk/internal.foundry.ontologiesv2": "2.6.0-beta.0", "@osdk/shared.net": "workspace:*", "@rollup/plugin-commonjs": "28.0.0", "@rollup/plugin-node-resolve": "15.3.0", diff --git a/packages/generator-converters/package.json b/packages/generator-converters/package.json index da1dd1548..793f3ee5d 100644 --- a/packages/generator-converters/package.json +++ b/packages/generator-converters/package.json @@ -32,7 +32,7 @@ }, "dependencies": { "@osdk/api": "workspace:~", - "@osdk/internal.foundry.core": "2.5.0" + "@osdk/internal.foundry.core": "2.6.0-beta.0" }, "devDependencies": { "@osdk/monorepo.api-extractor": "workspace:~", diff --git a/packages/generator/package.json b/packages/generator/package.json index 13b2abbe4..f409f2f2f 100644 --- a/packages/generator/package.json +++ b/packages/generator/package.json @@ -33,7 +33,7 @@ "dependencies": { "@osdk/api": "workspace:~", "@osdk/generator-converters": "workspace:~", - "@osdk/internal.foundry.core": "2.5.0", + "@osdk/internal.foundry.core": "2.6.0-beta.0", "fast-deep-equal": "^3.1.3", "fetch-retry": "^6.0.0", "prettier": "^3.0.3", diff --git a/packages/maker/package.json b/packages/maker/package.json index 129885cb6..3e913c2e4 100644 --- a/packages/maker/package.json +++ b/packages/maker/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@osdk/client.unstable": "workspace:~", - "@osdk/internal.foundry.core": "2.5.0", + "@osdk/internal.foundry.core": "2.6.0-beta.0", "@osdk/monorepo.api-extractor": "workspace:~", "@osdk/monorepo.tsconfig": "workspace:~", "@osdk/monorepo.tsup": "workspace:~", diff --git a/packages/monorepo.cspell/dict.test-words.txt b/packages/monorepo.cspell/dict.test-words.txt index bfdfc5695..68e0bd731 100644 --- a/packages/monorepo.cspell/dict.test-words.txt +++ b/packages/monorepo.cspell/dict.test-words.txt @@ -9,3 +9,4 @@ unstubAllEnvs interfacers Claused geotimeseries +palantircustom \ No newline at end of file diff --git a/packages/oauth/src/AuthorizationServer.test.ts b/packages/oauth/src/AuthorizationServer.test.ts new file mode 100644 index 000000000..44d503ba0 --- /dev/null +++ b/packages/oauth/src/AuthorizationServer.test.ts @@ -0,0 +1,72 @@ +/* + * Copyright 2024 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + afterAll, + beforeAll, + describe, + expect, + expectTypeOf, + it, +} from "vitest"; + +import { createAuthorizationServer } from "./common.js"; + +describe("Create authorization server", () => { + it("works with old multipass ctx path", () => { + const authServer = createAuthorizationServer( + "/multipass", + "https://stack.palantir.com", + ); + expect(authServer).toEqual({ + token_endpoint: "https://stack.palantir.com/multipass/api/oauth2/token", + authorization_endpoint: + "https://stack.palantir.com/multipass/api/oauth2/authorize", + revocation_endpoint: + "https://stack.palantir.com/multipass/api/oauth2/revoke_token", + issuer: "https://stack.palantir.com/multipass", + }); + }); + + it("works with new multipass ctx path", () => { + const authServer = createAuthorizationServer( + "multipass", + "https://stack.palantir.com", + ); + expect(authServer).toEqual({ + token_endpoint: "https://stack.palantir.com/multipass/api/oauth2/token", + authorization_endpoint: + "https://stack.palantir.com/multipass/api/oauth2/authorize", + revocation_endpoint: + "https://stack.palantir.com/multipass/api/oauth2/revoke_token", + issuer: "https://stack.palantir.com/multipass", + }); + + const authServerCustom = createAuthorizationServer( + "multipass", + "https://stack.palantir.com/foo/first/someStuff", + ); + expect(authServerCustom).toEqual({ + token_endpoint: + "https://stack.palantir.com/foo/first/someStuff/multipass/api/oauth2/token", + authorization_endpoint: + "https://stack.palantir.com/foo/first/someStuff/multipass/api/oauth2/authorize", + revocation_endpoint: + "https://stack.palantir.com/foo/first/someStuff/multipass/api/oauth2/revoke_token", + issuer: "https://stack.palantir.com/foo/first/someStuff/multipass", + }); + }); +}); diff --git a/packages/oauth/src/createConfidentialOauthClient.ts b/packages/oauth/src/createConfidentialOauthClient.ts index 83196f218..6067ff143 100644 --- a/packages/oauth/src/createConfidentialOauthClient.ts +++ b/packages/oauth/src/createConfidentialOauthClient.ts @@ -39,7 +39,7 @@ export function createConfidentialOauthClient( url: string, scopes: string[] = ["api:read-data", "api:write-data"], fetchFn: typeof globalThis.fetch = globalThis.fetch, - ctxPath: string = "/multipass", + ctxPath: string = "multipass", ): ConfidentialOauthClient { const client: Client = { client_id, client_secret }; const authServer = createAuthorizationServer(ctxPath, url); diff --git a/packages/oauth/src/createPublicOauthClient.ts b/packages/oauth/src/createPublicOauthClient.ts index 61844ebbc..06c8ee752 100644 --- a/packages/oauth/src/createPublicOauthClient.ts +++ b/packages/oauth/src/createPublicOauthClient.ts @@ -72,7 +72,7 @@ export interface PublicOauthClientOptions { fetchFn?: typeof globalThis.fetch; /** - * Context path for the authorization server (defaults to "/multipass") + * Context path for the authorization server (defaults to "multipass") */ ctxPath?: string; } @@ -104,7 +104,7 @@ export function createPublicOauthClient( * @param {string} postLoginPage - URL to return to after completed authentication cycle (defaults to `window.location.toString()`) * @param {string[]} scopes - OAuth scopes to request. If not provided, defaults to `["api:read-data", "api:write-data"]` * @param {typeof globalThis.fetch} fetchFn - Custom fetch function to use for requests (defaults to `globalThis.fetch`) - * @param {string} ctxPath - Context path for the authorization server (defaults to "/multipass") + * @param {string} ctxPath - Context path for the authorization server (defaults to "multipass") * @returns {PublicOauthClient} A client that can be used as a token provider */ export function createPublicOauthClient( diff --git a/packages/oauth/src/utils.ts b/packages/oauth/src/utils.ts index 1afdf8b51..a026d6339 100644 --- a/packages/oauth/src/utils.ts +++ b/packages/oauth/src/utils.ts @@ -62,6 +62,6 @@ export function processOptionsAndAssignDefaults( postLoginPage: options.postLoginPage || window.location.toString(), scopes: options.scopes ?? ["api:read-data", "api:write-data"], fetchFn: options.fetchFn ?? globalThis.fetch, - ctxPath: options.ctxPath ?? "/multipass", + ctxPath: options.ctxPath ?? "multipass", }; } diff --git a/packages/shared.test/package.json b/packages/shared.test/package.json index d67f65210..e7297077a 100644 --- a/packages/shared.test/package.json +++ b/packages/shared.test/package.json @@ -31,10 +31,10 @@ }, "dependencies": { "@osdk/api": "workspace:~", - "@osdk/internal.foundry.core": "2.5.0", - "@osdk/internal.foundry.geo": "2.5.0", - "@osdk/internal.foundry.ontologies": "2.5.0", - "@osdk/internal.foundry.ontologiesv2": "2.5.0", + "@osdk/internal.foundry.core": "2.6.0-beta.0", + "@osdk/internal.foundry.geo": "2.6.0-beta.0", + "@osdk/internal.foundry.ontologies": "2.6.0-beta.0", + "@osdk/internal.foundry.ontologiesv2": "2.6.0-beta.0", "fetch-retry": "^6.0.0", "json-stable-stringify": "^1.1.1", "msw": "^2.3.4", diff --git a/packages/shared.test/src/handlers/actionEndpoints.ts b/packages/shared.test/src/handlers/actionEndpoints.ts index ce7e203dc..e85aa3744 100644 --- a/packages/shared.test/src/handlers/actionEndpoints.ts +++ b/packages/shared.test/src/handlers/actionEndpoints.ts @@ -57,6 +57,16 @@ export const actionHandlers: Array = [ handleAction, ), + /** + * Apply an Action with custom URL entrypoint + */ + handleOpenApiCall( + OntologiesV2.Actions.apply, + ["ontologyApiName", "actionType"], + handleAction, + "https://stack.palantirCustom.com/foo/first/someStuff/", + ), + /** * Apply a Batch Action */ diff --git a/packages/shared.test/src/handlers/objectSetEndpoints.ts b/packages/shared.test/src/handlers/objectSetEndpoints.ts index 64d2465b0..9d8fd01fd 100644 --- a/packages/shared.test/src/handlers/objectSetEndpoints.ts +++ b/packages/shared.test/src/handlers/objectSetEndpoints.ts @@ -14,16 +14,21 @@ * limitations under the License. */ -import type { LoadObjectSetResponseV2 } from "@osdk/internal.foundry.core"; +import type { + LoadObjectSetRequestV2, + LoadObjectSetResponseV2, +} from "@osdk/internal.foundry.core"; import * as OntologiesV2 from "@osdk/internal.foundry.ontologiesv2"; import stableStringify from "json-stable-stringify"; -import type { RequestHandler } from "msw"; +import type { HttpResponseResolver, PathParams, RequestHandler } from "msw"; +import type { BaseAPIError } from "../BaseError.js"; import { InvalidRequest } from "../errors.js"; import { filterObjectsProperties } from "../filterObjects.js"; import { aggregationRequestHandlers } from "../stubs/aggregationRequests.js"; import { loadObjectSetRequestHandlers } from "../stubs/objectSetRequest.js"; import { defaultOntology } from "../stubs/ontologies.js"; import { pageThroughResponse } from "./endpointUtils.js"; +import type { ExtractBody } from "./util/handleOpenApiCall.js"; import { handleOpenApiCall, OpenApiCallError, @@ -36,30 +41,14 @@ export const objectSetHandlers: Array = [ handleOpenApiCall( OntologiesV2.OntologyObjectSets.load, ["ontologyApiName"], - async (req) => { - const parsedBody = await req.request.json(); - const selected = parsedBody.select; - const response: LoadObjectSetResponseV2 | undefined = pageThroughResponse( - loadObjectSetRequestHandlers, - parsedBody, - true, - ); - - if ( - (req.params.ontologyApiName === defaultOntology.apiName - || req.params.ontologyApiName === defaultOntology.rid) - && response - ) { - return filterObjectsProperties(response, [...selected], true); - } + handleLoadObjectSet, + ), - throw new OpenApiCallError( - 400, - InvalidRequest( - `Invalid request body: ${JSON.stringify(parsedBody)}`, - ), - ); - }, + handleOpenApiCall( + OntologiesV2.OntologyObjectSets.load, + ["ontologyApiName"], + handleLoadObjectSet, + "https://stack.palantirCustom.com/foo/first/someStuff/", ), /** @@ -83,3 +72,36 @@ export const objectSetHandlers: Array = [ }, ), ]; + +async function handleLoadObjectSet( + req: Parameters< + HttpResponseResolver< + PathParams, + ExtractBody, + LoadObjectSetResponseV2 | BaseAPIError + > + >[0], +) { + const parsedBody = await req.request.json(); + const selected = parsedBody.select; + const response: LoadObjectSetResponseV2 | undefined = pageThroughResponse( + loadObjectSetRequestHandlers, + parsedBody, + true, + ); + + if ( + (req.params.ontologyApiName === defaultOntology.apiName + || req.params.ontologyApiName === defaultOntology.rid) + && response + ) { + return filterObjectsProperties(response, [...selected], true); + } + + throw new OpenApiCallError( + 400, + InvalidRequest( + `Invalid request body: ${JSON.stringify(parsedBody)}`, + ), + ); +} diff --git a/packages/shared.test/src/handlers/ontologyMetadataEndpoints.ts b/packages/shared.test/src/handlers/ontologyMetadataEndpoints.ts index 6c0a0f272..42cc2b372 100644 --- a/packages/shared.test/src/handlers/ontologyMetadataEndpoints.ts +++ b/packages/shared.test/src/handlers/ontologyMetadataEndpoints.ts @@ -16,9 +16,10 @@ import type { OntologyFullMetadata } from "@osdk/internal.foundry.core"; import * as OntologiesV2 from "@osdk/internal.foundry.ontologiesv2"; -import type { RequestHandler } from "msw"; +import type { HttpResponseResolver, PathParams, RequestHandler } from "msw"; import { http as rest, HttpResponse } from "msw"; import invariant from "tiny-invariant"; +import type { BaseAPIError } from "../BaseError.js"; import { ActionNotFoundError, InvalidRequest, @@ -34,6 +35,7 @@ import { fullOntology, } from "../stubs/ontologies.js"; import { authHandlerMiddleware } from "./commonHandlers.js"; +import type { ExtractBody, ExtractResponse } from "./util/handleOpenApiCall.js"; import { handleOpenApiCall, OpenApiCallError, @@ -157,6 +159,17 @@ export const ontologyMetadataEndpoint: Array = [ ); }, ), + handleOpenApiCall( + OntologiesV2.ObjectTypesV2.getFullMetadata, + ["ontologyApiName", "objectTypeApiName"], + async (req) => { + return getObjectDef( + req.params.ontologyApiName, + req.params.objectTypeApiName, + ); + }, + "https://stack.palantirCustom.com/foo/first/someStuff/", + ), handleOpenApiCall( OntologiesV2.ActionTypesV2.get, @@ -237,35 +250,14 @@ export const ontologyMetadataEndpoint: Array = [ handleOpenApiCall( OntologiesV2.OntologyInterfaces.get, ["ontologyApiName", "interfaceType"], - async (req) => { - // will throw if bad name - getOntology(req.params.ontologyApiName as string); - - const interfaceType = req.params.interfaceType; - if (typeof interfaceType !== "string") { - throw new OpenApiCallError( - 400, - InvalidRequest("Invalid parameter objectType"), - ); - } - - if ( - fullOntology.interfaceTypes[req.params.interfaceType] - === undefined - ) { - throw new OpenApiCallError( - 404, - ObjectNotFoundError( - req.params.interfaceType as string, - "", - ), - ); - } + handleInterfaceGet, + ), - return ( - fullOntology.interfaceTypes[req.params.interfaceType] - ); - }, + handleOpenApiCall( + OntologiesV2.OntologyInterfaces.get, + ["ontologyApiName", "interfaceType"], + handleInterfaceGet, + "https://stack.palantirCustom.com/foo/first/someStuff/", ), rest.post( @@ -535,3 +527,41 @@ export const ontologyMetadataEndpoint: Array = [ ), ), ]; + +async function handleInterfaceGet( + req: Parameters< + HttpResponseResolver< + PathParams, + ExtractBody, + ExtractResponse | BaseAPIError + > + >[0], +) { + // will throw if bad name + getOntology(req.params.ontologyApiName as string); + + const interfaceType = req.params.interfaceType; + if (typeof interfaceType !== "string") { + throw new OpenApiCallError( + 400, + InvalidRequest("Invalid parameter objectType"), + ); + } + + if ( + fullOntology.interfaceTypes[interfaceType] + === undefined + ) { + throw new OpenApiCallError( + 404, + ObjectNotFoundError( + req.params.interfaceType as string, + "", + ), + ); + } + + return ( + fullOntology.interfaceTypes[interfaceType] + ); +} diff --git a/packages/shared.test/src/handlers/util/handleOpenApiCall.ts b/packages/shared.test/src/handlers/util/handleOpenApiCall.ts index dd9556f2b..33ea8db57 100644 --- a/packages/shared.test/src/handlers/util/handleOpenApiCall.ts +++ b/packages/shared.test/src/handlers/util/handleOpenApiCall.ts @@ -80,6 +80,7 @@ export function handleOpenApiCall< > >[0], ) => ExtractResponse | Promise>, + baseUrl: string = "https://stack.palantir.com/", ): HttpHandler { let captured: { method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; @@ -107,7 +108,7 @@ export function handleOpenApiCall< blob: () => new Blob(), }; }, - baseUrl: "https://stack.palantir.com/", + baseUrl, }; // we don't care about the promise here, we are just building the url diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb8ecfa17..50cdfcb0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -930,11 +930,11 @@ importers: specifier: workspace:~ version: link:../generator '@osdk/internal.foundry.core': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/internal.foundry.ontologiesv2': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/shared.net': specifier: workspace:~ version: link:../shared.net @@ -1022,11 +1022,11 @@ importers: specifier: workspace:* version: link:../generator-converters '@osdk/internal.foundry.core': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/internal.foundry.ontologiesv2': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/shared.client': specifier: ^1.0.1 version: 1.0.1 @@ -2429,23 +2429,23 @@ importers: specifier: workspace:* version: link:../client '@osdk/foundry.core': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/foundry.thirdpartyapplications': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/generator': specifier: workspace:* version: link:../generator '@osdk/internal.foundry.core': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/internal.foundry.ontologies': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/internal.foundry.ontologiesv2': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/shared.net': specifier: workspace:* version: link:../shared.net @@ -2517,8 +2517,8 @@ importers: specifier: workspace:~ version: link:../generator-converters '@osdk/internal.foundry.core': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 fast-deep-equal: specifier: ^3.1.3 version: 3.1.3 @@ -2563,8 +2563,8 @@ importers: specifier: workspace:~ version: link:../api '@osdk/internal.foundry.core': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 devDependencies: '@osdk/monorepo.api-extractor': specifier: workspace:~ @@ -2641,8 +2641,8 @@ importers: specifier: workspace:~ version: link:../client.unstable '@osdk/internal.foundry.core': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/monorepo.api-extractor': specifier: workspace:~ version: link:../monorepo.api-extractor @@ -2849,17 +2849,17 @@ importers: specifier: workspace:~ version: link:../api '@osdk/internal.foundry.core': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/internal.foundry.geo': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/internal.foundry.ontologies': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 '@osdk/internal.foundry.ontologiesv2': - specifier: 2.5.0 - version: 2.5.0 + specifier: 2.6.0-beta.0 + version: 2.6.0-beta.0 fetch-retry: specifier: ^6.0.0 version: 6.0.0 @@ -4438,8 +4438,8 @@ packages: '@osdk/foundry.core@2.1.0': resolution: {integrity: sha512-9tFOHtkqOWj8JmbLoeGOTpfIofH9YZdX03EohmfZRFcOS8ElOkd/IzzhihYHXr2dpQcfJPizD1EXYTo+Pr2Mpg==} - '@osdk/foundry.core@2.5.0': - resolution: {integrity: sha512-LV+m6/3Y+Q0lN16PAwQvoWtutY0xXdntuwOQjMR2ZqdLRlZOK2KSvfwNZnX4q8EKuvF1mJC8iaTtWh3lChpU1Q==} + '@osdk/foundry.core@2.6.0-beta.0': + resolution: {integrity: sha512-p40EorhoA5ZGNg1gwY6CC9lLWksjgvxHJrxBVRKWNVsM4+dzJ2a7CwcF5fbwUh9wFppO8oo8MQfCAMUWCZM4TQ==} '@osdk/foundry.datasets@2.1.0': resolution: {integrity: sha512-cqQAhiC+w/775SlifFV7yyvlQxMM8VKuRrSgXy93CCyI4W73jWEwS9+/PtKPXVa48T3G9bql8FckaIuwlknQfA==} @@ -4456,8 +4456,8 @@ packages: '@osdk/foundry.functions@2.1.0': resolution: {integrity: sha512-9+GqmbACkaXtPtKBq8dAGlERgV5kbfiosxUSnCTmrZvhful6DigfTDkFnGMJapsyeSEPf62UuSf8zrKlJl8Hhw==} - '@osdk/foundry.geo@2.5.0': - resolution: {integrity: sha512-kL615eqHvn1MkP0le2r6vx/ub+lit5bKdmoWNRELMqi9s2BlLuoKAQW5H9YDQPqhHuJDjrBJAWiviOin9mUKqw==} + '@osdk/foundry.geo@2.6.0-beta.0': + resolution: {integrity: sha512-4heBmmZkg+x2wnwIWkKYnrLVCNOLf+f13GwReAJcu4GtsoNj/sfQ+5HjR3Aqe6JAxw5vM//QDfaLdQ521mOdQA==} '@osdk/foundry.ontologies@2.1.0': resolution: {integrity: sha512-CypiwtfyKXDIJU2S5tKkVuo7KRRIUQ42bWkUX94vDisqIkgJavMjVO+bevAcJ2sOkaGxbx8acjN1g7yOTdj+Wg==} @@ -4474,8 +4474,8 @@ packages: '@osdk/foundry.thirdpartyapplications@2.1.0': resolution: {integrity: sha512-xEu8PNb4f54JF1FgWJ+wJicqWtWMXQbvLXIdpwMLBEv5HtCXySvwYB0QChAhJbDxSfL0HP/e2VGF24VzkRzeKg==} - '@osdk/foundry.thirdpartyapplications@2.5.0': - resolution: {integrity: sha512-AwWRveeTzB8TFK9j1Ys+UD5eifHwawd33RcjySmri5q8Vx7m976H97yqI3yMGcw0iRek6bPVaJiNNiNDKdW1Fw==} + '@osdk/foundry.thirdpartyapplications@2.6.0-beta.0': + resolution: {integrity: sha512-tDiTQiakC1RnkLpSuCdZ6ZJeqB05wA6BBQl35NSvgyOUn/n63kTBi2N0Whrv2Ea+f69eIBs8H2WJJEyX9sa7EQ==} '@osdk/foundry@2.1.0': resolution: {integrity: sha512-F8xKprD8L00pfyreByzyqvTX3q4txEFnXziUW14o1K5Q+dWolUfL79ReRSSTRZ+R7A6yIDd2WZOWb4m9ee58LA==} @@ -4486,8 +4486,8 @@ packages: '@osdk/internal.foundry.core@0.2.0': resolution: {integrity: sha512-+It/huASzz4nK/kNVw+hILo2wapzE2ZfptIiem6iEt19KEQVtw/fqJ2VRGMUEop0Q4+rT3VLHdqkNxq5nSUzdA==} - '@osdk/internal.foundry.core@2.5.0': - resolution: {integrity: sha512-aOuCt066VzLddja67NrZBFB1wCzv/1PFG7w2/lsSlqYbKIYbHeB/qT0GRBqNQmcLTOImF0KC6duEeUOsdWZBnQ==} + '@osdk/internal.foundry.core@2.6.0-beta.0': + resolution: {integrity: sha512-uVQ/JBjFcSkICFiFvZhHoXMGUUhag68/4b+ILT9zhz0zsD0cq9cbHU6nHxZQxlfPoZ1AyA+dAYwTrhacYExzag==} '@osdk/internal.foundry.datasets@0.2.0': resolution: {integrity: sha512-U1adaMni2PDMuF5S5ql4jzRY1drah10besAsO6rO3jkbcP+ISGja14t8161oAjKNiECFYT+CtTNhjyp4E3Xe2w==} @@ -4495,20 +4495,20 @@ packages: '@osdk/internal.foundry.geo@0.1.0': resolution: {integrity: sha512-6NbTIEos7LdderlnDj/kTqFSlAjgZe8gkXAqTYWSipRP6UqKRDPwYeOcnMIR4wHZwNblxGohgY6IELvAM2exoA==} - '@osdk/internal.foundry.geo@2.5.0': - resolution: {integrity: sha512-YVaaOj+yimYCMb3epJvdS/gu+fcdrGy6MyE4GqCBrq/k2HBlO/1Iqed1TVL9PinSl1YdgtOCm2EF7qhX5Lt8Rg==} + '@osdk/internal.foundry.geo@2.6.0-beta.0': + resolution: {integrity: sha512-VlFfeGFCvNaIQUvs6pqBn3qXbBY1ubQ1EiGQzlEwY5rDKRnanuxPyvZCo17CGIH18t/Bt4TvqRIHhzHNHJdKwQ==} '@osdk/internal.foundry.ontologies@0.2.0': resolution: {integrity: sha512-tAJtBupT5VShN9Q7XJ+bsx+3SeTle+l7kRuaYvVkfUvju1yxzHvhmJWyYHbnPpa4fFwZUVclcHI4NwNkbNK9cQ==} - '@osdk/internal.foundry.ontologies@2.5.0': - resolution: {integrity: sha512-WxwpXoodJWBWcHODFRXbZYZNrueF0W3sj5xF8Sn8rHG6bpXE+2jRpLUMvrkLS1JkFFxvWCyxcAEuJ2ldA4gzqg==} + '@osdk/internal.foundry.ontologies@2.6.0-beta.0': + resolution: {integrity: sha512-3H5Lg8SH1Fd0K4M/UXdhK5+rvBm0i40ApUkovZmFnneg/H4k1v5s149Snkhs4SkNFFuYgxh9KedLDPnoslwpvg==} '@osdk/internal.foundry.ontologiesv2@0.2.0': resolution: {integrity: sha512-UUxcwGCfiX1+kvYrWgYxWe1JxttZk7X16XwrRUr8qLKjUTgqLXOvNMq6XtzfytQ7J/nOfbfcjxHBM2LNQwudag==} - '@osdk/internal.foundry.ontologiesv2@2.5.0': - resolution: {integrity: sha512-GEB9Ywjp0HSkNrVcjvORjpXWBvgJmTplySqTlHc256xZSmAcz68smHRLjhGUboUR7NFBc3IL2Oj2BaVGvJBTVw==} + '@osdk/internal.foundry.ontologiesv2@2.6.0-beta.0': + resolution: {integrity: sha512-fiGdAnHqBvGb3ESnV5+UAAXxxlbMMMWRxKzUSg2ZFlKZRoWkEGlVr0hH9XVSa0flaHj97XUQnwRQGhOe6Rggwg==} '@osdk/internal.foundry@0.5.0': resolution: {integrity: sha512-mCxhEnzOkLde+3h7noVi9V+p1gh7kEzwquLXjGRJ2Ad8nDAyCxJRFkLpnzvsfjGHYrzgk2tZIuzjoQ0I7TlGaw==} @@ -4546,8 +4546,8 @@ packages: '@osdk/shared.net.platformapi@0.3.2': resolution: {integrity: sha512-tei6AiSXI7We6dhm7CbyCAAu9ruhAahFmCsLOG4Wwsropyx8uWpH3+f8InB1fxOTSGcaX2Vt2nr7IzEdTuEEgQ==} - '@osdk/shared.net.platformapi@1.1.0': - resolution: {integrity: sha512-386O8rYgxFAmhdwrPydTDTQZPvu7yLc4+kDiW/Xq+EbOzpNPfGR9x/YlCu6Q5YvSPZ4zWv5nApOPCw/nL6TQsg==} + '@osdk/shared.net.platformapi@1.2.0-beta.0': + resolution: {integrity: sha512-6rvYl+CdCXv+2EIAuE0XugNgTybh8N38i0SLitKmDxu4MgGVuCHfBIFo/klRhLx5fLLsmlShBb/F7mPDnY3A/A==} '@osdk/shared.net@1.12.1': resolution: {integrity: sha512-uJE124K3O21A1Of2TdOqMHBfrIYshcDSLr5em4v1vNZZGSsSCYUYGo5vvkS6vzUVDA2xSn/Uf2FgdzX6BWxIhQ==} @@ -10644,12 +10644,12 @@ snapshots: '@osdk/shared.client': 1.0.1 '@osdk/shared.net.platformapi': 0.3.2 - '@osdk/foundry.core@2.5.0': + '@osdk/foundry.core@2.6.0-beta.0': dependencies: - '@osdk/foundry.geo': 2.5.0 + '@osdk/foundry.geo': 2.6.0-beta.0 '@osdk/shared.client': 1.0.1 '@osdk/shared.client2': 1.0.0 - '@osdk/shared.net.platformapi': 1.1.0 + '@osdk/shared.net.platformapi': 1.2.0-beta.0 '@osdk/foundry.datasets@2.1.0': dependencies: @@ -10685,11 +10685,11 @@ snapshots: '@osdk/shared.client': 1.0.1 '@osdk/shared.net.platformapi': 0.3.2 - '@osdk/foundry.geo@2.5.0': + '@osdk/foundry.geo@2.6.0-beta.0': dependencies: '@osdk/shared.client': 1.0.1 '@osdk/shared.client2': 1.0.0 - '@osdk/shared.net.platformapi': 1.1.0 + '@osdk/shared.net.platformapi': 1.2.0-beta.0 '@osdk/foundry.ontologies@2.1.0': dependencies: @@ -10724,12 +10724,12 @@ snapshots: '@osdk/shared.client': 1.0.1 '@osdk/shared.net.platformapi': 0.3.2 - '@osdk/foundry.thirdpartyapplications@2.5.0': + '@osdk/foundry.thirdpartyapplications@2.6.0-beta.0': dependencies: - '@osdk/foundry.core': 2.5.0 + '@osdk/foundry.core': 2.6.0-beta.0 '@osdk/shared.client': 1.0.1 '@osdk/shared.client2': 1.0.0 - '@osdk/shared.net.platformapi': 1.1.0 + '@osdk/shared.net.platformapi': 1.2.0-beta.0 '@osdk/foundry@2.1.0': dependencies: @@ -10757,12 +10757,12 @@ snapshots: '@osdk/shared.client': 1.0.1 '@osdk/shared.net.platformapi': 0.3.2 - '@osdk/internal.foundry.core@2.5.0': + '@osdk/internal.foundry.core@2.6.0-beta.0': dependencies: - '@osdk/internal.foundry.geo': 2.5.0 + '@osdk/internal.foundry.geo': 2.6.0-beta.0 '@osdk/shared.client': 1.0.1 '@osdk/shared.client2': 1.0.0 - '@osdk/shared.net.platformapi': 1.1.0 + '@osdk/shared.net.platformapi': 1.2.0-beta.0 '@osdk/internal.foundry.datasets@0.2.0': dependencies: @@ -10775,11 +10775,11 @@ snapshots: '@osdk/shared.client': 1.0.1 '@osdk/shared.net.platformapi': 0.3.2 - '@osdk/internal.foundry.geo@2.5.0': + '@osdk/internal.foundry.geo@2.6.0-beta.0': dependencies: '@osdk/shared.client': 1.0.1 '@osdk/shared.client2': 1.0.0 - '@osdk/shared.net.platformapi': 1.1.0 + '@osdk/shared.net.platformapi': 1.2.0-beta.0 '@osdk/internal.foundry.ontologies@0.2.0': dependencies: @@ -10787,12 +10787,12 @@ snapshots: '@osdk/shared.client': 1.0.1 '@osdk/shared.net.platformapi': 0.3.2 - '@osdk/internal.foundry.ontologies@2.5.0': + '@osdk/internal.foundry.ontologies@2.6.0-beta.0': dependencies: - '@osdk/internal.foundry.core': 2.5.0 + '@osdk/internal.foundry.core': 2.6.0-beta.0 '@osdk/shared.client': 1.0.1 '@osdk/shared.client2': 1.0.0 - '@osdk/shared.net.platformapi': 1.1.0 + '@osdk/shared.net.platformapi': 1.2.0-beta.0 '@osdk/internal.foundry.ontologiesv2@0.2.0': dependencies: @@ -10800,12 +10800,12 @@ snapshots: '@osdk/shared.client': 1.0.1 '@osdk/shared.net.platformapi': 0.3.2 - '@osdk/internal.foundry.ontologiesv2@2.5.0': + '@osdk/internal.foundry.ontologiesv2@2.6.0-beta.0': dependencies: - '@osdk/internal.foundry.core': 2.5.0 + '@osdk/internal.foundry.core': 2.6.0-beta.0 '@osdk/shared.client': 1.0.1 '@osdk/shared.client2': 1.0.0 - '@osdk/shared.net.platformapi': 1.1.0 + '@osdk/shared.net.platformapi': 1.2.0-beta.0 '@osdk/internal.foundry@0.5.0': dependencies: @@ -10861,7 +10861,7 @@ snapshots: '@osdk/shared.client2': 1.0.0 '@osdk/shared.net.errors': 2.0.0 - '@osdk/shared.net.platformapi@1.1.0': + '@osdk/shared.net.platformapi@1.2.0-beta.0': dependencies: '@osdk/shared.client': 1.0.1 '@osdk/shared.client2': 1.0.0