@channel.io/app-sdk-core 0.25.0 → 0.27.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.
Files changed (69) hide show
  1. package/dist/extensions/apikey.d.ts +2 -2
  2. package/dist/extensions/calendar.d.ts +2 -2
  3. package/dist/extensions/commerce.d.ts +20 -12
  4. package/dist/extensions/commerce.d.ts.map +1 -1
  5. package/dist/extensions/commerce.js +14 -3
  6. package/dist/extensions/commerce.js.map +1 -1
  7. package/dist/extensions/config.d.ts +133 -81
  8. package/dist/extensions/config.d.ts.map +1 -1
  9. package/dist/extensions/config.js +14 -0
  10. package/dist/extensions/config.js.map +1 -1
  11. package/dist/extensions/datasource.d.ts +22 -22
  12. package/dist/extensions/hook.d.ts +569 -4
  13. package/dist/extensions/hook.d.ts.map +1 -1
  14. package/dist/extensions/hook.js +57 -1
  15. package/dist/extensions/hook.js.map +1 -1
  16. package/dist/extensions/index.d.ts +3 -2
  17. package/dist/extensions/index.d.ts.map +1 -1
  18. package/dist/extensions/index.js +3 -2
  19. package/dist/extensions/index.js.map +1 -1
  20. package/dist/extensions/notebook.d.ts +6 -6
  21. package/dist/extensions/oauth.d.ts +206 -21
  22. package/dist/extensions/oauth.d.ts.map +1 -1
  23. package/dist/extensions/oauth.js +38 -0
  24. package/dist/extensions/oauth.js.map +1 -1
  25. package/dist/extensions/proto-contracts.d.ts +3 -1
  26. package/dist/extensions/proto-contracts.d.ts.map +1 -1
  27. package/dist/gen/channel/app/sdk/v1/common.zod.d.ts +10 -10
  28. package/dist/gen/channel/app/sdk/v1/context.d.ts +12 -0
  29. package/dist/gen/channel/app/sdk/v1/context.d.ts.map +1 -1
  30. package/dist/gen/channel/app/sdk/v1/context.zod.d.ts +67 -6
  31. package/dist/gen/channel/app/sdk/v1/context.zod.d.ts.map +1 -1
  32. package/dist/gen/channel/app/sdk/v1/context.zod.js +9 -0
  33. package/dist/gen/channel/app/sdk/v1/context.zod.js.map +1 -1
  34. package/dist/gen/channel/app/sdk/v1/extension.d.ts +94 -2
  35. package/dist/gen/channel/app/sdk/v1/extension.d.ts.map +1 -1
  36. package/dist/gen/channel/app/sdk/v1/extension.zod.d.ts +570 -172
  37. package/dist/gen/channel/app/sdk/v1/extension.zod.d.ts.map +1 -1
  38. package/dist/gen/channel/app/sdk/v1/extension.zod.js +43 -0
  39. package/dist/gen/channel/app/sdk/v1/extension.zod.js.map +1 -1
  40. package/dist/gen/channel/app/sdk/v1/function.zod.d.ts +66 -12
  41. package/dist/gen/channel/app/sdk/v1/function.zod.d.ts.map +1 -1
  42. package/dist/gen/channel/app/sdk/v1/native.d.ts +30 -0
  43. package/dist/gen/channel/app/sdk/v1/native.d.ts.map +1 -1
  44. package/dist/gen/channel/app/sdk/v1/native.js.map +1 -1
  45. package/dist/gen/channel/app/sdk/v1/native.zod.d.ts +268 -12
  46. package/dist/gen/channel/app/sdk/v1/native.zod.d.ts.map +1 -1
  47. package/dist/gen/channel/app/sdk/v1/native.zod.js +27 -0
  48. package/dist/gen/channel/app/sdk/v1/native.zod.js.map +1 -1
  49. package/dist/schemas/context.d.ts +25 -0
  50. package/dist/schemas/context.d.ts.map +1 -0
  51. package/dist/schemas/context.js +13 -0
  52. package/dist/schemas/context.js.map +1 -0
  53. package/dist/schemas/index.d.ts +1 -0
  54. package/dist/schemas/index.d.ts.map +1 -1
  55. package/dist/schemas/index.js +1 -0
  56. package/dist/schemas/index.js.map +1 -1
  57. package/dist/schemas/native.d.ts +311 -0
  58. package/dist/schemas/native.d.ts.map +1 -1
  59. package/dist/schemas/native.js +45 -0
  60. package/dist/schemas/native.js.map +1 -1
  61. package/dist/schemas/redirect.d.ts +4 -0
  62. package/dist/schemas/redirect.d.ts.map +1 -0
  63. package/dist/schemas/redirect.js +18 -0
  64. package/dist/schemas/redirect.js.map +1 -0
  65. package/dist/types/context.d.ts +11 -2
  66. package/dist/types/context.d.ts.map +1 -1
  67. package/dist/types/native.d.ts +34 -0
  68. package/dist/types/native.d.ts.map +1 -1
  69. package/package.json +1 -1
