@authhero/kysely-adapter 10.32.0 → 10.34.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 +240 -275
- package/dist/kysely-adapter.mjs +1327 -1198
- package/package.json +3 -3
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -5540,62 +5540,41 @@ declare const resourceServerInsertSchema: z.ZodObject<{
|
|
|
5540
5540
|
}, {
|
|
5541
5541
|
bound_access_tokens?: boolean | undefined;
|
|
5542
5542
|
}>>;
|
|
5543
|
-
}, "
|
|
5544
|
-
token_dialect
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
5552
|
-
enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
5553
|
-
mtls: z.ZodOptional<z.ZodObject<{
|
|
5554
|
-
bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
|
|
5555
|
-
}, "strip", z.ZodTypeAny, {
|
|
5556
|
-
bound_access_tokens?: boolean | undefined;
|
|
5557
|
-
}, {
|
|
5558
|
-
bound_access_tokens?: boolean | undefined;
|
|
5559
|
-
}>>;
|
|
5560
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5561
|
-
token_dialect: z.ZodOptional<z.ZodEnum<[
|
|
5562
|
-
"access_token",
|
|
5563
|
-
"access_token_authz"
|
|
5564
|
-
]>>;
|
|
5565
|
-
enforce_policies: z.ZodOptional<z.ZodBoolean>;
|
|
5566
|
-
allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
|
|
5567
|
-
skip_userinfo: z.ZodOptional<z.ZodBoolean>;
|
|
5568
|
-
persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
5569
|
-
enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
5570
|
-
mtls: z.ZodOptional<z.ZodObject<{
|
|
5571
|
-
bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
|
|
5572
|
-
}, "strip", z.ZodTypeAny, {
|
|
5543
|
+
}, "strip", z.ZodTypeAny, {
|
|
5544
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
5545
|
+
enforce_policies?: boolean | undefined;
|
|
5546
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
5547
|
+
skip_userinfo?: boolean | undefined;
|
|
5548
|
+
persist_client_authorization?: boolean | undefined;
|
|
5549
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
5550
|
+
mtls?: {
|
|
5573
5551
|
bound_access_tokens?: boolean | undefined;
|
|
5574
|
-
}
|
|
5552
|
+
} | undefined;
|
|
5553
|
+
}, {
|
|
5554
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
5555
|
+
enforce_policies?: boolean | undefined;
|
|
5556
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
5557
|
+
skip_userinfo?: boolean | undefined;
|
|
5558
|
+
persist_client_authorization?: boolean | undefined;
|
|
5559
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
5560
|
+
mtls?: {
|
|
5575
5561
|
bound_access_tokens?: boolean | undefined;
|
|
5576
|
-
}
|
|
5577
|
-
}
|
|
5562
|
+
} | undefined;
|
|
5563
|
+
}>>;
|
|
5578
5564
|
}, "strip", z.ZodTypeAny, {
|
|
5579
5565
|
name: string;
|
|
5580
5566
|
identifier: string;
|
|
5581
|
-
options?:
|
|
5582
|
-
token_dialect
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
5590
|
-
enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
5591
|
-
mtls: z.ZodOptional<z.ZodObject<{
|
|
5592
|
-
bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
|
|
5593
|
-
}, "strip", z.ZodTypeAny, {
|
|
5594
|
-
bound_access_tokens?: boolean | undefined;
|
|
5595
|
-
}, {
|
|
5567
|
+
options?: {
|
|
5568
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
5569
|
+
enforce_policies?: boolean | undefined;
|
|
5570
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
5571
|
+
skip_userinfo?: boolean | undefined;
|
|
5572
|
+
persist_client_authorization?: boolean | undefined;
|
|
5573
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
5574
|
+
mtls?: {
|
|
5596
5575
|
bound_access_tokens?: boolean | undefined;
|
|
5597
|
-
}
|
|
5598
|
-
}
|
|
5576
|
+
} | undefined;
|
|
5577
|
+
} | undefined;
|
|
5599
5578
|
scopes?: {
|
|
5600
5579
|
value: string;
|
|
5601
5580
|
description?: string | undefined;
|
|
@@ -5610,24 +5589,17 @@ declare const resourceServerInsertSchema: z.ZodObject<{
|
|
|
5610
5589
|
}, {
|
|
5611
5590
|
name: string;
|
|
5612
5591
|
identifier: string;
|
|
5613
|
-
options?:
|
|
5614
|
-
token_dialect
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
5622
|
-
enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
5623
|
-
mtls: z.ZodOptional<z.ZodObject<{
|
|
5624
|
-
bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
|
|
5625
|
-
}, "strip", z.ZodTypeAny, {
|
|
5626
|
-
bound_access_tokens?: boolean | undefined;
|
|
5627
|
-
}, {
|
|
5592
|
+
options?: {
|
|
5593
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
5594
|
+
enforce_policies?: boolean | undefined;
|
|
5595
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
5596
|
+
skip_userinfo?: boolean | undefined;
|
|
5597
|
+
persist_client_authorization?: boolean | undefined;
|
|
5598
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
5599
|
+
mtls?: {
|
|
5628
5600
|
bound_access_tokens?: boolean | undefined;
|
|
5629
|
-
}
|
|
5630
|
-
}
|
|
5601
|
+
} | undefined;
|
|
5602
|
+
} | undefined;
|
|
5631
5603
|
scopes?: {
|
|
5632
5604
|
value: string;
|
|
5633
5605
|
description?: string | undefined;
|
|
@@ -5642,6 +5614,8 @@ declare const resourceServerInsertSchema: z.ZodObject<{
|
|
|
5642
5614
|
}>;
|
|
5643
5615
|
export type ResourceServerInsert = z.input<typeof resourceServerInsertSchema>;
|
|
5644
5616
|
declare const resourceServerSchema: z.ZodObject<{
|
|
5617
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
5618
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
5645
5619
|
name: z.ZodString;
|
|
5646
5620
|
identifier: z.ZodString;
|
|
5647
5621
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -5678,63 +5652,44 @@ declare const resourceServerSchema: z.ZodObject<{
|
|
|
5678
5652
|
}, {
|
|
5679
5653
|
bound_access_tokens?: boolean | undefined;
|
|
5680
5654
|
}>>;
|
|
5681
|
-
}, "
|
|
5682
|
-
token_dialect
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
5690
|
-
enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
5691
|
-
mtls: z.ZodOptional<z.ZodObject<{
|
|
5692
|
-
bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
|
|
5693
|
-
}, "strip", z.ZodTypeAny, {
|
|
5694
|
-
bound_access_tokens?: boolean | undefined;
|
|
5695
|
-
}, {
|
|
5696
|
-
bound_access_tokens?: boolean | undefined;
|
|
5697
|
-
}>>;
|
|
5698
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5699
|
-
token_dialect: z.ZodOptional<z.ZodEnum<[
|
|
5700
|
-
"access_token",
|
|
5701
|
-
"access_token_authz"
|
|
5702
|
-
]>>;
|
|
5703
|
-
enforce_policies: z.ZodOptional<z.ZodBoolean>;
|
|
5704
|
-
allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
|
|
5705
|
-
skip_userinfo: z.ZodOptional<z.ZodBoolean>;
|
|
5706
|
-
persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
5707
|
-
enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
5708
|
-
mtls: z.ZodOptional<z.ZodObject<{
|
|
5709
|
-
bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
|
|
5710
|
-
}, "strip", z.ZodTypeAny, {
|
|
5655
|
+
}, "strip", z.ZodTypeAny, {
|
|
5656
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
5657
|
+
enforce_policies?: boolean | undefined;
|
|
5658
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
5659
|
+
skip_userinfo?: boolean | undefined;
|
|
5660
|
+
persist_client_authorization?: boolean | undefined;
|
|
5661
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
5662
|
+
mtls?: {
|
|
5711
5663
|
bound_access_tokens?: boolean | undefined;
|
|
5712
|
-
}
|
|
5664
|
+
} | undefined;
|
|
5665
|
+
}, {
|
|
5666
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
5667
|
+
enforce_policies?: boolean | undefined;
|
|
5668
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
5669
|
+
skip_userinfo?: boolean | undefined;
|
|
5670
|
+
persist_client_authorization?: boolean | undefined;
|
|
5671
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
5672
|
+
mtls?: {
|
|
5713
5673
|
bound_access_tokens?: boolean | undefined;
|
|
5714
|
-
}
|
|
5715
|
-
}
|
|
5674
|
+
} | undefined;
|
|
5675
|
+
}>>;
|
|
5716
5676
|
id: z.ZodOptional<z.ZodString>;
|
|
5717
5677
|
}, "strip", z.ZodTypeAny, {
|
|
5718
5678
|
name: string;
|
|
5719
5679
|
identifier: string;
|
|
5720
|
-
options?:
|
|
5721
|
-
token_dialect
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
5729
|
-
enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
5730
|
-
mtls: z.ZodOptional<z.ZodObject<{
|
|
5731
|
-
bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
|
|
5732
|
-
}, "strip", z.ZodTypeAny, {
|
|
5733
|
-
bound_access_tokens?: boolean | undefined;
|
|
5734
|
-
}, {
|
|
5680
|
+
options?: {
|
|
5681
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
5682
|
+
enforce_policies?: boolean | undefined;
|
|
5683
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
5684
|
+
skip_userinfo?: boolean | undefined;
|
|
5685
|
+
persist_client_authorization?: boolean | undefined;
|
|
5686
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
5687
|
+
mtls?: {
|
|
5735
5688
|
bound_access_tokens?: boolean | undefined;
|
|
5736
|
-
}
|
|
5737
|
-
}
|
|
5689
|
+
} | undefined;
|
|
5690
|
+
} | undefined;
|
|
5691
|
+
created_at?: string | undefined;
|
|
5692
|
+
updated_at?: string | undefined;
|
|
5738
5693
|
id?: string | undefined;
|
|
5739
5694
|
scopes?: {
|
|
5740
5695
|
value: string;
|
|
@@ -5750,24 +5705,19 @@ declare const resourceServerSchema: z.ZodObject<{
|
|
|
5750
5705
|
}, {
|
|
5751
5706
|
name: string;
|
|
5752
5707
|
identifier: string;
|
|
5753
|
-
options?:
|
|
5754
|
-
token_dialect
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
5762
|
-
enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
5763
|
-
mtls: z.ZodOptional<z.ZodObject<{
|
|
5764
|
-
bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
|
|
5765
|
-
}, "strip", z.ZodTypeAny, {
|
|
5766
|
-
bound_access_tokens?: boolean | undefined;
|
|
5767
|
-
}, {
|
|
5708
|
+
options?: {
|
|
5709
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
5710
|
+
enforce_policies?: boolean | undefined;
|
|
5711
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
5712
|
+
skip_userinfo?: boolean | undefined;
|
|
5713
|
+
persist_client_authorization?: boolean | undefined;
|
|
5714
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
5715
|
+
mtls?: {
|
|
5768
5716
|
bound_access_tokens?: boolean | undefined;
|
|
5769
|
-
}
|
|
5770
|
-
}
|
|
5717
|
+
} | undefined;
|
|
5718
|
+
} | undefined;
|
|
5719
|
+
created_at?: string | undefined;
|
|
5720
|
+
updated_at?: string | undefined;
|
|
5771
5721
|
id?: string | undefined;
|
|
5772
5722
|
scopes?: {
|
|
5773
5723
|
value: string;
|
|
@@ -5782,112 +5732,111 @@ declare const resourceServerSchema: z.ZodObject<{
|
|
|
5782
5732
|
verificationKey?: string | undefined;
|
|
5783
5733
|
}>;
|
|
5784
5734
|
export type ResourceServer = z.infer<typeof resourceServerSchema>;
|
|
5785
|
-
declare const
|
|
5735
|
+
declare const rolePermissionInsertSchema: z.ZodObject<{
|
|
5736
|
+
role_id: z.ZodString;
|
|
5737
|
+
resource_server_identifier: z.ZodString;
|
|
5786
5738
|
permission_name: z.ZodString;
|
|
5787
|
-
|
|
5739
|
+
}, "strip", z.ZodTypeAny, {
|
|
5740
|
+
role_id: string;
|
|
5741
|
+
resource_server_identifier: string;
|
|
5742
|
+
permission_name: string;
|
|
5743
|
+
}, {
|
|
5744
|
+
role_id: string;
|
|
5745
|
+
resource_server_identifier: string;
|
|
5746
|
+
permission_name: string;
|
|
5747
|
+
}>;
|
|
5748
|
+
export type RolePermissionInsert = z.infer<typeof rolePermissionInsertSchema>;
|
|
5749
|
+
declare const rolePermissionWithDetailsListSchema: z.ZodArray<z.ZodObject<{
|
|
5750
|
+
role_id: z.ZodString;
|
|
5788
5751
|
resource_server_identifier: z.ZodString;
|
|
5789
5752
|
resource_server_name: z.ZodString;
|
|
5790
|
-
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5791
|
-
source_id: z.ZodOptional<z.ZodString>;
|
|
5792
|
-
source_name: z.ZodOptional<z.ZodString>;
|
|
5793
|
-
source_type: z.ZodOptional<z.ZodString>;
|
|
5794
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
5795
|
-
source_id: z.ZodOptional<z.ZodString>;
|
|
5796
|
-
source_name: z.ZodOptional<z.ZodString>;
|
|
5797
|
-
source_type: z.ZodOptional<z.ZodString>;
|
|
5798
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5799
|
-
source_id: z.ZodOptional<z.ZodString>;
|
|
5800
|
-
source_name: z.ZodOptional<z.ZodString>;
|
|
5801
|
-
source_type: z.ZodOptional<z.ZodString>;
|
|
5802
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
5803
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
5804
5753
|
permission_name: z.ZodString;
|
|
5805
5754
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5755
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
5756
|
+
}, "strip", z.ZodTypeAny, {
|
|
5757
|
+
role_id: string;
|
|
5758
|
+
resource_server_identifier: string;
|
|
5759
|
+
permission_name: string;
|
|
5760
|
+
resource_server_name: string;
|
|
5761
|
+
description?: string | null | undefined;
|
|
5762
|
+
created_at?: string | undefined;
|
|
5763
|
+
}, {
|
|
5764
|
+
role_id: string;
|
|
5765
|
+
resource_server_identifier: string;
|
|
5766
|
+
permission_name: string;
|
|
5767
|
+
resource_server_name: string;
|
|
5768
|
+
description?: string | null | undefined;
|
|
5769
|
+
created_at?: string | undefined;
|
|
5770
|
+
}>, "many">;
|
|
5771
|
+
export type RolePermissionWithDetailsList = z.infer<typeof rolePermissionWithDetailsListSchema>;
|
|
5772
|
+
declare const userPermissionInsertSchema: z.ZodObject<{
|
|
5773
|
+
user_id: z.ZodString;
|
|
5806
5774
|
resource_server_identifier: z.ZodString;
|
|
5807
|
-
resource_server_name: z.ZodString;
|
|
5808
|
-
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5809
|
-
source_id: z.ZodOptional<z.ZodString>;
|
|
5810
|
-
source_name: z.ZodOptional<z.ZodString>;
|
|
5811
|
-
source_type: z.ZodOptional<z.ZodString>;
|
|
5812
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
5813
|
-
source_id: z.ZodOptional<z.ZodString>;
|
|
5814
|
-
source_name: z.ZodOptional<z.ZodString>;
|
|
5815
|
-
source_type: z.ZodOptional<z.ZodString>;
|
|
5816
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5817
|
-
source_id: z.ZodOptional<z.ZodString>;
|
|
5818
|
-
source_name: z.ZodOptional<z.ZodString>;
|
|
5819
|
-
source_type: z.ZodOptional<z.ZodString>;
|
|
5820
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
5821
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5822
5775
|
permission_name: z.ZodString;
|
|
5823
|
-
|
|
5776
|
+
}, "strip", z.ZodTypeAny, {
|
|
5777
|
+
user_id: string;
|
|
5778
|
+
resource_server_identifier: string;
|
|
5779
|
+
permission_name: string;
|
|
5780
|
+
}, {
|
|
5781
|
+
user_id: string;
|
|
5782
|
+
resource_server_identifier: string;
|
|
5783
|
+
permission_name: string;
|
|
5784
|
+
}>;
|
|
5785
|
+
export type UserPermissionInsert = z.infer<typeof userPermissionInsertSchema>;
|
|
5786
|
+
declare const userPermissionWithDetailsListSchema: z.ZodArray<z.ZodObject<{
|
|
5787
|
+
user_id: z.ZodString;
|
|
5824
5788
|
resource_server_identifier: z.ZodString;
|
|
5825
5789
|
resource_server_name: z.ZodString;
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5790
|
+
permission_name: z.ZodString;
|
|
5791
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5792
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
5793
|
+
}, "strip", z.ZodTypeAny, {
|
|
5794
|
+
user_id: string;
|
|
5795
|
+
resource_server_identifier: string;
|
|
5796
|
+
permission_name: string;
|
|
5797
|
+
resource_server_name: string;
|
|
5798
|
+
description?: string | null | undefined;
|
|
5799
|
+
created_at?: string | undefined;
|
|
5800
|
+
}, {
|
|
5801
|
+
user_id: string;
|
|
5802
|
+
resource_server_identifier: string;
|
|
5803
|
+
permission_name: string;
|
|
5804
|
+
resource_server_name: string;
|
|
5805
|
+
description?: string | null | undefined;
|
|
5806
|
+
created_at?: string | undefined;
|
|
5807
|
+
}>, "many">;
|
|
5808
|
+
export type UserPermissionWithDetailsList = z.infer<typeof userPermissionWithDetailsListSchema>;
|
|
5809
|
+
declare const roleInsertSchema: z.ZodObject<{
|
|
5843
5810
|
name: z.ZodString;
|
|
5844
|
-
|
|
5845
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5846
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5847
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
5811
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5848
5812
|
}, "strip", z.ZodTypeAny, {
|
|
5849
5813
|
name: string;
|
|
5850
|
-
|
|
5851
|
-
enabled?: boolean | undefined;
|
|
5852
|
-
order?: number | undefined;
|
|
5853
|
-
stage?: string | undefined;
|
|
5814
|
+
description?: string | undefined;
|
|
5854
5815
|
}, {
|
|
5855
5816
|
name: string;
|
|
5856
|
-
|
|
5857
|
-
enabled?: boolean | undefined;
|
|
5858
|
-
order?: number | undefined;
|
|
5859
|
-
stage?: string | undefined;
|
|
5817
|
+
description?: string | undefined;
|
|
5860
5818
|
}>;
|
|
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;
|
|
5869
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
5870
|
-
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;
|
|
5819
|
+
declare const roleSchema: z.ZodObject<{
|
|
5878
5820
|
created_at: z.ZodOptional<z.ZodString>;
|
|
5879
5821
|
updated_at: z.ZodOptional<z.ZodString>;
|
|
5880
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5881
5822
|
name: z.ZodString;
|
|
5882
|
-
|
|
5883
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5884
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5885
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
5823
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5886
5824
|
id: z.ZodString;
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5825
|
+
}, "strip", z.ZodTypeAny, {
|
|
5826
|
+
name: string;
|
|
5827
|
+
id: string;
|
|
5828
|
+
description?: string | undefined;
|
|
5829
|
+
created_at?: string | undefined;
|
|
5830
|
+
updated_at?: string | undefined;
|
|
5831
|
+
}, {
|
|
5832
|
+
name: string;
|
|
5833
|
+
id: string;
|
|
5834
|
+
description?: string | undefined;
|
|
5835
|
+
created_at?: string | undefined;
|
|
5836
|
+
updated_at?: string | undefined;
|
|
5837
|
+
}>;
|
|
5838
|
+
export type Role = z.infer<typeof roleSchema>;
|
|
5839
|
+
export type RoleInsert = z.infer<typeof roleInsertSchema>;
|
|
5891
5840
|
export interface ListCodesResponse extends Totals {
|
|
5892
5841
|
codes: Code[];
|
|
5893
5842
|
}
|
|
@@ -6050,25 +5999,29 @@ export interface ResourceServersAdapter {
|
|
|
6050
5999
|
update(tenant_id: string, id: string, resourceServer: Partial<ResourceServerInsert>): Promise<boolean>;
|
|
6051
6000
|
remove(tenant_id: string, id: string): Promise<boolean>;
|
|
6052
6001
|
}
|
|
6053
|
-
export interface
|
|
6054
|
-
|
|
6002
|
+
export interface RolePermissionsAdapter {
|
|
6003
|
+
assign(tenant_id: string, role_id: string, permissions: RolePermissionInsert[]): Promise<boolean>;
|
|
6004
|
+
remove(tenant_id: string, role_id: string, permissions: Pick<RolePermissionInsert, "resource_server_identifier" | "permission_name">[]): Promise<boolean>;
|
|
6005
|
+
list(tenant_id: string, role_id: string, params?: ListParams): Promise<RolePermissionWithDetailsList>;
|
|
6055
6006
|
}
|
|
6056
|
-
export interface
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
list(tenant_id: string, params?: ListParams): Promise<
|
|
6060
|
-
update(tenant_id: string, rule_id: string, rule: Partial<RuleInsert>): Promise<boolean>;
|
|
6061
|
-
remove(tenant_id: string, rule_id: string): Promise<boolean>;
|
|
6007
|
+
export interface UserPermissionsAdapter {
|
|
6008
|
+
assign(tenant_id: string, user_id: string, permissions: UserPermissionInsert[]): Promise<boolean>;
|
|
6009
|
+
remove(tenant_id: string, user_id: string, permissions: Pick<UserPermissionInsert, "resource_server_identifier" | "permission_name">[]): Promise<boolean>;
|
|
6010
|
+
list(tenant_id: string, user_id: string, params?: ListParams): Promise<UserPermissionWithDetailsList>;
|
|
6062
6011
|
}
|
|
6063
|
-
export interface
|
|
6064
|
-
|
|
6012
|
+
export interface ListRolesResponse {
|
|
6013
|
+
roles: Role[];
|
|
6014
|
+
totals?: Totals;
|
|
6015
|
+
start: number;
|
|
6016
|
+
limit: number;
|
|
6017
|
+
length: number;
|
|
6065
6018
|
}
|
|
6066
|
-
export interface
|
|
6067
|
-
create(
|
|
6068
|
-
get(
|
|
6069
|
-
list(
|
|
6070
|
-
update(
|
|
6071
|
-
remove(
|
|
6019
|
+
export interface RolesAdapter {
|
|
6020
|
+
create(tenantId: string, role: RoleInsert): Promise<Role>;
|
|
6021
|
+
get(tenantId: string, roleId: string): Promise<Role | null>;
|
|
6022
|
+
list(tenantId: string, params?: ListParams): Promise<ListRolesResponse>;
|
|
6023
|
+
update(tenantId: string, roleId: string, updates: Partial<Role>): Promise<boolean>;
|
|
6024
|
+
remove(tenantId: string, roleId: string): Promise<boolean>;
|
|
6072
6025
|
}
|
|
6073
6026
|
export interface DataAdapters {
|
|
6074
6027
|
applications: ApplicationsAdapter;
|
|
@@ -6087,8 +6040,9 @@ export interface DataAdapters {
|
|
|
6087
6040
|
promptSettings: PromptSettingsAdapter;
|
|
6088
6041
|
refreshTokens: RefreshTokensAdapter;
|
|
6089
6042
|
resourceServers: ResourceServersAdapter;
|
|
6090
|
-
|
|
6091
|
-
|
|
6043
|
+
rolePermissions: RolePermissionsAdapter;
|
|
6044
|
+
userPermissions: UserPermissionsAdapter;
|
|
6045
|
+
roles: RolesAdapter;
|
|
6092
6046
|
sessions: SessionsAdapter;
|
|
6093
6047
|
tenants: TenantsDataAdapter;
|
|
6094
6048
|
themes: ThemesAdapter;
|
|
@@ -6765,6 +6719,8 @@ declare const sqlResourceServerSchema: z.ZodObject<Omit<{
|
|
|
6765
6719
|
skip_consent_for_verifiable_first_party_clients: z.ZodOptional<z.ZodNumber>;
|
|
6766
6720
|
allow_offline_access: z.ZodOptional<z.ZodNumber>;
|
|
6767
6721
|
verification_key: z.ZodOptional<z.ZodString>;
|
|
6722
|
+
created_at: z.ZodString;
|
|
6723
|
+
updated_at: z.ZodString;
|
|
6768
6724
|
name: z.ZodString;
|
|
6769
6725
|
identifier: z.ZodString;
|
|
6770
6726
|
signing_alg: z.ZodOptional<z.ZodString>;
|
|
@@ -6777,6 +6733,8 @@ declare const sqlResourceServerSchema: z.ZodObject<Omit<{
|
|
|
6777
6733
|
options: string;
|
|
6778
6734
|
tenant_id: string;
|
|
6779
6735
|
name: string;
|
|
6736
|
+
created_at: string;
|
|
6737
|
+
updated_at: string;
|
|
6780
6738
|
scopes: string;
|
|
6781
6739
|
identifier: string;
|
|
6782
6740
|
id?: string | undefined;
|
|
@@ -6790,6 +6748,8 @@ declare const sqlResourceServerSchema: z.ZodObject<Omit<{
|
|
|
6790
6748
|
}, {
|
|
6791
6749
|
tenant_id: string;
|
|
6792
6750
|
name: string;
|
|
6751
|
+
created_at: string;
|
|
6752
|
+
updated_at: string;
|
|
6793
6753
|
identifier: string;
|
|
6794
6754
|
options?: string | undefined;
|
|
6795
6755
|
id?: string | undefined;
|
|
@@ -6802,61 +6762,65 @@ declare const sqlResourceServerSchema: z.ZodObject<Omit<{
|
|
|
6802
6762
|
token_lifetime?: number | undefined;
|
|
6803
6763
|
token_lifetime_for_web?: number | undefined;
|
|
6804
6764
|
}>;
|
|
6805
|
-
declare const
|
|
6765
|
+
declare const sqlRoleSchema: z.ZodObject<{
|
|
6806
6766
|
tenant_id: z.ZodString;
|
|
6807
|
-
|
|
6767
|
+
created_at: z.ZodString;
|
|
6768
|
+
updated_at: z.ZodString;
|
|
6808
6769
|
name: z.ZodString;
|
|
6809
|
-
|
|
6810
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
6811
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
6770
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6812
6771
|
id: z.ZodString;
|
|
6813
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
6814
|
-
updated_at: z.ZodOptional<z.ZodString>;
|
|
6815
6772
|
}, "strip", z.ZodTypeAny, {
|
|
6816
6773
|
tenant_id: string;
|
|
6817
6774
|
id: string;
|
|
6818
6775
|
name: string;
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
updated_at?: string | undefined;
|
|
6823
|
-
order?: number | undefined;
|
|
6824
|
-
stage?: string | undefined;
|
|
6776
|
+
created_at: string;
|
|
6777
|
+
updated_at: string;
|
|
6778
|
+
description?: string | undefined;
|
|
6825
6779
|
}, {
|
|
6826
6780
|
tenant_id: string;
|
|
6827
6781
|
id: string;
|
|
6828
6782
|
name: string;
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
updated_at?: string | undefined;
|
|
6833
|
-
order?: number | undefined;
|
|
6834
|
-
stage?: string | undefined;
|
|
6783
|
+
created_at: string;
|
|
6784
|
+
updated_at: string;
|
|
6785
|
+
description?: string | undefined;
|
|
6835
6786
|
}>;
|
|
6836
|
-
declare const
|
|
6787
|
+
declare const sqlRolePermissionSchema: z.ZodObject<{
|
|
6837
6788
|
tenant_id: z.ZodString;
|
|
6838
|
-
|
|
6839
|
-
permission_name: z.ZodString;
|
|
6840
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6789
|
+
role_id: z.ZodString;
|
|
6841
6790
|
resource_server_identifier: z.ZodString;
|
|
6842
|
-
|
|
6843
|
-
|
|
6791
|
+
permission_name: z.ZodString;
|
|
6792
|
+
created_at: z.ZodString;
|
|
6844
6793
|
}, "strip", z.ZodTypeAny, {
|
|
6845
6794
|
tenant_id: string;
|
|
6846
|
-
|
|
6847
|
-
|
|
6795
|
+
created_at: string;
|
|
6796
|
+
role_id: string;
|
|
6848
6797
|
resource_server_identifier: string;
|
|
6849
|
-
|
|
6850
|
-
description?: string | null | undefined;
|
|
6851
|
-
sources?: string | undefined;
|
|
6798
|
+
permission_name: string;
|
|
6852
6799
|
}, {
|
|
6853
6800
|
tenant_id: string;
|
|
6854
|
-
|
|
6801
|
+
created_at: string;
|
|
6802
|
+
role_id: string;
|
|
6803
|
+
resource_server_identifier: string;
|
|
6855
6804
|
permission_name: string;
|
|
6805
|
+
}>;
|
|
6806
|
+
declare const sqlUserPermissionSchema: z.ZodObject<{
|
|
6807
|
+
tenant_id: z.ZodString;
|
|
6808
|
+
user_id: z.ZodString;
|
|
6809
|
+
resource_server_identifier: z.ZodString;
|
|
6810
|
+
permission_name: z.ZodString;
|
|
6811
|
+
created_at: z.ZodString;
|
|
6812
|
+
}, "strip", z.ZodTypeAny, {
|
|
6813
|
+
tenant_id: string;
|
|
6814
|
+
created_at: string;
|
|
6815
|
+
user_id: string;
|
|
6856
6816
|
resource_server_identifier: string;
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6817
|
+
permission_name: string;
|
|
6818
|
+
}, {
|
|
6819
|
+
tenant_id: string;
|
|
6820
|
+
created_at: string;
|
|
6821
|
+
user_id: string;
|
|
6822
|
+
resource_server_identifier: string;
|
|
6823
|
+
permission_name: string;
|
|
6860
6824
|
}>;
|
|
6861
6825
|
export interface Database {
|
|
6862
6826
|
applications: z.infer<typeof sqlApplicationSchema>;
|
|
@@ -6884,8 +6848,9 @@ export interface Database {
|
|
|
6884
6848
|
tenants: Tenant;
|
|
6885
6849
|
themes: z.infer<typeof sqlThemeSchema>;
|
|
6886
6850
|
resource_servers: z.infer<typeof sqlResourceServerSchema>;
|
|
6887
|
-
|
|
6888
|
-
|
|
6851
|
+
role_permissions: z.infer<typeof sqlRolePermissionSchema>;
|
|
6852
|
+
user_permissions: z.infer<typeof sqlUserPermissionSchema>;
|
|
6853
|
+
roles: z.infer<typeof sqlRoleSchema>;
|
|
6889
6854
|
}
|
|
6890
6855
|
export declare function migrateToLatest(db: Kysely<Database>, debug?: boolean): Promise<void>;
|
|
6891
6856
|
export declare function migrateDown(db: Kysely<Database>): Promise<void>;
|