@slates/proto 1.0.0-rc.12 → 1.0.0-rc.13
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.
- package/dist/index.cjs +41 -3
- package/dist/index.d.cts +340 -1
- package/dist/index.d.ts +340 -1
- package/dist/index.module.js +38 -3
- package/package.json +1 -1
- package/src/messages/action.ts +17 -2
- package/src/types/action.ts +35 -1
package/dist/index.cjs
CHANGED
|
@@ -104,6 +104,9 @@ __export(index_exports, {
|
|
|
104
104
|
slatesRequestTraceTextBody: () => slatesRequestTraceTextBody,
|
|
105
105
|
slatesRequestsByMethod: () => slatesRequestsByMethod,
|
|
106
106
|
slatesResponsesByMethod: () => slatesResponsesByMethod,
|
|
107
|
+
slatesWebhookHttp: () => slatesWebhookHttp,
|
|
108
|
+
slatesWebhookHttpResponse: () => slatesWebhookHttpResponse,
|
|
109
|
+
slatesWebhookRequestMatcher: () => slatesWebhookRequestMatcher,
|
|
107
110
|
withRequestTraces: () => withRequestTraces
|
|
108
111
|
});
|
|
109
112
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -149,6 +152,27 @@ var slatesActionTool = slatesActionBase.extend({
|
|
|
149
152
|
type: import_zod.default.literal("action.tool"),
|
|
150
153
|
capabilities: import_zod.default.object({})
|
|
151
154
|
});
|
|
155
|
+
var slatesWebhookRequestMatcher = import_zod.default.object({
|
|
156
|
+
method: import_zod.default.string().optional(),
|
|
157
|
+
hasQueryParam: import_zod.default.string().optional(),
|
|
158
|
+
hasHeader: import_zod.default.string().optional(),
|
|
159
|
+
jsonBodyField: import_zod.default.object({
|
|
160
|
+
path: import_zod.default.string(),
|
|
161
|
+
equals: import_zod.default.string().optional()
|
|
162
|
+
}).optional(),
|
|
163
|
+
formBodyField: import_zod.default.object({
|
|
164
|
+
path: import_zod.default.string(),
|
|
165
|
+
equals: import_zod.default.string().optional()
|
|
166
|
+
}).optional()
|
|
167
|
+
});
|
|
168
|
+
var slatesWebhookHttp = import_zod.default.object({
|
|
169
|
+
methods: import_zod.default.array(import_zod.default.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"])).optional(),
|
|
170
|
+
sync: import_zod.default.object({
|
|
171
|
+
mode: import_zod.default.enum(["never", "match", "always"]),
|
|
172
|
+
match: import_zod.default.array(slatesWebhookRequestMatcher).optional(),
|
|
173
|
+
timeoutMs: import_zod.default.number().int().positive().max(15e3).optional()
|
|
174
|
+
}).optional()
|
|
175
|
+
});
|
|
152
176
|
var slatesActionTrigger = slatesActionBase.extend({
|
|
153
177
|
type: import_zod.default.literal("action.trigger"),
|
|
154
178
|
capabilities: import_zod.default.object({}),
|
|
@@ -160,7 +184,8 @@ var slatesActionTrigger = slatesActionBase.extend({
|
|
|
160
184
|
import_zod.default.object({
|
|
161
185
|
type: import_zod.default.literal("webhook"),
|
|
162
186
|
autoRegistration: import_zod.default.boolean(),
|
|
163
|
-
autoUnregistration: import_zod.default.boolean()
|
|
187
|
+
autoUnregistration: import_zod.default.boolean(),
|
|
188
|
+
http: slatesWebhookHttp.optional()
|
|
164
189
|
})
|
|
165
190
|
])
|
|
166
191
|
});
|
|
@@ -251,6 +276,14 @@ var withRequestTraces = (shape) => import_zod4.default.object({
|
|
|
251
276
|
});
|
|
252
277
|
|
|
253
278
|
// src/messages/action.ts
|
|
279
|
+
var slatesWebhookHttpResponse = import_zod5.default.object({
|
|
280
|
+
status: import_zod5.default.number().int().min(100).max(599),
|
|
281
|
+
headers: import_zod5.default.record(import_zod5.default.string(), import_zod5.default.string()),
|
|
282
|
+
body: import_zod5.default.object({
|
|
283
|
+
encoding: import_zod5.default.literal("base64"),
|
|
284
|
+
content: import_zod5.default.string()
|
|
285
|
+
}).nullable()
|
|
286
|
+
});
|
|
254
287
|
var slatesMessageActionsListRequest = import_zod5.default.object({
|
|
255
288
|
jsonrpc: import_zod5.default.literal("2.0"),
|
|
256
289
|
method: import_zod5.default.literal("slates/actions.list"),
|
|
@@ -360,7 +393,8 @@ var slatesMessageActionTriggerWebhookHandleRequest = import_zod5.default.object(
|
|
|
360
393
|
encoding: import_zod5.default.literal("base64"),
|
|
361
394
|
content: import_zod5.default.string()
|
|
362
395
|
}).nullable(),
|
|
363
|
-
state: import_zod5.default.any().nullable()
|
|
396
|
+
state: import_zod5.default.any().nullable(),
|
|
397
|
+
registrationDetails: import_zod5.default.any().nullable().optional()
|
|
364
398
|
})
|
|
365
399
|
});
|
|
366
400
|
var slatesMessageActionTriggerWebhookHandleResponse = import_zod5.default.object({
|
|
@@ -368,7 +402,8 @@ var slatesMessageActionTriggerWebhookHandleResponse = import_zod5.default.object
|
|
|
368
402
|
id: import_zod5.default.string(),
|
|
369
403
|
result: withRequestTraces({
|
|
370
404
|
inputs: import_zod5.default.array(import_zod5.default.record(import_zod5.default.string(), import_zod5.default.any())),
|
|
371
|
-
updatedState: import_zod5.default.any().nullable().optional()
|
|
405
|
+
updatedState: import_zod5.default.any().nullable().optional(),
|
|
406
|
+
response: slatesWebhookHttpResponse.nullable().optional()
|
|
372
407
|
})
|
|
373
408
|
});
|
|
374
409
|
var slatesMessageActionTriggerWebhookRegisterRequest = import_zod5.default.object({
|
|
@@ -1127,5 +1162,8 @@ var mapUnknownErrorToSlateErrorResponse = (error, defaults = {}) => ({
|
|
|
1127
1162
|
slatesRequestTraceTextBody,
|
|
1128
1163
|
slatesRequestsByMethod,
|
|
1129
1164
|
slatesResponsesByMethod,
|
|
1165
|
+
slatesWebhookHttp,
|
|
1166
|
+
slatesWebhookHttpResponse,
|
|
1167
|
+
slatesWebhookRequestMatcher,
|
|
1130
1168
|
withRequestTraces
|
|
1131
1169
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import z, { z as z$1 } from 'zod';
|
|
2
2
|
|
|
3
|
+
declare let slatesWebhookHttpResponse: z.ZodObject<{
|
|
4
|
+
status: z.ZodNumber;
|
|
5
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6
|
+
body: z.ZodNullable<z.ZodObject<{
|
|
7
|
+
encoding: z.ZodLiteral<"base64">;
|
|
8
|
+
content: z.ZodString;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
type SlatesWebhookHttpResponse = z.infer<typeof slatesWebhookHttpResponse>;
|
|
3
12
|
/**
|
|
4
13
|
* List Actions
|
|
5
14
|
*/
|
|
@@ -73,6 +82,38 @@ declare let slatesMessageActionsListResponse: z.ZodObject<{
|
|
|
73
82
|
type: z.ZodLiteral<"webhook">;
|
|
74
83
|
autoRegistration: z.ZodBoolean;
|
|
75
84
|
autoUnregistration: z.ZodBoolean;
|
|
85
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
87
|
+
GET: "GET";
|
|
88
|
+
POST: "POST";
|
|
89
|
+
PUT: "PUT";
|
|
90
|
+
PATCH: "PATCH";
|
|
91
|
+
DELETE: "DELETE";
|
|
92
|
+
HEAD: "HEAD";
|
|
93
|
+
OPTIONS: "OPTIONS";
|
|
94
|
+
}>>>;
|
|
95
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
mode: z.ZodEnum<{
|
|
97
|
+
never: "never";
|
|
98
|
+
match: "match";
|
|
99
|
+
always: "always";
|
|
100
|
+
}>;
|
|
101
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
method: z.ZodOptional<z.ZodString>;
|
|
103
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
104
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
105
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
path: z.ZodString;
|
|
107
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
path: z.ZodString;
|
|
111
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
114
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
}, z.core.$strip>>;
|
|
76
117
|
}, z.core.$strip>]>;
|
|
77
118
|
}, z.core.$strip>]>>;
|
|
78
119
|
}, z.core.$strip>;
|
|
@@ -153,6 +194,38 @@ declare let slatesMessageActionGetResponse: z.ZodObject<{
|
|
|
153
194
|
type: z.ZodLiteral<"webhook">;
|
|
154
195
|
autoRegistration: z.ZodBoolean;
|
|
155
196
|
autoUnregistration: z.ZodBoolean;
|
|
197
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
199
|
+
GET: "GET";
|
|
200
|
+
POST: "POST";
|
|
201
|
+
PUT: "PUT";
|
|
202
|
+
PATCH: "PATCH";
|
|
203
|
+
DELETE: "DELETE";
|
|
204
|
+
HEAD: "HEAD";
|
|
205
|
+
OPTIONS: "OPTIONS";
|
|
206
|
+
}>>>;
|
|
207
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
mode: z.ZodEnum<{
|
|
209
|
+
never: "never";
|
|
210
|
+
match: "match";
|
|
211
|
+
always: "always";
|
|
212
|
+
}>;
|
|
213
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
214
|
+
method: z.ZodOptional<z.ZodString>;
|
|
215
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
216
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
217
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
218
|
+
path: z.ZodString;
|
|
219
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
222
|
+
path: z.ZodString;
|
|
223
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
226
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
}, z.core.$strip>>;
|
|
156
229
|
}, z.core.$strip>]>;
|
|
157
230
|
}, z.core.$strip>]>;
|
|
158
231
|
}, z.core.$strip>;
|
|
@@ -337,6 +410,7 @@ declare let slatesMessageActionTriggerWebhookHandleRequest: z.ZodObject<{
|
|
|
337
410
|
content: z.ZodString;
|
|
338
411
|
}, z.core.$strip>>;
|
|
339
412
|
state: z.ZodNullable<z.ZodAny>;
|
|
413
|
+
registrationDetails: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
340
414
|
}, z.core.$strip>;
|
|
341
415
|
}, z.core.$strip>;
|
|
342
416
|
type SlatesMessageActionTriggerWebhookHandleRequest = z.infer<typeof slatesMessageActionTriggerWebhookHandleRequest>;
|
|
@@ -346,6 +420,14 @@ declare let slatesMessageActionTriggerWebhookHandleResponse: z.ZodObject<{
|
|
|
346
420
|
result: z.ZodObject<{
|
|
347
421
|
inputs: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
348
422
|
updatedState: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
423
|
+
response: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
424
|
+
status: z.ZodNumber;
|
|
425
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
426
|
+
body: z.ZodNullable<z.ZodObject<{
|
|
427
|
+
encoding: z.ZodLiteral<"base64">;
|
|
428
|
+
content: z.ZodString;
|
|
429
|
+
}, z.core.$strip>>;
|
|
430
|
+
}, z.core.$strip>>>;
|
|
349
431
|
requestTraces: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
350
432
|
startedAt: z.ZodString;
|
|
351
433
|
durationMs: z.ZodNumber;
|
|
@@ -543,6 +625,38 @@ declare let slatesActionResponsesByMethod: {
|
|
|
543
625
|
type: z.ZodLiteral<"webhook">;
|
|
544
626
|
autoRegistration: z.ZodBoolean;
|
|
545
627
|
autoUnregistration: z.ZodBoolean;
|
|
628
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
629
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
630
|
+
GET: "GET";
|
|
631
|
+
POST: "POST";
|
|
632
|
+
PUT: "PUT";
|
|
633
|
+
PATCH: "PATCH";
|
|
634
|
+
DELETE: "DELETE";
|
|
635
|
+
HEAD: "HEAD";
|
|
636
|
+
OPTIONS: "OPTIONS";
|
|
637
|
+
}>>>;
|
|
638
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
639
|
+
mode: z.ZodEnum<{
|
|
640
|
+
never: "never";
|
|
641
|
+
match: "match";
|
|
642
|
+
always: "always";
|
|
643
|
+
}>;
|
|
644
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
645
|
+
method: z.ZodOptional<z.ZodString>;
|
|
646
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
647
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
648
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
649
|
+
path: z.ZodString;
|
|
650
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
651
|
+
}, z.core.$strip>>;
|
|
652
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
653
|
+
path: z.ZodString;
|
|
654
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
655
|
+
}, z.core.$strip>>;
|
|
656
|
+
}, z.core.$strip>>>;
|
|
657
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
658
|
+
}, z.core.$strip>>;
|
|
659
|
+
}, z.core.$strip>>;
|
|
546
660
|
}, z.core.$strip>]>;
|
|
547
661
|
}, z.core.$strip>]>>;
|
|
548
662
|
}, z.core.$strip>;
|
|
@@ -610,6 +724,38 @@ declare let slatesActionResponsesByMethod: {
|
|
|
610
724
|
type: z.ZodLiteral<"webhook">;
|
|
611
725
|
autoRegistration: z.ZodBoolean;
|
|
612
726
|
autoUnregistration: z.ZodBoolean;
|
|
727
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
728
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
729
|
+
GET: "GET";
|
|
730
|
+
POST: "POST";
|
|
731
|
+
PUT: "PUT";
|
|
732
|
+
PATCH: "PATCH";
|
|
733
|
+
DELETE: "DELETE";
|
|
734
|
+
HEAD: "HEAD";
|
|
735
|
+
OPTIONS: "OPTIONS";
|
|
736
|
+
}>>>;
|
|
737
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
738
|
+
mode: z.ZodEnum<{
|
|
739
|
+
never: "never";
|
|
740
|
+
match: "match";
|
|
741
|
+
always: "always";
|
|
742
|
+
}>;
|
|
743
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
744
|
+
method: z.ZodOptional<z.ZodString>;
|
|
745
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
746
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
747
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
748
|
+
path: z.ZodString;
|
|
749
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
750
|
+
}, z.core.$strip>>;
|
|
751
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
752
|
+
path: z.ZodString;
|
|
753
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
754
|
+
}, z.core.$strip>>;
|
|
755
|
+
}, z.core.$strip>>>;
|
|
756
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
757
|
+
}, z.core.$strip>>;
|
|
758
|
+
}, z.core.$strip>>;
|
|
613
759
|
}, z.core.$strip>]>;
|
|
614
760
|
}, z.core.$strip>]>;
|
|
615
761
|
}, z.core.$strip>;
|
|
@@ -740,6 +886,14 @@ declare let slatesActionResponsesByMethod: {
|
|
|
740
886
|
result: z.ZodObject<{
|
|
741
887
|
inputs: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
742
888
|
updatedState: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
889
|
+
response: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
890
|
+
status: z.ZodNumber;
|
|
891
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
892
|
+
body: z.ZodNullable<z.ZodObject<{
|
|
893
|
+
encoding: z.ZodLiteral<"base64">;
|
|
894
|
+
content: z.ZodString;
|
|
895
|
+
}, z.core.$strip>>;
|
|
896
|
+
}, z.core.$strip>>>;
|
|
743
897
|
requestTraces: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
744
898
|
startedAt: z.ZodString;
|
|
745
899
|
durationMs: z.ZodNumber;
|
|
@@ -897,6 +1051,7 @@ declare let slatesActionRequestsByMethod: {
|
|
|
897
1051
|
content: z.ZodString;
|
|
898
1052
|
}, z.core.$strip>>;
|
|
899
1053
|
state: z.ZodNullable<z.ZodAny>;
|
|
1054
|
+
registrationDetails: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
900
1055
|
}, z.core.$strip>;
|
|
901
1056
|
}, z.core.$strip>;
|
|
902
1057
|
'slates/action.trigger.webhook_register': z.ZodObject<{
|
|
@@ -2816,6 +2971,38 @@ declare let slatesResponsesByMethod: {
|
|
|
2816
2971
|
type: z$1.ZodLiteral<"webhook">;
|
|
2817
2972
|
autoRegistration: z$1.ZodBoolean;
|
|
2818
2973
|
autoUnregistration: z$1.ZodBoolean;
|
|
2974
|
+
http: z$1.ZodOptional<z$1.ZodObject<{
|
|
2975
|
+
methods: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
2976
|
+
GET: "GET";
|
|
2977
|
+
POST: "POST";
|
|
2978
|
+
PUT: "PUT";
|
|
2979
|
+
PATCH: "PATCH";
|
|
2980
|
+
DELETE: "DELETE";
|
|
2981
|
+
HEAD: "HEAD";
|
|
2982
|
+
OPTIONS: "OPTIONS";
|
|
2983
|
+
}>>>;
|
|
2984
|
+
sync: z$1.ZodOptional<z$1.ZodObject<{
|
|
2985
|
+
mode: z$1.ZodEnum<{
|
|
2986
|
+
never: "never";
|
|
2987
|
+
match: "match";
|
|
2988
|
+
always: "always";
|
|
2989
|
+
}>;
|
|
2990
|
+
match: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2991
|
+
method: z$1.ZodOptional<z$1.ZodString>;
|
|
2992
|
+
hasQueryParam: z$1.ZodOptional<z$1.ZodString>;
|
|
2993
|
+
hasHeader: z$1.ZodOptional<z$1.ZodString>;
|
|
2994
|
+
jsonBodyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
2995
|
+
path: z$1.ZodString;
|
|
2996
|
+
equals: z$1.ZodOptional<z$1.ZodString>;
|
|
2997
|
+
}, z$1.core.$strip>>;
|
|
2998
|
+
formBodyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
2999
|
+
path: z$1.ZodString;
|
|
3000
|
+
equals: z$1.ZodOptional<z$1.ZodString>;
|
|
3001
|
+
}, z$1.core.$strip>>;
|
|
3002
|
+
}, z$1.core.$strip>>>;
|
|
3003
|
+
timeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
3004
|
+
}, z$1.core.$strip>>;
|
|
3005
|
+
}, z$1.core.$strip>>;
|
|
2819
3006
|
}, z$1.core.$strip>]>;
|
|
2820
3007
|
}, z$1.core.$strip>]>>;
|
|
2821
3008
|
}, z$1.core.$strip>;
|
|
@@ -2883,6 +3070,38 @@ declare let slatesResponsesByMethod: {
|
|
|
2883
3070
|
type: z$1.ZodLiteral<"webhook">;
|
|
2884
3071
|
autoRegistration: z$1.ZodBoolean;
|
|
2885
3072
|
autoUnregistration: z$1.ZodBoolean;
|
|
3073
|
+
http: z$1.ZodOptional<z$1.ZodObject<{
|
|
3074
|
+
methods: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
3075
|
+
GET: "GET";
|
|
3076
|
+
POST: "POST";
|
|
3077
|
+
PUT: "PUT";
|
|
3078
|
+
PATCH: "PATCH";
|
|
3079
|
+
DELETE: "DELETE";
|
|
3080
|
+
HEAD: "HEAD";
|
|
3081
|
+
OPTIONS: "OPTIONS";
|
|
3082
|
+
}>>>;
|
|
3083
|
+
sync: z$1.ZodOptional<z$1.ZodObject<{
|
|
3084
|
+
mode: z$1.ZodEnum<{
|
|
3085
|
+
never: "never";
|
|
3086
|
+
match: "match";
|
|
3087
|
+
always: "always";
|
|
3088
|
+
}>;
|
|
3089
|
+
match: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
3090
|
+
method: z$1.ZodOptional<z$1.ZodString>;
|
|
3091
|
+
hasQueryParam: z$1.ZodOptional<z$1.ZodString>;
|
|
3092
|
+
hasHeader: z$1.ZodOptional<z$1.ZodString>;
|
|
3093
|
+
jsonBodyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
3094
|
+
path: z$1.ZodString;
|
|
3095
|
+
equals: z$1.ZodOptional<z$1.ZodString>;
|
|
3096
|
+
}, z$1.core.$strip>>;
|
|
3097
|
+
formBodyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
3098
|
+
path: z$1.ZodString;
|
|
3099
|
+
equals: z$1.ZodOptional<z$1.ZodString>;
|
|
3100
|
+
}, z$1.core.$strip>>;
|
|
3101
|
+
}, z$1.core.$strip>>>;
|
|
3102
|
+
timeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
3103
|
+
}, z$1.core.$strip>>;
|
|
3104
|
+
}, z$1.core.$strip>>;
|
|
2886
3105
|
}, z$1.core.$strip>]>;
|
|
2887
3106
|
}, z$1.core.$strip>]>;
|
|
2888
3107
|
}, z$1.core.$strip>;
|
|
@@ -3013,6 +3232,14 @@ declare let slatesResponsesByMethod: {
|
|
|
3013
3232
|
result: z$1.ZodObject<{
|
|
3014
3233
|
inputs: z$1.ZodArray<z$1.ZodRecord<z$1.ZodString, z$1.ZodAny>>;
|
|
3015
3234
|
updatedState: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodAny>>;
|
|
3235
|
+
response: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
3236
|
+
status: z$1.ZodNumber;
|
|
3237
|
+
headers: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
3238
|
+
body: z$1.ZodNullable<z$1.ZodObject<{
|
|
3239
|
+
encoding: z$1.ZodLiteral<"base64">;
|
|
3240
|
+
content: z$1.ZodString;
|
|
3241
|
+
}, z$1.core.$strip>>;
|
|
3242
|
+
}, z$1.core.$strip>>>;
|
|
3016
3243
|
requestTraces: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
3017
3244
|
startedAt: z$1.ZodString;
|
|
3018
3245
|
durationMs: z$1.ZodNumber;
|
|
@@ -3293,6 +3520,7 @@ declare let slatesRequestsByMethod: {
|
|
|
3293
3520
|
content: z$1.ZodString;
|
|
3294
3521
|
}, z$1.core.$strip>>;
|
|
3295
3522
|
state: z$1.ZodNullable<z$1.ZodAny>;
|
|
3523
|
+
registrationDetails: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodAny>>;
|
|
3296
3524
|
}, z$1.core.$strip>;
|
|
3297
3525
|
}, z$1.core.$strip>;
|
|
3298
3526
|
'slates/action.trigger.webhook_register': z$1.ZodObject<{
|
|
@@ -3489,6 +3717,51 @@ declare let slatesActionTool: z.ZodObject<{
|
|
|
3489
3717
|
type: z.ZodLiteral<"action.tool">;
|
|
3490
3718
|
capabilities: z.ZodObject<{}, z.core.$strip>;
|
|
3491
3719
|
}, z.core.$strip>;
|
|
3720
|
+
declare let slatesWebhookRequestMatcher: z.ZodObject<{
|
|
3721
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3722
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
3723
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
3724
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
3725
|
+
path: z.ZodString;
|
|
3726
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3727
|
+
}, z.core.$strip>>;
|
|
3728
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
3729
|
+
path: z.ZodString;
|
|
3730
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3731
|
+
}, z.core.$strip>>;
|
|
3732
|
+
}, z.core.$strip>;
|
|
3733
|
+
declare let slatesWebhookHttp: z.ZodObject<{
|
|
3734
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3735
|
+
GET: "GET";
|
|
3736
|
+
POST: "POST";
|
|
3737
|
+
PUT: "PUT";
|
|
3738
|
+
PATCH: "PATCH";
|
|
3739
|
+
DELETE: "DELETE";
|
|
3740
|
+
HEAD: "HEAD";
|
|
3741
|
+
OPTIONS: "OPTIONS";
|
|
3742
|
+
}>>>;
|
|
3743
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
3744
|
+
mode: z.ZodEnum<{
|
|
3745
|
+
never: "never";
|
|
3746
|
+
match: "match";
|
|
3747
|
+
always: "always";
|
|
3748
|
+
}>;
|
|
3749
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3750
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3751
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
3752
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
3753
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
3754
|
+
path: z.ZodString;
|
|
3755
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3756
|
+
}, z.core.$strip>>;
|
|
3757
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
3758
|
+
path: z.ZodString;
|
|
3759
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3760
|
+
}, z.core.$strip>>;
|
|
3761
|
+
}, z.core.$strip>>>;
|
|
3762
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3763
|
+
}, z.core.$strip>>;
|
|
3764
|
+
}, z.core.$strip>;
|
|
3492
3765
|
declare let slatesActionTrigger: z.ZodObject<{
|
|
3493
3766
|
id: z.ZodString;
|
|
3494
3767
|
name: z.ZodString;
|
|
@@ -3522,6 +3795,38 @@ declare let slatesActionTrigger: z.ZodObject<{
|
|
|
3522
3795
|
type: z.ZodLiteral<"webhook">;
|
|
3523
3796
|
autoRegistration: z.ZodBoolean;
|
|
3524
3797
|
autoUnregistration: z.ZodBoolean;
|
|
3798
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
3799
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3800
|
+
GET: "GET";
|
|
3801
|
+
POST: "POST";
|
|
3802
|
+
PUT: "PUT";
|
|
3803
|
+
PATCH: "PATCH";
|
|
3804
|
+
DELETE: "DELETE";
|
|
3805
|
+
HEAD: "HEAD";
|
|
3806
|
+
OPTIONS: "OPTIONS";
|
|
3807
|
+
}>>>;
|
|
3808
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
3809
|
+
mode: z.ZodEnum<{
|
|
3810
|
+
never: "never";
|
|
3811
|
+
match: "match";
|
|
3812
|
+
always: "always";
|
|
3813
|
+
}>;
|
|
3814
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3815
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3816
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
3817
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
3818
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
3819
|
+
path: z.ZodString;
|
|
3820
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3821
|
+
}, z.core.$strip>>;
|
|
3822
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
3823
|
+
path: z.ZodString;
|
|
3824
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3825
|
+
}, z.core.$strip>>;
|
|
3826
|
+
}, z.core.$strip>>>;
|
|
3827
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3828
|
+
}, z.core.$strip>>;
|
|
3829
|
+
}, z.core.$strip>>;
|
|
3525
3830
|
}, z.core.$strip>]>;
|
|
3526
3831
|
}, z.core.$strip>;
|
|
3527
3832
|
declare let slatesAction: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -3583,12 +3888,46 @@ declare let slatesAction: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3583
3888
|
type: z.ZodLiteral<"webhook">;
|
|
3584
3889
|
autoRegistration: z.ZodBoolean;
|
|
3585
3890
|
autoUnregistration: z.ZodBoolean;
|
|
3891
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
3892
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3893
|
+
GET: "GET";
|
|
3894
|
+
POST: "POST";
|
|
3895
|
+
PUT: "PUT";
|
|
3896
|
+
PATCH: "PATCH";
|
|
3897
|
+
DELETE: "DELETE";
|
|
3898
|
+
HEAD: "HEAD";
|
|
3899
|
+
OPTIONS: "OPTIONS";
|
|
3900
|
+
}>>>;
|
|
3901
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
3902
|
+
mode: z.ZodEnum<{
|
|
3903
|
+
never: "never";
|
|
3904
|
+
match: "match";
|
|
3905
|
+
always: "always";
|
|
3906
|
+
}>;
|
|
3907
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3908
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3909
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
3910
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
3911
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
3912
|
+
path: z.ZodString;
|
|
3913
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3914
|
+
}, z.core.$strip>>;
|
|
3915
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
3916
|
+
path: z.ZodString;
|
|
3917
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3918
|
+
}, z.core.$strip>>;
|
|
3919
|
+
}, z.core.$strip>>>;
|
|
3920
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3921
|
+
}, z.core.$strip>>;
|
|
3922
|
+
}, z.core.$strip>>;
|
|
3586
3923
|
}, z.core.$strip>]>;
|
|
3587
3924
|
}, z.core.$strip>]>;
|
|
3588
3925
|
type SlatesAction = z.infer<typeof slatesAction>;
|
|
3589
3926
|
type SlatesActionTool = z.infer<typeof slatesActionTool>;
|
|
3590
3927
|
type SlatesActionTrigger = z.infer<typeof slatesActionTrigger>;
|
|
3591
3928
|
type SlatesActionScopes = z.infer<typeof slatesActionScopes>;
|
|
3929
|
+
type SlatesWebhookRequestMatcher = z.infer<typeof slatesWebhookRequestMatcher>;
|
|
3930
|
+
type SlatesWebhookHttp = z.infer<typeof slatesWebhookHttp>;
|
|
3592
3931
|
|
|
3593
3932
|
declare let slatesAuthenticationMethod: z.ZodObject<{
|
|
3594
3933
|
id: z.ZodString;
|
|
@@ -3636,4 +3975,4 @@ type SlatesParticipant = z.infer<typeof slatesParticipant>;
|
|
|
3636
3975
|
declare const SLATES_PROTOCOL_VERSION: "slates@2026-01-01";
|
|
3637
3976
|
type SlatesProtocolVersion = typeof SLATES_PROTOCOL_VERSION;
|
|
3638
3977
|
|
|
3639
|
-
export { SLATES_PROTOCOL_VERSION, type SlateAuthenticationMethod, type SlatesAction, type SlatesActionRequests, type SlatesActionResponses, type SlatesActionScopes, type SlatesActionTool, type SlatesActionTrigger, type SlatesAuthNotifications, type SlatesAuthRequests, type SlatesAuthResponses, type SlatesConfigNotifications, type SlatesConfigRequests, type SlatesConfigResponses, type SlatesControlFlowNotifications, type SlatesIdentifyRequests, type SlatesIdentifyResponses, type SlatesMessageActionGetRequest, type SlatesMessageActionGetResponse, type SlatesMessageActionInvokeRequest, type SlatesMessageActionInvokeResponse, type SlatesMessageActionTriggerEventMapRequest, type SlatesMessageActionTriggerEventMapResponse, type SlatesMessageActionTriggerEventsPollRequest, type SlatesMessageActionTriggerEventsPollResponse, type SlatesMessageActionTriggerWebhookHandleRequest, type SlatesMessageActionTriggerWebhookHandleResponse, type SlatesMessageActionTriggerWebhookRegisterRequest, type SlatesMessageActionTriggerWebhookRegisterResponse, type SlatesMessageActionTriggerWebhookUnregisterRequest, type SlatesMessageActionTriggerWebhookUnregisterResponse, type SlatesMessageActionsListRequest, type SlatesMessageActionsListResponse, type SlatesMessageAuthAuthorizationCallbackHandleRequest, type SlatesMessageAuthAuthorizationCallbackHandleResponse, type SlatesMessageAuthAuthorizationUrlGetRequest, type SlatesMessageAuthAuthorizationUrlGetResponse, type SlatesMessageAuthDefaultInputGetRequest, type SlatesMessageAuthDefaultInputGetResponse, type SlatesMessageAuthInputChangedRequest, type SlatesMessageAuthInputChangedResponse, type SlatesMessageAuthMethodGetRequest, type SlatesMessageAuthMethodGetResponse, type SlatesMessageAuthMethodsListRequest, type SlatesMessageAuthMethodsListResponse, type SlatesMessageAuthOutputGetRequest, type SlatesMessageAuthOutputGetResponse, type SlatesMessageAuthProfileGetRequest, type SlatesMessageAuthProfileGetResponse, type SlatesMessageAuthTokenRefreshHandleRequest, type SlatesMessageAuthTokenRefreshHandleResponse, type SlatesMessageConfigChangedRequest, type SlatesMessageConfigChangedResponse, type SlatesMessageConfigDefaultGetRequest, type SlatesMessageConfigDefaultGetResponse, type SlatesMessageConfigSchemaGetRequest, type SlatesMessageConfigSchemaGetResponse, type SlatesMessageHelloNotification, type SlatesMessageProviderIdentifyRequest, type SlatesMessageProviderIdentifyResponse, type SlatesMessageSessionStartNotification, type SlatesMessageSetAuthNotification, type SlatesMessageSetConfigNotification, type SlatesMessageSetParticipantsNotification, type SlatesNotifications, type SlatesParticipant, type SlatesProtocolVersion, SlatesProviderProtoHandlerManager, type SlatesRequests, type SlatesResponses, type SlatesResponsesByMethod, createSlatesProviderProtoHandler, slatesAction, slatesActionBase, slatesActionRequestsByMethod, slatesActionResponsesByMethod, slatesActionScopeClause, slatesActionScopes, slatesActionTool, slatesActionTrigger, slatesAuthNotificationsByMethod, slatesAuthRequestsByMethod, slatesAuthResponsesByMethod, slatesAuthenticationMethod, slatesConfigNotificationsByMethod, slatesConfigRequestsByMethod, slatesConfigResponsesByMethod, slatesControlFlowNotificationsByMethod, slatesIdentifyRequestsByMethod, slatesIdentifyResponsesByMethod, slatesMessageActionGetRequest, slatesMessageActionGetResponse, slatesMessageActionInvokeRequest, slatesMessageActionInvokeResponse, slatesMessageActionTriggerEventMapRequest, slatesMessageActionTriggerEventMapResponse, slatesMessageActionTriggerEventsPollRequest, slatesMessageActionTriggerEventsPollResponse, slatesMessageActionTriggerWebhookHandleRequest, slatesMessageActionTriggerWebhookHandleResponse, slatesMessageActionTriggerWebhookRegisterRequest, slatesMessageActionTriggerWebhookRegisterResponse, slatesMessageActionTriggerWebhookUnregisterRequest, slatesMessageActionTriggerWebhookUnregisterResponse, slatesMessageActionsListRequest, slatesMessageActionsListResponse, slatesMessageAuthAuthorizationCallbackHandleRequest, slatesMessageAuthAuthorizationCallbackHandleResponse, slatesMessageAuthAuthorizationUrlGetRequest, slatesMessageAuthAuthorizationUrlGetResponse, slatesMessageAuthDefaultInputGetRequest, slatesMessageAuthDefaultInputGetResponse, slatesMessageAuthInputChangedRequest, slatesMessageAuthInputChangedResponse, slatesMessageAuthMethodGetRequest, slatesMessageAuthMethodGetResponse, slatesMessageAuthMethodsListRequest, slatesMessageAuthMethodsListResponse, slatesMessageAuthOutputGetRequest, slatesMessageAuthOutputGetResponse, slatesMessageAuthProfileGetRequest, slatesMessageAuthProfileGetResponse, slatesMessageAuthTokenRefreshHandleRequest, slatesMessageAuthTokenRefreshHandleResponse, slatesMessageConfigChangedRequest, slatesMessageConfigChangedResponse, slatesMessageConfigDefaultGetRequest, slatesMessageConfigDefaultGetResponse, slatesMessageConfigSchemaGetRequest, slatesMessageConfigSchemaGetResponse, slatesMessageHelloNotification, slatesMessageProviderIdentifyRequest, slatesMessageProviderIdentifyResponse, slatesMessageSessionStartNotification, slatesMessageSetAuthNotification, slatesMessageSetConfigNotification, slatesMessageSetParticipantsNotification, slatesNotificationsByMethod, slatesParticipant, slatesRequestTrace, slatesRequestTraceTextBody, slatesRequestsByMethod, slatesResponsesByMethod, withRequestTraces };
|
|
3978
|
+
export { SLATES_PROTOCOL_VERSION, type SlateAuthenticationMethod, type SlatesAction, type SlatesActionRequests, type SlatesActionResponses, type SlatesActionScopes, type SlatesActionTool, type SlatesActionTrigger, type SlatesAuthNotifications, type SlatesAuthRequests, type SlatesAuthResponses, type SlatesConfigNotifications, type SlatesConfigRequests, type SlatesConfigResponses, type SlatesControlFlowNotifications, type SlatesIdentifyRequests, type SlatesIdentifyResponses, type SlatesMessageActionGetRequest, type SlatesMessageActionGetResponse, type SlatesMessageActionInvokeRequest, type SlatesMessageActionInvokeResponse, type SlatesMessageActionTriggerEventMapRequest, type SlatesMessageActionTriggerEventMapResponse, type SlatesMessageActionTriggerEventsPollRequest, type SlatesMessageActionTriggerEventsPollResponse, type SlatesMessageActionTriggerWebhookHandleRequest, type SlatesMessageActionTriggerWebhookHandleResponse, type SlatesMessageActionTriggerWebhookRegisterRequest, type SlatesMessageActionTriggerWebhookRegisterResponse, type SlatesMessageActionTriggerWebhookUnregisterRequest, type SlatesMessageActionTriggerWebhookUnregisterResponse, type SlatesMessageActionsListRequest, type SlatesMessageActionsListResponse, type SlatesMessageAuthAuthorizationCallbackHandleRequest, type SlatesMessageAuthAuthorizationCallbackHandleResponse, type SlatesMessageAuthAuthorizationUrlGetRequest, type SlatesMessageAuthAuthorizationUrlGetResponse, type SlatesMessageAuthDefaultInputGetRequest, type SlatesMessageAuthDefaultInputGetResponse, type SlatesMessageAuthInputChangedRequest, type SlatesMessageAuthInputChangedResponse, type SlatesMessageAuthMethodGetRequest, type SlatesMessageAuthMethodGetResponse, type SlatesMessageAuthMethodsListRequest, type SlatesMessageAuthMethodsListResponse, type SlatesMessageAuthOutputGetRequest, type SlatesMessageAuthOutputGetResponse, type SlatesMessageAuthProfileGetRequest, type SlatesMessageAuthProfileGetResponse, type SlatesMessageAuthTokenRefreshHandleRequest, type SlatesMessageAuthTokenRefreshHandleResponse, type SlatesMessageConfigChangedRequest, type SlatesMessageConfigChangedResponse, type SlatesMessageConfigDefaultGetRequest, type SlatesMessageConfigDefaultGetResponse, type SlatesMessageConfigSchemaGetRequest, type SlatesMessageConfigSchemaGetResponse, type SlatesMessageHelloNotification, type SlatesMessageProviderIdentifyRequest, type SlatesMessageProviderIdentifyResponse, type SlatesMessageSessionStartNotification, type SlatesMessageSetAuthNotification, type SlatesMessageSetConfigNotification, type SlatesMessageSetParticipantsNotification, type SlatesNotifications, type SlatesParticipant, type SlatesProtocolVersion, SlatesProviderProtoHandlerManager, type SlatesRequests, type SlatesResponses, type SlatesResponsesByMethod, type SlatesWebhookHttp, type SlatesWebhookHttpResponse, type SlatesWebhookRequestMatcher, createSlatesProviderProtoHandler, slatesAction, slatesActionBase, slatesActionRequestsByMethod, slatesActionResponsesByMethod, slatesActionScopeClause, slatesActionScopes, slatesActionTool, slatesActionTrigger, slatesAuthNotificationsByMethod, slatesAuthRequestsByMethod, slatesAuthResponsesByMethod, slatesAuthenticationMethod, slatesConfigNotificationsByMethod, slatesConfigRequestsByMethod, slatesConfigResponsesByMethod, slatesControlFlowNotificationsByMethod, slatesIdentifyRequestsByMethod, slatesIdentifyResponsesByMethod, slatesMessageActionGetRequest, slatesMessageActionGetResponse, slatesMessageActionInvokeRequest, slatesMessageActionInvokeResponse, slatesMessageActionTriggerEventMapRequest, slatesMessageActionTriggerEventMapResponse, slatesMessageActionTriggerEventsPollRequest, slatesMessageActionTriggerEventsPollResponse, slatesMessageActionTriggerWebhookHandleRequest, slatesMessageActionTriggerWebhookHandleResponse, slatesMessageActionTriggerWebhookRegisterRequest, slatesMessageActionTriggerWebhookRegisterResponse, slatesMessageActionTriggerWebhookUnregisterRequest, slatesMessageActionTriggerWebhookUnregisterResponse, slatesMessageActionsListRequest, slatesMessageActionsListResponse, slatesMessageAuthAuthorizationCallbackHandleRequest, slatesMessageAuthAuthorizationCallbackHandleResponse, slatesMessageAuthAuthorizationUrlGetRequest, slatesMessageAuthAuthorizationUrlGetResponse, slatesMessageAuthDefaultInputGetRequest, slatesMessageAuthDefaultInputGetResponse, slatesMessageAuthInputChangedRequest, slatesMessageAuthInputChangedResponse, slatesMessageAuthMethodGetRequest, slatesMessageAuthMethodGetResponse, slatesMessageAuthMethodsListRequest, slatesMessageAuthMethodsListResponse, slatesMessageAuthOutputGetRequest, slatesMessageAuthOutputGetResponse, slatesMessageAuthProfileGetRequest, slatesMessageAuthProfileGetResponse, slatesMessageAuthTokenRefreshHandleRequest, slatesMessageAuthTokenRefreshHandleResponse, slatesMessageConfigChangedRequest, slatesMessageConfigChangedResponse, slatesMessageConfigDefaultGetRequest, slatesMessageConfigDefaultGetResponse, slatesMessageConfigSchemaGetRequest, slatesMessageConfigSchemaGetResponse, slatesMessageHelloNotification, slatesMessageProviderIdentifyRequest, slatesMessageProviderIdentifyResponse, slatesMessageSessionStartNotification, slatesMessageSetAuthNotification, slatesMessageSetConfigNotification, slatesMessageSetParticipantsNotification, slatesNotificationsByMethod, slatesParticipant, slatesRequestTrace, slatesRequestTraceTextBody, slatesRequestsByMethod, slatesResponsesByMethod, slatesWebhookHttp, slatesWebhookHttpResponse, slatesWebhookRequestMatcher, withRequestTraces };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import z, { z as z$1 } from 'zod';
|
|
2
2
|
|
|
3
|
+
declare let slatesWebhookHttpResponse: z.ZodObject<{
|
|
4
|
+
status: z.ZodNumber;
|
|
5
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6
|
+
body: z.ZodNullable<z.ZodObject<{
|
|
7
|
+
encoding: z.ZodLiteral<"base64">;
|
|
8
|
+
content: z.ZodString;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
type SlatesWebhookHttpResponse = z.infer<typeof slatesWebhookHttpResponse>;
|
|
3
12
|
/**
|
|
4
13
|
* List Actions
|
|
5
14
|
*/
|
|
@@ -73,6 +82,38 @@ declare let slatesMessageActionsListResponse: z.ZodObject<{
|
|
|
73
82
|
type: z.ZodLiteral<"webhook">;
|
|
74
83
|
autoRegistration: z.ZodBoolean;
|
|
75
84
|
autoUnregistration: z.ZodBoolean;
|
|
85
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
87
|
+
GET: "GET";
|
|
88
|
+
POST: "POST";
|
|
89
|
+
PUT: "PUT";
|
|
90
|
+
PATCH: "PATCH";
|
|
91
|
+
DELETE: "DELETE";
|
|
92
|
+
HEAD: "HEAD";
|
|
93
|
+
OPTIONS: "OPTIONS";
|
|
94
|
+
}>>>;
|
|
95
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
mode: z.ZodEnum<{
|
|
97
|
+
never: "never";
|
|
98
|
+
match: "match";
|
|
99
|
+
always: "always";
|
|
100
|
+
}>;
|
|
101
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
method: z.ZodOptional<z.ZodString>;
|
|
103
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
104
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
105
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
path: z.ZodString;
|
|
107
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
path: z.ZodString;
|
|
111
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
114
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
}, z.core.$strip>>;
|
|
76
117
|
}, z.core.$strip>]>;
|
|
77
118
|
}, z.core.$strip>]>>;
|
|
78
119
|
}, z.core.$strip>;
|
|
@@ -153,6 +194,38 @@ declare let slatesMessageActionGetResponse: z.ZodObject<{
|
|
|
153
194
|
type: z.ZodLiteral<"webhook">;
|
|
154
195
|
autoRegistration: z.ZodBoolean;
|
|
155
196
|
autoUnregistration: z.ZodBoolean;
|
|
197
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
199
|
+
GET: "GET";
|
|
200
|
+
POST: "POST";
|
|
201
|
+
PUT: "PUT";
|
|
202
|
+
PATCH: "PATCH";
|
|
203
|
+
DELETE: "DELETE";
|
|
204
|
+
HEAD: "HEAD";
|
|
205
|
+
OPTIONS: "OPTIONS";
|
|
206
|
+
}>>>;
|
|
207
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
mode: z.ZodEnum<{
|
|
209
|
+
never: "never";
|
|
210
|
+
match: "match";
|
|
211
|
+
always: "always";
|
|
212
|
+
}>;
|
|
213
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
214
|
+
method: z.ZodOptional<z.ZodString>;
|
|
215
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
216
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
217
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
218
|
+
path: z.ZodString;
|
|
219
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
222
|
+
path: z.ZodString;
|
|
223
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
226
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
}, z.core.$strip>>;
|
|
156
229
|
}, z.core.$strip>]>;
|
|
157
230
|
}, z.core.$strip>]>;
|
|
158
231
|
}, z.core.$strip>;
|
|
@@ -337,6 +410,7 @@ declare let slatesMessageActionTriggerWebhookHandleRequest: z.ZodObject<{
|
|
|
337
410
|
content: z.ZodString;
|
|
338
411
|
}, z.core.$strip>>;
|
|
339
412
|
state: z.ZodNullable<z.ZodAny>;
|
|
413
|
+
registrationDetails: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
340
414
|
}, z.core.$strip>;
|
|
341
415
|
}, z.core.$strip>;
|
|
342
416
|
type SlatesMessageActionTriggerWebhookHandleRequest = z.infer<typeof slatesMessageActionTriggerWebhookHandleRequest>;
|
|
@@ -346,6 +420,14 @@ declare let slatesMessageActionTriggerWebhookHandleResponse: z.ZodObject<{
|
|
|
346
420
|
result: z.ZodObject<{
|
|
347
421
|
inputs: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
348
422
|
updatedState: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
423
|
+
response: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
424
|
+
status: z.ZodNumber;
|
|
425
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
426
|
+
body: z.ZodNullable<z.ZodObject<{
|
|
427
|
+
encoding: z.ZodLiteral<"base64">;
|
|
428
|
+
content: z.ZodString;
|
|
429
|
+
}, z.core.$strip>>;
|
|
430
|
+
}, z.core.$strip>>>;
|
|
349
431
|
requestTraces: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
350
432
|
startedAt: z.ZodString;
|
|
351
433
|
durationMs: z.ZodNumber;
|
|
@@ -543,6 +625,38 @@ declare let slatesActionResponsesByMethod: {
|
|
|
543
625
|
type: z.ZodLiteral<"webhook">;
|
|
544
626
|
autoRegistration: z.ZodBoolean;
|
|
545
627
|
autoUnregistration: z.ZodBoolean;
|
|
628
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
629
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
630
|
+
GET: "GET";
|
|
631
|
+
POST: "POST";
|
|
632
|
+
PUT: "PUT";
|
|
633
|
+
PATCH: "PATCH";
|
|
634
|
+
DELETE: "DELETE";
|
|
635
|
+
HEAD: "HEAD";
|
|
636
|
+
OPTIONS: "OPTIONS";
|
|
637
|
+
}>>>;
|
|
638
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
639
|
+
mode: z.ZodEnum<{
|
|
640
|
+
never: "never";
|
|
641
|
+
match: "match";
|
|
642
|
+
always: "always";
|
|
643
|
+
}>;
|
|
644
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
645
|
+
method: z.ZodOptional<z.ZodString>;
|
|
646
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
647
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
648
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
649
|
+
path: z.ZodString;
|
|
650
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
651
|
+
}, z.core.$strip>>;
|
|
652
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
653
|
+
path: z.ZodString;
|
|
654
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
655
|
+
}, z.core.$strip>>;
|
|
656
|
+
}, z.core.$strip>>>;
|
|
657
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
658
|
+
}, z.core.$strip>>;
|
|
659
|
+
}, z.core.$strip>>;
|
|
546
660
|
}, z.core.$strip>]>;
|
|
547
661
|
}, z.core.$strip>]>>;
|
|
548
662
|
}, z.core.$strip>;
|
|
@@ -610,6 +724,38 @@ declare let slatesActionResponsesByMethod: {
|
|
|
610
724
|
type: z.ZodLiteral<"webhook">;
|
|
611
725
|
autoRegistration: z.ZodBoolean;
|
|
612
726
|
autoUnregistration: z.ZodBoolean;
|
|
727
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
728
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
729
|
+
GET: "GET";
|
|
730
|
+
POST: "POST";
|
|
731
|
+
PUT: "PUT";
|
|
732
|
+
PATCH: "PATCH";
|
|
733
|
+
DELETE: "DELETE";
|
|
734
|
+
HEAD: "HEAD";
|
|
735
|
+
OPTIONS: "OPTIONS";
|
|
736
|
+
}>>>;
|
|
737
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
738
|
+
mode: z.ZodEnum<{
|
|
739
|
+
never: "never";
|
|
740
|
+
match: "match";
|
|
741
|
+
always: "always";
|
|
742
|
+
}>;
|
|
743
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
744
|
+
method: z.ZodOptional<z.ZodString>;
|
|
745
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
746
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
747
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
748
|
+
path: z.ZodString;
|
|
749
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
750
|
+
}, z.core.$strip>>;
|
|
751
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
752
|
+
path: z.ZodString;
|
|
753
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
754
|
+
}, z.core.$strip>>;
|
|
755
|
+
}, z.core.$strip>>>;
|
|
756
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
757
|
+
}, z.core.$strip>>;
|
|
758
|
+
}, z.core.$strip>>;
|
|
613
759
|
}, z.core.$strip>]>;
|
|
614
760
|
}, z.core.$strip>]>;
|
|
615
761
|
}, z.core.$strip>;
|
|
@@ -740,6 +886,14 @@ declare let slatesActionResponsesByMethod: {
|
|
|
740
886
|
result: z.ZodObject<{
|
|
741
887
|
inputs: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
742
888
|
updatedState: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
889
|
+
response: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
890
|
+
status: z.ZodNumber;
|
|
891
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
892
|
+
body: z.ZodNullable<z.ZodObject<{
|
|
893
|
+
encoding: z.ZodLiteral<"base64">;
|
|
894
|
+
content: z.ZodString;
|
|
895
|
+
}, z.core.$strip>>;
|
|
896
|
+
}, z.core.$strip>>>;
|
|
743
897
|
requestTraces: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
744
898
|
startedAt: z.ZodString;
|
|
745
899
|
durationMs: z.ZodNumber;
|
|
@@ -897,6 +1051,7 @@ declare let slatesActionRequestsByMethod: {
|
|
|
897
1051
|
content: z.ZodString;
|
|
898
1052
|
}, z.core.$strip>>;
|
|
899
1053
|
state: z.ZodNullable<z.ZodAny>;
|
|
1054
|
+
registrationDetails: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
900
1055
|
}, z.core.$strip>;
|
|
901
1056
|
}, z.core.$strip>;
|
|
902
1057
|
'slates/action.trigger.webhook_register': z.ZodObject<{
|
|
@@ -2816,6 +2971,38 @@ declare let slatesResponsesByMethod: {
|
|
|
2816
2971
|
type: z$1.ZodLiteral<"webhook">;
|
|
2817
2972
|
autoRegistration: z$1.ZodBoolean;
|
|
2818
2973
|
autoUnregistration: z$1.ZodBoolean;
|
|
2974
|
+
http: z$1.ZodOptional<z$1.ZodObject<{
|
|
2975
|
+
methods: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
2976
|
+
GET: "GET";
|
|
2977
|
+
POST: "POST";
|
|
2978
|
+
PUT: "PUT";
|
|
2979
|
+
PATCH: "PATCH";
|
|
2980
|
+
DELETE: "DELETE";
|
|
2981
|
+
HEAD: "HEAD";
|
|
2982
|
+
OPTIONS: "OPTIONS";
|
|
2983
|
+
}>>>;
|
|
2984
|
+
sync: z$1.ZodOptional<z$1.ZodObject<{
|
|
2985
|
+
mode: z$1.ZodEnum<{
|
|
2986
|
+
never: "never";
|
|
2987
|
+
match: "match";
|
|
2988
|
+
always: "always";
|
|
2989
|
+
}>;
|
|
2990
|
+
match: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2991
|
+
method: z$1.ZodOptional<z$1.ZodString>;
|
|
2992
|
+
hasQueryParam: z$1.ZodOptional<z$1.ZodString>;
|
|
2993
|
+
hasHeader: z$1.ZodOptional<z$1.ZodString>;
|
|
2994
|
+
jsonBodyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
2995
|
+
path: z$1.ZodString;
|
|
2996
|
+
equals: z$1.ZodOptional<z$1.ZodString>;
|
|
2997
|
+
}, z$1.core.$strip>>;
|
|
2998
|
+
formBodyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
2999
|
+
path: z$1.ZodString;
|
|
3000
|
+
equals: z$1.ZodOptional<z$1.ZodString>;
|
|
3001
|
+
}, z$1.core.$strip>>;
|
|
3002
|
+
}, z$1.core.$strip>>>;
|
|
3003
|
+
timeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
3004
|
+
}, z$1.core.$strip>>;
|
|
3005
|
+
}, z$1.core.$strip>>;
|
|
2819
3006
|
}, z$1.core.$strip>]>;
|
|
2820
3007
|
}, z$1.core.$strip>]>>;
|
|
2821
3008
|
}, z$1.core.$strip>;
|
|
@@ -2883,6 +3070,38 @@ declare let slatesResponsesByMethod: {
|
|
|
2883
3070
|
type: z$1.ZodLiteral<"webhook">;
|
|
2884
3071
|
autoRegistration: z$1.ZodBoolean;
|
|
2885
3072
|
autoUnregistration: z$1.ZodBoolean;
|
|
3073
|
+
http: z$1.ZodOptional<z$1.ZodObject<{
|
|
3074
|
+
methods: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
3075
|
+
GET: "GET";
|
|
3076
|
+
POST: "POST";
|
|
3077
|
+
PUT: "PUT";
|
|
3078
|
+
PATCH: "PATCH";
|
|
3079
|
+
DELETE: "DELETE";
|
|
3080
|
+
HEAD: "HEAD";
|
|
3081
|
+
OPTIONS: "OPTIONS";
|
|
3082
|
+
}>>>;
|
|
3083
|
+
sync: z$1.ZodOptional<z$1.ZodObject<{
|
|
3084
|
+
mode: z$1.ZodEnum<{
|
|
3085
|
+
never: "never";
|
|
3086
|
+
match: "match";
|
|
3087
|
+
always: "always";
|
|
3088
|
+
}>;
|
|
3089
|
+
match: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
3090
|
+
method: z$1.ZodOptional<z$1.ZodString>;
|
|
3091
|
+
hasQueryParam: z$1.ZodOptional<z$1.ZodString>;
|
|
3092
|
+
hasHeader: z$1.ZodOptional<z$1.ZodString>;
|
|
3093
|
+
jsonBodyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
3094
|
+
path: z$1.ZodString;
|
|
3095
|
+
equals: z$1.ZodOptional<z$1.ZodString>;
|
|
3096
|
+
}, z$1.core.$strip>>;
|
|
3097
|
+
formBodyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
3098
|
+
path: z$1.ZodString;
|
|
3099
|
+
equals: z$1.ZodOptional<z$1.ZodString>;
|
|
3100
|
+
}, z$1.core.$strip>>;
|
|
3101
|
+
}, z$1.core.$strip>>>;
|
|
3102
|
+
timeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
3103
|
+
}, z$1.core.$strip>>;
|
|
3104
|
+
}, z$1.core.$strip>>;
|
|
2886
3105
|
}, z$1.core.$strip>]>;
|
|
2887
3106
|
}, z$1.core.$strip>]>;
|
|
2888
3107
|
}, z$1.core.$strip>;
|
|
@@ -3013,6 +3232,14 @@ declare let slatesResponsesByMethod: {
|
|
|
3013
3232
|
result: z$1.ZodObject<{
|
|
3014
3233
|
inputs: z$1.ZodArray<z$1.ZodRecord<z$1.ZodString, z$1.ZodAny>>;
|
|
3015
3234
|
updatedState: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodAny>>;
|
|
3235
|
+
response: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
3236
|
+
status: z$1.ZodNumber;
|
|
3237
|
+
headers: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
3238
|
+
body: z$1.ZodNullable<z$1.ZodObject<{
|
|
3239
|
+
encoding: z$1.ZodLiteral<"base64">;
|
|
3240
|
+
content: z$1.ZodString;
|
|
3241
|
+
}, z$1.core.$strip>>;
|
|
3242
|
+
}, z$1.core.$strip>>>;
|
|
3016
3243
|
requestTraces: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
3017
3244
|
startedAt: z$1.ZodString;
|
|
3018
3245
|
durationMs: z$1.ZodNumber;
|
|
@@ -3293,6 +3520,7 @@ declare let slatesRequestsByMethod: {
|
|
|
3293
3520
|
content: z$1.ZodString;
|
|
3294
3521
|
}, z$1.core.$strip>>;
|
|
3295
3522
|
state: z$1.ZodNullable<z$1.ZodAny>;
|
|
3523
|
+
registrationDetails: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodAny>>;
|
|
3296
3524
|
}, z$1.core.$strip>;
|
|
3297
3525
|
}, z$1.core.$strip>;
|
|
3298
3526
|
'slates/action.trigger.webhook_register': z$1.ZodObject<{
|
|
@@ -3489,6 +3717,51 @@ declare let slatesActionTool: z.ZodObject<{
|
|
|
3489
3717
|
type: z.ZodLiteral<"action.tool">;
|
|
3490
3718
|
capabilities: z.ZodObject<{}, z.core.$strip>;
|
|
3491
3719
|
}, z.core.$strip>;
|
|
3720
|
+
declare let slatesWebhookRequestMatcher: z.ZodObject<{
|
|
3721
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3722
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
3723
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
3724
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
3725
|
+
path: z.ZodString;
|
|
3726
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3727
|
+
}, z.core.$strip>>;
|
|
3728
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
3729
|
+
path: z.ZodString;
|
|
3730
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3731
|
+
}, z.core.$strip>>;
|
|
3732
|
+
}, z.core.$strip>;
|
|
3733
|
+
declare let slatesWebhookHttp: z.ZodObject<{
|
|
3734
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3735
|
+
GET: "GET";
|
|
3736
|
+
POST: "POST";
|
|
3737
|
+
PUT: "PUT";
|
|
3738
|
+
PATCH: "PATCH";
|
|
3739
|
+
DELETE: "DELETE";
|
|
3740
|
+
HEAD: "HEAD";
|
|
3741
|
+
OPTIONS: "OPTIONS";
|
|
3742
|
+
}>>>;
|
|
3743
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
3744
|
+
mode: z.ZodEnum<{
|
|
3745
|
+
never: "never";
|
|
3746
|
+
match: "match";
|
|
3747
|
+
always: "always";
|
|
3748
|
+
}>;
|
|
3749
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3750
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3751
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
3752
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
3753
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
3754
|
+
path: z.ZodString;
|
|
3755
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3756
|
+
}, z.core.$strip>>;
|
|
3757
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
3758
|
+
path: z.ZodString;
|
|
3759
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3760
|
+
}, z.core.$strip>>;
|
|
3761
|
+
}, z.core.$strip>>>;
|
|
3762
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3763
|
+
}, z.core.$strip>>;
|
|
3764
|
+
}, z.core.$strip>;
|
|
3492
3765
|
declare let slatesActionTrigger: z.ZodObject<{
|
|
3493
3766
|
id: z.ZodString;
|
|
3494
3767
|
name: z.ZodString;
|
|
@@ -3522,6 +3795,38 @@ declare let slatesActionTrigger: z.ZodObject<{
|
|
|
3522
3795
|
type: z.ZodLiteral<"webhook">;
|
|
3523
3796
|
autoRegistration: z.ZodBoolean;
|
|
3524
3797
|
autoUnregistration: z.ZodBoolean;
|
|
3798
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
3799
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3800
|
+
GET: "GET";
|
|
3801
|
+
POST: "POST";
|
|
3802
|
+
PUT: "PUT";
|
|
3803
|
+
PATCH: "PATCH";
|
|
3804
|
+
DELETE: "DELETE";
|
|
3805
|
+
HEAD: "HEAD";
|
|
3806
|
+
OPTIONS: "OPTIONS";
|
|
3807
|
+
}>>>;
|
|
3808
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
3809
|
+
mode: z.ZodEnum<{
|
|
3810
|
+
never: "never";
|
|
3811
|
+
match: "match";
|
|
3812
|
+
always: "always";
|
|
3813
|
+
}>;
|
|
3814
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3815
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3816
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
3817
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
3818
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
3819
|
+
path: z.ZodString;
|
|
3820
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3821
|
+
}, z.core.$strip>>;
|
|
3822
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
3823
|
+
path: z.ZodString;
|
|
3824
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3825
|
+
}, z.core.$strip>>;
|
|
3826
|
+
}, z.core.$strip>>>;
|
|
3827
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3828
|
+
}, z.core.$strip>>;
|
|
3829
|
+
}, z.core.$strip>>;
|
|
3525
3830
|
}, z.core.$strip>]>;
|
|
3526
3831
|
}, z.core.$strip>;
|
|
3527
3832
|
declare let slatesAction: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -3583,12 +3888,46 @@ declare let slatesAction: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3583
3888
|
type: z.ZodLiteral<"webhook">;
|
|
3584
3889
|
autoRegistration: z.ZodBoolean;
|
|
3585
3890
|
autoUnregistration: z.ZodBoolean;
|
|
3891
|
+
http: z.ZodOptional<z.ZodObject<{
|
|
3892
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3893
|
+
GET: "GET";
|
|
3894
|
+
POST: "POST";
|
|
3895
|
+
PUT: "PUT";
|
|
3896
|
+
PATCH: "PATCH";
|
|
3897
|
+
DELETE: "DELETE";
|
|
3898
|
+
HEAD: "HEAD";
|
|
3899
|
+
OPTIONS: "OPTIONS";
|
|
3900
|
+
}>>>;
|
|
3901
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
3902
|
+
mode: z.ZodEnum<{
|
|
3903
|
+
never: "never";
|
|
3904
|
+
match: "match";
|
|
3905
|
+
always: "always";
|
|
3906
|
+
}>;
|
|
3907
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3908
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3909
|
+
hasQueryParam: z.ZodOptional<z.ZodString>;
|
|
3910
|
+
hasHeader: z.ZodOptional<z.ZodString>;
|
|
3911
|
+
jsonBodyField: z.ZodOptional<z.ZodObject<{
|
|
3912
|
+
path: z.ZodString;
|
|
3913
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3914
|
+
}, z.core.$strip>>;
|
|
3915
|
+
formBodyField: z.ZodOptional<z.ZodObject<{
|
|
3916
|
+
path: z.ZodString;
|
|
3917
|
+
equals: z.ZodOptional<z.ZodString>;
|
|
3918
|
+
}, z.core.$strip>>;
|
|
3919
|
+
}, z.core.$strip>>>;
|
|
3920
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3921
|
+
}, z.core.$strip>>;
|
|
3922
|
+
}, z.core.$strip>>;
|
|
3586
3923
|
}, z.core.$strip>]>;
|
|
3587
3924
|
}, z.core.$strip>]>;
|
|
3588
3925
|
type SlatesAction = z.infer<typeof slatesAction>;
|
|
3589
3926
|
type SlatesActionTool = z.infer<typeof slatesActionTool>;
|
|
3590
3927
|
type SlatesActionTrigger = z.infer<typeof slatesActionTrigger>;
|
|
3591
3928
|
type SlatesActionScopes = z.infer<typeof slatesActionScopes>;
|
|
3929
|
+
type SlatesWebhookRequestMatcher = z.infer<typeof slatesWebhookRequestMatcher>;
|
|
3930
|
+
type SlatesWebhookHttp = z.infer<typeof slatesWebhookHttp>;
|
|
3592
3931
|
|
|
3593
3932
|
declare let slatesAuthenticationMethod: z.ZodObject<{
|
|
3594
3933
|
id: z.ZodString;
|
|
@@ -3636,4 +3975,4 @@ type SlatesParticipant = z.infer<typeof slatesParticipant>;
|
|
|
3636
3975
|
declare const SLATES_PROTOCOL_VERSION: "slates@2026-01-01";
|
|
3637
3976
|
type SlatesProtocolVersion = typeof SLATES_PROTOCOL_VERSION;
|
|
3638
3977
|
|
|
3639
|
-
export { SLATES_PROTOCOL_VERSION, type SlateAuthenticationMethod, type SlatesAction, type SlatesActionRequests, type SlatesActionResponses, type SlatesActionScopes, type SlatesActionTool, type SlatesActionTrigger, type SlatesAuthNotifications, type SlatesAuthRequests, type SlatesAuthResponses, type SlatesConfigNotifications, type SlatesConfigRequests, type SlatesConfigResponses, type SlatesControlFlowNotifications, type SlatesIdentifyRequests, type SlatesIdentifyResponses, type SlatesMessageActionGetRequest, type SlatesMessageActionGetResponse, type SlatesMessageActionInvokeRequest, type SlatesMessageActionInvokeResponse, type SlatesMessageActionTriggerEventMapRequest, type SlatesMessageActionTriggerEventMapResponse, type SlatesMessageActionTriggerEventsPollRequest, type SlatesMessageActionTriggerEventsPollResponse, type SlatesMessageActionTriggerWebhookHandleRequest, type SlatesMessageActionTriggerWebhookHandleResponse, type SlatesMessageActionTriggerWebhookRegisterRequest, type SlatesMessageActionTriggerWebhookRegisterResponse, type SlatesMessageActionTriggerWebhookUnregisterRequest, type SlatesMessageActionTriggerWebhookUnregisterResponse, type SlatesMessageActionsListRequest, type SlatesMessageActionsListResponse, type SlatesMessageAuthAuthorizationCallbackHandleRequest, type SlatesMessageAuthAuthorizationCallbackHandleResponse, type SlatesMessageAuthAuthorizationUrlGetRequest, type SlatesMessageAuthAuthorizationUrlGetResponse, type SlatesMessageAuthDefaultInputGetRequest, type SlatesMessageAuthDefaultInputGetResponse, type SlatesMessageAuthInputChangedRequest, type SlatesMessageAuthInputChangedResponse, type SlatesMessageAuthMethodGetRequest, type SlatesMessageAuthMethodGetResponse, type SlatesMessageAuthMethodsListRequest, type SlatesMessageAuthMethodsListResponse, type SlatesMessageAuthOutputGetRequest, type SlatesMessageAuthOutputGetResponse, type SlatesMessageAuthProfileGetRequest, type SlatesMessageAuthProfileGetResponse, type SlatesMessageAuthTokenRefreshHandleRequest, type SlatesMessageAuthTokenRefreshHandleResponse, type SlatesMessageConfigChangedRequest, type SlatesMessageConfigChangedResponse, type SlatesMessageConfigDefaultGetRequest, type SlatesMessageConfigDefaultGetResponse, type SlatesMessageConfigSchemaGetRequest, type SlatesMessageConfigSchemaGetResponse, type SlatesMessageHelloNotification, type SlatesMessageProviderIdentifyRequest, type SlatesMessageProviderIdentifyResponse, type SlatesMessageSessionStartNotification, type SlatesMessageSetAuthNotification, type SlatesMessageSetConfigNotification, type SlatesMessageSetParticipantsNotification, type SlatesNotifications, type SlatesParticipant, type SlatesProtocolVersion, SlatesProviderProtoHandlerManager, type SlatesRequests, type SlatesResponses, type SlatesResponsesByMethod, createSlatesProviderProtoHandler, slatesAction, slatesActionBase, slatesActionRequestsByMethod, slatesActionResponsesByMethod, slatesActionScopeClause, slatesActionScopes, slatesActionTool, slatesActionTrigger, slatesAuthNotificationsByMethod, slatesAuthRequestsByMethod, slatesAuthResponsesByMethod, slatesAuthenticationMethod, slatesConfigNotificationsByMethod, slatesConfigRequestsByMethod, slatesConfigResponsesByMethod, slatesControlFlowNotificationsByMethod, slatesIdentifyRequestsByMethod, slatesIdentifyResponsesByMethod, slatesMessageActionGetRequest, slatesMessageActionGetResponse, slatesMessageActionInvokeRequest, slatesMessageActionInvokeResponse, slatesMessageActionTriggerEventMapRequest, slatesMessageActionTriggerEventMapResponse, slatesMessageActionTriggerEventsPollRequest, slatesMessageActionTriggerEventsPollResponse, slatesMessageActionTriggerWebhookHandleRequest, slatesMessageActionTriggerWebhookHandleResponse, slatesMessageActionTriggerWebhookRegisterRequest, slatesMessageActionTriggerWebhookRegisterResponse, slatesMessageActionTriggerWebhookUnregisterRequest, slatesMessageActionTriggerWebhookUnregisterResponse, slatesMessageActionsListRequest, slatesMessageActionsListResponse, slatesMessageAuthAuthorizationCallbackHandleRequest, slatesMessageAuthAuthorizationCallbackHandleResponse, slatesMessageAuthAuthorizationUrlGetRequest, slatesMessageAuthAuthorizationUrlGetResponse, slatesMessageAuthDefaultInputGetRequest, slatesMessageAuthDefaultInputGetResponse, slatesMessageAuthInputChangedRequest, slatesMessageAuthInputChangedResponse, slatesMessageAuthMethodGetRequest, slatesMessageAuthMethodGetResponse, slatesMessageAuthMethodsListRequest, slatesMessageAuthMethodsListResponse, slatesMessageAuthOutputGetRequest, slatesMessageAuthOutputGetResponse, slatesMessageAuthProfileGetRequest, slatesMessageAuthProfileGetResponse, slatesMessageAuthTokenRefreshHandleRequest, slatesMessageAuthTokenRefreshHandleResponse, slatesMessageConfigChangedRequest, slatesMessageConfigChangedResponse, slatesMessageConfigDefaultGetRequest, slatesMessageConfigDefaultGetResponse, slatesMessageConfigSchemaGetRequest, slatesMessageConfigSchemaGetResponse, slatesMessageHelloNotification, slatesMessageProviderIdentifyRequest, slatesMessageProviderIdentifyResponse, slatesMessageSessionStartNotification, slatesMessageSetAuthNotification, slatesMessageSetConfigNotification, slatesMessageSetParticipantsNotification, slatesNotificationsByMethod, slatesParticipant, slatesRequestTrace, slatesRequestTraceTextBody, slatesRequestsByMethod, slatesResponsesByMethod, withRequestTraces };
|
|
3978
|
+
export { SLATES_PROTOCOL_VERSION, type SlateAuthenticationMethod, type SlatesAction, type SlatesActionRequests, type SlatesActionResponses, type SlatesActionScopes, type SlatesActionTool, type SlatesActionTrigger, type SlatesAuthNotifications, type SlatesAuthRequests, type SlatesAuthResponses, type SlatesConfigNotifications, type SlatesConfigRequests, type SlatesConfigResponses, type SlatesControlFlowNotifications, type SlatesIdentifyRequests, type SlatesIdentifyResponses, type SlatesMessageActionGetRequest, type SlatesMessageActionGetResponse, type SlatesMessageActionInvokeRequest, type SlatesMessageActionInvokeResponse, type SlatesMessageActionTriggerEventMapRequest, type SlatesMessageActionTriggerEventMapResponse, type SlatesMessageActionTriggerEventsPollRequest, type SlatesMessageActionTriggerEventsPollResponse, type SlatesMessageActionTriggerWebhookHandleRequest, type SlatesMessageActionTriggerWebhookHandleResponse, type SlatesMessageActionTriggerWebhookRegisterRequest, type SlatesMessageActionTriggerWebhookRegisterResponse, type SlatesMessageActionTriggerWebhookUnregisterRequest, type SlatesMessageActionTriggerWebhookUnregisterResponse, type SlatesMessageActionsListRequest, type SlatesMessageActionsListResponse, type SlatesMessageAuthAuthorizationCallbackHandleRequest, type SlatesMessageAuthAuthorizationCallbackHandleResponse, type SlatesMessageAuthAuthorizationUrlGetRequest, type SlatesMessageAuthAuthorizationUrlGetResponse, type SlatesMessageAuthDefaultInputGetRequest, type SlatesMessageAuthDefaultInputGetResponse, type SlatesMessageAuthInputChangedRequest, type SlatesMessageAuthInputChangedResponse, type SlatesMessageAuthMethodGetRequest, type SlatesMessageAuthMethodGetResponse, type SlatesMessageAuthMethodsListRequest, type SlatesMessageAuthMethodsListResponse, type SlatesMessageAuthOutputGetRequest, type SlatesMessageAuthOutputGetResponse, type SlatesMessageAuthProfileGetRequest, type SlatesMessageAuthProfileGetResponse, type SlatesMessageAuthTokenRefreshHandleRequest, type SlatesMessageAuthTokenRefreshHandleResponse, type SlatesMessageConfigChangedRequest, type SlatesMessageConfigChangedResponse, type SlatesMessageConfigDefaultGetRequest, type SlatesMessageConfigDefaultGetResponse, type SlatesMessageConfigSchemaGetRequest, type SlatesMessageConfigSchemaGetResponse, type SlatesMessageHelloNotification, type SlatesMessageProviderIdentifyRequest, type SlatesMessageProviderIdentifyResponse, type SlatesMessageSessionStartNotification, type SlatesMessageSetAuthNotification, type SlatesMessageSetConfigNotification, type SlatesMessageSetParticipantsNotification, type SlatesNotifications, type SlatesParticipant, type SlatesProtocolVersion, SlatesProviderProtoHandlerManager, type SlatesRequests, type SlatesResponses, type SlatesResponsesByMethod, type SlatesWebhookHttp, type SlatesWebhookHttpResponse, type SlatesWebhookRequestMatcher, createSlatesProviderProtoHandler, slatesAction, slatesActionBase, slatesActionRequestsByMethod, slatesActionResponsesByMethod, slatesActionScopeClause, slatesActionScopes, slatesActionTool, slatesActionTrigger, slatesAuthNotificationsByMethod, slatesAuthRequestsByMethod, slatesAuthResponsesByMethod, slatesAuthenticationMethod, slatesConfigNotificationsByMethod, slatesConfigRequestsByMethod, slatesConfigResponsesByMethod, slatesControlFlowNotificationsByMethod, slatesIdentifyRequestsByMethod, slatesIdentifyResponsesByMethod, slatesMessageActionGetRequest, slatesMessageActionGetResponse, slatesMessageActionInvokeRequest, slatesMessageActionInvokeResponse, slatesMessageActionTriggerEventMapRequest, slatesMessageActionTriggerEventMapResponse, slatesMessageActionTriggerEventsPollRequest, slatesMessageActionTriggerEventsPollResponse, slatesMessageActionTriggerWebhookHandleRequest, slatesMessageActionTriggerWebhookHandleResponse, slatesMessageActionTriggerWebhookRegisterRequest, slatesMessageActionTriggerWebhookRegisterResponse, slatesMessageActionTriggerWebhookUnregisterRequest, slatesMessageActionTriggerWebhookUnregisterResponse, slatesMessageActionsListRequest, slatesMessageActionsListResponse, slatesMessageAuthAuthorizationCallbackHandleRequest, slatesMessageAuthAuthorizationCallbackHandleResponse, slatesMessageAuthAuthorizationUrlGetRequest, slatesMessageAuthAuthorizationUrlGetResponse, slatesMessageAuthDefaultInputGetRequest, slatesMessageAuthDefaultInputGetResponse, slatesMessageAuthInputChangedRequest, slatesMessageAuthInputChangedResponse, slatesMessageAuthMethodGetRequest, slatesMessageAuthMethodGetResponse, slatesMessageAuthMethodsListRequest, slatesMessageAuthMethodsListResponse, slatesMessageAuthOutputGetRequest, slatesMessageAuthOutputGetResponse, slatesMessageAuthProfileGetRequest, slatesMessageAuthProfileGetResponse, slatesMessageAuthTokenRefreshHandleRequest, slatesMessageAuthTokenRefreshHandleResponse, slatesMessageConfigChangedRequest, slatesMessageConfigChangedResponse, slatesMessageConfigDefaultGetRequest, slatesMessageConfigDefaultGetResponse, slatesMessageConfigSchemaGetRequest, slatesMessageConfigSchemaGetResponse, slatesMessageHelloNotification, slatesMessageProviderIdentifyRequest, slatesMessageProviderIdentifyResponse, slatesMessageSessionStartNotification, slatesMessageSetAuthNotification, slatesMessageSetConfigNotification, slatesMessageSetParticipantsNotification, slatesNotificationsByMethod, slatesParticipant, slatesRequestTrace, slatesRequestTraceTextBody, slatesRequestsByMethod, slatesResponsesByMethod, slatesWebhookHttp, slatesWebhookHttpResponse, slatesWebhookRequestMatcher, withRequestTraces };
|
package/dist/index.module.js
CHANGED
|
@@ -44,6 +44,27 @@ var slatesActionTool = slatesActionBase.extend({
|
|
|
44
44
|
type: z.literal("action.tool"),
|
|
45
45
|
capabilities: z.object({})
|
|
46
46
|
});
|
|
47
|
+
var slatesWebhookRequestMatcher = z.object({
|
|
48
|
+
method: z.string().optional(),
|
|
49
|
+
hasQueryParam: z.string().optional(),
|
|
50
|
+
hasHeader: z.string().optional(),
|
|
51
|
+
jsonBodyField: z.object({
|
|
52
|
+
path: z.string(),
|
|
53
|
+
equals: z.string().optional()
|
|
54
|
+
}).optional(),
|
|
55
|
+
formBodyField: z.object({
|
|
56
|
+
path: z.string(),
|
|
57
|
+
equals: z.string().optional()
|
|
58
|
+
}).optional()
|
|
59
|
+
});
|
|
60
|
+
var slatesWebhookHttp = z.object({
|
|
61
|
+
methods: z.array(z.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"])).optional(),
|
|
62
|
+
sync: z.object({
|
|
63
|
+
mode: z.enum(["never", "match", "always"]),
|
|
64
|
+
match: z.array(slatesWebhookRequestMatcher).optional(),
|
|
65
|
+
timeoutMs: z.number().int().positive().max(15e3).optional()
|
|
66
|
+
}).optional()
|
|
67
|
+
});
|
|
47
68
|
var slatesActionTrigger = slatesActionBase.extend({
|
|
48
69
|
type: z.literal("action.trigger"),
|
|
49
70
|
capabilities: z.object({}),
|
|
@@ -55,7 +76,8 @@ var slatesActionTrigger = slatesActionBase.extend({
|
|
|
55
76
|
z.object({
|
|
56
77
|
type: z.literal("webhook"),
|
|
57
78
|
autoRegistration: z.boolean(),
|
|
58
|
-
autoUnregistration: z.boolean()
|
|
79
|
+
autoUnregistration: z.boolean(),
|
|
80
|
+
http: slatesWebhookHttp.optional()
|
|
59
81
|
})
|
|
60
82
|
])
|
|
61
83
|
});
|
|
@@ -146,6 +168,14 @@ var withRequestTraces = (shape) => z4.object({
|
|
|
146
168
|
});
|
|
147
169
|
|
|
148
170
|
// src/messages/action.ts
|
|
171
|
+
var slatesWebhookHttpResponse = z5.object({
|
|
172
|
+
status: z5.number().int().min(100).max(599),
|
|
173
|
+
headers: z5.record(z5.string(), z5.string()),
|
|
174
|
+
body: z5.object({
|
|
175
|
+
encoding: z5.literal("base64"),
|
|
176
|
+
content: z5.string()
|
|
177
|
+
}).nullable()
|
|
178
|
+
});
|
|
149
179
|
var slatesMessageActionsListRequest = z5.object({
|
|
150
180
|
jsonrpc: z5.literal("2.0"),
|
|
151
181
|
method: z5.literal("slates/actions.list"),
|
|
@@ -255,7 +285,8 @@ var slatesMessageActionTriggerWebhookHandleRequest = z5.object({
|
|
|
255
285
|
encoding: z5.literal("base64"),
|
|
256
286
|
content: z5.string()
|
|
257
287
|
}).nullable(),
|
|
258
|
-
state: z5.any().nullable()
|
|
288
|
+
state: z5.any().nullable(),
|
|
289
|
+
registrationDetails: z5.any().nullable().optional()
|
|
259
290
|
})
|
|
260
291
|
});
|
|
261
292
|
var slatesMessageActionTriggerWebhookHandleResponse = z5.object({
|
|
@@ -263,7 +294,8 @@ var slatesMessageActionTriggerWebhookHandleResponse = z5.object({
|
|
|
263
294
|
id: z5.string(),
|
|
264
295
|
result: withRequestTraces({
|
|
265
296
|
inputs: z5.array(z5.record(z5.string(), z5.any())),
|
|
266
|
-
updatedState: z5.any().nullable().optional()
|
|
297
|
+
updatedState: z5.any().nullable().optional(),
|
|
298
|
+
response: slatesWebhookHttpResponse.nullable().optional()
|
|
267
299
|
})
|
|
268
300
|
});
|
|
269
301
|
var slatesMessageActionTriggerWebhookRegisterRequest = z5.object({
|
|
@@ -1021,5 +1053,8 @@ export {
|
|
|
1021
1053
|
slatesRequestTraceTextBody,
|
|
1022
1054
|
slatesRequestsByMethod,
|
|
1023
1055
|
slatesResponsesByMethod,
|
|
1056
|
+
slatesWebhookHttp,
|
|
1057
|
+
slatesWebhookHttpResponse,
|
|
1058
|
+
slatesWebhookRequestMatcher,
|
|
1024
1059
|
withRequestTraces
|
|
1025
1060
|
};
|
package/package.json
CHANGED
package/src/messages/action.ts
CHANGED
|
@@ -2,6 +2,19 @@ import z from 'zod';
|
|
|
2
2
|
import { slatesAction } from '../types';
|
|
3
3
|
import { withRequestTraces } from './tracing';
|
|
4
4
|
|
|
5
|
+
export let slatesWebhookHttpResponse = z.object({
|
|
6
|
+
status: z.number().int().min(100).max(599),
|
|
7
|
+
headers: z.record(z.string(), z.string()),
|
|
8
|
+
body: z
|
|
9
|
+
.object({
|
|
10
|
+
encoding: z.literal('base64'),
|
|
11
|
+
content: z.string()
|
|
12
|
+
})
|
|
13
|
+
.nullable()
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export type SlatesWebhookHttpResponse = z.infer<typeof slatesWebhookHttpResponse>;
|
|
17
|
+
|
|
5
18
|
/**
|
|
6
19
|
* List Actions
|
|
7
20
|
*/
|
|
@@ -177,7 +190,8 @@ export let slatesMessageActionTriggerWebhookHandleRequest = z.object({
|
|
|
177
190
|
content: z.string()
|
|
178
191
|
})
|
|
179
192
|
.nullable(),
|
|
180
|
-
state: z.any().nullable()
|
|
193
|
+
state: z.any().nullable(),
|
|
194
|
+
registrationDetails: z.any().nullable().optional()
|
|
181
195
|
})
|
|
182
196
|
});
|
|
183
197
|
|
|
@@ -190,7 +204,8 @@ export let slatesMessageActionTriggerWebhookHandleResponse = z.object({
|
|
|
190
204
|
id: z.string(),
|
|
191
205
|
result: withRequestTraces({
|
|
192
206
|
inputs: z.array(z.record(z.string(), z.any())),
|
|
193
|
-
updatedState: z.any().nullable().optional()
|
|
207
|
+
updatedState: z.any().nullable().optional(),
|
|
208
|
+
response: slatesWebhookHttpResponse.nullable().optional()
|
|
194
209
|
})
|
|
195
210
|
});
|
|
196
211
|
|
package/src/types/action.ts
CHANGED
|
@@ -42,6 +42,37 @@ export let slatesActionTool = slatesActionBase.extend({
|
|
|
42
42
|
capabilities: z.object({})
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
+
export let slatesWebhookRequestMatcher = z.object({
|
|
46
|
+
method: z.string().optional(),
|
|
47
|
+
hasQueryParam: z.string().optional(),
|
|
48
|
+
hasHeader: z.string().optional(),
|
|
49
|
+
jsonBodyField: z
|
|
50
|
+
.object({
|
|
51
|
+
path: z.string(),
|
|
52
|
+
equals: z.string().optional()
|
|
53
|
+
})
|
|
54
|
+
.optional(),
|
|
55
|
+
formBodyField: z
|
|
56
|
+
.object({
|
|
57
|
+
path: z.string(),
|
|
58
|
+
equals: z.string().optional()
|
|
59
|
+
})
|
|
60
|
+
.optional()
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export let slatesWebhookHttp = z.object({
|
|
64
|
+
methods: z
|
|
65
|
+
.array(z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']))
|
|
66
|
+
.optional(),
|
|
67
|
+
sync: z
|
|
68
|
+
.object({
|
|
69
|
+
mode: z.enum(['never', 'match', 'always']),
|
|
70
|
+
match: z.array(slatesWebhookRequestMatcher).optional(),
|
|
71
|
+
timeoutMs: z.number().int().positive().max(15_000).optional()
|
|
72
|
+
})
|
|
73
|
+
.optional()
|
|
74
|
+
});
|
|
75
|
+
|
|
45
76
|
export let slatesActionTrigger = slatesActionBase.extend({
|
|
46
77
|
type: z.literal('action.trigger'),
|
|
47
78
|
capabilities: z.object({}),
|
|
@@ -54,7 +85,8 @@ export let slatesActionTrigger = slatesActionBase.extend({
|
|
|
54
85
|
z.object({
|
|
55
86
|
type: z.literal('webhook'),
|
|
56
87
|
autoRegistration: z.boolean(),
|
|
57
|
-
autoUnregistration: z.boolean()
|
|
88
|
+
autoUnregistration: z.boolean(),
|
|
89
|
+
http: slatesWebhookHttp.optional()
|
|
58
90
|
})
|
|
59
91
|
])
|
|
60
92
|
});
|
|
@@ -65,3 +97,5 @@ export type SlatesAction = z.infer<typeof slatesAction>;
|
|
|
65
97
|
export type SlatesActionTool = z.infer<typeof slatesActionTool>;
|
|
66
98
|
export type SlatesActionTrigger = z.infer<typeof slatesActionTrigger>;
|
|
67
99
|
export type SlatesActionScopes = z.infer<typeof slatesActionScopes>;
|
|
100
|
+
export type SlatesWebhookRequestMatcher = z.infer<typeof slatesWebhookRequestMatcher>;
|
|
101
|
+
export type SlatesWebhookHttp = z.infer<typeof slatesWebhookHttp>;
|