@voltade/envoy-sdk 1.0.4 → 1.0.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/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/resources/webhooks/index.d.ts +3 -3
- package/dist/resources/webhooks/index.d.ts.map +1 -1
- package/dist/resources/webhooks/index.js +3 -3
- package/dist/resources/webhooks/index.js.map +1 -1
- package/dist/resources/webhooks/types.d.ts +3350 -0
- package/dist/resources/webhooks/types.d.ts.map +1 -1
- package/dist/resources/webhooks/types.js +14 -2
- package/dist/resources/webhooks/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
* const result = await client.conversations.escalateToHuman(123);
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
export { EnvoyClient, type EnvoyClientConfig } from
|
|
26
|
-
export type { Agent, Article, Assignee, Contact, ContactInbox, Conversation, ConversationMeta, ConversationStatus, ContentType, CreateMessageParams, EscalationResponse, EscalationType, Message, MessageType, MessagesResponse, MessagesResponseMeta, Priority, SearchParams, SearchResponse, Team, } from
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
25
|
+
export { EnvoyClient, type EnvoyClientConfig } from "./client.js";
|
|
26
|
+
export type { Agent, Article, Assignee, Contact, ContactInbox, Conversation, ConversationMeta, ConversationStatus, ContentType, CreateMessageParams, EscalationResponse, EscalationType, Message, MessageType, MessagesResponse, MessagesResponseMeta, Priority, SearchParams, SearchResponse, Team, } from "./resources/index.js";
|
|
27
|
+
export { webhookEvent } from "./resources/webhooks/index.js";
|
|
28
|
+
export { Conversations, Inboxes } from "./resources/index.js";
|
|
29
|
+
export { AgentSchema, ArticleSchema, AssigneeSchema, ContactInboxSchema, ContactSchema, ConversationMetaSchema, ConversationSchema, ConversationStatusSchema, ContentTypeSchema, CreateMessageParamsSchema, EscalationResponseSchema, EscalationTypeSchema, MessageSchema, MessagesResponseMetaSchema, MessagesResponseSchema, MessageTypeSchema, PrioritySchema, SearchParamsSchema, SearchResponseSchema, TeamSchema, } from "./resources/index.js";
|
|
30
|
+
export { HttpClient } from "./http-client.js";
|
|
31
|
+
export { AuthenticationError, BadRequestError, EnvoyError, NetworkError, NotFoundError, RateLimitError, ServerError, ValidationError, } from "./errors.js";
|
|
31
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGlE,YAAY,EACV,KAAK,EACL,OAAO,EACP,QAAQ,EACR,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,YAAY,EACZ,cAAc,EACd,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG9D,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,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,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GACX,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,EACX,eAAe,GAChB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGlE,YAAY,EACV,KAAK,EACL,OAAO,EACP,QAAQ,EACR,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,YAAY,EACZ,cAAc,EACd,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG9D,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,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,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GACX,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,EACX,eAAe,GAChB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
// Main client export
|
|
26
|
-
export { EnvoyClient } from
|
|
27
|
-
export {
|
|
26
|
+
export { EnvoyClient } from "./client.js";
|
|
27
|
+
export { webhookEvent } from "./resources/webhooks/index.js";
|
|
28
|
+
export { Conversations, Inboxes } from "./resources/index.js";
|
|
28
29
|
// Zod schema exports
|
|
29
|
-
export { AgentSchema, ArticleSchema, AssigneeSchema, ContactInboxSchema, ContactSchema, ConversationMetaSchema, ConversationSchema, ConversationStatusSchema, ContentTypeSchema, CreateMessageParamsSchema, EscalationResponseSchema, EscalationTypeSchema, MessageSchema, MessagesResponseMetaSchema, MessagesResponseSchema, MessageTypeSchema, PrioritySchema, SearchParamsSchema, SearchResponseSchema, TeamSchema, } from
|
|
30
|
+
export { AgentSchema, ArticleSchema, AssigneeSchema, ContactInboxSchema, ContactSchema, ConversationMetaSchema, ConversationSchema, ConversationStatusSchema, ContentTypeSchema, CreateMessageParamsSchema, EscalationResponseSchema, EscalationTypeSchema, MessageSchema, MessagesResponseMetaSchema, MessagesResponseSchema, MessageTypeSchema, PrioritySchema, SearchParamsSchema, SearchResponseSchema, TeamSchema, } from "./resources/index.js";
|
|
30
31
|
// Utility exports
|
|
31
|
-
export { HttpClient } from
|
|
32
|
+
export { HttpClient } from "./http-client.js";
|
|
32
33
|
// Error exports
|
|
33
|
-
export { AuthenticationError, BadRequestError, EnvoyError, NetworkError, NotFoundError, RateLimitError, ServerError, ValidationError, } from
|
|
34
|
+
export { AuthenticationError, BadRequestError, EnvoyError, NetworkError, NotFoundError, RateLimitError, ServerError, ValidationError, } from "./errors.js";
|
|
34
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,qBAAqB;AACrB,OAAO,EAAE,WAAW,EAA0B,MAAM,aAAa,CAAC;AAyBlE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE9D,qBAAqB;AACrB,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,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,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,kBAAkB;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,gBAAgB;AAChB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,EACX,eAAe,GAChB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,qBAAqB;AACrB,OAAO,EAAE,WAAW,EAA0B,MAAM,aAAa,CAAC;AAyBlE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE9D,qBAAqB;AACrB,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,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,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,kBAAkB;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,gBAAgB;AAChB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,EACX,eAAe,GAChB,MAAM,aAAa,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type WebhookEvent } from "./types.js";
|
|
2
2
|
export * from "./types.js";
|
|
3
3
|
export declare const webhookEvent: {
|
|
4
4
|
/** Throws ZodError if invalid */
|
|
5
|
-
parse: (body: unknown) =>
|
|
5
|
+
parse: (body: unknown) => WebhookEvent;
|
|
6
6
|
/** Returns null if invalid */
|
|
7
|
-
safeParse: (body: unknown) =>
|
|
7
|
+
safeParse: (body: unknown) => WebhookEvent | null;
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAEnE,cAAc,YAAY,CAAC;AAE3B,eAAO,MAAM,YAAY;IACvB,iCAAiC;kBACnB,OAAO,KAAG,YAAY;IAGpC,8BAA8B;sBACZ,OAAO,KAAG,YAAY,GAAG,IAAI;CAIhD,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WebhookEventSchema } from "./types.js";
|
|
2
2
|
export * from "./types.js";
|
|
3
3
|
export const webhookEvent = {
|
|
4
4
|
/** Throws ZodError if invalid */
|
|
5
5
|
parse: (body) => {
|
|
6
|
-
return
|
|
6
|
+
return WebhookEventSchema.parse(body);
|
|
7
7
|
},
|
|
8
8
|
/** Returns null if invalid */
|
|
9
9
|
safeParse: (body) => {
|
|
10
|
-
const result =
|
|
10
|
+
const result = WebhookEventSchema.safeParse(body);
|
|
11
11
|
return result.success ? result.data : null;
|
|
12
12
|
},
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../resources/webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../resources/webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAqB,MAAM,YAAY,CAAC;AAEnE,cAAc,YAAY,CAAC;AAE3B,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,iCAAiC;IACjC,KAAK,EAAE,CAAC,IAAa,EAAgB,EAAE;QACrC,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IACD,8BAA8B;IAC9B,SAAS,EAAE,CAAC,IAAa,EAAuB,EAAE;QAChD,MAAM,MAAM,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAClD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,CAAC;CACF,CAAC"}
|