@agentuity/server 1.0.22 → 1.0.24

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 (86) hide show
  1. package/dist/api/index.d.ts +2 -0
  2. package/dist/api/index.d.ts.map +1 -1
  3. package/dist/api/index.js +2 -0
  4. package/dist/api/index.js.map +1 -1
  5. package/dist/api/project/deploy.d.ts +8 -0
  6. package/dist/api/project/deploy.d.ts.map +1 -1
  7. package/dist/api/project/deploy.js +14 -13
  8. package/dist/api/project/deploy.js.map +1 -1
  9. package/dist/api/sandbox/disk-checkpoint.d.ts +103 -0
  10. package/dist/api/sandbox/disk-checkpoint.d.ts.map +1 -0
  11. package/dist/api/sandbox/disk-checkpoint.js +104 -0
  12. package/dist/api/sandbox/disk-checkpoint.js.map +1 -0
  13. package/dist/api/sandbox/execute.d.ts +2 -2
  14. package/dist/api/sandbox/execution.d.ts +4 -4
  15. package/dist/api/sandbox/index.d.ts +2 -0
  16. package/dist/api/sandbox/index.d.ts.map +1 -1
  17. package/dist/api/sandbox/index.js +1 -0
  18. package/dist/api/sandbox/index.js.map +1 -1
  19. package/dist/api/sandbox/snapshot-build.d.ts +2 -0
  20. package/dist/api/sandbox/snapshot-build.d.ts.map +1 -1
  21. package/dist/api/sandbox/snapshot-build.js +4 -0
  22. package/dist/api/sandbox/snapshot-build.js.map +1 -1
  23. package/dist/api/services/index.d.ts +2 -0
  24. package/dist/api/services/index.d.ts.map +1 -0
  25. package/dist/api/services/index.js +2 -0
  26. package/dist/api/services/index.js.map +1 -0
  27. package/dist/api/services/stats.d.ts +257 -0
  28. package/dist/api/services/stats.d.ts.map +1 -0
  29. package/dist/api/services/stats.js +142 -0
  30. package/dist/api/services/stats.js.map +1 -0
  31. package/dist/api/webhook/deliveries.d.ts +94 -0
  32. package/dist/api/webhook/deliveries.d.ts.map +1 -0
  33. package/dist/api/webhook/deliveries.js +79 -0
  34. package/dist/api/webhook/deliveries.js.map +1 -0
  35. package/dist/api/webhook/destinations.d.ts +136 -0
  36. package/dist/api/webhook/destinations.d.ts.map +1 -0
  37. package/dist/api/webhook/destinations.js +137 -0
  38. package/dist/api/webhook/destinations.js.map +1 -0
  39. package/dist/api/webhook/index.d.ts +41 -0
  40. package/dist/api/webhook/index.d.ts.map +1 -0
  41. package/dist/api/webhook/index.js +59 -0
  42. package/dist/api/webhook/index.js.map +1 -0
  43. package/dist/api/webhook/receipts.d.ts +77 -0
  44. package/dist/api/webhook/receipts.d.ts.map +1 -0
  45. package/dist/api/webhook/receipts.js +78 -0
  46. package/dist/api/webhook/receipts.js.map +1 -0
  47. package/dist/api/webhook/types.d.ts +249 -0
  48. package/dist/api/webhook/types.d.ts.map +1 -0
  49. package/dist/api/webhook/types.js +221 -0
  50. package/dist/api/webhook/types.js.map +1 -0
  51. package/dist/api/webhook/util.d.ts +202 -0
  52. package/dist/api/webhook/util.d.ts.map +1 -0
  53. package/dist/api/webhook/util.js +201 -0
  54. package/dist/api/webhook/util.js.map +1 -0
  55. package/dist/api/webhook/webhooks.d.ts +146 -0
  56. package/dist/api/webhook/webhooks.d.ts.map +1 -0
  57. package/dist/api/webhook/webhooks.js +165 -0
  58. package/dist/api/webhook/webhooks.js.map +1 -0
  59. package/dist/config.d.ts +1 -0
  60. package/dist/config.d.ts.map +1 -1
  61. package/dist/config.js +1 -0
  62. package/dist/config.js.map +1 -1
  63. package/dist/runtime-bootstrap.d.ts.map +1 -1
  64. package/dist/runtime-bootstrap.js +3 -0
  65. package/dist/runtime-bootstrap.js.map +1 -1
  66. package/dist/server.d.ts.map +1 -1
  67. package/dist/server.js +4 -0
  68. package/dist/server.js.map +1 -1
  69. package/package.json +4 -4
  70. package/src/api/index.ts +2 -0
  71. package/src/api/project/deploy.ts +16 -16
  72. package/src/api/sandbox/disk-checkpoint.ts +179 -0
  73. package/src/api/sandbox/index.ts +18 -0
  74. package/src/api/sandbox/snapshot-build.ts +6 -0
  75. package/src/api/services/index.ts +1 -0
  76. package/src/api/services/stats.ts +211 -0
  77. package/src/api/webhook/deliveries.ts +129 -0
  78. package/src/api/webhook/destinations.ts +224 -0
  79. package/src/api/webhook/index.ts +133 -0
  80. package/src/api/webhook/receipts.ts +124 -0
  81. package/src/api/webhook/types.ts +309 -0
  82. package/src/api/webhook/util.ts +237 -0
  83. package/src/api/webhook/webhooks.ts +260 -0
  84. package/src/config.ts +2 -0
  85. package/src/runtime-bootstrap.ts +3 -0
  86. package/src/server.ts +4 -0
