notte-sdk 1.10.5 → 1.10.6
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 -2
- package/dist/index.d.mts +786 -42
- package/dist/index.d.ts +786 -42
- package/dist/index.js +60 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -4
- package/dist/index.mjs.map +1 -1
- package/dist/proxy/core.js +6 -0
- package/dist/proxy/core.js.map +1 -1
- package/dist/proxy/core.mjs +6 -0
- package/dist/proxy/core.mjs.map +1 -1
- package/dist/proxy/next.js +6 -0
- package/dist/proxy/next.js.map +1 -1
- package/dist/proxy/next.mjs +6 -0
- package/dist/proxy/next.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -640,7 +640,10 @@ await fn.deleteSchedule();
|
|
|
640
640
|
const runs = await fn.runs(); // all runs, including completed ones
|
|
641
641
|
const functions = await notte.functions.list();
|
|
642
642
|
|
|
643
|
-
await fn.
|
|
643
|
+
await fn.updateMetadata({ deletion_protected: true }); // refuse deletes until turned off
|
|
644
|
+
await fn.updateMetadata({ deletion_protected: false });
|
|
645
|
+
|
|
646
|
+
await fn.delete({ confirm: true }); // permanent, so it must be confirmed
|
|
644
647
|
```
|
|
645
648
|
|
|
646
649
|
`run()` waits at most 300 s by default; pass `timeoutMs` to change it. A failed
|
|
@@ -651,7 +654,7 @@ run throws `FailedToRunCloudFunctionError` unless `raiseOnFailure: false`.
|
|
|
651
654
|
- `run(variables?, options?)` - Stream logs and wait for completion; use `stream: false` for the backend's JSON response without live logs. Options: `runtime`, `functionRunId`, `onLog`, `raiseOnFailure`, `timeoutMs`
|
|
652
655
|
- `get(options?)` - Function metadata, versions and download link
|
|
653
656
|
- `update(options)` / `updateMetadata(body)` - Upload a new version / change name, description
|
|
654
|
-
- `delete()` - Delete the function
|
|
657
|
+
- `delete({ confirm: true })` - Delete the function; throws without `confirm`
|
|
655
658
|
- `setSchedule(body)` / `deleteSchedule()` - Manage the cron schedule
|
|
656
659
|
- `rollback(options)` - Roll back to a previous version
|
|
657
660
|
- `runs(options?)` - List runs (all runs by default, `only_active: true` for active ones)
|