8000 Quick geohash fix by ssanjay1 · Pull Request #1426 · palantir/osdk-ts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Quick geohash fix #1426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2025
< 8000 /div>
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/flat-shoes-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@osdk/shared.test": patch
"@osdk/client": patch
---

Quick fix for geohash params.
34 changes: 31 additions & 3 deletions packages/client/src/actions/actions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,37 @@ describe.each([
>();

const result = await client(addGeoshape).applyAction({
geoshapeParam:
stubData.actionRequestWithGeoshape.parameters.geoshapeParam,
geohashParam: stubData.actionRequestWithGeoshape.parameters.geohashParam,
geoshapeParam: {
type: "Polygon",
coordinates: [
[
[
-97.86567863752134,
38.418052586871624,
],
[
-97.86567863752134,
35.410223767370525,
],
[
-91.98573135442845,
35.410223767370525,
],
[
-91.98573135442845,
38.418052586871624,
],
[
-97.86567863752134,
38.418052586871624,
],
],
],
},
geohashParam: {
type: "Point",
coordinates: [-79.4382042508868, 40.917859676842255],
},
});

expectTypeOf<typeof result>().toEqualTypeOf<undefined>();
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/util/toDataValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export async function toDataValue(
}

if (isPoint(value)) {
return await toDataValue(value.coordinates.join(""), client);
return await toDataValue(value.coordinates.join(), client);
}

// object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)
Expand Down
6 changes: 3 additions & 3 deletions packages/shared.test/src/stubs/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ export const actionRequestWithStruct: ApplyActionRequestV2 = {
export const actionRequestWithGeoshape: ApplyActionRequestV2 = {
options: { mode: "VALIDATE_AND_EXECUTE", returnEdits: "NONE" },
parameters: {
geohashParam: "-79.4382042508868,40.917859676842255",
geoshapeParam: {
"coordinates": [
coordinates: [
[
[
-97.86567863752134,
Expand All @@ -156,9 +157,8 @@ export const actionRequestWithGeoshape: ApplyActionRequestV2 = {
],
],
],
"type": "Polygon",
type: "Polygon",
},
geohashParam: "-79.4382042508868, 40.917859676842255",
},
};

Expand Down
Loading
0