@everylanguage/shared-types 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +326 -0
- package/package.json +88 -0
- package/types/README.md +64 -0
- package/types/database.d.ts +306 -0
- package/types/database.js +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Every Language
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# EL Backend
|
|
2
|
+
|
|
3
|
+
[](https://github.com/your-username/el-backend/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/your-username/el-backend/actions/workflows/deploy.yml)
|
|
5
|
+
|
|
6
|
+
Supabase backend for the EL audio translation platform supporting 4 applications:
|
|
7
|
+
|
|
8
|
+
- **App 1**: Audio recording with live translation and speaker segmentation
|
|
9
|
+
- **App 2**: Audio listening app with offline-first playback
|
|
10
|
+
- **App 3**: Analytics dashboard with geographic insights
|
|
11
|
+
- **App 4**: User management and content dashboard
|
|
12
|
+
|
|
13
|
+
## 🚀 Quick Start
|
|
14
|
+
|
|
15
|
+
### Prerequisites
|
|
16
|
+
|
|
17
|
+
- Node.js 18+
|
|
18
|
+
- Docker Desktop (for Supabase)
|
|
19
|
+
- Supabase CLI (`npm install -g supabase`)
|
|
20
|
+
|
|
21
|
+
### Setup
|
|
22
|
+
|
|
23
|
+
1. **Clone and install:**
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone <repo-url>
|
|
27
|
+
cd el-backend
|
|
28
|
+
npm install
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
2. **Environment setup:**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cp env.example .env.local
|
|
35
|
+
# Fill in your local environment variables
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
3. **Start development:**
|
|
39
|
+
```bash
|
|
40
|
+
npm run dev # Start Supabase locally
|
|
41
|
+
npm run generate-types # Generate TypeScript types
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 📜 Available Scripts
|
|
45
|
+
|
|
46
|
+
### Development
|
|
47
|
+
|
|
48
|
+
- `npm run dev` - Start local Supabase development
|
|
49
|
+
- `npm run stop` - Stop Supabase
|
|
50
|
+
- `npm run reset` - Reset local database
|
|
51
|
+
- `npm run migrate` - Push migrations to database
|
|
52
|
+
- `npm run generate-types` - Generate TypeScript types
|
|
53
|
+
|
|
54
|
+
### Functions
|
|
55
|
+
|
|
56
|
+
- `npm run functions:serve` - Serve Edge Functions locally
|
|
57
|
+
- `npm run functions:deploy` - Deploy Edge Functions
|
|
58
|
+
|
|
59
|
+
### Code Quality
|
|
60
|
+
|
|
61
|
+
- `npm run lint` - Run ESLint
|
|
62
|
+
- `npm run lint:fix` - Auto-fix linting issues
|
|
63
|
+
- `npm run format` - Format code with Prettier
|
|
64
|
+
- `npm run format:check` - Check formatting
|
|
65
|
+
- `npm run type-check` - Verify TypeScript types
|
|
66
|
+
|
|
67
|
+
### Testing
|
|
68
|
+
|
|
69
|
+
- `npm test` - Run all tests
|
|
70
|
+
- `npm run test:watch` - Run tests in watch mode
|
|
71
|
+
|
|
72
|
+
### Git Workflow
|
|
73
|
+
|
|
74
|
+
- `npm run commit` - Commit with conventional commits
|
|
75
|
+
|
|
76
|
+
## 🏗️ Project Structure
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
el-backend/
|
|
80
|
+
├── .github/
|
|
81
|
+
│ ├── workflows/ # CI/CD pipelines
|
|
82
|
+
│ └── ISSUE_TEMPLATE/ # GitHub issue templates
|
|
83
|
+
├── supabase/
|
|
84
|
+
│ ├── migrations/ # Database migrations
|
|
85
|
+
│ ├── functions/ # Edge Functions
|
|
86
|
+
│ ├── seed/ # Seed data
|
|
87
|
+
│ └── tests/ # Database tests
|
|
88
|
+
├── types/
|
|
89
|
+
│ └── database.ts # Generated TypeScript types
|
|
90
|
+
├── tests/
|
|
91
|
+
│ ├── unit/ # Unit tests
|
|
92
|
+
│ ├── integration/ # Integration tests
|
|
93
|
+
│ └── e2e/ # End-to-end tests
|
|
94
|
+
├── docs/ # Documentation
|
|
95
|
+
└── scripts/ # Utility scripts
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 🔄 Development Workflow
|
|
99
|
+
|
|
100
|
+
### 1. Create Feature Branch
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
git checkout main
|
|
104
|
+
git pull origin main
|
|
105
|
+
git checkout -b feature/your-feature
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 2. Make Changes
|
|
109
|
+
|
|
110
|
+
- Write your code
|
|
111
|
+
- Add tests
|
|
112
|
+
- Update documentation if needed
|
|
113
|
+
|
|
114
|
+
### 3. Test Locally
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npm test # Run tests
|
|
118
|
+
npm run lint # Check linting
|
|
119
|
+
npm run format:check # Check formatting
|
|
120
|
+
npm run type-check # Check types
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 4. Commit and Push
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git add .
|
|
127
|
+
npm run commit # Use conventional commits
|
|
128
|
+
git push origin feature/your-feature
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### 5. Create Pull Request
|
|
132
|
+
|
|
133
|
+
- CI automatically runs on PR
|
|
134
|
+
- Wait for green checkmarks ✅
|
|
135
|
+
- Request review from team
|
|
136
|
+
- Merge after approval
|
|
137
|
+
|
|
138
|
+
### 6. Automatic Deployment
|
|
139
|
+
|
|
140
|
+
- Merge to `main` triggers deployment
|
|
141
|
+
- Database migrations applied
|
|
142
|
+
- Edge Functions deployed
|
|
143
|
+
|
|
144
|
+
## 🧪 CI/CD Pipeline
|
|
145
|
+
|
|
146
|
+
Our automated pipeline ensures code quality and safe deployments:
|
|
147
|
+
|
|
148
|
+
### Continuous Integration (CI)
|
|
149
|
+
|
|
150
|
+
Runs on every PR and push:
|
|
151
|
+
|
|
152
|
+
- ✅ Linting with ESLint
|
|
153
|
+
- ✅ Code formatting with Prettier
|
|
154
|
+
- ✅ TypeScript type checking
|
|
155
|
+
- ✅ Test suite execution
|
|
156
|
+
- ✅ Database migration testing
|
|
157
|
+
- ✅ Type generation verification
|
|
158
|
+
|
|
159
|
+
### Continuous Deployment (CD)
|
|
160
|
+
|
|
161
|
+
Runs on merge to `main`:
|
|
162
|
+
|
|
163
|
+
- 🚀 Database migrations to production
|
|
164
|
+
- 🚀 Edge Function deployments
|
|
165
|
+
- 🚀 Production schema verification
|
|
166
|
+
|
|
167
|
+
**📖 Read More**: [CI/CD Pipeline Documentation](./docs/ci-cd-pipeline.md)
|
|
168
|
+
|
|
169
|
+
## 🗃️ Database Management
|
|
170
|
+
|
|
171
|
+
### Creating Migrations
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Create new migration
|
|
175
|
+
supabase migration new add_user_profiles
|
|
176
|
+
|
|
177
|
+
# Edit the migration file
|
|
178
|
+
# supabase/migrations/[timestamp]_add_user_profiles.sql
|
|
179
|
+
|
|
180
|
+
# Test migration locally
|
|
181
|
+
npm run migrate
|
|
182
|
+
|
|
183
|
+
# Generate updated types
|
|
184
|
+
npm run generate-types
|
|
185
|
+
|
|
186
|
+
# Commit both migration and types
|
|
187
|
+
git add supabase/migrations/ types/database.ts
|
|
188
|
+
npm run commit
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Best Practices
|
|
192
|
+
|
|
193
|
+
- Always test migrations locally first
|
|
194
|
+
- Include both up and down migrations
|
|
195
|
+
- Generate types after schema changes
|
|
196
|
+
- Use descriptive migration names
|
|
197
|
+
|
|
198
|
+
## 🔧 Architecture Overview
|
|
199
|
+
|
|
200
|
+
### Technology Stack
|
|
201
|
+
|
|
202
|
+
- **Database**: PostgreSQL (via Supabase)
|
|
203
|
+
- **Authentication**: Supabase Auth
|
|
204
|
+
- **Storage**: Backblaze B2
|
|
205
|
+
- **Functions**: Supabase Edge Functions (Deno)
|
|
206
|
+
- **Sync**: PowerSync for offline-first apps
|
|
207
|
+
- **Testing**: Jest with Supabase integration
|
|
208
|
+
- **CI/CD**: GitHub Actions
|
|
209
|
+
|
|
210
|
+
### Key Features
|
|
211
|
+
|
|
212
|
+
- **Offline-first**: PowerSync integration for mobile apps
|
|
213
|
+
- **Real-time**: Supabase realtime subscriptions
|
|
214
|
+
- **Scalable**: Edge Functions for compute
|
|
215
|
+
- **Secure**: Row Level Security (RLS) policies
|
|
216
|
+
- **Tested**: Comprehensive test suite
|
|
217
|
+
- **Typed**: Full TypeScript support
|
|
218
|
+
|
|
219
|
+
## 📱 Application Support
|
|
220
|
+
|
|
221
|
+
### App 1: Recording App
|
|
222
|
+
|
|
223
|
+
- User authentication and project management
|
|
224
|
+
- Audio file upload and processing
|
|
225
|
+
- Speaker segmentation data storage
|
|
226
|
+
- Offline sync capabilities
|
|
227
|
+
|
|
228
|
+
### App 2: Listening App
|
|
229
|
+
|
|
230
|
+
- Public content discovery and delivery
|
|
231
|
+
- Anonymous usage analytics
|
|
232
|
+
- Geographic content filtering
|
|
233
|
+
- Progressive download optimization
|
|
234
|
+
|
|
235
|
+
### App 3: Analytics Dashboard
|
|
236
|
+
|
|
237
|
+
- Real-time usage statistics
|
|
238
|
+
- Geographic usage insights
|
|
239
|
+
- Performance metrics
|
|
240
|
+
- Export capabilities
|
|
241
|
+
|
|
242
|
+
### App 4: Management Dashboard
|
|
243
|
+
|
|
244
|
+
- Content management interface
|
|
245
|
+
- User administration
|
|
246
|
+
- Project oversight tools
|
|
247
|
+
- Advanced analytics
|
|
248
|
+
|
|
249
|
+
## 🧪 Testing
|
|
250
|
+
|
|
251
|
+
### Test Structure
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
tests/
|
|
255
|
+
├── unit/ # Pure function tests
|
|
256
|
+
├── integration/ # Database + API tests
|
|
257
|
+
├── e2e/ # Full workflow tests
|
|
258
|
+
└── fixtures/ # Test data
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Running Tests
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
npm test # All tests
|
|
265
|
+
npm test -- --watch # Watch mode
|
|
266
|
+
npm test -- tests/specific-test.test.ts # Specific test
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**📖 Read More**: [Testing Documentation](./docs/testing-guide.md)
|
|
270
|
+
|
|
271
|
+
## 🚨 Troubleshooting
|
|
272
|
+
|
|
273
|
+
### Common Issues
|
|
274
|
+
|
|
275
|
+
**Supabase won't start:**
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Ensure Docker is running
|
|
279
|
+
docker --version
|
|
280
|
+
|
|
281
|
+
# Reset Supabase
|
|
282
|
+
npm run stop
|
|
283
|
+
npm run reset
|
|
284
|
+
npm run dev
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Type errors:**
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
# Regenerate types
|
|
291
|
+
npm run generate-types
|
|
292
|
+
npm run type-check
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**CI failures:**
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
# Run CI checks locally
|
|
299
|
+
npm run lint && npm run format:check && npm run type-check && npm test
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## 📚 Documentation
|
|
303
|
+
|
|
304
|
+
- [Development Setup](./docs/development-setup.md)
|
|
305
|
+
- [CI/CD Pipeline](./docs/ci-cd-pipeline.md)
|
|
306
|
+
- [GitHub Setup Guide](./docs/github-setup-guide.md)
|
|
307
|
+
- [Project Setup Checklist](./docs/project-setup-checklist.md)
|
|
308
|
+
|
|
309
|
+
## 🤝 Contributing
|
|
310
|
+
|
|
311
|
+
1. Read the [GitHub Setup Guide](./docs/github-setup-guide.md)
|
|
312
|
+
2. Follow the development workflow above
|
|
313
|
+
3. Ensure all CI checks pass
|
|
314
|
+
4. Request review from team members
|
|
315
|
+
5. Keep PRs small and focused
|
|
316
|
+
|
|
317
|
+
## 📄 License
|
|
318
|
+
|
|
319
|
+
This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.
|
|
320
|
+
|
|
321
|
+
## 🆘 Support
|
|
322
|
+
|
|
323
|
+
- Check [troubleshooting section](#-troubleshooting) above
|
|
324
|
+
- Review documentation in `docs/` folder
|
|
325
|
+
- Create an issue for bugs or feature requests
|
|
326
|
+
- Ask team members for help with setup
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@everylanguage/shared-types",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "types/database.js",
|
|
6
|
+
"types": "types/database.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./types/database.d.ts",
|
|
10
|
+
"import": "./types/database.js",
|
|
11
|
+
"require": "./types/database.js"
|
|
12
|
+
},
|
|
13
|
+
"./database": {
|
|
14
|
+
"types": "./types/database.d.ts",
|
|
15
|
+
"import": "./types/database.js",
|
|
16
|
+
"require": "./types/database.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"types/database.d.ts",
|
|
21
|
+
"types/database.js",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"directories": {
|
|
28
|
+
"doc": "docs"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"dev": "supabase start",
|
|
32
|
+
"stop": "supabase stop",
|
|
33
|
+
"reset": "supabase db reset",
|
|
34
|
+
"migrate": "supabase db push",
|
|
35
|
+
"generate-types": "supabase gen types typescript --local > types/database.ts",
|
|
36
|
+
"build-types": "tsc types/database.ts --declaration --emitDeclarationOnly --outDir types/",
|
|
37
|
+
"prepare-package": "npm run build-types && echo '// Re-export all types from the TypeScript definitions\nexport * from \"./database.d.ts\";' > types/database.js",
|
|
38
|
+
"prepare-package:ci": "npm run build-types && echo '// Re-export all types from the TypeScript definitions\nexport * from \"./database.d.ts\";' > types/database.js",
|
|
39
|
+
"functions:serve": "supabase functions serve",
|
|
40
|
+
"functions:deploy": "supabase functions deploy",
|
|
41
|
+
"test": "jest --passWithNoTests",
|
|
42
|
+
"test:watch": "jest --watch",
|
|
43
|
+
"lint": "eslint . --ext .ts,.js,.sql",
|
|
44
|
+
"lint:fix": "eslint . --ext .ts,.js,.sql --fix",
|
|
45
|
+
"format": "prettier --write .",
|
|
46
|
+
"format:check": "prettier --check .",
|
|
47
|
+
"sql:format": "sql-formatter --config .sqlformatterrc.json supabase/migrations/*.sql",
|
|
48
|
+
"type-check": "tsc --noEmit",
|
|
49
|
+
"prepare": "husky",
|
|
50
|
+
"commit": "cz",
|
|
51
|
+
"version:patch": "npm version patch",
|
|
52
|
+
"version:minor": "npm version minor",
|
|
53
|
+
"version:major": "npm version major",
|
|
54
|
+
"release": "npm run prepare-package && npm publish"
|
|
55
|
+
},
|
|
56
|
+
"keywords": [
|
|
57
|
+
"supabase",
|
|
58
|
+
"backend",
|
|
59
|
+
"audio",
|
|
60
|
+
"translation"
|
|
61
|
+
],
|
|
62
|
+
"author": "",
|
|
63
|
+
"license": "ISC",
|
|
64
|
+
"description": "Supabase backend for EL audio translation platform",
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@types/node": "^24.0.3",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
68
|
+
"@typescript-eslint/parser": "^8.34.1",
|
|
69
|
+
"eslint": "^9.29.0",
|
|
70
|
+
"eslint-config-prettier": "^10.1.5",
|
|
71
|
+
"eslint-plugin-prettier": "^5.5.0",
|
|
72
|
+
"eslint-plugin-sql": "^3.2.2",
|
|
73
|
+
"husky": "^9.1.7",
|
|
74
|
+
"jest": "^30.0.2",
|
|
75
|
+
"lint-staged": "^16.1.2",
|
|
76
|
+
"prettier": "^3.5.3",
|
|
77
|
+
"sql-formatter": "^15.6.5",
|
|
78
|
+
"typescript": "^5.8.3"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@commitlint/cli": "^19.8.1",
|
|
82
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
83
|
+
"@types/jest": "^30.0.0",
|
|
84
|
+
"commitizen": "^4.3.1",
|
|
85
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
86
|
+
"ts-jest": "^29.4.0"
|
|
87
|
+
}
|
|
88
|
+
}
|
package/types/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @everylanguage/shared-types
|
|
2
|
+
|
|
3
|
+
🎯 **Shared TypeScript types for the EverlyLanguage audio translation platform**
|
|
4
|
+
|
|
5
|
+
This package contains automatically generated TypeScript types from our Supabase database schema, ensuring type safety across all applications in the EverlyLanguage ecosystem.
|
|
6
|
+
|
|
7
|
+
## 📦 Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @everylanguage/shared-types
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 🔄 Type Updates
|
|
14
|
+
|
|
15
|
+
Types are automatically updated when:
|
|
16
|
+
|
|
17
|
+
- Database schema changes are deployed to production
|
|
18
|
+
- The CI/CD pipeline detects schema modifications
|
|
19
|
+
- Manual publishing is triggered
|
|
20
|
+
|
|
21
|
+
## 🔧 Development Workflow
|
|
22
|
+
|
|
23
|
+
For the backend team:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# 1. Make schema changes
|
|
27
|
+
supabase migration new your_change_name
|
|
28
|
+
|
|
29
|
+
# 2. Apply migration locally
|
|
30
|
+
npm run migrate
|
|
31
|
+
|
|
32
|
+
# 3. Test changes
|
|
33
|
+
npm test
|
|
34
|
+
|
|
35
|
+
# 4. Commit and push
|
|
36
|
+
npm run commit
|
|
37
|
+
git push
|
|
38
|
+
|
|
39
|
+
# 5. Types are automatically published after deployment!
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For application teams:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Update to latest types
|
|
46
|
+
npm update @everylanguage/shared-types
|
|
47
|
+
|
|
48
|
+
# Or install specific version
|
|
49
|
+
npm install @everylanguage/shared-types@1.2.3
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 📚 Version History
|
|
53
|
+
|
|
54
|
+
This package follows [Semantic Versioning](https://semver.org/):
|
|
55
|
+
|
|
56
|
+
- **Patch** (1.0.x) - Type fixes, documentation updates
|
|
57
|
+
- **Minor** (1.x.0) - New tables, non-breaking schema additions
|
|
58
|
+
- **Major** (x.0.0) - Breaking schema changes
|
|
59
|
+
|
|
60
|
+
## 🐛 Issues & Support
|
|
61
|
+
|
|
62
|
+
- **Backend Issues**: [Backend Repository](https://github.com/your-org/el-backend/issues)
|
|
63
|
+
- **Type Issues**: [Type-specific issues](https://github.com/your-org/el-backend/issues?q=label%3Atypes)
|
|
64
|
+
- **Application Integration**: Contact your respective app team
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
export type Json = string | number | boolean | null | {
|
|
2
|
+
[key: string]: Json | undefined;
|
|
3
|
+
} | Json[];
|
|
4
|
+
export type Database = {
|
|
5
|
+
graphql_public: {
|
|
6
|
+
Tables: {
|
|
7
|
+
[_ in never]: never;
|
|
8
|
+
};
|
|
9
|
+
Views: {
|
|
10
|
+
[_ in never]: never;
|
|
11
|
+
};
|
|
12
|
+
Functions: {
|
|
13
|
+
graphql: {
|
|
14
|
+
Args: {
|
|
15
|
+
operationName?: string;
|
|
16
|
+
query?: string;
|
|
17
|
+
variables?: Json;
|
|
18
|
+
extensions?: Json;
|
|
19
|
+
};
|
|
20
|
+
Returns: Json;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
Enums: {
|
|
24
|
+
[_ in never]: never;
|
|
25
|
+
};
|
|
26
|
+
CompositeTypes: {
|
|
27
|
+
[_ in never]: never;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
public: {
|
|
31
|
+
Tables: {
|
|
32
|
+
analytics_events: {
|
|
33
|
+
Row: {
|
|
34
|
+
created_at: string | null;
|
|
35
|
+
device_info: Json | null;
|
|
36
|
+
event_data: Json | null;
|
|
37
|
+
event_type: string;
|
|
38
|
+
id: string;
|
|
39
|
+
session_id: string | null;
|
|
40
|
+
user_id: string | null;
|
|
41
|
+
};
|
|
42
|
+
Insert: {
|
|
43
|
+
created_at?: string | null;
|
|
44
|
+
device_info?: Json | null;
|
|
45
|
+
event_data?: Json | null;
|
|
46
|
+
event_type: string;
|
|
47
|
+
id?: string;
|
|
48
|
+
session_id?: string | null;
|
|
49
|
+
user_id?: string | null;
|
|
50
|
+
};
|
|
51
|
+
Update: {
|
|
52
|
+
created_at?: string | null;
|
|
53
|
+
device_info?: Json | null;
|
|
54
|
+
event_data?: Json | null;
|
|
55
|
+
event_type?: string;
|
|
56
|
+
id?: string;
|
|
57
|
+
session_id?: string | null;
|
|
58
|
+
user_id?: string | null;
|
|
59
|
+
};
|
|
60
|
+
Relationships: [];
|
|
61
|
+
};
|
|
62
|
+
audio_recordings: {
|
|
63
|
+
Row: {
|
|
64
|
+
audio_file_url: string;
|
|
65
|
+
created_at: string | null;
|
|
66
|
+
description: string | null;
|
|
67
|
+
duration_seconds: number | null;
|
|
68
|
+
id: string;
|
|
69
|
+
original_language: string;
|
|
70
|
+
status: string | null;
|
|
71
|
+
target_language: string;
|
|
72
|
+
title: string;
|
|
73
|
+
updated_at: string | null;
|
|
74
|
+
user_id: string | null;
|
|
75
|
+
};
|
|
76
|
+
Insert: {
|
|
77
|
+
audio_file_url: string;
|
|
78
|
+
created_at?: string | null;
|
|
79
|
+
description?: string | null;
|
|
80
|
+
duration_seconds?: number | null;
|
|
81
|
+
id?: string;
|
|
82
|
+
original_language: string;
|
|
83
|
+
status?: string | null;
|
|
84
|
+
target_language: string;
|
|
85
|
+
title: string;
|
|
86
|
+
updated_at?: string | null;
|
|
87
|
+
user_id?: string | null;
|
|
88
|
+
};
|
|
89
|
+
Update: {
|
|
90
|
+
audio_file_url?: string;
|
|
91
|
+
created_at?: string | null;
|
|
92
|
+
description?: string | null;
|
|
93
|
+
duration_seconds?: number | null;
|
|
94
|
+
id?: string;
|
|
95
|
+
original_language?: string;
|
|
96
|
+
status?: string | null;
|
|
97
|
+
target_language?: string;
|
|
98
|
+
title?: string;
|
|
99
|
+
updated_at?: string | null;
|
|
100
|
+
user_id?: string | null;
|
|
101
|
+
};
|
|
102
|
+
Relationships: [];
|
|
103
|
+
};
|
|
104
|
+
npm_test_projects: {
|
|
105
|
+
Row: {
|
|
106
|
+
created_at: string | null;
|
|
107
|
+
description: string | null;
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
status: string | null;
|
|
111
|
+
updated_at: string | null;
|
|
112
|
+
};
|
|
113
|
+
Insert: {
|
|
114
|
+
created_at?: string | null;
|
|
115
|
+
description?: string | null;
|
|
116
|
+
id?: string;
|
|
117
|
+
name: string;
|
|
118
|
+
status?: string | null;
|
|
119
|
+
updated_at?: string | null;
|
|
120
|
+
};
|
|
121
|
+
Update: {
|
|
122
|
+
created_at?: string | null;
|
|
123
|
+
description?: string | null;
|
|
124
|
+
id?: string;
|
|
125
|
+
name?: string;
|
|
126
|
+
status?: string | null;
|
|
127
|
+
updated_at?: string | null;
|
|
128
|
+
};
|
|
129
|
+
Relationships: [];
|
|
130
|
+
};
|
|
131
|
+
profiles: {
|
|
132
|
+
Row: {
|
|
133
|
+
avatar_url: string | null;
|
|
134
|
+
created_at: string | null;
|
|
135
|
+
email: string;
|
|
136
|
+
full_name: string | null;
|
|
137
|
+
id: string;
|
|
138
|
+
updated_at: string | null;
|
|
139
|
+
user_id: string | null;
|
|
140
|
+
};
|
|
141
|
+
Insert: {
|
|
142
|
+
avatar_url?: string | null;
|
|
143
|
+
created_at?: string | null;
|
|
144
|
+
email: string;
|
|
145
|
+
full_name?: string | null;
|
|
146
|
+
id?: string;
|
|
147
|
+
updated_at?: string | null;
|
|
148
|
+
user_id?: string | null;
|
|
149
|
+
};
|
|
150
|
+
Update: {
|
|
151
|
+
avatar_url?: string | null;
|
|
152
|
+
created_at?: string | null;
|
|
153
|
+
email?: string;
|
|
154
|
+
full_name?: string | null;
|
|
155
|
+
id?: string;
|
|
156
|
+
updated_at?: string | null;
|
|
157
|
+
user_id?: string | null;
|
|
158
|
+
};
|
|
159
|
+
Relationships: [];
|
|
160
|
+
};
|
|
161
|
+
translation_segments: {
|
|
162
|
+
Row: {
|
|
163
|
+
confidence_score: number | null;
|
|
164
|
+
created_at: string | null;
|
|
165
|
+
end_time_seconds: number;
|
|
166
|
+
id: string;
|
|
167
|
+
original_text: string | null;
|
|
168
|
+
recording_id: string | null;
|
|
169
|
+
speaker_id: string | null;
|
|
170
|
+
start_time_seconds: number;
|
|
171
|
+
translated_text: string | null;
|
|
172
|
+
};
|
|
173
|
+
Insert: {
|
|
174
|
+
confidence_score?: number | null;
|
|
175
|
+
created_at?: string | null;
|
|
176
|
+
end_time_seconds: number;
|
|
177
|
+
id?: string;
|
|
178
|
+
original_text?: string | null;
|
|
179
|
+
recording_id?: string | null;
|
|
180
|
+
speaker_id?: string | null;
|
|
181
|
+
start_time_seconds: number;
|
|
182
|
+
translated_text?: string | null;
|
|
183
|
+
};
|
|
184
|
+
Update: {
|
|
185
|
+
confidence_score?: number | null;
|
|
186
|
+
created_at?: string | null;
|
|
187
|
+
end_time_seconds?: number;
|
|
188
|
+
id?: string;
|
|
189
|
+
original_text?: string | null;
|
|
190
|
+
recording_id?: string | null;
|
|
191
|
+
speaker_id?: string | null;
|
|
192
|
+
start_time_seconds?: number;
|
|
193
|
+
translated_text?: string | null;
|
|
194
|
+
};
|
|
195
|
+
Relationships: [
|
|
196
|
+
{
|
|
197
|
+
foreignKeyName: "translation_segments_recording_id_fkey";
|
|
198
|
+
columns: ["recording_id"];
|
|
199
|
+
isOneToOne: false;
|
|
200
|
+
referencedRelation: "audio_recordings";
|
|
201
|
+
referencedColumns: ["id"];
|
|
202
|
+
}
|
|
203
|
+
];
|
|
204
|
+
};
|
|
205
|
+
workflow_test_v2: {
|
|
206
|
+
Row: {
|
|
207
|
+
created_at: string | null;
|
|
208
|
+
description: string | null;
|
|
209
|
+
id: string;
|
|
210
|
+
name: string;
|
|
211
|
+
test_status: string | null;
|
|
212
|
+
updated_at: string | null;
|
|
213
|
+
workflow_version: string | null;
|
|
214
|
+
};
|
|
215
|
+
Insert: {
|
|
216
|
+
created_at?: string | null;
|
|
217
|
+
description?: string | null;
|
|
218
|
+
id?: string;
|
|
219
|
+
name: string;
|
|
220
|
+
test_status?: string | null;
|
|
221
|
+
updated_at?: string | null;
|
|
222
|
+
workflow_version?: string | null;
|
|
223
|
+
};
|
|
224
|
+
Update: {
|
|
225
|
+
created_at?: string | null;
|
|
226
|
+
description?: string | null;
|
|
227
|
+
id?: string;
|
|
228
|
+
name?: string;
|
|
229
|
+
test_status?: string | null;
|
|
230
|
+
updated_at?: string | null;
|
|
231
|
+
workflow_version?: string | null;
|
|
232
|
+
};
|
|
233
|
+
Relationships: [];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
Views: {
|
|
237
|
+
[_ in never]: never;
|
|
238
|
+
};
|
|
239
|
+
Functions: {
|
|
240
|
+
[_ in never]: never;
|
|
241
|
+
};
|
|
242
|
+
Enums: {
|
|
243
|
+
[_ in never]: never;
|
|
244
|
+
};
|
|
245
|
+
CompositeTypes: {
|
|
246
|
+
[_ in never]: never;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
type DefaultSchema = Database[Extract<keyof Database, "public">];
|
|
251
|
+
export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
|
|
252
|
+
schema: keyof Database;
|
|
253
|
+
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
254
|
+
schema: keyof Database;
|
|
255
|
+
} ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
256
|
+
schema: keyof Database;
|
|
257
|
+
} ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
258
|
+
Row: infer R;
|
|
259
|
+
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
|
|
260
|
+
Row: infer R;
|
|
261
|
+
} ? R : never : never;
|
|
262
|
+
export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
|
|
263
|
+
schema: keyof Database;
|
|
264
|
+
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
265
|
+
schema: keyof Database;
|
|
266
|
+
} ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
267
|
+
schema: keyof Database;
|
|
268
|
+
} ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
269
|
+
Insert: infer I;
|
|
270
|
+
} ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
|
|
271
|
+
Insert: infer I;
|
|
272
|
+
} ? I : never : never;
|
|
273
|
+
export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
|
|
274
|
+
schema: keyof Database;
|
|
275
|
+
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
276
|
+
schema: keyof Database;
|
|
277
|
+
} ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
278
|
+
schema: keyof Database;
|
|
279
|
+
} ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
280
|
+
Update: infer U;
|
|
281
|
+
} ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
|
|
282
|
+
Update: infer U;
|
|
283
|
+
} ? U : never : never;
|
|
284
|
+
export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
|
|
285
|
+
schema: keyof Database;
|
|
286
|
+
}, EnumName extends DefaultSchemaEnumNameOrOptions extends {
|
|
287
|
+
schema: keyof Database;
|
|
288
|
+
} ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
|
|
289
|
+
schema: keyof Database;
|
|
290
|
+
} ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
|
|
291
|
+
export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
|
|
292
|
+
schema: keyof Database;
|
|
293
|
+
}, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
|
|
294
|
+
schema: keyof Database;
|
|
295
|
+
} ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
|
|
296
|
+
schema: keyof Database;
|
|
297
|
+
} ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
|
|
298
|
+
export declare const Constants: {
|
|
299
|
+
readonly graphql_public: {
|
|
300
|
+
readonly Enums: {};
|
|
301
|
+
};
|
|
302
|
+
readonly public: {
|
|
303
|
+
readonly Enums: {};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
export {};
|