feat: support write conflicts options by SoulPancake · Pull Request #237 · openfga/python-sdk

Description

Closes #235

This is generated from openfga/sdk-generator#643
But there are some lint fixes in the sdk using ruff, which are not in sync right now with the generator.

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • New Features

    • Added conflict options for write operations to control behavior when duplicates are written or non-existent tuples are deleted. Configure on_duplicate (ERROR/IGNORE) and on_missing (ERROR/IGNORE) to govern write-operation semantics. Requires OpenFGA server v1.10.0 or later.
  • Documentation

    • Updated API documentation with idempotency controls and conflict-handling guidance, including transaction rollback semantics and option precedence rules.