fms-odata-js 0.3.0 → 0.4.1

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 CHANGED
@@ -5,7 +5,102 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.4.1] — 2026-10-27
9
+
10
+ ### Fixed — Script invocation envelope (#9)
11
+
12
+ `db.script()` / `scriptById()` now match the FileMaker Server OData script
13
+ contract, verified live against FileMaker Server 2026.
14
+
15
+ - **Request field:** the optional `parameter` is sent as
16
+ `{ "scriptParameterValue": ... }` (the only field name FMS accepts; the
17
+ previously documented `scriptParameter` is rejected with code `-1053`).
18
+ The `parameter` option now accepts `string | number | object`.
19
+ - **Nested response envelope (FMS v26+):** FMS 2026 replies with
20
+ `{ "scriptResult": { "code": 0, "resultParameter": "...", "message": "..." } }`.
21
+ The parser now reads this shape: a non-zero `code` throws `FMScriptError`
22
+ with `scriptError = code`, `scriptResult = resultParameter`, and the FMS
23
+ `message` included in the error text. Previously the nested object was
24
+ stringified to `"[object Object]"` and failures were reported as success.
25
+ - **Legacy envelope kept:** the flat `{ "scriptResult": "...", "scriptError": "0" }`
26
+ shape from older FMS versions is still accepted.
27
+ - **Docs:** wiki script pages updated to the `scriptParameterValue` field name
28
+ and the nested envelope; outdated `scriptParameter` references removed.
29
+
30
+
31
+ ### Fixed — DDL and webhook API alignment with real FileMaker Server
32
+
33
+ Verified against a live FileMaker Server 26.0.1 instance and the official
34
+ Claris OData guide. The previous implementations used URL formats that FMS
35
+ rejects; both modules now match the actual server behavior.
36
+
37
+ - **DDL URL format (`schema.ts`):** `addFields`, `deleteTable`, and
38
+ `deleteField` now use the slash-separated URL format
39
+ (`FileMaker_Tables/{table}`) that FMS accepts, instead of the OData
40
+ key-parentheses format (`FileMaker_Tables('{table}')`) which FMS rejects
41
+ with error `-1010` ("entity name must be specified"). The spec docs
42
+ documented the parentheses format, but the live server only accepts the
43
+ slash format for these operations.
44
+ - **Webhook endpoints (`webhooks.ts`):** rewritten to match the official
45
+ Claris OData webhook API:
46
+ - `getAll()` now uses `GET /Webhook.GetAll` (was `POST`).
47
+ - `get(id)` now uses `GET /Webhook.Get({id})` with the id in the URL path
48
+ (was `POST /Webhook.Get` with `{ id }` body).
49
+ - `remove(id)` now uses `POST /Webhook.Delete({id})` with the id in the
50
+ URL path (was `POST /Webhook.Remove` with `{ id }` body). A `delete()`
51
+ alias is provided to match the FMS endpoint name.
52
+ - `invoke(id)` now uses `POST /Webhook.Invoke({id})` with the id in the
53
+ URL path and a required JSON body `{ rowIDs: [...] }` (was `POST
54
+ /Webhook.Invoke` with `{ id }` body). FMS rejects empty bodies.
55
+ - `create()` now returns `{ id: string }` extracted from the FMS response
56
+ `{ webhookResult: { webhookID: N } }` (previously returned the raw
57
+ response and callers had to guess the id field name).
58
+ - All id parameters now accept `string | number` (FMS issues integer IDs).
59
+ - **Integration tests:** added `tests/integration/ddl-webhooks.test.ts`
60
+ covering DDL (create/addFields/index/deleteField/deleteTable) and webhook
61
+ management (create/get/getAll/invoke/remove) against a live FMS. Throwaway
62
+ tables and webhooks are created and cleaned up; production tables are
63
+ never touched.
64
+
65
+ ### Changed — Spec alignment with `@fms-odata/spec-ts` 2.0
66
+
67
+ Bumped the shared spec dependency from `^1.1.0` to `^2.0.1` and aligned the
68
+ client with the v2.0.0 spec overhaul (drop FileMaker 19.x, corrected version
69
+ history, OAuth/Bearer auth).
70
+
71
+ - **Dependency:** `@fms-odata/spec-ts` `^1.1.0` → `^2.0.1`.
72
+ - **Auth:** replaced the deprecated `fmidAuth()` helper (which produced the
73
+ now-removed `FMID …` scheme) with `bearerAuth()` producing `Bearer …`
74
+ headers, matching the spec's `FMOAuthAuthConfig` / `bearerAuth()`. The
75
+ `FMID` scheme is no longer recognized by `resolveAuthHeader`.
76
+ - **Version baseline:** FileMaker 19.x is no longer in the spec. The minimum
77
+ recognized major version is now `'20'` (Claris FileMaker 2023). Version
78
+ detection of a `19.x` server now resolves to `'future'` instead of `'19'`.
79
+ - **Version names:** corrected year mapping — `'21'` → FileMaker 2024,
80
+ `'22'` → FileMaker 2025 (previously 2023 / 2024 respectively).
81
+ - **Webhooks:** the spec now attributes webhooks to v22 (FileMaker 2025)
82
+ rather than v21. Updated doc comments accordingly; runtime feature gating
83
+ is driven by the spec matrix so behavior follows automatically.
84
+ - **`$apply` aggregation:** doc comments updated to FileMaker 2025+ (v22).
85
+ - **Tests:** updated version-detection tests to the new baseline (`'20'`)
86
+ and corrected year-name labels. Fixed pre-existing `possibly 'undefined'`
87
+ type errors in batch/metadata/integration tests so `tsc --noEmit` is clean.
88
+
89
+ ### Added — Schema editing (DDL)
90
+
91
+ - **`SchemaEditor` class** (`src/schema.ts`) with `createTable`, `addFields`, `deleteTable`, `deleteField`, `createIndex`, `deleteIndex` methods, aligned with `@fms-odata/spec-ts` schema types (`FMFieldDefinition`, `CreateTableParams`, `AddFieldsParams`, `FIELD_TYPES`, `parseFieldType`).
92
+ - **Convenience methods on `FMSOData`**: `db.schema()`, `db.createTable()`, `db.addFields()`, `db.deleteTable()`, `db.deleteField()`, `db.createIndex()`, `db.deleteIndex()`.
93
+ - **Field type validation**: field definitions are validated against the spec's `FIELD_TYPES` array before sending.
94
+ - **Destructive op guard**: `deleteTable` and `deleteField` require an explicit `{ confirm: true }` option to prevent accidental data loss.
95
+ - **Spec type re-exports**: `FIELD_TYPES`, `FIELD_DEFAULTS`, `parseFieldType`, `FMFieldType`, `FMFieldDefault`, `FMFieldDefinition`, `CreateTableParams`, `AddFieldsParams` re-exported from the public API.
96
+
97
+ ### Added — Webhook management
98
+
99
+ - **`WebhookManager` class** (`src/webhooks.ts`) with `create`, `remove`, `get`, `getAll`, `invoke` methods, aligned with `@fms-odata/spec-ts` webhook types (`WebhookCreateParams`, `WebhookData`, `WebhookOperation`).
100
+ - **Convenience methods on `FMSOData`**: `db.webhooks()`, `db.createWebhook()`, `db.removeWebhook()`, `db.getWebhook()`, `db.getAllWebhooks()`, `db.invokeWebhook()`.
101
+ - **Legacy `headers` alias**: the `headers` field in `WebhookCreateParams` is automatically mapped to `endpointHeaders` for backward compatibility.
102
+ - **Spec type re-exports**: `WebhookCreateParams`, `WebhookData`, `WebhookOperation` re-exported from the public API.
103
+ - Requires FileMaker Server 2025+ (v22). Use `db.hasFeature('webhooks')` to check.
9
104
 
