@voltade/envoy-sdk 1.2.11 → 1.2.12
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/http-client.d.ts.map +1 -1
- package/dist/http-client.js +15 -5
- package/dist/http-client.js.map +1 -1
- package/dist/resources/conversations/index.d.ts +16 -2
- package/dist/resources/conversations/index.d.ts.map +1 -1
- package/dist/resources/conversations/index.js +43 -1
- package/dist/resources/conversations/index.js.map +1 -1
- package/dist/resources/conversations/types.d.ts +5 -0
- package/dist/resources/conversations/types.d.ts.map +1 -1
- package/dist/resources/conversations/types.js +6 -0
- package/dist/resources/conversations/types.js.map +1 -1
- package/dist/resources/webhooks/types.d.ts +38 -38
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.d.ts","sourceRoot":"","sources":["../http-client.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,MAAM,EAAE,gBAAgB;IAOpC;;OAEG;I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C,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;IAIb;;OAEG;IACG,KAAK,CAAC,CAAC,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;IAIb;;OAEG;IACG,MAAM,CAAC,CAAC,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;CAGd"}
|
package/dist/http-client.js
CHANGED
|
@@ -12,11 +12,15 @@ export class HttpClient {
|
|
|
12
12
|
/**
|
|
13
13
|
* Get the default headers for all requests
|
|
14
14
|
*/
|
|
15
|
-
getDefaultHeaders() {
|
|
16
|
-
|
|
17
|
-
'Content-Type': 'application/json',
|
|
15
|
+
getDefaultHeaders(isFormData = false) {
|
|
16
|
+
const headers = {
|
|
18
17
|
api_access_token: this.apiKey,
|
|
19
18
|
};
|
|
19
|
+
// Don't set Content-Type for FormData - browser will set it with boundary
|
|
20
|
+
if (!isFormData) {
|
|
21
|
+
headers['Content-Type'] = 'application/json';
|
|
22
|
+
}
|
|
23
|
+
return headers;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* Build the full URL with path and query parameters
|
|
@@ -93,8 +97,10 @@ export class HttpClient {
|
|
|
93
97
|
*/
|
|
94
98
|
async request(method, path, options = {}) {
|
|
95
99
|
const url = this.buildUrl(path, options.params);
|
|
100
|
+
// Check if body is FormData
|
|
101
|
+
const isFormData = options.body instanceof FormData;
|
|
96
102
|
const headers = {
|
|
97
|
-
...this.getDefaultHeaders(),
|
|
103
|
+
...this.getDefaultHeaders(isFormData),
|
|
98
104
|
...options.headers,
|
|
99
105
|
};
|
|
100
106
|
const controller = new AbortController();
|
|
@@ -103,7 +109,11 @@ export class HttpClient {
|
|
|
103
109
|
const response = await fetch(url, {
|
|
104
110
|
method,
|
|
105
111
|
headers,
|
|
106
|
-
body: options.body
|
|
112
|
+
body: options.body
|
|
113
|
+
? isFormData
|
|
114
|
+
? options.body
|
|
115
|
+
: JSON.stringify(options.body)
|
|
116
|
+
: undefined,
|
|
107
117
|
signal: controller.signal,
|
|
108
118
|
});
|
|
109
119
|
clearTimeout(timeoutId);
|
package/dist/http-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../http-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAC;AAqBrB;;GAEG;AACH,MAAM,OAAO,UAAU;IAMrB,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,+BAA+B,CAAC;QACjE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,KAAK,CAAC,CAAC,qBAAqB;IAC/D,CAAC;IAED;;OAEG;IACK,iBAAiB
|
|
1
|
+
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../http-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAC;AAqBrB;;GAEG;AACH,MAAM,OAAO,UAAU;IAMrB,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,+BAA+B,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IAAY,EACZ,IAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAI,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK,CACT,IAAY,EACZ,IAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAI,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,IAAY,EACZ,IAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -23,11 +23,25 @@ export declare class Conversations extends BaseResource {
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```typescript
|
|
26
|
+
* // Simple text message
|
|
26
27
|
* const message = await client.conversations.createMessage(123, {
|
|
27
28
|
* content: 'Hello, how can I help you?',
|
|
28
29
|
* message_type: 'outgoing',
|
|
29
30
|
* private: false
|
|
30
31
|
* });
|
|
32
|
+
*
|
|
33
|
+
* // Message with file attachments
|
|
34
|
+
* const file = new File(['content'], 'example.pdf', { type: 'application/pdf' });
|
|
35
|
+
* const messageWithFiles = await client.conversations.createMessage(123, {
|
|
36
|
+
* content: 'Here are the files',
|
|
37
|
+
* attachments: [file]
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* // Message with URL attachments
|
|
41
|
+
* const messageWithUrls = await client.conversations.createMessage(123, {
|
|
42
|
+
* content: 'Check out these links',
|
|
43
|
+
* attachments: ['https://example.com/file.pdf']
|
|
44
|
+
* });
|
|
31
45
|
* ```
|
|
32
46
|
*/
|
|
33
47
|
createMessage(conversationId: number, params: CreateMessageParams): Promise<Message>;
|
|
@@ -70,6 +84,6 @@ export declare class Conversations extends BaseResource {
|
|
|
70
84
|
*/
|
|
71
85
|
getMessages(conversationId: number): Promise<MessagesResponse>;
|
|
72
86
|
}
|
|
73
|
-
export type { Agent, Assignee, Contact, ContactInbox, Conversation, ConversationMeta, ConversationStatus, ContentType, CreateMessageParams, EscalationResponse, EscalationType, Message, MessageType, MessagesResponse, MessagesResponseMeta, Priority, Team, } from './types.js';
|
|
74
|
-
export { AgentSchema, AssigneeSchema, ContactInboxSchema, ContactSchema, ConversationMetaSchema, ConversationSchema, ConversationStatusSchema, ContentTypeSchema, CreateMessageParamsSchema, EscalationResponseSchema, EscalationTypeSchema, MessageSchema, MessagesResponseMetaSchema, MessagesResponseSchema, MessageTypeSchema, PrioritySchema, TeamSchema, } from './types.js';
|
|
87
|
+
export type { Agent, Assignee, Attachment, Contact, ContactInbox, Conversation, ConversationMeta, ConversationStatus, ContentType, CreateMessageParams, EscalationResponse, EscalationType, Message, MessageType, MessagesResponse, MessagesResponseMeta, Priority, Team, } from './types.js';
|
|
88
|
+
export { AgentSchema, AssigneeSchema, AttachmentSchema, ContactInboxSchema, ContactSchema, ConversationMetaSchema, ConversationSchema, ConversationStatusSchema, ContentTypeSchema, CreateMessageParamsSchema, EscalationResponseSchema, EscalationTypeSchema, MessageSchema, MessagesResponseMetaSchema, MessagesResponseSchema, MessageTypeSchema, PrioritySchema, TeamSchema, } from './types.js';
|
|
75
89
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/conversations/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,OAAO,EACP,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,uBAAe,YAAY;IACb,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU;gBAAlB,MAAM,EAAE,UAAU;CAClD;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/conversations/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,OAAO,EACP,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,uBAAe,YAAY;IACb,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU;gBAAlB,MAAM,EAAE,UAAU;CAClD;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,aAAa,CACjB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,OAAO,CAAC;IAkDnB;;;;;;;;;;;;OAYG;IACG,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAM1E;;;;;;;;;;OAUG;IACG,GAAG,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAMxD;;;;;;;;;;OAUG;IACG,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAKrE;AAGD,YAAY,EACV,KAAK,EACL,QAAQ,EACR,UAAU,EACV,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,QAAQ,EACR,IAAI,GACL,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,UAAU,GACX,MAAM,YAAY,CAAC"}
|
|
@@ -22,14 +22,56 @@ export class Conversations extends BaseResource {
|
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* ```typescript
|
|
25
|
+
* // Simple text message
|
|
25
26
|
* const message = await client.conversations.createMessage(123, {
|
|
26
27
|
* content: 'Hello, how can I help you?',
|
|
27
28
|
* message_type: 'outgoing',
|
|
28
29
|
* private: false
|
|
29
30
|
* });
|
|
31
|
+
*
|
|
32
|
+
* // Message with file attachments
|
|
33
|
+
* const file = new File(['content'], 'example.pdf', { type: 'application/pdf' });
|
|
34
|
+
* const messageWithFiles = await client.conversations.createMessage(123, {
|
|
35
|
+
* content: 'Here are the files',
|
|
36
|
+
* attachments: [file]
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* // Message with URL attachments
|
|
40
|
+
* const messageWithUrls = await client.conversations.createMessage(123, {
|
|
41
|
+
* content: 'Check out these links',
|
|
42
|
+
* attachments: ['https://example.com/file.pdf']
|
|
43
|
+
* });
|
|
30
44
|
* ```
|
|
31
45
|
*/
|
|
32
46
|
async createMessage(conversationId, params) {
|
|
47
|
+
// If attachments are provided, use FormData
|
|
48
|
+
if (params.attachments && params.attachments.length > 0) {
|
|
49
|
+
const formData = new FormData();
|
|
50
|
+
// Add message fields to FormData
|
|
51
|
+
formData.append('content', params.content);
|
|
52
|
+
formData.append('message_type', params.message_type || 'outgoing');
|
|
53
|
+
formData.append('private', String(params.private ?? false));
|
|
54
|
+
formData.append('content_type', params.content_type || 'text');
|
|
55
|
+
if (params.content_attributes) {
|
|
56
|
+
formData.append('content_attributes', JSON.stringify(params.content_attributes));
|
|
57
|
+
}
|
|
58
|
+
// Add attachments
|
|
59
|
+
for (const attachment of params.attachments) {
|
|
60
|
+
if (typeof attachment === 'string') {
|
|
61
|
+
// URL attachment - fetch and convert to blob
|
|
62
|
+
const response = await fetch(attachment);
|
|
63
|
+
const blob = await response.blob();
|
|
64
|
+
const filename = attachment.split('/').pop() || 'file';
|
|
65
|
+
formData.append('attachments[]', blob, filename);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
// File object attachment
|
|
69
|
+
formData.append('attachments[]', attachment);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return await this.client.post(`/conversations/${conversationId}/messages`, formData);
|
|
73
|
+
}
|
|
74
|
+
// No attachments - use regular JSON payload
|
|
33
75
|
const payload = {
|
|
34
76
|
content: params.content,
|
|
35
77
|
message_type: params.message_type || 'outgoing',
|
|
@@ -85,5 +127,5 @@ export class Conversations extends BaseResource {
|
|
|
85
127
|
}
|
|
86
128
|
}
|
|
87
129
|
// Re-export Zod schemas
|
|
88
|
-
export { AgentSchema, AssigneeSchema, ContactInboxSchema, ContactSchema, ConversationMetaSchema, ConversationSchema, ConversationStatusSchema, ContentTypeSchema, CreateMessageParamsSchema, EscalationResponseSchema, EscalationTypeSchema, MessageSchema, MessagesResponseMetaSchema, MessagesResponseSchema, MessageTypeSchema, PrioritySchema, TeamSchema, } from './types.js';
|
|
130
|
+
export { AgentSchema, AssigneeSchema, AttachmentSchema, ContactInboxSchema, ContactSchema, ConversationMetaSchema, ConversationSchema, ConversationStatusSchema, ContentTypeSchema, CreateMessageParamsSchema, EscalationResponseSchema, EscalationTypeSchema, MessageSchema, MessagesResponseMetaSchema, MessagesResponseSchema, MessageTypeSchema, PrioritySchema, TeamSchema, } from './types.js';
|
|
89
131
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../resources/conversations/index.ts"],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;;;;OAUG;IACH,KAAK,CAAC,GAAG,CAAC,cAAsB;QAC9B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAC1B,kBAAkB,cAAc,EAAE,CACnC,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,WAAW,CAAC,cAAsB;QACtC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAC1B,kBAAkB,cAAc,WAAW,CAC5C,CAAC;IACJ,CAAC;CACF;AAwBD,wBAAwB;AACxB,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,UAAU,GACX,MAAM,YAAY,CAAC"}
|
|
@@ -4,24 +4,28 @@ import { z } from 'zod';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const MessageTypeSchema: z.ZodEnum<["incoming", "outgoing"]>;
|
|
6
6
|
export declare const ContentTypeSchema: z.ZodEnum<["text", "input_select", "cards", "form", "article", "incoming_email"]>;
|
|
7
|
+
export declare const AttachmentSchema: z.ZodUnion<[z.ZodString, z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>]>;
|
|
7
8
|
export declare const CreateMessageParamsSchema: z.ZodObject<{
|
|
8
9
|
content: z.ZodString;
|
|
9
10
|
message_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["incoming", "outgoing"]>>>;
|
|
10
11
|
private: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
11
12
|
content_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["text", "input_select", "cards", "form", "article", "incoming_email"]>>>;
|
|
12
13
|
content_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>]>, "many">>;
|
|
13
15
|
}, "strip", z.ZodTypeAny, {
|
|
14
16
|
content: string;
|
|
15
17
|
message_type: "incoming" | "outgoing";
|
|
16
18
|
private: boolean;
|
|
17
19
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
18
20
|
content_attributes?: Record<string, unknown> | undefined;
|
|
21
|
+
attachments?: (string | import("buffer").File)[] | undefined;
|
|
19
22
|
}, {
|
|
20
23
|
content: string;
|
|
21
24
|
message_type?: "incoming" | "outgoing" | undefined;
|
|
22
25
|
private?: boolean | undefined;
|
|
23
26
|
content_type?: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email" | undefined;
|
|
24
27
|
content_attributes?: Record<string, unknown> | undefined;
|
|
28
|
+
attachments?: (string | import("buffer").File)[] | undefined;
|
|
25
29
|
}>;
|
|
26
30
|
export declare const MessageSchema: z.ZodObject<{
|
|
27
31
|
id: z.ZodNumber;
|
|
@@ -940,6 +944,7 @@ export declare const MessagesResponseSchema: z.ZodObject<{
|
|
|
940
944
|
*/
|
|
941
945
|
export type MessageType = z.infer<typeof MessageTypeSchema>;
|
|
942
946
|
export type ContentType = z.infer<typeof ContentTypeSchema>;
|
|
947
|
+
export type Attachment = z.infer<typeof AttachmentSchema>;
|
|
943
948
|
export type CreateMessageParams = z.infer<typeof CreateMessageParamsSchema>;
|
|
944
949
|
export type Message = z.infer<typeof MessageSchema>;
|
|
945
950
|
export type EscalationType = z.infer<typeof EscalationTypeSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../resources/conversations/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAGH,eAAO,MAAM,iBAAiB,qCAAmC,CAAC;AAGlE,eAAO,MAAM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,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -13,6 +13,11 @@ export const ContentTypeSchema = z.enum([
|
|
|
13
13
|
'article',
|
|
14
14
|
'incoming_email',
|
|
15
15
|
]);
|
|
16
|
+
// Attachment schema - can be a URL string or File object (binary)
|
|
17
|
+
export const AttachmentSchema = z.union([
|
|
18
|
+
z.string().url(), // URL string
|
|
19
|
+
z.instanceof(File), // File object for binary uploads
|
|
20
|
+
]);
|
|
16
21
|
// Create message parameters schema
|
|
17
22
|
export const CreateMessageParamsSchema = z.object({
|
|
18
23
|
content: z.string(),
|
|
@@ -20,6 +25,7 @@ export const CreateMessageParamsSchema = z.object({
|
|
|
20
25
|
private: z.boolean().optional().default(false),
|
|
21
26
|
content_type: ContentTypeSchema.optional().default('text'),
|
|
22
27
|
content_attributes: z.record(z.unknown()).optional(),
|
|
28
|
+
attachments: z.array(AttachmentSchema).optional(),
|
|
23
29
|
});
|
|
24
30
|
// Sender schema
|
|
25
31
|
const SenderSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../resources/conversations/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,uBAAuB;AACvB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAElE,uBAAuB;AACvB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC;IACtC,MAAM;IACN,cAAc;IACd,OAAO;IACP,MAAM;IACN,SAAS;IACT,gBAAgB;CACjB,CAAC,CAAC;AAEH,mCAAmC;AACnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,YAAY,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;IAC9D,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC9C,YAAY,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;IAC1D,kBAAkB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,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CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,0BAA0B;IAChC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;CAChC,CAAC,CAAC"}
|
|
@@ -360,11 +360,11 @@ export declare const WebhookMessageSchema: z.ZodObject<{
|
|
|
360
360
|
customer_stage_explanation?: string | null | undefined;
|
|
361
361
|
}>;
|
|
362
362
|
}, "strip", z.ZodTypeAny, {
|
|
363
|
+
status: string;
|
|
363
364
|
content: string | null;
|
|
364
365
|
message_type: number;
|
|
365
366
|
private: boolean;
|
|
366
367
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
367
|
-
status: string;
|
|
368
368
|
content_attributes: {
|
|
369
369
|
in_reply_to?: unknown;
|
|
370
370
|
} & {
|
|
@@ -410,11 +410,11 @@ export declare const WebhookMessageSchema: z.ZodObject<{
|
|
|
410
410
|
assignee_id: number | null;
|
|
411
411
|
};
|
|
412
412
|
}, {
|
|
413
|
+
status: string;
|
|
413
414
|
content: string | null;
|
|
414
415
|
message_type: number;
|
|
415
416
|
private: boolean;
|
|
416
417
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
417
|
-
status: string;
|
|
418
418
|
content_attributes: {
|
|
419
419
|
in_reply_to?: unknown;
|
|
420
420
|
} & {
|
|
@@ -780,11 +780,11 @@ export declare const WebhookConversationSchema: z.ZodObject<{
|
|
|
780
780
|
customer_stage_explanation?: string | null | undefined;
|
|
781
781
|
}>;
|
|
782
782
|
}, "strip", z.ZodTypeAny, {
|
|
783
|
+
status: string;
|
|
783
784
|
content: string | null;
|
|
784
785
|
message_type: number;
|
|
785
786
|
private: boolean;
|
|
786
787
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
787
|
-
status: string;
|
|
788
788
|
content_attributes: {
|
|
789
789
|
in_reply_to?: unknown;
|
|
790
790
|
} & {
|
|
@@ -830,11 +830,11 @@ export declare const WebhookConversationSchema: z.ZodObject<{
|
|
|
830
830
|
assignee_id: number | null;
|
|
831
831
|
};
|
|
832
832
|
}, {
|
|
833
|
+
status: string;
|
|
833
834
|
content: string | null;
|
|
834
835
|
message_type: number;
|
|
835
836
|
private: boolean;
|
|
836
837
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
837
|
-
status: string;
|
|
838
838
|
content_attributes: {
|
|
839
839
|
in_reply_to?: unknown;
|
|
840
840
|
} & {
|
|
@@ -1036,11 +1036,11 @@ export declare const WebhookConversationSchema: z.ZodObject<{
|
|
|
1036
1036
|
pubsub_token: string;
|
|
1037
1037
|
};
|
|
1038
1038
|
messages: {
|
|
1039
|
+
status: string;
|
|
1039
1040
|
content: string | null;
|
|
1040
1041
|
message_type: number;
|
|
1041
1042
|
private: boolean;
|
|
1042
1043
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
1043
|
-
status: string;
|
|
1044
1044
|
content_attributes: {
|
|
1045
1045
|
in_reply_to?: unknown;
|
|
1046
1046
|
} & {
|
|
@@ -1159,11 +1159,11 @@ export declare const WebhookConversationSchema: z.ZodObject<{
|
|
|
1159
1159
|
pubsub_token: string;
|
|
1160
1160
|
};
|
|
1161
1161
|
messages: {
|
|
1162
|
+
status: string;
|
|
1162
1163
|
content: string | null;
|
|
1163
1164
|
message_type: number;
|
|
1164
1165
|
private: boolean;
|
|
1165
1166
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
1166
|
-
status: string;
|
|
1167
1167
|
content_attributes: {
|
|
1168
1168
|
in_reply_to?: unknown;
|
|
1169
1169
|
} & {
|
|
@@ -1486,11 +1486,11 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
|
|
|
1486
1486
|
customer_stage_explanation?: string | null | undefined;
|
|
1487
1487
|
}>;
|
|
1488
1488
|
}, "strip", z.ZodTypeAny, {
|
|
1489
|
+
status: string;
|
|
1489
1490
|
content: string | null;
|
|
1490
1491
|
message_type: number;
|
|
1491
1492
|
private: boolean;
|
|
1492
1493
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
1493
|
-
status: string;
|
|
1494
1494
|
content_attributes: {
|
|
1495
1495
|
in_reply_to?: unknown;
|
|
1496
1496
|
} & {
|
|
@@ -1536,11 +1536,11 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
|
|
|
1536
1536
|
assignee_id: number | null;
|
|
1537
1537
|
};
|
|
1538
1538
|
}, {
|
|
1539
|
+
status: string;
|
|
1539
1540
|
content: string | null;
|
|
1540
1541
|
message_type: number;
|
|
1541
1542
|
private: boolean;
|
|
1542
1543
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
1543
|
-
status: string;
|
|
1544
1544
|
content_attributes: {
|
|
1545
1545
|
in_reply_to?: unknown;
|
|
1546
1546
|
} & {
|
|
@@ -1742,11 +1742,11 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
|
|
|
1742
1742
|
pubsub_token: string;
|
|
1743
1743
|
};
|
|
1744
1744
|
messages: {
|
|
1745
|
+
status: string;
|
|
1745
1746
|
content: string | null;
|
|
1746
1747
|
message_type: number;
|
|
1747
1748
|
private: boolean;
|
|
1748
1749
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
1749
|
-
status: string;
|
|
1750
1750
|
content_attributes: {
|
|
1751
1751
|
in_reply_to?: unknown;
|
|
1752
1752
|
} & {
|
|
@@ -1865,11 +1865,11 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
|
|
|
1865
1865
|
pubsub_token: string;
|
|
1866
1866
|
};
|
|
1867
1867
|
messages: {
|
|
1868
|
+
status: string;
|
|
1868
1869
|
content: string | null;
|
|
1869
1870
|
message_type: number;
|
|
1870
1871
|
private: boolean;
|
|
1871
1872
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
1872
|
-
status: string;
|
|
1873
1873
|
content_attributes: {
|
|
1874
1874
|
in_reply_to?: unknown;
|
|
1875
1875
|
} & {
|
|
@@ -2030,11 +2030,11 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
|
|
|
2030
2030
|
} & {
|
|
2031
2031
|
event: z.ZodLiteral<"message_created">;
|
|
2032
2032
|
}, "strip", z.ZodTypeAny, {
|
|
2033
|
+
status: string;
|
|
2033
2034
|
content: string | null;
|
|
2034
2035
|
message_type: "incoming" | "outgoing";
|
|
2035
2036
|
private: boolean;
|
|
2036
2037
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
2037
|
-
status: string;
|
|
2038
2038
|
content_attributes: {
|
|
2039
2039
|
in_reply_to?: unknown;
|
|
2040
2040
|
} & {
|
|
@@ -2103,11 +2103,11 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
|
|
|
2103
2103
|
pubsub_token: string;
|
|
2104
2104
|
};
|
|
2105
2105
|
messages: {
|
|
2106
|
+
status: string;
|
|
2106
2107
|
content: string | null;
|
|
2107
2108
|
message_type: number;
|
|
2108
2109
|
private: boolean;
|
|
2109
2110
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
2110
|
-
status: string;
|
|
2111
2111
|
content_attributes: {
|
|
2112
2112
|
in_reply_to?: unknown;
|
|
2113
2113
|
} & {
|
|
@@ -2196,11 +2196,11 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
|
|
|
2196
2196
|
};
|
|
2197
2197
|
event: "message_created";
|
|
2198
2198
|
}, {
|
|
2199
|
+
status: string;
|
|
2199
2200
|
content: string | null;
|
|
2200
2201
|
message_type: "incoming" | "outgoing";
|
|
2201
2202
|
private: boolean;
|
|
2202
2203
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
2203
|
-
status: string;
|
|
2204
2204
|
content_attributes: {
|
|
2205
2205
|
in_reply_to?: unknown;
|
|
2206
2206
|
} & {
|
|
@@ -2269,11 +2269,11 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
|
|
|
2269
2269
|
pubsub_token: string;
|
|
2270
2270
|
};
|
|
2271
2271
|
messages: {
|
|
2272
|
+
status: string;
|
|
2272
2273
|
content: string | null;
|
|
2273
2274
|
message_type: number;
|
|
2274
2275
|
private: boolean;
|
|
2275
2276
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
2276
|
-
status: string;
|
|
2277
2277
|
content_attributes: {
|
|
2278
2278
|
in_reply_to?: unknown;
|
|
2279
2279
|
} & {
|
|
@@ -2602,11 +2602,11 @@ export declare const MessageUpdatedEventSchema: z.ZodObject<{
|
|
|
2602
2602
|
customer_stage_explanation?: string | null | undefined;
|
|
2603
2603
|
}>;
|
|
2604
2604
|
}, "strip", z.ZodTypeAny, {
|
|
2605
|
+
status: string;
|
|
2605
2606
|
content: string | null;
|
|
2606
2607
|
message_type: number;
|
|
2607
2608
|
private: boolean;
|
|
2608
2609
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
2609
|
-
status: string;
|
|
2610
2610
|
content_attributes: {
|
|
2611
2611
|
in_reply_to?: unknown;
|
|
2612
2612
|
} & {
|
|
@@ -2652,11 +2652,11 @@ export declare const MessageUpdatedEventSchema: z.ZodObject<{
|
|
|
2652
2652
|
assignee_id: number | null;
|
|
2653
2653
|
};
|
|
2654
2654
|
}, {
|
|
2655
|
+
status: string;
|
|
2655
2656
|
content: string | null;
|
|
2656
2657
|
message_type: number;
|
|
2657
2658
|
private: boolean;
|
|
2658
2659
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
2659
|
-
status: string;
|
|
2660
2660
|
content_attributes: {
|
|
2661
2661
|
in_reply_to?: unknown;
|
|
2662
2662
|
} & {
|
|
@@ -2858,11 +2858,11 @@ export declare const MessageUpdatedEventSchema: z.ZodObject<{
|
|
|
2858
2858
|
pubsub_token: string;
|
|
2859
2859
|
};
|
|
2860
2860
|
messages: {
|
|
2861
|
+
status: string;
|
|
2861
2862
|
content: string | null;
|
|
2862
2863
|
message_type: number;
|
|
2863
2864
|
private: boolean;
|
|
2864
2865
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
2865
|
-
status: string;
|
|
2866
2866
|
content_attributes: {
|
|
2867
2867
|
in_reply_to?: unknown;
|
|
2868
2868
|
} & {
|
|
@@ -2981,11 +2981,11 @@ export declare const MessageUpdatedEventSchema: z.ZodObject<{
|
|
|
2981
2981
|
pubsub_token: string;
|
|
2982
2982
|
};
|
|
2983
2983
|
messages: {
|
|
2984
|
+
status: string;
|
|
2984
2985
|
content: string | null;
|
|
2985
2986
|
message_type: number;
|
|
2986
2987
|
private: boolean;
|
|
2987
2988
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
2988
|
-
status: string;
|
|
2989
2989
|
content_attributes: {
|
|
2990
2990
|
in_reply_to?: unknown;
|
|
2991
2991
|
} & {
|
|
@@ -3146,11 +3146,11 @@ export declare const MessageUpdatedEventSchema: z.ZodObject<{
|
|
|
3146
3146
|
} & {
|
|
3147
3147
|
event: z.ZodLiteral<"message_updated">;
|
|
3148
3148
|
}, "strip", z.ZodTypeAny, {
|
|
3149
|
+
status: string;
|
|
3149
3150
|
content: string | null;
|
|
3150
3151
|
message_type: "incoming" | "outgoing";
|
|
3151
3152
|
private: boolean;
|
|
3152
3153
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
3153
|
-
status: string;
|
|
3154
3154
|
content_attributes: {
|
|
3155
3155
|
in_reply_to?: unknown;
|
|
3156
3156
|
} & {
|
|
@@ -3219,11 +3219,11 @@ export declare const MessageUpdatedEventSchema: z.ZodObject<{
|
|
|
3219
3219
|
pubsub_token: string;
|
|
3220
3220
|
};
|
|
3221
3221
|
messages: {
|
|
3222
|
+
status: string;
|
|
3222
3223
|
content: string | null;
|
|
3223
3224
|
message_type: number;
|
|
3224
3225
|
private: boolean;
|
|
3225
3226
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
3226
|
-
status: string;
|
|
3227
3227
|
content_attributes: {
|
|
3228
3228
|
in_reply_to?: unknown;
|
|
3229
3229
|
} & {
|
|
@@ -3312,11 +3312,11 @@ export declare const MessageUpdatedEventSchema: z.ZodObject<{
|
|
|
3312
3312
|
};
|
|
3313
3313
|
event: "message_updated";
|
|
3314
3314
|
}, {
|
|
3315
|
+
status: string;
|
|
3315
3316
|
content: string | null;
|
|
3316
3317
|
message_type: "incoming" | "outgoing";
|
|
3317
3318
|
private: boolean;
|
|
3318
3319
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
3319
|
-
status: string;
|
|
3320
3320
|
content_attributes: {
|
|
3321
3321
|
in_reply_to?: unknown;
|
|
3322
3322
|
} & {
|
|
@@ -3385,11 +3385,11 @@ export declare const MessageUpdatedEventSchema: z.ZodObject<{
|
|
|
3385
3385
|
pubsub_token: string;
|
|
3386
3386
|
};
|
|
3387
3387
|
messages: {
|
|
3388
|
+
status: string;
|
|
3388
3389
|
content: string | null;
|
|
3389
3390
|
message_type: number;
|
|
3390
3391
|
private: boolean;
|
|
3391
3392
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
3392
|
-
status: string;
|
|
3393
3393
|
content_attributes: {
|
|
3394
3394
|
in_reply_to?: unknown;
|
|
3395
3395
|
} & {
|
|
@@ -3718,11 +3718,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
3718
3718
|
customer_stage_explanation?: string | null | undefined;
|
|
3719
3719
|
}>;
|
|
3720
3720
|
}, "strip", z.ZodTypeAny, {
|
|
3721
|
+
status: string;
|
|
3721
3722
|
content: string | null;
|
|
3722
3723
|
message_type: number;
|
|
3723
3724
|
private: boolean;
|
|
3724
3725
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
3725
|
-
status: string;
|
|
3726
3726
|
content_attributes: {
|
|
3727
3727
|
in_reply_to?: unknown;
|
|
3728
3728
|
} & {
|
|
@@ -3768,11 +3768,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
3768
3768
|
assignee_id: number | null;
|
|
3769
3769
|
};
|
|
3770
3770
|
}, {
|
|
3771
|
+
status: string;
|
|
3771
3772
|
content: string | null;
|
|
3772
3773
|
message_type: number;
|
|
3773
3774
|
private: boolean;
|
|
3774
3775
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
3775
|
-
status: string;
|
|
3776
3776
|
content_attributes: {
|
|
3777
3777
|
in_reply_to?: unknown;
|
|
3778
3778
|
} & {
|
|
@@ -3974,11 +3974,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
3974
3974
|
pubsub_token: string;
|
|
3975
3975
|
};
|
|
3976
3976
|
messages: {
|
|
3977
|
+
status: string;
|
|
3977
3978
|
content: string | null;
|
|
3978
3979
|
message_type: number;
|
|
3979
3980
|
private: boolean;
|
|
3980
3981
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
3981
|
-
status: string;
|
|
3982
3982
|
content_attributes: {
|
|
3983
3983
|
in_reply_to?: unknown;
|
|
3984
3984
|
} & {
|
|
@@ -4097,11 +4097,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
4097
4097
|
pubsub_token: string;
|
|
4098
4098
|
};
|
|
4099
4099
|
messages: {
|
|
4100
|
+
status: string;
|
|
4100
4101
|
content: string | null;
|
|
4101
4102
|
message_type: number;
|
|
4102
4103
|
private: boolean;
|
|
4103
4104
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
4104
|
-
status: string;
|
|
4105
4105
|
content_attributes: {
|
|
4106
4106
|
in_reply_to?: unknown;
|
|
4107
4107
|
} & {
|
|
@@ -4262,11 +4262,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
4262
4262
|
} & {
|
|
4263
4263
|
event: z.ZodLiteral<"message_created">;
|
|
4264
4264
|
}, "strip", z.ZodTypeAny, {
|
|
4265
|
+
status: string;
|
|
4265
4266
|
content: string | null;
|
|
4266
4267
|
message_type: "incoming" | "outgoing";
|
|
4267
4268
|
private: boolean;
|
|
4268
4269
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
4269
|
-
status: string;
|
|
4270
4270
|
content_attributes: {
|
|
4271
4271
|
in_reply_to?: unknown;
|
|
4272
4272
|
} & {
|
|
@@ -4335,11 +4335,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
4335
4335
|
pubsub_token: string;
|
|
4336
4336
|
};
|
|
4337
4337
|
messages: {
|
|
4338
|
+
status: string;
|
|
4338
4339
|
content: string | null;
|
|
4339
4340
|
message_type: number;
|
|
4340
4341
|
private: boolean;
|
|
4341
4342
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
4342
|
-
status: string;
|
|
4343
4343
|
content_attributes: {
|
|
4344
4344
|
in_reply_to?: unknown;
|
|
4345
4345
|
} & {
|
|
@@ -4428,11 +4428,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
4428
4428
|
};
|
|
4429
4429
|
event: "message_created";
|
|
4430
4430
|
}, {
|
|
4431
|
+
status: string;
|
|
4431
4432
|
content: string | null;
|
|
4432
4433
|
message_type: "incoming" | "outgoing";
|
|
4433
4434
|
private: boolean;
|
|
4434
4435
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
4435
|
-
status: string;
|
|
4436
4436
|
content_attributes: {
|
|
4437
4437
|
in_reply_to?: unknown;
|
|
4438
4438
|
} & {
|
|
@@ -4501,11 +4501,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
4501
4501
|
pubsub_token: string;
|
|
4502
4502
|
};
|
|
4503
4503
|
messages: {
|
|
4504
|
+
status: string;
|
|
4504
4505
|
content: string | null;
|
|
4505
4506
|
message_type: number;
|
|
4506
4507
|
private: boolean;
|
|
4507
4508
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
4508
|
-
status: string;
|
|
4509
4509
|
content_attributes: {
|
|
4510
4510
|
in_reply_to?: unknown;
|
|
4511
4511
|
} & {
|
|
@@ -4833,11 +4833,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
4833
4833
|
customer_stage_explanation?: string | null | undefined;
|
|
4834
4834
|
}>;
|
|
4835
4835
|
}, "strip", z.ZodTypeAny, {
|
|
4836
|
+
status: string;
|
|
4836
4837
|
content: string | null;
|
|
4837
4838
|
message_type: number;
|
|
4838
4839
|
private: boolean;
|
|
4839
4840
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
4840
|
-
status: string;
|
|
4841
4841
|
content_attributes: {
|
|
4842
4842
|
in_reply_to?: unknown;
|
|
4843
4843
|
} & {
|
|
@@ -4883,11 +4883,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
4883
4883
|
assignee_id: number | null;
|
|
4884
4884
|
};
|
|
4885
4885
|
}, {
|
|
4886
|
+
status: string;
|
|
4886
4887
|
content: string | null;
|
|
4887
4888
|
message_type: number;
|
|
4888
4889
|
private: boolean;
|
|
4889
4890
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
4890
|
-
status: string;
|
|
4891
4891
|
content_attributes: {
|
|
4892
4892
|
in_reply_to?: unknown;
|
|
4893
4893
|
} & {
|
|
@@ -5089,11 +5089,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
5089
5089
|
pubsub_token: string;
|
|
5090
5090
|
};
|
|
5091
5091
|
messages: {
|
|
5092
|
+
status: string;
|
|
5092
5093
|
content: string | null;
|
|
5093
5094
|
message_type: number;
|
|
5094
5095
|
private: boolean;
|
|
5095
5096
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
5096
|
-
status: string;
|
|
5097
5097
|
content_attributes: {
|
|
5098
5098
|
in_reply_to?: unknown;
|
|
5099
5099
|
} & {
|
|
@@ -5212,11 +5212,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
5212
5212
|
pubsub_token: string;
|
|
5213
5213
|
};
|
|
5214
5214
|
messages: {
|
|
5215
|
+
status: string;
|
|
5215
5216
|
content: string | null;
|
|
5216
5217
|
message_type: number;
|
|
5217
5218
|
private: boolean;
|
|
5218
5219
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
5219
|
-
status: string;
|
|
5220
5220
|
content_attributes: {
|
|
5221
5221
|
in_reply_to?: unknown;
|
|
5222
5222
|
} & {
|
|
@@ -5377,11 +5377,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
5377
5377
|
} & {
|
|
5378
5378
|
event: z.ZodLiteral<"message_updated">;
|
|
5379
5379
|
}, "strip", z.ZodTypeAny, {
|
|
5380
|
+
status: string;
|
|
5380
5381
|
content: string | null;
|
|
5381
5382
|
message_type: "incoming" | "outgoing";
|
|
5382
5383
|
private: boolean;
|
|
5383
5384
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
5384
|
-
status: string;
|
|
5385
5385
|
content_attributes: {
|
|
5386
5386
|
in_reply_to?: unknown;
|
|
5387
5387
|
} & {
|
|
@@ -5450,11 +5450,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
5450
5450
|
pubsub_token: string;
|
|
5451
5451
|
};
|
|
5452
5452
|
messages: {
|
|
5453
|
+
status: string;
|
|
5453
5454
|
content: string | null;
|
|
5454
5455
|
message_type: number;
|
|
5455
5456
|
private: boolean;
|
|
5456
5457
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
5457
|
-
status: string;
|
|
5458
5458
|
content_attributes: {
|
|
5459
5459
|
in_reply_to?: unknown;
|
|
5460
5460
|
} & {
|
|
@@ -5543,11 +5543,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
5543
5543
|
};
|
|
5544
5544
|
event: "message_updated";
|
|
5545
5545
|
}, {
|
|
5546
|
+
status: string;
|
|
5546
5547
|
content: string | null;
|
|
5547
5548
|
message_type: "incoming" | "outgoing";
|
|
5548
5549
|
private: boolean;
|
|
5549
5550
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
5550
|
-
status: string;
|
|
5551
5551
|
content_attributes: {
|
|
5552
5552
|
in_reply_to?: unknown;
|
|
5553
5553
|
} & {
|
|
@@ -5616,11 +5616,11 @@ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.Zod
|
|
|
5616
5616
|
pubsub_token: string;
|
|
5617
5617
|
};
|
|
5618
5618
|
messages: {
|
|
5619
|
+
status: string;
|
|
5619
5620
|
content: string | null;
|
|
5620
5621
|
message_type: number;
|
|
5621
5622
|
private: boolean;
|
|
5622
5623
|
content_type: "text" | "input_select" | "cards" | "form" | "article" | "incoming_email";
|
|
5623
|
-
status: string;
|
|
5624
5624
|
content_attributes: {
|
|
5625
5625
|
in_reply_to?: unknown;
|
|
5626
5626
|
} & {
|
package/package.json
CHANGED