-
Notifications
You must be signed in to change notification settings - Fork 31
feat: support write conflicts options #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d096fca
feat: implementation along with tests
SoulPancake 32b18f6
feat: support write conflict idempotency
SoulPancake 292c480
fix : tests for default on missing and on dupl
SoulPancake 2a75532
fix: tests fix and ruff fix
SoulPancake 112d178
feat: add readme updates for write conflict changes
SoulPancake 5e4c8bd
feat: changelog and readme changes
SoulPancake d25b2d3
fix: lint errors and update from sdk generator
SoulPancake 6135882
fix: apply suggestions from code review
SoulPancake 647acec
feat: remove API options from readme
SoulPancake aae9ac1
feat: add all changes to tests and client
SoulPancake 7e461d0
feat: address comments, pass settings in opts
SoulPancake 165652b
feat: condense readme text and give options
SoulPancake 2214d45
feat: reformat readme.md
SoulPancake 27521be
feat: minor fmt
SoulPancake 4197704
feat: lint fix add commas
SoulPancake 153261b
fix: value error f string
SoulPancake f0bc591
feat: backward compatibility
SoulPancake 386df2e
Merge branch 'main' into feat/support-write-conflict-options
rhamzeh e531371
Merge branch 'main' into feat/support-write-conflict-options
SoulPancake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| """ | ||
| Python SDK for OpenFGA | ||
|
|
||
| API version: 1.x | ||
| Website: https://openfga.dev | ||
| Documentation: https://openfga.dev/docs | ||
| Support: https://openfga.dev/community | ||
| License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) | ||
|
|
||
| NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. | ||
| """ | ||
|
|
||
| from enum import Enum | ||
|
|
||
|
|
||
| class ClientWriteRequestOnDuplicateWrites(str, Enum): | ||
| ERROR = "error" | ||
| IGNORE = "ignore" | ||
|
|
||
|
|
||
| class ClientWriteRequestOnMissingDeletes(str, Enum): | ||
| ERROR = "error" | ||
| IGNORE = "ignore" | ||
|
|
||
|
|
||
| class ConflictOptions: | ||
| """ | ||
| OpenFGA client write conflict options | ||
| """ | ||
|
|
||
| def __init__( | ||
| self, | ||
| on_duplicate_writes: ClientWriteRequestOnDuplicateWrites | None = None, | ||
| on_missing_deletes: ClientWriteRequestOnMissingDeletes | None = None, | ||
| ) -> None: | ||
| self._on_duplicate_writes = on_duplicate_writes | ||
| self._on_missing_deletes = on_missing_deletes | ||
|
|
||
| @property | ||
| def on_duplicate_writes(self) -> ClientWriteRequestOnDuplicateWrites | None: | ||
| """ | ||
| Return on_duplicate_writes | ||
| """ | ||
| return self._on_duplicate_writes | ||
|
|
||
| @on_duplicate_writes.setter | ||
| def on_duplicate_writes( | ||
| self, | ||
| value: ClientWriteRequestOnDuplicateWrites | None, | ||
| ) -> None: | ||
| """ | ||
| Set on_duplicate_writes | ||
| """ | ||
| self._on_duplicate_writes = value | ||
|
|
||
| @property | ||
| def on_missing_deletes(self) -> ClientWriteRequestOnMissingDeletes | None: | ||
| """ | ||
| Return on_missing_deletes | ||
| """ | ||
| return self._on_missing_deletes | ||
|
|
||
| @on_missing_deletes.setter | ||
| def on_missing_deletes( | ||
| self, | ||
| value: ClientWriteRequestOnMissingDeletes | None, | ||
| ) -> None: | ||
| """ | ||
| Set on_missing_deletes | ||
| """ | ||
| self._on_missing_deletes = value |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.