Saving current progress with change from using Query() to Path()
This commit is contained in:
@@ -97,7 +97,7 @@ async def get_activity_log_obj_li(
|
||||
|
||||
@router.get('/activity_log/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_activity_log_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -120,7 +120,7 @@ async def get_activity_log_obj(
|
||||
# Updated 2021-09-21
|
||||
@router.get('/account/{account_id}/activity_log/list', response_model=Resp_Body_Base)
|
||||
async def get_account_obj_activity_log_list(
|
||||
account_id: str = Query(..., min_length=11, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
x_account_id: str = Header(...),
|
||||
@@ -167,7 +167,7 @@ async def get_account_obj_activity_log_list(
|
||||
|
||||
@router.delete('/activity_log/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_activity_log_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -48,7 +48,7 @@ async def post_address_obj(
|
||||
@router.patch('/{address_obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_address_obj(
|
||||
address_obj: Address_Base,
|
||||
address_obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
address_obj_id: str = Path(min_length=1, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -77,7 +77,7 @@ async def patch_address_obj(
|
||||
@router.patch('/{address_id}/json', response_model=Resp_Body_Base)
|
||||
async def patch_address_json(
|
||||
address_obj: Address_Base,
|
||||
address_id: str = Query(..., min_length=1, max_length=22),
|
||||
address_id: str = Path(min_length=1, max_length=22),
|
||||
create_sub_obj: bool = False,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -141,7 +141,7 @@ async def get_address_obj_li(
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_address_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
include: Optional[list] = [],
|
||||
@@ -165,7 +165,7 @@ async def get_address_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_address_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -816,7 +816,7 @@ async def post_obj(
|
||||
obj_type_l1: Optional[str] = Path(..., max_length=50),
|
||||
obj_type_l2: str = None,
|
||||
obj_type_l3: str = None,
|
||||
# obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
# obj_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
run_safety_check: bool = True,
|
||||
|
||||
|
||||
@@ -659,7 +659,7 @@ async def post_obj(
|
||||
obj_type_l1: Optional[str] = Path(..., max_length=50),
|
||||
obj_type_l2: str = None,
|
||||
obj_type_l3: str = None,
|
||||
# obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
# obj_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
run_safety_check: bool = True,
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -46,7 +46,7 @@ async def post_archive_obj(
|
||||
|
||||
@router.patch('/archive/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_archive_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Archive_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -99,7 +99,7 @@ async def get_archive_obj_li(
|
||||
# Working well as of 2021-11-01. Using as a template for other routes.
|
||||
@router.get('/archive/{archive_id}', response_model=Resp_Body_Base)
|
||||
async def get_archive_obj(
|
||||
archive_id: str = Query(..., min_length=11, max_length=22),
|
||||
archive_id: str = Path(min_length=11, max_length=22),
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
# inc_address: bool = False, # Under archive and under contact
|
||||
@@ -139,7 +139,7 @@ async def get_archive_obj(
|
||||
|
||||
# @router.get('/archive/{obj_id}', response_model=Resp_Body_Base)
|
||||
# async def get_archive_obj(
|
||||
# obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
# obj_id: str = Path(min_length=11, max_length=22),
|
||||
# x_account_id: str = Header(...),
|
||||
# by_alias: Optional[bool] = True,
|
||||
# exclude_unset: Optional[bool] = True,
|
||||
@@ -160,7 +160,7 @@ async def get_archive_obj(
|
||||
|
||||
@router.delete('/archive/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_archive_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_archive_content_obj(
|
||||
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_archive_content_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=1, max_length=22),
|
||||
obj: Archive_Content_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -95,7 +95,7 @@ async def get_archive_content_obj_li(
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_archive_content_obj(
|
||||
obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -116,7 +116,7 @@ async def get_archive_content_obj(
|
||||
|
||||
# @router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
# async def delete_archive_content_obj(
|
||||
# obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
# obj_id: str = Path(min_length=11, max_length=22),
|
||||
# x_account_id: str = Header(...),
|
||||
# response: Response = Response,
|
||||
# ):
|
||||
@@ -135,10 +135,10 @@ async def get_archive_content_obj(
|
||||
# Updated 2021-11-02
|
||||
@router.delete('/{archive_content_id}', response_model=Resp_Body_Base)
|
||||
async def delete_archive_content_obj(
|
||||
archive_content_id: str = Query(..., min_length=11, max_length=22),
|
||||
# hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
archive_content_id: str = Path(min_length=11, max_length=22),
|
||||
# hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
# for_type: str = Query(..., min_length=1, max_length=25),
|
||||
# for_id: str = Query(..., min_length=11, max_length=22),
|
||||
# for_id: str = Path(min_length=11, max_length=22),
|
||||
delete_hosted_file: bool = False,
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, json, pytz, random, secrets, string, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_cont_edu_cert_obj(
|
||||
@router.patch('/cont_edu/cert/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_cont_edu_cert_obj(
|
||||
obj: Cont_Edu_Cert_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -74,7 +74,7 @@ async def patch_cont_edu_cert_obj(
|
||||
@router.patch('/cont_edu/cert/{cont_edu_cert_id}/json', response_model=Resp_Body_Base)
|
||||
async def patch_cont_edu_cert_json(
|
||||
cont_edu_cert_obj: Cont_Edu_Cert_Base,
|
||||
cont_edu_cert_id: str = Query(..., min_length=1, max_length=22),
|
||||
cont_edu_cert_id: str = Path(min_length=11, max_length=22),
|
||||
create_sub_obj: bool = False,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -175,7 +175,7 @@ async def get_cont_edu_cert_obj_li(
|
||||
|
||||
@router.get('/cont_edu/cert/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_cont_edu_cert_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -198,7 +198,7 @@ async def get_cont_edu_cert_obj(
|
||||
# Updated 2021-07-28
|
||||
@router.get('/account/{account_id}/cont_edu/cert/list', response_model=Resp_Body_Base)
|
||||
async def get_account_obj_cont_edu_cert_list(
|
||||
account_id: str = Query(..., min_length=1, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
inc_cont_edu_cert_person_list: bool = False,
|
||||
@@ -246,7 +246,7 @@ async def get_account_obj_cont_edu_cert_list(
|
||||
|
||||
@router.delete('/cont_edu/cert/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_cont_edu_cert_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_cont_edu_cert_person_obj(
|
||||
@router.patch('/cont_edu/cert/person/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_cont_edu_cert_person_obj(
|
||||
obj: Cont_Edu_Cert_Person_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -74,7 +74,7 @@ async def patch_cont_edu_cert_person_obj(
|
||||
@router.patch('/cont_edu/cert/person/{cont_edu_cert_person_id}/json', response_model=Resp_Body_Base)
|
||||
async def patch_cont_edu_cert_person_json(
|
||||
cont_edu_cert_person_obj: Cont_Edu_Cert_Person_Base,
|
||||
cont_edu_cert_person_id: str = Query(..., min_length=1, max_length=22),
|
||||
cont_edu_cert_person_id: str = Path(min_length=11, max_length=22),
|
||||
create_sub_obj: bool = False,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -284,7 +284,7 @@ async def search_cont_edu_cert_person_obj_li(
|
||||
# Updated 2021-08-05
|
||||
@router.get('/cont_edu/cert/person/{cont_edu_cert_person_id}', response_model=Resp_Body_Base)
|
||||
async def get_cont_edu_cert_person_obj(
|
||||
cont_edu_cert_person_id: str = Query(..., min_length=1, max_length=22),
|
||||
cont_edu_cert_person_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
inc_cont_edu_cert: bool = False,
|
||||
@@ -317,7 +317,7 @@ async def get_cont_edu_cert_person_obj(
|
||||
# Updated 2021-07-28
|
||||
@router.get('/account/{account_id}/cont_edu/cert/person/list', response_model=Resp_Body_Base)
|
||||
async def get_account_obj_cont_edu_cert_person_list(
|
||||
account_id: str = Query(..., min_length=1, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
inc_cont_edu_cert: bool = False,
|
||||
@@ -367,7 +367,7 @@ async def get_account_obj_cont_edu_cert_person_list(
|
||||
# Updated 2021-07-28
|
||||
@router.get('/person/{person_id}/cont_edu/cert/person/list', response_model=Resp_Body_Base)
|
||||
async def get_person_obj_cont_edu_cert_person_list(
|
||||
person_id: str = Query(..., min_length=11, max_length=22),
|
||||
person_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
x_account_id: str = Header(...),
|
||||
@@ -415,7 +415,7 @@ async def get_person_obj_cont_edu_cert_person_list(
|
||||
# Updated 2021-07-28
|
||||
@router.get('/cont_edu/cert/{cont_edu_cert_id}/cont_edu/cert/person/list', response_model=Resp_Body_Base)
|
||||
async def get_cont_edu_cert_obj_cont_edu_cert_person_list(
|
||||
cont_edu_cert_id: str = Query(..., min_length=1, max_length=22),
|
||||
cont_edu_cert_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
inc_cont_edu_cert: bool = False,
|
||||
@@ -463,7 +463,7 @@ async def get_cont_edu_cert_obj_cont_edu_cert_person_list(
|
||||
|
||||
@router.delete('/cont_edu/cert/person/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_cont_edu_cert_person_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_contact_obj(
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_contact_obj(
|
||||
obj: Contact_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -126,7 +126,7 @@ async def post_contact_obj_new_v4(
|
||||
@router.patch('/{contact_id}/exist_v4', response_model=Resp_Body_Base)
|
||||
async def patch_contact_obj_exist_v4(
|
||||
contact_obj: Contact_Base,
|
||||
contact_id: str = Query(..., min_length=11, max_length=22),
|
||||
contact_id: str = Path(min_length=11, max_length=22),
|
||||
for_type: str = None,
|
||||
for_id: str = None,
|
||||
create_sub_obj: bool = False,
|
||||
@@ -178,7 +178,7 @@ async def patch_contact_obj_exist_v4(
|
||||
@router.patch('/{contact_id}/json', response_model=Resp_Body_Base)
|
||||
async def patch_contact_json(
|
||||
contact_obj: Contact_Base,
|
||||
contact_id: str = Query(..., min_length=1, max_length=22),
|
||||
contact_id: str = Path(min_length=11, max_length=22),
|
||||
create_sub_obj: bool = False,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -279,7 +279,7 @@ async def get_contact_obj_li(
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_contact_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -300,7 +300,7 @@ async def get_contact_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_contact_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, pytz, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -65,7 +65,7 @@ async def post_data_store_obj(
|
||||
@router.patch('/data_store/{data_store_id}', response_model=Resp_Body_Base)
|
||||
async def patch_data_store_obj(
|
||||
data_store_obj: Data_Store_Base,
|
||||
data_store_id: str = Query(..., min_length=11, max_length=22),
|
||||
data_store_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
return_obj: Optional[bool] = True,
|
||||
|
||||
@@ -106,7 +106,7 @@ async def patch_data_store_obj(
|
||||
# Updated 2022-03-11
|
||||
@router.get('/data_store/{data_store_id}', response_model=Resp_Body_Base)
|
||||
async def get_data_store_obj(
|
||||
data_store_id: str = Query(..., min_length=11, max_length=22),
|
||||
data_store_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
@@ -144,9 +144,9 @@ async def get_data_store_obj(
|
||||
@router.get('/data_store/code/{data_store_code}/{for_type}/{for_id}', response_model=Resp_Body_Base)
|
||||
@router.get('/data_store/code/{data_store_code}', response_model=Resp_Body_Base)
|
||||
async def get_data_store_obj_w_code(
|
||||
data_store_code: str = Query(..., min_length=3, max_length=50),
|
||||
for_type: Optional[str] = Query(None, min_length=1, max_length=25),
|
||||
for_id: Optional[str] = Query(None, min_length=11, max_length=22),
|
||||
data_store_code: str = Path(min_length=3, max_length=50),
|
||||
for_type: Optional[str] = Path(min_length=1, max_length=25),
|
||||
for_id: Optional[str] = Path(min_length=11, max_length=22),
|
||||
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
@@ -193,7 +193,7 @@ async def get_data_store_obj_w_code(
|
||||
# Updated 2022-03-11
|
||||
@router.get('/account/{account_id}/data_store/list', response_model=Resp_Body_Base)
|
||||
async def get_account_obj_data_store_list(
|
||||
account_id: str = Query(..., min_length=11, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime, json, pytz, secrets, time
|
||||
import pandas, xlrd # qrcode
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field, ValidationError
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -33,7 +33,7 @@ router = APIRouter()
|
||||
async def import_event_session_list(
|
||||
e_confex_event_id: str = Query(..., min_length=5, max_length=22), # For AAPOR: aapor_2023 (2024-05); aapor_2023 (2023-05)
|
||||
|
||||
event_id: str = Query(..., min_length=11, max_length=22), # For AAPOR: MCz-Qm-48-j1 (1513 2024-05) 9jW-Db-SF-wt (1478 2023-05); x2H2P2MYlXU (1447 2022-05)
|
||||
event_id: str = Path(min_length=11, max_length=22), # For AAPOR: MCz-Qm-48-j1 (1513 2024-05) 9jW-Db-SF-wt (1478 2023-05); x2H2P2MYlXU (1447 2022-05)
|
||||
# Account ID For AAPOR: j5EBhRDqPuw (20)
|
||||
|
||||
begin_loop: int = 1,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, json, pytz, random, secrets, string, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime, json, pytz, random, secrets, time
|
||||
import pandas, xlrd # qrcode
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -25,7 +25,7 @@ router = APIRouter()
|
||||
# Updated 2024-04-12
|
||||
@router.get('/event/{e_impexium_event_id}/import_reg', response_model=Resp_Body_Base)
|
||||
async def event_import_reg(
|
||||
e_impexium_event_id: str = Query(..., min_length=11, max_length=22), # For ISHLT: 42_AM (2022-04); EX22_AM (2022-04); 41V_2 (2021-04)
|
||||
e_impexium_event_id: str = Path(min_length=11, max_length=22), # For ISHLT: 42_AM (2022-04); EX22_AM (2022-04); 41V_2 (2021-04)
|
||||
registered_since: datetime.datetime = None, # datetime.datetime.now() + datetime.timedelta(seconds=120)
|
||||
details: bool = True,
|
||||
inc_individual_profile: bool = True,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -47,7 +47,7 @@ async def post_event_obj(
|
||||
@router.patch('/event/{event_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event(
|
||||
event_obj: Event_Base,
|
||||
event_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
create_sub_obj: bool = False,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -208,7 +208,7 @@ async def get_event_obj_li(
|
||||
# Updated 2021-12-13
|
||||
@router.get('/event/{event_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_obj(
|
||||
event_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
approved: str = 'all', # approve(d), not_approved, all
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
@@ -313,7 +313,7 @@ async def get_event_obj(
|
||||
# Updated 2021-12-13
|
||||
@router.get('/account/{account_id}/event/list', response_model=Resp_Body_Base)
|
||||
async def get_account_obj_event_list(
|
||||
account_id: str = Query(..., min_length=11, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500,
|
||||
enabled: str = 'enabled',
|
||||
archived: str = 'not_archived', # archived, not_archived, all
|
||||
@@ -425,7 +425,7 @@ async def get_account_obj_event_list(
|
||||
# Updated 2021-12-13
|
||||
@router.get('/account/{account_id}/event/meeting_list_flat', response_model=Resp_Body_Base)
|
||||
async def get_account_obj_event_meeting_list_flat(
|
||||
account_id: str = Query(..., min_length=11, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500,
|
||||
enabled: str = 'enabled',
|
||||
archived: str = 'not_archived', # archived, not_archived, all
|
||||
@@ -476,7 +476,7 @@ async def get_account_obj_event_meeting_list_flat(
|
||||
# Updated 2021-07-12
|
||||
@router.get('/person/{person_id}/event/list', response_model=Resp_Body_Base)
|
||||
async def get_person_event_obj_li(
|
||||
person_id: str = Query(..., min_length=1, max_length=22),
|
||||
person_id: str = Path(min_length=11, max_length=22),
|
||||
enabled: str = 'enabled',
|
||||
limit: int = 1000,
|
||||
conference: bool = False, # If it is a conference then organization, person, and user are queried as participants (not the owner/organizer)
|
||||
@@ -546,7 +546,7 @@ async def get_person_event_obj_li(
|
||||
|
||||
@router.delete('/event/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, json
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -87,7 +87,7 @@ async def post_event_abstract_obj(
|
||||
@router.patch('/event/abstract/{event_abstract_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_abstract_obj(
|
||||
event_abstract_obj: Event_Abstract_In,
|
||||
event_abstract_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_abstract_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
# create_sub_obj: bool = False,
|
||||
# fail_any: bool = True, # Fail if any thing goes wrong for sub objects
|
||||
@@ -142,7 +142,7 @@ async def patch_event_abstract_obj(
|
||||
# Updated 2023-03-22
|
||||
@router.get('/event/abstract/{event_abstract_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_abstract_obj(
|
||||
event_abstract_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_abstract_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_event_cfg: bool = False,
|
||||
inc_event_file_list: bool = False,
|
||||
@@ -199,7 +199,7 @@ async def get_event_abstract_obj(
|
||||
# Updated 2023-05-22
|
||||
@router.get('/event/{event_id}/event/abstract/list', response_model=Resp_Body_Base)
|
||||
async def get_event_id_event_abstract_obj_li(
|
||||
event_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
# inc_address: bool = False,
|
||||
# inc_contact: bool = False,
|
||||
@@ -264,7 +264,7 @@ async def get_event_id_event_abstract_obj_li(
|
||||
# # Updated 2023-03-22
|
||||
# @router.delete('/event/abstract/{event_abstract_id}', response_model=Resp_Body_Base)
|
||||
# def delete_event_abstract_obj(
|
||||
# event_abstract_id: str = Query(..., min_length=11, max_length=22),
|
||||
# event_abstract_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
# method: str = None, # None, delete, disable, hide
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -47,7 +47,7 @@ async def post_event_badge_obj(
|
||||
@router.patch('/event/badge/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_badge_obj(
|
||||
obj: Event_Badge_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -141,7 +141,7 @@ async def get_event_badge_obj_li(
|
||||
# Updated 2022-02-15
|
||||
@router.get('/event/{event_id}/badge/search', response_model=Resp_Body_Base)
|
||||
async def search_event_badge_obj_li(
|
||||
event_id: str = Query(None, min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
event_badge_id: str = Query(None, min_length=3, max_length=22),
|
||||
event_person_id: str = Query(None, min_length=3, max_length=22),
|
||||
|
||||
@@ -382,7 +382,7 @@ async def search_event_badge_obj_li(
|
||||
# Updated 2022-04-16
|
||||
@router.get('/event/badge/{event_badge_id}/email_review', response_model=Resp_Body_Base)
|
||||
async def event_badge_obj_email_review(
|
||||
event_badge_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_badge_id: str = Path(min_length=11, max_length=22),
|
||||
root_url: Optional[str] = Query(None, min_length=10, max_length=100), # Absolute min = 7
|
||||
# to_email: str = Query(..., min_length=5, max_length=100),
|
||||
# to_name: str = Query(..., min_length=2, max_length=75),
|
||||
@@ -403,7 +403,7 @@ async def event_badge_obj_email_review(
|
||||
# Updated 2022-02-15
|
||||
@router.get('/event/badge/{event_badge_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_badge_obj(
|
||||
event_badge_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_badge_id: str = Path(min_length=11, max_length=22),
|
||||
badge_only: bool = False,
|
||||
inc_event_badge_template: bool = True,
|
||||
|
||||
@@ -450,7 +450,7 @@ async def get_event_badge_obj(
|
||||
# Updated 2021-07-28
|
||||
@router.get('/account/{account_id}/event/badge/list', response_model=Resp_Body_Base)
|
||||
async def get_account_obj_event_badge_list(
|
||||
account_id: str = Query(..., min_length=1, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
inc_event_badge: bool = False,
|
||||
@@ -501,7 +501,7 @@ async def get_account_obj_event_badge_list(
|
||||
# Updated 2021-07-28
|
||||
@router.get('/event/{event_id}/event/badge/list', response_model=Resp_Body_Base)
|
||||
async def get_event_obj_event_badge_list(
|
||||
event_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
badge_only: bool = False,
|
||||
badge_type_code: str = None,
|
||||
printed: str = 'not_printed', # not_printed, printed, all
|
||||
@@ -550,7 +550,7 @@ async def get_event_obj_event_badge_list(
|
||||
|
||||
@router.delete('/event/badge/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_badge_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime, json, os, pathlib, pytz, secrets, shutil, time
|
||||
import pandas, xlrd # qrcode
|
||||
from fastapi import APIRouter, Body, Depends, File, Header, HTTPException, Query, Response, status, UploadFile
|
||||
from fastapi import APIRouter, Body, Depends, File, Header, HTTPException, Path, Query, Response, status, UploadFile
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -40,7 +40,7 @@ router = APIRouter()
|
||||
# Updated 2023-01-12
|
||||
@router.post('/event/{event_id}/badge/import', response_model=Resp_Body_Base)
|
||||
async def event_id_badge_import(
|
||||
event_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
file: UploadFile = File(...),
|
||||
|
||||
begin_at: int = 0,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -23,7 +23,7 @@ router = APIRouter()
|
||||
@router.patch('/event/badge/template/{event_badge_template_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_badge_template_obj(
|
||||
event_badge_template_obj: Event_Badge_Template_Base_In,
|
||||
event_badge_template_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_badge_template_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_event_badge_list: bool = False,
|
||||
|
||||
@@ -70,7 +70,7 @@ async def patch_event_badge_template_obj(
|
||||
# Updated 2022-06-22
|
||||
@router.get('/event/{event_id}/badge/template/list', response_model = Resp_Body_Base)
|
||||
async def get_event_event_badge_template_obj_list(
|
||||
event_id: str = Query(None, min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
inc_event_badge_list: bool = False,
|
||||
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
@@ -164,7 +164,7 @@ async def get_event_event_badge_template_obj_list(
|
||||
# Updated 2021-09-08
|
||||
@router.get('/event/badge/template/{event_badge_template_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_badge_template_obj(
|
||||
event_badge_template_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_badge_template_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 5, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
x_account_id: str = Header(...),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, pytz, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -77,7 +77,7 @@ async def post_event_device_obj(
|
||||
@router.patch('/event/device/{event_device_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_device_obj(
|
||||
event_device_obj: Event_Device_Base,
|
||||
event_device_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_device_id: str = Path(min_length=11, max_length=22),
|
||||
event_id: str = Query(None, min_length=11, max_length=22),
|
||||
event_location_id: str = Query(None, min_length=11, max_length=22),
|
||||
|
||||
@@ -134,7 +134,7 @@ async def patch_event_device_obj(
|
||||
# Updated 2022-03-09
|
||||
@router.get('/event/device/{event_device_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_device_obj(
|
||||
event_device_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_device_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_event_cfg: bool = False,
|
||||
inc_event_location: bool = False,
|
||||
@@ -171,7 +171,7 @@ async def get_event_device_obj(
|
||||
# Updated 2022-03-09
|
||||
@router.get('/event/{event_id}/device/list', response_model=Resp_Body_Base)
|
||||
async def get_event_obj_device_list(
|
||||
event_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
inc_event_cfg: bool = False,
|
||||
inc_event_location: bool = False,
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_event_exhibit_obj(
|
||||
|
||||
@router.patch('/event/exhibit/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_exhibit_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Event_Exhibit_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -97,7 +97,7 @@ async def get_event_exhibit_obj_li(
|
||||
# Updated 2022-02-15
|
||||
@router.get('/event/exhibit/{event_exhibit_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_exhibit_obj(
|
||||
event_exhibit_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_exhibit_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_event_exhibit_tracking_list: bool = False,
|
||||
inc_event_badge: bool = False,
|
||||
@@ -140,7 +140,7 @@ async def get_event_exhibit_obj(
|
||||
|
||||
@router.delete('/event/exhibit/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_exhibit_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from fastapi.responses import FileResponse
|
||||
from pydantic import BaseModel, EmailStr, Field, ValidationError
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
@@ -120,7 +120,7 @@ async def post_event_exhibit_tracking_obj(
|
||||
@router.patch('/event/exhibit/tracking/{event_exhibit_tracking_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_exhibit_tracking_obj(
|
||||
event_exhibit_tracking_obj: Event_Exhibit_Tracking_Base,
|
||||
event_exhibit_tracking_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_exhibit_tracking_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_event_badge: bool = False,
|
||||
inc_event_exhibit: bool = False,
|
||||
@@ -191,7 +191,7 @@ async def get_event_exhibit_tracking_obj_li(
|
||||
# Updated 2022-02-15
|
||||
@router.get('/event/exhibit/tracking/{event_exhibit_tracking_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_exhibit_tracking_obj(
|
||||
event_exhibit_tracking_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_exhibit_tracking_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_event_badge: bool = False,
|
||||
inc_event_exhibit: bool = False,
|
||||
@@ -229,7 +229,7 @@ async def get_event_exhibit_tracking_obj(
|
||||
# Updated 2023-04-10
|
||||
@router.get('/event/exhibit/{event_exhibit_id}/tracking/export', response_model=Resp_Body_Base)
|
||||
async def get_event_exhibit_obj_tracking_list(
|
||||
event_exhibit_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_exhibit_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
file_type: str = 'CSV', # CSV, Excel
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
@@ -487,7 +487,7 @@ async def get_event_exhibit_obj_tracking_list(
|
||||
# Updated 2022-02-15
|
||||
@router.get('/event/exhibit/{event_exhibit_id}/tracking/list', response_model=Resp_Body_Base)
|
||||
async def get_event_exhibit_obj_tracking_list(
|
||||
event_exhibit_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_exhibit_id: str = Path(min_length=11, max_length=22),
|
||||
event_person_id: str = Query(None, min_length=11, max_length=22),
|
||||
|
||||
inc_event_badge: bool = False,
|
||||
@@ -537,7 +537,7 @@ async def get_event_exhibit_obj_tracking_list(
|
||||
# Updated 2022-02-15
|
||||
@router.delete('/event/exhibit/tracking/{event_exhibit_tracking_id}', response_model=Resp_Body_Base)
|
||||
def delete_event_exhibit_tracking_obj(
|
||||
event_exhibit_tracking_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_exhibit_tracking_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, os, pathlib, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from fastapi.responses import FileResponse, StreamingResponse
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
@@ -51,7 +51,7 @@ async def post_event_file_obj(
|
||||
@router.post('/event/file/from_hosted_file/{hosted_file_id}', response_model=Resp_Body_Base)
|
||||
async def create_from_hosted_file(
|
||||
event_file_obj: Event_File_Base,
|
||||
hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
inc_hosted_file: bool = False,
|
||||
return_obj: bool = True,
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
@@ -152,7 +152,7 @@ async def create_from_hosted_file(
|
||||
|
||||
@router.patch('/event/file/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_file_obj(
|
||||
obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Event_File_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -307,7 +307,7 @@ async def download_event_file(
|
||||
# Updated 2021-10-21
|
||||
@router.get('/event/file/{event_file_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_file_obj(
|
||||
event_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_file_id: str = Path(min_length=11, max_length=22),
|
||||
inc_hosted_file: bool = False,
|
||||
enabled: str = 'enabled', # enabled, disabled, all; For now this covers any included objects or object lists
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
@@ -344,7 +344,7 @@ async def get_event_file_obj(
|
||||
# Updated 2021-11-02
|
||||
@router.delete('/event/file/{event_file_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_file_obj(
|
||||
event_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_file_id: str = Path(min_length=11, max_length=22),
|
||||
hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
for_type: str = Query(..., min_length=1, max_length=25),
|
||||
for_id: str = Query(..., min_length=11, max_length=22),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -246,7 +246,7 @@ async def get_event_obj_event_location_list(
|
||||
# Updated 2022-09-23
|
||||
@router.delete('/event/location/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_location_obj(
|
||||
obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, secrets
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_event_person_detail_obj(
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_person_detail_obj(
|
||||
obj: Event_Person_Detail_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -95,7 +95,7 @@ async def get_event_person_detail_obj_li(
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_person_detail_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -116,7 +116,7 @@ async def get_event_person_detail_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_person_detail_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -96,7 +96,7 @@ async def get_event_person_tracking_obj_li(
|
||||
|
||||
@router.get('/event/person/tracking/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_person_tracking_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -229,7 +229,7 @@ async def get_event_session_obj_event_person_tracking_list(
|
||||
|
||||
@router.delete('/event/person/tracking/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_person_tracking_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_event_presentation_obj(
|
||||
@router.patch('/event/presentation/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_presentation_obj(
|
||||
obj: Event_Presentation_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -249,7 +249,7 @@ async def get_event_session_event_presentation_li(
|
||||
|
||||
@router.delete('/event/presentation/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_presentation_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_event_presenter_obj(
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_presenter_obj(
|
||||
obj: Event_Presenter_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -215,7 +215,7 @@ async def get_event_presenter_obj_li(
|
||||
|
||||
# @router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
# async def get_event_presenter_obj(
|
||||
# obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
# obj_id: str = Path(min_length=11, max_length=22),
|
||||
# x_account_id: str = Header(...),
|
||||
# by_alias: Optional[bool] = True,
|
||||
# exclude_unset: Optional[bool] = True,
|
||||
@@ -237,7 +237,7 @@ async def get_event_presenter_obj_li(
|
||||
# Working well as of 2021-06-07. Using as a template for other routes.
|
||||
@router.get('/{event_presenter_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_presenter_obj(
|
||||
event_presenter_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_presenter_id: str = Path(min_length=11, max_length=22),
|
||||
enabled: str = 'enabled', # enabled, disabled, all; For now this covers any included objects or object lists
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
inc_file_count: bool = False,
|
||||
@@ -303,7 +303,7 @@ async def get_event_presenter_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_presenter_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -46,7 +46,7 @@ async def post_event_registration_obj(
|
||||
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_registration_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Event_Registration_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -137,7 +137,7 @@ async def get_event_registration_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_registration_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -21,7 +21,7 @@ router = APIRouter()
|
||||
# Updated 2022-04-12
|
||||
@router.get('/event/{event_id}/rpt_presenter_links', response_model=Resp_Body_Base)
|
||||
async def event_id_rpt_presenter_links(
|
||||
event_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, json
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -78,7 +78,7 @@ async def post_event_session_obj_new_v4(
|
||||
@router.patch('/event/session/{event_session_id}/exist_v4', response_model=Resp_Body_Base)
|
||||
async def patch_event_session_obj_exist_v4(
|
||||
event_session_obj: Event_Session_Base,
|
||||
event_session_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_session_id: str = Path(min_length=11, max_length=22),
|
||||
create_sub_obj: bool = False,
|
||||
fail_any: bool = True, # Fail if any thing goes wrong for sub objects
|
||||
|
||||
@@ -204,7 +204,7 @@ async def post_event_session_obj_new_v3(
|
||||
@router.patch('/event/session/{event_session_id}/exist_v3', response_model=Resp_Body_Base)
|
||||
async def patch_event_session_obj_exist_v3(
|
||||
event_session_obj: Event_Session_Base,
|
||||
event_session_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_session_id: str = Path(min_length=11, max_length=22),
|
||||
create_sub_obj: bool = False,
|
||||
fail_any: bool = True, # Fail if any thing goes wrong for sub objects
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
@@ -248,7 +248,7 @@ async def patch_event_session_obj_exist_v3(
|
||||
@router.patch('/event/session/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_session_obj(
|
||||
obj: Event_Session_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -465,7 +465,7 @@ async def get_event_session_obj_li(
|
||||
# Updated 2022-09-23
|
||||
@router.get('/event/session/{event_session_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_session_obj(
|
||||
event_session_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_session_id: str = Path(min_length=11, max_length=22),
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
inc_address: bool = False, # Under contact
|
||||
@@ -546,7 +546,7 @@ async def get_event_session_obj(
|
||||
# Updated 2022-09-30
|
||||
@router.get('/event/{event_id}/event/session/list', response_model=Resp_Body_Base)
|
||||
async def get_event_event_session_obj_li(
|
||||
event_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_id: str = Path(min_length=11, max_length=22),
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
# inc_address: bool = False,
|
||||
@@ -690,7 +690,7 @@ async def search_event_session_obj_li(
|
||||
|
||||
@router.delete('/event/session/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_session_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -46,7 +46,7 @@ async def post_flask_cfg_obj(
|
||||
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_flask_cfg_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Flask_Cfg_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -124,7 +124,7 @@ async def get_flask_cfg_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_flask_cfg_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -23,7 +23,7 @@ router = APIRouter()
|
||||
# Updated 2021-12-13
|
||||
@router.get('/account/{account_id}/fundraising/list', response_model=Resp_Body_Base)
|
||||
async def get_account_obj_fundraising_list(
|
||||
account_id: str = Query(..., min_length=11, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
priority: str = 'all', # priority, not_priority, all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, json
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ async def directory_check(
|
||||
# Updated 2022-08-08
|
||||
@router.get('/{hosted_file_id}/download', response_model=Resp_Body_Base)
|
||||
async def download_hosted_file(
|
||||
hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
filename: str = Query(None, min_length=4, max_length=100),
|
||||
# streaming: bool = False,
|
||||
|
||||
@@ -247,7 +247,7 @@ async def file_streamer(path: str, start: int, end: int):
|
||||
# Updated 2023-08-18
|
||||
@router.get('/{hosted_file_id}/stream')
|
||||
async def stream_hosted_file(
|
||||
hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
filename: str = Query(None, min_length=4, max_length=100),
|
||||
# streaming: bool = True,
|
||||
|
||||
@@ -334,7 +334,7 @@ async def stream_hosted_file(
|
||||
# @router.get('/{hosted_file_id}/stream')
|
||||
# # def stream_hosted_file(
|
||||
# async def stream_hosted_file(
|
||||
# hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
# hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
# filename: str = Query(None, min_length=4, max_length=100),
|
||||
# streaming: bool = True,
|
||||
|
||||
@@ -844,7 +844,7 @@ async def test_upload_files(
|
||||
# Updated 2022-08-09
|
||||
@router.delete('/{hosted_file_id}', response_model=Resp_Body_Base)
|
||||
async def delete_hosted_file(
|
||||
hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
link_to_type: str = None,
|
||||
link_to_id: Union[int, str] = None,
|
||||
@@ -876,7 +876,7 @@ async def delete_hosted_file(
|
||||
# Updated 2021-09-07
|
||||
@router.get('/{hosted_file_id}', response_model=Resp_Body_Base)
|
||||
async def get_hosted_file_obj(
|
||||
hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
enabled: str = 'enabled', # enabled, disabled, all; For now this covers any included objects or object lists
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -996,7 +996,7 @@ async def download_tmp(
|
||||
# Updated 2023-04-04
|
||||
@router.get('/{hosted_file_id}/convert_file')
|
||||
async def convert_file(
|
||||
hosted_file_id: str = Query(..., min_length=11, max_length=22),
|
||||
hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
link_to_type: str = Query(..., min_length=2, max_length=50),
|
||||
link_to_id: str = Query(..., min_length=11, max_length=22),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime, json, pytz, secrets, time
|
||||
import pandas, xlrd # qrcode
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -43,7 +43,7 @@ async def post_journal_obj(
|
||||
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_journal_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Journal_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -130,7 +130,7 @@ async def get_journal_obj_li(
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_journal_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -151,7 +151,7 @@ async def get_journal_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_journal_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_journal_entry_obj(
|
||||
|
||||
@router.patch('/journal/entry/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_journal_entry_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Journal_Entry_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -131,7 +131,7 @@ async def get_journal_entry_obj_li(
|
||||
|
||||
@router.get('/journal/entry/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_journal_entry_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -206,7 +206,7 @@ async def get_journal_obj_journal_entry_list(
|
||||
|
||||
@router.delete('/journal/entry/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_journal_entry_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, pytz, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_log_client_viewing_obj(
|
||||
@router.patch('/log/client_viewing/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_log_client_viewing_obj(
|
||||
obj: Log_Client_Viewing_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -120,7 +120,7 @@ async def get_account_log_client_viewing_obj_li(
|
||||
|
||||
@router.delete('/log/client_viewing/{log_client_viewing_obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_log_client_viewing_obj(
|
||||
log_client_viewing_obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
log_client_viewing_obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_membership_group_obj(
|
||||
|
||||
@router.patch('/membership/group/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_membership_group_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Membership_Group_Base = None,
|
||||
#x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -306,7 +306,7 @@ async def get_membership_group_obj(
|
||||
|
||||
@router.delete('/membership/group/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_membership_group_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -139,7 +139,7 @@ async def patch_membership_person_obj(
|
||||
# Updated 2022-01-11
|
||||
@router.get('/membership/person/{membership_person_id}', response_model=Resp_Body_Base)
|
||||
async def get_membership_person_obj(
|
||||
membership_person_id: str = Query(..., min_length=11, max_length=22),
|
||||
membership_person_id: str = Path(min_length=11, max_length=22),
|
||||
# inc_address: bool = False, # Per member
|
||||
# inc_contact: bool = False, # Per member
|
||||
inc_membership_cfg: bool = False,
|
||||
@@ -206,7 +206,7 @@ async def get_membership_person_obj(
|
||||
# Updated 2022-01-11
|
||||
@router.get('/person/{person_id}/membership/person', response_model=Resp_Body_Base)
|
||||
async def get_person_obj_membership_person(
|
||||
person_id: str = Query(..., min_length=11, max_length=22),
|
||||
person_id: str = Path(min_length=11, max_length=22),
|
||||
# inc_address: bool = False, # Per member
|
||||
# inc_contact: bool = False, # Per member
|
||||
inc_membership_cfg: bool = False,
|
||||
@@ -425,7 +425,7 @@ async def lookup_membership_person_obj(
|
||||
|
||||
@router.delete('/membership/person/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_membership_person_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
response: Response = Response,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_membership_person_group_obj(
|
||||
|
||||
@router.patch('/membership/group/person/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_membership_person_group_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Membership_Person_Group_Base = None,
|
||||
#x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -108,7 +108,7 @@ async def get_membership_person_group_obj(
|
||||
|
||||
@router.delete('/membership/group/person/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_membership_person_group_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_membership_person_profile_obj(
|
||||
|
||||
@router.patch('/membership/person/profile/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_membership_person_profile_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Membership_Person_Profile_Base_Up = None,
|
||||
#x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_membership_person_type_obj(
|
||||
|
||||
@router.patch('/membership/type/person/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_membership_person_type_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Membership_Person_Type_Base = None,
|
||||
#x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -108,7 +108,7 @@ async def get_membership_person_type_obj(
|
||||
|
||||
@router.delete('/membership/type/person/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_membership_person_type_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_membership_type_obj(
|
||||
|
||||
@router.patch('/membership/type/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_membership_type_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Membership_Type_Base = None,
|
||||
#x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -97,7 +97,7 @@ async def get_membership_type_obj_li(
|
||||
# Updated 2022-01-13
|
||||
@router.get('/account/{account_id}/membership/type/list', response_model=Resp_Body_Base)
|
||||
async def get_account_membership_type_obj_li(
|
||||
account_id: str = Query(..., min_length=11, max_length=22),
|
||||
account_id: str = Path(min_length=11, max_length=22),
|
||||
# product_id: Optional[str] = Query(None, min_length=1, max_length=22),
|
||||
# type_level: Optional[int] = None,
|
||||
|
||||
@@ -307,7 +307,7 @@ async def get_membership_type_obj(
|
||||
|
||||
# @router.get('/membership/type/{obj_id}', response_model=Resp_Body_Base)
|
||||
# async def get_membership_type_obj_old(
|
||||
# obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
# obj_id: str = Path(min_length=11, max_length=22),
|
||||
# x_account_id: str = Header(...),
|
||||
# by_alias: Optional[bool] = True,
|
||||
# exclude_unset: Optional[bool] = True,
|
||||
@@ -328,7 +328,7 @@ async def get_membership_type_obj(
|
||||
|
||||
@router.delete('/membership/type/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_membership_type_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -47,7 +47,7 @@ async def post_order_obj(
|
||||
# NOTE 2021-08-09: Use with rework of order_cart
|
||||
@router.patch('/order/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_order_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Order_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -78,7 +78,7 @@ async def patch_order_obj(
|
||||
# NOTE: The router needs to have the prefix (/order) removed.
|
||||
@router.patch('/order/{order_id}/line/add', response_model=Resp_Body_Base)
|
||||
async def patch_order_obj_line_add(
|
||||
order_id: str = Query(..., min_length=1, max_length=22),
|
||||
order_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Order_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -215,7 +215,7 @@ async def get_order_obj(
|
||||
@router.get('/{obj_type}/{obj_id}/order/list', response_model=Resp_Body_Base)
|
||||
async def get_obj_id_order_list(
|
||||
obj_type: str = Query(..., min_length=4, max_length=25), # Expects account or person
|
||||
obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
from_datetime: datetime.datetime = None,
|
||||
to_datetime: datetime.datetime = None,
|
||||
inc_order_cfg: bool = False,
|
||||
@@ -416,7 +416,7 @@ async def get_person_id_order_cart(
|
||||
|
||||
@router.delete('/order/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_order_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -47,7 +47,7 @@ async def post_order_cart_obj(
|
||||
# Update 2021-08-02 (partially)
|
||||
@router.patch('/{order_cart_id}', response_model=Resp_Body_Base)
|
||||
async def patch_order_cart_obj(
|
||||
order_cart_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_cart_id: str = Path(min_length=11, max_length=22),
|
||||
order_cart_obj: Order_Cart_Base = None,
|
||||
repl_order_cart_line_list: Optional[bool] = False, # Replace all the lines instead of trying to update
|
||||
# was repl_order_cart_line_list # NOTE: It was with out _list, just _li
|
||||
@@ -204,7 +204,7 @@ async def lookup_order_cart_obj(
|
||||
# Updated 2021-08-07
|
||||
@router.get('/{order_cart_id}', response_model=Resp_Body_Base)
|
||||
async def get_order_cart_obj(
|
||||
order_cart_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_cart_id: str = Path(min_length=11, max_length=22),
|
||||
limit: int = 500,
|
||||
enabled: str = 'enabled',
|
||||
inc_order_cart_line_list: bool = False,
|
||||
@@ -236,7 +236,7 @@ async def get_order_cart_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_order_cart_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -22,7 +22,7 @@ router = APIRouter()
|
||||
@router.get('/{obj_type}/{obj_id}/order/line/list', response_model=Resp_Body_Base)
|
||||
async def get_obj_id_order_line_list(
|
||||
obj_type: str = Query(..., min_length=4, max_length=25), # Expects account or order or person
|
||||
obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
from_datetime: datetime.datetime = None,
|
||||
to_datetime: datetime.datetime = None,
|
||||
prod_type: str = 'all', # all, cont_edu_cert, event, fundraising, membership, etc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -26,7 +26,7 @@ router = APIRouter()
|
||||
@router.post('/v3/person/{person_id}/order', response_model=Resp_Body_Base)
|
||||
async def post_order_obj(
|
||||
order_obj: Order_Base,
|
||||
person_id: str = Query(..., min_length=11, max_length=22),
|
||||
person_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_address: bool = False,
|
||||
inc_contact: bool = False,
|
||||
@@ -84,7 +84,7 @@ async def post_order_obj(
|
||||
# @router.patch('/v3/person/{person_id}/order/{order_id}', response_model=Resp_Body_Base)
|
||||
async def patch_order_obj(
|
||||
order_obj: Order_Base,
|
||||
order_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_id: str = Path(min_length=11, max_length=22),
|
||||
# person_id: str = Query(None, min_length=11, max_length=22),
|
||||
|
||||
inc_address: bool = False,
|
||||
@@ -147,7 +147,7 @@ async def patch_order_obj(
|
||||
@router.patch('/v3/order/{order_id}/line/add', response_model=Resp_Body_Base)
|
||||
async def patch_order_obj_add_line(
|
||||
order_line_obj: Order_Line_Base,
|
||||
order_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
# inc_order: bool = False,
|
||||
inc_order_line_list: bool = True,
|
||||
@@ -205,8 +205,8 @@ async def patch_order_obj_add_line(
|
||||
@router.patch('/v3/order/{order_id}/line/{order_line_id}/update', response_model=Resp_Body_Base)
|
||||
async def patch_order_obj_update_line(
|
||||
order_obj: Order_Line_Base,
|
||||
order_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_line_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_id: str = Path(min_length=11, max_length=22),
|
||||
order_line_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
# inc_order: bool = False,
|
||||
inc_order_line_list: bool = True,
|
||||
@@ -266,8 +266,8 @@ async def patch_order_obj_update_line(
|
||||
@router.patch('/v3/order/{order_id}/line/{order_line_id}/remove', response_model=Resp_Body_Base)
|
||||
async def patch_order_obj_remove_line(
|
||||
order_obj: Order_Line_Base,
|
||||
order_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_line_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_id: str = Path(min_length=11, max_length=22),
|
||||
order_line_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
# inc_order: bool = False,
|
||||
inc_order_line_list: bool = True,
|
||||
@@ -326,7 +326,7 @@ async def patch_order_obj_remove_line(
|
||||
@router.get('/v3/{for_obj_type}/{for_obj_id}/order/list', response_model=Resp_Body_Base)
|
||||
async def get_order_obj_li(
|
||||
for_obj_type: str = Query(..., min_length=2, max_length=50),
|
||||
for_obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
for_obj_id: str = Path(min_length=11, max_length=22),
|
||||
order_status: str = 'complete',
|
||||
order_checkout_status: str = 'complete',
|
||||
from_datetime: datetime.datetime = None,
|
||||
@@ -394,7 +394,7 @@ async def get_order_obj_li(
|
||||
# Updated 2022-12-18
|
||||
@router.get('/v3/order/{order_id}', response_model=Resp_Body_Base)
|
||||
async def get_order_obj(
|
||||
order_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_address: bool = False,
|
||||
inc_contact: bool = False,
|
||||
@@ -439,7 +439,7 @@ async def get_order_obj(
|
||||
# Updated 2022-12-18
|
||||
@router.get('/v3/person/{person_id}/order/cart', response_model=Resp_Body_Base)
|
||||
async def get_person_id_order_cart(
|
||||
person_id: str = Query(..., min_length=11, max_length=22),
|
||||
person_id: str = Path(min_length=11, max_length=22),
|
||||
enabled: str = 'enabled',
|
||||
inc_order_line_list: bool = False,
|
||||
inc_order_cfg: bool = False,
|
||||
@@ -462,7 +462,7 @@ async def get_person_id_order_cart(
|
||||
# Updated 2022-01-18
|
||||
@router.delete('/v3/order/{order_id}', response_model=Resp_Body_Base)
|
||||
async def delete_order_obj(
|
||||
order_id: str = Query(..., min_length=11, max_length=22),
|
||||
order_id: str = Path(min_length=11, max_length=22),
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, pytz, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_organization_obj(
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_organization_obj(
|
||||
obj: Organization_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -196,7 +196,7 @@ async def get_organization_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_organization_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_page_obj(
|
||||
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_page_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Page_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -138,7 +138,7 @@ async def get_page_obj_alias(
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_page_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -159,7 +159,7 @@ async def get_page_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_page_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, pytz, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -455,7 +455,7 @@ async def get_account_obj_person_list(
|
||||
|
||||
@router.delete('/person/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_person_obj(
|
||||
obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime, pytz, time
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_post_obj(
|
||||
|
||||
@router.patch('/post/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_post_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Post_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -159,7 +159,7 @@ async def get_account_obj_post_list(
|
||||
|
||||
@router.get('/post/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_post_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -180,7 +180,7 @@ async def get_post_obj(
|
||||
|
||||
@router.delete('/post/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_post_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_post_comment_obj(
|
||||
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_post_comment_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Post_Comment_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -95,7 +95,7 @@ async def get_post_comment_obj_li(
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_post_comment_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -116,7 +116,7 @@ async def get_post_comment_obj(
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_post_comment_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -46,7 +46,7 @@ async def post_product_obj(
|
||||
|
||||
@router.patch('/product/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_product_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Product_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -166,7 +166,7 @@ async def get_account_product_obj_li(
|
||||
|
||||
@router.get('/product/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_product_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -188,7 +188,7 @@ async def get_product_obj(
|
||||
|
||||
@router.delete('/product/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_product_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, pytz, secrets, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -46,7 +46,7 @@ async def post_site_obj(
|
||||
|
||||
@router.patch('/site/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_site_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Site_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -97,7 +97,7 @@ async def get_site_obj_li(
|
||||
|
||||
@router.get('/site/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_site_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -118,7 +118,7 @@ async def get_site_obj(
|
||||
|
||||
@router.delete('/site/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_site_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
#from datetime import datetime, time, timedelta
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -48,7 +48,7 @@ async def post_site_domain_obj(
|
||||
@router.patch('/site/domain/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_site_domain_obj(
|
||||
obj: Site_Domain_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(..., ),
|
||||
return_obj: bool = True,
|
||||
by_alias: bool = True,
|
||||
@@ -322,7 +322,7 @@ async def get_site_domain_obj(
|
||||
|
||||
@router.delete('/site/domain/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_site_domain_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, pytz, secrets, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -146,7 +146,7 @@ async def user_obj_change_password(
|
||||
@router.patch('/user/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_user_obj(
|
||||
obj: User_Base,
|
||||
obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
return_obj: Optional[bool] = True,
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
@@ -952,7 +952,7 @@ async def get_user_obj(
|
||||
|
||||
@router.delete('/user/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_user_obj(
|
||||
obj_id: str = Query(..., min_length=11, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime, pytz, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
|
||||
Reference in New Issue
Block a user