@authhero/kysely-adapter 10.32.0 → 10.33.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 +1 -1
- package/dist/kysely-adapter.d.ts +83 -82
- package/dist/kysely-adapter.mjs +1181 -1168
- package/package.json +3 -3
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -5642,6 +5642,8 @@ declare const resourceServerInsertSchema: z.ZodObject<{
|
|
|
5642
5642
|
}>;
|
|
5643
5643
|
export type ResourceServerInsert = z.input<typeof resourceServerInsertSchema>;
|
|
5644
5644
|
declare const resourceServerSchema: z.ZodObject<{
|
|
5645
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
5646
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
5645
5647
|
name: z.ZodString;
|
|
5646
5648
|
identifier: z.ZodString;
|
|
5647
5649
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -5735,6 +5737,8 @@ declare const resourceServerSchema: z.ZodObject<{
|
|
|
5735
5737
|
bound_access_tokens?: boolean | undefined;
|
|
5736
5738
|
}>>;
|
|
5737
5739
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5740
|
+
created_at?: string | undefined;
|
|
5741
|
+
updated_at?: string | undefined;
|
|
5738
5742
|
id?: string | undefined;
|
|
5739
5743
|
scopes?: {
|
|
5740
5744
|
value: string;
|
|
@@ -5768,6 +5772,8 @@ declare const resourceServerSchema: z.ZodObject<{
|
|
|
5768
5772
|
bound_access_tokens?: boolean | undefined;
|
|
5769
5773
|
}>>;
|
|
5770
5774
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5775
|
+
created_at?: string | undefined;
|
|
5776
|
+
updated_at?: string | undefined;
|
|
5771
5777
|
id?: string | undefined;
|
|
5772
5778
|
scopes?: {
|
|
5773
5779
|
value: string;
|
|
@@ -5800,6 +5806,8 @@ declare const permissionSchema: z.ZodObject<{
|
|
|
5800
5806
|
source_name: z.ZodOptional<z.ZodString>;
|
|
5801
5807
|
source_type: z.ZodOptional<z.ZodString>;
|
|
5802
5808
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
5809
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
5810
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
5803
5811
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
5804
5812
|
permission_name: z.ZodString;
|
|
5805
5813
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -5818,6 +5826,8 @@ declare const permissionSchema: z.ZodObject<{
|
|
|
5818
5826
|
source_name: z.ZodOptional<z.ZodString>;
|
|
5819
5827
|
source_type: z.ZodOptional<z.ZodString>;
|
|
5820
5828
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
5829
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
5830
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
5821
5831
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5822
5832
|
permission_name: z.ZodString;
|
|
5823
5833
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -5836,58 +5846,42 @@ declare const permissionSchema: z.ZodObject<{
|
|
|
5836
5846
|
source_name: z.ZodOptional<z.ZodString>;
|
|
5837
5847
|
source_type: z.ZodOptional<z.ZodString>;
|
|
5838
5848
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
5849
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
5850
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
5839
5851
|
}, z.ZodTypeAny, "passthrough">>;
|
|
5840
5852
|
export type Permission = z.infer<typeof permissionSchema>;
|
|
5841
5853
|
export type PermissionInsert = z.input<typeof permissionSchema>;
|
|
5842
|
-
declare const
|
|
5854
|
+
declare const roleInsertSchema: z.ZodObject<{
|
|
5843
5855
|
name: z.ZodString;
|
|
5844
|
-
|
|
5845
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5846
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5847
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
5856
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5848
5857
|
}, "strip", z.ZodTypeAny, {
|
|
5849
5858
|
name: string;
|
|
5850
|
-
|
|
5851
|
-
enabled?: boolean | undefined;
|
|
5852
|
-
order?: number | undefined;
|
|
5853
|
-
stage?: string | undefined;
|
|
5859
|
+
description?: string | undefined;
|
|
5854
5860
|
}, {
|
|
5855
5861
|
name: string;
|
|
5856
|
-
|
|
5857
|
-
enabled?: boolean | undefined;
|
|
5858
|
-
order?: number | undefined;
|
|
5859
|
-
stage?: string | undefined;
|
|
5862
|
+
description?: string | undefined;
|
|
5860
5863
|
}>;
|
|
5861
|
-
|
|
5862
|
-
declare const ruleSchema: z.ZodObject<{
|
|
5863
|
-
name: z.ZodString;
|
|
5864
|
-
script: z.ZodString;
|
|
5865
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5866
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5867
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
5868
|
-
id: z.ZodString;
|
|
5864
|
+
declare const roleSchema: z.ZodObject<{
|
|
5869
5865
|
created_at: z.ZodOptional<z.ZodString>;
|
|
5870
5866
|
updated_at: z.ZodOptional<z.ZodString>;
|
|
5871
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
5872
|
-
name: z.ZodString;
|
|
5873
|
-
script: z.ZodString;
|
|
5874
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5875
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5876
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
5877
|
-
id: z.ZodString;
|
|
5878
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
5879
|
-
updated_at: z.ZodOptional<z.ZodString>;
|
|
5880
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5881
5867
|
name: z.ZodString;
|
|
5882
|
-
|
|
5883
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5884
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5885
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
5868
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5886
5869
|
id: z.ZodString;
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5870
|
+
}, "strip", z.ZodTypeAny, {
|
|
5871
|
+
name: string;
|
|
5872
|
+
id: string;
|
|
5873
|
+
description?: string | undefined;
|
|
5874
|
+
created_at?: string | undefined;
|
|
5875
|
+
updated_at?: string | undefined;
|
|
5876
|
+
}, {
|
|
5877
|
+
name: string;
|
|
5878
|
+
id: string;
|
|
5879
|
+
description?: string | undefined;
|
|
5880
|
+
created_at?: string | undefined;
|
|
5881
|
+
updated_at?: string | undefined;
|
|
5882
|
+
}>;
|
|
5883
|
+
export type Role = z.infer<typeof roleSchema>;
|
|
5884
|
+
export type RoleInsert = z.infer<typeof roleInsertSchema>;
|
|
5891
5885
|
export interface ListCodesResponse extends Totals {
|
|
5892
5886
|
codes: Code[];
|
|
5893
5887
|
}
|
|
@@ -6050,16 +6044,6 @@ export interface ResourceServersAdapter {
|
|
|
6050
6044
|
update(tenant_id: string, id: string, resourceServer: Partial<ResourceServerInsert>): Promise<boolean>;
|
|
6051
6045
|
remove(tenant_id: string, id: string): Promise<boolean>;
|
|
6052
6046
|
}
|
|
6053
|
-
export interface ListRulesResponse extends Totals {
|
|
6054
|
-
rules: Rule[];
|
|
6055
|
-
}
|
|
6056
|
-
export interface RulesAdapter {
|
|
6057
|
-
create(tenant_id: string, rule: RuleInsert): Promise<Rule>;
|
|
6058
|
-
get(tenant_id: string, rule_id: string): Promise<Rule | null>;
|
|
6059
|
-
list(tenant_id: string, params?: ListParams): Promise<ListRulesResponse>;
|
|
6060
|
-
update(tenant_id: string, rule_id: string, rule: Partial<RuleInsert>): Promise<boolean>;
|
|
6061
|
-
remove(tenant_id: string, rule_id: string): Promise<boolean>;
|
|
6062
|
-
}
|
|
6063
6047
|
export interface ListPermissionsResponse extends Totals {
|
|
6064
6048
|
permissions: Permission[];
|
|
6065
6049
|
}
|
|
@@ -6070,6 +6054,20 @@ export interface PermissionsAdapter {
|
|
|
6070
6054
|
update(tenant_id: string, permission_id: string, permission: Partial<PermissionInsert>): Promise<boolean>;
|
|
6071
6055
|
remove(tenant_id: string, permission_id: string): Promise<boolean>;
|
|
6072
6056
|
}
|
|
6057
|
+
export interface ListRolesResponse {
|
|
6058
|
+
roles: Role[];
|
|
6059
|
+
totals?: Totals;
|
|
6060
|
+
start: number;
|
|
6061
|
+
limit: number;
|
|
6062
|
+
length: number;
|
|
6063
|
+
}
|
|
6064
|
+
export interface RolesAdapter {
|
|
6065
|
+
create(tenantId: string, role: RoleInsert): Promise<Role>;
|
|
6066
|
+
get(tenantId: string, roleId: string): Promise<Role | null>;
|
|
6067
|
+
list(tenantId: string, params?: ListParams): Promise<ListRolesResponse>;
|
|
6068
|
+
update(tenantId: string, roleId: string, updates: Partial<Role>): Promise<boolean>;
|
|
6069
|
+
remove(tenantId: string, roleId: string): Promise<boolean>;
|
|
6070
|
+
}
|
|
6073
6071
|
export interface DataAdapters {
|
|
6074
6072
|
applications: ApplicationsAdapter;
|
|
6075
6073
|
branding: BrandingAdapter;
|
|
@@ -6087,8 +6085,8 @@ export interface DataAdapters {
|
|
|
6087
6085
|
promptSettings: PromptSettingsAdapter;
|
|
6088
6086
|
refreshTokens: RefreshTokensAdapter;
|
|
6089
6087
|
resourceServers: ResourceServersAdapter;
|
|
6090
|
-
rules: RulesAdapter;
|
|
6091
6088
|
permissions: PermissionsAdapter;
|
|
6089
|
+
roles: RolesAdapter;
|
|
6092
6090
|
sessions: SessionsAdapter;
|
|
6093
6091
|
tenants: TenantsDataAdapter;
|
|
6094
6092
|
themes: ThemesAdapter;
|
|
@@ -6765,6 +6763,8 @@ declare const sqlResourceServerSchema: z.ZodObject<Omit<{
|
|
|
6765
6763
|
skip_consent_for_verifiable_first_party_clients: z.ZodOptional<z.ZodNumber>;
|
|
6766
6764
|
allow_offline_access: z.ZodOptional<z.ZodNumber>;
|
|
6767
6765
|
verification_key: z.ZodOptional<z.ZodString>;
|
|
6766
|
+
created_at: z.ZodString;
|
|
6767
|
+
updated_at: z.ZodString;
|
|
6768
6768
|
name: z.ZodString;
|
|
6769
6769
|
identifier: z.ZodString;
|
|
6770
6770
|
signing_alg: z.ZodOptional<z.ZodString>;
|
|
@@ -6777,6 +6777,8 @@ declare const sqlResourceServerSchema: z.ZodObject<Omit<{
|
|
|
6777
6777
|
options: string;
|
|
6778
6778
|
tenant_id: string;
|
|
6779
6779
|
name: string;
|
|
6780
|
+
created_at: string;
|
|
6781
|
+
updated_at: string;
|
|
6780
6782
|
scopes: string;
|
|
6781
6783
|
identifier: string;
|
|
6782
6784
|
id?: string | undefined;
|
|
@@ -6790,6 +6792,8 @@ declare const sqlResourceServerSchema: z.ZodObject<Omit<{
|
|
|
6790
6792
|
}, {
|
|
6791
6793
|
tenant_id: string;
|
|
6792
6794
|
name: string;
|
|
6795
|
+
created_at: string;
|
|
6796
|
+
updated_at: string;
|
|
6793
6797
|
identifier: string;
|
|
6794
6798
|
options?: string | undefined;
|
|
6795
6799
|
id?: string | undefined;
|
|
@@ -6802,40 +6806,11 @@ declare const sqlResourceServerSchema: z.ZodObject<Omit<{
|
|
|
6802
6806
|
token_lifetime?: number | undefined;
|
|
6803
6807
|
token_lifetime_for_web?: number | undefined;
|
|
6804
6808
|
}>;
|
|
6805
|
-
declare const sqlRuleSchema: z.ZodObject<{
|
|
6806
|
-
tenant_id: z.ZodString;
|
|
6807
|
-
enabled: z.ZodOptional<z.ZodNumber>;
|
|
6808
|
-
name: z.ZodString;
|
|
6809
|
-
script: z.ZodString;
|
|
6810
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
6811
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
6812
|
-
id: z.ZodString;
|
|
6813
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
6814
|
-
updated_at: z.ZodOptional<z.ZodString>;
|
|
6815
|
-
}, "strip", z.ZodTypeAny, {
|
|
6816
|
-
tenant_id: string;
|
|
6817
|
-
id: string;
|
|
6818
|
-
name: string;
|
|
6819
|
-
script: string;
|
|
6820
|
-
enabled?: number | undefined;
|
|
6821
|
-
created_at?: string | undefined;
|
|
6822
|
-
updated_at?: string | undefined;
|
|
6823
|
-
order?: number | undefined;
|
|
6824
|
-
stage?: string | undefined;
|
|
6825
|
-
}, {
|
|
6826
|
-
tenant_id: string;
|
|
6827
|
-
id: string;
|
|
6828
|
-
name: string;
|
|
6829
|
-
script: string;
|
|
6830
|
-
enabled?: number | undefined;
|
|
6831
|
-
created_at?: string | undefined;
|
|
6832
|
-
updated_at?: string | undefined;
|
|
6833
|
-
order?: number | undefined;
|
|
6834
|
-
stage?: string | undefined;
|
|
6835
|
-
}>;
|
|
6836
6809
|
declare const sqlPermissionSchema: z.ZodObject<{
|
|
6837
6810
|
tenant_id: z.ZodString;
|
|
6838
6811
|
sources: z.ZodOptional<z.ZodString>;
|
|
6812
|
+
created_at: z.ZodString;
|
|
6813
|
+
updated_at: z.ZodString;
|
|
6839
6814
|
permission_name: z.ZodString;
|
|
6840
6815
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6841
6816
|
resource_server_identifier: z.ZodString;
|
|
@@ -6844,6 +6819,8 @@ declare const sqlPermissionSchema: z.ZodObject<{
|
|
|
6844
6819
|
}, "strip", z.ZodTypeAny, {
|
|
6845
6820
|
tenant_id: string;
|
|
6846
6821
|
id: string;
|
|
6822
|
+
created_at: string;
|
|
6823
|
+
updated_at: string;
|
|
6847
6824
|
permission_name: string;
|
|
6848
6825
|
resource_server_identifier: string;
|
|
6849
6826
|
resource_server_name: string;
|
|
@@ -6852,12 +6829,36 @@ declare const sqlPermissionSchema: z.ZodObject<{
|
|
|
6852
6829
|
}, {
|
|
6853
6830
|
tenant_id: string;
|
|
6854
6831
|
id: string;
|
|
6832
|
+
created_at: string;
|
|
6833
|
+
updated_at: string;
|
|
6855
6834
|
permission_name: string;
|
|
6856
6835
|
resource_server_identifier: string;
|
|
6857
6836
|
resource_server_name: string;
|
|
6858
6837
|
description?: string | null | undefined;
|
|
6859
6838
|
sources?: string | undefined;
|
|
6860
6839
|
}>;
|
|
6840
|
+
declare const sqlRoleSchema: z.ZodObject<{
|
|
6841
|
+
tenant_id: z.ZodString;
|
|
6842
|
+
created_at: z.ZodString;
|
|
6843
|
+
updated_at: z.ZodString;
|
|
6844
|
+
name: z.ZodString;
|
|
6845
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6846
|
+
id: z.ZodString;
|
|
6847
|
+
}, "strip", z.ZodTypeAny, {
|
|
6848
|
+
tenant_id: string;
|
|
6849
|
+
id: string;
|
|
6850
|
+
name: string;
|
|
6851
|
+
created_at: string;
|
|
6852
|
+
updated_at: string;
|
|
6853
|
+
description?: string | undefined;
|
|
6854
|
+
}, {
|
|
6855
|
+
tenant_id: string;
|
|
6856
|
+
id: string;
|
|
6857
|
+
name: string;
|
|
6858
|
+
created_at: string;
|
|
6859
|
+
updated_at: string;
|
|
6860
|
+
description?: string | undefined;
|
|
6861
|
+
}>;
|
|
6861
6862
|
export interface Database {
|
|
6862
6863
|
applications: z.infer<typeof sqlApplicationSchema>;
|
|
6863
6864
|
branding: z.infer<typeof sqlBrandingSchema>;
|
|
@@ -6884,8 +6885,8 @@ export interface Database {
|
|
|
6884
6885
|
tenants: Tenant;
|
|
6885
6886
|
themes: z.infer<typeof sqlThemeSchema>;
|
|
6886
6887
|
resource_servers: z.infer<typeof sqlResourceServerSchema>;
|
|
6887
|
-
rules: z.infer<typeof sqlRuleSchema>;
|
|
6888
6888
|
permissions: z.infer<typeof sqlPermissionSchema>;
|
|
6889
|
+
roles: z.infer<typeof sqlRoleSchema>;
|
|
6889
6890
|
}
|
|
6890
6891
|
export declare function migrateToLatest(db: Kysely<Database>, debug?: boolean): Promise<void>;
|
|
6891
6892
|
export declare function migrateDown(db: Kysely<Database>): Promise<void>;
|