diff --git a/CHANGELOG.md b/CHANGELOG.md index 686068e..78b52f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @proofgeist/fmdapi +## 4.0.2 + +### Patch Changes + +- fix omit type for queries + ## 4.0.1 ### Patch Changes diff --git a/package.json b/package.json index 46640ea..a1831c1 100644 --- a/package.json +++ b/package.json @@ -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": "git@github.com:proofgeist/fm-dapi.git", diff --git a/src/client-types.ts b/src/client-types.ts index d85a349..f5bd9fd 100644 --- a/src/client-types.ts +++ b/src/client-types.ts @@ -205,7 +205,7 @@ export type Query< [key in keyof T]: T[key] | string; }> & Partial<{ [key in SecondLevelKeys]?: string }> & { - omit?: boolean; + omit?: "true"; }; export type LayoutMetadataResponse = { diff --git a/test/client-methods.test.ts b/test/client-methods.test.ts index bfb8443..c9aca09 100644 --- a/test/client-methods.test.ts +++ b/test/client-methods.test.ts @@ -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", () => { @@ -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: {