@ai4b-team/fsaos-gateway-sdk 4.2.2 → 4.3.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/README.md +5 -0
- package/dist/iife/gateway.js +4 -4
- package/dist/iife/gateway.js.map +3 -3
- package/dist/iife/ui.js +1 -1
- package/dist/index.cjs +31 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +31 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,6 +50,11 @@ Rule of thumb: if the answer should differ depending on *who is asking* or *whic
|
|
|
50
50
|
### Gateway Call
|
|
51
51
|
- `gatewayCall(method, params)` — Core RPC dispatcher: `POST /d/{hostname}`
|
|
52
52
|
|
|
53
|
+
### File Uploads
|
|
54
|
+
- `uploadFile(file, { parentPath, name? })` and `useFileUpload()` save a new file item. If its name is taken, the kernel atomically chooses a numbered sibling such as `photo-2.png` and the SDK returns that item's actual ID and path. Retrying the same upload reuses its item.
|
|
55
|
+
- A caller that treats the filename as a fixed address can pass `collisionPolicy: 'fail'` to retain `NAME_TAKEN`. For example, a version snapshot that later reads `version-<id>.json` by exact path must use this policy.
|
|
56
|
+
- Naming and replay are kernel decisions. The SDK makes no list request or client-side retry loop to choose a name.
|
|
57
|
+
|
|
53
58
|
### Public Page Forms
|
|
54
59
|
- `submitForm(capabilityId, fields, options?)` — Submit through the public domain gateway to the form dataset bound to the current published page release. The browser supplies only the declared capability name, current page URL, and field values; it never receives a dataset identity or write credential. This works from the IIFE, ESM, or npm build.
|
|
55
60
|
- `FormSubmissionError` — Includes the stable `fillId`, HTTP status, and error code so an uncertain submission can be retried without creating a second fill.
|