@authhero/kysely-adapter 10.29.0 → 10.31.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.
@@ -5503,6 +5503,391 @@ declare const refreshTokenSchema: z.ZodObject<{
5503
5503
  last_exchanged_at?: string | undefined;
5504
5504
  }>;
5505
5505
  export type RefreshToken = z.infer<typeof refreshTokenSchema>;
5506
+ declare const resourceServerInsertSchema: z.ZodObject<{
5507
+ name: z.ZodString;
5508
+ identifier: z.ZodString;
5509
+ scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5510
+ value: z.ZodString;
5511
+ description: z.ZodOptional<z.ZodString>;
5512
+ }, "strip", z.ZodTypeAny, {
5513
+ value: string;
5514
+ description?: string | undefined;
5515
+ }, {
5516
+ value: string;
5517
+ description?: string | undefined;
5518
+ }>, "many">>;
5519
+ signing_alg: z.ZodOptional<z.ZodString>;
5520
+ signing_secret: z.ZodOptional<z.ZodString>;
5521
+ token_lifetime: z.ZodOptional<z.ZodNumber>;
5522
+ token_lifetime_for_web: z.ZodOptional<z.ZodNumber>;
5523
+ skip_consent_for_verifiable_first_party_clients: z.ZodOptional<z.ZodBoolean>;
5524
+ allow_offline_access: z.ZodOptional<z.ZodBoolean>;
5525
+ verificationKey: z.ZodOptional<z.ZodString>;
5526
+ options: z.ZodOptional<z.ZodObject<{
5527
+ token_dialect: z.ZodOptional<z.ZodEnum<[
5528
+ "access_token",
5529
+ "access_token_authz"
5530
+ ]>>;
5531
+ enforce_policies: z.ZodOptional<z.ZodBoolean>;
5532
+ allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
5533
+ skip_userinfo: z.ZodOptional<z.ZodBoolean>;
5534
+ persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
5535
+ enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
5536
+ mtls: z.ZodOptional<z.ZodObject<{
5537
+ bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
5538
+ }, "strip", z.ZodTypeAny, {
5539
+ bound_access_tokens?: boolean | undefined;
5540
+ }, {
5541
+ bound_access_tokens?: boolean | undefined;
5542
+ }>>;
5543
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5544
+ token_dialect: z.ZodOptional<z.ZodEnum<[
5545
+ "access_token",
5546
+ "access_token_authz"
5547
+ ]>>;
5548
+ enforce_policies: z.ZodOptional<z.ZodBoolean>;
5549
+ allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
5550
+ skip_userinfo: z.ZodOptional<z.ZodBoolean>;
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, {
5573
+ bound_access_tokens?: boolean | undefined;
5574
+ }, {
5575
+ bound_access_tokens?: boolean | undefined;
5576
+ }>>;
5577
+ }, z.ZodTypeAny, "passthrough">>>;
5578
+ }, "strip", z.ZodTypeAny, {
5579
+ name: string;
5580
+ identifier: string;
5581
+ options?: z.objectOutputType<{
5582
+ token_dialect: z.ZodOptional<z.ZodEnum<[
5583
+ "access_token",
5584
+ "access_token_authz"
5585
+ ]>>;
5586
+ enforce_policies: z.ZodOptional<z.ZodBoolean>;
5587
+ allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
5588
+ skip_userinfo: z.ZodOptional<z.ZodBoolean>;
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
+ }, {
5596
+ bound_access_tokens?: boolean | undefined;
5597
+ }>>;
5598
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5599
+ scopes?: {
5600
+ value: string;
5601
+ description?: string | undefined;
5602
+ }[] | undefined;
5603
+ signing_alg?: string | undefined;
5604
+ signing_secret?: string | undefined;
5605
+ token_lifetime?: number | undefined;
5606
+ token_lifetime_for_web?: number | undefined;
5607
+ skip_consent_for_verifiable_first_party_clients?: boolean | undefined;
5608
+ allow_offline_access?: boolean | undefined;
5609
+ verificationKey?: string | undefined;
5610
+ }, {
5611
+ name: string;
5612
+ identifier: string;
5613
+ options?: z.objectInputType<{
5614
+ token_dialect: z.ZodOptional<z.ZodEnum<[
5615
+ "access_token",
5616
+ "access_token_authz"
5617
+ ]>>;
5618
+ enforce_policies: z.ZodOptional<z.ZodBoolean>;
5619
+ allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
5620
+ skip_userinfo: z.ZodOptional<z.ZodBoolean>;
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
+ }, {
5628
+ bound_access_tokens?: boolean | undefined;
5629
+ }>>;
5630
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5631
+ scopes?: {
5632
+ value: string;
5633
+ description?: string | undefined;
5634
+ }[] | undefined;
5635
+ signing_alg?: string | undefined;
5636
+ signing_secret?: string | undefined;
5637
+ token_lifetime?: number | undefined;
5638
+ token_lifetime_for_web?: number | undefined;
5639
+ skip_consent_for_verifiable_first_party_clients?: boolean | undefined;
5640
+ allow_offline_access?: boolean | undefined;
5641
+ verificationKey?: string | undefined;
5642
+ }>;
5643
+ export type ResourceServerInsert = z.input<typeof resourceServerInsertSchema>;
5644
+ declare const resourceServerSchema: z.ZodObject<{
5645
+ name: z.ZodString;
5646
+ identifier: z.ZodString;
5647
+ scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5648
+ value: z.ZodString;
5649
+ description: z.ZodOptional<z.ZodString>;
5650
+ }, "strip", z.ZodTypeAny, {
5651
+ value: string;
5652
+ description?: string | undefined;
5653
+ }, {
5654
+ value: string;
5655
+ description?: string | undefined;
5656
+ }>, "many">>;
5657
+ signing_alg: z.ZodOptional<z.ZodString>;
5658
+ signing_secret: z.ZodOptional<z.ZodString>;
5659
+ token_lifetime: z.ZodOptional<z.ZodNumber>;
5660
+ token_lifetime_for_web: z.ZodOptional<z.ZodNumber>;
5661
+ skip_consent_for_verifiable_first_party_clients: z.ZodOptional<z.ZodBoolean>;
5662
+ allow_offline_access: z.ZodOptional<z.ZodBoolean>;
5663
+ verificationKey: z.ZodOptional<z.ZodString>;
5664
+ options: z.ZodOptional<z.ZodObject<{
5665
+ token_dialect: z.ZodOptional<z.ZodEnum<[
5666
+ "access_token",
5667
+ "access_token_authz"
5668
+ ]>>;
5669
+ enforce_policies: z.ZodOptional<z.ZodBoolean>;
5670
+ allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
5671
+ skip_userinfo: z.ZodOptional<z.ZodBoolean>;
5672
+ persist_client_authorization: z.ZodOptional<z.ZodBoolean>;
5673
+ enable_introspection_endpoint: z.ZodOptional<z.ZodBoolean>;
5674
+ mtls: z.ZodOptional<z.ZodObject<{
5675
+ bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
5676
+ }, "strip", z.ZodTypeAny, {
5677
+ bound_access_tokens?: boolean | undefined;
5678
+ }, {
5679
+ bound_access_tokens?: boolean | undefined;
5680
+ }>>;
5681
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5682
+ token_dialect: z.ZodOptional<z.ZodEnum<[
5683
+ "access_token",
5684
+ "access_token_authz"
5685
+ ]>>;
5686
+ enforce_policies: z.ZodOptional<z.ZodBoolean>;
5687
+ allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
5688
+ skip_userinfo: z.ZodOptional<z.ZodBoolean>;
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, {
5711
+ bound_access_tokens?: boolean | undefined;
5712
+ }, {
5713
+ bound_access_tokens?: boolean | undefined;
5714
+ }>>;
5715
+ }, z.ZodTypeAny, "passthrough">>>;
5716
+ id: z.ZodOptional<z.ZodString>;
5717
+ }, "strip", z.ZodTypeAny, {
5718
+ name: string;
5719
+ identifier: string;
5720
+ options?: z.objectOutputType<{
5721
+ token_dialect: z.ZodOptional<z.ZodEnum<[
5722
+ "access_token",
5723
+ "access_token_authz"
5724
+ ]>>;
5725
+ enforce_policies: z.ZodOptional<z.ZodBoolean>;
5726
+ allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
5727
+ skip_userinfo: z.ZodOptional<z.ZodBoolean>;
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
+ }, {
5735
+ bound_access_tokens?: boolean | undefined;
5736
+ }>>;
5737
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5738
+ id?: string | undefined;
5739
+ scopes?: {
5740
+ value: string;
5741
+ description?: string | undefined;
5742
+ }[] | undefined;
5743
+ signing_alg?: string | undefined;
5744
+ signing_secret?: string | undefined;
5745
+ token_lifetime?: number | undefined;
5746
+ token_lifetime_for_web?: number | undefined;
5747
+ skip_consent_for_verifiable_first_party_clients?: boolean | undefined;
5748
+ allow_offline_access?: boolean | undefined;
5749
+ verificationKey?: string | undefined;
5750
+ }, {
5751
+ name: string;
5752
+ identifier: string;
5753
+ options?: z.objectInputType<{
5754
+ token_dialect: z.ZodOptional<z.ZodEnum<[
5755
+ "access_token",
5756
+ "access_token_authz"
5757
+ ]>>;
5758
+ enforce_policies: z.ZodOptional<z.ZodBoolean>;
5759
+ allow_skipping_userinfo: z.ZodOptional<z.ZodBoolean>;
5760
+ skip_userinfo: z.ZodOptional<z.ZodBoolean>;
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
+ }, {
5768
+ bound_access_tokens?: boolean | undefined;
5769
+ }>>;
5770
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5771
+ id?: string | undefined;
5772
+ scopes?: {
5773
+ value: string;
5774
+ description?: string | undefined;
5775
+ }[] | undefined;
5776
+ signing_alg?: string | undefined;
5777
+ signing_secret?: string | undefined;
5778
+ token_lifetime?: number | undefined;
5779
+ token_lifetime_for_web?: number | undefined;
5780
+ skip_consent_for_verifiable_first_party_clients?: boolean | undefined;
5781
+ allow_offline_access?: boolean | undefined;
5782
+ verificationKey?: string | undefined;
5783
+ }>;
5784
+ export type ResourceServer = z.infer<typeof resourceServerSchema>;
5785
+ declare const permissionSchema: z.ZodObject<{
5786
+ permission_name: z.ZodString;
5787
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5788
+ resource_server_identifier: z.ZodString;
5789
+ 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
+ permission_name: z.ZodString;
5805
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5806
+ 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
+ permission_name: z.ZodString;
5823
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5824
+ resource_server_identifier: z.ZodString;
5825
+ resource_server_name: z.ZodString;
5826
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
5827
+ source_id: z.ZodOptional<z.ZodString>;
5828
+ source_name: z.ZodOptional<z.ZodString>;
5829
+ source_type: z.ZodOptional<z.ZodString>;
5830
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5831
+ source_id: z.ZodOptional<z.ZodString>;
5832
+ source_name: z.ZodOptional<z.ZodString>;
5833
+ source_type: z.ZodOptional<z.ZodString>;
5834
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5835
+ source_id: z.ZodOptional<z.ZodString>;
5836
+ source_name: z.ZodOptional<z.ZodString>;
5837
+ source_type: z.ZodOptional<z.ZodString>;
5838
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
5839
+ }, z.ZodTypeAny, "passthrough">>;
5840
+ export type Permission = z.infer<typeof permissionSchema>;
5841
+ export type PermissionInsert = z.input<typeof permissionSchema>;
5842
+ declare const ruleInsertSchema: z.ZodObject<{
5843
+ name: z.ZodString;
5844
+ script: z.ZodString;
5845
+ order: z.ZodOptional<z.ZodNumber>;
5846
+ enabled: z.ZodOptional<z.ZodBoolean>;
5847
+ stage: z.ZodOptional<z.ZodString>;
5848
+ }, "strip", z.ZodTypeAny, {
5849
+ name: string;
5850
+ script: string;
5851
+ enabled?: boolean | undefined;
5852
+ order?: number | undefined;
5853
+ stage?: string | undefined;
5854
+ }, {
5855
+ name: string;
5856
+ script: string;
5857
+ enabled?: boolean | undefined;
5858
+ order?: number | undefined;
5859
+ stage?: string | undefined;
5860
+ }>;
5861
+ export type RuleInsert = z.input<typeof ruleInsertSchema>;
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;
5878
+ created_at: z.ZodOptional<z.ZodString>;
5879
+ updated_at: z.ZodOptional<z.ZodString>;
5880
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5881
+ name: z.ZodString;
5882
+ script: z.ZodString;
5883
+ order: z.ZodOptional<z.ZodNumber>;
5884
+ enabled: z.ZodOptional<z.ZodBoolean>;
5885
+ stage: z.ZodOptional<z.ZodString>;
5886
+ id: z.ZodString;
5887
+ created_at: z.ZodOptional<z.ZodString>;
5888
+ updated_at: z.ZodOptional<z.ZodString>;
5889
+ }, z.ZodTypeAny, "passthrough">>;
5890
+ export type Rule = z.infer<typeof ruleSchema>;
5506
5891
  export interface ListCodesResponse extends Totals {
5507
5892
  codes: Code[];
5508
5893
  }
