agentmail 0.0.21 → 0.0.22

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.
Files changed (168) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +5 -0
  3. package/api/resources/inboxes/client/Client.js +3 -3
  4. package/api/resources/index.d.ts +3 -0
  5. package/api/resources/index.js +4 -1
  6. package/api/resources/messages/client/Client.js +5 -5
  7. package/api/resources/threads/client/Client.js +2 -2
  8. package/api/resources/webhooks/client/Client.d.ts +71 -0
  9. package/api/resources/webhooks/client/Client.js +316 -0
  10. package/api/resources/webhooks/client/index.d.ts +1 -0
  11. package/api/resources/webhooks/client/index.js +17 -0
  12. package/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +12 -0
  13. package/api/resources/webhooks/client/requests/ListWebhooksRequest.js +5 -0
  14. package/api/resources/webhooks/client/requests/index.d.ts +1 -0
  15. package/api/resources/webhooks/client/requests/index.js +2 -0
  16. package/api/resources/webhooks/index.d.ts +2 -0
  17. package/api/resources/webhooks/index.js +18 -0
  18. package/api/resources/webhooks/types/CreateWebhookRequest.d.ts +9 -0
  19. package/api/resources/webhooks/types/CreateWebhookRequest.js +5 -0
  20. package/api/resources/webhooks/types/EventId.d.ts +7 -0
  21. package/api/resources/webhooks/types/EventId.js +5 -0
  22. package/api/resources/webhooks/types/EventType.d.ts +7 -0
  23. package/api/resources/webhooks/types/EventType.js +9 -0
  24. package/api/resources/webhooks/types/Events.d.ts +8 -0
  25. package/api/resources/webhooks/types/Events.js +5 -0
  26. package/api/resources/webhooks/types/Inboxes.d.ts +7 -0
  27. package/api/resources/webhooks/types/Inboxes.js +5 -0
  28. package/api/resources/webhooks/types/ListWebhooksResponse.d.ts +11 -0
  29. package/api/resources/webhooks/types/ListWebhooksResponse.js +5 -0
  30. package/api/resources/webhooks/types/MessageReceivedPayload.d.ts +7 -0
  31. package/api/resources/webhooks/types/MessageReceivedPayload.js +5 -0
  32. package/api/resources/webhooks/types/Payload.d.ts +8 -0
  33. package/api/resources/webhooks/types/Payload.js +5 -0
  34. package/api/resources/webhooks/types/SvixId.d.ts +7 -0
  35. package/api/resources/webhooks/types/SvixId.js +5 -0
  36. package/api/resources/webhooks/types/SvixSignature.d.ts +7 -0
  37. package/api/resources/webhooks/types/SvixSignature.js +5 -0
  38. package/api/resources/webhooks/types/SvixTimestamp.d.ts +7 -0
  39. package/api/resources/webhooks/types/SvixTimestamp.js +5 -0
  40. package/api/resources/webhooks/types/Url.d.ts +7 -0
  41. package/api/resources/webhooks/types/Url.js +5 -0
  42. package/api/resources/webhooks/types/Webhook.d.ts +14 -0
  43. package/api/resources/webhooks/types/Webhook.js +5 -0
  44. package/api/resources/webhooks/types/WebhookId.d.ts +7 -0
  45. package/api/resources/webhooks/types/WebhookId.js +5 -0
  46. package/api/resources/webhooks/types/index.d.ts +14 -0
  47. package/api/resources/webhooks/types/index.js +30 -0
  48. package/dist/Client.d.ts +3 -0
  49. package/dist/Client.js +5 -0
  50. package/dist/api/resources/inboxes/client/Client.js +3 -3
  51. package/dist/api/resources/index.d.ts +3 -0
  52. package/dist/api/resources/index.js +4 -1
  53. package/dist/api/resources/messages/client/Client.js +5 -5
  54. package/dist/api/resources/threads/client/Client.js +2 -2
  55. package/dist/api/resources/webhooks/client/Client.d.ts +71 -0
  56. package/dist/api/resources/webhooks/client/Client.js +316 -0
  57. package/dist/api/resources/webhooks/client/index.d.ts +1 -0
  58. package/dist/api/resources/webhooks/client/index.js +17 -0
  59. package/dist/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +12 -0
  60. package/dist/api/resources/webhooks/client/requests/ListWebhooksRequest.js +5 -0
  61. package/dist/api/resources/webhooks/client/requests/index.d.ts +1 -0
  62. package/dist/api/resources/webhooks/client/requests/index.js +2 -0
  63. package/dist/api/resources/webhooks/index.d.ts +2 -0
  64. package/dist/api/resources/webhooks/index.js +18 -0
  65. package/dist/api/resources/webhooks/types/CreateWebhookRequest.d.ts +9 -0
  66. package/dist/api/resources/webhooks/types/CreateWebhookRequest.js +5 -0
  67. package/dist/api/resources/webhooks/types/EventId.d.ts +7 -0
  68. package/dist/api/resources/webhooks/types/EventId.js +5 -0
  69. package/dist/api/resources/webhooks/types/EventType.d.ts +7 -0
  70. package/dist/api/resources/webhooks/types/EventType.js +9 -0
  71. package/dist/api/resources/webhooks/types/Events.d.ts +8 -0
  72. package/dist/api/resources/webhooks/types/Events.js +5 -0
  73. package/dist/api/resources/webhooks/types/Inboxes.d.ts +7 -0
  74. package/dist/api/resources/webhooks/types/Inboxes.js +5 -0
  75. package/dist/api/resources/webhooks/types/ListWebhooksResponse.d.ts +11 -0
  76. package/dist/api/resources/webhooks/types/ListWebhooksResponse.js +5 -0
  77. package/dist/api/resources/webhooks/types/MessageReceivedPayload.d.ts +7 -0
  78. package/dist/api/resources/webhooks/types/MessageReceivedPayload.js +5 -0
  79. package/dist/api/resources/webhooks/types/Payload.d.ts +8 -0
  80. package/dist/api/resources/webhooks/types/Payload.js +5 -0
  81. package/dist/api/resources/webhooks/types/SvixId.d.ts +7 -0
  82. package/dist/api/resources/webhooks/types/SvixId.js +5 -0
  83. package/dist/api/resources/webhooks/types/SvixSignature.d.ts +7 -0
  84. package/dist/api/resources/webhooks/types/SvixSignature.js +5 -0
  85. package/dist/api/resources/webhooks/types/SvixTimestamp.d.ts +7 -0
  86. package/dist/api/resources/webhooks/types/SvixTimestamp.js +5 -0
  87. package/dist/api/resources/webhooks/types/Url.d.ts +7 -0
  88. package/dist/api/resources/webhooks/types/Url.js +5 -0
  89. package/dist/api/resources/webhooks/types/Webhook.d.ts +14 -0
  90. package/dist/api/resources/webhooks/types/Webhook.js +5 -0
  91. package/dist/api/resources/webhooks/types/WebhookId.d.ts +7 -0
  92. package/dist/api/resources/webhooks/types/WebhookId.js +5 -0
  93. package/dist/api/resources/webhooks/types/index.d.ts +14 -0
  94. package/dist/api/resources/webhooks/types/index.js +30 -0
  95. package/dist/serialization/resources/index.d.ts +2 -0
  96. package/dist/serialization/resources/index.js +3 -1
  97. package/dist/serialization/resources/webhooks/index.d.ts +1 -0
  98. package/dist/serialization/resources/webhooks/index.js +17 -0
  99. package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +17 -0
  100. package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.js +48 -0
  101. package/dist/serialization/resources/webhooks/types/EventId.d.ts +10 -0
  102. package/dist/serialization/resources/webhooks/types/EventId.js +41 -0
  103. package/dist/serialization/resources/webhooks/types/EventType.d.ts +10 -0
  104. package/dist/serialization/resources/webhooks/types/EventType.js +41 -0
  105. package/dist/serialization/resources/webhooks/types/Events.d.ts +11 -0
  106. package/dist/serialization/resources/webhooks/types/Events.js +42 -0
  107. package/dist/serialization/resources/webhooks/types/Inboxes.d.ts +10 -0
  108. package/dist/serialization/resources/webhooks/types/Inboxes.js +41 -0
  109. package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.d.ts +19 -0
  110. package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.js +50 -0
  111. package/dist/serialization/resources/webhooks/types/MessageReceivedPayload.d.ts +14 -0
  112. package/dist/serialization/resources/webhooks/types/MessageReceivedPayload.js +47 -0
  113. package/dist/serialization/resources/webhooks/types/Payload.d.ts +15 -0
  114. package/dist/serialization/resources/webhooks/types/Payload.js +46 -0
  115. package/dist/serialization/resources/webhooks/types/SvixId.d.ts +10 -0
  116. package/dist/serialization/resources/webhooks/types/SvixId.js +41 -0
  117. package/dist/serialization/resources/webhooks/types/SvixSignature.d.ts +10 -0
  118. package/dist/serialization/resources/webhooks/types/SvixSignature.js +41 -0
  119. package/dist/serialization/resources/webhooks/types/SvixTimestamp.d.ts +10 -0
  120. package/dist/serialization/resources/webhooks/types/SvixTimestamp.js +41 -0
  121. package/dist/serialization/resources/webhooks/types/Url.d.ts +10 -0
  122. package/dist/serialization/resources/webhooks/types/Url.js +41 -0
  123. package/dist/serialization/resources/webhooks/types/Webhook.d.ts +21 -0
  124. package/dist/serialization/resources/webhooks/types/Webhook.js +52 -0
  125. package/dist/serialization/resources/webhooks/types/WebhookId.d.ts +10 -0
  126. package/dist/serialization/resources/webhooks/types/WebhookId.js +41 -0
  127. package/dist/serialization/resources/webhooks/types/index.d.ts +14 -0
  128. package/dist/serialization/resources/webhooks/types/index.js +30 -0
  129. package/dist/version.d.ts +1 -1
  130. package/dist/version.js +1 -1
  131. package/package.json +1 -1
  132. package/reference.md +198 -0
  133. package/serialization/resources/index.d.ts +2 -0
  134. package/serialization/resources/index.js +3 -1
  135. package/serialization/resources/webhooks/index.d.ts +1 -0
  136. package/serialization/resources/webhooks/index.js +17 -0
  137. package/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +17 -0
  138. package/serialization/resources/webhooks/types/CreateWebhookRequest.js +48 -0
  139. package/serialization/resources/webhooks/types/EventId.d.ts +10 -0
  140. package/serialization/resources/webhooks/types/EventId.js +41 -0
  141. package/serialization/resources/webhooks/types/EventType.d.ts +10 -0
  142. package/serialization/resources/webhooks/types/EventType.js +41 -0
  143. package/serialization/resources/webhooks/types/Events.d.ts +11 -0
  144. package/serialization/resources/webhooks/types/Events.js +42 -0
  145. package/serialization/resources/webhooks/types/Inboxes.d.ts +10 -0
  146. package/serialization/resources/webhooks/types/Inboxes.js +41 -0
  147. package/serialization/resources/webhooks/types/ListWebhooksResponse.d.ts +19 -0
  148. package/serialization/resources/webhooks/types/ListWebhooksResponse.js +50 -0
  149. package/serialization/resources/webhooks/types/MessageReceivedPayload.d.ts +14 -0
  150. package/serialization/resources/webhooks/types/MessageReceivedPayload.js +47 -0
  151. package/serialization/resources/webhooks/types/Payload.d.ts +15 -0
  152. package/serialization/resources/webhooks/types/Payload.js +46 -0
  153. package/serialization/resources/webhooks/types/SvixId.d.ts +10 -0
  154. package/serialization/resources/webhooks/types/SvixId.js +41 -0
  155. package/serialization/resources/webhooks/types/SvixSignature.d.ts +10 -0
  156. package/serialization/resources/webhooks/types/SvixSignature.js +41 -0
  157. package/serialization/resources/webhooks/types/SvixTimestamp.d.ts +10 -0
  158. package/serialization/resources/webhooks/types/SvixTimestamp.js +41 -0
  159. package/serialization/resources/webhooks/types/Url.d.ts +10 -0
  160. package/serialization/resources/webhooks/types/Url.js +41 -0
  161. package/serialization/resources/webhooks/types/Webhook.d.ts +21 -0
  162. package/serialization/resources/webhooks/types/Webhook.js +52 -0
  163. package/serialization/resources/webhooks/types/WebhookId.d.ts +10 -0
  164. package/serialization/resources/webhooks/types/WebhookId.js +41 -0
  165. package/serialization/resources/webhooks/types/index.d.ts +14 -0
  166. package/serialization/resources/webhooks/types/index.js +30 -0
  167. package/version.d.ts +1 -1
  168. package/version.js +1 -1
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.EventId = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.EventId = core.serialization.string();
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const EventType: core.serialization.Schema<serializers.EventType.Raw, AgentMail.EventType>;
8
+ export declare namespace EventType {
9
+ type Raw = "message.received";
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.EventType = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.EventType = core.serialization.enum_(["message.received"]);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { EventType } from "./EventType";
8
+ export declare const Events: core.serialization.Schema<serializers.Events.Raw, AgentMail.Events>;
9
+ export declare namespace Events {
10
+ type Raw = EventType.Raw[];
11
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Events = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ const EventType_1 = require("./EventType");
42
+ exports.Events = core.serialization.list(EventType_1.EventType);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const Inboxes: core.serialization.Schema<serializers.Inboxes.Raw, AgentMail.Inboxes>;
8
+ export declare namespace Inboxes {
9
+ type Raw = string[];
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Inboxes = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.Inboxes = core.serialization.list(core.serialization.string());
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { Webhook } from "./Webhook";
8
+ import { Count } from "../../../types/Count";
9
+ import { Limit } from "../../../types/Limit";
10
+ import { LastKey } from "../../../types/LastKey";
11
+ export declare const ListWebhooksResponse: core.serialization.ObjectSchema<serializers.ListWebhooksResponse.Raw, AgentMail.ListWebhooksResponse>;
12
+ export declare namespace ListWebhooksResponse {
13
+ interface Raw {
14
+ webhooks: Webhook.Raw[];
15
+ count: Count.Raw;
16
+ limit?: Limit.Raw | null;
17
+ last_key?: LastKey.Raw | null;
18
+ }
19
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.ListWebhooksResponse = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ const Webhook_1 = require("./Webhook");
42
+ const Count_1 = require("../../../types/Count");
43
+ const Limit_1 = require("../../../types/Limit");
44
+ const LastKey_1 = require("../../../types/LastKey");
45
+ exports.ListWebhooksResponse = core.serialization.object({
46
+ webhooks: core.serialization.list(Webhook_1.Webhook),
47
+ count: Count_1.Count,
48
+ limit: Limit_1.Limit.optional(),
49
+ lastKey: core.serialization.property("last_key", LastKey_1.LastKey.optional()),
50
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { Message } from "../../messages/types/Message";
8
+ import { Payload } from "./Payload";
9
+ export declare const MessageReceivedPayload: core.serialization.ObjectSchema<serializers.MessageReceivedPayload.Raw, AgentMail.MessageReceivedPayload>;
10
+ export declare namespace MessageReceivedPayload {
11
+ interface Raw extends Payload.Raw {
12
+ message: Message.Raw;
13
+ }
14
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.MessageReceivedPayload = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ const Message_1 = require("../../messages/types/Message");
42
+ const Payload_1 = require("./Payload");
43
+ exports.MessageReceivedPayload = core.serialization
44
+ .object({
45
+ message: Message_1.Message,
46
+ })
47
+ .extend(Payload_1.Payload);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { EventType } from "./EventType";
8
+ import { EventId } from "./EventId";
9
+ export declare const Payload: core.serialization.ObjectSchema<serializers.Payload.Raw, AgentMail.Payload>;
10
+ export declare namespace Payload {
11
+ interface Raw {
12
+ event_type: EventType.Raw;
13
+ event_id: EventId.Raw;
14
+ }
15
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Payload = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ const EventType_1 = require("./EventType");
42
+ const EventId_1 = require("./EventId");
43
+ exports.Payload = core.serialization.object({
44
+ eventType: core.serialization.property("event_type", EventType_1.EventType),
45
+ eventId: core.serialization.property("event_id", EventId_1.EventId),
46
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const SvixId: core.serialization.Schema<serializers.SvixId.Raw, AgentMail.SvixId>;
8
+ export declare namespace SvixId {
9
+ type Raw = string;
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.SvixId = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.SvixId = core.serialization.string();
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const SvixSignature: core.serialization.Schema<serializers.SvixSignature.Raw, AgentMail.SvixSignature>;
8
+ export declare namespace SvixSignature {
9
+ type Raw = string;
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.SvixSignature = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.SvixSignature = core.serialization.string();
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const SvixTimestamp: core.serialization.Schema<serializers.SvixTimestamp.Raw, AgentMail.SvixTimestamp>;
8
+ export declare namespace SvixTimestamp {
9
+ type Raw = string;
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.SvixTimestamp = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.SvixTimestamp = core.serialization.date();
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const Url: core.serialization.Schema<serializers.Url.Raw, AgentMail.Url>;
8
+ export declare namespace Url {
9
+ type Raw = string;
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Url = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.Url = core.serialization.string();
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as AgentMail from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { WebhookId } from "./WebhookId";
8
+ import { Url } from "./Url";
9
+ import { Events } from "./Events";
10
+ import { Inboxes } from "./Inboxes";
11
+ export declare const Webhook: core.serialization.ObjectSchema<serializers.Webhook.Raw, AgentMail.Webhook>;
12
+ export declare namespace Webhook {
13
+ interface Raw {
14
+ webhook_id: WebhookId.Raw;
15
+ url: Url.Raw;
16
+ events?: Events.Raw | null;
17
+ inboxes?: Inboxes.Raw | null;
18
+ secret: string;
19
+ created_at: string;
20
+ }
21
+ }