wip major changes

This commit is contained in:
Nick Sweeting
2025-12-24 20:09:51 -08:00
parent c1335fed37
commit 1915333b81
450 changed files with 35814 additions and 19015 deletions

View File

@@ -1,10 +1,11 @@
# Generated by Django 4.2.11 on 2024-04-25 04:19
# Generated by Django 5.0.6 on 2024-12-25 (squashed)
import api.models
from uuid import uuid4
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
import api.models
class Migration(migrations.Migration):
@@ -19,11 +20,41 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='APIToken',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('id', models.UUIDField(default=uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
('created_by', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
('modified_at', models.DateTimeField(auto_now=True)),
('token', models.CharField(default=api.models.generate_secret_token, max_length=32, unique=True)),
('created', models.DateTimeField(auto_now_add=True)),
('expires', models.DateTimeField(blank=True, null=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'API Key',
'verbose_name_plural': 'API Keys',
},
),
migrations.CreateModel(
name='OutboundWebhook',
fields=[
('id', models.UUIDField(default=uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
('created_by', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
('modified_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(blank=True, default='', max_length=255)),
('signal', models.CharField(choices=[], db_index=True, max_length=255)),
('ref', models.CharField(db_index=True, max_length=255)),
('endpoint', models.URLField(max_length=2083)),
('headers', models.JSONField(blank=True, default=dict)),
('auth_token', models.CharField(blank=True, default='', max_length=4000)),
('enabled', models.BooleanField(db_index=True, default=True)),
('keep_last_response', models.BooleanField(default=False)),
('last_response', models.TextField(blank=True, default='')),
('last_success', models.DateTimeField(blank=True, null=True)),
('last_failure', models.DateTimeField(blank=True, null=True)),
],
options={
'verbose_name': 'API Outbound Webhook',
'ordering': ['name', 'ref'],
'abstract': False,
},
),
]