Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static get SCHEMATA(): SQLeetSchema[] {
return [
{
schema: {
[StorageSchemata.OBJECT_STORE.AMPLIFY]: SQLiteType.JSON_OR_TEXT,
[StorageSchemata.OBJECT_STORE.CLIENTS]: {
address: SQLiteType.TEXT,
class: SQLiteType.TEXT,
id: SQLiteType.TEXT,
label: SQLiteType.TEXT,
location: SQLiteType.JSON,
meta: SQLiteType.JSON,
model: SQLiteType.TEXT,
time: SQLiteType.TEXT,
type: SQLiteType.TEXT,
},
[StorageSchemata.OBJECT_STORE.CONVERSATIONS]: {
accessModes: SQLiteType.JSON,
accessRole: SQLiteType.TEXT,
archived_state: SQLiteType.BOOLEAN,
archived_timestamp: SQLiteType.INTEGER,
creator: SQLiteType.TEXT,
id: SQLiteType.TEXT,
last_event_timestamp: SQLiteType.INTEGER,
last_server_timestamp: SQLiteType.INTEGER,
message_timer: SQLiteType.INTEGER,
muted_state: SQLiteType.BOOLEAN,
last_event_timestamp: SQLiteType.INTEGER,
last_server_timestamp: SQLiteType.INTEGER,
message_timer: SQLiteType.INTEGER,
muted_state: SQLiteType.BOOLEAN,
muted_timestamp: SQLiteType.INTEGER,
name: SQLiteType.TEXT,
others: SQLiteType.JSON,
receipt_mode: SQLiteType.INTEGER,
status: SQLiteType.INTEGER,
team_id: SQLiteType.TEXT,
type: SQLiteType.INTEGER,
},
[StorageSchemata.OBJECT_STORE.EVENTS]: {
category: SQLiteType.INTEGER,
conversation: SQLiteType.TEXT,
data: SQLiteType.JSON,
ephemeral_expires: SQLiteType.TEXT,
ephemeral_started: SQLiteType.TEXT,
from: SQLiteType.TEXT,
from_client_id: SQLiteType.TEXT,
id: SQLiteType.TEXT,
primary_key: SQLiteType.INTEGER,
reactions: SQLiteType.JSON,
status: SQLiteType.INTEGER,
time: SQLiteType.TEXT,
type: SQLiteType.TEXT,
version: SQLiteType.INTEGER,
},
[StorageSchemata.OBJECT_STORE.KEYS]: {
created: SQLiteType.INTEGER,
id: SQLiteType.TEXT,
serialised: SQLiteType.TEXT,
static get SCHEMATA(): SQLeetSchema[] {
return [
{
schema: {
[StorageSchemata.OBJECT_STORE.AMPLIFY]: SQLiteType.JSON_OR_TEXT,
[StorageSchemata.OBJECT_STORE.CLIENTS]: {
address: SQLiteType.TEXT,
class: SQLiteType.TEXT,
id: SQLiteType.TEXT,
label: SQLiteType.TEXT,
location: SQLiteType.JSON,
meta: SQLiteType.JSON,
model: SQLiteType.TEXT,
time: SQLiteType.TEXT,
type: SQLiteType.TEXT,
},
[StorageSchemata.OBJECT_STORE.CONVERSATIONS]: {
accessModes: SQLiteType.JSON,
accessRole: SQLiteType.TEXT,
archived_state: SQLiteType.BOOLEAN,
archived_timestamp: SQLiteType.INTEGER,
creator: SQLiteType.TEXT,
id: SQLiteType.TEXT,
last_event_timestamp: SQLiteType.INTEGER,
last_server_timestamp: SQLiteType.INTEGER,
message_timer: SQLiteType.INTEGER,
muted_state: SQLiteType.BOOLEAN,
muted_timestamp: SQLiteType.INTEGER,
type: SQLiteType.TEXT,
},
[StorageSchemata.OBJECT_STORE.CONVERSATIONS]: {
accessModes: SQLiteType.JSON,
accessRole: SQLiteType.TEXT,
archived_state: SQLiteType.BOOLEAN,
archived_timestamp: SQLiteType.INTEGER,
creator: SQLiteType.TEXT,
id: SQLiteType.TEXT,
last_event_timestamp: SQLiteType.INTEGER,
last_server_timestamp: SQLiteType.INTEGER,
message_timer: SQLiteType.INTEGER,
muted_state: SQLiteType.BOOLEAN,
muted_timestamp: SQLiteType.INTEGER,
name: SQLiteType.TEXT,
others: SQLiteType.JSON,
receipt_mode: SQLiteType.INTEGER,
status: SQLiteType.INTEGER,
team_id: SQLiteType.TEXT,
type: SQLiteType.INTEGER,
},
[StorageSchemata.OBJECT_STORE.EVENTS]: {
category: SQLiteType.INTEGER,
conversation: SQLiteType.TEXT,
data: SQLiteType.JSON,
ephemeral_expires: SQLiteType.TEXT,
ephemeral_started: SQLiteType.TEXT,
from: SQLiteType.TEXT,
from_client_id: SQLiteType.TEXT,
id: SQLiteType.TEXT,
primary_key: SQLiteType.INTEGER,
reactions: SQLiteType.JSON,
receipt_mode: SQLiteType.INTEGER,
status: SQLiteType.INTEGER,
team_id: SQLiteType.TEXT,
type: SQLiteType.INTEGER,
},
[StorageSchemata.OBJECT_STORE.EVENTS]: {
category: SQLiteType.INTEGER,
conversation: SQLiteType.TEXT,
data: SQLiteType.JSON,
ephemeral_expires: SQLiteType.TEXT,
ephemeral_started: SQLiteType.TEXT,
from: SQLiteType.TEXT,
from_client_id: SQLiteType.TEXT,
id: SQLiteType.TEXT,
primary_key: SQLiteType.INTEGER,
reactions: SQLiteType.JSON,
status: SQLiteType.INTEGER,
time: SQLiteType.TEXT,
type: SQLiteType.TEXT,
version: SQLiteType.INTEGER,
},
[StorageSchemata.OBJECT_STORE.KEYS]: {
created: SQLiteType.INTEGER,
id: SQLiteType.TEXT,
serialised: SQLiteType.TEXT,
version: SQLiteType.TEXT,
},
[StorageSchemata.OBJECT_STORE.PRE_KEYS]: {
created: SQLiteType.INTEGER,
id: SQLiteType.TEXT,
serialised: SQLiteType.TEXT,
version: SQLiteType.TEXT,
{
schema: {
[StorageSchemata.OBJECT_STORE.AMPLIFY]: SQLiteType.JSON_OR_TEXT,
[StorageSchemata.OBJECT_STORE.CLIENTS]: {
address: SQLiteType.TEXT,
class: SQLiteType.TEXT,
id: SQLiteType.TEXT,
label: SQLiteType.TEXT,
location: SQLiteType.JSON,
meta: SQLiteType.JSON,
model: SQLiteType.TEXT,
time: SQLiteType.TEXT,
type: SQLiteType.TEXT,
},
[StorageSchemata.OBJECT_STORE.CONVERSATIONS]: {
accessModes: SQLiteType.JSON,
accessRole: SQLiteType.TEXT,
archived_state: SQLiteType.BOOLEAN,
archived_timestamp: SQLiteType.INTEGER,
creator: SQLiteType.TEXT,
id: SQLiteType.TEXT,
last_event_timestamp: SQLiteType.INTEGER,
last_server_timestamp: SQLiteType.INTEGER,
message_timer: SQLiteType.INTEGER,
muted_state: SQLiteType.BOOLEAN,
muted_timestamp: SQLiteType.INTEGER,
name: SQLiteType.TEXT,
others: SQLiteType.JSON,
receipt_mode: SQLiteType.INTEGER,
status: SQLiteType.INTEGER,
team_id: SQLiteType.TEXT,
type: SQLiteType.INTEGER,