@remit/drizzle-pg-schema 0.0.12 → 0.0.14
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 +392 -0
- package/dist/schema.js +30 -0
- package/package.json +1 -1
- package/schema.ts +40 -0
package/dist/schema.d.ts
CHANGED
|
@@ -3273,6 +3273,219 @@ export declare const outboxMessages: import("drizzle-orm/pg-core").PgTableWithCo
|
|
|
3273
3273
|
};
|
|
3274
3274
|
dialect: "pg";
|
|
3275
3275
|
}>;
|
|
3276
|
+
export declare const outboxAttachments: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3277
|
+
name: "outbox_attachment";
|
|
3278
|
+
schema: undefined;
|
|
3279
|
+
columns: {
|
|
3280
|
+
outboxAttachmentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3281
|
+
name: "outbox_attachment_id";
|
|
3282
|
+
tableName: "outbox_attachment";
|
|
3283
|
+
dataType: "string";
|
|
3284
|
+
columnType: "PgText";
|
|
3285
|
+
data: string;
|
|
3286
|
+
driverParam: string;
|
|
3287
|
+
notNull: true;
|
|
3288
|
+
hasDefault: true;
|
|
3289
|
+
isPrimaryKey: true;
|
|
3290
|
+
isAutoincrement: false;
|
|
3291
|
+
hasRuntimeDefault: true;
|
|
3292
|
+
enumValues: [string, ...string[]];
|
|
3293
|
+
baseColumn: never;
|
|
3294
|
+
identity: undefined;
|
|
3295
|
+
generated: undefined;
|
|
3296
|
+
}, {}, {}>;
|
|
3297
|
+
outboxMessageId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3298
|
+
name: "outbox_message_id";
|
|
3299
|
+
tableName: "outbox_attachment";
|
|
3300
|
+
dataType: "string";
|
|
3301
|
+
columnType: "PgText";
|
|
3302
|
+
data: string;
|
|
3303
|
+
driverParam: string;
|
|
3304
|
+
notNull: true;
|
|
3305
|
+
hasDefault: false;
|
|
3306
|
+
isPrimaryKey: false;
|
|
3307
|
+
isAutoincrement: false;
|
|
3308
|
+
hasRuntimeDefault: false;
|
|
3309
|
+
enumValues: [string, ...string[]];
|
|
3310
|
+
baseColumn: never;
|
|
3311
|
+
identity: undefined;
|
|
3312
|
+
generated: undefined;
|
|
3313
|
+
}, {}, {}>;
|
|
3314
|
+
accountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3315
|
+
name: "account_id";
|
|
3316
|
+
tableName: "outbox_attachment";
|
|
3317
|
+
dataType: "string";
|
|
3318
|
+
columnType: "PgText";
|
|
3319
|
+
data: string;
|
|
3320
|
+
driverParam: string;
|
|
3321
|
+
notNull: true;
|
|
3322
|
+
hasDefault: false;
|
|
3323
|
+
isPrimaryKey: false;
|
|
3324
|
+
isAutoincrement: false;
|
|
3325
|
+
hasRuntimeDefault: false;
|
|
3326
|
+
enumValues: [string, ...string[]];
|
|
3327
|
+
baseColumn: never;
|
|
3328
|
+
identity: undefined;
|
|
3329
|
+
generated: undefined;
|
|
3330
|
+
}, {}, {}>;
|
|
3331
|
+
accountConfigId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3332
|
+
name: "account_config_id";
|
|
3333
|
+
tableName: "outbox_attachment";
|
|
3334
|
+
dataType: "string";
|
|
3335
|
+
columnType: "PgText";
|
|
3336
|
+
data: string;
|
|
3337
|
+
driverParam: string;
|
|
3338
|
+
notNull: true;
|
|
3339
|
+
hasDefault: false;
|
|
3340
|
+
isPrimaryKey: false;
|
|
3341
|
+
isAutoincrement: false;
|
|
3342
|
+
hasRuntimeDefault: false;
|
|
3343
|
+
enumValues: [string, ...string[]];
|
|
3344
|
+
baseColumn: never;
|
|
3345
|
+
identity: undefined;
|
|
3346
|
+
generated: undefined;
|
|
3347
|
+
}, {}, {}>;
|
|
3348
|
+
filename: import("drizzle-orm/pg-core").PgColumn<{
|
|
3349
|
+
name: "filename";
|
|
3350
|
+
tableName: "outbox_attachment";
|
|
3351
|
+
dataType: "string";
|
|
3352
|
+
columnType: "PgText";
|
|
3353
|
+
data: string;
|
|
3354
|
+
driverParam: string;
|
|
3355
|
+
notNull: true;
|
|
3356
|
+
hasDefault: false;
|
|
3357
|
+
isPrimaryKey: false;
|
|
3358
|
+
isAutoincrement: false;
|
|
3359
|
+
hasRuntimeDefault: false;
|
|
3360
|
+
enumValues: [string, ...string[]];
|
|
3361
|
+
baseColumn: never;
|
|
3362
|
+
identity: undefined;
|
|
3363
|
+
generated: undefined;
|
|
3364
|
+
}, {}, {}>;
|
|
3365
|
+
contentType: import("drizzle-orm/pg-core").PgColumn<{
|
|
3366
|
+
name: "content_type";
|
|
3367
|
+
tableName: "outbox_attachment";
|
|
3368
|
+
dataType: "string";
|
|
3369
|
+
columnType: "PgText";
|
|
3370
|
+
data: string;
|
|
3371
|
+
driverParam: string;
|
|
3372
|
+
notNull: true;
|
|
3373
|
+
hasDefault: false;
|
|
3374
|
+
isPrimaryKey: false;
|
|
3375
|
+
isAutoincrement: false;
|
|
3376
|
+
hasRuntimeDefault: false;
|
|
3377
|
+
enumValues: [string, ...string[]];
|
|
3378
|
+
baseColumn: never;
|
|
3379
|
+
identity: undefined;
|
|
3380
|
+
generated: undefined;
|
|
3381
|
+
}, {}, {}>;
|
|
3382
|
+
sizeBytes: import("drizzle-orm/pg-core").PgColumn<{
|
|
3383
|
+
name: "size_bytes";
|
|
3384
|
+
tableName: "outbox_attachment";
|
|
3385
|
+
dataType: "number";
|
|
3386
|
+
columnType: "PgBigInt53";
|
|
3387
|
+
data: number;
|
|
3388
|
+
driverParam: string | number;
|
|
3389
|
+
notNull: true;
|
|
3390
|
+
hasDefault: false;
|
|
3391
|
+
isPrimaryKey: false;
|
|
3392
|
+
isAutoincrement: false;
|
|
3393
|
+
hasRuntimeDefault: false;
|
|
3394
|
+
enumValues: undefined;
|
|
3395
|
+
baseColumn: never;
|
|
3396
|
+
identity: undefined;
|
|
3397
|
+
generated: undefined;
|
|
3398
|
+
}, {}, {}>;
|
|
3399
|
+
state: import("drizzle-orm/pg-core").PgColumn<{
|
|
3400
|
+
name: "state";
|
|
3401
|
+
tableName: "outbox_attachment";
|
|
3402
|
+
dataType: "string";
|
|
3403
|
+
columnType: "PgText";
|
|
3404
|
+
data: "Pending" | "Stored";
|
|
3405
|
+
driverParam: string;
|
|
3406
|
+
notNull: true;
|
|
3407
|
+
hasDefault: false;
|
|
3408
|
+
isPrimaryKey: false;
|
|
3409
|
+
isAutoincrement: false;
|
|
3410
|
+
hasRuntimeDefault: false;
|
|
3411
|
+
enumValues: [string, ...string[]];
|
|
3412
|
+
baseColumn: never;
|
|
3413
|
+
identity: undefined;
|
|
3414
|
+
generated: undefined;
|
|
3415
|
+
}, {}, {
|
|
3416
|
+
$type: "Pending" | "Stored";
|
|
3417
|
+
}>;
|
|
3418
|
+
storageKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
3419
|
+
name: "storage_key";
|
|
3420
|
+
tableName: "outbox_attachment";
|
|
3421
|
+
dataType: "string";
|
|
3422
|
+
columnType: "PgText";
|
|
3423
|
+
data: string;
|
|
3424
|
+
driverParam: string;
|
|
3425
|
+
notNull: true;
|
|
3426
|
+
hasDefault: false;
|
|
3427
|
+
isPrimaryKey: false;
|
|
3428
|
+
isAutoincrement: false;
|
|
3429
|
+
hasRuntimeDefault: false;
|
|
3430
|
+
enumValues: [string, ...string[]];
|
|
3431
|
+
baseColumn: never;
|
|
3432
|
+
identity: undefined;
|
|
3433
|
+
generated: undefined;
|
|
3434
|
+
}, {}, {}>;
|
|
3435
|
+
reservationExpiresAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
3436
|
+
name: "reservation_expires_at";
|
|
3437
|
+
tableName: "outbox_attachment";
|
|
3438
|
+
dataType: "number";
|
|
3439
|
+
columnType: "PgBigInt53";
|
|
3440
|
+
data: number;
|
|
3441
|
+
driverParam: string | number;
|
|
3442
|
+
notNull: true;
|
|
3443
|
+
hasDefault: false;
|
|
3444
|
+
isPrimaryKey: false;
|
|
3445
|
+
isAutoincrement: false;
|
|
3446
|
+
hasRuntimeDefault: false;
|
|
3447
|
+
enumValues: undefined;
|
|
3448
|
+
baseColumn: never;
|
|
3449
|
+
identity: undefined;
|
|
3450
|
+
generated: undefined;
|
|
3451
|
+
}, {}, {}>;
|
|
3452
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
3453
|
+
name: "created_at";
|
|
3454
|
+
tableName: "outbox_attachment";
|
|
3455
|
+
dataType: "number";
|
|
3456
|
+
columnType: "PgBigInt53";
|
|
3457
|
+
data: number;
|
|
3458
|
+
driverParam: string | number;
|
|
3459
|
+
notNull: true;
|
|
3460
|
+
hasDefault: false;
|
|
3461
|
+
isPrimaryKey: false;
|
|
3462
|
+
isAutoincrement: false;
|
|
3463
|
+
hasRuntimeDefault: false;
|
|
3464
|
+
enumValues: undefined;
|
|
3465
|
+
baseColumn: never;
|
|
3466
|
+
identity: undefined;
|
|
3467
|
+
generated: undefined;
|
|
3468
|
+
}, {}, {}>;
|
|
3469
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
3470
|
+
name: "updated_at";
|
|
3471
|
+
tableName: "outbox_attachment";
|
|
3472
|
+
dataType: "number";
|
|
3473
|
+
columnType: "PgBigInt53";
|
|
3474
|
+
data: number;
|
|
3475
|
+
driverParam: string | number;
|
|
3476
|
+
notNull: true;
|
|
3477
|
+
hasDefault: false;
|
|
3478
|
+
isPrimaryKey: false;
|
|
3479
|
+
isAutoincrement: false;
|
|
3480
|
+
hasRuntimeDefault: false;
|
|
3481
|
+
enumValues: undefined;
|
|
3482
|
+
baseColumn: never;
|
|
3483
|
+
identity: undefined;
|
|
3484
|
+
generated: undefined;
|
|
3485
|
+
}, {}, {}>;
|
|
3486
|
+
};
|
|
3487
|
+
dialect: "pg";
|
|
3488
|
+
}>;
|
|
3276
3489
|
export declare const addresses: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3277
3490
|
name: "address";
|
|
3278
3491
|
schema: undefined;
|
|
@@ -3846,6 +4059,25 @@ export declare const messages: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
3846
4059
|
identity: undefined;
|
|
3847
4060
|
generated: undefined;
|
|
3848
4061
|
}, {}, {}>;
|
|
4062
|
+
authenticityVerdict: import("drizzle-orm/pg-core").PgColumn<{
|
|
4063
|
+
name: "authenticity_verdict";
|
|
4064
|
+
tableName: "message";
|
|
4065
|
+
dataType: "string";
|
|
4066
|
+
columnType: "PgText";
|
|
4067
|
+
data: "NotEvaluated" | "NotChecked" | "Aligned" | "Authenticated" | "Routine" | "Caution" | "Impersonation";
|
|
4068
|
+
driverParam: string;
|
|
4069
|
+
notNull: true;
|
|
4070
|
+
hasDefault: true;
|
|
4071
|
+
isPrimaryKey: false;
|
|
4072
|
+
isAutoincrement: false;
|
|
4073
|
+
hasRuntimeDefault: false;
|
|
4074
|
+
enumValues: [string, ...string[]];
|
|
4075
|
+
baseColumn: never;
|
|
4076
|
+
identity: undefined;
|
|
4077
|
+
generated: undefined;
|
|
4078
|
+
}, {}, {
|
|
4079
|
+
$type: "NotEvaluated" | "NotChecked" | "Aligned" | "Authenticated" | "Routine" | "Caution" | "Impersonation";
|
|
4080
|
+
}>;
|
|
3849
4081
|
authResult: import("drizzle-orm/pg-core").PgColumn<{
|
|
3850
4082
|
name: "auth_result";
|
|
3851
4083
|
tableName: "message";
|
|
@@ -5696,6 +5928,166 @@ export declare const envelopes: import("drizzle-orm/pg-core").PgTableWithColumns
|
|
|
5696
5928
|
};
|
|
5697
5929
|
dialect: "pg";
|
|
5698
5930
|
}>;
|
|
5931
|
+
export declare const senderSignerStandings: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
5932
|
+
name: "sender_signer_standing";
|
|
5933
|
+
schema: undefined;
|
|
5934
|
+
columns: {
|
|
5935
|
+
accountConfigId: import("drizzle-orm/pg-core").PgColumn<{
|
|
5936
|
+
name: "account_config_id";
|
|
5937
|
+
tableName: "sender_signer_standing";
|
|
5938
|
+
dataType: "string";
|
|
5939
|
+
columnType: "PgText";
|
|
5940
|
+
data: string;
|
|
5941
|
+
driverParam: string;
|
|
5942
|
+
notNull: true;
|
|
5943
|
+
hasDefault: false;
|
|
5944
|
+
isPrimaryKey: false;
|
|
5945
|
+
isAutoincrement: false;
|
|
5946
|
+
hasRuntimeDefault: false;
|
|
5947
|
+
enumValues: [string, ...string[]];
|
|
5948
|
+
baseColumn: never;
|
|
5949
|
+
identity: undefined;
|
|
5950
|
+
generated: undefined;
|
|
5951
|
+
}, {}, {}>;
|
|
5952
|
+
senderKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
5953
|
+
name: "sender_key";
|
|
5954
|
+
tableName: "sender_signer_standing";
|
|
5955
|
+
dataType: "string";
|
|
5956
|
+
columnType: "PgText";
|
|
5957
|
+
data: string;
|
|
5958
|
+
driverParam: string;
|
|
5959
|
+
notNull: true;
|
|
5960
|
+
hasDefault: false;
|
|
5961
|
+
isPrimaryKey: false;
|
|
5962
|
+
isAutoincrement: false;
|
|
5963
|
+
hasRuntimeDefault: false;
|
|
5964
|
+
enumValues: [string, ...string[]];
|
|
5965
|
+
baseColumn: never;
|
|
5966
|
+
identity: undefined;
|
|
5967
|
+
generated: undefined;
|
|
5968
|
+
}, {}, {}>;
|
|
5969
|
+
signerDomain: import("drizzle-orm/pg-core").PgColumn<{
|
|
5970
|
+
name: "signer_domain";
|
|
5971
|
+
tableName: "sender_signer_standing";
|
|
5972
|
+
dataType: "string";
|
|
5973
|
+
columnType: "PgText";
|
|
5974
|
+
data: string;
|
|
5975
|
+
driverParam: string;
|
|
5976
|
+
notNull: true;
|
|
5977
|
+
hasDefault: false;
|
|
5978
|
+
isPrimaryKey: false;
|
|
5979
|
+
isAutoincrement: false;
|
|
5980
|
+
hasRuntimeDefault: false;
|
|
5981
|
+
enumValues: [string, ...string[]];
|
|
5982
|
+
baseColumn: never;
|
|
5983
|
+
identity: undefined;
|
|
5984
|
+
generated: undefined;
|
|
5985
|
+
}, {}, {}>;
|
|
5986
|
+
messageCount: import("drizzle-orm/pg-core").PgColumn<{
|
|
5987
|
+
name: "message_count";
|
|
5988
|
+
tableName: "sender_signer_standing";
|
|
5989
|
+
dataType: "number";
|
|
5990
|
+
columnType: "PgInteger";
|
|
5991
|
+
data: number;
|
|
5992
|
+
driverParam: string | number;
|
|
5993
|
+
notNull: true;
|
|
5994
|
+
hasDefault: true;
|
|
5995
|
+
isPrimaryKey: false;
|
|
5996
|
+
isAutoincrement: false;
|
|
5997
|
+
hasRuntimeDefault: false;
|
|
5998
|
+
enumValues: undefined;
|
|
5999
|
+
baseColumn: never;
|
|
6000
|
+
identity: undefined;
|
|
6001
|
+
generated: undefined;
|
|
6002
|
+
}, {}, {}>;
|
|
6003
|
+
firstSeenAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
6004
|
+
name: "first_seen_at";
|
|
6005
|
+
tableName: "sender_signer_standing";
|
|
6006
|
+
dataType: "number";
|
|
6007
|
+
columnType: "PgBigInt53";
|
|
6008
|
+
data: number;
|
|
6009
|
+
driverParam: string | number;
|
|
6010
|
+
notNull: true;
|
|
6011
|
+
hasDefault: false;
|
|
6012
|
+
isPrimaryKey: false;
|
|
6013
|
+
isAutoincrement: false;
|
|
6014
|
+
hasRuntimeDefault: false;
|
|
6015
|
+
enumValues: undefined;
|
|
6016
|
+
baseColumn: never;
|
|
6017
|
+
identity: undefined;
|
|
6018
|
+
generated: undefined;
|
|
6019
|
+
}, {}, {}>;
|
|
6020
|
+
lastSeenAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
6021
|
+
name: "last_seen_at";
|
|
6022
|
+
tableName: "sender_signer_standing";
|
|
6023
|
+
dataType: "number";
|
|
6024
|
+
columnType: "PgBigInt53";
|
|
6025
|
+
data: number;
|
|
6026
|
+
driverParam: string | number;
|
|
6027
|
+
notNull: true;
|
|
6028
|
+
hasDefault: false;
|
|
6029
|
+
isPrimaryKey: false;
|
|
6030
|
+
isAutoincrement: false;
|
|
6031
|
+
hasRuntimeDefault: false;
|
|
6032
|
+
enumValues: undefined;
|
|
6033
|
+
baseColumn: never;
|
|
6034
|
+
identity: undefined;
|
|
6035
|
+
generated: undefined;
|
|
6036
|
+
}, {}, {}>;
|
|
6037
|
+
userAffirmedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
6038
|
+
name: "user_affirmed_at";
|
|
6039
|
+
tableName: "sender_signer_standing";
|
|
6040
|
+
dataType: "number";
|
|
6041
|
+
columnType: "PgBigInt53";
|
|
6042
|
+
data: number;
|
|
6043
|
+
driverParam: string | number;
|
|
6044
|
+
notNull: true;
|
|
6045
|
+
hasDefault: true;
|
|
6046
|
+
isPrimaryKey: false;
|
|
6047
|
+
isAutoincrement: false;
|
|
6048
|
+
hasRuntimeDefault: false;
|
|
6049
|
+
enumValues: undefined;
|
|
6050
|
+
baseColumn: never;
|
|
6051
|
+
identity: undefined;
|
|
6052
|
+
generated: undefined;
|
|
6053
|
+
}, {}, {}>;
|
|
6054
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
6055
|
+
name: "created_at";
|
|
6056
|
+
tableName: "sender_signer_standing";
|
|
6057
|
+
dataType: "number";
|
|
6058
|
+
columnType: "PgBigInt53";
|
|
6059
|
+
data: number;
|
|
6060
|
+
driverParam: string | number;
|
|
6061
|
+
notNull: true;
|
|
6062
|
+
hasDefault: false;
|
|
6063
|
+
isPrimaryKey: false;
|
|
6064
|
+
isAutoincrement: false;
|
|
6065
|
+
hasRuntimeDefault: false;
|
|
6066
|
+
enumValues: undefined;
|
|
6067
|
+
baseColumn: never;
|
|
6068
|
+
identity: undefined;
|
|
6069
|
+
generated: undefined;
|
|
6070
|
+
}, {}, {}>;
|
|
6071
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
6072
|
+
name: "updated_at";
|
|
6073
|
+
tableName: "sender_signer_standing";
|
|
6074
|
+
dataType: "number";
|
|
6075
|
+
columnType: "PgBigInt53";
|
|
6076
|
+
data: number;
|
|
6077
|
+
driverParam: string | number;
|
|
6078
|
+
notNull: true;
|
|
6079
|
+
hasDefault: false;
|
|
6080
|
+
isPrimaryKey: false;
|
|
6081
|
+
isAutoincrement: false;
|
|
6082
|
+
hasRuntimeDefault: false;
|
|
6083
|
+
enumValues: undefined;
|
|
6084
|
+
baseColumn: never;
|
|
6085
|
+
identity: undefined;
|
|
6086
|
+
generated: undefined;
|
|
6087
|
+
}, {}, {}>;
|
|
6088
|
+
};
|
|
6089
|
+
dialect: "pg";
|
|
6090
|
+
}>;
|
|
5699
6091
|
export declare const bodyPartParameters: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
5700
6092
|
name: "body_part_parameter";
|
|
5701
6093
|
schema: undefined;
|
package/dist/schema.js
CHANGED
|
@@ -232,6 +232,22 @@ export const outboxMessages = pgTable("outbox_message", {
|
|
|
232
232
|
}, (table) => [
|
|
233
233
|
index("outbox_message_by_account_id").on(table.accountId, table.createdAt),
|
|
234
234
|
]);
|
|
235
|
+
export const outboxAttachments = pgTable("outbox_attachment", {
|
|
236
|
+
outboxAttachmentId: text("outbox_attachment_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
237
|
+
outboxMessageId: text("outbox_message_id").notNull(),
|
|
238
|
+
accountId: text("account_id").notNull(),
|
|
239
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
240
|
+
filename: text("filename").notNull(),
|
|
241
|
+
contentType: text("content_type").notNull(),
|
|
242
|
+
sizeBytes: bigint("size_bytes", { mode: "number" }).notNull(),
|
|
243
|
+
state: text("state").$type().notNull(),
|
|
244
|
+
storageKey: text("storage_key").notNull(),
|
|
245
|
+
reservationExpiresAt: bigint("reservation_expires_at", { mode: "number" }).notNull(),
|
|
246
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
247
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
248
|
+
}, (table) => [
|
|
249
|
+
index("outbox_attachment_by_outbox_message_id").on(table.outboxMessageId, table.createdAt),
|
|
250
|
+
]);
|
|
235
251
|
export const addresses = pgTable("address", {
|
|
236
252
|
addressId: text("address_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
237
253
|
accountConfigId: text("account_config_id").notNull(),
|
|
@@ -269,6 +285,7 @@ export const messages = pgTable("message", {
|
|
|
269
285
|
originalUid: nullableBigint("original_uid"),
|
|
270
286
|
category: text("category").$type().notNull().default("uncategorized"),
|
|
271
287
|
authenticity: jsonb("authenticity"),
|
|
288
|
+
authenticityVerdict: text("authenticity_verdict").$type().notNull().default("NotEvaluated"),
|
|
272
289
|
authResult: jsonb("auth_result"),
|
|
273
290
|
providerSpam: jsonb("provider_spam"),
|
|
274
291
|
hasListUnsubscribe: boolean("has_list_unsubscribe").notNull().default(false),
|
|
@@ -425,6 +442,19 @@ export const envelopes = pgTable("envelope", {
|
|
|
425
442
|
}, (table) => [
|
|
426
443
|
index("envelope_by_message_id").on(table.messageId, table.envelopeId),
|
|
427
444
|
]);
|
|
445
|
+
export const senderSignerStandings = pgTable("sender_signer_standing", {
|
|
446
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
447
|
+
senderKey: text("sender_key").notNull(),
|
|
448
|
+
signerDomain: text("signer_domain").notNull(),
|
|
449
|
+
messageCount: integer("message_count").notNull().default(0),
|
|
450
|
+
firstSeenAt: bigint("first_seen_at", { mode: "number" }).notNull(),
|
|
451
|
+
lastSeenAt: bigint("last_seen_at", { mode: "number" }).notNull(),
|
|
452
|
+
userAffirmedAt: bigint("user_affirmed_at", { mode: "number" }).notNull().default(0),
|
|
453
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
454
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
455
|
+
}, (table) => [
|
|
456
|
+
primaryKey({ name: "sender_signer_standing_pk", columns: [table.accountConfigId, table.senderKey, table.signerDomain] }),
|
|
457
|
+
]);
|
|
428
458
|
export const bodyPartParameters = pgTable("body_part_parameter", {
|
|
429
459
|
bodyPartParameterId: text("body_part_parameter_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
430
460
|
messageId: text("message_id").notNull(),
|
package/package.json
CHANGED
package/schema.ts
CHANGED
|
@@ -283,6 +283,27 @@ export const outboxMessages = pgTable(
|
|
|
283
283
|
],
|
|
284
284
|
);
|
|
285
285
|
|
|
286
|
+
export const outboxAttachments = pgTable(
|
|
287
|
+
"outbox_attachment",
|
|
288
|
+
{
|
|
289
|
+
outboxAttachmentId: text("outbox_attachment_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
290
|
+
outboxMessageId: text("outbox_message_id").notNull(),
|
|
291
|
+
accountId: text("account_id").notNull(),
|
|
292
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
293
|
+
filename: text("filename").notNull(),
|
|
294
|
+
contentType: text("content_type").notNull(),
|
|
295
|
+
sizeBytes: bigint("size_bytes", { mode: "number" }).notNull(),
|
|
296
|
+
state: text("state").$type<"Pending" | "Stored">().notNull(),
|
|
297
|
+
storageKey: text("storage_key").notNull(),
|
|
298
|
+
reservationExpiresAt: bigint("reservation_expires_at", { mode: "number" }).notNull(),
|
|
299
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
300
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
301
|
+
},
|
|
302
|
+
(table) => [
|
|
303
|
+
index("outbox_attachment_by_outbox_message_id").on(table.outboxMessageId, table.createdAt),
|
|
304
|
+
],
|
|
305
|
+
);
|
|
306
|
+
|
|
286
307
|
export const addresses = pgTable(
|
|
287
308
|
"address",
|
|
288
309
|
{
|
|
@@ -327,6 +348,7 @@ export const messages = pgTable(
|
|
|
327
348
|
originalUid: nullableBigint("original_uid"),
|
|
328
349
|
category: text("category").$type<"uncategorized" | "personal" | "newsletter" | "marketing" | "automated" | "transactional" | "social">().notNull().default("uncategorized"),
|
|
329
350
|
authenticity: jsonb("authenticity"),
|
|
351
|
+
authenticityVerdict: text("authenticity_verdict").$type<"NotEvaluated" | "NotChecked" | "Aligned" | "Authenticated" | "Routine" | "Caution" | "Impersonation">().notNull().default("NotEvaluated"),
|
|
330
352
|
authResult: jsonb("auth_result"),
|
|
331
353
|
providerSpam: jsonb("provider_spam"),
|
|
332
354
|
hasListUnsubscribe: boolean("has_list_unsubscribe").notNull().default(false),
|
|
@@ -546,6 +568,24 @@ export const envelopes = pgTable(
|
|
|
546
568
|
],
|
|
547
569
|
);
|
|
548
570
|
|
|
571
|
+
export const senderSignerStandings = pgTable(
|
|
572
|
+
"sender_signer_standing",
|
|
573
|
+
{
|
|
574
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
575
|
+
senderKey: text("sender_key").notNull(),
|
|
576
|
+
signerDomain: text("signer_domain").notNull(),
|
|
577
|
+
messageCount: integer("message_count").notNull().default(0),
|
|
578
|
+
firstSeenAt: bigint("first_seen_at", { mode: "number" }).notNull(),
|
|
579
|
+
lastSeenAt: bigint("last_seen_at", { mode: "number" }).notNull(),
|
|
580
|
+
userAffirmedAt: bigint("user_affirmed_at", { mode: "number" }).notNull().default(0),
|
|
581
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
582
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
583
|
+
},
|
|
584
|
+
(table) => [
|
|
585
|
+
primaryKey({ name: "sender_signer_standing_pk", columns: [table.accountConfigId, table.senderKey, table.signerDomain] }),
|
|
586
|
+
],
|
|
587
|
+
);
|
|
588
|
+
|
|
549
589
|
export const bodyPartParameters = pgTable(
|
|
550
590
|
"body_part_parameter",
|
|
551
591
|
{
|