mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
Restrucure consumer + monorepo
This commit is contained in:
2
shared/.gitignore
vendored
2
shared/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
node_modules
|
||||
package-lock.json
|
||||
@@ -1,11 +1,7 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@getbrevo/brevo": "^2.2.0",
|
||||
"dayjs": "^1.11.11",
|
||||
"mongoose": "^8.4.0",
|
||||
"redis": "^4.6.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.12.13"
|
||||
}
|
||||
}
|
||||
"name": "shared",
|
||||
"version": "1.0.0",
|
||||
"author": "Emily",
|
||||
"license": "MIT",
|
||||
"description": ""
|
||||
}
|
||||
1362
shared/pnpm-lock.yaml
generated
1362
shared/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
import { model, Schema, Types } from 'mongoose';
|
||||
|
||||
export type TIntegrationsCredentials = {
|
||||
_id: Schema.Types.ObjectId,
|
||||
project_id: Schema.Types.ObjectId,
|
||||
supabase_url: string,
|
||||
supabase_anon_key: string,
|
||||
supabase_service_role_key: string,
|
||||
}
|
||||
|
||||
const IntegrationsCredentialsSchema = new Schema<TIntegrationsCredentials>({
|
||||
project_id: { type: Types.ObjectId, index: 1 },
|
||||
supabase_url: { type: String },
|
||||
supabase_anon_key: { type: String },
|
||||
supabase_service_role_key: { type: String },
|
||||
});
|
||||
|
||||
export const IntegrationsCredentialsModel = model<TIntegrationsCredentials>('integrations_credentials', IntegrationsCredentialsSchema);
|
||||
@@ -1,28 +0,0 @@
|
||||
import { model, Schema, Types } from 'mongoose';
|
||||
|
||||
export type TSupabaseIntegration = {
|
||||
_id: Schema.Types.ObjectId,
|
||||
project_id: Schema.Types.ObjectId,
|
||||
name: string,
|
||||
chart_type: string,
|
||||
table_name: string,
|
||||
xField: string,
|
||||
yMode: string,
|
||||
from: Date,
|
||||
to: Date,
|
||||
slice: string
|
||||
}
|
||||
|
||||
const SupabaseIntegrationSchema = new Schema<TSupabaseIntegration>({
|
||||
project_id: { type: Types.ObjectId, index: 1 },
|
||||
name: { type: String, required: true },
|
||||
chart_type: { type: String, required: true },
|
||||
table_name: { type: String, required: true },
|
||||
xField: { type: String, required: true },
|
||||
yMode: { type: String, required: true },
|
||||
from: { type: Date, required: true },
|
||||
to: { type: Date, required: true },
|
||||
slice: { type: String, required: true }
|
||||
});
|
||||
|
||||
export const SupabaseIntegrationModel = model<TSupabaseIntegration>('supabase_integrations', SupabaseIntegrationSchema);
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "NodeNext",
|
||||
"target": "ESNext"
|
||||
"target": "ESNext",
|
||||
"composite": true
|
||||
},
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user