@relaycast/types 0.2.3 → 0.2.5
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/agent.d.ts +189 -23
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +73 -1
- package/dist/agent.js.map +1 -1
- package/dist/api.d.ts +209 -14
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +22 -1
- package/dist/api.js.map +1 -1
- package/dist/billing.d.ts +97 -17
- package/dist/billing.d.ts.map +1 -1
- package/dist/billing.js +44 -1
- package/dist/billing.js.map +1 -1
- package/dist/channel.d.ts +80 -16
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +35 -1
- package/dist/channel.js.map +1 -1
- package/dist/command.d.ts +188 -26
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +47 -1
- package/dist/command.js.map +1 -1
- package/dist/dashboard.d.ts +141 -14
- package/dist/dashboard.d.ts.map +1 -1
- package/dist/dashboard.js +32 -1
- package/dist/dashboard.js.map +1 -1
- package/dist/dm.d.ts +74 -15
- package/dist/dm.d.ts.map +1 -1
- package/dist/dm.js +33 -1
- package/dist/dm.js.map +1 -1
- package/dist/events.d.ts +1479 -75
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +186 -1
- package/dist/events.js.map +1 -1
- package/dist/file.d.ts +83 -14
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +38 -1
- package/dist/file.js.map +1 -1
- package/dist/message.d.ts +875 -52
- package/dist/message.d.ts.map +1 -1
- package/dist/message.js +75 -1
- package/dist/message.js.map +1 -1
- package/dist/reaction.d.ts +35 -7
- package/dist/reaction.d.ts.map +1 -1
- package/dist/reaction.js +16 -1
- package/dist/reaction.js.map +1 -1
- package/dist/receipt.d.ts +34 -6
- package/dist/receipt.d.ts.map +1 -1
- package/dist/receipt.js +16 -1
- package/dist/receipt.js.map +1 -1
- package/dist/subscription.d.ts +119 -20
- package/dist/subscription.d.ts.map +1 -1
- package/dist/subscription.js +49 -1
- package/dist/subscription.js.map +1 -1
- package/dist/webhook.d.ts +81 -17
- package/dist/webhook.d.ts.map +1 -1
- package/dist/webhook.js +35 -1
- package/dist/webhook.js.map +1 -1
- package/dist/workspace.d.ts +77 -12
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +32 -1
- package/dist/workspace.js.map +1 -1
- package/package.json +4 -1
package/dist/message.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;EAG5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAM7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,eAAe;;;;;;;;;EAG1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,kBAAkB;;;;;;EA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BAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/message.js
CHANGED
|
@@ -1,2 +1,76 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { FileAttachmentSchema } from './file.js';
|
|
3
|
+
import { ReactionGroupSchema } from './reaction.js';
|
|
4
|
+
// Rich Message Blocks
|
|
5
|
+
export const HeaderBlockSchema = z.object({
|
|
6
|
+
type: z.literal('header'),
|
|
7
|
+
text: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export const FieldsBlockSchema = z.object({
|
|
10
|
+
type: z.literal('fields'),
|
|
11
|
+
fields: z.array(z.object({ label: z.string(), value: z.string() })),
|
|
12
|
+
});
|
|
13
|
+
export const ActionButtonSchema = z.object({
|
|
14
|
+
type: z.literal('button'),
|
|
15
|
+
text: z.string(),
|
|
16
|
+
action_id: z.string(),
|
|
17
|
+
value: z.string().optional(),
|
|
18
|
+
style: z.enum(['primary', 'danger']).optional(),
|
|
19
|
+
});
|
|
20
|
+
export const ActionsBlockSchema = z.object({
|
|
21
|
+
type: z.literal('actions'),
|
|
22
|
+
elements: z.array(ActionButtonSchema),
|
|
23
|
+
});
|
|
24
|
+
export const TextBlockSchema = z.object({
|
|
25
|
+
type: z.literal('text'),
|
|
26
|
+
text: z.string(),
|
|
27
|
+
});
|
|
28
|
+
export const DividerBlockSchema = z.object({
|
|
29
|
+
type: z.literal('divider'),
|
|
30
|
+
});
|
|
31
|
+
export const MessageBlockSchema = z.discriminatedUnion('type', [
|
|
32
|
+
HeaderBlockSchema,
|
|
33
|
+
FieldsBlockSchema,
|
|
34
|
+
ActionsBlockSchema,
|
|
35
|
+
TextBlockSchema,
|
|
36
|
+
DividerBlockSchema,
|
|
37
|
+
]);
|
|
38
|
+
export const MessageSchema = z.object({
|
|
39
|
+
id: z.string(),
|
|
40
|
+
workspace_id: z.string(),
|
|
41
|
+
channel_id: z.string(),
|
|
42
|
+
agent_id: z.string(),
|
|
43
|
+
thread_id: z.string().nullable(),
|
|
44
|
+
body: z.string(),
|
|
45
|
+
blocks: z.array(MessageBlockSchema).nullable(),
|
|
46
|
+
has_attachments: z.boolean(),
|
|
47
|
+
created_at: z.string(),
|
|
48
|
+
updated_at: z.string().nullable(),
|
|
49
|
+
});
|
|
50
|
+
export const MessageWithMetaSchema = z.object({
|
|
51
|
+
id: z.string(),
|
|
52
|
+
agent_name: z.string(),
|
|
53
|
+
agent_id: z.string(),
|
|
54
|
+
text: z.string(),
|
|
55
|
+
blocks: z.array(MessageBlockSchema).nullable(),
|
|
56
|
+
attachments: z.array(FileAttachmentSchema),
|
|
57
|
+
created_at: z.string(),
|
|
58
|
+
reply_count: z.number(),
|
|
59
|
+
reactions: z.array(ReactionGroupSchema),
|
|
60
|
+
read_by_count: z.number(),
|
|
61
|
+
});
|
|
62
|
+
export const PostMessageRequestSchema = z.object({
|
|
63
|
+
text: z.string(),
|
|
64
|
+
blocks: z.array(MessageBlockSchema).optional(),
|
|
65
|
+
attachments: z.array(z.string()).optional(),
|
|
66
|
+
});
|
|
67
|
+
export const MessageListQuerySchema = z.object({
|
|
68
|
+
limit: z.number().optional(),
|
|
69
|
+
before: z.string().optional(),
|
|
70
|
+
after: z.string().optional(),
|
|
71
|
+
});
|
|
72
|
+
export const ThreadReplyRequestSchema = z.object({
|
|
73
|
+
text: z.string(),
|
|
74
|
+
blocks: z.array(MessageBlockSchema).optional(),
|
|
75
|
+
});
|
|
2
76
|
//# sourceMappingURL=message.js.map
|
package/dist/message.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,sBAAsB;AAEtB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;CACpE,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;I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,EAAE;CAC7B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC"}
|
package/dist/reaction.d.ts
CHANGED
|
@@ -1,16 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ReactionSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
message_id: z.ZodString;
|
|
5
|
+
agent_id: z.ZodString;
|
|
6
|
+
emoji: z.ZodString;
|
|
7
|
+
created_at: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
2
9
|
id: string;
|
|
3
|
-
|
|
10
|
+
created_at: string;
|
|
4
11
|
agent_id: string;
|
|
12
|
+
message_id: string;
|
|
5
13
|
emoji: string;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
6
16
|
created_at: string;
|
|
7
|
-
|
|
8
|
-
|
|
17
|
+
agent_id: string;
|
|
18
|
+
message_id: string;
|
|
9
19
|
emoji: string;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
20
|
+
}>;
|
|
21
|
+
export type Reaction = z.infer<typeof ReactionSchema>;
|
|
22
|
+
export declare const AddReactionRequestSchema: z.ZodObject<{
|
|
23
|
+
emoji: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
emoji: string;
|
|
26
|
+
}, {
|
|
27
|
+
emoji: string;
|
|
28
|
+
}>;
|
|
29
|
+
export type AddReactionRequest = z.infer<typeof AddReactionRequestSchema>;
|
|
30
|
+
export declare const ReactionGroupSchema: z.ZodObject<{
|
|
31
|
+
emoji: z.ZodString;
|
|
32
|
+
count: z.ZodNumber;
|
|
33
|
+
agents: z.ZodArray<z.ZodString, "many">;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
agents: string[];
|
|
12
36
|
emoji: string;
|
|
13
37
|
count: number;
|
|
38
|
+
}, {
|
|
14
39
|
agents: string[];
|
|
15
|
-
|
|
40
|
+
emoji: string;
|
|
41
|
+
count: number;
|
|
42
|
+
}>;
|
|
43
|
+
export type ReactionGroup = z.infer<typeof ReactionGroupSchema>;
|
|
16
44
|
//# sourceMappingURL=reaction.d.ts.map
|
package/dist/reaction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction.d.ts","sourceRoot":"","sources":["../src/reaction.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"reaction.d.ts","sourceRoot":"","sources":["../src/reaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,wBAAwB;;;;;;EAEnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/reaction.js
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const ReactionSchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
message_id: z.string(),
|
|
5
|
+
agent_id: z.string(),
|
|
6
|
+
emoji: z.string(),
|
|
7
|
+
created_at: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export const AddReactionRequestSchema = z.object({
|
|
10
|
+
emoji: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export const ReactionGroupSchema = z.object({
|
|
13
|
+
emoji: z.string(),
|
|
14
|
+
count: z.number(),
|
|
15
|
+
agents: z.array(z.string()),
|
|
16
|
+
});
|
|
2
17
|
//# sourceMappingURL=reaction.js.map
|
package/dist/reaction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction.js","sourceRoot":"","sources":["../src/reaction.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"reaction.js","sourceRoot":"","sources":["../src/reaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC5B,CAAC,CAAC"}
|
package/dist/receipt.d.ts
CHANGED
|
@@ -1,16 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ReadReceiptSchema: z.ZodObject<{
|
|
3
|
+
message_id: z.ZodString;
|
|
4
|
+
agent_id: z.ZodString;
|
|
5
|
+
read_at: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
agent_id: string;
|
|
2
8
|
message_id: string;
|
|
9
|
+
read_at: string;
|
|
10
|
+
}, {
|
|
3
11
|
agent_id: string;
|
|
12
|
+
message_id: string;
|
|
4
13
|
read_at: string;
|
|
5
|
-
}
|
|
6
|
-
export
|
|
14
|
+
}>;
|
|
15
|
+
export type ReadReceipt = z.infer<typeof ReadReceiptSchema>;
|
|
16
|
+
export declare const ReaderInfoSchema: z.ZodObject<{
|
|
17
|
+
agent_name: z.ZodString;
|
|
18
|
+
agent_id: z.ZodString;
|
|
19
|
+
read_at: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
agent_id: string;
|
|
7
22
|
agent_name: string;
|
|
23
|
+
read_at: string;
|
|
24
|
+
}, {
|
|
8
25
|
agent_id: string;
|
|
26
|
+
agent_name: string;
|
|
9
27
|
read_at: string;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
28
|
+
}>;
|
|
29
|
+
export type ReaderInfo = z.infer<typeof ReaderInfoSchema>;
|
|
30
|
+
export declare const ChannelReadStatusSchema: z.ZodObject<{
|
|
31
|
+
agent_name: z.ZodString;
|
|
32
|
+
last_read_id: z.ZodNullable<z.ZodString>;
|
|
33
|
+
last_read_at: z.ZodNullable<z.ZodString>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
agent_name: string;
|
|
36
|
+
last_read_id: string | null;
|
|
37
|
+
last_read_at: string | null;
|
|
38
|
+
}, {
|
|
12
39
|
agent_name: string;
|
|
13
40
|
last_read_id: string | null;
|
|
14
41
|
last_read_at: string | null;
|
|
15
|
-
}
|
|
42
|
+
}>;
|
|
43
|
+
export type ChannelReadStatus = z.infer<typeof ChannelReadStatusSchema>;
|
|
16
44
|
//# sourceMappingURL=receipt.d.ts.map
|
package/dist/receipt.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../src/receipt.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../src/receipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAI5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/receipt.js
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const ReadReceiptSchema = z.object({
|
|
3
|
+
message_id: z.string(),
|
|
4
|
+
agent_id: z.string(),
|
|
5
|
+
read_at: z.string(),
|
|
6
|
+
});
|
|
7
|
+
export const ReaderInfoSchema = z.object({
|
|
8
|
+
agent_name: z.string(),
|
|
9
|
+
agent_id: z.string(),
|
|
10
|
+
read_at: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export const ChannelReadStatusSchema = z.object({
|
|
13
|
+
agent_name: z.string(),
|
|
14
|
+
last_read_id: z.string().nullable(),
|
|
15
|
+
last_read_at: z.string().nullable(),
|
|
16
|
+
});
|
|
2
17
|
//# sourceMappingURL=receipt.js.map
|
package/dist/receipt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipt.js","sourceRoot":"","sources":["../src/receipt.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"receipt.js","sourceRoot":"","sources":["../src/receipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC"}
|
package/dist/subscription.d.ts
CHANGED
|
@@ -1,30 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SubscribableEventTypeSchema: z.ZodEnum<["message.created", "message.updated", "thread.reply", "reaction.added", "reaction.removed", "agent.online", "agent.offline", "channel.created", "channel.updated", "channel.archived", "member.joined", "member.left", "dm.received", "group_dm.received", "message.read", "file.uploaded", "webhook.received", "command.invoked"]>;
|
|
3
|
+
export type SubscribableEventType = z.infer<typeof SubscribableEventTypeSchema>;
|
|
4
|
+
export declare const SubscriptionFilterSchema: z.ZodObject<{
|
|
5
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
6
|
+
mentions: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
channel?: string | undefined;
|
|
9
|
+
mentions?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
channel?: string | undefined;
|
|
12
|
+
mentions?: string | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export type SubscriptionFilter = z.infer<typeof SubscriptionFilterSchema>;
|
|
15
|
+
export declare const EventSubscriptionSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
workspace_id: z.ZodString;
|
|
18
|
+
events: z.ZodArray<z.ZodEnum<["message.created", "message.updated", "thread.reply", "reaction.added", "reaction.removed", "agent.online", "agent.offline", "channel.created", "channel.updated", "channel.archived", "member.joined", "member.left", "dm.received", "group_dm.received", "message.read", "file.uploaded", "webhook.received", "command.invoked"]>, "many">;
|
|
19
|
+
filter: z.ZodNullable<z.ZodObject<{
|
|
20
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
21
|
+
mentions: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
channel?: string | undefined;
|
|
24
|
+
mentions?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
channel?: string | undefined;
|
|
27
|
+
mentions?: string | undefined;
|
|
28
|
+
}>>;
|
|
29
|
+
url: z.ZodString;
|
|
30
|
+
secret: z.ZodNullable<z.ZodString>;
|
|
31
|
+
is_active: z.ZodBoolean;
|
|
32
|
+
created_at: z.ZodString;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
filter: {
|
|
35
|
+
channel?: string | undefined;
|
|
36
|
+
mentions?: string | undefined;
|
|
37
|
+
} | null;
|
|
7
38
|
id: string;
|
|
8
39
|
workspace_id: string;
|
|
9
|
-
|
|
10
|
-
|
|
40
|
+
created_at: string;
|
|
41
|
+
is_active: boolean;
|
|
11
42
|
url: string;
|
|
43
|
+
events: ("message.created" | "message.updated" | "thread.reply" | "reaction.added" | "reaction.removed" | "dm.received" | "group_dm.received" | "agent.online" | "agent.offline" | "channel.created" | "channel.updated" | "channel.archived" | "member.joined" | "member.left" | "message.read" | "file.uploaded" | "webhook.received" | "command.invoked")[];
|
|
12
44
|
secret: string | null;
|
|
13
|
-
|
|
45
|
+
}, {
|
|
46
|
+
filter: {
|
|
47
|
+
channel?: string | undefined;
|
|
48
|
+
mentions?: string | undefined;
|
|
49
|
+
} | null;
|
|
50
|
+
id: string;
|
|
51
|
+
workspace_id: string;
|
|
14
52
|
created_at: string;
|
|
15
|
-
|
|
16
|
-
export interface CreateSubscriptionRequest {
|
|
17
|
-
events: SubscribableEventType[];
|
|
18
|
-
filter?: SubscriptionFilter;
|
|
53
|
+
is_active: boolean;
|
|
19
54
|
url: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
events: ("message.created" | "message.updated" | "thread.reply" | "reaction.added" | "reaction.removed" | "dm.received" | "group_dm.received" | "agent.online" | "agent.offline" | "channel.created" | "channel.updated" | "channel.archived" | "member.joined" | "member.left" | "message.read" | "file.uploaded" | "webhook.received" | "command.invoked")[];
|
|
56
|
+
secret: string | null;
|
|
57
|
+
}>;
|
|
58
|
+
export type EventSubscription = z.infer<typeof EventSubscriptionSchema>;
|
|
59
|
+
export declare const CreateSubscriptionRequestSchema: z.ZodObject<{
|
|
60
|
+
events: z.ZodArray<z.ZodEnum<["message.created", "message.updated", "thread.reply", "reaction.added", "reaction.removed", "agent.online", "agent.offline", "channel.created", "channel.updated", "channel.archived", "member.joined", "member.left", "dm.received", "group_dm.received", "message.read", "file.uploaded", "webhook.received", "command.invoked"]>, "many">;
|
|
61
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
63
|
+
mentions: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
channel?: string | undefined;
|
|
66
|
+
mentions?: string | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
channel?: string | undefined;
|
|
69
|
+
mentions?: string | undefined;
|
|
70
|
+
}>>;
|
|
71
|
+
url: z.ZodString;
|
|
72
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
74
|
url: string;
|
|
75
|
+
events: ("message.created" | "message.updated" | "thread.reply" | "reaction.added" | "reaction.removed" | "dm.received" | "group_dm.received" | "agent.online" | "agent.offline" | "channel.created" | "channel.updated" | "channel.archived" | "member.joined" | "member.left" | "message.read" | "file.uploaded" | "webhook.received" | "command.invoked")[];
|
|
76
|
+
filter?: {
|
|
77
|
+
channel?: string | undefined;
|
|
78
|
+
mentions?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
secret?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
url: string;
|
|
83
|
+
events: ("message.created" | "message.updated" | "thread.reply" | "reaction.added" | "reaction.removed" | "dm.received" | "group_dm.received" | "agent.online" | "agent.offline" | "channel.created" | "channel.updated" | "channel.archived" | "member.joined" | "member.left" | "message.read" | "file.uploaded" | "webhook.received" | "command.invoked")[];
|
|
84
|
+
filter?: {
|
|
85
|
+
channel?: string | undefined;
|
|
86
|
+
mentions?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
secret?: string | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
export type CreateSubscriptionRequest = z.infer<typeof CreateSubscriptionRequestSchema>;
|
|
91
|
+
export declare const CreateSubscriptionResponseSchema: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
events: z.ZodArray<z.ZodEnum<["message.created", "message.updated", "thread.reply", "reaction.added", "reaction.removed", "agent.online", "agent.offline", "channel.created", "channel.updated", "channel.archived", "member.joined", "member.left", "dm.received", "group_dm.received", "message.read", "file.uploaded", "webhook.received", "command.invoked"]>, "many">;
|
|
94
|
+
filter: z.ZodNullable<z.ZodObject<{
|
|
95
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
96
|
+
mentions: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
channel?: string | undefined;
|
|
99
|
+
mentions?: string | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
channel?: string | undefined;
|
|
102
|
+
mentions?: string | undefined;
|
|
103
|
+
}>>;
|
|
104
|
+
url: z.ZodString;
|
|
105
|
+
is_active: z.ZodBoolean;
|
|
106
|
+
created_at: z.ZodString;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
filter: {
|
|
109
|
+
channel?: string | undefined;
|
|
110
|
+
mentions?: string | undefined;
|
|
111
|
+
} | null;
|
|
112
|
+
id: string;
|
|
113
|
+
created_at: string;
|
|
27
114
|
is_active: boolean;
|
|
115
|
+
url: string;
|
|
116
|
+
events: ("message.created" | "message.updated" | "thread.reply" | "reaction.added" | "reaction.removed" | "dm.received" | "group_dm.received" | "agent.online" | "agent.offline" | "channel.created" | "channel.updated" | "channel.archived" | "member.joined" | "member.left" | "message.read" | "file.uploaded" | "webhook.received" | "command.invoked")[];
|
|
117
|
+
}, {
|
|
118
|
+
filter: {
|
|
119
|
+
channel?: string | undefined;
|
|
120
|
+
mentions?: string | undefined;
|
|
121
|
+
} | null;
|
|
122
|
+
id: string;
|
|
28
123
|
created_at: string;
|
|
29
|
-
|
|
124
|
+
is_active: boolean;
|
|
125
|
+
url: string;
|
|
126
|
+
events: ("message.created" | "message.updated" | "thread.reply" | "reaction.added" | "reaction.removed" | "dm.received" | "group_dm.received" | "agent.online" | "agent.offline" | "channel.created" | "channel.updated" | "channel.archived" | "member.joined" | "member.left" | "message.read" | "file.uploaded" | "webhook.received" | "command.invoked")[];
|
|
127
|
+
}>;
|
|
128
|
+
export type CreateSubscriptionResponse = z.infer<typeof CreateSubscriptionResponseSchema>;
|
|
30
129
|
//# sourceMappingURL=subscription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../src/subscription.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../src/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B,gVAmBtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,wBAAwB;;;;;;;;;EAGnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
package/dist/subscription.js
CHANGED
|
@@ -1,2 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const SubscribableEventTypeSchema = z.enum([
|
|
3
|
+
'message.created',
|
|
4
|
+
'message.updated',
|
|
5
|
+
'thread.reply',
|
|
6
|
+
'reaction.added',
|
|
7
|
+
'reaction.removed',
|
|
8
|
+
'agent.online',
|
|
9
|
+
'agent.offline',
|
|
10
|
+
'channel.created',
|
|
11
|
+
'channel.updated',
|
|
12
|
+
'channel.archived',
|
|
13
|
+
'member.joined',
|
|
14
|
+
'member.left',
|
|
15
|
+
'dm.received',
|
|
16
|
+
'group_dm.received',
|
|
17
|
+
'message.read',
|
|
18
|
+
'file.uploaded',
|
|
19
|
+
'webhook.received',
|
|
20
|
+
'command.invoked',
|
|
21
|
+
]);
|
|
22
|
+
export const SubscriptionFilterSchema = z.object({
|
|
23
|
+
channel: z.string().optional(),
|
|
24
|
+
mentions: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
export const EventSubscriptionSchema = z.object({
|
|
27
|
+
id: z.string(),
|
|
28
|
+
workspace_id: z.string(),
|
|
29
|
+
events: z.array(SubscribableEventTypeSchema),
|
|
30
|
+
filter: SubscriptionFilterSchema.nullable(),
|
|
31
|
+
url: z.string(),
|
|
32
|
+
secret: z.string().nullable(),
|
|
33
|
+
is_active: z.boolean(),
|
|
34
|
+
created_at: z.string(),
|
|
35
|
+
});
|
|
36
|
+
export const CreateSubscriptionRequestSchema = z.object({
|
|
37
|
+
events: z.array(SubscribableEventTypeSchema),
|
|
38
|
+
filter: SubscriptionFilterSchema.optional(),
|
|
39
|
+
url: z.string(),
|
|
40
|
+
secret: z.string().optional(),
|
|
41
|
+
});
|
|
42
|
+
export const CreateSubscriptionResponseSchema = z.object({
|
|
43
|
+
id: z.string(),
|
|
44
|
+
events: z.array(SubscribableEventTypeSchema),
|
|
45
|
+
filter: SubscriptionFilterSchema.nullable(),
|
|
46
|
+
url: z.string(),
|
|
47
|
+
is_active: z.boolean(),
|
|
48
|
+
created_at: z.string(),
|
|
49
|
+
});
|
|
2
50
|
//# sourceMappingURL=subscription.js.map
|
package/dist/subscription.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../src/subscription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CAAC;IAC5C,MAAM,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC3C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC;IAC5C,MAAM,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC3C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC"}
|
package/dist/webhook.d.ts
CHANGED
|
@@ -1,35 +1,99 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const WebhookSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
workspace_id: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
channel_id: z.ZodString;
|
|
7
|
+
channel_name: z.ZodString;
|
|
8
|
+
url: z.ZodString;
|
|
9
|
+
created_by: z.ZodNullable<z.ZodString>;
|
|
10
|
+
created_at: z.ZodString;
|
|
11
|
+
is_active: z.ZodBoolean;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
2
13
|
id: string;
|
|
3
14
|
workspace_id: string;
|
|
4
15
|
name: string;
|
|
5
|
-
|
|
16
|
+
created_at: string;
|
|
6
17
|
channel_name: string;
|
|
7
|
-
url: string;
|
|
8
18
|
created_by: string | null;
|
|
19
|
+
channel_id: string;
|
|
20
|
+
is_active: boolean;
|
|
21
|
+
url: string;
|
|
22
|
+
}, {
|
|
23
|
+
id: string;
|
|
24
|
+
workspace_id: string;
|
|
25
|
+
name: string;
|
|
9
26
|
created_at: string;
|
|
27
|
+
channel_name: string;
|
|
28
|
+
created_by: string | null;
|
|
29
|
+
channel_id: string;
|
|
10
30
|
is_active: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
31
|
+
url: string;
|
|
32
|
+
}>;
|
|
33
|
+
export type Webhook = z.infer<typeof WebhookSchema>;
|
|
34
|
+
export declare const CreateWebhookRequestSchema: z.ZodObject<{
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
channel: z.ZodString;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
38
|
name: string;
|
|
14
39
|
channel: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
40
|
+
}, {
|
|
41
|
+
name: string;
|
|
42
|
+
channel: string;
|
|
43
|
+
}>;
|
|
44
|
+
export type CreateWebhookRequest = z.infer<typeof CreateWebhookRequestSchema>;
|
|
45
|
+
export declare const CreateWebhookResponseSchema: z.ZodObject<{
|
|
46
|
+
webhook_id: z.ZodString;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
channel: z.ZodString;
|
|
49
|
+
url: z.ZodString;
|
|
50
|
+
created_at: z.ZodString;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
name: string;
|
|
53
|
+
created_at: string;
|
|
54
|
+
channel: string;
|
|
55
|
+
url: string;
|
|
17
56
|
webhook_id: string;
|
|
57
|
+
}, {
|
|
18
58
|
name: string;
|
|
59
|
+
created_at: string;
|
|
19
60
|
channel: string;
|
|
20
61
|
url: string;
|
|
62
|
+
webhook_id: string;
|
|
63
|
+
}>;
|
|
64
|
+
export type CreateWebhookResponse = z.infer<typeof CreateWebhookResponseSchema>;
|
|
65
|
+
export declare const WebhookTriggerRequestSchema: z.ZodObject<{
|
|
66
|
+
text: z.ZodOptional<z.ZodString>;
|
|
67
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
68
|
+
source: z.ZodOptional<z.ZodString>;
|
|
69
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
text?: string | undefined;
|
|
72
|
+
source?: string | undefined;
|
|
73
|
+
blocks?: unknown[] | undefined;
|
|
74
|
+
payload?: Record<string, unknown> | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
text?: string | undefined;
|
|
77
|
+
source?: string | undefined;
|
|
78
|
+
blocks?: unknown[] | undefined;
|
|
79
|
+
payload?: Record<string, unknown> | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
export type WebhookTriggerRequest = z.infer<typeof WebhookTriggerRequestSchema>;
|
|
82
|
+
export declare const WebhookTriggerResponseSchema: z.ZodObject<{
|
|
83
|
+
message_id: z.ZodString;
|
|
84
|
+
channel: z.ZodString;
|
|
85
|
+
text: z.ZodString;
|
|
86
|
+
created_at: z.ZodString;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
88
|
created_at: string;
|
|
22
|
-
}
|
|
23
|
-
export interface WebhookTriggerRequest {
|
|
24
|
-
text?: string;
|
|
25
|
-
blocks?: unknown[];
|
|
26
|
-
source?: string;
|
|
27
|
-
payload?: Record<string, unknown>;
|
|
28
|
-
}
|
|
29
|
-
export interface WebhookTriggerResponse {
|
|
30
|
-
message_id: string;
|
|
31
89
|
channel: string;
|
|
32
90
|
text: string;
|
|
91
|
+
message_id: string;
|
|
92
|
+
}, {
|
|
33
93
|
created_at: string;
|
|
34
|
-
|
|
94
|
+
channel: string;
|
|
95
|
+
text: string;
|
|
96
|
+
message_id: string;
|
|
97
|
+
}>;
|
|
98
|
+
export type WebhookTriggerResponse = z.infer<typeof WebhookTriggerResponseSchema>;
|
|
35
99
|
//# sourceMappingURL=webhook.d.ts.map
|
package/dist/webhook.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/webhook.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/webhook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;EAMtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;EAKtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;EAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|