-
Notifications
You must be signed in to change notification settings - Fork 27
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
🎨 expose listing license checkouts for frontend #6987
Open
matusdrobuliak66
wants to merge
12
commits into
ITISFoundation:master
Choose a base branch
from
matusdrobuliak66:introduce-vip-models-pricing-9-part
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+622
−39
Open
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4790ab3
release seats on issues
matusdrobuliak66 e9dd8e5
Merge branch 'master' into introduce-vip-models-pricing-8-part
matusdrobuliak66 ae14a78
release seats on issues
matusdrobuliak66 1ba77c0
Merge branch 'introduce-vip-models-pricing-8-part' of github.com:matu…
matusdrobuliak66 0d07303
Merge branch 'master' into introduce-vip-models-pricing-8-part
matusdrobuliak66 8b6b38c
Merge branch 'master' into introduce-vip-models-pricing-8-part
matusdrobuliak66 42071a0
add force release of license seats on stop event
matusdrobuliak66 b9036d8
list/get checkouts
matusdrobuliak66 3eb5d61
Merge branch 'master' into introduce-vip-models-pricing-9-part
matusdrobuliak66 53364d0
list/get checkouts
matusdrobuliak66 ad84e9b
Merge branch 'master' into introduce-vip-models-pricing-9-part
matusdrobuliak66 381dcc3
openapi specs
matusdrobuliak66 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 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,57 @@ | ||
""" Helper script to generate OAS automatically | ||
""" | ||
|
||
# pylint: disable=redefined-outer-name | ||
# pylint: disable=unused-argument | ||
# pylint: disable=unused-variable | ||
# pylint: disable=too-many-arguments | ||
|
||
from typing import Annotated | ||
|
||
from _common import as_query | ||
from fastapi import APIRouter, Depends | ||
from models_library.api_schemas_webserver.licensed_items_purchases import ( | ||
LicensedItemPurchaseGet, | ||
) | ||
from models_library.generics import Envelope | ||
from models_library.rest_error import EnvelopedError | ||
from models_library.rest_pagination import Page | ||
from simcore_service_webserver._meta import API_VTAG | ||
from simcore_service_webserver.licenses._exceptions_handlers import _TO_HTTP_ERROR_MAP | ||
from simcore_service_webserver.licenses._licensed_items_checkouts_models import ( | ||
LicensedItemCheckoutPathParams, | ||
LicensedItemsCheckoutsListQueryParams, | ||
) | ||
from simcore_service_webserver.wallets._handlers import WalletsPathParams | ||
|
||
router = APIRouter( | ||
prefix=f"/{API_VTAG}", | ||
tags=[ | ||
"licenses", | ||
], | ||
responses={ | ||
i.status_code: {"model": EnvelopedError} for i in _TO_HTTP_ERROR_MAP.values() | ||
}, | ||
) | ||
|
||
|
||
@router.get( | ||
"/wallets/{wallet_id}/licensed-items-checkouts", | ||
response_model=Page[LicensedItemPurchaseGet], | ||
tags=["wallets"], | ||
) | ||
async def list_licensed_item_checkouts_for_wallet( | ||
_path: Annotated[WalletsPathParams, Depends()], | ||
_query: Annotated[as_query(LicensedItemsCheckoutsListQueryParams), Depends()], | ||
): | ||
... | ||
|
||
|
||
@router.get( | ||
"/licensed-items-checkouts/{licensed_item_checkout_id}", | ||
response_model=Envelope[LicensedItemPurchaseGet], | ||
) | ||
async def get_licensed_item_checkout( | ||
_path: Annotated[LicensedItemCheckoutPathParams, Depends()], | ||
): | ||
... |
This file contains 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 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 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We started renaming these as
_service
instead of_api
, rithg?