-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(models): add meta schema + tenants + update user models (#79)
- Loading branch information
1 parent
4f78461
commit ecffeb0
Showing
97 changed files
with
5,199 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
"kysely": "0.27.3" | ||
}, | ||
"devDependencies": { | ||
"pg": "^8.11.5", | ||
"tsup": "8.0.2" | ||
}, | ||
"publishConfig": { | ||
|
3 changes: 2 additions & 1 deletion
3
packages/db/src/migrations/20240504T110341.739Z-create-users-table.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/db/src/seeds/20240510T093124.653Z-seed-meta-schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { Kysely } from "kysely"; | ||
|
||
export async function up(db: Kysely<any>) { | ||
await db.insertInto("meta_schemas").values({}); | ||
} | ||
|
||
export async function down(db: Kysely<any>) {} |
Empty file.
Empty file.
118 changes: 118 additions & 0 deletions
118
packages/models/gen/dart/meta_schema/v1/meta_schema.event.pb.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
// | ||
// Generated code. Do not modify. | ||
// source: meta_schema/v1/meta_schema.event.proto | ||
// | ||
// @dart = 2.12 | ||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references | ||
// ignore_for_file: constant_identifier_names, library_prefixes | ||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields | ||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import | ||
|
||
import 'dart:core' as $core; | ||
|
||
import 'package:protobuf/protobuf.dart' as $pb; | ||
|
||
class GetMetaSchemaRequest extends $pb.GeneratedMessage { | ||
factory GetMetaSchemaRequest({ | ||
$core.String? id, | ||
}) { | ||
final $result = create(); | ||
if (id != null) { | ||
$result.id = id; | ||
} | ||
return $result; | ||
} | ||
GetMetaSchemaRequest._() : super(); | ||
factory GetMetaSchemaRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | ||
factory GetMetaSchemaRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | ||
|
||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetMetaSchemaRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'gen.go.meta_schema.v1'), createEmptyInstance: create) | ||
..aOS(1, _omitFieldNames ? '' : 'id') | ||
..hasRequiredFields = false | ||
; | ||
|
||
@$core.Deprecated( | ||
'Using this can add significant overhead to your binary. ' | ||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' | ||
'Will be removed in next major version') | ||
GetMetaSchemaRequest clone() => GetMetaSchemaRequest()..mergeFromMessage(this); | ||
@$core.Deprecated( | ||
'Using this can add significant overhead to your binary. ' | ||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' | ||
'Will be removed in next major version') | ||
GetMetaSchemaRequest copyWith(void Function(GetMetaSchemaRequest) updates) => super.copyWith((message) => updates(message as GetMetaSchemaRequest)) as GetMetaSchemaRequest; | ||
|
||
$pb.BuilderInfo get info_ => _i; | ||
|
||
@$core.pragma('dart2js:noInline') | ||
static GetMetaSchemaRequest create() => GetMetaSchemaRequest._(); | ||
GetMetaSchemaRequest createEmptyInstance() => create(); | ||
static $pb.PbList<GetMetaSchemaRequest> createRepeated() => $pb.PbList<GetMetaSchemaRequest>(); | ||
@$core.pragma('dart2js:noInline') | ||
static GetMetaSchemaRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetMetaSchemaRequest>(create); | ||
static GetMetaSchemaRequest? _defaultInstance; | ||
|
||
@$pb.TagNumber(1) | ||
$core.String get id => $_getSZ(0); | ||
@$pb.TagNumber(1) | ||
set id($core.String v) { $_setString(0, v); } | ||
@$pb.TagNumber(1) | ||
$core.bool hasId() => $_has(0); | ||
@$pb.TagNumber(1) | ||
void clearId() => clearField(1); | ||
} | ||
|
||
class GetMetaSchemaResponse extends $pb.GeneratedMessage { | ||
factory GetMetaSchemaResponse({ | ||
$core.String? id, | ||
}) { | ||
final $result = create(); | ||
if (id != null) { | ||
$result.id = id; | ||
} | ||
return $result; | ||
} | ||
GetMetaSchemaResponse._() : super(); | ||
factory GetMetaSchemaResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | ||
factory GetMetaSchemaResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | ||
|
||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetMetaSchemaResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'gen.go.meta_schema.v1'), createEmptyInstance: create) | ||
..aOS(1, _omitFieldNames ? '' : 'id') | ||
..hasRequiredFields = false | ||
; | ||
|
||
@$core.Deprecated( | ||
'Using this can add significant overhead to your binary. ' | ||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' | ||
'Will be removed in next major version') | ||
GetMetaSchemaResponse clone() => GetMetaSchemaResponse()..mergeFromMessage(this); | ||
@$core.Deprecated( | ||
'Using this can add significant overhead to your binary. ' | ||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' | ||
'Will be removed in next major version') | ||
GetMetaSchemaResponse copyWith(void Function(GetMetaSchemaResponse) updates) => super.copyWith((message) => updates(message as GetMetaSchemaResponse)) as GetMetaSchemaResponse; | ||
|
||
$pb.BuilderInfo get info_ => _i; | ||
|
||
@$core.pragma('dart2js:noInline') | ||
static GetMetaSchemaResponse create() => GetMetaSchemaResponse._(); | ||
GetMetaSchemaResponse createEmptyInstance() => create(); | ||
static $pb.PbList<GetMetaSchemaResponse> createRepeated() => $pb.PbList<GetMetaSchemaResponse>(); | ||
@$core.pragma('dart2js:noInline') | ||
static GetMetaSchemaResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetMetaSchemaResponse>(create); | ||
static GetMetaSchemaResponse? _defaultInstance; | ||
|
||
@$pb.TagNumber(1) | ||
$core.String get id => $_getSZ(0); | ||
@$pb.TagNumber(1) | ||
set id($core.String v) { $_setString(0, v); } | ||
@$pb.TagNumber(1) | ||
$core.bool hasId() => $_has(0); | ||
@$pb.TagNumber(1) | ||
void clearId() => clearField(1); | ||
} | ||
|
||
|
||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); | ||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); |
11 changes: 11 additions & 0 deletions
11
packages/models/gen/dart/meta_schema/v1/meta_schema.event.pbenum.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// | ||
// Generated code. Do not modify. | ||
// source: meta_schema/v1/meta_schema.event.proto | ||
// | ||
// @dart = 2.12 | ||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references | ||
// ignore_for_file: constant_identifier_names, library_prefixes | ||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields | ||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import | ||
|
39 changes: 39 additions & 0 deletions
39
packages/models/gen/dart/meta_schema/v1/meta_schema.event.pbjson.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// Generated code. Do not modify. | ||
// source: meta_schema/v1/meta_schema.event.proto | ||
// | ||
// @dart = 2.12 | ||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references | ||
// ignore_for_file: constant_identifier_names, library_prefixes | ||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields | ||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import | ||
|
||
import 'dart:convert' as $convert; | ||
import 'dart:core' as $core; | ||
import 'dart:typed_data' as $typed_data; | ||
|
||
@$core.Deprecated('Use getMetaSchemaRequestDescriptor instead') | ||
const GetMetaSchemaRequest$json = { | ||
'1': 'GetMetaSchemaRequest', | ||
'2': [ | ||
{'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, | ||
], | ||
}; | ||
|
||
/// Descriptor for `GetMetaSchemaRequest`. Decode as a `google.protobuf.DescriptorProto`. | ||
final $typed_data.Uint8List getMetaSchemaRequestDescriptor = $convert.base64Decode( | ||
'ChRHZXRNZXRhU2NoZW1hUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQ='); | ||
|
||
@$core.Deprecated('Use getMetaSchemaResponseDescriptor instead') | ||
const GetMetaSchemaResponse$json = { | ||
'1': 'GetMetaSchemaResponse', | ||
'2': [ | ||
{'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, | ||
], | ||
}; | ||
|
||
/// Descriptor for `GetMetaSchemaResponse`. Decode as a `google.protobuf.DescriptorProto`. | ||
final $typed_data.Uint8List getMetaSchemaResponseDescriptor = $convert.base64Decode( | ||
'ChVHZXRNZXRhU2NoZW1hUmVzcG9uc2USDgoCaWQYASABKAlSAmlk'); | ||
|
14 changes: 14 additions & 0 deletions
14
packages/models/gen/dart/meta_schema/v1/meta_schema.event.pbserver.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// Generated code. Do not modify. | ||
// source: meta_schema/v1/meta_schema.event.proto | ||
// | ||
// @dart = 2.12 | ||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references | ||
// ignore_for_file: constant_identifier_names | ||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes | ||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields | ||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import | ||
|
||
export 'meta_schema.event.pb.dart'; | ||
|
Oops, something went wrong.