Repository navigation
feat(v3): call Cbox ID's /v1 API on api_url, additively - #4
Merged
Merged
Conversation
- api_url on every management client: the same methods call their /v1 route (generated from the vendored openapi/openapi.json), with parents moved into the query or body; /v1 objects, list envelope, RFC 9457 problems and approval holds come back as the same types. - CboxIdConfig.api_url / PipesClient(api_url=...): manifest push to /v1/app-manifests, Pipes leases to /v1/pipe-leases. - OrganizationClient (WorkspaceClient under its new name), cbid_org_ keys. - raw_id/same_id/is_prefixed_id; check_permissions accepts prefixed ids. - current_event_name/legacy_event_name/event_name_aliases/same_event for the old and id.* event names. Without api_url every call is unchanged. Claude-Session: https://claude.ai/code/session_01SQE6nwK41XrC5Hp76p7k9Y
Without api_url the approval parsing is exactly what 0.12.0 did. Claude-Session: https://claude.ai/code/session_01SQE6nwK41XrC5Hp76p7k9Y
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.
Supports Cbox ID v3 without changing anything for a client that sets nothing new.
api_urlon every management client (EnvironmentClient(api_url="https://api.cboxid.com", …)): same methods,/v1routes. Routes are generated from the vendoredopenapi/openapi.jsonby action name (OperationSpec.v1); parents that/v1takes in the query or body are moved there./v1objects, the list envelope, RFC 9457 problems andobject: "approval"holds come back as the sameApiResponse/CboxIdApiError/ approval flow.platform.workspaces.createand.set_statushave no/v1route and are refused onapi_url.CboxIdConfig.api_url: manifest push to/v1/app-manifests, Pipes leases to/v1/pipe-leases(provider in the body).OrganizationClient:WorkspaceClientunder its new name;client.organizationisclient.workspace; takescbid_org_…keys.raw_id,same_id,is_prefixed_id;check_permissionsaccepts prefixed ids for the raw ones asked.current_event_name,legacy_event_name,event_name_aliases,same_event(user.loginisid.user.signed_in).Gate:
ruff check .,ruff format --check .,mypy,pytest(306 passed),generate_management --checkfresh. New tests intests/test_id_v3.py; the 268 existing tests pass unchanged. Not released.https://claude.ai/code/session_01SQE6nwK41XrC5Hp76p7k9Y