Repository navigation
Feature flags, FGA and Pipes leases - #3
Merged
Merged
Conversation
- feature_flags()/has_feature() and CboxUser.feature_flags / has_feature() from the feature_flags claim; FEATURE_FLAGS_SCOPE. - Management clients regenerated from the wave-10 specs (feature flag evaluation, FGA, pipes, radar, SMS settings, HRIS directories). The generator folds an action that is also a namespace (fga.check.batch -> fga.check_batch). fga_tuple() for the batch notation. - client.pipes.lease_token() / PipesClient with typed refusals carrying connect_url and retry_after; pipe_connect_url() and CboxIdClient.pipe_connect_url().
The batch check is its own action now, so the generator's namespace folding is gone. An action whose own answer is 202 documents it as oneOf its body and the approval body; the generator reads that branch, so directories.sync returns its Directory.
…r organization - Vendored environment spec from cbox-id main (aa419d1b): environment sign-in methods (signin.social update/enable/disable/inherit/offered), branding appearance with data-URI logo and favicon. - FrontendClient.config(organization=...) and FrontendConfig.methods. - 0.11.0 in pyproject.toml and the changelog.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds SDK support for the Cbox ID wave-10 features (laravel-id 1.24).
Feature flags
feature_flags(source)/has_feature(source, key),CboxUser.feature_flagsandCboxUser.has_feature(key)(None= scope not requested,[]= nothing on).FEATURE_FLAGS_SCOPE.env.feature_flags.evaluate({"user_id": ..., "organization_id": ...})via the regenerated management client.Fine-grained authorization
env.fga:check,check_batch(sent aschecks[]=),tuples.write/delete/list,resources.list,subjects.list,schema.get/update/validate, withconsistency_tokenon the reads.fga_tuple()writes thedocument:readme#viewer@user:alicenotation from the same mappingtuples.writetakes.202 Accepted(directories.sync) is documented asoneOfits body and the approval body; the generator reads the non-approval branch, soenv.directories.sync()returns the directory.Pipes
client.pipes.lease_token(provider, user_id=..., purpose=...)with a client-credentialsvault.leasetoken the client obtains and caches until shortly before expiry.PipesClient(issuer, access_token)for a token you already hold (e.g. one issued for the person).PipeLeaseError:PipeNotConnectedError/PipeReauthorizationRequiredErrorwithconnect_urlandconnect_url_with(client_id=, return_to=),PipeTemporarilyUnavailableErrorwithretry_after,PipeLeaseDeniedError.client.pipe_connect_url(provider, return_to)andpipe_connect_url()for the hosted connect page.The Python
FrontendClientdoes not wrap the embedded sign-in calls, so there is no SMS-factor surface to add here.Vendored
openapi/account.yamlandopenapi/environment.yamlare copied from cbox-idwave-10(6b373319, where the batch check is its own action,fga.check_batch); the surface snapshot only gains lines.Gate:
ruff check .,ruff format --check .,mypy(strict),pytest(235 passed),python -m scripts.generate_management --check.