@proofkit/fmdapi 5.0.0-beta.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,106 +5,4 @@
5
5
 
6
6
  # Claris FileMaker Data API Client for TypeScript
7
7
 
8
- This package is designed to make working with the FileMaker Data API much easier. Here's just a few key features:
9
-
10
- - Handles token refresh for you automatically
11
- - [Otto](https://ottofms.com/) Data API proxy support
12
- - TypeScript support for easy auto-completion of your fields
13
- - Automated type generation based on layout metadata
14
- - Supports both node and edge runtimes with a customizable token store
15
- - Customizable adapters allow usage even within the [FileMaker WebViewer](https://fm-webviewer-fetch.proofgeist.com/).
16
-
17
- ## Installation
18
-
19
- This library requires zod as a peer depenency and Node 18 or later
20
-
21
- ```sh
22
- npm install @proofgeist/fmdapi zod
23
- ```
24
-
25
- ```sh
26
- yarn add @proofgeist/fmdapi zod
27
- ```
28
-
29
- ## Upgrading to v4
30
-
31
- Version 4 changes the way the client is created to allow for Custom Adapters, but the methods on the client remain the same. If you are using the codegen CLI tool, simply re-run codegen after upgrading to apply the changes.
32
-
33
- ## Quick Start
34
-
35
- > Note: For the best experience, use the [codegen tool](https://github.com/proofgeist/fmdapi/wiki/codegen) to generate layout-specific clients and get autocomplete hints in your IDE with your actual field names. This minimal example just demonstrates the basic setup
36
-
37
- Add the following envnironment variables to your project's `.env` file:
38
-
39
- ```sh
40
- FM_DATABASE=filename.fmp12
41
- FM_SERVER=https://filemaker.example.com
42
-
43
- # if you want to use the OttoFMS Data API Proxy
44
- OTTO_API_KEY=dk_123456...789
45
- # otherwise
46
- FM_USERNAME=admin
47
- FM_PASSWORD=password
48
- ```
49
-
50
- Initialize the client with credentials, depending on your adapter
51
-
52
- ```typescript
53
- // to use the OttoFMS Data API Proxy
54
- import { DataApi, OttoAdapter } from "@proofgeist/fmdapi";
55
- const client = DataApi({
56
- adapter: new OttoAdapter({
57
- auth: { apiKey: process.env.OTTO_API_KEY },
58
- db: process.env.FM_DATABASE,
59
- server: process.env.FM_SERVER,
60
- }),
61
- });
62
- ```
63
-
64
- ```typescript
65
- // to use the raw Data API
66
- import { DataApi, FetchAdapter } from "@proofgeist/fmdapi";
67
- const client = DataApi({
68
- adapter: new FetchAdapter({
69
- auth: {
70
- username: process.env.FM_USERNAME,
71
- password: process.env.FM_PASSWORD,
72
- },
73
- db: process.env.FM_DATABASE,
74
- server: process.env.FM_SERVER,
75
- }),
76
- });
77
- ```
78
-
79
- Then, use the client to query your FileMaker database. [View all available methods here](https://github.com/proofgeist/fmdapi/wiki/methods).
80
-
81
- Basic Example:
82
-
83
- ```typescript
84
- const result = await client.list({ layout: "Contacts" });
85
- ```
86
-
87
- ## TypeScript Support
88
-
89
- The basic client will return the generic FileMaker response object by default. You can also create a type for your exepcted response and get a fully typed response that includes your own fields.
90
-
91
- ```typescript
92
- type TContact = {
93
- name: string;
94
- email: string;
95
- phone: string;
96
- };
97
- const result = await client.list<TContact>({ layout: "Contacts" });
98
- ```
99
-
100
- 💡 TIP: For a more ergonomic TypeScript experience, use the [included codegen tool](https://github.com/proofgeist/fmdapi/wiki/codegen) to generate these types based on your FileMaker layout metadata.
101
-
102
- For full docs, see the [wiki](https://github.com/proofgeist/fmdapi/wiki)
103
-
104
- ## Edge Runtime Support (v3.0+)
105
-
106
- Since version 3.0 uses the native `fetch` API, it is compatible with edge runtimes, but there are some additional considerations to avoid overwhelming your FileMaker server with too many connections. If you are developing for the edge, be sure to implement one of the following strategies:
107
-
108
- - ✅ Use a custom token store (see above) with a persistent storage method such as Upstash
109
- - ✅ Use a proxy such as the [Otto Data API Proxy](https://www.ottofms.com/docs/otto/working-with-otto/proxy-api-keys/data-api) which handles management of the access tokens itself.
110
- - Providing an API key to the client instead of username/password will automatically use the Otto proxy
8
+ For full documentation, see [proofkit.dev/docs/fmdapi](https://proofkit.dev/docs/fmdapi).
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
2
2
  export declare const ZFieldValue: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull, z.ZodUnknown]>;
3
3
  export type FieldValue = z.infer<typeof ZFieldValue>;
4
4
  export declare const ZFieldData: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull, z.ZodUnknown]>>;
@@ -42,7 +42,7 @@ declare const ZScriptResponse: z.ZodObject<{
42
42
  "scriptError.prerequest": z.ZodOptional<z.ZodString>;
43
43
  "scriptResult.presort": z.ZodOptional<z.ZodString>;
44
44
  "scriptError.presort": z.ZodOptional<z.ZodString>;
45
- }, {}, {}>;
45
+ }, z.core.$strip>;
46
46
  export type ScriptResponse = z.infer<typeof ZScriptResponse>;
47
47
  export declare const ZDataInfo: z.ZodObject<{
48
48
  database: z.ZodString;
@@ -51,7 +51,7 @@ export declare const ZDataInfo: z.ZodObject<{
51
51
  totalRecordCount: z.ZodNumber;
52
52
  foundCount: z.ZodNumber;
53
53
  returnedCount: z.ZodNumber;
54
- }, {}, {}>;
54
+ }, z.core.$strip>;
55
55
  export type DataInfo = z.infer<typeof ZDataInfo>;
56
56
  export type CreateParams<U extends GenericPortalData = GenericPortalData> = ScriptParams & {
57
57
  portalData?: UpdatePortalsWithIds<U>;
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { z } from "zod";
4
+ import { z } from "zod/v4";
5
5
  const ZFieldValue = z.union([
6
6
  z.string(),
7
7
  z.number(),
@@ -1 +1 @@
1
- {"version":3,"file":"client-types.js","sources":["../../src/client-types.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const ZFieldValue = z.union([\n z.string(),\n z.number(),\n z.null(),\n z.unknown(),\n]);\nexport type FieldValue = z.infer<typeof ZFieldValue>;\n\nexport const ZFieldData = z.record(z.string(), ZFieldValue);\nexport type FieldData = Record<string, unknown>;\n\nexport type GenericPortalData = {\n [key: string]: {\n [x: string]: string | number | null | unknown;\n };\n};\n\nexport type PortalsWithIds<U extends GenericPortalData = GenericPortalData> = {\n [key in keyof U]: Array<\n U[key] & {\n recordId: string;\n modId: string;\n }\n >;\n};\nexport type UpdatePortalsWithIds<\n U extends GenericPortalData = GenericPortalData,\n> = {\n [key in keyof U]: Array<\n U[key] & {\n recordId: string;\n modId?: string;\n }\n >;\n};\n\nexport type FMRecord<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = {\n fieldData: T;\n recordId: string;\n modId: string;\n portalData: PortalsWithIds<U>;\n};\n\nexport type ScriptParams = {\n script?: string;\n \"script.param\"?: string;\n \"script.prerequest\"?: string;\n \"script.prerequest.param\"?: string;\n \"script.presort\"?: string;\n \"script.presort.param\"?: string;\n timeout?: number;\n};\n\nconst ZScriptResponse = z.object({\n scriptResult: z.string().optional(),\n scriptError: z.string().optional(),\n \"scriptResult.prerequest\": z.string().optional(),\n \"scriptError.prerequest\": z.string().optional(),\n \"scriptResult.presort\": z.string().optional(),\n \"scriptError.presort\": z.string().optional(),\n});\nexport type ScriptResponse = z.infer<typeof ZScriptResponse>;\n\nexport const ZDataInfo = z.object({\n database: z.string(),\n layout: z.string(),\n table: z.string(),\n totalRecordCount: z.number(),\n foundCount: z.number(),\n returnedCount: z.number(),\n});\nexport type DataInfo = z.infer<typeof ZDataInfo>;\n\nexport type CreateParams<U extends GenericPortalData = GenericPortalData> =\n ScriptParams & { portalData?: UpdatePortalsWithIds<U> };\n\nexport type CreateResponse = ScriptResponse & {\n recordId: string;\n modId: string;\n};\n\nexport type UpdateParams<U extends GenericPortalData = GenericPortalData> =\n CreateParams<U> & {\n modId?: number;\n };\n\nexport type UpdateResponse = ScriptResponse & {\n modId: string;\n};\n\nexport type DeleteParams = ScriptParams;\n\nexport type DeleteResponse = ScriptResponse;\n\nexport type RangeParams = {\n offset?: number;\n limit?: number;\n};\nexport type RangeParamsRaw = {\n _offset?: number;\n _limit?: number;\n};\n\nexport type PortalRanges<U extends GenericPortalData = GenericPortalData> =\n Partial<{ [key in keyof U]: RangeParams }>;\n\nexport type PortalRangesParams<\n U extends GenericPortalData = GenericPortalData,\n> = {\n portalRanges?: PortalRanges<U>;\n};\n\nexport type GetParams<U extends GenericPortalData = GenericPortalData> =\n ScriptParams &\n PortalRangesParams<U> & {\n \"layout.response\"?: string;\n dateformats?: \"US\" | \"file_locale\" | \"ISO8601\";\n };\n\nexport type Sort<T extends FieldData = FieldData> = {\n fieldName: keyof T;\n sortOrder?: \"ascend\" | \"descend\" | (string & {});\n};\n\nexport type ListParams<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = GetParams<U> &\n RangeParams & {\n sort?: Sort<T> | Array<Sort<T>>;\n };\n\nexport type ListParamsRaw<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = GetParams<U> &\n RangeParamsRaw & {\n _sort?: Array<Sort<T>>;\n };\n\nexport type GetResponse<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = ScriptResponse & {\n data: Array<FMRecord<T, U>>;\n dataInfo: DataInfo;\n};\nexport type GetResponseOne<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = ScriptResponse & {\n data: FMRecord<T, U>;\n dataInfo: DataInfo;\n};\n\ntype SecondLevelKeys<T> = {\n [K in keyof T]: keyof T[K];\n}[keyof T];\nexport type Query<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = Partial<{\n [key in keyof T]: T[key] extends number ? number | string : string;\n}> &\n Partial<{ [key in SecondLevelKeys<U>]?: string }> & {\n omit?: \"true\";\n };\n\nexport type LayoutMetadataResponse = {\n fieldMetaData: FieldMetaData[];\n portalMetaData: { [key: string]: FieldMetaData[] };\n valueLists?: ValueList[];\n};\nexport type ProductInfoMetadataResponse = {\n name: string;\n dateFormat: string;\n timeFormat: string;\n timeStampFormat: string;\n};\nexport type DatabaseMetadataResponse = {\n databases: Array<{\n name: string;\n }>;\n};\n\nexport type FieldMetaData = {\n name: string;\n type: \"normal\" | \"calculation\" | \"summary\";\n displayType:\n | \"editText\"\n | \"popupList\"\n | \"popupMenu\"\n | \"checkBox\"\n | \"calendar\"\n | \"radioButtons\"\n | \"secureText\";\n result: \"text\" | \"number\" | \"date\" | \"time\" | \"timeStamp\" | \"container\";\n global: boolean;\n autoEnter: boolean;\n fourDigitYear: boolean;\n maxRepeat: number;\n maxCharacters: number;\n notEmpty: boolean;\n numeric: boolean;\n repetitions: number;\n timeOfDay: boolean;\n valueList?: string;\n};\n\ntype ValueList = {\n name: string;\n // TODO need to test type of value list from other file\n type: \"customList\" | \"byField\";\n values: Array<{ value: string; displayValue: string }>;\n};\n\n/**\n * Represents the data returned by a call to the Data API `layouts` endpoint.\n */\nexport type AllLayoutsMetadataResponse = {\n /**\n * A list of `Layout` or `LayoutsFolder` objects.\n */\n layouts: LayoutOrFolder[];\n};\n\n/**\n * Represents a FileMaker layout.\n */\nexport type Layout = {\n /**\n * The name of the layout\n */\n name: string;\n /**\n * If the node is a layout, `table` may contain the name of the table\n * the layout is associated with.\n */\n table: string;\n};\n\n/**\n * Represents a folder of `Layout` or `LayoutsFolder` objects.\n */\nexport type LayoutsFolder = {\n /**\n * The name of the folder\n */\n name: string;\n isFolder: boolean;\n /**\n * A list of the Layout or LayoutsFolder objects in the folder.\n */\n folderLayoutNames?: LayoutOrFolder[];\n};\n\nexport type LayoutOrFolder = Layout | LayoutsFolder;\n\n/**\n * Represents the data returned by a call to the Data API `scripts` endpoint.\n */\nexport type ScriptsMetadataResponse = {\n /**\n * A list of `Layout` or `LayoutsFolder` objects.\n */\n scripts: ScriptOrFolder[];\n};\ntype Script = {\n name: string;\n isFolder: false;\n};\ntype ScriptFolder = {\n name: string;\n isFolder: true;\n folderScriptNames: ScriptOrFolder[];\n};\nexport type ScriptOrFolder = Script | ScriptFolder;\n\nexport type RawFMResponse<T = unknown> = {\n response?: T;\n messages?: [{ code: string }];\n};\n\nexport class FileMakerError extends Error {\n public readonly code: string;\n\n public constructor(code: string, message: string) {\n super(message);\n this.code = code;\n }\n}\n"],"names":[],"mappings":";;;;AAEa,MAAA,cAAc,EAAE,MAAM;AAAA,EACjC,EAAE,OAAO;AAAA,EACT,EAAE,OAAO;AAAA,EACT,EAAE,KAAK;AAAA,EACP,EAAE,QAAQ;AACZ,CAAC;AAGM,MAAM,aAAa,EAAE,OAAO,EAAE,UAAU,WAAW;AAgDlC,EAAE,OAAO;AAAA,EAC/B,cAAc,EAAE,OAAO,EAAE,SAAS;AAAA,EAClC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,2BAA2B,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/C,0BAA0B,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9C,wBAAwB,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5C,uBAAuB,EAAE,OAAO,EAAE,SAAS;AAC7C,CAAC;AAGY,MAAA,YAAY,EAAE,OAAO;AAAA,EAChC,UAAU,EAAE,OAAO;AAAA,EACnB,QAAQ,EAAE,OAAO;AAAA,EACjB,OAAO,EAAE,OAAO;AAAA,EAChB,kBAAkB,EAAE,OAAO;AAAA,EAC3B,YAAY,EAAE,OAAO;AAAA,EACrB,eAAe,EAAE,OAAO;AAC1B,CAAC;AAqNM,MAAM,uBAAuB,MAAM;AAAA,EAGjC,YAAY,MAAc,SAAiB;AAChD,UAAM,OAAO;AAHC;AAId,SAAK,OAAO;AAAA,EAAA;AAEhB;"}
1
+ {"version":3,"file":"client-types.js","sources":["../../src/client-types.ts"],"sourcesContent":["import { z } from \"zod/v4\";\n\nexport const ZFieldValue = z.union([\n z.string(),\n z.number(),\n z.null(),\n z.unknown(),\n]);\nexport type FieldValue = z.infer<typeof ZFieldValue>;\n\nexport const ZFieldData = z.record(z.string(), ZFieldValue);\nexport type FieldData = Record<string, unknown>;\n\nexport type GenericPortalData = {\n [key: string]: {\n [x: string]: string | number | null | unknown;\n };\n};\n\nexport type PortalsWithIds<U extends GenericPortalData = GenericPortalData> = {\n [key in keyof U]: Array<\n U[key] & {\n recordId: string;\n modId: string;\n }\n >;\n};\nexport type UpdatePortalsWithIds<\n U extends GenericPortalData = GenericPortalData,\n> = {\n [key in keyof U]: Array<\n U[key] & {\n recordId: string;\n modId?: string;\n }\n >;\n};\n\nexport type FMRecord<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = {\n fieldData: T;\n recordId: string;\n modId: string;\n portalData: PortalsWithIds<U>;\n};\n\nexport type ScriptParams = {\n script?: string;\n \"script.param\"?: string;\n \"script.prerequest\"?: string;\n \"script.prerequest.param\"?: string;\n \"script.presort\"?: string;\n \"script.presort.param\"?: string;\n timeout?: number;\n};\n\nconst ZScriptResponse = z.object({\n scriptResult: z.string().optional(),\n scriptError: z.string().optional(),\n \"scriptResult.prerequest\": z.string().optional(),\n \"scriptError.prerequest\": z.string().optional(),\n \"scriptResult.presort\": z.string().optional(),\n \"scriptError.presort\": z.string().optional(),\n});\nexport type ScriptResponse = z.infer<typeof ZScriptResponse>;\n\nexport const ZDataInfo = z.object({\n database: z.string(),\n layout: z.string(),\n table: z.string(),\n totalRecordCount: z.number(),\n foundCount: z.number(),\n returnedCount: z.number(),\n});\nexport type DataInfo = z.infer<typeof ZDataInfo>;\n\nexport type CreateParams<U extends GenericPortalData = GenericPortalData> =\n ScriptParams & { portalData?: UpdatePortalsWithIds<U> };\n\nexport type CreateResponse = ScriptResponse & {\n recordId: string;\n modId: string;\n};\n\nexport type UpdateParams<U extends GenericPortalData = GenericPortalData> =\n CreateParams<U> & {\n modId?: number;\n };\n\nexport type UpdateResponse = ScriptResponse & {\n modId: string;\n};\n\nexport type DeleteParams = ScriptParams;\n\nexport type DeleteResponse = ScriptResponse;\n\nexport type RangeParams = {\n offset?: number;\n limit?: number;\n};\nexport type RangeParamsRaw = {\n _offset?: number;\n _limit?: number;\n};\n\nexport type PortalRanges<U extends GenericPortalData = GenericPortalData> =\n Partial<{ [key in keyof U]: RangeParams }>;\n\nexport type PortalRangesParams<\n U extends GenericPortalData = GenericPortalData,\n> = {\n portalRanges?: PortalRanges<U>;\n};\n\nexport type GetParams<U extends GenericPortalData = GenericPortalData> =\n ScriptParams &\n PortalRangesParams<U> & {\n \"layout.response\"?: string;\n dateformats?: \"US\" | \"file_locale\" | \"ISO8601\";\n };\n\nexport type Sort<T extends FieldData = FieldData> = {\n fieldName: keyof T;\n sortOrder?: \"ascend\" | \"descend\" | (string & {});\n};\n\nexport type ListParams<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = GetParams<U> &\n RangeParams & {\n sort?: Sort<T> | Array<Sort<T>>;\n };\n\nexport type ListParamsRaw<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = GetParams<U> &\n RangeParamsRaw & {\n _sort?: Array<Sort<T>>;\n };\n\nexport type GetResponse<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = ScriptResponse & {\n data: Array<FMRecord<T, U>>;\n dataInfo: DataInfo;\n};\nexport type GetResponseOne<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = ScriptResponse & {\n data: FMRecord<T, U>;\n dataInfo: DataInfo;\n};\n\ntype SecondLevelKeys<T> = {\n [K in keyof T]: keyof T[K];\n}[keyof T];\nexport type Query<\n T extends FieldData = FieldData,\n U extends GenericPortalData = GenericPortalData,\n> = Partial<{\n [key in keyof T]: T[key] extends number ? number | string : string;\n}> &\n Partial<{ [key in SecondLevelKeys<U>]?: string }> & {\n omit?: \"true\";\n };\n\nexport type LayoutMetadataResponse = {\n fieldMetaData: FieldMetaData[];\n portalMetaData: { [key: string]: FieldMetaData[] };\n valueLists?: ValueList[];\n};\nexport type ProductInfoMetadataResponse = {\n name: string;\n dateFormat: string;\n timeFormat: string;\n timeStampFormat: string;\n};\nexport type DatabaseMetadataResponse = {\n databases: Array<{\n name: string;\n }>;\n};\n\nexport type FieldMetaData = {\n name: string;\n type: \"normal\" | \"calculation\" | \"summary\";\n displayType:\n | \"editText\"\n | \"popupList\"\n | \"popupMenu\"\n | \"checkBox\"\n | \"calendar\"\n | \"radioButtons\"\n | \"secureText\";\n result: \"text\" | \"number\" | \"date\" | \"time\" | \"timeStamp\" | \"container\";\n global: boolean;\n autoEnter: boolean;\n fourDigitYear: boolean;\n maxRepeat: number;\n maxCharacters: number;\n notEmpty: boolean;\n numeric: boolean;\n repetitions: number;\n timeOfDay: boolean;\n valueList?: string;\n};\n\ntype ValueList = {\n name: string;\n // TODO need to test type of value list from other file\n type: \"customList\" | \"byField\";\n values: Array<{ value: string; displayValue: string }>;\n};\n\n/**\n * Represents the data returned by a call to the Data API `layouts` endpoint.\n */\nexport type AllLayoutsMetadataResponse = {\n /**\n * A list of `Layout` or `LayoutsFolder` objects.\n */\n layouts: LayoutOrFolder[];\n};\n\n/**\n * Represents a FileMaker layout.\n */\nexport type Layout = {\n /**\n * The name of the layout\n */\n name: string;\n /**\n * If the node is a layout, `table` may contain the name of the table\n * the layout is associated with.\n */\n table: string;\n};\n\n/**\n * Represents a folder of `Layout` or `LayoutsFolder` objects.\n */\nexport type LayoutsFolder = {\n /**\n * The name of the folder\n */\n name: string;\n isFolder: boolean;\n /**\n * A list of the Layout or LayoutsFolder objects in the folder.\n */\n folderLayoutNames?: LayoutOrFolder[];\n};\n\nexport type LayoutOrFolder = Layout | LayoutsFolder;\n\n/**\n * Represents the data returned by a call to the Data API `scripts` endpoint.\n */\nexport type ScriptsMetadataResponse = {\n /**\n * A list of `Layout` or `LayoutsFolder` objects.\n */\n scripts: ScriptOrFolder[];\n};\ntype Script = {\n name: string;\n isFolder: false;\n};\ntype ScriptFolder = {\n name: string;\n isFolder: true;\n folderScriptNames: ScriptOrFolder[];\n};\nexport type ScriptOrFolder = Script | ScriptFolder;\n\nexport type RawFMResponse<T = unknown> = {\n response?: T;\n messages?: [{ code: string }];\n};\n\nexport class FileMakerError extends Error {\n public readonly code: string;\n\n public constructor(code: string, message: string) {\n super(message);\n this.code = code;\n }\n}\n"],"names":[],"mappings":";;;;AAEa,MAAA,cAAc,EAAE,MAAM;AAAA,EACjC,EAAE,OAAO;AAAA,EACT,EAAE,OAAO;AAAA,EACT,EAAE,KAAK;AAAA,EACP,EAAE,QAAQ;AACZ,CAAC;AAGM,MAAM,aAAa,EAAE,OAAO,EAAE,UAAU,WAAW;AAgDlC,EAAE,OAAO;AAAA,EAC/B,cAAc,EAAE,OAAO,EAAE,SAAS;AAAA,EAClC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,2BAA2B,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/C,0BAA0B,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9C,wBAAwB,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5C,uBAAuB,EAAE,OAAO,EAAE,SAAS;AAC7C,CAAC;AAGY,MAAA,YAAY,EAAE,OAAO;AAAA,EAChC,UAAU,EAAE,OAAO;AAAA,EACnB,QAAQ,EAAE,OAAO;AAAA,EACjB,OAAO,EAAE,OAAO;AAAA,EAChB,kBAAkB,EAAE,OAAO;AAAA,EAC3B,YAAY,EAAE,OAAO;AAAA,EACrB,eAAe,EAAE,OAAO;AAC1B,CAAC;AAqNM,MAAM,uBAAuB,MAAM;AAAA,EAGjC,YAAY,MAAc,SAAiB;AAChD,UAAM,OAAO;AAHC;AAId,SAAK,OAAO;AAAA,EAAA;AAEhB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proofkit/fmdapi",
3
- "version": "5.0.0-beta.0",
3
+ "version": "5.0.0",
4
4
  "description": "FileMaker Data API client",
5
5
  "repository": "git@github.com:proofgeist/fm-dapi.git",
6
6
  "author": "Eric <37158449+eluce2@users.noreply.github.com>",
@@ -39,17 +39,17 @@
39
39
  "dependencies": {
40
40
  "@standard-schema/spec": "^1.0.0",
41
41
  "@tanstack/vite-config": "^0.2.0",
42
- "chalk": "4.1.2",
43
- "commander": "^9.5.0",
42
+ "chalk": "5.4.1",
43
+ "commander": "^14.0.0",
44
44
  "dotenv": "^16.4.7",
45
45
  "fs-extra": "^11.3.0",
46
- "ts-morph": "^25.0.1",
46
+ "ts-morph": "^26.0.0",
47
47
  "vite": "^6.3.4",
48
- "zod": "4.0.0-beta.20250505T012514"
48
+ "zod": "3.25.64"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/fs-extra": "^11.0.4",
52
- "@types/node": "^22.15.3",
52
+ "@types/node": "^22.15.19",
53
53
  "@typescript-eslint/eslint-plugin": "^8.29.0",
54
54
  "@typescript-eslint/parser": "^8.29.0",
55
55
  "@upstash/redis": "^1.34.6",
@@ -60,7 +60,7 @@
60
60
  "publint": "^0.3.12",
61
61
  "ts-toolbelt": "^9.6.0",
62
62
  "typescript": "^5.8.3",
63
- "vitest": "^3.1.1"
63
+ "vitest": "^3.2.3"
64
64
  },
65
65
  "engines": {
66
66
  "node": ">=18.0.0"
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from "zod/v4";
2
2
 
3
3
  export const ZFieldValue = z.union([
4
4
  z.string(),
@@ -1,17 +0,0 @@
1
- /**
2
- * @type {import("@proofgeist/fmdapi/dist/utils/typegen/types.d.ts").GenerateSchemaOptions}
3
- */
4
- const config = {
5
- clientSuffix: "Layout",
6
- schemas: [
7
- // add your layouts and name schemas here
8
- { layout: "my_layout", schemaName: "MySchema" },
9
-
10
- // repeat as needed for each schema...
11
- // { layout: "my_other_layout", schemaName: "MyOtherSchema" },
12
- ],
13
- // change this value to generate the files in a different directory
14
- path: "schema",
15
- clearOldFiles: true,
16
- };
17
- module.exports = config;
@@ -1,17 +0,0 @@
1
- /**
2
- * @type {import("@proofgeist/fmdapi/dist/utils/typegen/types.d.ts").GenerateSchemaOptions}
3
- */
4
- export const config = {
5
- clientSuffix: "Layout",
6
- schemas: [
7
- // add your layouts and name schemas here
8
- { layout: "my_layout", schemaName: "MySchema" },
9
-
10
- // repeat as needed for each schema...
11
- // { layout: "my_other_layout", schemaName: "MyOtherSchema" },
12
- ],
13
-
14
- // change this value to generate the files in a different directory
15
- path: "schema",
16
- clearOldFiles: true,
17
- };