@remit/drizzle-pg-schema 0.0.16 → 0.0.18
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/dist/schema.d.ts +843 -2
- package/dist/schema.js +67 -0
- package/package.json +1 -1
- package/schema.ts +88 -1
package/dist/schema.d.ts
CHANGED
|
@@ -1111,7 +1111,7 @@ export declare const accounts: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
1111
1111
|
tableName: "account";
|
|
1112
1112
|
dataType: "string";
|
|
1113
1113
|
columnType: "PgText";
|
|
1114
|
-
data: "not_authenticated" | "authenticated" | "selected" | "logout" | "reauth_required";
|
|
1114
|
+
data: "not_authenticated" | "authenticated" | "selected" | "logout" | "reauth_required" | "credentials_missing";
|
|
1115
1115
|
driverParam: string;
|
|
1116
1116
|
notNull: true;
|
|
1117
1117
|
hasDefault: false;
|
|
@@ -1123,7 +1123,7 @@ export declare const accounts: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
1123
1123
|
identity: undefined;
|
|
1124
1124
|
generated: undefined;
|
|
1125
1125
|
}, {}, {
|
|
1126
|
-
$type: "not_authenticated" | "authenticated" | "selected" | "logout" | "reauth_required";
|
|
1126
|
+
$type: "not_authenticated" | "authenticated" | "selected" | "logout" | "reauth_required" | "credentials_missing";
|
|
1127
1127
|
}>;
|
|
1128
1128
|
lastConnectedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1129
1129
|
name: "last_connected_at";
|
|
@@ -4950,6 +4950,168 @@ export declare const envelopeAddresses: import("drizzle-orm/pg-core").PgTableWit
|
|
|
4950
4950
|
};
|
|
4951
4951
|
dialect: "pg";
|
|
4952
4952
|
}>;
|
|
4953
|
+
export declare const configImports: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
4954
|
+
name: "config_import";
|
|
4955
|
+
schema: undefined;
|
|
4956
|
+
columns: {
|
|
4957
|
+
importId: import("drizzle-orm/pg-core").PgColumn<{
|
|
4958
|
+
name: "import_id";
|
|
4959
|
+
tableName: "config_import";
|
|
4960
|
+
dataType: "string";
|
|
4961
|
+
columnType: "PgText";
|
|
4962
|
+
data: string;
|
|
4963
|
+
driverParam: string;
|
|
4964
|
+
notNull: true;
|
|
4965
|
+
hasDefault: true;
|
|
4966
|
+
isPrimaryKey: true;
|
|
4967
|
+
isAutoincrement: false;
|
|
4968
|
+
hasRuntimeDefault: true;
|
|
4969
|
+
enumValues: [string, ...string[]];
|
|
4970
|
+
baseColumn: never;
|
|
4971
|
+
identity: undefined;
|
|
4972
|
+
generated: undefined;
|
|
4973
|
+
}, {}, {}>;
|
|
4974
|
+
accountConfigId: import("drizzle-orm/pg-core").PgColumn<{
|
|
4975
|
+
name: "account_config_id";
|
|
4976
|
+
tableName: "config_import";
|
|
4977
|
+
dataType: "string";
|
|
4978
|
+
columnType: "PgText";
|
|
4979
|
+
data: string;
|
|
4980
|
+
driverParam: string;
|
|
4981
|
+
notNull: true;
|
|
4982
|
+
hasDefault: false;
|
|
4983
|
+
isPrimaryKey: false;
|
|
4984
|
+
isAutoincrement: false;
|
|
4985
|
+
hasRuntimeDefault: false;
|
|
4986
|
+
enumValues: [string, ...string[]];
|
|
4987
|
+
baseColumn: never;
|
|
4988
|
+
identity: undefined;
|
|
4989
|
+
generated: undefined;
|
|
4990
|
+
}, {}, {}>;
|
|
4991
|
+
schemaVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
4992
|
+
name: "schema_version";
|
|
4993
|
+
tableName: "config_import";
|
|
4994
|
+
dataType: "number";
|
|
4995
|
+
columnType: "PgInteger";
|
|
4996
|
+
data: number;
|
|
4997
|
+
driverParam: string | number;
|
|
4998
|
+
notNull: true;
|
|
4999
|
+
hasDefault: false;
|
|
5000
|
+
isPrimaryKey: false;
|
|
5001
|
+
isAutoincrement: false;
|
|
5002
|
+
hasRuntimeDefault: false;
|
|
5003
|
+
enumValues: undefined;
|
|
5004
|
+
baseColumn: never;
|
|
5005
|
+
identity: undefined;
|
|
5006
|
+
generated: undefined;
|
|
5007
|
+
}, {}, {}>;
|
|
5008
|
+
state: import("drizzle-orm/pg-core").PgColumn<{
|
|
5009
|
+
name: "state";
|
|
5010
|
+
tableName: "config_import";
|
|
5011
|
+
dataType: "string";
|
|
5012
|
+
columnType: "PgText";
|
|
5013
|
+
data: "Pending" | "Complete";
|
|
5014
|
+
driverParam: string;
|
|
5015
|
+
notNull: true;
|
|
5016
|
+
hasDefault: true;
|
|
5017
|
+
isPrimaryKey: false;
|
|
5018
|
+
isAutoincrement: false;
|
|
5019
|
+
hasRuntimeDefault: false;
|
|
5020
|
+
enumValues: [string, ...string[]];
|
|
5021
|
+
baseColumn: never;
|
|
5022
|
+
identity: undefined;
|
|
5023
|
+
generated: undefined;
|
|
5024
|
+
}, {}, {
|
|
5025
|
+
$type: "Pending" | "Complete";
|
|
5026
|
+
}>;
|
|
5027
|
+
document: import("drizzle-orm/pg-core").PgColumn<{
|
|
5028
|
+
name: "document";
|
|
5029
|
+
tableName: "config_import";
|
|
5030
|
+
dataType: "json";
|
|
5031
|
+
columnType: "PgJsonb";
|
|
5032
|
+
data: unknown;
|
|
5033
|
+
driverParam: unknown;
|
|
5034
|
+
notNull: true;
|
|
5035
|
+
hasDefault: false;
|
|
5036
|
+
isPrimaryKey: false;
|
|
5037
|
+
isAutoincrement: false;
|
|
5038
|
+
hasRuntimeDefault: false;
|
|
5039
|
+
enumValues: undefined;
|
|
5040
|
+
baseColumn: never;
|
|
5041
|
+
identity: undefined;
|
|
5042
|
+
generated: undefined;
|
|
5043
|
+
}, {}, {}>;
|
|
5044
|
+
unresolvedRefs: import("drizzle-orm/pg-core").PgColumn<{
|
|
5045
|
+
name: "unresolved_refs";
|
|
5046
|
+
tableName: "config_import";
|
|
5047
|
+
dataType: "json";
|
|
5048
|
+
columnType: "PgJsonb";
|
|
5049
|
+
data: unknown;
|
|
5050
|
+
driverParam: unknown;
|
|
5051
|
+
notNull: true;
|
|
5052
|
+
hasDefault: true;
|
|
5053
|
+
isPrimaryKey: false;
|
|
5054
|
+
isAutoincrement: false;
|
|
5055
|
+
hasRuntimeDefault: false;
|
|
5056
|
+
enumValues: undefined;
|
|
5057
|
+
baseColumn: never;
|
|
5058
|
+
identity: undefined;
|
|
5059
|
+
generated: undefined;
|
|
5060
|
+
}, {}, {}>;
|
|
5061
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
5062
|
+
name: "created_at";
|
|
5063
|
+
tableName: "config_import";
|
|
5064
|
+
dataType: "number";
|
|
5065
|
+
columnType: "PgBigInt53";
|
|
5066
|
+
data: number;
|
|
5067
|
+
driverParam: string | number;
|
|
5068
|
+
notNull: true;
|
|
5069
|
+
hasDefault: false;
|
|
5070
|
+
isPrimaryKey: false;
|
|
5071
|
+
isAutoincrement: false;
|
|
5072
|
+
hasRuntimeDefault: false;
|
|
5073
|
+
enumValues: undefined;
|
|
5074
|
+
baseColumn: never;
|
|
5075
|
+
identity: undefined;
|
|
5076
|
+
generated: undefined;
|
|
5077
|
+
}, {}, {}>;
|
|
5078
|
+
completedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
5079
|
+
name: "completed_at";
|
|
5080
|
+
tableName: "config_import";
|
|
5081
|
+
dataType: "number";
|
|
5082
|
+
columnType: "PgBigInt53";
|
|
5083
|
+
data: number;
|
|
5084
|
+
driverParam: string | number;
|
|
5085
|
+
notNull: true;
|
|
5086
|
+
hasDefault: true;
|
|
5087
|
+
isPrimaryKey: false;
|
|
5088
|
+
isAutoincrement: false;
|
|
5089
|
+
hasRuntimeDefault: false;
|
|
5090
|
+
enumValues: undefined;
|
|
5091
|
+
baseColumn: never;
|
|
5092
|
+
identity: undefined;
|
|
5093
|
+
generated: undefined;
|
|
5094
|
+
}, {}, {}>;
|
|
5095
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
5096
|
+
name: "updated_at";
|
|
5097
|
+
tableName: "config_import";
|
|
5098
|
+
dataType: "number";
|
|
5099
|
+
columnType: "PgBigInt53";
|
|
5100
|
+
data: number;
|
|
5101
|
+
driverParam: string | number;
|
|
5102
|
+
notNull: true;
|
|
5103
|
+
hasDefault: false;
|
|
5104
|
+
isPrimaryKey: false;
|
|
5105
|
+
isAutoincrement: false;
|
|
5106
|
+
hasRuntimeDefault: false;
|
|
5107
|
+
enumValues: undefined;
|
|
5108
|
+
baseColumn: never;
|
|
5109
|
+
identity: undefined;
|
|
5110
|
+
generated: undefined;
|
|
5111
|
+
}, {}, {}>;
|
|
5112
|
+
};
|
|
5113
|
+
dialect: "pg";
|
|
5114
|
+
}>;
|
|
4953
5115
|
export declare const accountSettings: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
4954
5116
|
name: "account_setting";
|
|
4955
5117
|
schema: undefined;
|
|
@@ -6825,6 +6987,685 @@ export declare const bodyPartContents: import("drizzle-orm/pg-core").PgTableWith
|
|
|
6825
6987
|
};
|
|
6826
6988
|
dialect: "pg";
|
|
6827
6989
|
}>;
|
|
6990
|
+
export declare const calendarCollections: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
6991
|
+
name: "calendar";
|
|
6992
|
+
schema: undefined;
|
|
6993
|
+
columns: {
|
|
6994
|
+
calendarId: import("drizzle-orm/pg-core").PgColumn<{
|
|
6995
|
+
name: "calendar_id";
|
|
6996
|
+
tableName: "calendar";
|
|
6997
|
+
dataType: "string";
|
|
6998
|
+
columnType: "PgText";
|
|
6999
|
+
data: string;
|
|
7000
|
+
driverParam: string;
|
|
7001
|
+
notNull: true;
|
|
7002
|
+
hasDefault: true;
|
|
7003
|
+
isPrimaryKey: true;
|
|
7004
|
+
isAutoincrement: false;
|
|
7005
|
+
hasRuntimeDefault: true;
|
|
7006
|
+
enumValues: [string, ...string[]];
|
|
7007
|
+
baseColumn: never;
|
|
7008
|
+
identity: undefined;
|
|
7009
|
+
generated: undefined;
|
|
7010
|
+
}, {}, {}>;
|
|
7011
|
+
accountConfigId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7012
|
+
name: "account_config_id";
|
|
7013
|
+
tableName: "calendar";
|
|
7014
|
+
dataType: "string";
|
|
7015
|
+
columnType: "PgText";
|
|
7016
|
+
data: string;
|
|
7017
|
+
driverParam: string;
|
|
7018
|
+
notNull: true;
|
|
7019
|
+
hasDefault: false;
|
|
7020
|
+
isPrimaryKey: false;
|
|
7021
|
+
isAutoincrement: false;
|
|
7022
|
+
hasRuntimeDefault: false;
|
|
7023
|
+
enumValues: [string, ...string[]];
|
|
7024
|
+
baseColumn: never;
|
|
7025
|
+
identity: undefined;
|
|
7026
|
+
generated: undefined;
|
|
7027
|
+
}, {}, {}>;
|
|
7028
|
+
urlSegment: import("drizzle-orm/pg-core").PgColumn<{
|
|
7029
|
+
name: "url_segment";
|
|
7030
|
+
tableName: "calendar";
|
|
7031
|
+
dataType: "string";
|
|
7032
|
+
columnType: "PgText";
|
|
7033
|
+
data: string;
|
|
7034
|
+
driverParam: string;
|
|
7035
|
+
notNull: true;
|
|
7036
|
+
hasDefault: false;
|
|
7037
|
+
isPrimaryKey: false;
|
|
7038
|
+
isAutoincrement: false;
|
|
7039
|
+
hasRuntimeDefault: false;
|
|
7040
|
+
enumValues: [string, ...string[]];
|
|
7041
|
+
baseColumn: never;
|
|
7042
|
+
identity: undefined;
|
|
7043
|
+
generated: undefined;
|
|
7044
|
+
}, {}, {}>;
|
|
7045
|
+
displayName: import("drizzle-orm/pg-core").PgColumn<{
|
|
7046
|
+
name: "display_name";
|
|
7047
|
+
tableName: "calendar";
|
|
7048
|
+
dataType: "string";
|
|
7049
|
+
columnType: "PgText";
|
|
7050
|
+
data: string;
|
|
7051
|
+
driverParam: string;
|
|
7052
|
+
notNull: true;
|
|
7053
|
+
hasDefault: false;
|
|
7054
|
+
isPrimaryKey: false;
|
|
7055
|
+
isAutoincrement: false;
|
|
7056
|
+
hasRuntimeDefault: false;
|
|
7057
|
+
enumValues: [string, ...string[]];
|
|
7058
|
+
baseColumn: never;
|
|
7059
|
+
identity: undefined;
|
|
7060
|
+
generated: undefined;
|
|
7061
|
+
}, {}, {}>;
|
|
7062
|
+
color: import("drizzle-orm/pg-core").PgColumn<{
|
|
7063
|
+
name: "color";
|
|
7064
|
+
tableName: "calendar";
|
|
7065
|
+
dataType: "string";
|
|
7066
|
+
columnType: "PgText";
|
|
7067
|
+
data: "Cal1" | "Cal2" | "Cal3" | "Cal4" | "Cal5" | "Cal6";
|
|
7068
|
+
driverParam: string;
|
|
7069
|
+
notNull: true;
|
|
7070
|
+
hasDefault: true;
|
|
7071
|
+
isPrimaryKey: false;
|
|
7072
|
+
isAutoincrement: false;
|
|
7073
|
+
hasRuntimeDefault: false;
|
|
7074
|
+
enumValues: [string, ...string[]];
|
|
7075
|
+
baseColumn: never;
|
|
7076
|
+
identity: undefined;
|
|
7077
|
+
generated: undefined;
|
|
7078
|
+
}, {}, {
|
|
7079
|
+
$type: "Cal1" | "Cal2" | "Cal3" | "Cal4" | "Cal5" | "Cal6";
|
|
7080
|
+
}>;
|
|
7081
|
+
componentSet: import("drizzle-orm/pg-core").PgColumn<{
|
|
7082
|
+
name: "component_set";
|
|
7083
|
+
tableName: "calendar";
|
|
7084
|
+
dataType: "string";
|
|
7085
|
+
columnType: "PgText";
|
|
7086
|
+
data: "VeventOnly";
|
|
7087
|
+
driverParam: string;
|
|
7088
|
+
notNull: true;
|
|
7089
|
+
hasDefault: true;
|
|
7090
|
+
isPrimaryKey: false;
|
|
7091
|
+
isAutoincrement: false;
|
|
7092
|
+
hasRuntimeDefault: false;
|
|
7093
|
+
enumValues: [string, ...string[]];
|
|
7094
|
+
baseColumn: never;
|
|
7095
|
+
identity: undefined;
|
|
7096
|
+
generated: undefined;
|
|
7097
|
+
}, {}, {
|
|
7098
|
+
$type: "VeventOnly";
|
|
7099
|
+
}>;
|
|
7100
|
+
source: import("drizzle-orm/pg-core").PgColumn<{
|
|
7101
|
+
name: "source";
|
|
7102
|
+
tableName: "calendar";
|
|
7103
|
+
dataType: "string";
|
|
7104
|
+
columnType: "PgText";
|
|
7105
|
+
data: "Default" | "UserCreated" | "MailDerived";
|
|
7106
|
+
driverParam: string;
|
|
7107
|
+
notNull: true;
|
|
7108
|
+
hasDefault: true;
|
|
7109
|
+
isPrimaryKey: false;
|
|
7110
|
+
isAutoincrement: false;
|
|
7111
|
+
hasRuntimeDefault: false;
|
|
7112
|
+
enumValues: [string, ...string[]];
|
|
7113
|
+
baseColumn: never;
|
|
7114
|
+
identity: undefined;
|
|
7115
|
+
generated: undefined;
|
|
7116
|
+
}, {}, {
|
|
7117
|
+
$type: "Default" | "UserCreated" | "MailDerived";
|
|
7118
|
+
}>;
|
|
7119
|
+
timezone: import("drizzle-orm/pg-core").PgColumn<{
|
|
7120
|
+
name: "timezone";
|
|
7121
|
+
tableName: "calendar";
|
|
7122
|
+
dataType: "string";
|
|
7123
|
+
columnType: "PgText";
|
|
7124
|
+
data: string;
|
|
7125
|
+
driverParam: string;
|
|
7126
|
+
notNull: true;
|
|
7127
|
+
hasDefault: true;
|
|
7128
|
+
isPrimaryKey: false;
|
|
7129
|
+
isAutoincrement: false;
|
|
7130
|
+
hasRuntimeDefault: false;
|
|
7131
|
+
enumValues: [string, ...string[]];
|
|
7132
|
+
baseColumn: never;
|
|
7133
|
+
identity: undefined;
|
|
7134
|
+
generated: undefined;
|
|
7135
|
+
}, {}, {}>;
|
|
7136
|
+
syncSequence: import("drizzle-orm/pg-core").PgColumn<{
|
|
7137
|
+
name: "sync_sequence";
|
|
7138
|
+
tableName: "calendar";
|
|
7139
|
+
dataType: "number";
|
|
7140
|
+
columnType: "PgBigInt53";
|
|
7141
|
+
data: number;
|
|
7142
|
+
driverParam: string | number;
|
|
7143
|
+
notNull: true;
|
|
7144
|
+
hasDefault: true;
|
|
7145
|
+
isPrimaryKey: false;
|
|
7146
|
+
isAutoincrement: false;
|
|
7147
|
+
hasRuntimeDefault: false;
|
|
7148
|
+
enumValues: undefined;
|
|
7149
|
+
baseColumn: never;
|
|
7150
|
+
identity: undefined;
|
|
7151
|
+
generated: undefined;
|
|
7152
|
+
}, {}, {}>;
|
|
7153
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
7154
|
+
name: "created_at";
|
|
7155
|
+
tableName: "calendar";
|
|
7156
|
+
dataType: "number";
|
|
7157
|
+
columnType: "PgBigInt53";
|
|
7158
|
+
data: number;
|
|
7159
|
+
driverParam: string | number;
|
|
7160
|
+
notNull: true;
|
|
7161
|
+
hasDefault: false;
|
|
7162
|
+
isPrimaryKey: false;
|
|
7163
|
+
isAutoincrement: false;
|
|
7164
|
+
hasRuntimeDefault: false;
|
|
7165
|
+
enumValues: undefined;
|
|
7166
|
+
baseColumn: never;
|
|
7167
|
+
identity: undefined;
|
|
7168
|
+
generated: undefined;
|
|
7169
|
+
}, {}, {}>;
|
|
7170
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
7171
|
+
name: "updated_at";
|
|
7172
|
+
tableName: "calendar";
|
|
7173
|
+
dataType: "number";
|
|
7174
|
+
columnType: "PgBigInt53";
|
|
7175
|
+
data: number;
|
|
7176
|
+
driverParam: string | number;
|
|
7177
|
+
notNull: true;
|
|
7178
|
+
hasDefault: false;
|
|
7179
|
+
isPrimaryKey: false;
|
|
7180
|
+
isAutoincrement: false;
|
|
7181
|
+
hasRuntimeDefault: false;
|
|
7182
|
+
enumValues: undefined;
|
|
7183
|
+
baseColumn: never;
|
|
7184
|
+
identity: undefined;
|
|
7185
|
+
generated: undefined;
|
|
7186
|
+
}, {}, {}>;
|
|
7187
|
+
};
|
|
7188
|
+
dialect: "pg";
|
|
7189
|
+
}>;
|
|
7190
|
+
export declare const calendarObjects: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
7191
|
+
name: "calendar_object";
|
|
7192
|
+
schema: undefined;
|
|
7193
|
+
columns: {
|
|
7194
|
+
calendarObjectId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7195
|
+
name: "calendar_object_id";
|
|
7196
|
+
tableName: "calendar_object";
|
|
7197
|
+
dataType: "string";
|
|
7198
|
+
columnType: "PgText";
|
|
7199
|
+
data: string;
|
|
7200
|
+
driverParam: string;
|
|
7201
|
+
notNull: true;
|
|
7202
|
+
hasDefault: true;
|
|
7203
|
+
isPrimaryKey: true;
|
|
7204
|
+
isAutoincrement: false;
|
|
7205
|
+
hasRuntimeDefault: true;
|
|
7206
|
+
enumValues: [string, ...string[]];
|
|
7207
|
+
baseColumn: never;
|
|
7208
|
+
identity: undefined;
|
|
7209
|
+
generated: undefined;
|
|
7210
|
+
}, {}, {}>;
|
|
7211
|
+
calendarId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7212
|
+
name: "calendar_id";
|
|
7213
|
+
tableName: "calendar_object";
|
|
7214
|
+
dataType: "string";
|
|
7215
|
+
columnType: "PgText";
|
|
7216
|
+
data: string;
|
|
7217
|
+
driverParam: string;
|
|
7218
|
+
notNull: true;
|
|
7219
|
+
hasDefault: false;
|
|
7220
|
+
isPrimaryKey: false;
|
|
7221
|
+
isAutoincrement: false;
|
|
7222
|
+
hasRuntimeDefault: false;
|
|
7223
|
+
enumValues: [string, ...string[]];
|
|
7224
|
+
baseColumn: never;
|
|
7225
|
+
identity: undefined;
|
|
7226
|
+
generated: undefined;
|
|
7227
|
+
}, {}, {}>;
|
|
7228
|
+
resourceName: import("drizzle-orm/pg-core").PgColumn<{
|
|
7229
|
+
name: "resource_name";
|
|
7230
|
+
tableName: "calendar_object";
|
|
7231
|
+
dataType: "string";
|
|
7232
|
+
columnType: "PgText";
|
|
7233
|
+
data: string;
|
|
7234
|
+
driverParam: string;
|
|
7235
|
+
notNull: true;
|
|
7236
|
+
hasDefault: false;
|
|
7237
|
+
isPrimaryKey: false;
|
|
7238
|
+
isAutoincrement: false;
|
|
7239
|
+
hasRuntimeDefault: false;
|
|
7240
|
+
enumValues: [string, ...string[]];
|
|
7241
|
+
baseColumn: never;
|
|
7242
|
+
identity: undefined;
|
|
7243
|
+
generated: undefined;
|
|
7244
|
+
}, {}, {}>;
|
|
7245
|
+
icalUid: import("drizzle-orm/pg-core").PgColumn<{
|
|
7246
|
+
name: "ical_uid";
|
|
7247
|
+
tableName: "calendar_object";
|
|
7248
|
+
dataType: "string";
|
|
7249
|
+
columnType: "PgText";
|
|
7250
|
+
data: string;
|
|
7251
|
+
driverParam: string;
|
|
7252
|
+
notNull: true;
|
|
7253
|
+
hasDefault: false;
|
|
7254
|
+
isPrimaryKey: false;
|
|
7255
|
+
isAutoincrement: false;
|
|
7256
|
+
hasRuntimeDefault: false;
|
|
7257
|
+
enumValues: [string, ...string[]];
|
|
7258
|
+
baseColumn: never;
|
|
7259
|
+
identity: undefined;
|
|
7260
|
+
generated: undefined;
|
|
7261
|
+
}, {}, {}>;
|
|
7262
|
+
icalData: import("drizzle-orm/pg-core").PgColumn<{
|
|
7263
|
+
name: "ical_data";
|
|
7264
|
+
tableName: "calendar_object";
|
|
7265
|
+
dataType: "string";
|
|
7266
|
+
columnType: "PgText";
|
|
7267
|
+
data: string;
|
|
7268
|
+
driverParam: string;
|
|
7269
|
+
notNull: true;
|
|
7270
|
+
hasDefault: false;
|
|
7271
|
+
isPrimaryKey: false;
|
|
7272
|
+
isAutoincrement: false;
|
|
7273
|
+
hasRuntimeDefault: false;
|
|
7274
|
+
enumValues: [string, ...string[]];
|
|
7275
|
+
baseColumn: never;
|
|
7276
|
+
identity: undefined;
|
|
7277
|
+
generated: undefined;
|
|
7278
|
+
}, {}, {}>;
|
|
7279
|
+
etag: import("drizzle-orm/pg-core").PgColumn<{
|
|
7280
|
+
name: "etag";
|
|
7281
|
+
tableName: "calendar_object";
|
|
7282
|
+
dataType: "string";
|
|
7283
|
+
columnType: "PgText";
|
|
7284
|
+
data: string;
|
|
7285
|
+
driverParam: string;
|
|
7286
|
+
notNull: true;
|
|
7287
|
+
hasDefault: false;
|
|
7288
|
+
isPrimaryKey: false;
|
|
7289
|
+
isAutoincrement: false;
|
|
7290
|
+
hasRuntimeDefault: false;
|
|
7291
|
+
enumValues: [string, ...string[]];
|
|
7292
|
+
baseColumn: never;
|
|
7293
|
+
identity: undefined;
|
|
7294
|
+
generated: undefined;
|
|
7295
|
+
}, {}, {}>;
|
|
7296
|
+
sequence: import("drizzle-orm/pg-core").PgColumn<{
|
|
7297
|
+
name: "sequence";
|
|
7298
|
+
tableName: "calendar_object";
|
|
7299
|
+
dataType: "number";
|
|
7300
|
+
columnType: "PgInteger";
|
|
7301
|
+
data: number;
|
|
7302
|
+
driverParam: string | number;
|
|
7303
|
+
notNull: true;
|
|
7304
|
+
hasDefault: true;
|
|
7305
|
+
isPrimaryKey: false;
|
|
7306
|
+
isAutoincrement: false;
|
|
7307
|
+
hasRuntimeDefault: false;
|
|
7308
|
+
enumValues: undefined;
|
|
7309
|
+
baseColumn: never;
|
|
7310
|
+
identity: undefined;
|
|
7311
|
+
generated: undefined;
|
|
7312
|
+
}, {}, {}>;
|
|
7313
|
+
syncSequence: import("drizzle-orm/pg-core").PgColumn<{
|
|
7314
|
+
name: "sync_sequence";
|
|
7315
|
+
tableName: "calendar_object";
|
|
7316
|
+
dataType: "number";
|
|
7317
|
+
columnType: "PgBigInt53";
|
|
7318
|
+
data: number;
|
|
7319
|
+
driverParam: string | number;
|
|
7320
|
+
notNull: true;
|
|
7321
|
+
hasDefault: true;
|
|
7322
|
+
isPrimaryKey: false;
|
|
7323
|
+
isAutoincrement: false;
|
|
7324
|
+
hasRuntimeDefault: false;
|
|
7325
|
+
enumValues: undefined;
|
|
7326
|
+
baseColumn: never;
|
|
7327
|
+
identity: undefined;
|
|
7328
|
+
generated: undefined;
|
|
7329
|
+
}, {}, {}>;
|
|
7330
|
+
summary: import("drizzle-orm/pg-core").PgColumn<{
|
|
7331
|
+
name: "summary";
|
|
7332
|
+
tableName: "calendar_object";
|
|
7333
|
+
dataType: "string";
|
|
7334
|
+
columnType: "PgText";
|
|
7335
|
+
data: string;
|
|
7336
|
+
driverParam: string;
|
|
7337
|
+
notNull: true;
|
|
7338
|
+
hasDefault: false;
|
|
7339
|
+
isPrimaryKey: false;
|
|
7340
|
+
isAutoincrement: false;
|
|
7341
|
+
hasRuntimeDefault: false;
|
|
7342
|
+
enumValues: [string, ...string[]];
|
|
7343
|
+
baseColumn: never;
|
|
7344
|
+
identity: undefined;
|
|
7345
|
+
generated: undefined;
|
|
7346
|
+
}, {}, {}>;
|
|
7347
|
+
dtStart: import("drizzle-orm/pg-core").PgColumn<{
|
|
7348
|
+
name: "dt_start";
|
|
7349
|
+
tableName: "calendar_object";
|
|
7350
|
+
dataType: "string";
|
|
7351
|
+
columnType: "PgText";
|
|
7352
|
+
data: string;
|
|
7353
|
+
driverParam: string;
|
|
7354
|
+
notNull: true;
|
|
7355
|
+
hasDefault: false;
|
|
7356
|
+
isPrimaryKey: false;
|
|
7357
|
+
isAutoincrement: false;
|
|
7358
|
+
hasRuntimeDefault: false;
|
|
7359
|
+
enumValues: [string, ...string[]];
|
|
7360
|
+
baseColumn: never;
|
|
7361
|
+
identity: undefined;
|
|
7362
|
+
generated: undefined;
|
|
7363
|
+
}, {}, {}>;
|
|
7364
|
+
dtEnd: import("drizzle-orm/pg-core").PgColumn<{
|
|
7365
|
+
name: "dt_end";
|
|
7366
|
+
tableName: "calendar_object";
|
|
7367
|
+
dataType: "string";
|
|
7368
|
+
columnType: "PgText";
|
|
7369
|
+
data: string;
|
|
7370
|
+
driverParam: string;
|
|
7371
|
+
notNull: true;
|
|
7372
|
+
hasDefault: false;
|
|
7373
|
+
isPrimaryKey: false;
|
|
7374
|
+
isAutoincrement: false;
|
|
7375
|
+
hasRuntimeDefault: false;
|
|
7376
|
+
enumValues: [string, ...string[]];
|
|
7377
|
+
baseColumn: never;
|
|
7378
|
+
identity: undefined;
|
|
7379
|
+
generated: undefined;
|
|
7380
|
+
}, {}, {}>;
|
|
7381
|
+
allDay: import("drizzle-orm/pg-core").PgColumn<{
|
|
7382
|
+
name: "all_day";
|
|
7383
|
+
tableName: "calendar_object";
|
|
7384
|
+
dataType: "boolean";
|
|
7385
|
+
columnType: "PgBoolean";
|
|
7386
|
+
data: boolean;
|
|
7387
|
+
driverParam: boolean;
|
|
7388
|
+
notNull: true;
|
|
7389
|
+
hasDefault: true;
|
|
7390
|
+
isPrimaryKey: false;
|
|
7391
|
+
isAutoincrement: false;
|
|
7392
|
+
hasRuntimeDefault: false;
|
|
7393
|
+
enumValues: undefined;
|
|
7394
|
+
baseColumn: never;
|
|
7395
|
+
identity: undefined;
|
|
7396
|
+
generated: undefined;
|
|
7397
|
+
}, {}, {}>;
|
|
7398
|
+
zoneCertainty: import("drizzle-orm/pg-core").PgColumn<{
|
|
7399
|
+
name: "zone_certainty";
|
|
7400
|
+
tableName: "calendar_object";
|
|
7401
|
+
dataType: "string";
|
|
7402
|
+
columnType: "PgText";
|
|
7403
|
+
data: "Local" | "Explicit" | "Ambiguous";
|
|
7404
|
+
driverParam: string;
|
|
7405
|
+
notNull: true;
|
|
7406
|
+
hasDefault: true;
|
|
7407
|
+
isPrimaryKey: false;
|
|
7408
|
+
isAutoincrement: false;
|
|
7409
|
+
hasRuntimeDefault: false;
|
|
7410
|
+
enumValues: [string, ...string[]];
|
|
7411
|
+
baseColumn: never;
|
|
7412
|
+
identity: undefined;
|
|
7413
|
+
generated: undefined;
|
|
7414
|
+
}, {}, {
|
|
7415
|
+
$type: "Local" | "Explicit" | "Ambiguous";
|
|
7416
|
+
}>;
|
|
7417
|
+
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
7418
|
+
name: "status";
|
|
7419
|
+
tableName: "calendar_object";
|
|
7420
|
+
dataType: "string";
|
|
7421
|
+
columnType: "PgText";
|
|
7422
|
+
data: "Confirmed" | "Tentative" | "Cancelled";
|
|
7423
|
+
driverParam: string;
|
|
7424
|
+
notNull: true;
|
|
7425
|
+
hasDefault: true;
|
|
7426
|
+
isPrimaryKey: false;
|
|
7427
|
+
isAutoincrement: false;
|
|
7428
|
+
hasRuntimeDefault: false;
|
|
7429
|
+
enumValues: [string, ...string[]];
|
|
7430
|
+
baseColumn: never;
|
|
7431
|
+
identity: undefined;
|
|
7432
|
+
generated: undefined;
|
|
7433
|
+
}, {}, {
|
|
7434
|
+
$type: "Confirmed" | "Tentative" | "Cancelled";
|
|
7435
|
+
}>;
|
|
7436
|
+
transparency: import("drizzle-orm/pg-core").PgColumn<{
|
|
7437
|
+
name: "transparency";
|
|
7438
|
+
tableName: "calendar_object";
|
|
7439
|
+
dataType: "string";
|
|
7440
|
+
columnType: "PgText";
|
|
7441
|
+
data: "Opaque" | "Transparent";
|
|
7442
|
+
driverParam: string;
|
|
7443
|
+
notNull: true;
|
|
7444
|
+
hasDefault: true;
|
|
7445
|
+
isPrimaryKey: false;
|
|
7446
|
+
isAutoincrement: false;
|
|
7447
|
+
hasRuntimeDefault: false;
|
|
7448
|
+
enumValues: [string, ...string[]];
|
|
7449
|
+
baseColumn: never;
|
|
7450
|
+
identity: undefined;
|
|
7451
|
+
generated: undefined;
|
|
7452
|
+
}, {}, {
|
|
7453
|
+
$type: "Opaque" | "Transparent";
|
|
7454
|
+
}>;
|
|
7455
|
+
hasRecurrence: import("drizzle-orm/pg-core").PgColumn<{
|
|
7456
|
+
name: "has_recurrence";
|
|
7457
|
+
tableName: "calendar_object";
|
|
7458
|
+
dataType: "boolean";
|
|
7459
|
+
columnType: "PgBoolean";
|
|
7460
|
+
data: boolean;
|
|
7461
|
+
driverParam: boolean;
|
|
7462
|
+
notNull: true;
|
|
7463
|
+
hasDefault: true;
|
|
7464
|
+
isPrimaryKey: false;
|
|
7465
|
+
isAutoincrement: false;
|
|
7466
|
+
hasRuntimeDefault: false;
|
|
7467
|
+
enumValues: undefined;
|
|
7468
|
+
baseColumn: never;
|
|
7469
|
+
identity: undefined;
|
|
7470
|
+
generated: undefined;
|
|
7471
|
+
}, {}, {}>;
|
|
7472
|
+
expandedThrough: import("drizzle-orm/pg-core").PgColumn<{
|
|
7473
|
+
name: "expanded_through";
|
|
7474
|
+
tableName: "calendar_object";
|
|
7475
|
+
dataType: "string";
|
|
7476
|
+
columnType: "PgText";
|
|
7477
|
+
data: string;
|
|
7478
|
+
driverParam: string;
|
|
7479
|
+
notNull: true;
|
|
7480
|
+
hasDefault: true;
|
|
7481
|
+
isPrimaryKey: false;
|
|
7482
|
+
isAutoincrement: false;
|
|
7483
|
+
hasRuntimeDefault: false;
|
|
7484
|
+
enumValues: [string, ...string[]];
|
|
7485
|
+
baseColumn: never;
|
|
7486
|
+
identity: undefined;
|
|
7487
|
+
generated: undefined;
|
|
7488
|
+
}, {}, {}>;
|
|
7489
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
7490
|
+
name: "created_at";
|
|
7491
|
+
tableName: "calendar_object";
|
|
7492
|
+
dataType: "number";
|
|
7493
|
+
columnType: "PgBigInt53";
|
|
7494
|
+
data: number;
|
|
7495
|
+
driverParam: string | number;
|
|
7496
|
+
notNull: true;
|
|
7497
|
+
hasDefault: false;
|
|
7498
|
+
isPrimaryKey: false;
|
|
7499
|
+
isAutoincrement: false;
|
|
7500
|
+
hasRuntimeDefault: false;
|
|
7501
|
+
enumValues: undefined;
|
|
7502
|
+
baseColumn: never;
|
|
7503
|
+
identity: undefined;
|
|
7504
|
+
generated: undefined;
|
|
7505
|
+
}, {}, {}>;
|
|
7506
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
7507
|
+
name: "updated_at";
|
|
7508
|
+
tableName: "calendar_object";
|
|
7509
|
+
dataType: "number";
|
|
7510
|
+
columnType: "PgBigInt53";
|
|
7511
|
+
data: number;
|
|
7512
|
+
driverParam: string | number;
|
|
7513
|
+
notNull: true;
|
|
7514
|
+
hasDefault: false;
|
|
7515
|
+
isPrimaryKey: false;
|
|
7516
|
+
isAutoincrement: false;
|
|
7517
|
+
hasRuntimeDefault: false;
|
|
7518
|
+
enumValues: undefined;
|
|
7519
|
+
baseColumn: never;
|
|
7520
|
+
identity: undefined;
|
|
7521
|
+
generated: undefined;
|
|
7522
|
+
}, {}, {}>;
|
|
7523
|
+
};
|
|
7524
|
+
dialect: "pg";
|
|
7525
|
+
}>;
|
|
7526
|
+
export declare const calendarEventIndexes: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
7527
|
+
name: "calendar_event_index";
|
|
7528
|
+
schema: undefined;
|
|
7529
|
+
columns: {
|
|
7530
|
+
calendarId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7531
|
+
name: "calendar_id";
|
|
7532
|
+
tableName: "calendar_event_index";
|
|
7533
|
+
dataType: "string";
|
|
7534
|
+
columnType: "PgText";
|
|
7535
|
+
data: string;
|
|
7536
|
+
driverParam: string;
|
|
7537
|
+
notNull: true;
|
|
7538
|
+
hasDefault: false;
|
|
7539
|
+
isPrimaryKey: false;
|
|
7540
|
+
isAutoincrement: false;
|
|
7541
|
+
hasRuntimeDefault: false;
|
|
7542
|
+
enumValues: [string, ...string[]];
|
|
7543
|
+
baseColumn: never;
|
|
7544
|
+
identity: undefined;
|
|
7545
|
+
generated: undefined;
|
|
7546
|
+
}, {}, {}>;
|
|
7547
|
+
calendarObjectId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7548
|
+
name: "calendar_object_id";
|
|
7549
|
+
tableName: "calendar_event_index";
|
|
7550
|
+
dataType: "string";
|
|
7551
|
+
columnType: "PgText";
|
|
7552
|
+
data: string;
|
|
7553
|
+
driverParam: string;
|
|
7554
|
+
notNull: true;
|
|
7555
|
+
hasDefault: false;
|
|
7556
|
+
isPrimaryKey: false;
|
|
7557
|
+
isAutoincrement: false;
|
|
7558
|
+
hasRuntimeDefault: false;
|
|
7559
|
+
enumValues: [string, ...string[]];
|
|
7560
|
+
baseColumn: never;
|
|
7561
|
+
identity: undefined;
|
|
7562
|
+
generated: undefined;
|
|
7563
|
+
}, {}, {}>;
|
|
7564
|
+
recurrenceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7565
|
+
name: "recurrence_id";
|
|
7566
|
+
tableName: "calendar_event_index";
|
|
7567
|
+
dataType: "string";
|
|
7568
|
+
columnType: "PgText";
|
|
7569
|
+
data: string;
|
|
7570
|
+
driverParam: string;
|
|
7571
|
+
notNull: true;
|
|
7572
|
+
hasDefault: false;
|
|
7573
|
+
isPrimaryKey: false;
|
|
7574
|
+
isAutoincrement: false;
|
|
7575
|
+
hasRuntimeDefault: false;
|
|
7576
|
+
enumValues: [string, ...string[]];
|
|
7577
|
+
baseColumn: never;
|
|
7578
|
+
identity: undefined;
|
|
7579
|
+
generated: undefined;
|
|
7580
|
+
}, {}, {}>;
|
|
7581
|
+
startAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
7582
|
+
name: "start_at";
|
|
7583
|
+
tableName: "calendar_event_index";
|
|
7584
|
+
dataType: "string";
|
|
7585
|
+
columnType: "PgText";
|
|
7586
|
+
data: string;
|
|
7587
|
+
driverParam: string;
|
|
7588
|
+
notNull: true;
|
|
7589
|
+
hasDefault: false;
|
|
7590
|
+
isPrimaryKey: false;
|
|
7591
|
+
isAutoincrement: false;
|
|
7592
|
+
hasRuntimeDefault: false;
|
|
7593
|
+
enumValues: [string, ...string[]];
|
|
7594
|
+
baseColumn: never;
|
|
7595
|
+
identity: undefined;
|
|
7596
|
+
generated: undefined;
|
|
7597
|
+
}, {}, {}>;
|
|
7598
|
+
endAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
7599
|
+
name: "end_at";
|
|
7600
|
+
tableName: "calendar_event_index";
|
|
7601
|
+
dataType: "string";
|
|
7602
|
+
columnType: "PgText";
|
|
7603
|
+
data: string;
|
|
7604
|
+
driverParam: string;
|
|
7605
|
+
notNull: true;
|
|
7606
|
+
hasDefault: false;
|
|
7607
|
+
isPrimaryKey: false;
|
|
7608
|
+
isAutoincrement: false;
|
|
7609
|
+
hasRuntimeDefault: false;
|
|
7610
|
+
enumValues: [string, ...string[]];
|
|
7611
|
+
baseColumn: never;
|
|
7612
|
+
identity: undefined;
|
|
7613
|
+
generated: undefined;
|
|
7614
|
+
}, {}, {}>;
|
|
7615
|
+
allDay: import("drizzle-orm/pg-core").PgColumn<{
|
|
7616
|
+
name: "all_day";
|
|
7617
|
+
tableName: "calendar_event_index";
|
|
7618
|
+
dataType: "boolean";
|
|
7619
|
+
columnType: "PgBoolean";
|
|
7620
|
+
data: boolean;
|
|
7621
|
+
driverParam: boolean;
|
|
7622
|
+
notNull: true;
|
|
7623
|
+
hasDefault: true;
|
|
7624
|
+
isPrimaryKey: false;
|
|
7625
|
+
isAutoincrement: false;
|
|
7626
|
+
hasRuntimeDefault: false;
|
|
7627
|
+
enumValues: undefined;
|
|
7628
|
+
baseColumn: never;
|
|
7629
|
+
identity: undefined;
|
|
7630
|
+
generated: undefined;
|
|
7631
|
+
}, {}, {}>;
|
|
7632
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
7633
|
+
name: "created_at";
|
|
7634
|
+
tableName: "calendar_event_index";
|
|
7635
|
+
dataType: "number";
|
|
7636
|
+
columnType: "PgBigInt53";
|
|
7637
|
+
data: number;
|
|
7638
|
+
driverParam: string | number;
|
|
7639
|
+
notNull: true;
|
|
7640
|
+
hasDefault: false;
|
|
7641
|
+
isPrimaryKey: false;
|
|
7642
|
+
isAutoincrement: false;
|
|
7643
|
+
hasRuntimeDefault: false;
|
|
7644
|
+
enumValues: undefined;
|
|
7645
|
+
baseColumn: never;
|
|
7646
|
+
identity: undefined;
|
|
7647
|
+
generated: undefined;
|
|
7648
|
+
}, {}, {}>;
|
|
7649
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
7650
|
+
name: "updated_at";
|
|
7651
|
+
tableName: "calendar_event_index";
|
|
7652
|
+
dataType: "number";
|
|
7653
|
+
columnType: "PgBigInt53";
|
|
7654
|
+
data: number;
|
|
7655
|
+
driverParam: string | number;
|
|
7656
|
+
notNull: true;
|
|
7657
|
+
hasDefault: false;
|
|
7658
|
+
isPrimaryKey: false;
|
|
7659
|
+
isAutoincrement: false;
|
|
7660
|
+
hasRuntimeDefault: false;
|
|
7661
|
+
enumValues: undefined;
|
|
7662
|
+
baseColumn: never;
|
|
7663
|
+
identity: undefined;
|
|
7664
|
+
generated: undefined;
|
|
7665
|
+
}, {}, {}>;
|
|
7666
|
+
};
|
|
7667
|
+
dialect: "pg";
|
|
7668
|
+
}>;
|
|
6828
7669
|
export declare const messageLabels: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
6829
7670
|
name: "message_label";
|
|
6830
7671
|
schema: undefined;
|
package/dist/schema.js
CHANGED
|
@@ -349,6 +349,19 @@ export const envelopeAddresses = pgTable("envelope_address", {
|
|
|
349
349
|
}, (table) => [
|
|
350
350
|
index("envelope_address_by_message_id").on(table.messageId, table.envelopeAddressId),
|
|
351
351
|
]);
|
|
352
|
+
export const configImports = pgTable("config_import", {
|
|
353
|
+
importId: text("import_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
354
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
355
|
+
schemaVersion: integer("schema_version").notNull(),
|
|
356
|
+
state: text("state").$type().notNull().default("Pending"),
|
|
357
|
+
document: jsonb("document").notNull(),
|
|
358
|
+
unresolvedRefs: jsonb("unresolved_refs").notNull().default([]),
|
|
359
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
360
|
+
completedAt: bigint("completed_at", { mode: "number" }).notNull().default(0),
|
|
361
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
362
|
+
}, (table) => [
|
|
363
|
+
index("config_import_by_account_config_id").on(table.accountConfigId, table.createdAt),
|
|
364
|
+
]);
|
|
352
365
|
export const accountSettings = pgTable("account_setting", {
|
|
353
366
|
accountSettingId: text("account_setting_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
354
367
|
accountConfigId: text("account_config_id").notNull(),
|
|
@@ -512,6 +525,60 @@ export const bodyPartContents = pgTable("body_part_content", {
|
|
|
512
525
|
}, (table) => [
|
|
513
526
|
index("body_part_content_by_message_id").on(table.messageId, table.bodyPartContentId),
|
|
514
527
|
]);
|
|
528
|
+
export const calendarCollections = pgTable("calendar", {
|
|
529
|
+
calendarId: text("calendar_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
530
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
531
|
+
urlSegment: text("url_segment").notNull(),
|
|
532
|
+
displayName: text("display_name").notNull(),
|
|
533
|
+
color: text("color").$type().notNull().default("Cal1"),
|
|
534
|
+
componentSet: text("component_set").$type().notNull().default("VeventOnly"),
|
|
535
|
+
source: text("source").$type().notNull().default("UserCreated"),
|
|
536
|
+
timezone: text("timezone").notNull().default(""),
|
|
537
|
+
syncSequence: bigint("sync_sequence", { mode: "number" }).notNull().default(0),
|
|
538
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
539
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
540
|
+
}, (table) => [
|
|
541
|
+
index("calendar_by_url_segment").on(table.accountConfigId, table.urlSegment),
|
|
542
|
+
index("calendar_primary").on(table.accountConfigId, table.calendarId),
|
|
543
|
+
]);
|
|
544
|
+
export const calendarObjects = pgTable("calendar_object", {
|
|
545
|
+
calendarObjectId: text("calendar_object_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
546
|
+
calendarId: text("calendar_id").notNull(),
|
|
547
|
+
resourceName: text("resource_name").notNull(),
|
|
548
|
+
icalUid: text("ical_uid").notNull(),
|
|
549
|
+
icalData: text("ical_data").notNull(),
|
|
550
|
+
etag: text("etag").notNull(),
|
|
551
|
+
sequence: integer("sequence").notNull().default(0),
|
|
552
|
+
syncSequence: bigint("sync_sequence", { mode: "number" }).notNull().default(0),
|
|
553
|
+
summary: text("summary").notNull(),
|
|
554
|
+
dtStart: text("dt_start").notNull(),
|
|
555
|
+
dtEnd: text("dt_end").notNull(),
|
|
556
|
+
allDay: boolean("all_day").notNull().default(false),
|
|
557
|
+
zoneCertainty: text("zone_certainty").$type().notNull().default("Explicit"),
|
|
558
|
+
status: text("status").$type().notNull().default("Confirmed"),
|
|
559
|
+
transparency: text("transparency").$type().notNull().default("Opaque"),
|
|
560
|
+
hasRecurrence: boolean("has_recurrence").notNull().default(false),
|
|
561
|
+
expandedThrough: text("expanded_through").notNull().default(""),
|
|
562
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
563
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
564
|
+
}, (table) => [
|
|
565
|
+
index("calendar_object_by_sync_sequence").on(table.calendarId, table.syncSequence),
|
|
566
|
+
index("calendar_object_by_uid").on(table.calendarId, table.icalUid),
|
|
567
|
+
index("calendar_object_primary").on(table.calendarId, table.calendarObjectId),
|
|
568
|
+
]);
|
|
569
|
+
export const calendarEventIndexes = pgTable("calendar_event_index", {
|
|
570
|
+
calendarId: text("calendar_id").notNull(),
|
|
571
|
+
calendarObjectId: text("calendar_object_id").notNull(),
|
|
572
|
+
recurrenceId: text("recurrence_id").notNull(),
|
|
573
|
+
startAt: text("start_at").notNull(),
|
|
574
|
+
endAt: text("end_at").notNull(),
|
|
575
|
+
allDay: boolean("all_day").notNull().default(false),
|
|
576
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
577
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
578
|
+
}, (table) => [
|
|
579
|
+
primaryKey({ name: "calendar_event_index_pk", columns: [table.calendarId, table.calendarObjectId, table.recurrenceId] }),
|
|
580
|
+
index("calendar_event_index_by_start").on(table.calendarId, table.startAt),
|
|
581
|
+
]);
|
|
515
582
|
export const messageLabels = pgTable("message_label", {
|
|
516
583
|
messageLabelId: text("message_label_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
517
584
|
messageId: text("message_id").notNull(),
|
package/package.json
CHANGED
package/schema.ts
CHANGED
|
@@ -92,7 +92,7 @@ export const accounts = pgTable(
|
|
|
92
92
|
smtpUsername: text("smtp_username").notNull().default(""),
|
|
93
93
|
smtpPasswordHash: nullableText("smtp_password_hash"),
|
|
94
94
|
isActive: boolean("is_active").notNull(),
|
|
95
|
-
connectionState: text("connection_state").$type<"not_authenticated" | "authenticated" | "selected" | "logout" | "reauth_required">().notNull(),
|
|
95
|
+
connectionState: text("connection_state").$type<"not_authenticated" | "authenticated" | "selected" | "logout" | "reauth_required" | "credentials_missing">().notNull(),
|
|
96
96
|
lastConnectedAt: nullableBigint("last_connected_at"),
|
|
97
97
|
lastSyncAt: nullableBigint("last_sync_at"),
|
|
98
98
|
lastError: nullableText("last_error"),
|
|
@@ -430,6 +430,24 @@ export const envelopeAddresses = pgTable(
|
|
|
430
430
|
],
|
|
431
431
|
);
|
|
432
432
|
|
|
433
|
+
export const configImports = pgTable(
|
|
434
|
+
"config_import",
|
|
435
|
+
{
|
|
436
|
+
importId: text("import_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
437
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
438
|
+
schemaVersion: integer("schema_version").notNull(),
|
|
439
|
+
state: text("state").$type<"Pending" | "Complete">().notNull().default("Pending"),
|
|
440
|
+
document: jsonb("document").notNull(),
|
|
441
|
+
unresolvedRefs: jsonb("unresolved_refs").notNull().default([]),
|
|
442
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
443
|
+
completedAt: bigint("completed_at", { mode: "number" }).notNull().default(0),
|
|
444
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
445
|
+
},
|
|
446
|
+
(table) => [
|
|
447
|
+
index("config_import_by_account_config_id").on(table.accountConfigId, table.createdAt),
|
|
448
|
+
],
|
|
449
|
+
);
|
|
450
|
+
|
|
433
451
|
export const accountSettings = pgTable(
|
|
434
452
|
"account_setting",
|
|
435
453
|
{
|
|
@@ -663,6 +681,75 @@ export const bodyPartContents = pgTable(
|
|
|
663
681
|
],
|
|
664
682
|
);
|
|
665
683
|
|
|
684
|
+
export const calendarCollections = pgTable(
|
|
685
|
+
"calendar",
|
|
686
|
+
{
|
|
687
|
+
calendarId: text("calendar_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
688
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
689
|
+
urlSegment: text("url_segment").notNull(),
|
|
690
|
+
displayName: text("display_name").notNull(),
|
|
691
|
+
color: text("color").$type<"Cal1" | "Cal2" | "Cal3" | "Cal4" | "Cal5" | "Cal6">().notNull().default("Cal1"),
|
|
692
|
+
componentSet: text("component_set").$type<"VeventOnly">().notNull().default("VeventOnly"),
|
|
693
|
+
source: text("source").$type<"Default" | "UserCreated" | "MailDerived">().notNull().default("UserCreated"),
|
|
694
|
+
timezone: text("timezone").notNull().default(""),
|
|
695
|
+
syncSequence: bigint("sync_sequence", { mode: "number" }).notNull().default(0),
|
|
696
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
697
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
698
|
+
},
|
|
699
|
+
(table) => [
|
|
700
|
+
index("calendar_by_url_segment").on(table.accountConfigId, table.urlSegment),
|
|
701
|
+
index("calendar_primary").on(table.accountConfigId, table.calendarId),
|
|
702
|
+
],
|
|
703
|
+
);
|
|
704
|
+
|
|
705
|
+
export const calendarObjects = pgTable(
|
|
706
|
+
"calendar_object",
|
|
707
|
+
{
|
|
708
|
+
calendarObjectId: text("calendar_object_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
709
|
+
calendarId: text("calendar_id").notNull(),
|
|
710
|
+
resourceName: text("resource_name").notNull(),
|
|
711
|
+
icalUid: text("ical_uid").notNull(),
|
|
712
|
+
icalData: text("ical_data").notNull(),
|
|
713
|
+
etag: text("etag").notNull(),
|
|
714
|
+
sequence: integer("sequence").notNull().default(0),
|
|
715
|
+
syncSequence: bigint("sync_sequence", { mode: "number" }).notNull().default(0),
|
|
716
|
+
summary: text("summary").notNull(),
|
|
717
|
+
dtStart: text("dt_start").notNull(),
|
|
718
|
+
dtEnd: text("dt_end").notNull(),
|
|
719
|
+
allDay: boolean("all_day").notNull().default(false),
|
|
720
|
+
zoneCertainty: text("zone_certainty").$type<"Local" | "Explicit" | "Ambiguous">().notNull().default("Explicit"),
|
|
721
|
+
status: text("status").$type<"Confirmed" | "Tentative" | "Cancelled">().notNull().default("Confirmed"),
|
|
722
|
+
transparency: text("transparency").$type<"Opaque" | "Transparent">().notNull().default("Opaque"),
|
|
723
|
+
hasRecurrence: boolean("has_recurrence").notNull().default(false),
|
|
724
|
+
expandedThrough: text("expanded_through").notNull().default(""),
|
|
725
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
726
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
727
|
+
},
|
|
728
|
+
(table) => [
|
|
729
|
+
index("calendar_object_by_sync_sequence").on(table.calendarId, table.syncSequence),
|
|
730
|
+
index("calendar_object_by_uid").on(table.calendarId, table.icalUid),
|
|
731
|
+
index("calendar_object_primary").on(table.calendarId, table.calendarObjectId),
|
|
732
|
+
],
|
|
733
|
+
);
|
|
734
|
+
|
|
735
|
+
export const calendarEventIndexes = pgTable(
|
|
736
|
+
"calendar_event_index",
|
|
737
|
+
{
|
|
738
|
+
calendarId: text("calendar_id").notNull(),
|
|
739
|
+
calendarObjectId: text("calendar_object_id").notNull(),
|
|
740
|
+
recurrenceId: text("recurrence_id").notNull(),
|
|
741
|
+
startAt: text("start_at").notNull(),
|
|
742
|
+
endAt: text("end_at").notNull(),
|
|
743
|
+
allDay: boolean("all_day").notNull().default(false),
|
|
744
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
745
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
746
|
+
},
|
|
747
|
+
(table) => [
|
|
748
|
+
primaryKey({ name: "calendar_event_index_pk", columns: [table.calendarId, table.calendarObjectId, table.recurrenceId] }),
|
|
749
|
+
index("calendar_event_index_by_start").on(table.calendarId, table.startAt),
|
|
750
|
+
],
|
|
751
|
+
);
|
|
752
|
+
|
|
666
753
|
export const messageLabels = pgTable(
|
|
667
754
|
"message_label",
|
|
668
755
|
{
|