authhero 4.97.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;
@@ -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
  }
@@ -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;