Skip to content

Commit

Permalink
fix omit type in queries
Browse files Browse the repository at this point in the history
  • Loading branch information
eluce2 committed Aug 20, 2024
1 parent eef6662 commit b5f2b98
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @proofgeist/fmdapi

## 4.0.2

### Patch Changes

- fix omit type for queries

## 4.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@proofgeist/fmdapi",
"version": "4.0.1",
"version": "4.0.2",
"description": "FileMaker Data API client",
"main": "dist/index.js",
"repository": "[email protected]:proofgeist/fm-dapi.git",
Expand Down
2 changes: 1 addition & 1 deletion src/client-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export type Query<
[key in keyof T]: T[key] | string;
}> &
Partial<{ [key in SecondLevelKeys<U>]?: string }> & {
omit?: boolean;
omit?: "true";
};

export type LayoutMetadataResponse = {
Expand Down
7 changes: 6 additions & 1 deletion test/client-methods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ describe("find methods", () => {

expect(Array.isArray(resp.data)).toBe(false);
});
it("find with omit", async () => {
await layoutClient.find<{ anything: string }>({
query: { anything: "anything", omit: "true" },
});
});
});

describe("portal methods", () => {
Expand Down Expand Up @@ -67,7 +72,7 @@ describe("portal methods", () => {
},
});
});
it.only("should handle portal methods with strange names", async () => {
it("should handle portal methods with strange names", async () => {
const { data } = await weirdPortalClient.list({
limit: 1,
portalRanges: {
Expand Down

0 comments on commit b5f2b98

Please sign in to comment.