@channel.io/app-sdk-core 0.1.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 (109) hide show
  1. package/dist/errors/index.d.ts +35 -0
  2. package/dist/errors/index.d.ts.map +1 -0
  3. package/dist/errors/index.js +55 -0
  4. package/dist/errors/index.js.map +1 -0
  5. package/dist/extensions/alftask.d.ts +257 -0
  6. package/dist/extensions/alftask.d.ts.map +1 -0
  7. package/dist/extensions/alftask.js +55 -0
  8. package/dist/extensions/alftask.js.map +1 -0
  9. package/dist/extensions/apikey.d.ts +160 -0
  10. package/dist/extensions/apikey.d.ts.map +1 -0
  11. package/dist/extensions/apikey.js +41 -0
  12. package/dist/extensions/apikey.js.map +1 -0
  13. package/dist/extensions/calendar.d.ts +139 -0
  14. package/dist/extensions/calendar.d.ts.map +1 -0
  15. package/dist/extensions/calendar.js +55 -0
  16. package/dist/extensions/calendar.js.map +1 -0
  17. package/dist/extensions/command.d.ts +50 -0
  18. package/dist/extensions/command.d.ts.map +1 -0
  19. package/dist/extensions/command.js +31 -0
  20. package/dist/extensions/command.js.map +1 -0
  21. package/dist/extensions/customtab.d.ts +69 -0
  22. package/dist/extensions/customtab.d.ts.map +1 -0
  23. package/dist/extensions/customtab.js +38 -0
  24. package/dist/extensions/customtab.js.map +1 -0
  25. package/dist/extensions/index.d.ts +9 -0
  26. package/dist/extensions/index.d.ts.map +1 -0
  27. package/dist/extensions/index.js +17 -0
  28. package/dist/extensions/index.js.map +1 -0
  29. package/dist/extensions/interfaces/alftask.d.ts +58 -0
  30. package/dist/extensions/interfaces/alftask.d.ts.map +1 -0
  31. package/dist/extensions/interfaces/alftask.js +7 -0
  32. package/dist/extensions/interfaces/alftask.js.map +1 -0
  33. package/dist/extensions/interfaces/apikey.d.ts +66 -0
  34. package/dist/extensions/interfaces/apikey.d.ts.map +1 -0
  35. package/dist/extensions/interfaces/apikey.js +8 -0
  36. package/dist/extensions/interfaces/apikey.js.map +1 -0
  37. package/dist/extensions/interfaces/calendar.d.ts +153 -0
  38. package/dist/extensions/interfaces/calendar.d.ts.map +1 -0
  39. package/dist/extensions/interfaces/calendar.js +12 -0
  40. package/dist/extensions/interfaces/calendar.js.map +1 -0
  41. package/dist/extensions/interfaces/command.d.ts +92 -0
  42. package/dist/extensions/interfaces/command.d.ts.map +1 -0
  43. package/dist/extensions/interfaces/command.js +8 -0
  44. package/dist/extensions/interfaces/command.js.map +1 -0
  45. package/dist/extensions/interfaces/customtab.d.ts +82 -0
  46. package/dist/extensions/interfaces/customtab.d.ts.map +1 -0
  47. package/dist/extensions/interfaces/customtab.js +8 -0
  48. package/dist/extensions/interfaces/customtab.js.map +1 -0
  49. package/dist/extensions/interfaces/index.d.ts +25 -0
  50. package/dist/extensions/interfaces/index.d.ts.map +1 -0
  51. package/dist/extensions/interfaces/index.js +25 -0
  52. package/dist/extensions/interfaces/index.js.map +1 -0
  53. package/dist/extensions/interfaces/oauth.d.ts +78 -0
  54. package/dist/extensions/interfaces/oauth.d.ts.map +1 -0
  55. package/dist/extensions/interfaces/oauth.js +8 -0
  56. package/dist/extensions/interfaces/oauth.js.map +1 -0
  57. package/dist/extensions/interfaces/widget.d.ts +87 -0
  58. package/dist/extensions/interfaces/widget.d.ts.map +1 -0
  59. package/dist/extensions/interfaces/widget.js +8 -0
  60. package/dist/extensions/interfaces/widget.js.map +1 -0
  61. package/dist/extensions/oauth.d.ts +45 -0
  62. package/dist/extensions/oauth.d.ts.map +1 -0
  63. package/dist/extensions/oauth.js +21 -0
  64. package/dist/extensions/oauth.js.map +1 -0
  65. package/dist/extensions/widget.d.ts +90 -0
  66. package/dist/extensions/widget.d.ts.map +1 -0
  67. package/dist/extensions/widget.js +42 -0
  68. package/dist/extensions/widget.js.map +1 -0
  69. package/dist/index.d.ts +6 -0
  70. package/dist/index.d.ts.map +1 -0
  71. package/dist/index.js +11 -0
  72. package/dist/index.js.map +1 -0
  73. package/dist/schemas/extension.d.ts +15 -0
  74. package/dist/schemas/extension.d.ts.map +1 -0
  75. package/dist/schemas/extension.js +39 -0
  76. package/dist/schemas/extension.js.map +1 -0
  77. package/dist/schemas/function.d.ts +7 -0
  78. package/dist/schemas/function.d.ts.map +1 -0
  79. package/dist/schemas/function.js +31 -0
  80. package/dist/schemas/function.js.map +1 -0
  81. package/dist/schemas/index.d.ts +3 -0
  82. package/dist/schemas/index.d.ts.map +1 -0
  83. package/dist/schemas/index.js +3 -0
  84. package/dist/schemas/index.js.map +1 -0
  85. package/dist/types/context.d.ts +55 -0
  86. package/dist/types/context.d.ts.map +1 -0
  87. package/dist/types/context.js +2 -0
  88. package/dist/types/context.js.map +1 -0
  89. package/dist/types/extension.d.ts +53 -0
  90. package/dist/types/extension.d.ts.map +1 -0
  91. package/dist/types/extension.js +2 -0
  92. package/dist/types/extension.js.map +1 -0
  93. package/dist/types/function.d.ts +58 -0
  94. package/dist/types/function.d.ts.map +1 -0
  95. package/dist/types/function.js +2 -0
  96. package/dist/types/function.js.map +1 -0
  97. package/dist/types/index.d.ts +4 -0
  98. package/dist/types/index.d.ts.map +1 -0
  99. package/dist/types/index.js +4 -0
  100. package/dist/types/index.js.map +1 -0
  101. package/dist/utils/index.d.ts +2 -0
  102. package/dist/utils/index.d.ts.map +1 -0
  103. package/dist/utils/index.js +2 -0
  104. package/dist/utils/index.js.map +1 -0
  105. package/dist/utils/zod-to-json-schema.d.ts +6 -0
  106. package/dist/utils/zod-to-json-schema.d.ts.map +1 -0
  107. package/dist/utils/zod-to-json-schema.js +10 -0
  108. package/dist/utils/zod-to-json-schema.js.map +1 -0
  109. package/package.json +44 -0
