@stll/auth-model 0.7.0 → 0.7.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/dist/invitation-sections.d.ts +87 -18
- package/package.json +3 -3
|
@@ -9734,6 +9734,9 @@ interface Driver {
|
|
|
9734
9734
|
beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise<void>;
|
|
9735
9735
|
/**
|
|
9736
9736
|
* Commits a transaction.
|
|
9737
|
+
*
|
|
9738
|
+
* Throws {@link AbortedTransactionError} if the database confirms that
|
|
9739
|
+
* the transaction was rolled back instead of committed.
|
|
9737
9740
|
*/
|
|
9738
9741
|
commitTransaction(connection: DatabaseConnection): Promise<void>;
|
|
9739
9742
|
/**
|
|
@@ -10944,14 +10947,14 @@ declare class JoinBuilder<DB, TB extends keyof DB> implements OperationNodeSourc
|
|
|
10944
10947
|
* See {@link WhereInterface.where} for documentation and examples.
|
|
10945
10948
|
*/
|
|
10946
10949
|
on<RE extends ReferenceExpression<DB, TB>>(lhs: RE, op: ComparisonOperatorExpression, rhs: OperandValueExpressionOrList<DB, TB, RE>): JoinBuilder<DB, TB>;
|
|
10947
|
-
on
|
|
10950
|
+
on<E extends ExpressionOrFactory<DB, TB, SqlBool>>(expression: E): JoinBuilder<DB, TB>;
|
|
10948
10951
|
/**
|
|
10949
10952
|
* Just like {@link WhereInterface.whereRef} but adds an item to the join's
|
|
10950
10953
|
* `on` clause instead.
|
|
10951
10954
|
*
|
|
10952
10955
|
* See {@link WhereInterface.whereRef} for documentation and examples.
|
|
10953
10956
|
*/
|
|
10954
|
-
onRef
|
|
10957
|
+
onRef<LRE extends ReferenceExpression<DB, TB>, RRE extends ReferenceExpression<DB, TB>>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): JoinBuilder<DB, TB>;
|
|
10955
10958
|
/**
|
|
10956
10959
|
* Adds `on true`.
|
|
10957
10960
|
*/
|
|
@@ -13680,7 +13683,7 @@ interface SelectQueryBuilder<DB, TB extends keyof DB, O> extends WhereInterface<
|
|
|
13680
13683
|
* select "first_name" from "person" limit $1 offset $2
|
|
13681
13684
|
* ```
|
|
13682
13685
|
*/
|
|
13683
|
-
limit
|
|
13686
|
+
limit<VE extends ValueExpression<DB, TB, number | bigint | null>>(limit: VE): SelectQueryBuilder<DB, TB, O>;
|
|
13684
13687
|
/**
|
|
13685
13688
|
* Adds an `offset` clause to the query.
|
|
13686
13689
|
*
|
|
@@ -13703,7 +13706,7 @@ interface SelectQueryBuilder<DB, TB extends keyof DB, O> extends WhereInterface<
|
|
|
13703
13706
|
* select "first_name" from "person" limit $1 offset $2
|
|
13704
13707
|
* ```
|
|
13705
13708
|
*/
|
|
13706
|
-
offset
|
|
13709
|
+
offset<VE extends ValueExpression<DB, TB, number | bigint>>(offset: VE): SelectQueryBuilder<DB, TB, O>;
|
|
13707
13710
|
/**
|
|
13708
13711
|
* Adds a `fetch` clause to the query.
|
|
13709
13712
|
*
|
|
@@ -14664,16 +14667,38 @@ interface SelectQueryBuilder<DB, TB extends keyof DB, O> extends WhereInterface<
|
|
|
14664
14667
|
interface AliasedSelectQueryBuilder<out O = undefined, out A extends string = never> extends AliasedExpression<O, A> {
|
|
14665
14668
|
get isAliasedSelectQueryBuilder(): true;
|
|
14666
14669
|
}
|
|
14667
|
-
|
|
14670
|
+
/**
|
|
14671
|
+
* Guards a join's result type against being computed for an unknown table
|
|
14672
|
+
* expression.
|
|
14673
|
+
*
|
|
14674
|
+
* `TableExpression<DB, TB> extends TE` only holds when `TE` is as wide as its
|
|
14675
|
+
* own constraint, which never happens at a call site - there `TE` is a specific
|
|
14676
|
+
* table name, alias or subquery. It does happen when the compiler asks what a
|
|
14677
|
+
* join returns for an arbitrary table expression, which is what it has to do
|
|
14678
|
+
* whenever it compares two `SelectQueryBuilder` types structurally.
|
|
14679
|
+
*
|
|
14680
|
+
* Without this guard that comparison never terminates on its own: computing the
|
|
14681
|
+
* join result yields a `SelectQueryBuilder` over a wider `DB`, whose own join
|
|
14682
|
+
* methods yield a wider one still, so the compiler only stops when it hits its
|
|
14683
|
+
* internal recursion limit. That limit differs between TypeScript versions - 7.0
|
|
14684
|
+
* searches a level deeper than 5.9 and 6.0 - which made comparing two select
|
|
14685
|
+
* query builders over 6x more expensive there.
|
|
14686
|
+
*
|
|
14687
|
+
* Collapsing to a fixed type makes the recursion converge instead: joining an
|
|
14688
|
+
* unknown table expression again produces the same type, so the compiler
|
|
14689
|
+
* recognises the pair it is already comparing and stops immediately.
|
|
14690
|
+
*/
|
|
14691
|
+
type JoinResultForUnknownTable<O> = SelectQueryBuilder<any, any, O>;
|
|
14692
|
+
type SelectQueryBuilderWithInnerJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TableExpression<DB, TB> extends TE ? JoinResultForUnknownTable<O> : TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? SelectQueryBuilder<DB, TB | TE, O> : TE extends AliasedExpression<infer QO, infer QA> ? InnerJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? InnerJoinedBuilder$2<DB, TB, O, QA, QO> : never;
|
|
14668
14693
|
type InnerJoinedBuilder$2<DB, TB extends keyof DB, O, A extends string, R> = A extends keyof DB ? SelectQueryBuilder<InnerJoinedDB$2<DB, A, R>, TB | A, O> : SelectQueryBuilder<DB & ShallowRecord<A, R>, TB | A, O>;
|
|
14669
14694
|
type InnerJoinedDB$2<DB, A extends string, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; }>;
|
|
14670
|
-
type SelectQueryBuilderWithLeftJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? LeftJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? LeftJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? LeftJoinedBuilder$2<DB, TB, O, QA, QO> : never;
|
|
14695
|
+
type SelectQueryBuilderWithLeftJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TableExpression<DB, TB> extends TE ? JoinResultForUnknownTable<O> : TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? LeftJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? LeftJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? LeftJoinedBuilder$2<DB, TB, O, QA, QO> : never;
|
|
14671
14696
|
type LeftJoinedBuilder$2<DB, TB extends keyof DB, O, A extends keyof any, R> = A extends keyof DB ? SelectQueryBuilder<LeftJoinedDB$2<DB, A, R>, TB | A, O> : SelectQueryBuilder<DB & ShallowRecord<A, Nullable<R>>, TB | A, O>;
|
|
14672
14697
|
type LeftJoinedDB$2<DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends keyof DB ? DB[C] : never; }>;
|
|
14673
|
-
type SelectQueryBuilderWithRightJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? RightJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? RightJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? RightJoinedBuilder$2<DB, TB, O, QA, QO> : never;
|
|
14698
|
+
type SelectQueryBuilderWithRightJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TableExpression<DB, TB> extends TE ? JoinResultForUnknownTable<O> : TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? RightJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? RightJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? RightJoinedBuilder$2<DB, TB, O, QA, QO> : never;
|
|
14674
14699
|
type RightJoinedBuilder$2<DB, TB extends keyof DB, O, A extends keyof any, R> = SelectQueryBuilder<RightJoinedDB$2<DB, TB, A, R>, TB | A, O>;
|
|
14675
14700
|
type RightJoinedDB$2<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never; }>;
|
|
14676
|
-
type SelectQueryBuilderWithFullJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? OuterJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? OuterJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? OuterJoinedBuilder$2<DB, TB, O, QA, QO> : never;
|
|
14701
|
+
type SelectQueryBuilderWithFullJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TableExpression<DB, TB> extends TE ? JoinResultForUnknownTable<O> : TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? OuterJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? OuterJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? OuterJoinedBuilder$2<DB, TB, O, QA, QO> : never;
|
|
14677
14702
|
type OuterJoinedBuilder$2<DB, TB extends keyof DB, O, A extends keyof any, R> = SelectQueryBuilder<OuterJoinedBuilderDB$2<DB, TB, A, R>, TB | A, O>;
|
|
14678
14703
|
type OuterJoinedBuilderDB$2<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never; }>;
|
|
14679
14704
|
type TableOrList<TB extends keyof any> = (TB & string) | ReadonlyArray<TB & string>;
|
|
@@ -18521,7 +18546,7 @@ declare class CreateTypeBuilder implements OperationNodeSource, Compilable {
|
|
|
18521
18546
|
constructor(props: CreateTypeBuilderProps);
|
|
18522
18547
|
toOperationNode(): CreateTypeNode;
|
|
18523
18548
|
/**
|
|
18524
|
-
* Creates an
|
|
18549
|
+
* Creates an enum type.
|
|
18525
18550
|
*
|
|
18526
18551
|
* ### Examples
|
|
18527
18552
|
*
|
|
@@ -19630,7 +19655,7 @@ declare class OnConflictBuilder<DB, TB extends keyof DB> implements WhereInterfa
|
|
|
19630
19655
|
* "last_name" = excluded."last_name"
|
|
19631
19656
|
* ```
|
|
19632
19657
|
*/
|
|
19633
|
-
doUpdateSet(update: UpdateObjectExpression<
|
|
19658
|
+
doUpdateSet(update: UpdateObjectExpression<OnConflictUpdateDatabase<DB, TB>, OnConflictTables<TB>, OnConflictTables<TB>>): OnConflictUpdateBuilder<OnConflictDatabase<DB, TB>, OnConflictTables<TB>>;
|
|
19634
19659
|
/**
|
|
19635
19660
|
* Simply calls the provided function passing `this` as the only argument. `$call` returns
|
|
19636
19661
|
* what the provided function returns.
|
|
@@ -19640,7 +19665,8 @@ declare class OnConflictBuilder<DB, TB extends keyof DB> implements WhereInterfa
|
|
|
19640
19665
|
interface OnConflictBuilderProps {
|
|
19641
19666
|
readonly onConflictNode: OnConflictNode;
|
|
19642
19667
|
}
|
|
19643
|
-
type
|
|
19668
|
+
type OnConflictUpdateDatabase<DB, TB extends keyof DB> = { [K in keyof DB | 'excluded']: Updateable<K extends keyof DB ? DB[K] : DB[TB]>; };
|
|
19669
|
+
type OnConflictDatabase<DB, TB extends keyof DB> = { [K in keyof DB | 'excluded']: K extends keyof DB ? DB[K] : DB[TB]; };
|
|
19644
19670
|
type OnConflictTables<TB> = TB | 'excluded';
|
|
19645
19671
|
declare class OnConflictDoNothingBuilder<DB, _TB extends keyof DB> implements OperationNodeSource {
|
|
19646
19672
|
#private;
|
|
@@ -22452,7 +22478,7 @@ declare class UpdateQueryBuilder<DB, UT extends keyof DB, TB extends keyof DB, O
|
|
|
22452
22478
|
* }>
|
|
22453
22479
|
* ```
|
|
22454
22480
|
*/
|
|
22455
|
-
$if<O2>(condition: boolean, func: (qb: this) => UpdateQueryBuilder<any, any, any, O2>): O2 extends UpdateResult ? UpdateQueryBuilder<DB, UT, TB, UpdateResult> : O2 extends O & (infer E) ? UpdateQueryBuilder<DB, UT, TB, O & Partial<E>> : UpdateQueryBuilder<DB, UT, TB, Partial<O2>>;
|
|
22481
|
+
$if<O2>(condition: boolean, func: (qb: this) => UpdateQueryBuilder<any, any, any, O2>): unknown extends O2 ? UpdateQueryBuilder<any, any, any, O2> : O2 extends UpdateResult ? UpdateQueryBuilder<DB, UT, TB, UpdateResult> : O2 extends O & (infer E) ? UpdateQueryBuilder<DB, UT, TB, O & Partial<E>> : UpdateQueryBuilder<DB, UT, TB, Partial<O2>>;
|
|
22456
22482
|
/**
|
|
22457
22483
|
* Change the output type of the query.
|
|
22458
22484
|
*
|
|
@@ -23694,7 +23720,7 @@ declare class DeleteQueryBuilder<DB, TB extends keyof DB, O> implements WhereInt
|
|
|
23694
23720
|
* delete from `pet` order by `created_at` limit ?
|
|
23695
23721
|
* ```
|
|
23696
23722
|
*/
|
|
23697
|
-
limit
|
|
23723
|
+
limit<VE extends ValueExpression<DB, TB, number>>(limit: VE): DeleteQueryBuilder<DB, TB, O>;
|
|
23698
23724
|
/**
|
|
23699
23725
|
* This can be used to add any additional SQL to the end of the query.
|
|
23700
23726
|
*
|
|
@@ -23777,7 +23803,7 @@ declare class DeleteQueryBuilder<DB, TB extends keyof DB, O> implements WhereInt
|
|
|
23777
23803
|
* }>
|
|
23778
23804
|
* ```
|
|
23779
23805
|
*/
|
|
23780
|
-
$if<O2>(condition: boolean, func: (qb: this) => DeleteQueryBuilder<any, any, O2>): O2 extends DeleteResult ? DeleteQueryBuilder<DB, TB, DeleteResult> : O2 extends O & (infer E) ? DeleteQueryBuilder<DB, TB, O & Partial<E>> : DeleteQueryBuilder<DB, TB, Partial<O2>>;
|
|
23806
|
+
$if<O2>(condition: boolean, func: (qb: this) => DeleteQueryBuilder<any, any, O2>): unknown extends O2 ? DeleteQueryBuilder<any, any, O2> : O2 extends DeleteResult ? DeleteQueryBuilder<DB, TB, DeleteResult> : O2 extends O & (infer E) ? DeleteQueryBuilder<DB, TB, O & Partial<E>> : DeleteQueryBuilder<DB, TB, Partial<O2>>;
|
|
23781
23807
|
/**
|
|
23782
23808
|
* Change the output type of the query.
|
|
23783
23809
|
*
|
|
@@ -25618,7 +25644,8 @@ declare global {
|
|
|
25618
25644
|
* The main Kysely class.
|
|
25619
25645
|
*
|
|
25620
25646
|
* You should create one instance of `Kysely` per database using the {@link Kysely}
|
|
25621
|
-
* constructor.
|
|
25647
|
+
* constructor. The dialect manages database connections and may use a shared
|
|
25648
|
+
* pool or database instance.
|
|
25622
25649
|
*
|
|
25623
25650
|
* ### Examples
|
|
25624
25651
|
*
|
|
@@ -26039,7 +26066,16 @@ declare class Kysely<DB> extends QueryCreator<DB> implements QueryExecutorProvid
|
|
|
26039
26066
|
/**
|
|
26040
26067
|
* Releases all resources and disconnects from the database.
|
|
26041
26068
|
*
|
|
26042
|
-
*
|
|
26069
|
+
* Call this when you are done using the `Kysely` instance and Kysely is
|
|
26070
|
+
* responsible for closing its connections, pool, or database instance.
|
|
26071
|
+
*
|
|
26072
|
+
* If the pool or database instance is shared with other consumers or its
|
|
26073
|
+
* lifecycle is managed elsewhere, skip this call. Let the application close it
|
|
26074
|
+
* once all consumers, including Kysely, have finished. No separate cleanup of
|
|
26075
|
+
* the `Kysely` instance is needed.
|
|
26076
|
+
*
|
|
26077
|
+
* The driver is initialized lazily. If initialization hasn't started, this
|
|
26078
|
+
* method does nothing.
|
|
26043
26079
|
*/
|
|
26044
26080
|
destroy(): Promise<void>;
|
|
26045
26081
|
/**
|
|
@@ -26203,6 +26239,13 @@ declare class ControlledTransaction<DB, S extends string[] = []> extends Transac
|
|
|
26203
26239
|
/**
|
|
26204
26240
|
* Commits the transaction.
|
|
26205
26241
|
*
|
|
26242
|
+
* If the database rolls back instead of committing, marks the transaction
|
|
26243
|
+
* as rolled back, releases the connection and throws {@link AbortedTransactionError}.
|
|
26244
|
+
*
|
|
26245
|
+
* Waits for ongoing queries to finish. Streams must be exhausted or closed
|
|
26246
|
+
* before awaiting this command. When consuming a stream with `for await`,
|
|
26247
|
+
* exit the loop before committing.
|
|
26248
|
+
*
|
|
26206
26249
|
* See {@link rollback}.
|
|
26207
26250
|
*
|
|
26208
26251
|
* ### Examples
|
|
@@ -26228,6 +26271,16 @@ declare class ControlledTransaction<DB, S extends string[] = []> extends Transac
|
|
|
26228
26271
|
/**
|
|
26229
26272
|
* Rolls back the transaction.
|
|
26230
26273
|
*
|
|
26274
|
+
* If a commit already reported that the database rolled back the transaction,
|
|
26275
|
+
* succeeds without sending another rollback command.
|
|
26276
|
+
*
|
|
26277
|
+
* The connection is released even if the rollback fails, so the transaction
|
|
26278
|
+
* cannot be used afterwards in either case.
|
|
26279
|
+
*
|
|
26280
|
+
* Waits for ongoing queries to finish. Streams must be exhausted or closed
|
|
26281
|
+
* before awaiting this command. When consuming a stream with `for await`,
|
|
26282
|
+
* exit the loop before rolling back.
|
|
26283
|
+
*
|
|
26231
26284
|
* See {@link commit} and {@link rollbackToSavepoint}.
|
|
26232
26285
|
*
|
|
26233
26286
|
* ### Examples
|
|
@@ -26253,6 +26306,10 @@ declare class ControlledTransaction<DB, S extends string[] = []> extends Transac
|
|
|
26253
26306
|
/**
|
|
26254
26307
|
* Creates a savepoint with a given name.
|
|
26255
26308
|
*
|
|
26309
|
+
* Waits for ongoing queries to finish. Streams must be exhausted or closed
|
|
26310
|
+
* before awaiting this command. When consuming a stream with `for await`,
|
|
26311
|
+
* exit the loop before creating a savepoint.
|
|
26312
|
+
*
|
|
26256
26313
|
* See {@link rollbackToSavepoint} and {@link releaseSavepoint}.
|
|
26257
26314
|
*
|
|
26258
26315
|
* For a type-safe experience, you should use the returned instance from now on.
|
|
@@ -26283,6 +26340,10 @@ declare class ControlledTransaction<DB, S extends string[] = []> extends Transac
|
|
|
26283
26340
|
/**
|
|
26284
26341
|
* Rolls back to a savepoint with a given name.
|
|
26285
26342
|
*
|
|
26343
|
+
* Waits for ongoing queries to finish. Streams must be exhausted or closed
|
|
26344
|
+
* before awaiting this command. When consuming a stream with `for await`,
|
|
26345
|
+
* exit the loop before rolling back to a savepoint.
|
|
26346
|
+
*
|
|
26286
26347
|
* See {@link savepoint} and {@link releaseSavepoint}.
|
|
26287
26348
|
*
|
|
26288
26349
|
* You must use the same instance returned by {@link savepoint}, or
|
|
@@ -26314,6 +26375,10 @@ declare class ControlledTransaction<DB, S extends string[] = []> extends Transac
|
|
|
26314
26375
|
/**
|
|
26315
26376
|
* Releases a savepoint with a given name.
|
|
26316
26377
|
*
|
|
26378
|
+
* Waits for ongoing queries to finish. Streams must be exhausted or closed
|
|
26379
|
+
* before awaiting this command. When consuming a stream with `for await`,
|
|
26380
|
+
* exit the loop before releasing a savepoint.
|
|
26381
|
+
*
|
|
26317
26382
|
* See {@link savepoint} and {@link rollbackToSavepoint}.
|
|
26318
26383
|
*
|
|
26319
26384
|
* You must use the same instance returned by {@link savepoint}, or
|
|
@@ -26369,8 +26434,12 @@ declare class ControlledTransaction<DB, S extends string[] = []> extends Transac
|
|
|
26369
26434
|
$omitTables<T extends keyof DB>(): ControlledTransaction<DB extends object ? Omit<DB, T> : DB, S>;
|
|
26370
26435
|
$pickTables<T extends keyof DB>(): ControlledTransaction<DB extends object ? Pick<DB, T> : DB, S>;
|
|
26371
26436
|
}
|
|
26437
|
+
interface ControlledTransactionState {
|
|
26438
|
+
status: 'active' | 'committed' | 'rolled back' | 'aborted';
|
|
26439
|
+
}
|
|
26372
26440
|
interface ControlledTransactionProps extends KyselyProps {
|
|
26373
26441
|
readonly connection: ControlledConnection;
|
|
26442
|
+
readonly transactionState: ControlledTransactionState;
|
|
26374
26443
|
}
|
|
26375
26444
|
declare class Command<T> {
|
|
26376
26445
|
#private;
|
|
@@ -26477,7 +26546,7 @@ type PostgresClientConstructor = new (options: any) => PostgresClient;
|
|
|
26477
26546
|
* https://node-postgres.com/apis/pool#releasing-clients
|
|
26478
26547
|
*/
|
|
26479
26548
|
interface PostgresPoolClient extends Omit<PostgresClient, 'connect' | 'end'> {
|
|
26480
|
-
release(): void;
|
|
26549
|
+
release(destroy?: boolean): void;
|
|
26481
26550
|
}
|
|
26482
26551
|
/**
|
|
26483
26552
|
* This interface is pg driver's `Cursor` class that kysely needs.
|
|
@@ -26498,7 +26567,7 @@ interface PostgresCursor<T> {
|
|
|
26498
26567
|
* https://node-postgres.com/apis/result
|
|
26499
26568
|
*/
|
|
26500
26569
|
interface PostgresQueryResult<R> {
|
|
26501
|
-
command: 'UPDATE' | 'DELETE' | 'INSERT' | 'SELECT' | 'MERGE';
|
|
26570
|
+
command: 'UPDATE' | 'DELETE' | 'INSERT' | 'SELECT' | 'MERGE' | 'COMMIT' | 'ROLLBACK';
|
|
26502
26571
|
rowCount: number;
|
|
26503
26572
|
rows: R[];
|
|
26504
26573
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/auth-model",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Portable Better Auth core contract and parity checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@stll/typescript-config": "0.0.0",
|
|
53
53
|
"better-auth": "1.7.16",
|
|
54
54
|
"bun-types": "1.4.4",
|
|
55
|
-
"tsdown": "0.23.
|
|
56
|
-
"tsrs": "0.
|
|
55
|
+
"tsdown": "0.23.4",
|
|
56
|
+
"tsrs": "0.20.1-ts7.1.0-beta"
|
|
57
57
|
},
|
|
58
58
|
"main": "./dist/contract.js",
|
|
59
59
|
"types": "./dist/contract.d.ts"
|