@voltade/envoy-sdk 1.0.1 → 1.0.2
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/resources/index.d.ts +3 -2
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +3 -2
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/webhooks/index.d.ts +9 -0
- package/dist/resources/webhooks/index.d.ts.map +1 -0
- package/dist/resources/webhooks/index.js +14 -0
- package/dist/resources/webhooks/index.js.map +1 -0
- package/dist/resources/webhooks/types.d.ts +2376 -0
- package/dist/resources/webhooks/types.d.ts.map +1 -0
- package/dist/resources/webhooks/types.js +151 -0
- package/dist/resources/webhooks/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Resources module
|
|
3
3
|
* Exports all resource classes and their types
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
5
|
+
export * from "./conversations/index.js";
|
|
6
|
+
export * from "./inboxes/index.js";
|
|
7
|
+
export * from "./webhooks/index.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../resources/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../resources/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
|
package/dist/resources/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Resources module
|
|
3
3
|
* Exports all resource classes and their types
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
5
|
+
export * from "./conversations/index.js";
|
|
6
|
+
export * from "./inboxes/index.js";
|
|
7
|
+
export * from "./webhooks/index.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../resources/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../resources/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type MessageCreatedEvent } from "./types.js";
|
|
2
|
+
export * from "./types.js";
|
|
3
|
+
export declare const webhookEvent: {
|
|
4
|
+
/** Throws ZodError if invalid */
|
|
5
|
+
parse: (body: unknown) => MessageCreatedEvent;
|
|
6
|
+
/** Returns null if invalid */
|
|
7
|
+
safeParse: (body: unknown) => MessageCreatedEvent | null;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;AAE3B,eAAO,MAAM,YAAY;IACvB,iCAAiC;kBACnB,OAAO,KAAG,mBAAmB;IAG3C,8BAA8B;sBACZ,OAAO,KAAG,mBAAmB,GAAG,IAAI;CAIvD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MessageCreatedEventSchema, } from "./types.js";
|
|
2
|
+
export * from "./types.js";
|
|
3
|
+
export const webhookEvent = {
|
|
4
|
+
/** Throws ZodError if invalid */
|
|
5
|
+
parse: (body) => {
|
|
6
|
+
return MessageCreatedEventSchema.parse(body);
|
|
7
|
+
},
|
|
8
|
+
/** Returns null if invalid */
|
|
9
|
+
safeParse: (body) => {
|
|
10
|
+
const result = MessageCreatedEventSchema.safeParse(body);
|
|
11
|
+
return result.success ? result.data : null;
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../resources/webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAE1B,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;AAE3B,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,iCAAiC;IACjC,KAAK,EAAE,CAAC,IAAa,EAAuB,EAAE;QAC5C,OAAO,yBAAyB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,8BAA8B;IAC9B,SAAS,EAAE,CAAC,IAAa,EAA8B,EAAE;QACvD,MAAM,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,CAAC;CACF,CAAC"}
|