Sync with InsForge-sdk-js v1.5.1
Ports the API changes from InsForge-sdk-js v1.5.0..v1.5.1 (release: email OTP sign-in; the diff also includes the storage batch-delete feature merged in the same window).
Ported
Auth — passwordless email OTP sign-in (mirrors auth.signInWithOtp / auth.verifyOtp):
client.auth.sign_in_with_otp(email=...)— POST/api/auth/email/send-otp; returns the enumeration-safe generic{success, message}payload (AuthEmailActionResponse).client.auth.verify_otp(email=..., otp=..., name=None)— POST/api/auth/sessions?client_type=serverwithmethod: "otp"set last so it cannot be clobbered; returnsAuthSessionResponse(user + tokens).nameis only applied on first-time passwordless user creation.- New request models
AuthSendOtpRequest/AuthVerifyOtpRequest(pydantic, non-empty field validation), matchingSendOTPRequest/VerifyOtpRequestfrom@insforge/shared-schemas@1.2.1.
Storage — batch object deletion (mirrors the bucket.remove(paths[]) overload):
client.storage.delete_objects(bucket_name, object_keys)— DELETE/api/storage/buckets/{bucket}/objectswith{"keys": [...]}(server limit 1000 keys, not split client-side); returns per-key results.- New models
StorageDeleteObjectResult(status: "deleted" | "notFound" | "failed") andStorageDeleteObjectsResponse, exported frominsforge.storage. Implemented as a separate method rather than a JS-style overload — idiomatic Python, keepsdelete_objectunchanged.
Also: README examples for both features; version bumped 0.1.0 → 0.2.0 (additive feature release; repo maintains version in pyproject.toml, no changelog file exists).
Skipped (JS-only)
@insforge/shared-schemasdependency bump, package.json/lockfile, tsconfig type-test config, CI action bumps — build plumbing with no Python equivalent (schema shapes were ported as pydantic models instead).- SSR
createAuthActions()OTP mirroring — this SDK has no SSR/cookie module. - TS overload/type gymnastics for
remove()and thePasswordSessionRequestnarrowing — the Pythonsign_in_with_passwordsignature already only accepts email/password. - Browser-mode session persistence /
client_type=mobilebehavior inverifyOtp— this SDK is stateless server-side and usesclient_type=server, consistent withsign_in_with_password/verify_email.
Tests
Added 6 tests following existing patterns (request capture via fake http_client.request): OTP send payload/endpoint, verify payload with method: "otp" + session response, optional-name omission + 401 → InsforgeAuthError, empty-field validation, batch delete endpoint/payload/per-key results, and oversized-batch error passthrough (single request, no client-side splitting).
pytest tests -q (Python 3.12): 91 passed, 15 skipped (skips are pre-existing integration tests requiring a live backend).
🤖 Generated with Claude Code
Summary by cubic
Sync with InsForge-sdk-js v1.5.1 to add passwordless email OTP sign-in and batch storage object deletion. Docs updated and version bumped to 0.2.0.
- New Features
- Auth:
auth.sign_in_with_otp(email)andauth.verify_otp(email, otp, name=None)for OTP-based sign-in; enumeration-safe send response; sessions created withclient_type=server. - Storage:
storage.delete_objects(bucket_name, object_keys)deletes up to 1000 objects in one call; returns per-key status (deleted|notFound|failed); exportsStorageDeleteObjectResultandStorageDeleteObjectsResponse.
- Auth: