authhero 4.96.0 → 4.98.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.
@@ -103,6 +103,84 @@ export declare const actionInsertSchema: z.ZodObject<{
103
103
  }[] | undefined;
104
104
  }>;
105
105
  export type ActionInsert = z.infer<typeof actionInsertSchema>;
106
+ export declare const actionUpdateSchema: z.ZodObject<{
107
+ name: z.ZodOptional<z.ZodString>;
108
+ code: z.ZodOptional<z.ZodString>;
109
+ supported_triggers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
110
+ id: z.ZodString;
111
+ version: z.ZodOptional<z.ZodString>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ id: string;
114
+ version?: string | undefined;
115
+ }, {
116
+ id: string;
117
+ version?: string | undefined;
118
+ }>, "many">>>;
119
+ runtime: z.ZodOptional<z.ZodOptional<z.ZodString>>;
120
+ dependencies: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
121
+ name: z.ZodString;
122
+ version: z.ZodString;
123
+ }, "strip", z.ZodTypeAny, {
124
+ version: string;
125
+ name: string;
126
+ }, {
127
+ version: string;
128
+ name: string;
129
+ }>, "many">>>;
130
+ secrets: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
131
+ name: z.ZodString;
132
+ value: z.ZodString;
133
+ }, "strip", z.ZodTypeAny, {
134
+ value: string;
135
+ name: string;
136
+ }, {
137
+ value: string;
138
+ name: string;
139
+ }>, "many">>>;
140
+ } & {
141
+ status: z.ZodOptional<z.ZodEnum<[
142
+ "draft",
143
+ "built"
144
+ ]>>;
145
+ deployed_at: z.ZodOptional<z.ZodString>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ code?: string | undefined;
148
+ status?: "draft" | "built" | undefined;
149
+ name?: string | undefined;
150
+ supported_triggers?: {
151
+ id: string;
152
+ version?: string | undefined;
153
+ }[] | undefined;
154
+ runtime?: string | undefined;
155
+ dependencies?: {
156
+ version: string;
157
+ name: string;
158
+ }[] | undefined;
159
+ secrets?: {
160
+ value: string;
161
+ name: string;
162
+ }[] | undefined;
163
+ deployed_at?: string | undefined;
164
+ }, {
165
+ code?: string | undefined;
166
+ status?: "draft" | "built" | undefined;
167
+ name?: string | undefined;
168
+ supported_triggers?: {
169
+ id: string;
170
+ version?: string | undefined;
171
+ }[] | undefined;
172
+ runtime?: string | undefined;
173
+ dependencies?: {
174
+ version: string;
175
+ name: string;
176
+ }[] | undefined;
177
+ secrets?: {
178
+ value: string;
179
+ name: string;
180
+ }[] | undefined;
181
+ deployed_at?: string | undefined;
182
+ }>;
183
+ export type ActionUpdate = z.infer<typeof actionUpdateSchema>;
106
184
  export declare const actionSchema: z.ZodObject<{
107
185
  name: z.ZodString;
108
186
  code: z.ZodString;
@@ -43956,8 +44034,8 @@ export declare const tenantInsertSchema: z.ZodObject<{
43956
44034
  support_url: z.ZodOptional<z.ZodString>;
43957
44035
  sender_email: z.ZodString;
43958
44036
  sender_name: z.ZodString;
43959
- session_lifetime: z.ZodDefault<z.ZodNumber>;
43960
- idle_session_lifetime: z.ZodDefault<z.ZodNumber>;
44037
+ session_lifetime: z.ZodOptional<z.ZodNumber>;
44038
+ idle_session_lifetime: z.ZodOptional<z.ZodNumber>;
43961
44039
  ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
43962
44040
  idle_ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
43963
44041
  session_cookie: z.ZodOptional<z.ZodObject<{
@@ -44306,8 +44384,6 @@ export declare const tenantInsertSchema: z.ZodObject<{
44306
44384
  friendly_name: string;
44307
44385
  sender_email: string;
44308
44386
  sender_name: string;
44309
- session_lifetime: number;
44310
- idle_session_lifetime: number;
44311
44387
  id?: string | undefined;
44312
44388
  allowed_logout_urls?: string[] | undefined;
44313
44389
  oidc_logout?: {
@@ -44317,6 +44393,8 @@ export declare const tenantInsertSchema: z.ZodObject<{
44317
44393
  picture_url?: string | undefined;
44318
44394
  support_email?: string | undefined;
44319
44395
  support_url?: string | undefined;
44396
+ session_lifetime?: number | undefined;
44397
+ idle_session_lifetime?: number | undefined;
44320
44398
  ephemeral_session_lifetime?: number | undefined;
44321
44399
  idle_ephemeral_session_lifetime?: number | undefined;
44322
44400
  session_cookie?: {
@@ -44559,8 +44637,8 @@ export declare const tenantSchema: z.ZodObject<{
44559
44637
  support_url: z.ZodOptional<z.ZodString>;
44560
44638
  sender_email: z.ZodString;
44561
44639
  sender_name: z.ZodString;
44562
- session_lifetime: z.ZodDefault<z.ZodNumber>;
44563
- idle_session_lifetime: z.ZodDefault<z.ZodNumber>;
44640
+ session_lifetime: z.ZodOptional<z.ZodNumber>;
44641
+ idle_session_lifetime: z.ZodOptional<z.ZodNumber>;
44564
44642
  ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
44565
44643
  idle_ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
44566
44644
  session_cookie: z.ZodOptional<z.ZodObject<{
@@ -44914,8 +44992,6 @@ export declare const tenantSchema: z.ZodObject<{
44914
44992
  friendly_name: string;
44915
44993
  sender_email: string;
44916
44994
  sender_name: string;
44917
- session_lifetime: number;
44918
- idle_session_lifetime: number;
44919
44995
  allowed_logout_urls?: string[] | undefined;
44920
44996
  oidc_logout?: {
44921
44997
  rp_logout_end_session_endpoint_discovery?: boolean | undefined;
@@ -44924,6 +45000,8 @@ export declare const tenantSchema: z.ZodObject<{
44924
45000
  picture_url?: string | undefined;
44925
45001
  support_email?: string | undefined;
44926
45002
  support_url?: string | undefined;
45003
+ session_lifetime?: number | undefined;
45004
+ idle_session_lifetime?: number | undefined;
44927
45005
  ephemeral_session_lifetime?: number | undefined;
44928
45006
  idle_ephemeral_session_lifetime?: number | undefined;
44929
45007
  session_cookie?: {
@@ -48610,7 +48688,7 @@ export interface ListActionsResponse extends Totals {
48610
48688
  export interface ActionsAdapter {
48611
48689
  create: (tenant_id: string, action: ActionInsert) => Promise<Action>;
48612
48690
  get: (tenant_id: string, action_id: string) => Promise<Action | null>;
48613
- update: (tenant_id: string, action_id: string, action: Partial<ActionInsert>) => Promise<boolean>;
48691
+ update: (tenant_id: string, action_id: string, action: ActionUpdate) => Promise<boolean>;
48614
48692
  remove: (tenant_id: string, action_id: string) => Promise<boolean>;
48615
48693
  list: (tenant_id: string, params?: ListParams) => Promise<ListActionsResponse>;
48616
48694
  }
@@ -49306,8 +49384,8 @@ declare const enrichedClientSchema: z.ZodObject<{
49306
49384
  support_url: z.ZodOptional<z.ZodString>;
49307
49385
  sender_email: z.ZodString;
49308
49386
  sender_name: z.ZodString;
49309
- session_lifetime: z.ZodDefault<z.ZodNumber>;
49310
- idle_session_lifetime: z.ZodDefault<z.ZodNumber>;
49387
+ session_lifetime: z.ZodOptional<z.ZodNumber>;
49388
+ idle_session_lifetime: z.ZodOptional<z.ZodNumber>;
49311
49389
  ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
49312
49390
  idle_ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
49313
49391
  session_cookie: z.ZodOptional<z.ZodObject<{
@@ -49661,8 +49739,6 @@ declare const enrichedClientSchema: z.ZodObject<{
49661
49739
  friendly_name: string;
49662
49740
  sender_email: string;
49663
49741
  sender_name: string;
49664
- session_lifetime: number;
49665
- idle_session_lifetime: number;
49666
49742
  allowed_logout_urls?: string[] | undefined;
49667
49743
  oidc_logout?: {
49668
49744
  rp_logout_end_session_endpoint_discovery?: boolean | undefined;
@@ -49671,6 +49747,8 @@ declare const enrichedClientSchema: z.ZodObject<{
49671
49747
  picture_url?: string | undefined;
49672
49748
  support_email?: string | undefined;
49673
49749
  support_url?: string | undefined;
49750
+ session_lifetime?: number | undefined;
49751
+ idle_session_lifetime?: number | undefined;
49674
49752
  ephemeral_session_lifetime?: number | undefined;
49675
49753
  idle_ephemeral_session_lifetime?: number | undefined;
49676
49754
  session_cookie?: {
@@ -50888,8 +50966,6 @@ declare const enrichedClientSchema: z.ZodObject<{
50888
50966
  friendly_name: string;
50889
50967
  sender_email: string;
50890
50968
  sender_name: string;
50891
- session_lifetime: number;
50892
- idle_session_lifetime: number;
50893
50969
  allowed_logout_urls?: string[] | undefined;
50894
50970
  oidc_logout?: {
50895
50971
  rp_logout_end_session_endpoint_discovery?: boolean | undefined;
@@ -50898,6 +50974,8 @@ declare const enrichedClientSchema: z.ZodObject<{
50898
50974
  picture_url?: string | undefined;
50899
50975
  support_email?: string | undefined;
50900
50976
  support_url?: string | undefined;
50977
+ session_lifetime?: number | undefined;
50978
+ idle_session_lifetime?: number | undefined;
50901
50979
  ephemeral_session_lifetime?: number | undefined;
50902
50980
  idle_ephemeral_session_lifetime?: number | undefined;
50903
50981
  session_cookie?: {
@@ -52660,6 +52738,53 @@ export declare class LocalCodeExecutor implements CodeExecutor {
52660
52738
  timeoutMs?: number;
52661
52739
  }): Promise<CodeExecutionResult>;
52662
52740
  }
52741
+ /**
52742
+ * Worker Loader binding type (Cloudflare Dynamic Workers).
52743
+ * Configure in wrangler.toml:
52744
+ * [[worker_loaders]]
52745
+ * binding = "LOADER"
52746
+ */
52747
+ export interface WorkerLoader {
52748
+ load(code: WorkerCode): WorkerStub;
52749
+ get(id: string, callback: () => WorkerCode): WorkerStub;
52750
+ }
52751
+ export interface WorkerCode {
52752
+ compatibilityDate: string;
52753
+ mainModule: string;
52754
+ modules: Record<string, string>;
52755
+ globalOutbound?: null;
52756
+ }
52757
+ export interface WorkerStub {
52758
+ getEntrypoint(): {
52759
+ fetch(request: Request): Promise<Response>;
52760
+ };
52761
+ }
52762
+ export interface CloudflareCodeExecutorOptions {
52763
+ loader: WorkerLoader;
52764
+ compatibilityDate?: string;
52765
+ }
52766
+ /**
52767
+ * Cloudflare Dynamic Workers code executor.
52768
+ * Spins up isolated Workers on demand via the Worker Loader binding
52769
+ * to execute user-authored hook code in a sandboxed environment.
52770
+ *
52771
+ * Uses `env.LOADER.get(id, callback)` to cache workers by hookCodeId + code hash,
52772
+ * so the same code stays warm across requests while code updates get a fresh worker.
52773
+ * Network access is blocked via `globalOutbound: null`.
52774
+ */
52775
+ export declare class CloudflareCodeExecutor implements CodeExecutor {
52776
+ private loader;
52777
+ private compatibilityDate;
52778
+ constructor(options: CloudflareCodeExecutorOptions);
52779
+ execute(params: {
52780
+ code: string;
52781
+ hookCodeId?: string;
52782
+ triggerId: string;
52783
+ event: Record<string, unknown>;
52784
+ timeoutMs?: number;
52785
+ cpuLimitMs?: number;
52786
+ }): Promise<CodeExecutionResult>;
52787
+ }
52663
52788
  export declare function init(config: AuthHeroConfig): {
52664
52789
  app: OpenAPIHono<{
52665
52790
  Bindings: Bindings;