authhero 0.53.0 → 0.55.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/authhero.cjs +29 -29
- package/dist/authhero.d.ts +233 -31
- package/dist/authhero.mjs +2768 -2637
- package/package.json +3 -3
package/dist/authhero.d.ts
CHANGED
|
@@ -2711,52 +2711,155 @@ export declare const passwordSchema: z.ZodObject<{
|
|
|
2711
2711
|
}>;
|
|
2712
2712
|
export type Password = z.infer<typeof passwordSchema>;
|
|
2713
2713
|
export declare const sessionInsertSchema: z.ZodObject<{
|
|
2714
|
-
|
|
2714
|
+
id: z.ZodString;
|
|
2715
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
2715
2716
|
client_id: z.ZodString;
|
|
2716
|
-
|
|
2717
|
+
revoked_at: z.ZodOptional<z.ZodString>;
|
|
2717
2718
|
used_at: z.ZodString;
|
|
2718
|
-
deleted_at: z.ZodOptional<z.ZodString>;
|
|
2719
2719
|
user_id: z.ZodString;
|
|
2720
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
2721
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
2722
|
+
device: z.ZodObject<{
|
|
2723
|
+
initial_user_agent: z.ZodString;
|
|
2724
|
+
initial_ip: z.ZodString;
|
|
2725
|
+
initial_asn: z.ZodString;
|
|
2726
|
+
last_user_agent: z.ZodString;
|
|
2727
|
+
last_ip: z.ZodString;
|
|
2728
|
+
last_asn: z.ZodString;
|
|
2729
|
+
}, "strip", z.ZodTypeAny, {
|
|
2730
|
+
last_ip: string;
|
|
2731
|
+
initial_user_agent: string;
|
|
2732
|
+
initial_ip: string;
|
|
2733
|
+
initial_asn: string;
|
|
2734
|
+
last_user_agent: string;
|
|
2735
|
+
last_asn: string;
|
|
2736
|
+
}, {
|
|
2737
|
+
last_ip: string;
|
|
2738
|
+
initial_user_agent: string;
|
|
2739
|
+
initial_ip: string;
|
|
2740
|
+
initial_asn: string;
|
|
2741
|
+
last_user_agent: string;
|
|
2742
|
+
last_asn: string;
|
|
2743
|
+
}>;
|
|
2744
|
+
clients: z.ZodArray<z.ZodString, "many">;
|
|
2720
2745
|
}, "strip", z.ZodTypeAny, {
|
|
2721
2746
|
user_id: string;
|
|
2747
|
+
id: string;
|
|
2722
2748
|
client_id: string;
|
|
2723
|
-
expires_at: string;
|
|
2724
2749
|
used_at: string;
|
|
2725
|
-
|
|
2726
|
-
|
|
2750
|
+
device: {
|
|
2751
|
+
last_ip: string;
|
|
2752
|
+
initial_user_agent: string;
|
|
2753
|
+
initial_ip: string;
|
|
2754
|
+
initial_asn: string;
|
|
2755
|
+
last_user_agent: string;
|
|
2756
|
+
last_asn: string;
|
|
2757
|
+
};
|
|
2758
|
+
clients: string[];
|
|
2759
|
+
expires_at?: string | undefined;
|
|
2760
|
+
session_id?: string | undefined;
|
|
2761
|
+
revoked_at?: string | undefined;
|
|
2762
|
+
idle_expires_at?: string | undefined;
|
|
2727
2763
|
}, {
|
|
2728
2764
|
user_id: string;
|
|
2765
|
+
id: string;
|
|
2729
2766
|
client_id: string;
|
|
2730
|
-
expires_at: string;
|
|
2731
2767
|
used_at: string;
|
|
2732
|
-
|
|
2733
|
-
|
|
2768
|
+
device: {
|
|
2769
|
+
last_ip: string;
|
|
2770
|
+
initial_user_agent: string;
|
|
2771
|
+
initial_ip: string;
|
|
2772
|
+
initial_asn: string;
|
|
2773
|
+
last_user_agent: string;
|
|
2774
|
+
last_asn: string;
|
|
2775
|
+
};
|
|
2776
|
+
clients: string[];
|
|
2777
|
+
expires_at?: string | undefined;
|
|
2778
|
+
session_id?: string | undefined;
|
|
2779
|
+
revoked_at?: string | undefined;
|
|
2780
|
+
idle_expires_at?: string | undefined;
|
|
2734
2781
|
}>;
|
|
2735
2782
|
export type SessionInsert = z.infer<typeof sessionInsertSchema>;
|
|
2736
2783
|
export declare const sessionSchema: z.ZodObject<{
|
|
2737
|
-
|
|
2784
|
+
id: z.ZodString;
|
|
2785
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
2738
2786
|
client_id: z.ZodString;
|
|
2739
|
-
|
|
2787
|
+
revoked_at: z.ZodOptional<z.ZodString>;
|
|
2740
2788
|
used_at: z.ZodString;
|
|
2741
|
-
deleted_at: z.ZodOptional<z.ZodString>;
|
|
2742
2789
|
user_id: z.ZodString;
|
|
2790
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
2791
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
2792
|
+
device: z.ZodObject<{
|
|
2793
|
+
initial_user_agent: z.ZodString;
|
|
2794
|
+
initial_ip: z.ZodString;
|
|
2795
|
+
initial_asn: z.ZodString;
|
|
2796
|
+
last_user_agent: z.ZodString;
|
|
2797
|
+
last_ip: z.ZodString;
|
|
2798
|
+
last_asn: z.ZodString;
|
|
2799
|
+
}, "strip", z.ZodTypeAny, {
|
|
2800
|
+
last_ip: string;
|
|
2801
|
+
initial_user_agent: string;
|
|
2802
|
+
initial_ip: string;
|
|
2803
|
+
initial_asn: string;
|
|
2804
|
+
last_user_agent: string;
|
|
2805
|
+
last_asn: string;
|
|
2806
|
+
}, {
|
|
2807
|
+
last_ip: string;
|
|
2808
|
+
initial_user_agent: string;
|
|
2809
|
+
initial_ip: string;
|
|
2810
|
+
initial_asn: string;
|
|
2811
|
+
last_user_agent: string;
|
|
2812
|
+
last_asn: string;
|
|
2813
|
+
}>;
|
|
2814
|
+
clients: z.ZodArray<z.ZodString, "many">;
|
|
2743
2815
|
created_at: z.ZodString;
|
|
2816
|
+
updated_at: z.ZodString;
|
|
2817
|
+
authenticated_at: z.ZodString;
|
|
2818
|
+
last_interaction_at: z.ZodString;
|
|
2744
2819
|
}, "strip", z.ZodTypeAny, {
|
|
2745
2820
|
created_at: string;
|
|
2821
|
+
updated_at: string;
|
|
2746
2822
|
user_id: string;
|
|
2823
|
+
id: string;
|
|
2747
2824
|
client_id: string;
|
|
2748
|
-
expires_at: string;
|
|
2749
2825
|
used_at: string;
|
|
2750
|
-
|
|
2751
|
-
|
|
2826
|
+
device: {
|
|
2827
|
+
last_ip: string;
|
|
2828
|
+
initial_user_agent: string;
|
|
2829
|
+
initial_ip: string;
|
|
2830
|
+
initial_asn: string;
|
|
2831
|
+
last_user_agent: string;
|
|
2832
|
+
last_asn: string;
|
|
2833
|
+
};
|
|
2834
|
+
clients: string[];
|
|
2835
|
+
authenticated_at: string;
|
|
2836
|
+
last_interaction_at: string;
|
|
2837
|
+
expires_at?: string | undefined;
|
|
2838
|
+
session_id?: string | undefined;
|
|
2839
|
+
revoked_at?: string | undefined;
|
|
2840
|
+
idle_expires_at?: string | undefined;
|
|
2752
2841
|
}, {
|
|
2753
2842
|
created_at: string;
|
|
2843
|
+
updated_at: string;
|
|
2754
2844
|
user_id: string;
|
|
2845
|
+
id: string;
|
|
2755
2846
|
client_id: string;
|
|
2756
|
-
expires_at: string;
|
|
2757
2847
|
used_at: string;
|
|
2758
|
-
|
|
2759
|
-
|
|
2848
|
+
device: {
|
|
2849
|
+
last_ip: string;
|
|
2850
|
+
initial_user_agent: string;
|
|
2851
|
+
initial_ip: string;
|
|
2852
|
+
initial_asn: string;
|
|
2853
|
+
last_user_agent: string;
|
|
2854
|
+
last_asn: string;
|
|
2855
|
+
};
|
|
2856
|
+
clients: string[];
|
|
2857
|
+
authenticated_at: string;
|
|
2858
|
+
last_interaction_at: string;
|
|
2859
|
+
expires_at?: string | undefined;
|
|
2860
|
+
session_id?: string | undefined;
|
|
2861
|
+
revoked_at?: string | undefined;
|
|
2862
|
+
idle_expires_at?: string | undefined;
|
|
2760
2863
|
}>;
|
|
2761
2864
|
export type Session = z.infer<typeof sessionSchema>;
|
|
2762
2865
|
export declare const signingKeySchema: z.ZodObject<{
|
|
@@ -2777,6 +2880,7 @@ export declare const signingKeySchema: z.ZodObject<{
|
|
|
2777
2880
|
cert: string;
|
|
2778
2881
|
fingerprint: string;
|
|
2779
2882
|
thumbprint: string;
|
|
2883
|
+
revoked_at?: string | undefined;
|
|
2780
2884
|
pkcs7?: string | undefined;
|
|
2781
2885
|
current?: boolean | undefined;
|
|
2782
2886
|
next?: boolean | undefined;
|
|
@@ -2784,12 +2888,12 @@ export declare const signingKeySchema: z.ZodObject<{
|
|
|
2784
2888
|
current_since?: string | undefined;
|
|
2785
2889
|
current_until?: string | undefined;
|
|
2786
2890
|
revoked?: boolean | undefined;
|
|
2787
|
-
revoked_at?: string | undefined;
|
|
2788
2891
|
}, {
|
|
2789
2892
|
kid: string;
|
|
2790
2893
|
cert: string;
|
|
2791
2894
|
fingerprint: string;
|
|
2792
2895
|
thumbprint: string;
|
|
2896
|
+
revoked_at?: string | undefined;
|
|
2793
2897
|
pkcs7?: string | undefined;
|
|
2794
2898
|
current?: boolean | undefined;
|
|
2795
2899
|
next?: boolean | undefined;
|
|
@@ -2797,7 +2901,6 @@ export declare const signingKeySchema: z.ZodObject<{
|
|
|
2797
2901
|
current_since?: string | undefined;
|
|
2798
2902
|
current_until?: string | undefined;
|
|
2799
2903
|
revoked?: boolean | undefined;
|
|
2800
|
-
revoked_at?: string | undefined;
|
|
2801
2904
|
}>;
|
|
2802
2905
|
export type SigningKey = z.infer<typeof signingKeySchema>;
|
|
2803
2906
|
export declare const tenantInsertSchema: z.ZodObject<{
|
|
@@ -4312,9 +4415,7 @@ export interface SessionsAdapter {
|
|
|
4312
4415
|
create: (tenant_id: string, session: SessionInsert) => Promise<Session>;
|
|
4313
4416
|
get: (tenant_id: string, id: string) => Promise<Session | null>;
|
|
4314
4417
|
list(tenantId: string, params?: ListParams): Promise<ListSesssionsResponse>;
|
|
4315
|
-
update: (tenant_id: string, id: string, session:
|
|
4316
|
-
used_at: string;
|
|
4317
|
-
}) => Promise<boolean>;
|
|
4418
|
+
update: (tenant_id: string, id: string, session: Partial<Session>) => Promise<boolean>;
|
|
4318
4419
|
remove: (tenant_id: string, id: string) => Promise<boolean>;
|
|
4319
4420
|
}
|
|
4320
4421
|
export interface CreateTenantParams {
|
|
@@ -4549,6 +4650,79 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
4549
4650
|
Bindings: Bindings;
|
|
4550
4651
|
Variables: Variables;
|
|
4551
4652
|
}, import("hono/types").MergeSchemaPath<{
|
|
4653
|
+
"/:id": {
|
|
4654
|
+
$get: {
|
|
4655
|
+
input: {
|
|
4656
|
+
param: {
|
|
4657
|
+
id: string;
|
|
4658
|
+
};
|
|
4659
|
+
} & {
|
|
4660
|
+
header: {
|
|
4661
|
+
"tenant-id": string;
|
|
4662
|
+
};
|
|
4663
|
+
};
|
|
4664
|
+
output: {
|
|
4665
|
+
created_at: string;
|
|
4666
|
+
updated_at: string;
|
|
4667
|
+
user_id: string;
|
|
4668
|
+
id: string;
|
|
4669
|
+
client_id: string;
|
|
4670
|
+
used_at: string;
|
|
4671
|
+
device: {
|
|
4672
|
+
last_ip: string;
|
|
4673
|
+
initial_user_agent: string;
|
|
4674
|
+
initial_ip: string;
|
|
4675
|
+
initial_asn: string;
|
|
4676
|
+
last_user_agent: string;
|
|
4677
|
+
last_asn: string;
|
|
4678
|
+
};
|
|
4679
|
+
clients: string[];
|
|
4680
|
+
authenticated_at: string;
|
|
4681
|
+
last_interaction_at: string;
|
|
4682
|
+
expires_at?: string | undefined;
|
|
4683
|
+
session_id?: string | undefined;
|
|
4684
|
+
revoked_at?: string | undefined;
|
|
4685
|
+
idle_expires_at?: string | undefined;
|
|
4686
|
+
};
|
|
4687
|
+
outputFormat: "json" | "text";
|
|
4688
|
+
status: 200;
|
|
4689
|
+
};
|
|
4690
|
+
};
|
|
4691
|
+
} & {
|
|
4692
|
+
"/:id": {
|
|
4693
|
+
$delete: {
|
|
4694
|
+
input: {
|
|
4695
|
+
param: {
|
|
4696
|
+
id: string;
|
|
4697
|
+
};
|
|
4698
|
+
} & {
|
|
4699
|
+
header: {
|
|
4700
|
+
"tenant-id": string;
|
|
4701
|
+
};
|
|
4702
|
+
};
|
|
4703
|
+
output: {};
|
|
4704
|
+
outputFormat: string;
|
|
4705
|
+
status: 200;
|
|
4706
|
+
};
|
|
4707
|
+
};
|
|
4708
|
+
} & {
|
|
4709
|
+
"/:id/revoke": {
|
|
4710
|
+
$post: {
|
|
4711
|
+
input: {
|
|
4712
|
+
param: {
|
|
4713
|
+
id: string;
|
|
4714
|
+
};
|
|
4715
|
+
} & {
|
|
4716
|
+
header: {
|
|
4717
|
+
"tenant-id": string;
|
|
4718
|
+
};
|
|
4719
|
+
};
|
|
4720
|
+
output: {};
|
|
4721
|
+
outputFormat: string;
|
|
4722
|
+
status: 202;
|
|
4723
|
+
};
|
|
4724
|
+
};
|
|
4725
|
+
}, "/sessions"> & import("hono/types").MergeSchemaPath<{
|
|
4552
4726
|
"/": {
|
|
4553
4727
|
$get: {
|
|
4554
4728
|
input: {
|
|
@@ -5598,6 +5772,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5598
5772
|
cert: string;
|
|
5599
5773
|
fingerprint: string;
|
|
5600
5774
|
thumbprint: string;
|
|
5775
|
+
revoked_at?: string | undefined;
|
|
5601
5776
|
pkcs7?: string | undefined;
|
|
5602
5777
|
current?: boolean | undefined;
|
|
5603
5778
|
next?: boolean | undefined;
|
|
@@ -5605,7 +5780,6 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5605
5780
|
current_since?: string | undefined;
|
|
5606
5781
|
current_until?: string | undefined;
|
|
5607
5782
|
revoked?: boolean | undefined;
|
|
5608
|
-
revoked_at?: string | undefined;
|
|
5609
5783
|
}[];
|
|
5610
5784
|
outputFormat: "json" | "text";
|
|
5611
5785
|
status: 200;
|
|
@@ -5628,6 +5802,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5628
5802
|
cert: string;
|
|
5629
5803
|
fingerprint: string;
|
|
5630
5804
|
thumbprint: string;
|
|
5805
|
+
revoked_at?: string | undefined;
|
|
5631
5806
|
pkcs7?: string | undefined;
|
|
5632
5807
|
current?: boolean | undefined;
|
|
5633
5808
|
next?: boolean | undefined;
|
|
@@ -5635,7 +5810,6 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5635
5810
|
current_since?: string | undefined;
|
|
5636
5811
|
current_until?: string | undefined;
|
|
5637
5812
|
revoked?: boolean | undefined;
|
|
5638
|
-
revoked_at?: string | undefined;
|
|
5639
5813
|
};
|
|
5640
5814
|
outputFormat: "json" | "text";
|
|
5641
5815
|
status: 200;
|
|
@@ -6099,24 +6273,52 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
6099
6273
|
};
|
|
6100
6274
|
output: {
|
|
6101
6275
|
created_at: string;
|
|
6276
|
+
updated_at: string;
|
|
6102
6277
|
user_id: string;
|
|
6278
|
+
id: string;
|
|
6103
6279
|
client_id: string;
|
|
6104
|
-
expires_at: string;
|
|
6105
6280
|
used_at: string;
|
|
6106
|
-
|
|
6107
|
-
|
|
6281
|
+
device: {
|
|
6282
|
+
last_ip: string;
|
|
6283
|
+
initial_user_agent: string;
|
|
6284
|
+
initial_ip: string;
|
|
6285
|
+
initial_asn: string;
|
|
6286
|
+
last_user_agent: string;
|
|
6287
|
+
last_asn: string;
|
|
6288
|
+
};
|
|
6289
|
+
clients: string[];
|
|
6290
|
+
authenticated_at: string;
|
|
6291
|
+
last_interaction_at: string;
|
|
6292
|
+
expires_at?: string | undefined;
|
|
6293
|
+
session_id?: string | undefined;
|
|
6294
|
+
revoked_at?: string | undefined;
|
|
6295
|
+
idle_expires_at?: string | undefined;
|
|
6108
6296
|
}[] | {
|
|
6109
6297
|
length: number;
|
|
6110
6298
|
start: number;
|
|
6111
6299
|
limit: number;
|
|
6112
6300
|
sessions: {
|
|
6113
6301
|
created_at: string;
|
|
6302
|
+
updated_at: string;
|
|
6114
6303
|
user_id: string;
|
|
6304
|
+
id: string;
|
|
6115
6305
|
client_id: string;
|
|
6116
|
-
expires_at: string;
|
|
6117
6306
|
used_at: string;
|
|
6118
|
-
|
|
6119
|
-
|
|
6307
|
+
device: {
|
|
6308
|
+
last_ip: string;
|
|
6309
|
+
initial_user_agent: string;
|
|
6310
|
+
initial_ip: string;
|
|
6311
|
+
initial_asn: string;
|
|
6312
|
+
last_user_agent: string;
|
|
6313
|
+
last_asn: string;
|
|
6314
|
+
};
|
|
6315
|
+
clients: string[];
|
|
6316
|
+
authenticated_at: string;
|
|
6317
|
+
last_interaction_at: string;
|
|
6318
|
+
expires_at?: string | undefined;
|
|
6319
|
+
session_id?: string | undefined;
|
|
6320
|
+
revoked_at?: string | undefined;
|
|
6321
|
+
idle_expires_at?: string | undefined;
|
|
6120
6322
|
}[];
|
|
6121
6323
|
};
|
|
6122
6324
|
outputFormat: "json" | "text";
|