@@ -1,11 +1,50 @@
1
1
  import { z } from "zod";
2
- import type { HookConfig as ProtoHookConfig, HookGetHooksOutput as ProtoGetHooksOutput, HookTeamChatMessageCreatedInput as ProtoTeamChatMessageCreatedHookInput, HookTeamChatMessageCreatedResult as ProtoTeamChatMessageCreatedHookResult, HookUserChatOpenedInput as ProtoUserChatOpenedHookInput, HookUserChatOpenedResult as ProtoUserChatOpenedHookResult, HookWebhookConfig as ProtoWebhookConfig } from "../gen/channel/app/sdk/v1/extension.js";
2
+ import type { HookConfig as ProtoHookConfig, HookGetHooksOutput as ProtoGetHooksOutput, HookTeamChatMessageCreatedInput as ProtoTeamChatMessageCreatedHookInput, HookTeamChatMessageCreatedResult as ProtoTeamChatMessageCreatedHookResult, HookUserChatOpenedInput as ProtoUserChatOpenedHookInput, HookUserChatOpenedResult as ProtoUserChatOpenedHookResult, HookWebhookConfig as ProtoWebhookConfig, OAuthFlowHookInput as ProtoOAuthFlowHookInput, OAuthFlowHookResult as ProtoOAuthFlowHookResult } from "../gen/channel/app/sdk/v1/extension.js";
3
3
  type ProtoBacked<T extends Proto, Proto> = T;
4
4
  /**
5
5
  * Hook type returned from extension.hook.metadata.getHooks.
6
6
  */
7
- export declare const HookTypeSchema: z.ZodEnum<["app.installed", "app.uninstalled", "command.toggle", "config.saved", "config.deleted", "widget.installed", "widget.uninstalled", "webhook.received", "oauth.connected", "oauth.disconnected", "userChat.opened", "teamChat.messageCreated"]>;
7
+ export declare const HookTypeSchema: z.ZodEnum<["app.installed", "app.uninstalled", "command.toggle", "config.saved", "config.deleted", "widget.installed", "widget.uninstalled", "webhook.received", "oauth.connected", "oauth.disconnected", "oauth.beforeAuthorization", "oauth.afterAuthorization", "userChat.opened", "teamChat.messageCreated"]>;
8
8
  export type HookType = z.infer<typeof HookTypeSchema>;
9
+ /** Opaque flow reference and server-owned resume URL. Neither grants manager authority. */
10
+ export declare const OAuthFlowHookInputSchema: z.ZodObject<{
11
+ flowId: z.ZodString;
12
+ resumeUrl: z.ZodString;
13
+ expiresAt: z.ZodString;
14
+ }, "strict", z.ZodTypeAny, {
15
+ expiresAt: string;
16
+ flowId: string;
17
+ resumeUrl: string;
18
+ }, {
19
+ expiresAt: string;
20
+ flowId: string;
21
+ resumeUrl: string;
22
+ }>;
23
+ export type OAuthFlowHookInput = ProtoBacked<z.infer<typeof OAuthFlowHookInputSchema>, ProtoOAuthFlowHookInput>;
24
+ /** A redirect must also match the hook's registered redirectOrigins on the platform. */
25
+ export declare const OAuthFlowHookResultSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
26
+ type: z.ZodLiteral<"continue">;
27
+ detail: z.ZodOptional<z.ZodString>;
28
+ }, "strict", z.ZodTypeAny, {
29
+ type: "continue";
30
+ detail?: string | undefined;
31
+ }, {
32
+ type: "continue";
33
+ detail?: string | undefined;
34
+ }>, z.ZodObject<{
35
+ type: z.ZodLiteral<"redirect">;
36
+ url: z.ZodString;
37
+ detail: z.ZodOptional<z.ZodString>;
38
+ }, "strict", z.ZodTypeAny, {
39
+ type: "redirect";
40
+ url: string;
41
+ detail?: string | undefined;
42
+ }, {
43
+ type: "redirect";
44
+ url: string;
45
+ detail?: string | undefined;
46
+ }>]>;
47
+ export type OAuthFlowHookResult = ProtoBacked<z.infer<typeof OAuthFlowHookResultSchema>, ProtoOAuthFlowHookResult>;
9
48
  export declare const WebhookExecutionScopeSchema: z.ZodEnum<["app", "manager"]>;