@@ -0,0 +1,136 @@
1
+ import { z } from 'zod';
2
+ import { type APIClient } from '../api.ts';
3
+ import { type CreateWebhookDestinationRequest, type UpdateWebhookDestinationRequest, type WebhookApiOptions, type WebhookDestination } from './types.ts';
4
+ export declare const WebhookDestinationResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
+ success: z.ZodLiteral<false>;
6
+ message: z.ZodString;
7
+ code: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ success: z.ZodLiteral<true>;
10
+ data: z.ZodObject<{
11
+ id: z.ZodString;
12
+ created_at: z.ZodString;
13
+ updated_at: z.ZodString;
14
+ created_by: z.ZodString;
15
+ webhook_id: z.ZodString;
16
+ type: z.ZodEnum<{
17
+ url: "url";
18
+ }>;
19
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
20
+ }, z.core.$strip>;
21
+ }, z.core.$strip>], "success">;
22
+ export declare const WebhookDestinationsListResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
23
+ success: z.ZodLiteral<false>;
24
+ message: z.ZodString;
25
+ code: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ success: z.ZodLiteral<true>;
28
+ data: z.ZodArray<z.ZodObject<{
29
+ id: z.ZodString;
30
+ created_at: z.ZodString;
31
+ updated_at: z.ZodString;
32
+ created_by: z.ZodString;
33
+ webhook_id: z.ZodString;
34
+ type: z.ZodEnum<{
35
+ url: "url";
36
+ }>;
37
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
38
+ }, z.core.$strip>>;
39
+ }, z.core.$strip>], "success">;
40
+ export declare const DeleteWebhookDestinationResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
41
+ success: z.ZodLiteral<false>;
42
+ message: z.ZodString;
43
+ code: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strip>, z.ZodObject<{
45
+ success: z.ZodLiteral<true>;
46
+ }, z.core.$strip>], "success">;
47
+ /**
48
+ * Create a destination for a webhook.
49
+ *
50
+ * Destinations define where incoming webhook payloads are forwarded to.
51
+ * When a webhook receives a payload, it will be delivered to all configured destinations.
52
+ *
53
+ * @param client - The API client instance
54
+ * @param webhookId - The webhook ID (prefixed with wh_)
55
+ * @param params - Destination configuration including type and config
56
+ * @param options - Optional API options (e.g., orgId)
57
+ * @returns The created destination
58
+ * @throws {WebhookNotFoundError} If the webhook does not exist
59
+ * @throws {WebhookError} If the API request fails
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * const destination = await createWebhookDestination(client, 'wh_abc123', {
64
+ * type: 'url',
65
+ * config: { url: 'https://api.example.com/webhook' },
66
+ * });
67
+ * console.log(`Created destination ${destination.id}`);
68
+ * ```
69
+ */
70
+ export declare function createWebhookDestination(client: APIClient, webhookId: string, params: CreateWebhookDestinationRequest, options?: WebhookApiOptions): Promise<WebhookDestination>;
71
+ /**
72
+ * List all destinations for a webhook.
73
+ *
74
+ * Retrieves all destinations configured for a webhook.
75
+ *
76
+ * @param client - The API client instance
77
+ * @param webhookId - The webhook ID (prefixed with wh_)
78
+ * @param options - Optional API options (e.g., orgId)
79
+ * @returns Array of destinations configured for the webhook
80
+ * @throws {WebhookNotFoundError} If the webhook does not exist
81
+ * @throws {WebhookError} If the API request fails
82
+ *
83
+ * @example
84
+ * ```typescript
85
+ * const destinations = await listWebhookDestinations(client, 'wh_abc123');
86
+ * for (const dest of destinations) {
87
+ * console.log(`Destination ${dest.id}: type=${dest.type}`);
88
+ * }
89
+ * ```
90
+ */
91
+ export declare function listWebhookDestinations(client: APIClient, webhookId: string, options?: WebhookApiOptions): Promise<WebhookDestination[]>;
92
+ /**
93
+ * Update a webhook destination's configuration.
94
+ *
95
+ * Modifies an existing destination's config. Only the fields provided in params will be updated.
96
+ *
97
+ * @param client - The API client instance
98
+ * @param webhookId - The webhook ID (prefixed with wh_)
99
+ * @param destinationId - The destination ID to update (prefixed with whds_)
100
+ * @param params - Fields to update
101
+ * @param options - Optional API options (e.g., orgId)
102
+ * @returns The updated destination
103
+ * @throws {WebhookDestinationNotFoundError} If the destination does not exist
104
+ * @throws {WebhookNotFoundError} If the webhook does not exist
105
+ * @throws {WebhookError} If the API request fails
106
+ *
107
+ * @example
108
+ * ```typescript
109
+ * const updated = await updateWebhookDestination(client, 'wh_abc123', 'whds_def456', {
110
+ * config: { url: 'https://api.example.com/webhook/v2' },
111
+ * });
112
+ * ```
113
+ */
114
+ export declare function updateWebhookDestination(client: APIClient, webhookId: string, destinationId: string, params: UpdateWebhookDestinationRequest, options?: WebhookApiOptions): Promise<WebhookDestination>;
115
+ /**
116
+ * Delete a webhook destination.
117
+ *
118
+ * Permanently removes a destination. Webhook payloads will no longer be
119
+ * forwarded to this endpoint. This action cannot be undone.
120
+ *
121
+ * @param client - The API client instance
122
+ * @param webhookId - The webhook ID (prefixed with wh_)
123
+ * @param destinationId - The destination ID to delete (prefixed with whds_)
124
+ * @param options - Optional API options (e.g., orgId)
125
+ * @throws {WebhookDestinationNotFoundError} If the destination does not exist
126
+ * @throws {WebhookNotFoundError} If the webhook does not exist
127
+ * @throws {WebhookError} If the API request fails
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * await deleteWebhookDestination(client, 'wh_abc123', 'whds_def456');
132
+ * console.log('Destination deleted');
133
+ * ```
134
+ */
135
+ export declare function deleteWebhookDestination(client: APIClient, webhookId: string, destinationId: string, options?: WebhookApiOptions): Promise<void>;
136
+ //# sourceMappingURL=destinations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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AE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAqBf"}
@@ -0,0 +1,137 @@
1
+ import { z } from 'zod';
2
+ import { APIResponseSchema, APIResponseSchemaNoData } from "../api.js";
3
+ import { CreateWebhookDestinationRequestSchema, UpdateWebhookDestinationRequestSchema, WebhookDestinationSchema, } from "./types.js";
4
+ import { buildWebhookHeaders, WebhookError, webhookApiPath, withWebhookErrorHandling, } from "./util.js";
5
+ export const WebhookDestinationResponseSchema = APIResponseSchema(WebhookDestinationSchema);
6
+ export const WebhookDestinationsListResponseSchema = APIResponseSchema(z.array(WebhookDestinationSchema));
7
+ export const DeleteWebhookDestinationResponseSchema = APIResponseSchemaNoData();
8
+ /**
9
+ * Create a destination for a webhook.
10
+ *
11
+ * Destinations define where incoming webhook payloads are forwarded to.
12
+ * When a webhook receives a payload, it will be delivered to all configured destinations.
13
+ *
14
+ * @param client - The API client instance
15
+ * @param webhookId - The webhook ID (prefixed with wh_)
16
+ * @param params - Destination configuration including type and config
17
+ * @param options - Optional API options (e.g., orgId)
18
+ * @returns The created destination
19
+ * @throws {WebhookNotFoundError} If the webhook does not exist
20
+ * @throws {WebhookError} If the API request fails
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const destination = await createWebhookDestination(client, 'wh_abc123', {
25
+ * type: 'url',
26
+ * config: { url: 'https://api.example.com/webhook' },
27
+ * });
28
+ * console.log(`Created destination ${destination.id}`);
29
+ * ```
30
+ */
31
+ export async function createWebhookDestination(client, webhookId, params, options) {
32
+ const url = webhookApiPath('destination-create', webhookId);
33
+ const resp = await withWebhookErrorHandling(() => client.post(url, params, WebhookDestinationResponseSchema, CreateWebhookDestinationRequestSchema, undefined, buildWebhookHeaders(options?.orgId)), { webhookId });
34
+ if (resp.success) {
35
+ return resp.data;
36
+ }
37
+ throw new WebhookError({
38
+ webhookId,
39
+ message: resp.message || 'Failed to create webhook destination',
40
+ });
41
+ }
42
+ /**
43
+ * List all destinations for a webhook.
44
+ *
45
+ * Retrieves all destinations configured for a webhook.
46
+ *
47
+ * @param client - The API client instance
48
+ * @param webhookId - The webhook ID (prefixed with wh_)
49
+ * @param options - Optional API options (e.g., orgId)
50
+ * @returns Array of destinations configured for the webhook
51
+ * @throws {WebhookNotFoundError} If the webhook does not exist
52
+ * @throws {WebhookError} If the API request fails
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * const destinations = await listWebhookDestinations(client, 'wh_abc123');
57
+ * for (const dest of destinations) {
58
+ * console.log(`Destination ${dest.id}: type=${dest.type}`);
59
+ * }
60
+ * ```
61
+ */
62
+ export async function listWebhookDestinations(client, webhookId, options) {
63
+ const url = webhookApiPath('destination-list', webhookId);
64
+ const resp = await withWebhookErrorHandling(() => client.get(url, WebhookDestinationsListResponseSchema, undefined, buildWebhookHeaders(options?.orgId)), { webhookId });
65
+ if (resp.success) {
66
+ return resp.data;
67
+ }
68
+ throw new WebhookError({
69
+ webhookId,
70
+ message: resp.message || 'Failed to list webhook destinations',
71
+ });
72
+ }
73
+ /**
74
+ * Update a webhook destination's configuration.
75
+ *
76
+ * Modifies an existing destination's config. Only the fields provided in params will be updated.
77
+ *
78
+ * @param client - The API client instance
79
+ * @param webhookId - The webhook ID (prefixed with wh_)
80
+ * @param destinationId - The destination ID to update (prefixed with whds_)
81
+ * @param params - Fields to update
82
+ * @param options - Optional API options (e.g., orgId)
83
+ * @returns The updated destination
84
+ * @throws {WebhookDestinationNotFoundError} If the destination does not exist
85
+ * @throws {WebhookNotFoundError} If the webhook does not exist
86
+ * @throws {WebhookError} If the API request fails
87
+ *
88
+ * @example
89
+ * ```typescript
90
+ * const updated = await updateWebhookDestination(client, 'wh_abc123', 'whds_def456', {
91
+ * config: { url: 'https://api.example.com/webhook/v2' },
92
+ * });
93
+ * ```
94
+ */
95
+ export async function updateWebhookDestination(client, webhookId, destinationId, params, options) {
96
+ const url = webhookApiPath('destination-update', webhookId, destinationId);
97
+ const resp = await withWebhookErrorHandling(() => client.put(url, params, WebhookDestinationResponseSchema, UpdateWebhookDestinationRequestSchema, undefined, buildWebhookHeaders(options?.orgId)), { webhookId, destinationId });
98
+ if (resp.success) {
99
+ return resp.data;
100
+ }
101
+ throw new WebhookError({
102
+ webhookId,
103
+ message: resp.message || 'Failed to update webhook destination',
104
+ });
105
+ }
106
+ /**
107
+ * Delete a webhook destination.
108
+ *
109
+ * Permanently removes a destination. Webhook payloads will no longer be
110
+ * forwarded to this endpoint. This action cannot be undone.
111
+ *
112
+ * @param client - The API client instance
113
+ * @param webhookId - The webhook ID (prefixed with wh_)
114
+ * @param destinationId - The destination ID to delete (prefixed with whds_)
115
+ * @param options - Optional API options (e.g., orgId)
116
+ * @throws {WebhookDestinationNotFoundError} If the destination does not exist
117
+ * @throws {WebhookNotFoundError} If the webhook does not exist
118
+ * @throws {WebhookError} If the API request fails
119
+ *
120
+ * @example
121
+ * ```typescript
122
+ * await deleteWebhookDestination(client, 'wh_abc123', 'whds_def456');
123
+ * console.log('Destination deleted');
124
+ * ```
125
+ */
126
+ export async function deleteWebhookDestination(client, webhookId, destinationId, options) {
127
+ const url = webhookApiPath('destination-delete', webhookId, destinationId);
128
+ const resp = await withWebhookErrorHandling(() => client.delete(url, DeleteWebhookDestinationResponseSchema, undefined, buildWebhookHeaders(options?.orgId)), { webhookId, destinationId });
129
+ if (resp.success) {
130
+ return;
131
+ }
132
+ throw new WebhookError({
133
+ webhookId,
134
+ message: resp.message || 'Failed to delete webhook destination',
135
+ });
136
+ }
137
+ //# sourceMappingURL=destinations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destinations.js","sourceRoot":"","sources":["../../../src/api/webhook/destinations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAEN,qCAAqC,EAErC,qCAAqC,EAGrC,wBAAwB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,m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CAC1C,GAAG,EAAE,CACJ,MAAM,CAAC,MAAM,CACZ,GAAG,EACH,sCAAsC,EACtC,SAAS,EACT,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CACnC,EACF,EAAE,SAAS,EAAE,aAAa,EAAE,CAC5B,CAAC;IAEF,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO;IACR,CAAC;IAED,MAAM,IAAI,YAAY,CAAC;QACtB,SAAS;QACT,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,sCAAsC;KAC/D,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @module webhook
3
+ *
4
+ * Webhook API client for managing webhooks, destinations, receipts, and deliveries.
5
+ *
6
+ * This module provides a complete client for the Agentuity Webhook API, supporting:
7
+ * - **Webhook Management**: Create, read, update, and delete webhooks
8
+ * - **Destinations**: Configure URL endpoints for webhook payload forwarding
9
+ * - **Receipts**: View incoming webhook payloads that were received
10
+ * - **Deliveries**: Track delivery attempts and retry failed deliveries
11
+ *
12
+ * @example Basic Webhook Operations
13
+ * ```typescript
14
+ * import { createWebhook, createWebhookDestination, listWebhookReceipts } from '@agentuity/server';
15
+ *
16
+ * // Create a webhook
17
+ * const webhook = await createWebhook(client, {
18
+ * name: 'github-events',
19
+ * description: 'Receives GitHub webhook events',
20
+ * });
21
+ *
22
+ * // Add a destination
23
+ * await createWebhookDestination(client, webhook.id, {
24
+ * type: 'url',
25
+ * config: { url: 'https://api.example.com/webhook' },
26
+ * });
27
+ *
28
+ * // List receipts
29
+ * const { receipts } = await listWebhookReceipts(client, webhook.id);
30
+ * for (const receipt of receipts) {
31
+ * console.log(`Received: ${receipt.id} at ${receipt.date}`);
32
+ * }
33
+ * ```
34
+ */
35
+ export { type CreateWebhookDestinationRequest, CreateWebhookDestinationRequestSchema, type CreateWebhookRequest, CreateWebhookRequestSchema, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesRequestSchema, type ListWebhookReceiptsRequest, ListWebhookReceiptsRequestSchema, type ListWebhooksRequest, ListWebhooksRequestSchema, type PaginationRequest, PaginationRequestSchema, type UpdateWebhookDestinationRequest, UpdateWebhookDestinationRequestSchema, type UpdateWebhookRequest, UpdateWebhookRequestSchema, type Webhook, type WebhookApiOptions, type WebhookDelivery, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookDestination, WebhookDestinationSchema, type WebhookDestinationType, WebhookDestinationTypeSchema, type WebhookReceipt, WebhookReceiptSchema, WebhookSchema, } from './types.ts';
36
+ export { WebhookDeliveryNotFoundError, WebhookDestinationNotFoundError, WebhookError, WebhookNotFoundError, WebhookReceiptNotFoundError, } from './util.ts';
37
+ export { createWebhook, DeleteWebhookResponseSchema, deleteWebhook, getWebhook, listWebhooks, WebhookResponseSchema, WebhooksListResponseSchema, updateWebhook, } from './webhooks.ts';
38
+ export { createWebhookDestination, DeleteWebhookDestinationResponseSchema, deleteWebhookDestination, listWebhookDestinations, updateWebhookDestination, WebhookDestinationResponseSchema, WebhookDestinationsListResponseSchema, } from './destinations.ts';
39
+ export { getWebhookReceipt, listWebhookReceipts, WebhookReceiptResponseSchema, WebhookReceiptsListResponseSchema, } from './receipts.ts';
40
+ export { listWebhookDeliveries, retryWebhookDelivery, WebhookDeliveriesListResponseSchema, WebhookDeliveryResponseSchema, } from './deliveries.ts';
41
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/webhook/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAMH,OAAO,EACN,KAAK,+BAA+B,EACpC,qCAAqC,EACrC,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,KAAK,4BAA4B,EACjC,kCAAkC,EAClC,KAAK,0BAA0B,EAC/B,gCAAgC,EAChC,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,+BAA+B,EACpC,qCAAqC,EACrC,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,2BAA2B,EAC3B,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,cAAc,EACnB,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AAMpB,OAAO,EACN,4BAA4B,EAC5B,+BAA+B,EAC/B,YAAY,EACZ,oBAAoB,EACpB,2BAA2B,GAC3B,MAAM,WAAW,CAAC;AAMnB,OAAO,EACN,aAAa,EACb,2BAA2B,EAC3B,aAAa,EACb,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,GACb,MAAM,eAAe,CAAC;AAMvB,OAAO,EACN,wBAAwB,EACxB,sCAAsC,EACtC,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,gCAAgC,EAChC,qCAAqC,GACrC,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,iCAAiC,GACjC,MAAM,eAAe,CAAC;AAMvB,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,mCAAmC,EACnC,6BAA6B,GAC7B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @module webhook
3
+ *
4
+ * Webhook API client for managing webhooks, destinations, receipts, and deliveries.
5
+ *
6
+ * This module provides a complete client for the Agentuity Webhook API, supporting:
7
+ * - **Webhook Management**: Create, read, update, and delete webhooks
8
+ * - **Destinations**: Configure URL endpoints for webhook payload forwarding
9
+ * - **Receipts**: View incoming webhook payloads that were received
10
+ * - **Deliveries**: Track delivery attempts and retry failed deliveries
11
+ *
12
+ * @example Basic Webhook Operations
13
+ * ```typescript
14
+ * import { createWebhook, createWebhookDestination, listWebhookReceipts } from '@agentuity/server';
15
+ *
16
+ * // Create a webhook
17
+ * const webhook = await createWebhook(client, {
18
+ * name: 'github-events',
19
+ * description: 'Receives GitHub webhook events',
20
+ * });
21
+ *
22
+ * // Add a destination
23
+ * await createWebhookDestination(client, webhook.id, {
24
+ * type: 'url',
25
+ * config: { url: 'https://api.example.com/webhook' },
26
+ * });
27
+ *
28
+ * // List receipts
29
+ * const { receipts } = await listWebhookReceipts(client, webhook.id);
30
+ * for (const receipt of receipts) {
31
+ * console.log(`Received: ${receipt.id} at ${receipt.date}`);
32
+ * }
33
+ * ```
34
+ */
35
+ // ============================================================================
36
+ // Types & Schemas
37
+ // ============================================================================
38
+ export { CreateWebhookDestinationRequestSchema, CreateWebhookRequestSchema, ListWebhookDeliveriesRequestSchema, ListWebhookReceiptsRequestSchema, ListWebhooksRequestSchema, PaginationRequestSchema, UpdateWebhookDestinationRequestSchema, UpdateWebhookRequestSchema, WebhookDeliverySchema, WebhookDeliveryStatusSchema, WebhookDestinationSchema, WebhookDestinationTypeSchema, WebhookReceiptSchema, WebhookSchema, } from "./types.js";
39
+ // ============================================================================
40
+ // Errors
41
+ // ============================================================================
42
+ export { WebhookDeliveryNotFoundError, WebhookDestinationNotFoundError, WebhookError, WebhookNotFoundError, WebhookReceiptNotFoundError, } from "./util.js";
43
+ // ============================================================================
44
+ // Webhook Operations
45
+ // ============================================================================
46
+ export { createWebhook, DeleteWebhookResponseSchema, deleteWebhook, getWebhook, listWebhooks, WebhookResponseSchema, WebhooksListResponseSchema, updateWebhook, } from "./webhooks.js";
47
+ // ============================================================================
48
+ // Destination Operations
49
+ // ============================================================================
50
+ export { createWebhookDestination, DeleteWebhookDestinationResponseSchema, deleteWebhookDestination, listWebhookDestinations, updateWebhookDestination, WebhookDestinationResponseSchema, WebhookDestinationsListResponseSchema, } from "./destinations.js";
51
+ // ============================================================================
52
+ // Receipt Operations
53
+ // ============================================================================
54
+ export { getWebhookReceipt, listWebhookReceipts, WebhookReceiptResponseSchema, WebhookReceiptsListResponseSchema, } from "./receipts.js";
55
+ // ============================================================================
56
+ // Delivery Operations
57
+ // ============================================================================
58
+ export { listWebhookDeliveries, retryWebhookDelivery, WebhookDeliveriesListResponseSchema, WebhookDeliveryResponseSchema, } from "./deliveries.js";
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/webhook/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E,OAAO,EAEN,qCAAqC,EAErC,0BAA0B,EAE1B,kCAAkC,EAElC,gCAAgC,EAEhC,yBAAyB,EAEzB,uBAAuB,EAEvB,qCAAqC,EAErC,0BAA0B,EAI1B,qBAAqB,EAErB,2BAA2B,EAE3B,wBAAwB,EAExB,4BAA4B,EAE5B,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,OAAO,EACN,4BAA4B,EAC5B,+BAA+B,EAC/B,YAAY,EACZ,oBAAoB,EACpB,2BAA2B,GAC3B,MAAM,WAAW,CAAC;AAEnB,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,OAAO,EACN,aAAa,EACb,2BAA2B,EAC3B,aAAa,EACb,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,GACb,MAAM,eAAe,CAAC;AAEvB,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E,OAAO,EACN,wBAAwB,EACxB,sCAAsC,EACtC,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,gCAAgC,EAChC,qCAAqC,GACrC,MAAM,mBAAmB,CAAC;AAE3B,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,iCAAiC,GACjC,MAAM,eAAe,CAAC;AAEvB,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,mCAAmC,EACnC,6BAA6B,GAC7B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { z } from 'zod';
2
+ import { type APIClient } from '../api.ts';
3
+ import { type ListWebhookReceiptsRequest, type WebhookApiOptions, type WebhookReceipt } from './types.ts';
4
+ export declare const WebhookReceiptResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
+ success: z.ZodLiteral<false>;
6
+ message: z.ZodString;
7
+ code: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ success: z.ZodLiteral<true>;
10
+ data: z.ZodObject<{
11
+ id: z.ZodString;
12
+ date: z.ZodString;
13
+ webhook_id: z.ZodString;
14
+ headers: z.ZodRecord<z.ZodString, z.ZodUnknown>;
15
+ payload: z.ZodUnknown;
16
+ }, z.core.$strip>;
17
+ }, z.core.$strip>], "success">;
18
+ export declare const WebhookReceiptsListResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ success: z.ZodLiteral<false>;
20
+ message: z.ZodString;
21
+ code: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ success: z.ZodLiteral<true>;
24
+ data: z.ZodArray<z.ZodObject<{
25
+ id: z.ZodString;
26
+ date: z.ZodString;
27
+ webhook_id: z.ZodString;
28
+ headers: z.ZodRecord<z.ZodString, z.ZodUnknown>;
29
+ payload: z.ZodUnknown;
30
+ }, z.core.$strip>>;
31
+ }, z.core.$strip>], "success">;
32
+ /**
33
+ * List receipts for a webhook with optional pagination.
34
+ *
35
+ * Receipts represent incoming webhook payloads that were received.
36
+ *
37
+ * @param client - The API client instance
38
+ * @param webhookId - The webhook ID (prefixed with wh_)
39
+ * @param params - Optional pagination parameters
40
+ * @param options - Optional API options (e.g., orgId)
41
+ * @returns Object containing the list of receipts
42
+ * @throws {WebhookNotFoundError} If the webhook does not exist
43
+ * @throws {WebhookError} If the API request fails
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const { receipts } = await listWebhookReceipts(client, 'wh_abc123', { limit: 10 });
48
+ * for (const receipt of receipts) {
49
+ * console.log(`Receipt ${receipt.id}: received at ${receipt.date}`);
50
+ * }
51
+ * ```
52
+ */
53
+ export declare function listWebhookReceipts(client: APIClient, webhookId: string, params?: ListWebhookReceiptsRequest, options?: WebhookApiOptions): Promise<{
54
+ receipts: WebhookReceipt[];
55
+ }>;
56
+ /**
57
+ * Get a specific receipt for a webhook.
58
+ *
59
+ * Retrieves the full receipt details including headers and payload.
60
+ *
61
+ * @param client - The API client instance
62
+ * @param webhookId - The webhook ID (prefixed with wh_)
63
+ * @param receiptId - The receipt ID (prefixed with whrc_)
64
+ * @param options - Optional API options (e.g., orgId)
65
+ * @returns The receipt details
66
+ * @throws {WebhookReceiptNotFoundError} If the receipt does not exist
67
+ * @throws {WebhookNotFoundError} If the webhook does not exist
68
+ * @throws {WebhookError} If the API request fails
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * const receipt = await getWebhookReceipt(client, 'wh_abc123', 'whrc_def456');
73
+ * console.log(`Receipt payload:`, receipt.payload);
74
+ * ```
75
+ */
76
+ export declare function getWebhookReceipt(client: APIClient, webhookId: string, receiptId: string, options?: WebhookApiOptions): Promise<WebhookReceipt>;
77
+ //# sourceMappingURL=receipts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipts.d.ts","sourceRoot":"","sources":["../../../src/api/webhook/receipts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,WAAW,CAAC;AAC9D,OAAO,EACN,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEnB,MAAM,YAAY,CAAC;AASpB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;8BAA0C,CAAC;AACpF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;8BAAmD,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,mBAAmB,CACxC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,0BAA0B,EACnC,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC;IAAE,QAAQ,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CA8BzC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,cAAc,CAAC,CAqBzB"}
@@ -0,0 +1,78 @@
1
+ import { z } from 'zod';
2
+ import { APIResponseSchema } from "../api.js";
3
+ import { WebhookReceiptSchema, } from "./types.js";
4
+ import { buildWebhookHeaders, WebhookError, webhookApiPath, webhookApiPathWithQuery, withWebhookErrorHandling, } from "./util.js";
5
+ export const WebhookReceiptResponseSchema = APIResponseSchema(WebhookReceiptSchema);
6
+ export const WebhookReceiptsListResponseSchema = APIResponseSchema(z.array(WebhookReceiptSchema));
7
+ /**
8
+ * List receipts for a webhook with optional pagination.
9
+ *
10
+ * Receipts represent incoming webhook payloads that were received.
11
+ *
12
+ * @param client - The API client instance
13
+ * @param webhookId - The webhook ID (prefixed with wh_)
14
+ * @param params - Optional pagination parameters
15
+ * @param options - Optional API options (e.g., orgId)
16
+ * @returns Object containing the list of receipts
17
+ * @throws {WebhookNotFoundError} If the webhook does not exist
18
+ * @throws {WebhookError} If the API request fails
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * const { receipts } = await listWebhookReceipts(client, 'wh_abc123', { limit: 10 });
23
+ * for (const receipt of receipts) {
24
+ * console.log(`Receipt ${receipt.id}: received at ${receipt.date}`);
25
+ * }
26
+ * ```
27
+ */
28
+ export async function listWebhookReceipts(client, webhookId, params, options) {
29
+ const searchParams = new URLSearchParams();
30
+ if (params?.limit !== undefined) {
31
+ searchParams.set('limit', String(params.limit));
32
+ }
33
+ if (params?.offset !== undefined) {
34
+ searchParams.set('offset', String(params.offset));
35
+ }
36
+ const queryString = searchParams.toString();
37
+ const url = webhookApiPathWithQuery('receipt-list', queryString || undefined, webhookId);
38
+ const resp = await withWebhookErrorHandling(() => client.get(url, WebhookReceiptsListResponseSchema, undefined, buildWebhookHeaders(options?.orgId)), { webhookId });
39
+ if (resp.success) {
40
+ return { receipts: resp.data };
41
+ }
42
+ throw new WebhookError({
43
+ webhookId,
44
+ message: resp.message || 'Failed to list webhook receipts',
45
+ });
46
+ }
47
+ /**
48
+ * Get a specific receipt for a webhook.
49
+ *
50
+ * Retrieves the full receipt details including headers and payload.
51
+ *
52
+ * @param client - The API client instance
53
+ * @param webhookId - The webhook ID (prefixed with wh_)
54
+ * @param receiptId - The receipt ID (prefixed with whrc_)
55
+ * @param options - Optional API options (e.g., orgId)
56
+ * @returns The receipt details
57
+ * @throws {WebhookReceiptNotFoundError} If the receipt does not exist
58
+ * @throws {WebhookNotFoundError} If the webhook does not exist
59
+ * @throws {WebhookError} If the API request fails
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * const receipt = await getWebhookReceipt(client, 'wh_abc123', 'whrc_def456');
64
+ * console.log(`Receipt payload:`, receipt.payload);
65
+ * ```
66
+ */
67
+ export async function getWebhookReceipt(client, webhookId, receiptId, options) {
68
+ const url = webhookApiPath('receipt-get', webhookId, receiptId);
69
+ const resp = await withWebhookErrorHandling(() => client.get(url, WebhookReceiptResponseSchema, undefined, buildWebhookHeaders(options?.orgId)), { webhookId, receiptId });
70
+ if (resp.success) {
71
+ return resp.data;
72
+ }
73
+ throw new WebhookError({
74
+ webhookId,
75
+ message: resp.message || 'Failed to get webhook receipt',
76
+ });
77
+ }
78
+ //# sourceMappingURL=receipts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipts.js","sourceRoot":"","sources":["../../../src/api/webhook/receipts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAIN,oBAAoB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,wBAAwB,GACxB,MAAM,WAAW,CAAC;AAEnB,MAAM,CAAC,MAAM,4BAA4B,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AACpF,MAAM,CAAC,MAAM,iCAAiC,GAAG,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,MAAiB,EACjB,SAAiB,EACjB,MAAmC,EACnC,OAA2B;IAE3B,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;IAC3C,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;QACjC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,IAAI,MAAM,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;QAClC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,WAAW,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;IAC5C,MAAM,GAAG,GAAG,uBAAuB,CAAC,cAAc,EAAE,WAAW,IAAI,SAAS,EAAE,SAAS,CAAC,CAAC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