1. Badge Model Updates: Added print_count, print_first_datetime, and print_last_datetime to the
Event_Badge_Basic_Base model.
2. Soft Delete in V3 CRUD: Implemented a method query parameter (delete, hide, disable) for the DELETE
endpoints in api_crud_v3.py.
3. Security Hardening: Populated searchable_fields allowlists for all objects across the V3 CRUD
definitions (core.py, events.py, orders.py, cms.py, lookups.py, membership.py, other.py).
4. Shared Documentation: Created /home/scott/agents_sync/Aether/api_v3.md to coordinate these V3 API
features with the Svelte agent and other tools.
245 lines
9.0 KiB
Python
245 lines
9.0 KiB
Python
from app.models.sponsorship_models import *
|
|
from app.models.sponsorship_cfg_models import *
|
|
from app.models.archive_models import *
|
|
from app.models.archive_content_models import *
|
|
from app.models.hosted_file_models import *
|
|
from app.models.hosted_file_link_models import *
|
|
from app.models.e_stripe_models import *
|
|
from app.models.cont_edu_cert_models import *
|
|
from app.models.cont_edu_cert_person_models import *
|
|
from app.models.grant_models import *
|
|
|
|
other_obj_li = {
|
|
'sponsorship': {
|
|
'tbl': 'sponsorship',
|
|
'tbl_default': 'v_sponsorship',
|
|
'tbl_update': 'sponsorship',
|
|
'mdl': Sponsorship_Base,
|
|
'mdl_default': Sponsorship_Base,
|
|
'mdl_in': Sponsorship_Base,
|
|
'mdl_out': Sponsorship_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_sponsorship',
|
|
'tbl_name_update': 'sponsorship',
|
|
'base_name': Sponsorship_Base,
|
|
'exp_default': [
|
|
'sponsorship_id_random',
|
|
'name', 'description', 'website_url',
|
|
'level_num', 'level_str',
|
|
'agree',
|
|
'guest_li_json',
|
|
'comments',
|
|
'enable', 'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
|
|
],
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'sponsorship_id_random', 'account_id_random', 'name', 'description',
|
|
'website_url', 'level_str', 'enable', 'hide', 'priority', 'group',
|
|
'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'sponsorship_cfg': {
|
|
'tbl': 'sponsorship_cfg',
|
|
'tbl_default': 'v_sponsorship_cfg',
|
|
'tbl_update': 'sponsorship_cfg',
|
|
'mdl': Sponsorship_Cfg_Base,
|
|
'mdl_default': Sponsorship_Cfg_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_sponsorship_cfg',
|
|
'tbl_name_update': 'sponsorship_cfg',
|
|
'base_name': Sponsorship_Cfg_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'sponsorship_cfg_id_random', 'account_id_random', 'name',
|
|
'description', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'archive': {
|
|
'tbl': 'archive',
|
|
'tbl_default': 'v_archive',
|
|
'tbl_update': 'archive',
|
|
'mdl': Archive_Base,
|
|
'mdl_default': Archive_Base,
|
|
'mdl_in': Archive_Base,
|
|
'mdl_out': Archive_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_archive',
|
|
'tbl_name_update': 'archive',
|
|
'base_name': Archive_Base,
|
|
'exp_default': [
|
|
'archive_id_random',
|
|
'account_id_random',
|
|
'archive_type_id_random',
|
|
'name', 'description',
|
|
'content_html', 'content_json',
|
|
'url', 'url_text',
|
|
'hosted_file_id_random',
|
|
'file_path',
|
|
'filename', 'file_extension',
|
|
'original_datetime', 'original_timezone', 'original_location', 'original_address_id',
|
|
'original_url', 'original_url_text',
|
|
'meta_data', 'access_key',
|
|
'sort_by', 'sort_by_desc',
|
|
'enable', 'enable_from', 'enable_to',
|
|
'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
|
|
],
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'archive_id_random', 'account_id_random', 'archive_type_id_random',
|
|
'name', 'description', 'filename', 'original_location', 'enable',
|
|
'hide', 'priority', 'group', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'archive_content': {
|
|
'tbl': 'archive_content',
|
|
'tbl_default': 'v_archive_content',
|
|
'tbl_update': 'archive_content',
|
|
'mdl': Archive_Content_Base,
|
|
'mdl_default': Archive_Content_Base,
|
|
'mdl_in': Archive_Content_Base,
|
|
'mdl_out': Archive_Content_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_archive_content',
|
|
'tbl_name_update': 'archive_content',
|
|
'base_name': Archive_Content_Base,
|
|
'exp_default': [
|
|
'archive_content_id_random',
|
|
'archive_id_random',
|
|
'archive_content_type_id_random',
|
|
'lu_media_type_id_random',
|
|
'name', 'description',
|
|
'content_html', 'content_json',
|
|
'content_url', 'content_url_text',
|
|
'hosted_file_id_random',
|
|
'file_path',
|
|
'filename', 'file_extension',
|
|
'original_datetime', 'original_timezone', 'original_location', 'original_address_id',
|
|
'original_url', 'original_url_text',
|
|
'meta_data', 'access_key',
|
|
'enable_for_public',
|
|
'enable', 'enable_from', 'enable_to',
|
|
'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
|
|
],
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'archive_content_id_random', 'archive_id_random', 'name',
|
|
'description', 'filename', 'original_location', 'enable', 'hide',
|
|
'priority', 'group', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'hosted_file': {
|
|
'tbl': 'hosted_file',
|
|
'tbl_default': 'v_hosted_file',
|
|
'tbl_update': 'hosted_file',
|
|
'mdl': Hosted_File_Base,
|
|
'mdl_default': Hosted_File_Base,
|
|
'mdl_in': Hosted_File_Base,
|
|
'mdl_out': Hosted_File_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_hosted_file',
|
|
'tbl_name_update': 'hosted_file',
|
|
'base_name': Hosted_File_Base,
|
|
'exp_default': [
|
|
'hosted_file_id_random',
|
|
'hash_sha256',
|
|
'account_id_random',
|
|
'title', 'description',
|
|
'filename', 'extension',
|
|
'content_type'
|
|
'enable'
|
|
'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
|
|
],
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'hosted_file_id_random', 'account_id_random', 'hash_sha256', 'title',
|
|
'description', 'filename', 'extension', 'content_type', 'enable',
|
|
'hide', 'priority', 'group', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'hosted_file_link': {
|
|
'tbl': 'hosted_file_link',
|
|
'tbl_default': 'hosted_file_link',
|
|
'tbl_update': 'hosted_file_link',
|
|
'mdl': Hosted_File_Link_Base,
|
|
'mdl_default': Hosted_File_Link_Base,
|
|
'mdl_in': Hosted_File_Link_Base,
|
|
'mdl_out': Hosted_File_Link_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'hosted_file_link',
|
|
'tbl_name_update': 'hosted_file_link',
|
|
'base_name': Hosted_File_Link_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'hosted_file_link_id_random', 'hosted_file_id_random', 'for_type',
|
|
'for_id_random', 'enable', 'hide', 'priority', 'group',
|
|
'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'stripe_log': {
|
|
'tbl': 'stripe_log',
|
|
'tbl_update': 'stripe_log',
|
|
'mdl': Stripe_Log_Base_In,
|
|
# Legacy V2 keys:
|
|
'table_name': 'stripe_log',
|
|
'tbl_name_update': 'stripe_log',
|
|
'base_name': Stripe_Log_Base_In,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'stripe_log_id_random', 'account_id_random', 'person_id_random',
|
|
'user_id_random', 'event_id_random', 'order_id_random', 'type',
|
|
'status', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'cont_edu_cert': {
|
|
'tbl': 'cont_edu_cert',
|
|
'tbl_default': 'v_cont_edu_cert',
|
|
'tbl_update': 'cont_edu_cert',
|
|
'mdl': Cont_Edu_Cert_Base,
|
|
'mdl_default': Cont_Edu_Cert_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_cont_edu_cert',
|
|
'tbl_name_update': 'cont_edu_cert',
|
|
'base_name': Cont_Edu_Cert_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'cont_edu_cert_id_random', 'account_id_random', 'event_id_random',
|
|
'name', 'description', 'code', 'enable', 'hide', 'priority',
|
|
'group', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'cont_edu_cert_person': {
|
|
'tbl': 'cont_edu_cert_person',
|
|
'tbl_default': 'v_cont_edu_cert_person',
|
|
'tbl_update': 'cont_edu_cert_person',
|
|
'mdl': Cont_Edu_Cert_Person_Base,
|
|
'mdl_default': Cont_Edu_Cert_Person_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_cont_edu_cert_person',
|
|
'tbl_name_update': 'cont_edu_cert_person',
|
|
'base_name': Cont_Edu_Cert_Person_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'cont_edu_cert_person_id_random', 'cont_edu_cert_id_random',
|
|
'person_id_random', 'enable', 'hide', 'priority', 'group',
|
|
'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'grant': {
|
|
'tbl': 'grant',
|
|
'tbl_default': 'v_grant',
|
|
'tbl_update': 'grant',
|
|
'mdl': Grant_Base,
|
|
'mdl_default': Grant_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_grant',
|
|
'tbl_name_update': 'grant',
|
|
'base_name': Grant_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'grant_id_random', 'account_id_random', 'code', 'name',
|
|
'description', 'enable', 'hide', 'priority', 'group',
|
|
'created_on', 'updated_on'
|
|
],
|
|
},
|
|
}
|