10
105
  ## [0.3.0] - 2026-06-23
11
106
 
package/README.md CHANGED
@@ -4,15 +4,17 @@
4
4
 
5
5
  **A tiny, type-safe OData v4 client built for FileMaker Server.**
6
6
 
7
- Zero runtime dependencies · ~9.1 KB gzipped · ESM + IIFE · Web Viewer / Browser / Node 18+
7
+ Zero runtime dependencies · ~11.1 KB gzipped · ESM + IIFE · Web Viewer / Browser / Node 18+
8
8
 
9
9
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
10
10
  [![OData](https://img.shields.io/badge/OData-v4-0078D4?logo=data&logoColor=white)](https://www.odata.org/)
11
- [![FileMaker](https://img.shields.io/badge/FileMaker-19.0--26.0-FF6B00?logo=filemaker&logoColor=white)](https://www.claris.com/filemaker/)
12
- [![Bundle](https://img.shields.io/badge/gzip-~9.1%20KB-brightgreen)](#)
11
+ [![FileMaker](https://img.shields.io/badge/FileMaker-20.0--26.0-FF6B00?logo=filemaker&logoColor=white)](https://www.claris.com/filemaker/)
12
+ [![Bundle](https://img.shields.io/badge/gzip-~11.1%20KB-brightgreen)](#)
13
13
  [![Deps](https://img.shields.io/badge/runtime%20deps-0-blue)](#)
14
14
  [![Node](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](#)
15
15
  [![License](https://img.shields.io/badge/license-MIT-black)](./LICENSE)
16
+ [![Spec](https://img.shields.io/badge/spec-fms--odata--spec-FF6B00?logo=filemaker&logoColor=white)](https://github.com/fsans/fms-odata-spec)
17
+ [![Ask DeepWiki](https://img.shields.io/badge/Ask-DeepWiki-6E56CF)](https://deepwiki.com/fsans/fms-odata-js)
16
18
 
17
19
  </div>
18
20
 
@@ -24,60 +26,55 @@ FileMaker Server speaks OData v4, but the spec has sharp corners and FMS has qui
24
26
 
25
27
  > **Battle-tested in production.** I've been using this library heavily to let FileMaker Web Viewer instances talk to the *same* hosted database they live in — and the performance has been genuinely impressive. Queries that used to require round-tripping through scripts and set-field loops now resolve in a single OData call, with noticeably lower latency and a much cleaner code path. If you're building rich Web Viewer UIs backed by FMS, this is the fastest route I've found.
26
28
 
27
- - **Tiny.** ESM and IIFE bundles, zero runtime dependencies, ~9.1 KB gzipped.
29
+ - **Tiny.** ESM and IIFE bundles, zero runtime dependencies, ~11.1 KB gzipped.
28
30
  - **Type-safe.** Fluent, chainable query builder with full TS inference.
29
31
  - **Runs anywhere.** Drop it into a FileMaker Web Viewer, a browser, or Node 18+.
30
32
  - **FMS-aware.** Handles the documented FMS OData deviations for you.
31
- - **Version-aware.** Detects the FileMaker Server major version (19, 21, 22, 26) from `$metadata` and gates features accordingly.
33
+ - **Version-aware.** Detects the FileMaker Server major version (20, 21, 22, 26) from `$metadata` and gates features accordingly.
32
34
  - **Scripts built in.** Invoke FileMaker scripts at database, entity-set, or record scope — by name or by immutable FMSID (v26+).
33
35
  - **Containers built in.** Upload, download, stream, or clear container fields with typed helpers — `Blob`, `ArrayBuffer`, and `Uint8Array` all accepted.
34
36
  - **Aggregations.** `$apply` builder for `aggregate()` and `groupBy()` — server-side sum, average, min, max, count (FMS 2024+).
35
37
  - **Navigation properties.** Full `$ref` CRUD — `getRefs`, `addRef`, `setRef`, `removeRef` for OData relationship links.
36
38
  - **Schema introspection.** `$metadata` parsed into typed `ODataMetadata` with entity types, keys, properties, and actions. Cached by default.
39
+ - **Schema editing (DDL).** Create/delete tables, add/delete fields, create/delete indexes via the `FileMaker_Tables` and `FileMaker_Indexes` system endpoints. Field types validated against the spec; destructive ops guarded by `confirm: true`.
40
+ - **Webhooks.** Create, remove, get, list, and manually invoke webhooks (FMS 2025+ / v22) with typed params and `endpointHeaders` / `queryHeaders` support.
37
41
  - **Batch requests.** `$batch` builder composes multiple reads and atomic changesets (POST / PATCH / DELETE) into a single HTTP round-trip.
38
- - **Multi-auth.** Basic, Bearer, and FMID (FileMaker Cloud / Claris ID) auth with 401 retry, `AbortSignal`, and timeouts built in.
42
+ - **Multi-auth.** Basic and Bearer (OAuth / FileMaker Cloud) auth with 401 retry, `AbortSignal`, and timeouts built in.
39
43
  - **Honest errors.** Every failure becomes a normalized `FMSODataError` (or `FMScriptError` for script failures) with `isFMSODataError` / `isFMScriptError` type guards.
40
44
 
41
45
  ## Status
42
46
 
43
- | Milestone | Scope | State |
44
- | ----------- | ----------------------------------------------------------------- | :---: |
45
- | **M1–M3** | Query builder · collection GET · single-entity CRUD · auth · errors | Done |
46
- | **M4 · 1/4**| Script execution (database / entity-set / record scope) | Done (v0.1.4) |
47
- | **M4 · 2/4**| Containers (binary upload / download / stream) | Done (v0.1.5) |
48
- | **M5** | `$metadata` (schema introspection) | Done |
49
- | **M6** | `$batch` (multipart with changesets) | Done |
50
- | **v0.2.0** | Spec alignment — version detection, `$apply`, FMSID scripts, `$ref`, FMID auth, IIFE build | Done (v0.2.0) |
51
-
52
47
  Full roadmap and changes live in [`CHANGELOG.md`](./CHANGELOG.md).
53
48
 
54
- ## Install
49
+ ## Spec alignment
55
50
 
56
- > **Not yet published to npm.** Until the first release hits the registry, install directly from GitHub or a local checkout.
51
+ This library follows the [`fms-odata-spec`](https://github.com/fsans/fms-odata-spec) reference specification and depends on [`@fms-odata/spec-ts`](https://www.npmjs.com/package/@fms-odata/spec-ts) (as a devDependency, bundled at build time — zero runtime deps) for shared type definitions and the FileMaker Server version feature matrix. Version detection, feature gating, auth schemes, aggregate functions, and error shapes are all sourced from the spec contract so every implementation in the ecosystem stays in lockstep.
57
52
 
58
- From GitHub:
53
+ See [`docs/14-reconciliation.md`](https://github.com/fsans/fms-odata-spec/blob/main/docs/14-reconciliation.md) in the spec repo for the full alignment plan.
54
+
55
+ ## Install
59
56
 
60
57
  ```bash
61
- npm install github:fsans/fms-odata-js
58
+ npm install fms-odata-js
62
59
  ```
63
60
 
64
- From a local clone:
61
+ From GitHub (latest `main`):
65
62
 
66
63
  ```bash
67
- npm install /path/to/fms-odata-js
64
+ npm install github:fsans/fms-odata-js
68
65
  ```
69
66
 
70
- Once published, the canonical install will be:
67
+ From a local clone:
71
68
 
72
69
  ```bash
73
- npm install fms-odata-js
70
+ npm install /path/to/fms-odata-js
74
71
  ```
75
72
 
76
73
  Local dev:
77
74
 
78
75
  ```bash
79
76
  npm install
80
- npm test # 227 unit tests, offline
77
+ npm test # 274 unit tests, offline
81
78
  ```
82
79
 
83
80
  ## Quick start
@@ -92,9 +89,9 @@ const db = new FMSOData({
92
89
  timeoutMs: 15_000,
93
90
  })
94
91
 
95
- // For FileMaker Cloud, use FMID auth instead:
96
- // import { fmidAuth } from 'fms-odata-js'
97
- // token: fmidAuth(clarisIdToken)
92
+ // For FileMaker Cloud, use Bearer auth instead:
93
+ // import { bearerAuth } from 'fms-odata-js'
94
+ // token: bearerAuth(oauthToken)
98
95
 
99
96
  // Collection read
100
97
  const { value, count } = await db
@@ -337,6 +334,83 @@ await db.from('contact').byKey(7).removeRef('addresses', 42)
337
334
  await db.from('order').byKey(100).removeRef('customer') // clears single-valued
338
335
  ```
339
336
 
337
+ ## Schema editing (DDL)
338
+
339
+ Create and delete tables, fields, and indexes via the `FileMaker_Tables` and
340
+ `FileMaker_Indexes` system endpoints. Requires a FileMaker account with full
341
+ access (schema modification) privileges.
342
+
343
+ ```ts
344
+ // Create a table with typed field definitions
345
+ await db.createTable({
346
+ tableName: 'Company',
347
+ fields: [
348
+ { name: 'Company ID', type: 'int', primary: true },
349
+ { name: 'Company Name', type: 'varchar(100)', nullable: false },
350
+ { name: 'Notes', type: 'varchar(2000)', global: true },
351
+ { name: 'Signed Contract', type: 'blob', externalSecurePath: 'ContactMgmt/' },
352
+ ],
353
+ })
354
+
355
+ // Add fields to an existing table
356
+ await db.addFields({
357
+ tableName: 'Company',
358
+ fields: [{ name: 'Phone', type: 'varchar(30)' }],
359
+ })
360
+
361
+ // Create an index on a field
362
+ await db.createIndex('Company', 'Company Name')
363
+
364
+ // Delete an index
365
+ await db.deleteIndex('Company', 'Company Name')
366
+
367
+ // Delete a field (requires confirm: true — irreversible)
368
+ await db.deleteField('Company', 'OldField', { confirm: true })
369
+
370
+ // Delete a table and all its records (requires confirm: true — irreversible)
371
+ await db.deleteTable('OldTable', { confirm: true })
372
+ ```
373
+
374
+ Field types follow the spec: `NUMERIC`, `DECIMAL`, `INT`, `DATE`, `TIME`,
375
+ `TIMESTAMP`, `VARCHAR(n)`, `CHARACTER VARYING`, `BLOB`, `VARBINARY`,
376
+ `LONGVARBINARY`, `BINARY VARYING`. Repetitions in brackets (`INT[4]`), text
377
+ length in parentheses (`VARCHAR(200)`). Destructive operations (`deleteTable`,
378
+ `deleteField`) require an explicit `{ confirm: true }` guard.
379
+
380
+ ## Webhooks
381
+
382
+ Manage FileMaker Server webhooks — requires FMS 2025+ (v22). Use
383
+ `hasFeature('webhooks')` to check before calling.
384
+
385
+ ```ts
386
+ // Create a webhook that fires on record changes in the contact table
387
+ const result = await db.createWebhook({
388
+ webhook: 'https://my.example.com:8080/webhook',
389
+ tableName: 'contact',
390
+ select: 'id,first_name,last_name',
391
+ filter: "status eq 'active'",
392
+ notifySchemaChanges: true,
393
+ maxFailedAttempts: 10,
394
+ })
395
+
396
+ // List all webhooks
397
+ const all = await db.getAllWebhooks()
398
+
399
+ // Get a specific webhook's data
400
+ const data = await db.getWebhook('wh-id')
401
+
402
+ // Manually invoke a webhook (useful for testing)
403
+ await db.invokeWebhook('wh-id')
404
+
405
+ // Remove a webhook
406
+ await db.removeWebhook('wh-id')
407
+ ```
408
+
409
+ The `endpointHeaders` / `queryHeaders` split is supported: `endpointHeaders`
410
+ are sent to the webhook URL without affecting processing, while `queryHeaders`
411
+ control how the payload is generated. The legacy `headers` alias for
412
+ `endpointHeaders` is accepted for backward compatibility.
413
+
340
414
  ## Live integration tests
341
415
 
342
416
  Copy `.env.sample` to `.env` and fill in real FMS credentials:
@@ -369,7 +443,7 @@ FM_LIVE=1 npm test -- tests/integration # full CRUD against real FMS
369
443
  The library ships three bundle formats:
370
444
 
371
445
  - **ESM** (`dist/fms-odata.esm.js`) — for Node, bundlers, and modern browsers
372
- - **ESM minified** (`dist/fms-odata.esm.min.js`) — ~9.1 KB gzipped, production use
446
+ - **ESM minified** (`dist/fms-odata.esm.min.js`) — ~10.6 KB gzipped, production use
373
447
  - **IIFE** (`dist/fms-odata.iife.min.js`) — global `FMSODataLib`, for FileMaker Web Viewer and `<script>` tag inclusion without a bundler
374
448
 
375
449
  ## Contributing
package/dist/client.d.ts CHANGED
@@ -2,8 +2,10 @@ import { Batch } from './batch.js';
2
2
  import { type HttpClientContext, type HttpRequestOptions } from './http.js';
3
3
  import { type MetadataOptions, type ODataMetadata } from './metadata.js';
4
4
  import { Query } from './query.js';
5
+ import { SchemaEditor, type DeleteSchemaOptions, type SchemaOptions } from './schema.js';
5
6
  import { type ScriptOptions, type ScriptResult } from './scripts.js';
6
7
  import type { FMSODataOptions, RequestOptions } from './types.js';
8
+ import { WebhookManager, type WebhookOptions } from './webhooks.js';
7
9
  import { type FMVersionMajor, type FMVersionInfo, type FMFeatureFlags, type FMServerVersion } from '@fms-odata/spec-ts';
8
10
  /**
9
11
  * `FMSOData` is the entrypoint for all OData operations against a FileMaker
@@ -83,7 +85,7 @@ export declare class FMSOData {
83
85
  * `@fms-odata/spec-ts` `parseServerVersion`). The result is cached for the
84
86
  * lifetime of this `FMSOData` instance.
85
87
  *
86
- * Returns the major version string (`'19'`, `'21'`, `'22'`, `'26'`) or
88
+ * Returns the major version string (`'20'`, `'21'`, `'22'`, `'26'`) or
87
89
  * `'future'` if the version is newer than the spec knows about. Returns
88
90
  * `null` if the version cannot be determined (e.g. the metadata lacks the
89
91
  * annotation).
@@ -134,6 +136,49 @@ export declare class FMSOData {
134
136
  * ```
135
137
  */
136
138
  hasFeature(feature: keyof FMFeatureFlags): Promise<boolean>;
139
+ /** @internal */ private _schemaEditor?;
140
+ /**
141
+ * Get a `SchemaEditor` handle for DDL operations (create/delete tables,
142
+ * add/delete fields, create/delete indexes). Requires a FileMaker account
143
+ * with full access privileges.
144
+ *
145
+ * ```ts
146
+ * await db.schema().createTable({ tableName: 'Company', fields: [...] })
147
+ * ```
148
+ */
149
+ schema(): SchemaEditor;
150
+ /** Convenience: create a table. See {@link SchemaEditor#createTable}. */
151
+ createTable(params: import('@fms-odata/spec-ts').CreateTableParams, opts?: SchemaOptions): Promise<unknown>;
152
+ /** Convenience: add fields to a table. See {@link SchemaEditor#addFields}. */
153
+ addFields(params: import('@fms-odata/spec-ts').AddFieldsParams, opts?: SchemaOptions): Promise<unknown>;
154
+ /** Convenience: delete a table (requires `confirm: true`). See {@link SchemaEditor#deleteTable}. */
155
+ deleteTable(tableName: string, opts: DeleteSchemaOptions): Promise<void>;
156
+ /** Convenience: delete a field (requires `confirm: true`). See {@link SchemaEditor#deleteField}. */
157
+ deleteField(tableName: string, fieldName: string, opts: DeleteSchemaOptions): Promise<void>;
158
+ /** Convenience: create an index. See {@link SchemaEditor#createIndex}. */
159
+ createIndex(tableName: string, fieldName: string, opts?: SchemaOptions): Promise<unknown>;
160
+ /** Convenience: delete an index. See {@link SchemaEditor#deleteIndex}. */
161
+ deleteIndex(tableName: string, fieldName: string, opts?: SchemaOptions): Promise<void>;
162
+ /** @internal */ private _webhookManager?;
163
+ /**
164
+ * Get a `WebhookManager` handle for webhook CRUD operations (create, remove,
165
+ * get, getAll, invoke). Requires FileMaker Server 2025+ (v22).
166
+ *
167
+ * ```ts
168
+ * await db.webhooks().create({ webhook: 'https://...', tableName: 'contact' })
169
+ * ```
170
+ */
171
+ webhooks(): WebhookManager;
172
+ /** Convenience: create a webhook. See {@link WebhookManager#create}. */
173
+ createWebhook(params: import('@fms-odata/spec-ts').WebhookCreateParams, opts?: WebhookOptions): Promise<unknown>;
174
+ /** Convenience: delete a webhook by ID. See {@link WebhookManager#remove}. */
175
+ removeWebhook(id: string | number, opts?: WebhookOptions): Promise<unknown>;
176
+ /** Convenience: get a webhook by ID. See {@link WebhookManager#get}. */
177
+ getWebhook(id: string | number, opts?: WebhookOptions): Promise<unknown>;
178
+ /** Convenience: list all webhooks. See {@link WebhookManager#getAll}. */
179
+ getAllWebhooks(opts?: WebhookOptions): Promise<unknown>;
180
+ /** Convenience: manually invoke a webhook by ID. See {@link WebhookManager#invoke}. */
181
+ invokeWebhook(id: string | number, opts?: WebhookOptions): Promise<unknown>;
137
182
  /**
138
183
  * Create a new `$batch` builder for composing multiple OData operations
139
184
  * into a single HTTP round-trip.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAA+B,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACxG,OAAO,EAAmB,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAA;AACzF,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAgD,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AAClH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EAGrB,MAAM,oBAAoB,CAAA;AAE3B;;;;GAIG;AACH,qBAAa,QAAQ;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE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