fms-odata-js 0.3.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/CHANGELOG.md +160 -0
- package/LICENSE +22 -0
- package/README.md +381 -0
- package/dist/batch.d.ts +154 -0
- package/dist/batch.d.ts.map +1 -0
- package/dist/client.d.ts +160 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/containers.d.ts +190 -0
- package/dist/containers.d.ts.map +1 -0
- package/dist/entity.d.ts +149 -0
- package/dist/entity.d.ts.map +1 -0
- package/dist/errors.d.ts +69 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/fms-odata.esm.js +2201 -0
- package/dist/fms-odata.esm.min.js +6 -0
- package/dist/fms-odata.iife.min.js +6 -0
- package/dist/http.d.ts +51 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/metadata.d.ts +85 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/query.d.ts +198 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/scripts.d.ts +114 -0
- package/dist/scripts.d.ts.map +1 -0
- package/dist/types.d.ts +26 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/url.d.ts +49 -0
- package/dist/url.d.ts.map +1 -0
- package/package.json +61 -0
- package/src/batch.ts +477 -0
- package/src/client.ts +268 -0
- package/src/containers.ts +457 -0
- package/src/entity.ts +334 -0
- package/src/errors.ts +134 -0
- package/src/http.ts +190 -0
- package/src/index.ts +81 -0
- package/src/metadata.ts +354 -0
- package/src/query.ts +442 -0
- package/src/scripts.ts +279 -0
- package/src/types.ts +30 -0
- package/src/url.ts +98 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FileMaker script invocation.
|
|
3
|
+
*
|
|
4
|
+
* FMS exposes FileMaker scripts through the OData v4 Action mechanism at a
|
|
5
|
+
* `Script.<ScriptName>` path suffix. Scripts can be invoked at three scopes:
|
|
6
|
+
*
|
|
7
|
+
* POST /<db>/Script.<name> // database-level
|
|
8
|
+
* POST /<db>/<EntitySet>/Script.<name> // entity-set context
|
|
9
|
+
* POST /<db>/<EntitySet>(<key>)/Script.<name> // single-record context
|
|
10
|
+
*
|
|
11
|
+
* Starting with FileMaker Server 2026 (v26), scripts can also be invoked by
|
|
12
|
+
* their immutable FMSID instead of the name:
|
|
13
|
+
*
|
|
14
|
+
* POST /<db>/Script.FMSID:<id> // database-level
|
|
15
|
+
* POST /<db>/<EntitySet>/Script.FMSID:<id> // entity-set context
|
|
16
|
+
* POST /<db>/<EntitySet>(<key>)/Script.FMSID:<id> // single-record context
|
|
17
|
+
*
|
|
18
|
+
* The optional parameter is sent as `{ "scriptParameterValue": "<string>" }`. The
|
|
19
|
+
* response envelope is `{ "scriptResult": "...", "scriptError": "0" }`; a
|
|
20
|
+
* non-zero `scriptError` becomes an `FMScriptError`.
|
|
21
|
+
*
|
|
22
|
+
* @see https://github.com/fsans/fms-odata-spec/blob/main/docs/06-scripts.md
|
|
23
|
+
*/
|
|
24
|
+
import type { FMSOData } from './client.js';
|
|
25
|
+
import type { RequestOptions } from './types.js';
|
|
26
|
+
import { type ODataLiteral } from './url.js';
|
|
27
|
+
/** Script identifier: either by name or by FMSID (v26+). */
|
|
28
|
+
export type ScriptIdentifier = {
|
|
29
|
+
type: 'name';
|
|
30
|
+
name: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'fmsid';
|
|
33
|
+
id: number;
|
|
34
|
+
};
|
|
35
|
+
/** Options accepted by a script invocation. */
|
|
36
|
+
export interface ScriptOptions extends RequestOptions {
|
|
37
|
+
/**
|
|
38
|
+
* Optional script parameter. Serialized to the FMS `scriptParameterValue`
|
|
39
|
+
* field in the request body. If omitted, the body is empty and the script
|
|
40
|
+
* runs with no parameter (FileMaker's `Get(ScriptParameter)` returns empty).
|
|
41
|
+
*/
|
|
42
|
+
parameter?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Result envelope returned by a successful script invocation. A non-zero
|
|
46
|
+
* `scriptError` is promoted to an `FMScriptError` before reaching the caller,
|
|
47
|
+
* so values you receive here always represent success (`scriptError === "0"`).
|
|
48
|
+
*/
|
|
49
|
+
export interface ScriptResult {
|
|
50
|
+
/** Raw value returned by `Exit Script [Text Result: ...]`. */
|
|
51
|
+
scriptResult?: string;
|
|
52
|
+
/** Always `"0"` in a resolved result; non-zero raises `FMScriptError`. */
|
|
53
|
+
scriptError: string;
|
|
54
|
+
/** Full parsed response body, for forward-compatible field access. */
|
|
55
|
+
raw: unknown;
|
|
56
|
+
}
|
|
57
|
+
/** Scope describing where a `ScriptInvoker` is rooted. */
|
|
58
|
+
export interface ScriptScope {
|
|
59
|
+
/** When omitted the script runs at database scope. */
|
|
60
|
+
entitySet?: string;
|
|
61
|
+
/** When present alongside `entitySet`, the script runs at record scope. */
|
|
62
|
+
key?: ODataLiteral;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Low-level handle used internally by `FMSOData#script`, `Query#script`, and
|
|
66
|
+
* `EntityRef#script`. Exposed so advanced callers can build their own
|
|
67
|
+
* invocation paths if needed.
|
|
68
|
+
*/
|
|
69
|
+
export declare class ScriptInvoker {
|
|
70
|
+
/** @internal */ readonly _client: FMSOData;
|
|
71
|
+
readonly entitySet: string | undefined;
|
|
72
|
+
readonly key: ODataLiteral | undefined;
|
|
73
|
+
constructor(client: FMSOData, scope?: ScriptScope);
|
|
74
|
+
/** Build the absolute URL for invoking `name` at this scope. */
|
|
75
|
+
url(name: string): string;
|
|
76
|
+
/** Build the absolute URL for invoking by FMSID at this scope. */
|
|
77
|
+
urlById(fmsid: number): string;
|
|
78
|
+
/** @internal — build URL from a script path segment. */
|
|
79
|
+
private _urlForSegment;
|
|
80
|
+
/** Invoke the script by name. Resolves to a `ScriptResult` on success. */
|
|
81
|
+
run(name: string, opts?: ScriptOptions): Promise<ScriptResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Invoke the script by its immutable FMSID.
|
|
84
|
+
*
|
|
85
|
+
* Requires FileMaker Server 2026+ (v26). Use `db.hasFeature('scriptsByFMSID')`
|
|
86
|
+
* to check before calling.
|
|
87
|
+
*
|
|
88
|
+
* ```ts
|
|
89
|
+
* const result = await db.scriptById(42, { parameter: 'hello' })
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
runById(fmsid: number, opts?: ScriptOptions): Promise<ScriptResult>;
|
|
93
|
+
/** @internal — execute a script POST at the given URL. */
|
|
94
|
+
private _runAtUrl;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Parse the `{ scriptResult, scriptError }` envelope FMS returns from a
|
|
98
|
+
* script action, promoting a non-zero `scriptError` to `FMScriptError`.
|
|
99
|
+
*
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
export declare function parseScriptEnvelope(raw: unknown, request: {
|
|
103
|
+
url: string;
|
|
104
|
+
method: string;
|
|
105
|
+
}): ScriptResult;
|
|
106
|
+
/** @internal — convenience factory used by client/query/entity helpers. */
|
|
107
|
+
export declare function runScriptAtDatabase(client: FMSOData, name: string, opts?: ScriptOptions): Promise<ScriptResult>;
|
|
108
|
+
/** @internal — convenience factory for FMSID-based invocation. */
|
|
109
|
+
export declare function runScriptByIdAtDatabase(client: FMSOData, fmsid: number, opts?: ScriptOptions): Promise<ScriptResult>;
|
|
110
|
+
/** @internal */
|
|
111
|
+
export declare function runScriptAtEntitySet(client: FMSOData, entitySet: string, name: string, opts?: ScriptOptions): Promise<ScriptResult>;
|
|
112
|
+
/** @internal */
|
|
113
|
+
export declare function runScriptAtEntity(client: FMSOData, entitySet: string, key: ODataLiteral, name: string, opts?: ScriptOptions): Promise<ScriptResult>;
|
|
114
|
+
//# sourceMappingURL=scripts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../src/scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;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+
*
|
|
4
|
+
* These are intentionally minimal during M1 and will be expanded in later
|
|
5
|
+
* milestones (query, CRUD, containers, scripts, metadata, batch).
|
|
6
|
+
*/
|
|
7
|
+
export type TokenProvider = string | (() => string | Promise<string>);
|
|
8
|
+
export interface FMSODataOptions {
|
|
9
|
+
/** Base FMS host, e.g. `https://fms.example.com` (no trailing slash). */
|
|
10
|
+
host: string;
|
|
11
|
+
/** FileMaker database (solution) name. */
|
|
12
|
+
database: string;
|
|
13
|
+
/** Bearer token or resolver. */
|
|
14
|
+
token: TokenProvider;
|
|
15
|
+
/** Invoked once on 401 to refresh credentials before a single retry. */
|
|
16
|
+
onUnauthorized?: () => void | Promise<void>;
|
|
17
|
+
/** Injectable fetch implementation (defaults to `globalThis.fetch`). */
|
|
18
|
+
fetch?: typeof globalThis.fetch;
|
|
19
|
+
/** Per-request timeout in milliseconds. */
|
|
20
|
+
timeoutMs?: number;
|
|
21
|
+
}
|
|
22
|
+
/** Common request-level options accepted by every method. */
|
|
23
|
+
export interface RequestOptions {
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;AAEpC,MAAM,WAAW,eAAe;IAC9B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,KAAK,EAAE,aAAa,CAAA;IACpB,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3C,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;IAC/B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB"}
|
package/dist/url.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OData URL encoding helpers.
|
|
3
|
+
*
|
|
4
|
+
* Aligned with `@fms-odata/spec-ts` for the shared helpers (`escapeStringLiteral`,
|
|
5
|
+
* `formatLiteral`). fms-odata-js keeps its richer implementations for
|
|
6
|
+
* `formatDateTime`, `parseDateTime`, `odataEncode`, `buildQueryString`, and
|
|
7
|
+
* `encodePathSegment` which go beyond the spec's minimal versions.
|
|
8
|
+
*
|
|
9
|
+
* - String literals are single-quoted with inner single-quotes doubled.
|
|
10
|
+
* - Dates serialize as UTC ISO-8601 without milliseconds (FileMaker quirk).
|
|
11
|
+
* - Query-string keys are emitted verbatim (always safe ASCII such as `$filter`)
|
|
12
|
+
* while values are percent-encoded via `odataEncode`, which uses `%20`
|
|
13
|
+
* for spaces rather than `+` (required by OData `$filter`) and preserves
|
|
14
|
+
* commas (required by `$select`, `$orderby`, `$expand`).
|
|
15
|
+
*
|
|
16
|
+
* @see https://github.com/fsans/fms-odata-spec/blob/main/docs/13-quirks.md
|
|
17
|
+
*/
|
|
18
|
+
/** Any value that can appear on the right-hand side of an OData `$filter` comparison. */
|
|
19
|
+
export type ODataLiteral = string | number | boolean | Date | null | undefined;
|
|
20
|
+
/** Escape a string for inclusion inside a single-quoted OData literal. */
|
|
21
|
+
export declare function escapeStringLiteral(s: string): string;
|
|
22
|
+
/** Format a `Date` as UTC ISO-8601 without milliseconds (e.g. `2026-04-17T14:45:00Z`). */
|
|
23
|
+
export declare function formatDateTime(d: Date): string;
|
|
24
|
+
/** Parse an OData DateTimeOffset string (with or without milliseconds). */
|
|
25
|
+
export declare function parseDateTime(s: string): Date;
|
|
26
|
+
/** Format a primitive as an OData literal suitable for `$filter`, `$search`, etc. */
|
|
27
|
+
export declare function formatLiteral(v: ODataLiteral): string;
|
|
28
|
+
/** Encode a single URL path segment (spaces become `%20`). */
|
|
29
|
+
export declare function encodePathSegment(s: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Encode an OData query-string value.
|
|
32
|
+
*
|
|
33
|
+
* - Spaces become `%20` (not `+`) — required by OData `$filter`.
|
|
34
|
+
* - Commas stay literal (not `%2C`) — required by `$select`, `$orderby`, `$expand`.
|
|
35
|
+
* - Parentheses stay literal (not `%28`/`%29`) — required by `$apply` expressions
|
|
36
|
+
* such as `aggregate(...)` and `groupby((...))`.
|
|
37
|
+
* - `$`, `=`, and `;` stay literal — required for nested `$expand` options.
|
|
38
|
+
* FileMaker Server rejects percent-encoded forms of these characters.
|
|
39
|
+
*/
|
|
40
|
+
export declare function odataEncode(v: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Build a querystring from ordered `[key, value]` pairs.
|
|
43
|
+
*
|
|
44
|
+
* Keys are emitted verbatim (the caller controls them and they are always safe
|
|
45
|
+
* ASCII such as `$filter`). Values are percent-encoded via `odataEncode`.
|
|
46
|
+
* Empty / nullish values are skipped.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildQueryString(params: ReadonlyArray<readonly [string, string]>): string;
|
|
49
|
+
//# sourceMappingURL=url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../src/url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,yFAAyF;AACzF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;AAE9E,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAK9C;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAM7C;AAED,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,CAYrD;AAED,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ7C;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAOzF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fms-odata-js",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Zero-runtime-dependency TypeScript client for FileMaker Server OData v4 (Web Viewer, browser, Node).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/fms-odata.esm.js",
|
|
7
|
+
"module": "./dist/fms-odata.esm.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/fms-odata.esm.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"src",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"CHANGELOG.md"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "npm run build:types && npm run build:esm && npm run build:min && npm run build:iife",
|
|
25
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
26
|
+
"build:esm": "esbuild src/index.ts --bundle --format=esm --target=es2020 --outfile=dist/fms-odata.esm.js",
|
|
27
|
+
"build:min": "esbuild src/index.ts --bundle --format=esm --target=es2020 --minify --outfile=dist/fms-odata.esm.min.js",
|
|
28
|
+
"build:iife": "esbuild src/index.ts --bundle --format=iife --global-name=FMSODataLib --target=es2017 --minify --outfile=dist/fms-odata.iife.min.js",
|
|
29
|
+
"test": "vitest run",
|
|
30
|
+
"test:unit": "vitest run",
|
|
31
|
+
"test:watch": "vitest",
|
|
32
|
+
"test:e2e": "playwright test",
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
34
|
+
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
35
|
+
"format": "prettier --write .",
|
|
36
|
+
"size": "gzip -c dist/fms-odata.esm.min.js | wc -c",
|
|
37
|
+
"probe": "node scripts/probe.mjs"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"filemaker",
|
|
41
|
+
"fms",
|
|
42
|
+
"odata",
|
|
43
|
+
"rest",
|
|
44
|
+
"web-viewer",
|
|
45
|
+
"typescript"
|
|
46
|
+
],
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"author": "Francesc Sans <tecnic.at.ntwk.es> (nBCN Software, Barcelona — http://www.ntwk.es)",
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=18"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@fms-odata/spec-ts": "^1.1.0",
|
|
54
|
+
"@playwright/test": "^1.47.0",
|
|
55
|
+
"@types/node": "^20.14.0",
|
|
56
|
+
"@vitest/coverage-v8": "^2.0.0",
|
|
57
|
+
"esbuild": "^0.23.0",
|
|
58
|
+
"typescript": "^5.5.0",
|
|
59
|
+
"vitest": "^2.0.0"
|
|
60
|
+
}
|
|
61
|
+
}
|