10
49
  export declare const UserChatOpenKindSchema: z.ZodEnum<["first_open", "reopen"]>;
11
50
  export type UserChatOpenKind = ProtoBacked<z.infer<typeof UserChatOpenKindSchema>, ProtoUserChatOpenedHookInput["openKind"]>;
@@ -391,27 +430,169 @@ export declare const HookConfigSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
391
430
  systemVersion: z.ZodOptional<z.ZodString>;
392
431
  } & {
393
432
  type: z.ZodLiteral<"oauth.connected">;
433
+ authScope: z.ZodOptional<z.ZodEnum<["channel", "manager"]>>;
394
434
  }, "strict", z.ZodTypeAny, {
395
435
  type: "oauth.connected";
396
436
  actionFunctionName: string;
397
437
  systemVersion?: string | undefined;
438
+ authScope?: "manager" | "channel" | undefined;
398
439
  }, {
399
440
  type: "oauth.connected";
400
441
  actionFunctionName: string;
401
442
  systemVersion?: string | undefined;
443
+ authScope?: "manager" | "channel" | undefined;
402
444
  }>, z.ZodObject<{
403
445
  actionFunctionName: z.ZodString;
404
446
  systemVersion: z.ZodOptional<z.ZodString>;
405
447
  } & {
406
448
  type: z.ZodLiteral<"oauth.disconnected">;
449
+ authScope: z.ZodOptional<z.ZodEnum<["channel", "manager"]>>;
407
450
  }, "strict", z.ZodTypeAny, {
408
451
  type: "oauth.disconnected";
409
452
  actionFunctionName: string;
410
453
  systemVersion?: string | undefined;
454
+ authScope?: "manager" | "channel" | undefined;
411
455
  }, {
412
456
  type: "oauth.disconnected";
413
457
  actionFunctionName: string;
414
458
  systemVersion?: string | undefined;
459
+ authScope?: "manager" | "channel" | undefined;
460
+ }>, z.ZodObject<{
461
+ actionFunctionName: z.ZodString;
462
+ systemVersion: z.ZodOptional<z.ZodString>;
463
+ } & {
464
+ type: z.ZodLiteral<"oauth.beforeAuthorization">;
465
+ authScope: z.ZodOptional<z.ZodEnum<["channel", "manager"]>>;
466
+ redirectOrigins: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
467
+ display: z.ZodOptional<z.ZodObject<{
468
+ title: z.ZodString;
469
+ description: z.ZodOptional<z.ZodString>;
470
+ icon: z.ZodOptional<z.ZodEnum<["installation", "account", "organization", "permission", "settings"]>>;
471
+ i18nMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
472
+ title: z.ZodOptional<z.ZodString>;
473
+ description: z.ZodOptional<z.ZodString>;
474
+ }, "strict", z.ZodTypeAny, {
475
+ description?: string | undefined;
476
+ title?: string | undefined;
477
+ }, {
478
+ description?: string | undefined;
479
+ title?: string | undefined;
480
+ }>>>;
481
+ }, "strict", z.ZodTypeAny, {
482
+ title: string;
483
+ description?: string | undefined;
484
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
485
+ i18nMap?: Record<string, {
486
+ description?: string | undefined;
487
+ title?: string | undefined;
488
+ }> | undefined;
489
+ }, {
490
+ title: string;
491
+ description?: string | undefined;
492
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
493
+ i18nMap?: Record<string, {
494
+ description?: string | undefined;
495
+ title?: string | undefined;
496
+ }> | undefined;
497
+ }>>;
498
+ }, "strict", z.ZodTypeAny, {
499
+ type: "oauth.beforeAuthorization";
500
+ redirectOrigins: string[];
501
+ actionFunctionName: string;
502
+ systemVersion?: string | undefined;
503
+ authScope?: "manager" | "channel" | undefined;
504
+ display?: {
505
+ title: string;
506
+ description?: string | undefined;
507
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
508
+ i18nMap?: Record<string, {
509
+ description?: string | undefined;
510
+ title?: string | undefined;
511
+ }> | undefined;
512
+ } | undefined;
513
+ }, {
514
+ type: "oauth.beforeAuthorization";
515
+ actionFunctionName: string;
516
+ systemVersion?: string | undefined;
517
+ authScope?: "manager" | "channel" | undefined;
518
+ redirectOrigins?: string[] | undefined;
519
+ display?: {
520
+ title: string;
521
+ description?: string | undefined;
522
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
523
+ i18nMap?: Record<string, {
524
+ description?: string | undefined;
525
+ title?: string | undefined;
526
+ }> | undefined;
527
+ } | undefined;
528
+ }>, z.ZodObject<{
529
+ actionFunctionName: z.ZodString;
530
+ systemVersion: z.ZodOptional<z.ZodString>;
531
+ } & {
532
+ type: z.ZodLiteral<"oauth.afterAuthorization">;
533
+ authScope: z.ZodOptional<z.ZodEnum<["channel", "manager"]>>;
534
+ redirectOrigins: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
535
+ display: z.ZodOptional<z.ZodObject<{
536
+ title: z.ZodString;
537
+ description: z.ZodOptional<z.ZodString>;
538
+ icon: z.ZodOptional<z.ZodEnum<["installation", "account", "organization", "permission", "settings"]>>;
539
+ i18nMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
540
+ title: z.ZodOptional<z.ZodString>;
541
+ description: z.ZodOptional<z.ZodString>;
542
+ }, "strict", z.ZodTypeAny, {
543
+ description?: string | undefined;
544
+ title?: string | undefined;
545
+ }, {
546
+ description?: string | undefined;
547
+ title?: string | undefined;
548
+ }>>>;
549
+ }, "strict", z.ZodTypeAny, {
550
+ title: string;
551
+ description?: string | undefined;
552
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
553
+ i18nMap?: Record<string, {
554
+ description?: string | undefined;
555
+ title?: string | undefined;
556
+ }> | undefined;
557
+ }, {
558
+ title: string;
559
+ description?: string | undefined;
560
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
561
+ i18nMap?: Record<string, {
562
+ description?: string | undefined;
563
+ title?: string | undefined;
564
+ }> | undefined;
565
+ }>>;
566
+ }, "strict", z.ZodTypeAny, {
567
+ type: "oauth.afterAuthorization";
568
+ redirectOrigins: string[];
569
+ actionFunctionName: string;
570
+ systemVersion?: string | undefined;
571
+ authScope?: "manager" | "channel" | undefined;
572
+ display?: {
573
+ title: string;
574
+ description?: string | undefined;
575
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
576
+ i18nMap?: Record<string, {
577
+ description?: string | undefined;
578
+ title?: string | undefined;
579
+ }> | undefined;
580
+ } | undefined;
581
+ }, {
582
+ type: "oauth.afterAuthorization";
583
+ actionFunctionName: string;
584
+ systemVersion?: string | undefined;
585
+ authScope?: "manager" | "channel" | undefined;
586
+ redirectOrigins?: string[] | undefined;
587
+ display?: {
588
+ title: string;
589
+ description?: string | undefined;
590
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
591
+ i18nMap?: Record<string, {
592
+ description?: string | undefined;
593
+ title?: string | undefined;
594
+ }> | undefined;
595
+ } | undefined;
415
596
  }>, z.ZodObject<{
416
597
  actionFunctionName: z.ZodString;
417
598
  systemVersion: z.ZodOptional<z.ZodString>;
@@ -444,7 +625,7 @@ export type HookConfig = ProtoBacked<z.infer<typeof HookConfigSchema>, ProtoHook
444
625
  * Metadata response schema for hook registration.
445
626
  */
446
627
  export declare const GetHooksOutputSchema: z.ZodObject<{
447
- hooks: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
628
+ hooks: z.ZodEffects<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
448
629
  actionFunctionName: z.ZodString;
449
630
  systemVersion: z.ZodOptional<z.ZodString>;
450
631
  } & {
@@ -590,27 +771,169 @@ export declare const GetHooksOutputSchema: z.ZodObject<{
590
771
  systemVersion: z.ZodOptional<z.ZodString>;
591
772
  } & {
592
773
  type: z.ZodLiteral<"oauth.connected">;
774
+ authScope: z.ZodOptional<z.ZodEnum<["channel", "manager"]>>;
593
775
  }, "strict", z.ZodTypeAny, {
594
776
  type: "oauth.connected";
595
777
  actionFunctionName: string;
596
778
  systemVersion?: string | undefined;
779
+ authScope?: "manager" | "channel" | undefined;
597
780
  }, {
598
781
  type: "oauth.connected";
599
782
  actionFunctionName: string;
600
783
  systemVersion?: string | undefined;
784
+ authScope?: "manager" | "channel" | undefined;
601
785
  }>, z.ZodObject<{
602
786
  actionFunctionName: z.ZodString;
603
787
  systemVersion: z.ZodOptional<z.ZodString>;
604
788
  } & {
605
789
  type: z.ZodLiteral<"oauth.disconnected">;
790
+ authScope: z.ZodOptional<z.ZodEnum<["channel", "manager"]>>;
606
791
  }, "strict", z.ZodTypeAny, {
607
792
  type: "oauth.disconnected";
608
793
  actionFunctionName: string;
609
794
  systemVersion?: string | undefined;
795
+ authScope?: "manager" | "channel" | undefined;
610
796
  }, {
611
797
  type: "oauth.disconnected";
612
798
  actionFunctionName: string;
613
799
  systemVersion?: string | undefined;
800
+ authScope?: "manager" | "channel" | undefined;
801
+ }>, z.ZodObject<{
802
+ actionFunctionName: z.ZodString;
803
+ systemVersion: z.ZodOptional<z.ZodString>;
804
+ } & {
805
+ type: z.ZodLiteral<"oauth.beforeAuthorization">;
806
+ authScope: z.ZodOptional<z.ZodEnum<["channel", "manager"]>>;
807
+ redirectOrigins: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
808
+ display: z.ZodOptional<z.ZodObject<{
809
+ title: z.ZodString;
810
+ description: z.ZodOptional<z.ZodString>;
811
+ icon: z.ZodOptional<z.ZodEnum<["installation", "account", "organization", "permission", "settings"]>>;
812
+ i18nMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
813
+ title: z.ZodOptional<z.ZodString>;
814
+ description: z.ZodOptional<z.ZodString>;
815
+ }, "strict", z.ZodTypeAny, {
816
+ description?: string | undefined;
817
+ title?: string | undefined;
818
+ }, {
819
+ description?: string | undefined;
820
+ title?: string | undefined;
821
+ }>>>;
822
+ }, "strict", z.ZodTypeAny, {
823
+ title: string;
824
+ description?: string | undefined;
825
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
826
+ i18nMap?: Record<string, {
827
+ description?: string | undefined;
828
+ title?: string | undefined;
829
+ }> | undefined;
830
+ }, {
831
+ title: string;
832
+ description?: string | undefined;
833
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
834
+ i18nMap?: Record<string, {
835
+ description?: string | undefined;
836
+ title?: string | undefined;
837
+ }> | undefined;
838
+ }>>;
839
+ }, "strict", z.ZodTypeAny, {
840
+ type: "oauth.beforeAuthorization";
841
+ redirectOrigins: string[];
842
+ actionFunctionName: string;
843
+ systemVersion?: string | undefined;
844
+ authScope?: "manager" | "channel" | undefined;
845
+ display?: {
846
+ title: string;
847
+ description?: string | undefined;
848
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
849
+ i18nMap?: Record<string, {
850
+ description?: string | undefined;
851
+ title?: string | undefined;
852
+ }> | undefined;
853
+ } | undefined;
854
+ }, {
855
+ type: "oauth.beforeAuthorization";
856
+ actionFunctionName: string;
857
+ systemVersion?: string | undefined;
858
+ authScope?: "manager" | "channel" | undefined;
859
+ redirectOrigins?: string[] | undefined;
860
+ display?: {
861
+ title: string;
862
+ description?: string | undefined;
863
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
864
+ i18nMap?: Record<string, {
865
+ description?: string | undefined;
866
+ title?: string | undefined;
867
+ }> | undefined;
868
+ } | undefined;
869
+ }>, z.ZodObject<{
870
+ actionFunctionName: z.ZodString;
871
+ systemVersion: z.ZodOptional<z.ZodString>;
872
+ } & {
873
+ type: z.ZodLiteral<"oauth.afterAuthorization">;
874
+ authScope: z.ZodOptional<z.ZodEnum<["channel", "manager"]>>;
875
+ redirectOrigins: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
876
+ display: z.ZodOptional<z.ZodObject<{
877
+ title: z.ZodString;
878
+ description: z.ZodOptional<z.ZodString>;
879
+ icon: z.ZodOptional<z.ZodEnum<["installation", "account", "organization", "permission", "settings"]>>;
880
+ i18nMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
881
+ title: z.ZodOptional<z.ZodString>;
882
+ description: z.ZodOptional<z.ZodString>;
883
+ }, "strict", z.ZodTypeAny, {
884
+ description?: string | undefined;
885
+ title?: string | undefined;
886
+ }, {
887
+ description?: string | undefined;
888
+ title?: string | undefined;
889
+ }>>>;
890
+ }, "strict", z.ZodTypeAny, {
891
+ title: string;
892
+ description?: string | undefined;
893
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
894
+ i18nMap?: Record<string, {
895
+ description?: string | undefined;
896
+ title?: string | undefined;
897
+ }> | undefined;
898
+ }, {
899
+ title: string;
900
+ description?: string | undefined;
901
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
902
+ i18nMap?: Record<string, {
903
+ description?: string | undefined;
904
+ title?: string | undefined;
905
+ }> | undefined;
906
+ }>>;
907
+ }, "strict", z.ZodTypeAny, {
908
+ type: "oauth.afterAuthorization";
909
+ redirectOrigins: string[];
910
+ actionFunctionName: string;
911
+ systemVersion?: string | undefined;
912
+ authScope?: "manager" | "channel" | undefined;
913
+ display?: {
914
+ title: string;
915
+ description?: string | undefined;
916
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
917
+ i18nMap?: Record<string, {
918
+ description?: string | undefined;
919
+ title?: string | undefined;
920
+ }> | undefined;
921
+ } | undefined;
922
+ }, {
923
+ type: "oauth.afterAuthorization";
924
+ actionFunctionName: string;
925
+ systemVersion?: string | undefined;
926
+ authScope?: "manager" | "channel" | undefined;
927
+ redirectOrigins?: string[] | undefined;
928
+ display?: {
929
+ title: string;
930
+ description?: string | undefined;
931
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
932
+ i18nMap?: Record<string, {
933
+ description?: string | undefined;
934
+ title?: string | undefined;
935
+ }> | undefined;
936
+ } | undefined;
614
937
  }>, z.ZodObject<{
615
938
  actionFunctionName: z.ZodString;
616
939
  systemVersion: z.ZodOptional<z.ZodString>;
@@ -637,7 +960,185 @@ export declare const GetHooksOutputSchema: z.ZodObject<{
637
960
  type: "teamChat.messageCreated";
638
961
  actionFunctionName: string;
639
962
  systemVersion?: string | undefined;
640
- }>]>, "many">;
963
+ }>]>, "many">, ({
964
+ type: "app.installed";
965
+ actionFunctionName: string;
966
+ systemVersion?: string | undefined;
967
+ } | {
968
+ type: "app.uninstalled";
969
+ actionFunctionName: string;
970
+ systemVersion?: string | undefined;
971
+ } | {
972
+ type: "command.toggle";
973
+ actionFunctionName: string;
974
+ systemVersion?: string | undefined;
975
+ } | {
976
+ type: "config.saved";
977
+ actionFunctionName: string;
978
+ systemVersion?: string | undefined;
979
+ } | {
980
+ type: "config.deleted";
981
+ actionFunctionName: string;
982
+ systemVersion?: string | undefined;
983
+ } | {
984
+ type: "widget.installed";
985
+ actionFunctionName: string;
986
+ targetId: string;
987
+ systemVersion?: string | undefined;
988
+ } | {
989
+ type: "widget.uninstalled";
990
+ actionFunctionName: string;
991
+ targetId: string;
992
+ systemVersion?: string | undefined;
993
+ } | {
994
+ type: "webhook.received";
995
+ actionFunctionName: string;
996
+ targetId: string;
997
+ webhook: {
998
+ endpointToken: string;
999
+ executionScope?: "app" | undefined;
1000
+ } | {
1001
+ executionScope: "manager";
1002
+ };
1003
+ systemVersion?: string | undefined;
1004
+ } | {
1005
+ type: "oauth.connected";
1006
+ actionFunctionName: string;
1007
+ systemVersion?: string | undefined;
1008
+ authScope?: "manager" | "channel" | undefined;
1009
+ } | {
1010
+ type: "oauth.disconnected";
1011
+ actionFunctionName: string;
1012
+ systemVersion?: string | undefined;
1013
+ authScope?: "manager" | "channel" | undefined;
1014
+ } | {
1015
+ type: "oauth.beforeAuthorization";
1016
+ redirectOrigins: string[];
1017
+ actionFunctionName: string;
1018
+ systemVersion?: string | undefined;
1019
+ authScope?: "manager" | "channel" | undefined;
1020
+ display?: {
1021
+ title: string;
1022
+ description?: string | undefined;
1023
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
1024
+ i18nMap?: Record<string, {
1025
+ description?: string | undefined;
1026
+ title?: string | undefined;
1027
+ }> | undefined;
1028
+ } | undefined;
1029
+ } | {
1030
+ type: "oauth.afterAuthorization";
1031
+ redirectOrigins: string[];
1032
+ actionFunctionName: string;
1033
+ systemVersion?: string | undefined;
1034
+ authScope?: "manager" | "channel" | undefined;
1035
+ display?: {
1036
+ title: string;
1037
+ description?: string | undefined;
1038
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
1039
+ i18nMap?: Record<string, {
1040
+ description?: string | undefined;
1041
+ title?: string | undefined;
1042
+ }> | undefined;
1043
+ } | undefined;
1044
+ } | {
1045
+ type: "userChat.opened";
1046
+ actionFunctionName: string;
1047
+ systemVersion?: string | undefined;
1048
+ } | {
1049
+ type: "teamChat.messageCreated";
1050
+ actionFunctionName: string;
1051
+ systemVersion?: string | undefined;
1052
+ })[], ({
1053
+ type: "app.installed";
1054
+ actionFunctionName: string;
1055
+ systemVersion?: string | undefined;
1056
+ } | {
1057
+ type: "app.uninstalled";
1058
+ actionFunctionName: string;
1059
+ systemVersion?: string | undefined;
1060
+ } | {
1061
+ type: "command.toggle";
1062
+ actionFunctionName: string;
1063
+ systemVersion?: string | undefined;
1064
+ } | {
1065
+ type: "config.saved";
1066
+ actionFunctionName: string;
1067
+ systemVersion?: string | undefined;
1068
+ } | {
1069
+ type: "config.deleted";
1070
+ actionFunctionName: string;
1071
+ systemVersion?: string | undefined;
1072
+ } | {
1073
+ type: "widget.installed";
1074
+ actionFunctionName: string;
1075
+ targetId: string;
1076
+ systemVersion?: string | undefined;
1077
+ } | {
1078
+ type: "widget.uninstalled";
1079
+ actionFunctionName: string;
1080
+ targetId: string;
1081
+ systemVersion?: string | undefined;
1082
+ } | {
1083
+ type: "webhook.received";
1084
+ actionFunctionName: string;
1085
+ targetId: string;
1086
+ webhook: {
1087
+ endpointToken: string;
1088
+ executionScope?: "app" | undefined;
1089
+ } | {
1090
+ executionScope: "manager";
1091
+ };
1092
+ systemVersion?: string | undefined;
1093
+ } | {
1094
+ type: "oauth.connected";
1095
+ actionFunctionName: string;
1096
+ systemVersion?: string | undefined;
1097
+ authScope?: "manager" | "channel" | undefined;
1098
+ } | {
1099
+ type: "oauth.disconnected";
1100
+ actionFunctionName: string;
1101
+ systemVersion?: string | undefined;
1102
+ authScope?: "manager" | "channel" | undefined;
1103
+ } | {
1104
+ type: "oauth.beforeAuthorization";
1105
+ actionFunctionName: string;
1106
+ systemVersion?: string | undefined;
1107
+ authScope?: "manager" | "channel" | undefined;
1108
+ redirectOrigins?: string[] | undefined;
1109
+ display?: {
1110
+ title: string;
1111
+ description?: string | undefined;
1112
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
1113
+ i18nMap?: Record<string, {
1114
+ description?: string | undefined;
1115
+ title?: string | undefined;
1116
+ }> | undefined;
1117
+ } | undefined;
1118
+ } | {
1119
+ type: "oauth.afterAuthorization";
1120
+ actionFunctionName: string;
1121
+ systemVersion?: string | undefined;
1122
+ authScope?: "manager" | "channel" | undefined;
1123
+ redirectOrigins?: string[] | undefined;
1124
+ display?: {
1125
+ title: string;
1126
+ description?: string | undefined;
1127
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
1128
+ i18nMap?: Record<string, {
1129
+ description?: string | undefined;
1130
+ title?: string | undefined;
1131
+ }> | undefined;
1132
+ } | undefined;
1133
+ } | {
1134
+ type: "userChat.opened";
1135
+ actionFunctionName: string;
1136
+ systemVersion?: string | undefined;
1137
+ } | {
1138
+ type: "teamChat.messageCreated";
1139
+ actionFunctionName: string;
1140
+ systemVersion?: string | undefined;
1141
+ })[]>;
641
1142
  }, "strip", z.ZodTypeAny, {
642
1143
  hooks: ({
643
1144
  type: "app.installed";
@@ -684,10 +1185,42 @@ export declare const GetHooksOutputSchema: z.ZodObject<{
684
1185
  type: "oauth.connected";
685
1186
  actionFunctionName: string;
686
1187
  systemVersion?: string | undefined;
1188
+ authScope?: "manager" | "channel" | undefined;
687
1189
  } | {
688
1190
  type: "oauth.disconnected";
689
1191
  actionFunctionName: string;
690
1192
  systemVersion?: string | undefined;
1193
+ authScope?: "manager" | "channel" | undefined;
1194
+ } | {
1195
+ type: "oauth.beforeAuthorization";
1196
+ redirectOrigins: string[];
1197
+ actionFunctionName: string;
1198
+ systemVersion?: string | undefined;
1199
+ authScope?: "manager" | "channel" | undefined;
1200
+ display?: {
1201
+ title: string;
1202
+ description?: string | undefined;
1203
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
1204
+ i18nMap?: Record<string, {
1205
+ description?: string | undefined;
1206
+ title?: string | undefined;
1207
+ }> | undefined;
1208
+ } | undefined;
1209
+ } | {
1210
+ type: "oauth.afterAuthorization";
1211
+ redirectOrigins: string[];
1212
+ actionFunctionName: string;
1213
+ systemVersion?: string | undefined;
1214
+ authScope?: "manager" | "channel" | undefined;
1215
+ display?: {
1216
+ title: string;
1217
+ description?: string | undefined;
1218
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
1219
+ i18nMap?: Record<string, {
1220
+ description?: string | undefined;
1221
+ title?: string | undefined;
1222
+ }> | undefined;
1223
+ } | undefined;
691
1224
  } | {
692
1225
  type: "userChat.opened";
693
1226
  actionFunctionName: string;
@@ -743,10 +1276,42 @@ export declare const GetHooksOutputSchema: z.ZodObject<{
743
1276
  type: "oauth.connected";
744
1277
  actionFunctionName: string;
745
1278
  systemVersion?: string | undefined;
1279
+ authScope?: "manager" | "channel" | undefined;
746
1280
  } | {
747
1281
  type: "oauth.disconnected";
748
1282
  actionFunctionName: string;
749
1283
  systemVersion?: string | undefined;
1284
+ authScope?: "manager" | "channel" | undefined;
1285
+ } | {
1286
+ type: "oauth.beforeAuthorization";
1287
+ actionFunctionName: string;
1288
+ systemVersion?: string | undefined;
1289
+ authScope?: "manager" | "channel" | undefined;
1290
+ redirectOrigins?: string[] | undefined;
1291
+ display?: {
1292
+ title: string;
1293
+ description?: string | undefined;
1294
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
1295
+ i18nMap?: Record<string, {
1296
+ description?: string | undefined;
1297
+ title?: string | undefined;
1298
+ }> | undefined;
1299
+ } | undefined;
1300
+ } | {
1301
+ type: "oauth.afterAuthorization";
1302
+ actionFunctionName: string;
1303
+ systemVersion?: string | undefined;
1304
+ authScope?: "manager" | "channel" | undefined;
1305
+ redirectOrigins?: string[] | undefined;
1306
+ display?: {
1307
+ title: string;
1308
+ description?: string | undefined;
1309
+ icon?: "installation" | "account" | "organization" | "permission" | "settings" | undefined;
1310
+ i18nMap?: Record<string, {
1311
+ description?: string | undefined;
1312
+ title?: string | undefined;
1313
+ }> | undefined;
1314
+ } | undefined;
750
1315
  } | {
751
1316
  type: "userChat.opened";
752
1317
  actionFunctionName: string;