@sinch/functions-runtime 0.4.19 → 0.5.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 +6 -2
- package/dist/bin/sinch-runtime.js +34 -1984
- package/dist/bin/sinch-runtime.js.map +1 -1
- package/dist/chunk-KKZKLUQ5.js +44611 -0
- package/dist/chunk-KKZKLUQ5.js.map +1 -0
- package/dist/index.d.ts +21 -1
- package/dist/index.js +98 -3786
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -134,16 +134,20 @@ export async function ice(context, event) {
|
|
|
134
134
|
| `dice` | Disconnected Call Event - call ended | None |
|
|
135
135
|
| `notify` | Notification events | None |
|
|
136
136
|
|
|
137
|
+
`ace`, `pie`, `dice`, and `notify` are optional — the platform may call them even if your function doesn't implement a handler, and the runtime returns `200` for those unimplemented callbacks (only `ice` is required).
|
|
138
|
+
|
|
139
|
+
Type callback data with `IceCallback` / `AceCallback` / `PieCallback` / `DiceCallback` / `NotifyCallback` — these match what your handler receives (the runtime delivers `callId`, not the raw API's `callid`).
|
|
140
|
+
|
|
137
141
|
## TypeScript Support
|
|
138
142
|
|
|
139
143
|
Full TypeScript support with comprehensive types:
|
|
140
144
|
|
|
141
145
|
```typescript
|
|
142
|
-
import type { FunctionContext,
|
|
146
|
+
import type { FunctionContext, IceCallback, SvamletResponse } from '@sinch/functions-runtime';
|
|
143
147
|
|
|
144
148
|
export async function ice(
|
|
145
149
|
context: FunctionContext,
|
|
146
|
-
event:
|
|
150
|
+
event: IceCallback
|
|
147
151
|
): Promise<SvamletResponse> {
|
|
148
152
|
// Full type safety and IntelliSense!
|
|
149
153
|
}
|