@authhero/kysely-adapter 11.12.0 → 11.13.0
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/kysely-adapter.cjs +16 -16
- package/dist/kysely-adapter.d.ts +41 -0
- package/dist/kysely-adapter.mjs +2377 -2129
- package/dist/types/migrate/migrations/2026-07-04T12:00:00_tenant_operations.d.ts +9 -0
- package/dist/types/migrate/migrations/index.d.ts +2 -0
- package/dist/types/src/db.d.ts +41 -0
- package/dist/types/src/rollouts/index.d.ts +4 -0
- package/dist/types/src/tenantOperationEvents/index.d.ts +4 -0
- package/dist/types/src/tenantOperations/index.d.ts +4 -0
- package/dist/types/src/utils/monotonic-id.d.ts +8 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
/**
|
|
3
|
+
* Durable tenant lifecycle operations with append-only history, plus fleet
|
|
4
|
+
* rollouts (issue #1026). `tenant_operations` intentionally has no FK to
|
|
5
|
+
* `tenants`: the log must survive tenant deletion and `tenant_id` is NULL
|
|
6
|
+
* for fleet-level operations.
|
|
7
|
+
*/
|
|
8
|
+
export declare function up(db: Kysely<unknown>): Promise<void>;
|
|
9
|
+
export declare function down(db: Kysely<unknown>): Promise<void>;
|
|
@@ -176,6 +176,7 @@ import * as o077_tenant_deployment_fields from "./2026-06-06T12:00:00_tenant_dep
|
|
|
176
176
|
import * as o078_tenant_database_version from "./2026-06-27T12:00:00_tenant_database_version";
|
|
177
177
|
import * as o079_user_activity_and_user_column_cleanup from "./2026-06-30T12:00:00_user_activity_and_user_column_cleanup";
|
|
178
178
|
import * as o080_drop_user_activity_columns_from_users from "./2026-07-02T12:00:00_drop_user_activity_columns_from_users";
|
|
179
|
+
import * as o081_tenant_operations from "./2026-07-04T12:00:00_tenant_operations";
|
|
179
180
|
declare const _default: {
|
|
180
181
|
m1_init: typeof m1_init;
|
|
181
182
|
m2_magicLink: typeof m2_magicLink;
|
|
@@ -355,5 +356,6 @@ declare const _default: {
|
|
|
355
356
|
o078_tenant_database_version: typeof o078_tenant_database_version;
|
|
356
357
|
o079_user_activity_and_user_column_cleanup: typeof o079_user_activity_and_user_column_cleanup;
|
|
357
358
|
o080_drop_user_activity_columns_from_users: typeof o080_drop_user_activity_columns_from_users;
|
|
359
|
+
o081_tenant_operations: typeof o081_tenant_operations;
|
|
358
360
|
};
|
|
359
361
|
export default _default;
|
package/dist/types/src/db.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ export declare const sqlUserSchema: z.ZodObject<{
|
|
|
121
121
|
family_name: z.ZodOptional<z.ZodString>;
|
|
122
122
|
}, z.core.$catchall<z.ZodAny>>>;
|
|
123
123
|
}, z.core.$strip>>>;
|
|
124
|
+
login_count: z.ZodOptional<z.ZodNumber>;
|
|
124
125
|
email_verified: z.ZodNumber;
|
|
125
126
|
phone_verified: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
126
127
|
is_social: z.ZodNumber;
|
|
@@ -938,5 +939,45 @@ export interface Database {
|
|
|
938
939
|
created_at: string;
|
|
939
940
|
updated_at: string;
|
|
940
941
|
};
|
|
942
|
+
tenant_operations: {
|
|
943
|
+
id: string;
|
|
944
|
+
tenant_id: string | null;
|
|
945
|
+
rollout_id: string | null;
|
|
946
|
+
kind: string;
|
|
947
|
+
status: string;
|
|
948
|
+
current_step: string | null;
|
|
949
|
+
engine: string;
|
|
950
|
+
engine_instance_id: string | null;
|
|
951
|
+
target_worker_version: string | null;
|
|
952
|
+
target_database_version: string | null;
|
|
953
|
+
error: string | null;
|
|
954
|
+
initiated_by: string | null;
|
|
955
|
+
created_at: string;
|
|
956
|
+
updated_at: string;
|
|
957
|
+
finished_at: string | null;
|
|
958
|
+
};
|
|
959
|
+
tenant_operation_events: {
|
|
960
|
+
id: string;
|
|
961
|
+
operation_id: string;
|
|
962
|
+
step: string;
|
|
963
|
+
outcome: string;
|
|
964
|
+
detail: string | null;
|
|
965
|
+
attempt: number;
|
|
966
|
+
created_at: string;
|
|
967
|
+
};
|
|
968
|
+
rollouts: {
|
|
969
|
+
id: string;
|
|
970
|
+
kind: string;
|
|
971
|
+
status: string;
|
|
972
|
+
target_worker_version: string | null;
|
|
973
|
+
target_database_version: string | null;
|
|
974
|
+
wave_size: number;
|
|
975
|
+
canary_tenant_ids: string | null;
|
|
976
|
+
filter: string | null;
|
|
977
|
+
initiated_by: string | null;
|
|
978
|
+
created_at: string;
|
|
979
|
+
updated_at: string;
|
|
980
|
+
finished_at: string | null;
|
|
981
|
+
};
|
|
941
982
|
}
|
|
942
983
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lexicographically sortable id that is strictly increasing within a
|
|
3
|
+
* process, even for ids generated in the same millisecond (a per-ms
|
|
4
|
+
* sequence follows the time component). Used for append-only logs where
|
|
5
|
+
* insertion order must survive an `ORDER BY id` tiebreak — `created_at`
|
|
6
|
+
* only has millisecond precision.
|
|
7
|
+
*/
|
|
8
|
+
export declare function monotonicId(): string;
|