@authhero/adapter-interfaces 1.16.0 → 1.17.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.
@@ -268,6 +268,164 @@ export declare const actionSchema: z.ZodObject<{
268
268
  deployed_at?: string | undefined;
269
269
  }>;
270
270
  export type Action = z.infer<typeof actionSchema>;
271
+ export declare const actionVersionInsertSchema: z.ZodObject<{
272
+ action_id: z.ZodString;
273
+ code: z.ZodString;
274
+ runtime: z.ZodOptional<z.ZodString>;
275
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
276
+ name: z.ZodString;
277
+ version: z.ZodString;
278
+ }, "strip", z.ZodTypeAny, {
279
+ version: string;
280
+ name: string;
281
+ }, {
282
+ version: string;
283
+ name: string;
284
+ }>, "many">>;
285
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
286
+ name: z.ZodString;
287
+ value: z.ZodOptional<z.ZodString>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ name: string;
290
+ value?: string | undefined;
291
+ }, {
292
+ name: string;
293
+ value?: string | undefined;
294
+ }>, "many">>;
295
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
296
+ id: z.ZodString;
297
+ version: z.ZodOptional<z.ZodString>;
298
+ }, "strip", z.ZodTypeAny, {
299
+ id: string;
300
+ version?: string | undefined;
301
+ }, {
302
+ id: string;
303
+ version?: string | undefined;
304
+ }>, "many">>;
305
+ deployed: z.ZodDefault<z.ZodBoolean>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ code: string;
308
+ action_id: string;
309
+ deployed: boolean;
310
+ supported_triggers?: {
311
+ id: string;
312
+ version?: string | undefined;
313
+ }[] | undefined;
314
+ runtime?: string | undefined;
315
+ dependencies?: {
316
+ version: string;
317
+ name: string;
318
+ }[] | undefined;
319
+ secrets?: {
320
+ name: string;
321
+ value?: string | undefined;
322
+ }[] | undefined;
323
+ }, {
324
+ code: string;
325
+ action_id: string;
326
+ supported_triggers?: {
327
+ id: string;
328
+ version?: string | undefined;
329
+ }[] | undefined;
330
+ runtime?: string | undefined;
331
+ dependencies?: {
332
+ version: string;
333
+ name: string;
334
+ }[] | undefined;
335
+ secrets?: {
336
+ name: string;
337
+ value?: string | undefined;
338
+ }[] | undefined;
339
+ deployed?: boolean | undefined;
340
+ }>;
341
+ export type ActionVersionInsert = z.infer<typeof actionVersionInsertSchema>;
342
+ export declare const actionVersionSchema: z.ZodObject<{
343
+ action_id: z.ZodString;
344
+ code: z.ZodString;
345
+ runtime: z.ZodOptional<z.ZodString>;
346
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
347
+ name: z.ZodString;
348
+ version: z.ZodString;
349
+ }, "strip", z.ZodTypeAny, {
350
+ version: string;
351
+ name: string;
352
+ }, {
353
+ version: string;
354
+ name: string;
355
+ }>, "many">>;
356
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
357
+ name: z.ZodString;
358
+ value: z.ZodOptional<z.ZodString>;
359
+ }, "strip", z.ZodTypeAny, {
360
+ name: string;
361
+ value?: string | undefined;
362
+ }, {
363
+ name: string;
364
+ value?: string | undefined;
365
+ }>, "many">>;
366
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
367
+ id: z.ZodString;
368
+ version: z.ZodOptional<z.ZodString>;
369
+ }, "strip", z.ZodTypeAny, {
370
+ id: string;
371
+ version?: string | undefined;
372
+ }, {
373
+ id: string;
374
+ version?: string | undefined;
375
+ }>, "many">>;
376
+ deployed: z.ZodDefault<z.ZodBoolean>;
377
+ } & {
378
+ created_at: z.ZodString;
379
+ updated_at: z.ZodString;
380
+ id: z.ZodString;
381
+ tenant_id: z.ZodString;
382
+ number: z.ZodNumber;
383
+ }, "strip", z.ZodTypeAny, {
384
+ number: number;
385
+ created_at: string;
386
+ updated_at: string;
387
+ code: string;
388
+ id: string;
389
+ tenant_id: string;
390
+ action_id: string;
391
+ deployed: boolean;
392
+ supported_triggers?: {
393
+ id: string;
394
+ version?: string | undefined;
395
+ }[] | undefined;
396
+ runtime?: string | undefined;
397
+ dependencies?: {
398
+ version: string;
399
+ name: string;
400
+ }[] | undefined;
401
+ secrets?: {
402
+ name: string;
403
+ value?: string | undefined;
404
+ }[] | undefined;
405
+ }, {
406
+ number: number;
407
+ created_at: string;
408
+ updated_at: string;
409
+ code: string;
410
+ id: string;
411
+ tenant_id: string;
412
+ action_id: string;
413
+ supported_triggers?: {
414
+ id: string;
415
+ version?: string | undefined;
416
+ }[] | undefined;
417
+ runtime?: string | undefined;
418
+ dependencies?: {
419
+ version: string;
420
+ name: string;
421
+ }[] | undefined;
422
+ secrets?: {
423
+ name: string;
424
+ value?: string | undefined;
425
+ }[] | undefined;
426
+ deployed?: boolean | undefined;
427
+ }>;
428
+ export type ActionVersion = z.infer<typeof actionVersionSchema>;
271
429
  export declare const auditCategorySchema: z.ZodEnum<[
272
430
  "user_action",
273
431
  "admin_action",
@@ -50516,6 +50674,24 @@ export interface ActionsAdapter {
50516
50674
  remove: (tenant_id: string, action_id: string) => Promise<boolean>;
50517
50675
  list: (tenant_id: string, params?: ListParams) => Promise<ListActionsResponse>;
50518
50676
  }
50677
+ export interface ListActionVersionsResponse extends Totals {
50678
+ versions: ActionVersion[];
50679
+ }
50680
+ export interface ActionVersionsAdapter {
50681
+ /**
50682
+ * Append a new version row for an action. The adapter assigns the next
50683
+ * sequential `number` per action_id and clears the `deployed` flag on any
50684
+ * prior versions when the new one is created with `deployed: true`.
50685
+ */
50686
+ create: (tenant_id: string, version: ActionVersionInsert) => Promise<ActionVersion>;
50687
+ get: (tenant_id: string, action_id: string, version_id: string) => Promise<ActionVersion | null>;
50688
+ list: (tenant_id: string, action_id: string, params?: ListParams) => Promise<ListActionVersionsResponse>;
50689
+ /**
50690
+ * Remove every version row for an action — used when the parent action is
50691
+ * deleted. Returns the number of rows removed.
50692
+ */
50693
+ removeForAction: (tenant_id: string, action_id: string) => Promise<number>;
50694
+ }
50519
50695
  export interface ListFlowsResponse extends Totals {
50520
50696
  flows: Flow[];
50521
50697
  }
@@ -51156,6 +51332,7 @@ export interface SessionCleanupParams {
51156
51332
  }
51157
51333
  export interface DataAdapters {
51158
51334
  actions: ActionsAdapter;
51335
+ actionVersions: ActionVersionsAdapter;
51159
51336
  branding: BrandingAdapter;
51160
51337
  cache?: CacheAdapter;
51161
51338
  clients: ClientsAdapter;