This is a mostly working state again. Some files were backed up to ~/tmp/Aether_UI_UX_app. Things are slowly being merged back in. Not easy.
This commit is contained in:
48
src/lib/ae_api/api_get__data_store_v3.ts
Normal file
48
src/lib/ae_api/api_get__data_store_v3.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
import { get_object } from './api_get_object';
|
||||
|
||||
interface GetDataStoreV3Params {
|
||||
api_cfg: any;
|
||||
code: string;
|
||||
for_type?: string | null;
|
||||
for_id?: string | null;
|
||||
no_account_id?: boolean;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Data Store object by its human-friendly code (V3)
|
||||
* Uses hierarchical fallback logic (Specific -> Account -> Global)
|
||||
* Path: GET /v3/data_store/code/{code}
|
||||
*/
|
||||
export async function get_data_store_v3({
|
||||
api_cfg,
|
||||
code,
|
||||
for_type = null,
|
||||
for_id = null,
|
||||
no_account_id = false,
|
||||
log_lvl = 0
|
||||
}: GetDataStoreV3Params): Promise<any> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** get_data_store_v3() *** code=${code} no_account_id=${no_account_id}`);
|
||||
}
|
||||
|
||||
const endpoint = `/v3/data_store/code/${code}`;
|
||||
const params: key_val = {};
|
||||
if (for_type) params['for_type'] = for_type;
|
||||
if (for_id) params['for_id'] = for_id;
|
||||
|
||||
const headers: key_val = {};
|
||||
if (no_account_id) {
|
||||
// This token allows bypassing the mandatory account_id requirement for global defaults
|
||||
headers['x-no-account-id-token'] = 'Nothing to See Here';
|
||||
}
|
||||
|
||||
return await get_object({
|
||||
api_cfg,
|
||||
endpoint,
|
||||
params,
|
||||
headers,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
import Dexie, { type Table } from 'dexie';
|
||||
import type {
|
||||
ae_HostedFile,
|
||||
ae_Person,
|
||||
ae_User,
|
||||
ae_Account,
|
||||
ae_Site,
|
||||
ae_SiteDomain,
|
||||
ae_Address,
|
||||
ae_Contact
|
||||
import type {
|
||||
ae_HostedFile,
|
||||
ae_Person,
|
||||
ae_User,
|
||||
ae_Account,
|
||||
ae_Site,
|
||||
ae_SiteDomain,
|
||||
ae_Address,
|
||||
ae_Contact,
|
||||
ae_DataStore
|
||||
} from '$lib/types/ae_types';
|
||||
|
||||
// li = list
|
||||
@@ -32,7 +33,7 @@ export interface Person extends ae_Person {
|
||||
external_sys_id?: string;
|
||||
person_profile_id?: string;
|
||||
person_profile_id_random?: string;
|
||||
|
||||
|
||||
username?: string;
|
||||
user_name?: string;
|
||||
user_email?: string;
|
||||
@@ -53,24 +54,21 @@ export interface Person extends ae_Person {
|
||||
address_id_random?: string;
|
||||
}
|
||||
|
||||
export interface User extends ae_User {
|
||||
// Additional local fields if needed
|
||||
}
|
||||
|
||||
// Updated 2026-01-09
|
||||
// Updated 2026-01-28 - Unified Types and added Data Store
|
||||
export class MySubClassedDexie extends Dexie {
|
||||
file!: Table<ae_LocalFile>;
|
||||
person!: Table<Person>;
|
||||
user!: Table<User>;
|
||||
user!: Table<ae_User>;
|
||||
account!: Table<ae_Account>;
|
||||
site!: Table<ae_Site>;
|
||||
site_domain!: Table<ae_SiteDomain>;
|
||||
address!: Table<ae_Address>;
|
||||
contact!: Table<ae_Contact>;
|
||||
data_store!: Table<ae_DataStore>;
|
||||
|
||||
constructor() {
|
||||
super('ae_core_db');
|
||||
this.version(2).stores({
|
||||
this.version(3).stores({
|
||||
file: `
|
||||
id, hosted_file_id, hosted_file_id_random,
|
||||
hash_sha256,
|
||||
@@ -123,6 +121,16 @@ export class MySubClassedDexie extends Dexie {
|
||||
account_id, account_id_random,
|
||||
for_type, for_id_random,
|
||||
title, email, phone_mobile,
|
||||
enable, hide, priority, sort, group, created_on, updated_on`,
|
||||
|
||||
data_store: `
|
||||
id, data_store_id, data_store_id_random,
|
||||
account_id, account_id_random,
|
||||
for_type, for_id_random,
|
||||
code, name, type,
|
||||
[code+for_type+for_id_random],
|
||||
[code+account_id_random+for_type],
|
||||
[code+account_id_random],
|
||||
enable, hide, priority, sort, group, created_on, updated_on`
|
||||
});
|
||||
}
|
||||
|
||||
384
src/lib/elements/element_data_store_v3_alpha.svelte
Normal file
384
src/lib/elements/element_data_store_v3_alpha.svelte
Normal file
@@ -0,0 +1,384 @@
|
||||
<script lang="ts">
|
||||
import { browser } from '$app/environment';
|
||||
import { onMount, untrack } from 'svelte';
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
import { liveQuery } from 'dexie';
|
||||
|
||||
import { api } from '$lib/api/api';
|
||||
import { ae_loc, ae_sess, ae_api, slct } from '$lib/stores/ae_stores';
|
||||
import { db_core } from '$lib/ae_core/db_core';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
|
||||
interface Props {
|
||||
log_lvl?: number;
|
||||
expire_minutes?: number;
|
||||
mount_reload_sec?: number;
|
||||
ds_code: string;
|
||||
ds_name?: null | string;
|
||||
ds_type?: string;
|
||||
for_type?: null | string;
|
||||
for_id?: null | string;
|
||||
class_li?: string;
|
||||
try_cache?: boolean;
|
||||
hide?: boolean;
|
||||
show_edit?: boolean;
|
||||
show_edit_btn?: boolean;
|
||||
show_view?: boolean;
|
||||
ds_loaded?: boolean;
|
||||
debug?: boolean;
|
||||
ds_loading_status?: string;
|
||||
val_sql?: null | key_val;
|
||||
}
|
||||
|
||||
let {
|
||||
log_lvl = 0,
|
||||
expire_minutes = 15,
|
||||
mount_reload_sec = 0,
|
||||
ds_code,
|
||||
ds_name = null,
|
||||
ds_type = 'text',
|
||||
for_type = null,
|
||||
for_id = null,
|
||||
class_li = '',
|
||||
try_cache = true,
|
||||
hide = false,
|
||||
show_edit = $bindable(false),
|
||||
show_edit_btn = false,
|
||||
show_view = $bindable(true),
|
||||
ds_loaded = $bindable(false),
|
||||
debug = false,
|
||||
ds_loading_status = $bindable('starting'),
|
||||
val_sql = $bindable(null)
|
||||
}: Props = $props();
|
||||
|
||||
// Local reactive state
|
||||
let trigger: null | string = $state(null);
|
||||
let ds_submit_results: Promise<any> | key_val | undefined = $state();
|
||||
|
||||
// Dexie LiveQuery for data store
|
||||
let lq__ds_obj = $derived(
|
||||
liveQuery(async () => {
|
||||
const current_code = ds_code;
|
||||
const account_id = $slct.account_id;
|
||||
const current_for_type = for_type;
|
||||
const current_for_id = for_id;
|
||||
|
||||
if (!current_code) return null;
|
||||
|
||||
if (log_lvl > 1) console.log(`ae_e_data_store [${current_code}]: LQ Lookup...`, { account_id, current_for_type, current_for_id });
|
||||
|
||||
// Hierarchical Local Lookup (Specific -> Account -> Global)
|
||||
let result = null;
|
||||
|
||||
// 1. Specific Lookup
|
||||
if (current_for_type && current_for_id) {
|
||||
result = await db_core.data_store
|
||||
.where('[code+for_type+for_id_random]')
|
||||
.equals([current_code, current_for_type, current_for_id])
|
||||
.first();
|
||||
}
|
||||
|
||||
// 2. Account Lookup
|
||||
if (!result && account_id) {
|
||||
result = await db_core.data_store
|
||||
.where('[code+account_id_random+for_type]')
|
||||
.equals([current_code, account_id, null])
|
||||
.first();
|
||||
}
|
||||
|
||||
// 3. Global Lookup
|
||||
if (!result) {
|
||||
result = await db_core.data_store
|
||||
.where('[code+account_id_random+for_type]')
|
||||
.equals([current_code, null, null])
|
||||
.first();
|
||||
}
|
||||
|
||||
if (log_lvl > 1) console.log(`ae_e_data_store [${current_code}]: LQ Result:`, result);
|
||||
|
||||
// Update loaded status
|
||||
ds_loaded = !!result;
|
||||
if (result) ds_loading_status = 'loaded';
|
||||
|
||||
return result;
|
||||
})
|
||||
);
|
||||
|
||||
// Initial Trigger & Context Change Guard
|
||||
$effect(() => {
|
||||
const account_id = $slct.account_id;
|
||||
const api_ready = !!$ae_api?.base_url;
|
||||
|
||||
if (browser && api_ready && account_id) {
|
||||
// Only trigger if not loaded or if we want a fresh check
|
||||
if (!trigger) trigger = 'load__ds__code';
|
||||
}
|
||||
});
|
||||
|
||||
// Fetch handler
|
||||
$effect(() => {
|
||||
if (trigger === 'load__ds__code') {
|
||||
untrack(() => {
|
||||
trigger = null;
|
||||
load_data_store();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Mount reload logic
|
||||
onMount(() => {
|
||||
if (mount_reload_sec > 0) {
|
||||
const random_ms = Math.floor(Math.random() * mount_reload_sec * 1000);
|
||||
setTimeout(() => { trigger = 'load__ds__code'; }, random_ms);
|
||||
}
|
||||
});
|
||||
|
||||
async function load_data_store() {
|
||||
ds_loading_status = 'loading';
|
||||
const api_cfg = untrack(() => $ae_api);
|
||||
|
||||
if (log_lvl) console.log(`ae_e_data_store [${ds_code}]: Fetching...`);
|
||||
|
||||
try {
|
||||
// Attempt 1: Context-specific fetch
|
||||
let ds_results = await api.get_data_store_v3({
|
||||
api_cfg,
|
||||
code: ds_code,
|
||||
for_type: for_type,
|
||||
for_id: for_id,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
|
||||
const status_code = ds_results?.meta?.status_code || (ds_results === false ? 500 : 200);
|
||||
|
||||
// Fallback to Global if not found or unauthorized for account
|
||||
if (!ds_results || status_code === 403 || status_code === 401) {
|
||||
if (log_lvl) console.log(`ae_e_data_store [${ds_code}]: Trying global fallback.`);
|
||||
ds_results = await api.get_data_store_v3({
|
||||
api_cfg,
|
||||
code: ds_code,
|
||||
no_account_id: true,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
}
|
||||
|
||||
const ds_id = ds_results?.data_store_id_random || ds_results?.id_random || ds_results?.id || ds_results?.data_store_id;
|
||||
|
||||
if (ds_results && ds_id) {
|
||||
// Save to Dexie
|
||||
const ds_to_save = {
|
||||
...ds_results,
|
||||
id: ds_id,
|
||||
data_store_id: ds_id,
|
||||
data_store_id_random: ds_id,
|
||||
account_id: ds_results.account_id_random || ds_results.account_id,
|
||||
account_id_random: ds_results.account_id_random || ds_results.account_id,
|
||||
updated_on: ds_results.updated_on || new Date().toISOString()
|
||||
};
|
||||
|
||||
await db_core.data_store.put(ds_to_save);
|
||||
if (log_lvl) console.log(`ae_e_data_store [${ds_code}]: Saved to Dexie. ID: ${ds_id}`);
|
||||
} else {
|
||||
ds_loading_status = 'not found';
|
||||
if (log_lvl) console.warn(`ae_e_data_store [${ds_code}]: Result had no valid ID.`);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`ae_e_data_store [${ds_code}]: Fetch failed.`, err);
|
||||
ds_loading_status = 'error';
|
||||
}
|
||||
}
|
||||
|
||||
async function handle_submit_form(event: Event) {
|
||||
const target = event.target as HTMLFormElement;
|
||||
$ae_sess.ds.submit_status = 'processing';
|
||||
|
||||
const form_data = new FormData(target);
|
||||
const data_store_di = ae_util.extract_prefixed_form_data({
|
||||
prefix: null,
|
||||
form_data,
|
||||
trim_values: true,
|
||||
bool_tf_str: true
|
||||
});
|
||||
|
||||
const data_store_do: key_val = {
|
||||
code: data_store_di.ds_code ?? ds_code,
|
||||
name: data_store_di.ds_name ?? ds_name,
|
||||
type: data_store_di.ds_type ?? ds_type,
|
||||
for_type: data_store_di.ds_for_type ?? null,
|
||||
for_id_random: data_store_di.ds_for_id ?? null,
|
||||
access_read: data_store_di.ds_access_read,
|
||||
access_write: data_store_di.ds_access_write,
|
||||
access_delete: data_store_di.ds_access_delete,
|
||||
enable: data_store_di.ds_enable ?? true,
|
||||
account_id_random: data_store_di.ds_use_account_id ? (data_store_di.ds_account_id ?? $slct.account_id) : null
|
||||
};
|
||||
|
||||
if (data_store_do.type === 'json') {
|
||||
data_store_do.json = data_store_di.ds_value;
|
||||
} else {
|
||||
data_store_do.text = data_store_di.ds_value;
|
||||
}
|
||||
|
||||
const api_cfg = untrack(() => $ae_api);
|
||||
|
||||
if ($lq__ds_obj?.id) {
|
||||
ds_submit_results = api.update_ae_obj_v3({
|
||||
api_cfg,
|
||||
obj_type: 'data_store',
|
||||
obj_id: $lq__ds_obj.id,
|
||||
fields: data_store_do
|
||||
}).then((res) => {
|
||||
if (res) {
|
||||
$ae_sess.ds.submit_status = 'updated';
|
||||
trigger = 'load__ds__code';
|
||||
}
|
||||
return res;
|
||||
});
|
||||
} else {
|
||||
ds_submit_results = api.create_ae_obj_v3({
|
||||
api_cfg,
|
||||
obj_type: 'data_store',
|
||||
fields: data_store_do
|
||||
}).then((res) => {
|
||||
if (res) {
|
||||
$ae_sess.ds.submit_status = 'created';
|
||||
trigger = 'load__ds__code';
|
||||
}
|
||||
return res;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async function handle_delete() {
|
||||
if (!$lq__ds_obj?.id || !confirm('Are you sure you want to delete this data store?')) return;
|
||||
|
||||
const api_cfg = untrack(() => $ae_api);
|
||||
const res = await api.delete_ae_obj_v3({
|
||||
api_cfg,
|
||||
obj_type: 'data_store',
|
||||
obj_id: $lq__ds_obj.id,
|
||||
method: 'delete'
|
||||
});
|
||||
|
||||
if (res) {
|
||||
await db_core.data_store.delete($lq__ds_obj.id);
|
||||
ds_loading_status = 'not found';
|
||||
show_edit = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="ae__elem__data_store relative {class_li}" class:hidden={hide}>
|
||||
{#if $lq__ds_obj}
|
||||
{#if debug || $ae_loc.debug === 'debug'}
|
||||
<pre class="text-[10px] bg-black/10 p-2 rounded mb-2">
|
||||
ID: {$lq__ds_obj.id}
|
||||
Code: {$lq__ds_obj.code}
|
||||
Name: {$lq__ds_obj.name}
|
||||
Type: {$lq__ds_obj.type}
|
||||
Created: {$lq__ds_obj.created_on}
|
||||
Updated: {$lq__ds_obj.updated_on}
|
||||
Account: {$lq__ds_obj.account_id_random || 'Global / NULL'}
|
||||
</pre>
|
||||
{/if}
|
||||
|
||||
<Modal
|
||||
title="{$lq__ds_obj.name || 'Unnamed'} - {$lq__ds_obj.code}"
|
||||
bind:open={show_edit}
|
||||
autoclose={false}
|
||||
size="xl"
|
||||
class="w-full max-w-6xl"
|
||||
>
|
||||
<form class="flex flex-col gap-4" onsubmit={(e) => { e.preventDefault(); handle_submit_form(e); }}>
|
||||
<input type="hidden" name="ds_id_random" value={$lq__ds_obj.id} />
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div class="space-y-2">
|
||||
<label class="label">
|
||||
<span class="text-xs font-bold opacity-70">Code</span>
|
||||
<input type="text" name="ds_code" class="input font-mono" value={$lq__ds_obj.code} readonly={!$ae_loc.manager_access} required />
|
||||
</label>
|
||||
<label class="label">
|
||||
<span class="text-xs font-bold opacity-70">Name</span>
|
||||
<input type="text" name="ds_name" class="input" value={$lq__ds_obj.name} required />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<label class="label">
|
||||
<span class="text-xs font-bold opacity-70">Type</span>
|
||||
<select name="ds_type" class="select" value={$lq__ds_obj.type}>
|
||||
<option value="text">Text</option>
|
||||
<option value="html">HTML</option>
|
||||
<option value="json">JSON</option>
|
||||
<option value="md">Markdown</option>
|
||||
<option value="sql">SQL</option>
|
||||
</select>
|
||||
</label>
|
||||
<div class="flex items-center gap-2 pt-6">
|
||||
<input type="checkbox" name="ds_use_account_id" class="checkbox" checked={!!$lq__ds_obj.account_id_random} />
|
||||
<span class="text-xs">Account Specific</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<span class="text-xs font-bold opacity-70">Content</span>
|
||||
<textarea
|
||||
name="ds_value"
|
||||
class="textarea font-mono text-sm"
|
||||
rows="15"
|
||||
placeholder="Enter content here..."
|
||||
>{$lq__ds_obj.type === 'json' ? JSON.stringify($lq__ds_obj.json, null, 2) : ($lq__ds_obj.text || $lq__ds_obj.html || '')}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between items-center pt-4">
|
||||
<button type="button" class="btn variant-filled-error" onclick={handle_delete}>
|
||||
<span class="fas fa-trash mr-2"></span> Delete
|
||||
</button>
|
||||
|
||||
<div class="flex gap-2">
|
||||
<button type="button" class="btn variant-soft" onclick={() => show_edit = false}>Cancel</button>
|
||||
<button type="submit" class="btn variant-filled-primary">
|
||||
<span class="fas fa-save mr-2"></span> Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Modal>
|
||||
|
||||
{#if $lq__ds_obj.type === 'html' && $lq__ds_obj.html}
|
||||
{@html $lq__ds_obj.html}
|
||||
{:else if $lq__ds_obj.type === 'text' && $lq__ds_obj.text}
|
||||
<div class="whitespace-pre-wrap">{$lq__ds_obj.text}</div>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.edit_mode && ($ae_loc.manager_access || (show_edit_btn && $ae_loc.administrator_access))}
|
||||
<button
|
||||
type="button"
|
||||
class="absolute top-0 right-0 btn btn-sm variant-soft-warning opacity-20 hover:opacity-100 z-10"
|
||||
onclick={() => { show_edit = true; show_view = false; }}
|
||||
title="Edit Data Store: {ds_code}"
|
||||
>
|
||||
<span class="fas fa-edit"></span>
|
||||
</button>
|
||||
{/if}
|
||||
{:else if ds_loading_status === 'not found'}
|
||||
<div class="p-2 border border-dashed border-surface-500/30 rounded text-xs opacity-50">
|
||||
Data Store not found: {ds_code}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if ds_loading_status === 'loading'}
|
||||
<div class="absolute bottom-0 left-0 p-1 opacity-50">
|
||||
<span class="fas fa-spinner fa-spin text-xs"></span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.ae__elem__data_store {
|
||||
/* Base styles */
|
||||
}
|
||||
</style>
|
||||
@@ -8,22 +8,22 @@
|
||||
*/
|
||||
export interface ae_BaseObj {
|
||||
id: string; // Primary key (maps to [obj_type]_id_random)
|
||||
|
||||
|
||||
code?: string | null;
|
||||
name?: string;
|
||||
short_name?: string;
|
||||
description?: string | null;
|
||||
|
||||
|
||||
enable: boolean | null;
|
||||
hide: boolean | null;
|
||||
archive?: boolean;
|
||||
archive_on?: string | Date;
|
||||
|
||||
|
||||
priority: boolean | null;
|
||||
sort: number | null;
|
||||
group?: string;
|
||||
notes?: string;
|
||||
|
||||
|
||||
created_on: string | Date;
|
||||
updated_on: string | Date;
|
||||
|
||||
@@ -39,7 +39,7 @@ export interface ae_BaseObj {
|
||||
export interface ae_Account extends ae_BaseObj {
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
account_cfg?: ae_AccountCfg;
|
||||
}
|
||||
|
||||
@@ -49,14 +49,14 @@ export interface ae_Account extends ae_BaseObj {
|
||||
export interface ae_AccountCfg {
|
||||
id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
modules_enabled?: any;
|
||||
default_no_reply_email?: string;
|
||||
default_no_reply_name?: string;
|
||||
|
||||
|
||||
post_rules?: string;
|
||||
post_comment_rules?: string;
|
||||
|
||||
|
||||
created_on: string | Date;
|
||||
updated_on: string | Date;
|
||||
}
|
||||
@@ -69,18 +69,18 @@ export interface ae_Site extends ae_BaseObj {
|
||||
site_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
url_root?: string;
|
||||
site_cfg_json?: any;
|
||||
|
||||
|
||||
restrict_access?: boolean;
|
||||
access_key?: string;
|
||||
|
||||
|
||||
logo_path?: string;
|
||||
logo_bg_color?: string;
|
||||
background_image_path?: string;
|
||||
background_bg_color?: string;
|
||||
|
||||
|
||||
title?: string;
|
||||
tagline?: string;
|
||||
}
|
||||
@@ -95,11 +95,11 @@ export interface ae_SiteDomain extends ae_BaseObj {
|
||||
site_id_random: string;
|
||||
account_id?: string;
|
||||
account_id_random?: string;
|
||||
|
||||
|
||||
fqdn: string;
|
||||
is_primary?: boolean;
|
||||
redirect_to_primary?: boolean;
|
||||
|
||||
|
||||
access_key?: string;
|
||||
|
||||
// Joined fields for bootstrap lookup
|
||||
@@ -126,25 +126,25 @@ export interface ae_Journal extends ae_BaseObj {
|
||||
account_id_random: string;
|
||||
person_id?: string;
|
||||
person_id_random?: string;
|
||||
|
||||
|
||||
for_type?: string;
|
||||
for_id?: string;
|
||||
for_id_random?: string;
|
||||
|
||||
|
||||
type_code?: string;
|
||||
tags?: string;
|
||||
|
||||
|
||||
summary?: string;
|
||||
outline?: string;
|
||||
|
||||
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
timezone?: string;
|
||||
|
||||
|
||||
passcode?: string;
|
||||
passcode_timeout?: number;
|
||||
private_passcode?: string;
|
||||
|
||||
|
||||
cfg_json?: any;
|
||||
data_json?: any;
|
||||
meta_json?: any;
|
||||
@@ -162,19 +162,19 @@ export interface ae_JournalEntry extends ae_BaseObj {
|
||||
journal_entry_id_random: string;
|
||||
journal_id: string;
|
||||
journal_id_random: string;
|
||||
|
||||
|
||||
person_id?: string;
|
||||
person_id_random?: string;
|
||||
|
||||
|
||||
template?: boolean;
|
||||
|
||||
|
||||
journal_entry_type?: string;
|
||||
activity_code?: string;
|
||||
category_code?: string;
|
||||
type_code?: string;
|
||||
topic_code?: string;
|
||||
tags?: string;
|
||||
|
||||
|
||||
public?: boolean;
|
||||
private?: boolean;
|
||||
personal?: boolean;
|
||||
@@ -182,7 +182,7 @@ export interface ae_JournalEntry extends ae_BaseObj {
|
||||
|
||||
summary?: string;
|
||||
outline?: string;
|
||||
|
||||
|
||||
content?: string;
|
||||
content_md_html?: string;
|
||||
content_html?: string;
|
||||
@@ -194,7 +194,7 @@ export interface ae_JournalEntry extends ae_BaseObj {
|
||||
history_encrypted?: string;
|
||||
|
||||
passcode_hash?: string;
|
||||
|
||||
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
timezone?: string;
|
||||
@@ -216,7 +216,7 @@ export interface ae_JournalEntry extends ae_BaseObj {
|
||||
|
||||
alert?: boolean;
|
||||
alert_msg?: string;
|
||||
|
||||
|
||||
data_json?: any;
|
||||
meta_json?: any;
|
||||
|
||||
@@ -234,7 +234,7 @@ export interface ae_Person extends ae_BaseObj {
|
||||
person_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
user_id?: string;
|
||||
user_id_random?: string;
|
||||
|
||||
@@ -245,26 +245,26 @@ export interface ae_Person extends ae_BaseObj {
|
||||
family_name?: string;
|
||||
suffix?: string;
|
||||
designations?: string;
|
||||
|
||||
|
||||
full_name?: string;
|
||||
informal_name?: string;
|
||||
preferred_display_name?: string;
|
||||
|
||||
|
||||
professional_title?: string;
|
||||
affiliations?: string;
|
||||
|
||||
|
||||
primary_email?: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
|
||||
|
||||
birth_date?: string | Date;
|
||||
gender_name?: string;
|
||||
|
||||
|
||||
tagline?: string;
|
||||
|
||||
|
||||
allow_auth_key?: boolean;
|
||||
passcode?: string;
|
||||
|
||||
|
||||
data_json?: any;
|
||||
}
|
||||
|
||||
@@ -278,20 +278,20 @@ export interface ae_User extends ae_BaseObj {
|
||||
account_id_random: string;
|
||||
person_id?: string;
|
||||
person_id_random?: string;
|
||||
|
||||
|
||||
username: string;
|
||||
email?: string;
|
||||
|
||||
|
||||
// Permissions (Maps to $ae_loc logic)
|
||||
super: boolean;
|
||||
manager: boolean;
|
||||
administrator: boolean;
|
||||
public: boolean;
|
||||
|
||||
|
||||
status_name?: string;
|
||||
logged_in_on?: string | Date;
|
||||
last_activity_on?: string | Date;
|
||||
|
||||
|
||||
user_role_list?: ae_UserRole[];
|
||||
}
|
||||
|
||||
@@ -301,14 +301,14 @@ export interface ae_User extends ae_BaseObj {
|
||||
export interface ae_UserRole {
|
||||
id: string;
|
||||
user_id_random: string;
|
||||
|
||||
|
||||
for_type?: string;
|
||||
for_id_random?: string;
|
||||
|
||||
|
||||
code?: string;
|
||||
name?: string;
|
||||
enable: boolean;
|
||||
|
||||
|
||||
created_on: string | Date;
|
||||
updated_on: string | Date;
|
||||
}
|
||||
@@ -321,13 +321,13 @@ export interface ae_Address extends ae_BaseObj {
|
||||
address_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
for_type?: string;
|
||||
for_id_random?: string;
|
||||
|
||||
|
||||
attention_to?: string;
|
||||
organization_name?: string;
|
||||
|
||||
|
||||
line_1: string;
|
||||
line_2?: string;
|
||||
line_3?: string;
|
||||
@@ -336,7 +336,7 @@ export interface ae_Address extends ae_BaseObj {
|
||||
postal_code?: string;
|
||||
country?: string;
|
||||
country_name?: string;
|
||||
|
||||
|
||||
timezone?: string;
|
||||
latitude?: string;
|
||||
longitude?: string;
|
||||
@@ -350,19 +350,19 @@ export interface ae_Contact extends ae_BaseObj {
|
||||
contact_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
address_id_random?: string;
|
||||
for_type?: string;
|
||||
for_id_random?: string;
|
||||
|
||||
|
||||
title?: string;
|
||||
tagline?: string;
|
||||
|
||||
|
||||
email?: string;
|
||||
phone_mobile?: string;
|
||||
phone_office?: string;
|
||||
website_url?: string;
|
||||
|
||||
|
||||
facebook_url?: string;
|
||||
instagram_url?: string;
|
||||
linkedin_url?: string;
|
||||
@@ -376,20 +376,20 @@ export interface ae_ActivityLog extends ae_BaseObj {
|
||||
activity_log_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
person_id_random?: string;
|
||||
user_id_random?: string;
|
||||
|
||||
|
||||
external_client_id?: string;
|
||||
source?: string;
|
||||
|
||||
|
||||
object_type?: string;
|
||||
object_id_random?: string;
|
||||
|
||||
|
||||
action: string;
|
||||
action_on_type?: string;
|
||||
action_on_id_random?: string;
|
||||
|
||||
|
||||
details?: string;
|
||||
other_json?: any;
|
||||
}
|
||||
@@ -402,25 +402,25 @@ export interface ae_Event extends ae_BaseObj {
|
||||
event_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
conference: boolean;
|
||||
type?: string;
|
||||
name: string;
|
||||
summary?: string;
|
||||
description?: string;
|
||||
|
||||
|
||||
timezone?: string;
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
|
||||
|
||||
location_text?: string;
|
||||
location_address_json?: any;
|
||||
|
||||
|
||||
status?: string;
|
||||
approve?: boolean;
|
||||
ready?: boolean;
|
||||
ready_on?: string | Date;
|
||||
|
||||
|
||||
cfg_json?: any;
|
||||
data_json?: any;
|
||||
|
||||
@@ -445,10 +445,10 @@ export interface ae_Event extends ae_BaseObj {
|
||||
*/
|
||||
export interface ae_EventCfg extends ae_BaseObj {
|
||||
event_id_random: string;
|
||||
|
||||
|
||||
enable_comments?: boolean;
|
||||
unauthenticated_access?: boolean;
|
||||
|
||||
|
||||
mod_abstracts_json?: any;
|
||||
mod_badges_json?: any;
|
||||
mod_exhibits_json?: any;
|
||||
@@ -466,33 +466,33 @@ export interface ae_EventBadge extends ae_BaseObj {
|
||||
person_id_random: string;
|
||||
event_person_id?: string;
|
||||
event_person_id_random?: string;
|
||||
|
||||
|
||||
event_badge_template_id?: string;
|
||||
event_badge_template_id_random?: string;
|
||||
|
||||
|
||||
badge_type_code?: string;
|
||||
badge_type?: string;
|
||||
|
||||
|
||||
member_type_code?: string;
|
||||
member_status?: string;
|
||||
|
||||
|
||||
pronouns?: string;
|
||||
given_name?: string;
|
||||
middle_name?: string;
|
||||
family_name?: string;
|
||||
full_name?: string;
|
||||
affiliations?: string;
|
||||
|
||||
|
||||
professional_title?: string;
|
||||
email?: string;
|
||||
city?: string;
|
||||
state_province?: string;
|
||||
country?: string;
|
||||
|
||||
|
||||
print_count?: number;
|
||||
print_first_datetime?: string | Date;
|
||||
print_last_datetime?: string | Date;
|
||||
|
||||
|
||||
ticket_list?: any[];
|
||||
data_json?: any;
|
||||
}
|
||||
@@ -505,18 +505,18 @@ export interface ae_EventBadgeTemplate extends ae_BaseObj {
|
||||
event_badge_template_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
|
||||
logo_path?: string;
|
||||
header_path?: string;
|
||||
header_row_1?: string;
|
||||
header_row_2?: string;
|
||||
|
||||
|
||||
footer_path?: string;
|
||||
footer_title?: string;
|
||||
|
||||
|
||||
badge_type_list?: any;
|
||||
ticket_list?: any;
|
||||
|
||||
|
||||
layout?: string;
|
||||
style_href?: string;
|
||||
passcode?: string;
|
||||
@@ -530,14 +530,14 @@ export interface ae_EventLocation extends ae_BaseObj {
|
||||
event_location_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
|
||||
location_type?: string;
|
||||
location_type_code?: string;
|
||||
|
||||
|
||||
internal_use?: boolean;
|
||||
record_audio?: boolean;
|
||||
record_video?: boolean;
|
||||
|
||||
|
||||
passcode?: string;
|
||||
data_json?: any;
|
||||
}
|
||||
@@ -554,19 +554,19 @@ export interface ae_EventSession extends ae_BaseObj {
|
||||
event_location_id_random?: string | null;
|
||||
event_track_id?: string | null;
|
||||
event_track_id_random?: string | null;
|
||||
|
||||
|
||||
type_code?: string | null;
|
||||
start_datetime?: string | Date | null;
|
||||
end_datetime?: string | Date | null;
|
||||
|
||||
|
||||
internal_use?: boolean | null;
|
||||
record_audio?: boolean | null;
|
||||
record_video?: boolean | null;
|
||||
|
||||
|
||||
status?: number | null;
|
||||
approve?: boolean | null;
|
||||
ready?: boolean | null;
|
||||
|
||||
|
||||
data_json?: any;
|
||||
|
||||
// Additional database view fields found in db_events.ts
|
||||
@@ -602,13 +602,13 @@ export interface ae_EventPresentation extends ae_BaseObj {
|
||||
event_session_id_random: string;
|
||||
event_abstract_id?: string | null;
|
||||
event_abstract_id_random?: string | null;
|
||||
|
||||
|
||||
abstract_code?: string | null;
|
||||
type_code?: string | null;
|
||||
|
||||
|
||||
start_datetime?: string | Date | null;
|
||||
end_datetime?: string | Date | null;
|
||||
|
||||
|
||||
passcode?: string | null;
|
||||
file_count?: number | null;
|
||||
|
||||
@@ -629,7 +629,7 @@ export interface ae_EventPresenter extends ae_BaseObj {
|
||||
event_id_random: string;
|
||||
person_id: string;
|
||||
person_id_random: string;
|
||||
|
||||
|
||||
pronouns?: string;
|
||||
given_name?: string;
|
||||
middle_name?: string;
|
||||
@@ -637,11 +637,11 @@ export interface ae_EventPresenter extends ae_BaseObj {
|
||||
full_name?: string;
|
||||
affiliations?: string;
|
||||
email?: string;
|
||||
|
||||
|
||||
professional_title?: string;
|
||||
tagline?: string;
|
||||
biography?: string;
|
||||
|
||||
|
||||
agree?: boolean;
|
||||
data_json?: any;
|
||||
}
|
||||
@@ -654,10 +654,10 @@ export interface ae_EventTrack extends ae_BaseObj {
|
||||
event_track_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
|
||||
track_type?: string;
|
||||
track_type_code?: string;
|
||||
|
||||
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
}
|
||||
@@ -670,7 +670,7 @@ export interface ae_HostedFile extends ae_BaseObj {
|
||||
hosted_file_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
hash_sha256?: string;
|
||||
subdirectory_path?: string;
|
||||
filename?: string;
|
||||
@@ -688,7 +688,7 @@ export interface ae_HostedFileLink {
|
||||
hosted_file_id_random: string;
|
||||
link_to_type: string;
|
||||
link_to_id_random: string;
|
||||
|
||||
|
||||
created_on: string | Date;
|
||||
updated_on: string | Date;
|
||||
}
|
||||
@@ -699,15 +699,30 @@ export interface ae_HostedFileLink {
|
||||
export interface ae_DataStore extends ae_BaseObj {
|
||||
data_store_id: string;
|
||||
data_store_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
for_type?: string;
|
||||
for_id_random?: string;
|
||||
|
||||
type?: string;
|
||||
json_str?: any;
|
||||
text?: string;
|
||||
account_id?: null | string;
|
||||
account_id_random?: null | string;
|
||||
|
||||
for_type?: null | string;
|
||||
for_id_random?: null | string;
|
||||
for_id?: null | string;
|
||||
|
||||
person_id_random?: null | string;
|
||||
user_id_random?: null | string;
|
||||
|
||||
type?: null | string;
|
||||
|
||||
json?: any;
|
||||
json_str?: null | string;
|
||||
text?: null | string;
|
||||
html?: null | string;
|
||||
|
||||
meta_json?: null | string;
|
||||
meta_text?: null | string;
|
||||
|
||||
access?: null | string;
|
||||
access_read?: null | string;
|
||||
access_write?: null | string;
|
||||
access_delete?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -718,15 +733,15 @@ export interface ae_Post extends ae_BaseObj {
|
||||
post_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
title: string;
|
||||
content: string;
|
||||
type?: string;
|
||||
|
||||
|
||||
anonymous: boolean;
|
||||
full_name?: string;
|
||||
email?: string;
|
||||
|
||||
|
||||
post_comment_count?: number;
|
||||
approve?: boolean;
|
||||
ready?: boolean;
|
||||
@@ -739,7 +754,7 @@ export interface ae_PostComment extends ae_BaseObj {
|
||||
post_comment_id: string;
|
||||
post_comment_id_random: string;
|
||||
post_id_random: string;
|
||||
|
||||
|
||||
content: string;
|
||||
anonymous: boolean;
|
||||
full_name?: string;
|
||||
@@ -753,7 +768,7 @@ export interface ae_Page extends ae_BaseObj {
|
||||
page_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
alias: string;
|
||||
title: string;
|
||||
body: string;
|
||||
@@ -768,18 +783,18 @@ export interface ae_Archive extends ae_BaseObj {
|
||||
archive_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
archive_type?: string;
|
||||
topic_id?: string;
|
||||
topic_name?: string;
|
||||
|
||||
|
||||
content_html?: string;
|
||||
|
||||
|
||||
original_datetime?: string | Date;
|
||||
original_location?: string;
|
||||
|
||||
|
||||
archive_on?: string | Date;
|
||||
|
||||
|
||||
archive_content_count?: number;
|
||||
}
|
||||
|
||||
@@ -790,13 +805,13 @@ export interface ae_ArchiveContent extends ae_BaseObj {
|
||||
archive_content_id: string;
|
||||
archive_content_id_random: string;
|
||||
archive_id_random: string;
|
||||
|
||||
|
||||
archive_content_type?: string;
|
||||
content_html?: string;
|
||||
url?: string;
|
||||
|
||||
|
||||
duration?: string;
|
||||
|
||||
|
||||
hosted_file_id_random?: string;
|
||||
filename?: string;
|
||||
subdirectory_path?: string;
|
||||
@@ -810,15 +825,15 @@ export interface ae_EventFile extends ae_BaseObj {
|
||||
event_file_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
|
||||
hosted_file_id_random?: string;
|
||||
for_type?: string;
|
||||
for_id_random?: string;
|
||||
|
||||
|
||||
filename?: string;
|
||||
filename_no_ext?: string;
|
||||
extension?: string;
|
||||
|
||||
|
||||
file_purpose?: string;
|
||||
approve?: boolean;
|
||||
}
|
||||
@@ -832,11 +847,11 @@ export interface ae_EventDevice extends ae_BaseObj {
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
event_location_id_random?: string;
|
||||
|
||||
|
||||
app_mode?: string;
|
||||
status?: string;
|
||||
heartbeat?: string | Date;
|
||||
|
||||
|
||||
info_hostname?: string;
|
||||
info_ip?: string;
|
||||
}
|
||||
@@ -849,7 +864,7 @@ export interface ae_EventAbstract extends ae_BaseObj {
|
||||
event_abstract_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
|
||||
external_id?: string;
|
||||
abstract?: string;
|
||||
status?: number;
|
||||
@@ -864,7 +879,7 @@ export interface ae_Organization extends ae_BaseObj {
|
||||
organization_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
tagline?: string;
|
||||
logo_path?: string;
|
||||
industry?: number;
|
||||
@@ -880,7 +895,7 @@ export interface ae_EventRegistration extends ae_BaseObj {
|
||||
event_id_random: string;
|
||||
person_id: string;
|
||||
person_id_random: string;
|
||||
|
||||
|
||||
organization_id_random?: string;
|
||||
contact_id_random?: string;
|
||||
}
|
||||
@@ -893,11 +908,11 @@ export interface ae_EventExhibit extends ae_BaseObj {
|
||||
event_exhibit_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
|
||||
organization_id_random?: string;
|
||||
contact_id_random?: string;
|
||||
person_id_random?: string;
|
||||
|
||||
|
||||
tagline?: string;
|
||||
logo_path?: string;
|
||||
staff_limit?: number;
|
||||
@@ -912,10 +927,10 @@ export interface ae_EventExhibitTracking extends ae_BaseObj {
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
event_exhibit_id_random: string;
|
||||
|
||||
|
||||
event_person_id_random?: string;
|
||||
event_badge_id_random?: string;
|
||||
|
||||
|
||||
exhibitor_notes?: string;
|
||||
responses_json?: any;
|
||||
}
|
||||
@@ -930,10 +945,10 @@ export interface ae_EventPerson extends ae_BaseObj {
|
||||
event_id_random: string;
|
||||
person_id: string;
|
||||
person_id_random: string;
|
||||
|
||||
|
||||
event_badge_id_random?: string;
|
||||
event_registration_id_random?: string;
|
||||
|
||||
|
||||
passcode?: string;
|
||||
agree_to_tc?: boolean;
|
||||
}
|
||||
@@ -947,11 +962,11 @@ export interface ae_EventPersonProfile extends ae_BaseObj {
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
event_person_id_random: string;
|
||||
|
||||
|
||||
tagline?: string;
|
||||
biography?: string;
|
||||
website_url?: string;
|
||||
|
||||
|
||||
thumbnail_path?: string;
|
||||
picture_path?: string;
|
||||
}
|
||||
@@ -963,9 +978,9 @@ export interface ae_EventPersonTracking extends ae_BaseObj {
|
||||
event_person_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
|
||||
event_session_id_random?: string;
|
||||
|
||||
|
||||
check_in_out?: boolean;
|
||||
in_datetime?: string | Date;
|
||||
out_datetime?: string | Date;
|
||||
@@ -979,7 +994,7 @@ export interface ae_Sponsorship extends ae_BaseObj {
|
||||
sponsorship_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
sponsorship_cfg_id_random: string;
|
||||
amount?: number;
|
||||
paid?: boolean;
|
||||
@@ -993,7 +1008,7 @@ export interface ae_SponsorshipCfg extends ae_BaseObj {
|
||||
sponsorship_cfg_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
|
||||
level_li_json?: any;
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
@@ -1005,10 +1020,10 @@ export interface ae_SponsorshipCfg extends ae_BaseObj {
|
||||
export interface ae_LogClientViewing extends ae_BaseObj {
|
||||
account_id_random: string;
|
||||
external_client_id: string;
|
||||
|
||||
|
||||
object_type: string;
|
||||
object_id: string;
|
||||
|
||||
|
||||
page_load_on?: string | Date;
|
||||
play_start_count?: number;
|
||||
play_pause_count?: number;
|
||||
|
||||
Reference in New Issue
Block a user