@@ -5655,6 +6040,36 @@ export interface FormsAdapter {
5655
6040
  update(tenant_id: string, form_id: string, form: Partial<FormInsert>): Promise<boolean>;
5656
6041
  list(tenant_id: string, params?: ListParams): Promise<ListFormsResponse>;
5657
6042
  }
6043
+ export interface ListResourceServersResponse extends Totals {
6044
+ resource_servers: ResourceServer[];
6045
+ }
6046
+ export interface ResourceServersAdapter {
6047
+ create(tenant_id: string, params: ResourceServerInsert): Promise<ResourceServer>;
6048
+ get(tenant_id: string, id: string): Promise<ResourceServer | null>;
6049
+ list(tenant_id: string, params?: ListParams): Promise<ListResourceServersResponse>;
6050
+ update(tenant_id: string, id: string, resourceServer: Partial<ResourceServerInsert>): Promise<boolean>;
6051
+ remove(tenant_id: string, id: string): Promise<boolean>;
6052
+ }
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
+ export interface ListPermissionsResponse extends Totals {
6064
+ permissions: Permission[];
6065
+ }
6066
+ export interface PermissionsAdapter {
6067
+ create(tenant_id: string, permission: PermissionInsert): Promise<Permission>;
6068
+ get(tenant_id: string, permission_id: string): Promise<Permission | null>;
6069
+ list(tenant_id: string, params?: ListParams): Promise<ListPermissionsResponse>;
6070
+ update(tenant_id: string, permission_id: string, permission: Partial<PermissionInsert>): Promise<boolean>;
6071
+ remove(tenant_id: string, permission_id: string): Promise<boolean>;
6072
+ }
5658
6073
  export interface DataAdapters {
5659
6074
  applications: ApplicationsAdapter;
5660
6075
  branding: BrandingAdapter;
@@ -5671,6 +6086,9 @@ export interface DataAdapters {
5671
6086
  passwords: PasswordsAdapter;
5672
6087
  promptSettings: PromptSettingsAdapter;
5673
6088
  refreshTokens: RefreshTokensAdapter;
6089
+ resourceServers: ResourceServersAdapter;
6090
+ rules: RulesAdapter;
6091
+ permissions: PermissionsAdapter;
5674
6092
  sessions: SessionsAdapter;
5675
6093
  tenants: TenantsDataAdapter;
5676
6094
  themes: ThemesAdapter;
@@ -6340,6 +6758,105 @@ declare const sqlFormSchema: z.ZodObject<{
6340
6758
  css?: string | undefined;
6341
6759
  } | undefined;
6342
6760
  }>;
6761
+ declare const sqlResourceServerSchema: z.ZodObject<{
6762
+ tenant_id: z.ZodString;
6763
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6764
+ options: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6765
+ skip_consent_for_verifiable_first_party_clients: z.ZodOptional<z.ZodNumber>;
6766
+ allow_offline_access: z.ZodOptional<z.ZodNumber>;
6767
+ name: z.ZodString;
6768
+ identifier: z.ZodString;
6769
+ signing_alg: z.ZodOptional<z.ZodString>;
6770
+ signing_secret: z.ZodOptional<z.ZodString>;
6771
+ token_lifetime: z.ZodOptional<z.ZodNumber>;
6772
+ token_lifetime_for_web: z.ZodOptional<z.ZodNumber>;
6773
+ verificationKey: z.ZodOptional<z.ZodString>;
6774
+ id: z.ZodOptional<z.ZodString>;
6775
+ }, "strip", z.ZodTypeAny, {
6776
+ options: string;
6777
+ tenant_id: string;
6778
+ name: string;
6779
+ scopes: string;
6780
+ identifier: string;
6781
+ id?: string | undefined;
6782
+ skip_consent_for_verifiable_first_party_clients?: number | undefined;
6783
+ allow_offline_access?: number | undefined;
6784
+ signing_alg?: string | undefined;
6785
+ signing_secret?: string | undefined;
6786
+ token_lifetime?: number | undefined;
6787
+ token_lifetime_for_web?: number | undefined;
6788
+ verificationKey?: string | undefined;
6789
+ }, {
6790
+ tenant_id: string;
6791
+ name: string;
6792
+ identifier: string;
6793
+ options?: string | undefined;
6794
+ id?: string | undefined;
6795
+ scopes?: string | undefined;
6796
+ skip_consent_for_verifiable_first_party_clients?: number | undefined;
6797
+ allow_offline_access?: number | undefined;
6798
+ signing_alg?: string | undefined;
6799
+ signing_secret?: string | undefined;
6800
+ token_lifetime?: number | undefined;
6801
+ token_lifetime_for_web?: number | undefined;
6802
+ verificationKey?: string | undefined;
6803
+ }>;
6804
+ declare const sqlRuleSchema: z.ZodObject<{
6805
+ tenant_id: z.ZodString;
6806
+ enabled: z.ZodOptional<z.ZodNumber>;
6807
+ name: z.ZodString;
6808
+ script: z.ZodString;
6809
+ order: z.ZodOptional<z.ZodNumber>;
6810
+ stage: z.ZodOptional<z.ZodString>;
6811
+ id: z.ZodString;
6812
+ created_at: z.ZodOptional<z.ZodString>;
6813
+ updated_at: z.ZodOptional<z.ZodString>;
6814
+ }, "strip", z.ZodTypeAny, {
6815
+ tenant_id: string;
6816
+ id: string;
6817
+ name: string;
6818
+ script: string;
6819
+ enabled?: number | undefined;
6820
+ created_at?: string | undefined;
6821
+ updated_at?: string | undefined;
6822
+ order?: number | undefined;
6823
+ stage?: string | undefined;
6824
+ }, {
6825
+ tenant_id: string;
6826
+ id: string;
6827
+ name: string;
6828
+ script: string;
6829
+ enabled?: number | undefined;
6830
+ created_at?: string | undefined;
6831
+ updated_at?: string | undefined;
6832
+ order?: number | undefined;
6833
+ stage?: string | undefined;
6834
+ }>;
6835
+ declare const sqlPermissionSchema: z.ZodObject<{
6836
+ tenant_id: z.ZodString;
6837
+ sources: z.ZodOptional<z.ZodString>;
6838
+ permission_name: z.ZodString;
6839
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6840
+ resource_server_identifier: z.ZodString;
6841
+ resource_server_name: z.ZodString;
6842
+ id: z.ZodString;
6843
+ }, "strip", z.ZodTypeAny, {
6844
+ tenant_id: string;
6845
+ id: string;
6846
+ permission_name: string;
6847
+ resource_server_identifier: string;
6848
+ resource_server_name: string;
6849
+ description?: string | null | undefined;
6850
+ sources?: string | undefined;
6851
+ }, {
6852
+ tenant_id: string;
6853
+ id: string;
6854
+ permission_name: string;
6855
+ resource_server_identifier: string;
6856
+ resource_server_name: string;
6857
+ description?: string | null | undefined;
6858
+ sources?: string | undefined;
6859
+ }>;
6343
6860
  export interface Database {
6344
6861
  applications: z.infer<typeof sqlApplicationSchema>;
6345
6862
  branding: z.infer<typeof sqlBrandingSchema>;
@@ -6365,6 +6882,9 @@ export interface Database {
6365
6882
  sessions: z.infer<typeof sqlSessionSchema>;
6366
6883
  tenants: Tenant;
6367
6884
  themes: z.infer<typeof sqlThemeSchema>;
6885
+ resource_servers: z.infer<typeof sqlResourceServerSchema>;
6886
+ rules: z.infer<typeof sqlRuleSchema>;
6887
+ permissions: z.infer<typeof sqlPermissionSchema>;
6368
6888
  }
6369
6889
  export declare function migrateToLatest(db: Kysely<Database>, debug?: boolean): Promise<void>;
6370
6890
  export declare function migrateDown(db: Kysely<Database>): Promise<void>;