@@ -0,0 +1,139 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Calendar schema
4
+ */
5
+ export declare const CalendarSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ name: z.ZodString;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ timezone: z.ZodOptional<z.ZodString>;
10
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ name: string;
13
+ id: string;
14
+ description?: string | undefined;
15
+ timezone?: string | undefined;
16
+ isPrimary?: boolean | undefined;
17
+ }, {
18
+ name: string;
19
+ id: string;
20
+ description?: string | undefined;
21
+ timezone?: string | undefined;
22
+ isPrimary?: boolean | undefined;
23
+ }>;
24
+ export type Calendar = z.infer<typeof CalendarSchema>;
25
+ /**
26
+ * Event type schema
27
+ */
28
+ export declare const EventTypeSchema: z.ZodObject<{
29
+ id: z.ZodString;
30
+ name: z.ZodString;
31
+ duration: z.ZodNumber;
32
+ description: z.ZodOptional<z.ZodString>;
33
+ color: z.ZodOptional<z.ZodString>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ name: string;
36
+ id: string;
37
+ duration: number;
38
+ description?: string | undefined;
39
+ color?: string | undefined;
40
+ }, {
41
+ name: string;
42
+ id: string;
43
+ duration: number;
44
+ description?: string | undefined;
45
+ color?: string | undefined;
46
+ }>;
47
+ export type EventType = z.infer<typeof EventTypeSchema>;
48
+ /**
49
+ * Time slot schema
50
+ */
51
+ export declare const TimeSlotSchema: z.ZodObject<{
52
+ startTime: z.ZodString;
53
+ endTime: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ startTime: string;
56
+ endTime: string;
57
+ }, {
58
+ startTime: string;
59
+ endTime: string;
60
+ }>;
61
+ export type TimeSlot = z.infer<typeof TimeSlotSchema>;
62
+ /**
63
+ * Attendee schema
64
+ */
65
+ export declare const AttendeeSchema: z.ZodObject<{
66
+ name: z.ZodString;
67
+ email: z.ZodString;
68
+ phone: z.ZodOptional<z.ZodString>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ name: string;
71
+ email: string;
72
+ phone?: string | undefined;
73
+ }, {
74
+ name: string;
75
+ email: string;
76
+ phone?: string | undefined;
77
+ }>;
78
+ export type Attendee = z.infer<typeof AttendeeSchema>;
79
+ /**
80
+ * Booking status
81
+ */
82
+ export declare const BookingStatus: z.ZodEnum<["confirmed", "cancelled", "pending"]>;
83
+ export type BookingStatus = z.infer<typeof BookingStatus>;
84
+ /**
85
+ * Booking schema
86
+ */
87
+ export declare const BookingSchema: z.ZodObject<{
88
+ id: z.ZodString;
89
+ eventTypeId: z.ZodString;
90
+ startTime: z.ZodString;
91
+ endTime: z.ZodString;
92
+ attendee: z.ZodObject<{
93
+ name: z.ZodString;
94
+ email: z.ZodString;
95
+ phone: z.ZodOptional<z.ZodString>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ name: string;
98
+ email: string;
99
+ phone?: string | undefined;
100
+ }, {
101
+ name: string;
102
+ email: string;
103
+ phone?: string | undefined;
104
+ }>;
105
+ status: z.ZodEnum<["confirmed", "cancelled", "pending"]>;
106
+ notes: z.ZodOptional<z.ZodString>;
107
+ meetingUrl: z.ZodOptional<z.ZodString>;
108
+ calendarEventId: z.ZodOptional<z.ZodString>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ status: "confirmed" | "cancelled" | "pending";
111
+ id: string;
112
+ startTime: string;
113
+ endTime: string;
114
+ eventTypeId: string;
115
+ attendee: {
116
+ name: string;
117
+ email: string;
118
+ phone?: string | undefined;
119
+ };
120
+ notes?: string | undefined;
121
+ meetingUrl?: string | undefined;
122
+ calendarEventId?: string | undefined;
123
+ }, {
124
+ status: "confirmed" | "cancelled" | "pending";
125
+ id: string;
126
+ startTime: string;
127
+ endTime: string;
128
+ eventTypeId: string;
129
+ attendee: {
130
+ name: string;
131
+ email: string;
132
+ phone?: string | undefined;
133
+ };
134
+ notes?: string | undefined;
135
+ meetingUrl?: string | undefined;
136
+ calendarEventId?: string | undefined;
137
+ }>;
138
+ export type Booking = z.infer<typeof BookingSchema>;
139
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/extensions/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;EAM1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;EAGzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;EAIzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,aAAa,kDAAgD,CAAC;AAC3E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Calendar schema
4
+ */
5
+ export const CalendarSchema = z.object({
6
+ id: z.string(),
7
+ name: z.string(),
8
+ description: z.string().optional(),
9
+ timezone: z.string().optional(),
10
+ isPrimary: z.boolean().optional(),
11
+ });
12
+ /**
13
+ * Event type schema
14
+ */
15
+ export const EventTypeSchema = z.object({
16
+ id: z.string(),
17
+ name: z.string(),
18
+ duration: z.number(),
19
+ description: z.string().optional(),
20
+ color: z.string().optional(),
21
+ });
22
+ /**
23
+ * Time slot schema
24
+ */
25
+ export const TimeSlotSchema = z.object({
26
+ startTime: z.string(),
27
+ endTime: z.string(),
28
+ });
29
+ /**
30
+ * Attendee schema
31
+ */
32
+ export const AttendeeSchema = z.object({
33
+ name: z.string(),
34
+ email: z.string().email(),
35
+ phone: z.string().optional(),
36
+ });
37
+ /**
38
+ * Booking status
39
+ */
40
+ export const BookingStatus = z.enum(["confirmed", "cancelled", "pending"]);
41
+ /**
42
+ * Booking schema
43
+ */
44
+ export const BookingSchema = z.object({
45
+ id: z.string(),
46
+ eventTypeId: z.string(),
47
+ startTime: z.string(),
48
+ endTime: z.string(),
49
+ attendee: AttendeeSchema,
50
+ status: BookingStatus,
51
+ notes: z.string().optional(),
52
+ meetingUrl: z.string().optional(),
53
+ calendarEventId: z.string().optional(),
54
+ });
55
+ //# sourceMappingURL=calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/extensions/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;AAG3E;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Command suggestion schema
4
+ */
5
+ export declare const CommandSuggestionSchema: z.ZodObject<{
6
+ value: z.ZodString;
7
+ label: z.ZodString;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ icon: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ value: string;
12
+ label: string;
13
+ description?: string | undefined;
14
+ icon?: string | undefined;
15
+ }, {
16
+ value: string;
17
+ label: string;
18
+ description?: string | undefined;
19
+ icon?: string | undefined;
20
+ }>;
21
+ export type CommandSuggestion = z.infer<typeof CommandSuggestionSchema>;
22
+ /**
23
+ * Command result action types
24
+ */
25
+ export declare const CommandResultActionType: z.ZodEnum<["sendMessage", "insertText", "openWam", "openUrl", "none"]>;
26
+ export type CommandResultActionType = z.infer<typeof CommandResultActionType>;
27
+ /**
28
+ * Command result schema
29
+ */
30
+ export declare const CommandResultSchema: z.ZodObject<{
31
+ action: z.ZodEnum<["sendMessage", "insertText", "openWam", "openUrl", "none"]>;
32
+ text: z.ZodOptional<z.ZodString>;
33
+ wamName: z.ZodOptional<z.ZodString>;
34
+ wamParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
+ url: z.ZodOptional<z.ZodString>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ action: "none" | "sendMessage" | "insertText" | "openWam" | "openUrl";
38
+ text?: string | undefined;
39
+ wamName?: string | undefined;
40
+ wamParams?: Record<string, unknown> | undefined;
41
+ url?: string | undefined;
42
+ }, {
43
+ action: "none" | "sendMessage" | "insertText" | "openWam" | "openUrl";
44
+ text?: string | undefined;
45
+ wamName?: string | undefined;
46
+ wamParams?: Record<string, unknown> | undefined;
47
+ url?: string | undefined;
48
+ }>;
49
+ export type CommandResult = z.infer<typeof CommandResultSchema>;
50
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/extensions/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,uBAAuB,wEAMlC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Command suggestion schema
4
+ */
5
+ export const CommandSuggestionSchema = z.object({
6
+ value: z.string(),
7
+ label: z.string(),
8
+ description: z.string().optional(),
9
+ icon: z.string().optional(),
10
+ });
11
+ /**
12
+ * Command result action types
13
+ */
14
+ export const CommandResultActionType = z.enum([
15
+ "sendMessage",
16
+ "insertText",
17
+ "openWam",
18
+ "openUrl",
19
+ "none",
20
+ ]);
21
+ /**
22
+ * Command result schema
23
+ */
24
+ export const CommandResultSchema = z.object({
25
+ action: CommandResultActionType,
26
+ text: z.string().optional(),
27
+ wamName: z.string().optional(),
28
+ wamParams: z.record(z.unknown()).optional(),
29
+ url: z.string().optional(),
30
+ });
31
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/extensions/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5C,aAAa;IACb,YAAY;IACZ,SAAS;IACT,SAAS;IACT,MAAM;CACP,CAAC,CAAC;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,uBAAuB;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * I18n name for custom tab
4
+ */
5
+ export declare const CustomTabNameI18nSchema: z.ZodObject<{
6
+ name: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ name: string;
9
+ }, {
10
+ name: string;
11
+ }>;
12
+ export type CustomTabNameI18n = z.infer<typeof CustomTabNameI18nSchema>;
13
+ /**
14
+ * Custom tab configuration schema
15
+ */
16
+ export declare const CustomTabConfigSchema: z.ZodObject<{
17
+ /**
18
+ * Tab name (displayed in the Desk UI)
19
+ */
20
+ name: z.ZodString;
21
+ /**
22
+ * i18n name map keyed by language code (e.g., "ko", "en", "ja")
23
+ */
24
+ nameI18nMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
25
+ name: z.ZodString;
26
+ }, "strip", z.ZodTypeAny, {
27
+ name: string;
28
+ }, {
29
+ name: string;
30
+ }>>>;
31
+ /**
32
+ * Icon URL or icon name
33
+ */
34
+ icon: z.ZodOptional<z.ZodString>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ name: string;
37
+ icon?: string | undefined;
38
+ nameI18nMap?: Record<string, {
39
+ name: string;
40
+ }> | undefined;
41
+ }, {
42
+ name: string;
43
+ icon?: string | undefined;
44
+ nameI18nMap?: Record<string, {
45
+ name: string;
46
+ }> | undefined;
47
+ }>;
48
+ export type CustomTabConfig = z.infer<typeof CustomTabConfigSchema>;
49
+ /**
50
+ * Custom tab content schema
51
+ */
52
+ export declare const CustomTabContentSchema: z.ZodObject<{
53
+ /**
54
+ * WAM name to render in the custom tab
55
+ */
56
+ wamName: z.ZodString;
57
+ /**
58
+ * Additional parameters to pass to the WAM
59
+ */
60
+ wamParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ wamName: string;
63
+ wamParams?: Record<string, unknown> | undefined;
64
+ }, {
65
+ wamName: string;
66
+ wamParams?: Record<string, unknown> | undefined;
67
+ }>;
68
+ export type CustomTabContent = z.infer<typeof CustomTabContentSchema>;
69
+ //# sourceMappingURL=customtab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customtab.d.ts","sourceRoot":"","sources":["../../src/extensions/customtab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,qBAAqB;IAChC;;OAEG;;IAEH;;OAEG;;;;;;;;IAEH;;OAEG;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,sBAAsB;IACjC;;OAEG;;IAEH;;OAEG;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * I18n name for custom tab
4
+ */
5
+ export const CustomTabNameI18nSchema = z.object({
6
+ name: z.string().min(1).max(30),
7
+ });
8
+ /**
9
+ * Custom tab configuration schema
10
+ */
11
+ export const CustomTabConfigSchema = z.object({
12
+ /**
13
+ * Tab name (displayed in the Desk UI)
14
+ */
15
+ name: z.string().min(1).max(30),
16
+ /**
17
+ * i18n name map keyed by language code (e.g., "ko", "en", "ja")
18
+ */
19
+ nameI18nMap: z.record(CustomTabNameI18nSchema).optional(),
20
+ /**
21
+ * Icon URL or icon name
22
+ */
23
+ icon: z.string().optional(),
24
+ });
25
+ /**
26
+ * Custom tab content schema
27
+ */
28
+ export const CustomTabContentSchema = z.object({
29
+ /**
30
+ * WAM name to render in the custom tab
31
+ */
32
+ wamName: z.string(),
33
+ /**
34
+ * Additional parameters to pass to the WAM
35
+ */
36
+ wamParams: z.record(z.unknown()).optional(),
37
+ });
38
+ //# sourceMappingURL=customtab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customtab.js","sourceRoot":"","sources":["../../src/extensions/customtab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;CAChC,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAC/B;;OAEG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IACzD;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB;;OAEG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { OAuthConfigSchema, CredentialValidationResultSchema, type OAuthConfig, type CredentialValidationResult, } from "./oauth.js";
2
+ export { ApiKeyFieldType, ApiKeyFieldOptionSchema, ApiKeyFieldSchema, ApiKeyConfigSchema, ApiKeyValidationResultSchema, type ApiKeyFieldOption, type ApiKeyField, type ApiKeyConfig, type ApiKeyValidationResult, } from "./apikey.js";
3
+ export { CalendarSchema, EventTypeSchema, TimeSlotSchema, AttendeeSchema, BookingStatus, BookingSchema, type Calendar, type EventType, type TimeSlot, type Attendee, type Booking, } from "./calendar.js";
4
+ export { CommandSuggestionSchema, CommandResultActionType, CommandResultSchema, type CommandSuggestion, type CommandResult, } from "./command.js";
5
+ export { WidgetScope, WidgetType, NameDescI18nSchema, WidgetConfigSchema, WidgetActionResultSchema, type NameDescI18n, type WidgetConfig, type WidgetActionResult, } from "./widget.js";
6
+ export { CustomTabNameI18nSchema, CustomTabConfigSchema, CustomTabContentSchema, type CustomTabNameI18n, type CustomTabConfig, type CustomTabContent, } from "./customtab.js";
7
+ export { MemoryDefinitionSchema, WorkflowNodeSchema, PredefinedTaskSchema, GetAlfTasksResponseSchema, type MemoryDefinition, type WorkflowNode, type PredefinedTask, type GetAlfTasksResponse, } from "./alftask.js";
8
+ export * from "./interfaces/index.js";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,gCAAgC,EAChC,KAAK,WAAW,EAChB,KAAK,0BAA0B,GAChC,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,4BAA4B,EAC5B,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,sBAAsB,GAC5B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,OAAO,GACb,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAC;AAGtB,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,17 @@
1
+ // OAuth Extension Schemas (v1)
2
+ export { OAuthConfigSchema, CredentialValidationResultSchema, } from "./oauth.js";
3
+ // API Key Extension Schemas (v1)
4
+ export { ApiKeyFieldType, ApiKeyFieldOptionSchema, ApiKeyFieldSchema, ApiKeyConfigSchema, ApiKeyValidationResultSchema, } from "./apikey.js";
5
+ // Calendar Extension Schemas (v1)
6
+ export { CalendarSchema, EventTypeSchema, TimeSlotSchema, AttendeeSchema, BookingStatus, BookingSchema, } from "./calendar.js";
7
+ // Command Extension Schemas (v1)
8
+ export { CommandSuggestionSchema, CommandResultActionType, CommandResultSchema, } from "./command.js";
9
+ // Widget Extension Schemas (v1)
10
+ export { WidgetScope, WidgetType, NameDescI18nSchema, WidgetConfigSchema, WidgetActionResultSchema, } from "./widget.js";
11
+ // Custom Tab Extension Schemas (v1)
12
+ export { CustomTabNameI18nSchema, CustomTabConfigSchema, CustomTabContentSchema, } from "./customtab.js";
13
+ // ALF Task Extension Schemas (v1)
14
+ export { MemoryDefinitionSchema, WorkflowNodeSchema, PredefinedTaskSchema, GetAlfTasksResponseSchema, } from "./alftask.js";
15
+ // Extension Interfaces (for implementing extensions)
16
+ export * from "./interfaces/index.js";
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EACL,iBAAiB,EACjB,gCAAgC,GAGjC,MAAM,YAAY,CAAC;AAEpB,iCAAiC;AACjC,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,4BAA4B,GAK7B,MAAM,aAAa,CAAC;AAErB,kCAAkC;AAClC,OAAO,EACL,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,aAAa,GAMd,MAAM,eAAe,CAAC;AAEvB,iCAAiC;AACjC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,GAGpB,MAAM,cAAc,CAAC;AAEtB,gCAAgC;AAChC,OAAO,EACL,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,GAIzB,MAAM,aAAa,CAAC;AAErB,oCAAoC;AACpC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,GAIvB,MAAM,gBAAgB,CAAC;AAExB,kCAAkC;AAClC,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,GAK1B,MAAM,cAAc,CAAC;AAEtB,qDAAqD;AACrD,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { GetAlfTasksResponse } from "../alftask.js";
2
+ import type { ExtensionContext } from "./oauth.js";
3
+ /**
4
+ * ALF Task Extension Input Types
5
+ */
6
+ export interface GetAlfTasksInput {
7
+ /** Optional version filter */
8
+ version?: string;
9
+ }
10
+ /**
11
+ * ALF Task Extension Interface
12
+ *
13
+ * Implement this interface to create ALF (AI Learning Framework) task definitions.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * @Extension({ name: "alftask", systemVersion: "v1" })
18
+ * export class MyAlfTaskExtension implements AlfTaskExtensionInterface {
19
+ * @Func("alftask.getTasks")
20
+ * async getTasks(ctx, params): Promise<GetAlfTasksResponse> {
21
+ * return {
22
+ * predefinedTasks: [
23
+ * {
24
+ * version: "v1.0.0",
25
+ * name: "Auto-categorize ticket",
26
+ * trigger: "on_ticket_created",
27
+ * memorySchema: [
28
+ * { name: "category", type: "string", description: "Ticket category" },
29
+ * ],
30
+ * nodes: [
31
+ * { id: "classify", type: "ai_classify", next: "save" },
32
+ * { id: "save", type: "save_result" },
33
+ * ],
34
+ * startNodeId: "classify",
35
+ * },
36
+ * ],
37
+ * };
38
+ * }
39
+ * }
40
+ * ```
41
+ */
42
+ export interface AlfTaskExtensionInterface {
43
+ /**
44
+ * Get predefined ALF tasks
45
+ *
46
+ * Function name: "alftask.getTasks"
47
+ *
48
+ * @returns List of predefined task configurations
49
+ */
50
+ getTasks(ctx: ExtensionContext, params: GetAlfTasksInput): Promise<GetAlfTasksResponse>;
51
+ }
52
+ /**
53
+ * ALF Task Extension Function Names
54
+ */
55
+ export declare const AlfTaskFunctionNames: {
56
+ readonly getTasks: "alftask.getTasks";
57
+ };
58
+ //# sourceMappingURL=alftask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alftask.d.ts","sourceRoot":"","sources":["../../../src/extensions/interfaces/alftask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACzF;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB;;CAEvB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * ALF Task Extension Function Names
3
+ */
4
+ export const AlfTaskFunctionNames = {
5
+ getTasks: "alftask.getTasks",
6
+ };
7
+ //# sourceMappingURL=alftask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alftask.js","sourceRoot":"","sources":["../../../src/extensions/interfaces/alftask.ts"],"names":[],"mappings":"AAsDA;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,QAAQ,EAAE,kBAAkB;CACpB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import type { ApiKeyConfig, ApiKeyValidationResult } from "../apikey.js";
2
+ import type { ExtensionContext } from "./oauth.js";
3
+ /**
4
+ * API Key Extension Interface
5
+ *
6
+ * Implement this interface to create an API key-based authentication extension.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * @Extension({ name: "apikey", systemVersion: "v1" })
11
+ * export class MyApiKeyExtension implements ApiKeyExtensionInterface {
12
+ * @Func("apikey.getConfig")
13
+ * @OutputSchema(ApiKeyConfigSchema)
14
+ * async getConfig(ctx: ExtensionContext): Promise<ApiKeyConfig> {
15
+ * return {
16
+ * fields: [
17
+ * { name: "apiKey", label: "API Key", type: "password", required: true },
18
+ * { name: "region", label: "Region", type: "select", options: [...] },
19
+ * ],
20
+ * instructions: "Get your API key from the settings page",
21
+ * };
22
+ * }
23
+ *
24
+ * @Func("apikey.validateCredential")
25
+ * @InputSchema(ValidateApiKeyInputSchema)
26
+ * @OutputSchema(ApiKeyValidationResultSchema)
27
+ * async validateCredential(
28
+ * ctx: ExtensionContext,
29
+ * params: { credentials: Record<string, string> }
30
+ * ): Promise<ApiKeyValidationResult> {
31
+ * // Validate the API key
32
+ * return { valid: true };
33
+ * }
34
+ * }
35
+ * ```
36
+ */
37
+ export interface ApiKeyExtensionInterface {
38
+ /**
39
+ * Get API key form configuration
40
+ *
41
+ * Function name: "apikey.getConfig"
42
+ *
43
+ * @returns Configuration for the API key input form
44
+ */
45
+ getConfig(ctx: ExtensionContext): Promise<ApiKeyConfig>;
46
+ /**
47
+ * Validate API key credentials
48
+ *
49
+ * Function name: "apikey.validateCredential"
50
+ *
51
+ * @param ctx - Extension context
52
+ * @param params - Contains the credentials to validate (key-value pairs)
53
+ * @returns Validation result
54
+ */
55
+ validateCredential(ctx: ExtensionContext, params: {
56
+ credentials: Record<string, string>;
57
+ }): Promise<ApiKeyValidationResult>;
58
+ }
59
+ /**
60
+ * API Key Extension Function Names
61
+ */
62
+ export declare const ApiKeyFunctionNames: {
63
+ readonly getConfig: "apikey.getConfig";
64
+ readonly validateCredential: "apikey.validateCredential";
65
+ };
66
+ //# sourceMappingURL=apikey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apikey.d.ts","sourceRoot":"","sources":["../../../src/extensions/interfaces/apikey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAExD;;;;;;;;OAQG;IACH,kBAAkB,CAChB,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAC9C,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * API Key Extension Function Names
3
+ */
4
+ export const ApiKeyFunctionNames = {
5
+ getConfig: "apikey.getConfig",
6
+ validateCredential: "apikey.validateCredential",
7
+ };
8
+ //# sourceMappingURL=apikey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apikey.js","sourceRoot":"","sources":["../../../src/extensions/interfaces/apikey.ts"],"names":[],"mappings":"AA8DA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS,EAAE,kBAAkB;IAC7B,kBAAkB,EAAE,2BAA2B;CACvC,CAAC"}