@apollo-deploy/signal-schemas 1.0.0 → 1.1.0

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 (91) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/definitions/domains/domain.schema.d.ts +10 -10
  3. package/dist/definitions/domains/request.schema.d.ts +4 -0
  4. package/dist/definitions/domains/request.schema.d.ts.map +1 -1
  5. package/dist/definitions/domains/request.schema.js +4 -0
  6. package/dist/definitions/domains/request.schema.js.map +1 -1
  7. package/dist/definitions/domains/response.schema.d.ts +36 -36
  8. package/dist/definitions/emails/domain.schema.d.ts +1 -1
  9. package/dist/definitions/emails/request.schema.d.ts +1 -1
  10. package/dist/definitions/emails/response.schema.d.ts +32 -2
  11. package/dist/definitions/emails/response.schema.d.ts.map +1 -1
  12. package/dist/definitions/emails/response.schema.js +14 -0
  13. package/dist/definitions/emails/response.schema.js.map +1 -1
  14. package/dist/definitions/index.d.ts +1 -0
  15. package/dist/definitions/index.d.ts.map +1 -1
  16. package/dist/definitions/index.js +1 -0
  17. package/dist/definitions/index.js.map +1 -1
  18. package/dist/definitions/migrations/index.d.ts +3 -0
  19. package/dist/definitions/migrations/index.d.ts.map +1 -0
  20. package/dist/definitions/migrations/index.js +3 -0
  21. package/dist/definitions/migrations/index.js.map +1 -0
  22. package/dist/definitions/migrations/request.schema.d.ts +10 -0
  23. package/dist/definitions/migrations/request.schema.d.ts.map +1 -0
  24. package/dist/definitions/migrations/request.schema.js +10 -0
  25. package/dist/definitions/migrations/request.schema.js.map +1 -0
  26. package/dist/definitions/migrations/response.schema.d.ts +18 -0
  27. package/dist/definitions/migrations/response.schema.d.ts.map +1 -0
  28. package/dist/definitions/migrations/response.schema.js +18 -0
  29. package/dist/definitions/migrations/response.schema.js.map +1 -0
  30. package/dist/definitions/projects/domain.schema.d.ts +2 -2
  31. package/dist/definitions/projects/request.schema.d.ts +1 -1
  32. package/dist/definitions/projects/response.schema.d.ts +3 -3
  33. package/dist/definitions/signal-email/domain.schema.d.ts +2 -2
  34. package/dist/definitions/signal-email/response.schema.d.ts +2 -2
  35. package/dist/definitions/signal-projects/domain.schema.d.ts +6 -6
  36. package/dist/definitions/signal-projects/request.schema.d.ts +2 -2
  37. package/dist/definitions/signal-projects/response.schema.d.ts +20 -20
  38. package/dist/definitions/webhooks/domain.schema.d.ts +1 -1
  39. package/dist/definitions/webhooks/response.schema.d.ts +1 -1
  40. package/package.json +7 -3
  41. package/dist/definitions/deliverability/deliverability.schema.d.ts +0 -98
  42. package/dist/definitions/deliverability/deliverability.schema.d.ts.map +0 -1
  43. package/dist/definitions/deliverability/deliverability.schema.js +0 -77
  44. package/dist/definitions/deliverability/schemas.d.ts +0 -91
  45. package/dist/definitions/deliverability/schemas.d.ts.map +0 -1
  46. package/dist/definitions/deliverability/schemas.js +0 -67
  47. package/dist/definitions/domains/domains.schema.d.ts +0 -668
  48. package/dist/definitions/domains/domains.schema.d.ts.map +0 -1
  49. package/dist/definitions/domains/domains.schema.js +0 -113
  50. package/dist/definitions/domains/schemas.d.ts +0 -545
  51. package/dist/definitions/domains/schemas.d.ts.map +0 -1
  52. package/dist/definitions/domains/schemas.js +0 -110
  53. package/dist/definitions/emails/emails.schema.d.ts +0 -230
  54. package/dist/definitions/emails/emails.schema.d.ts.map +0 -1
  55. package/dist/definitions/emails/emails.schema.js +0 -176
  56. package/dist/definitions/emails/schemas.d.ts +0 -284
  57. package/dist/definitions/emails/schemas.d.ts.map +0 -1
  58. package/dist/definitions/emails/schemas.js +0 -227
  59. package/dist/definitions/health/health.schema.d.ts +0 -27
  60. package/dist/definitions/health/health.schema.d.ts.map +0 -1
  61. package/dist/definitions/health/health.schema.js +0 -23
  62. package/dist/definitions/health/schemas.d.ts +0 -30
  63. package/dist/definitions/health/schemas.d.ts.map +0 -1
  64. package/dist/definitions/health/schemas.js +0 -23
  65. package/dist/definitions/projects/projects.schema.d.ts +0 -8
  66. package/dist/definitions/projects/projects.schema.d.ts.map +0 -1
  67. package/dist/definitions/projects/projects.schema.js +0 -23
  68. package/dist/definitions/projects/schemas.d.ts +0 -114
  69. package/dist/definitions/projects/schemas.d.ts.map +0 -1
  70. package/dist/definitions/projects/schemas.js +0 -87
  71. package/dist/definitions/suppressions/schemas.d.ts +0 -90
  72. package/dist/definitions/suppressions/schemas.d.ts.map +0 -1
  73. package/dist/definitions/suppressions/schemas.js +0 -68
  74. package/dist/definitions/suppressions/suppressions.schema.d.ts +0 -79
  75. package/dist/definitions/suppressions/suppressions.schema.d.ts.map +0 -1
  76. package/dist/definitions/suppressions/suppressions.schema.js +0 -63
  77. package/dist/definitions/templates/schemas.d.ts +0 -113
  78. package/dist/definitions/templates/schemas.d.ts.map +0 -1
  79. package/dist/definitions/templates/schemas.js +0 -80
  80. package/dist/definitions/usage/schemas.d.ts +0 -156
  81. package/dist/definitions/usage/schemas.d.ts.map +0 -1
  82. package/dist/definitions/usage/schemas.js +0 -83
  83. package/dist/definitions/usage/usage.schema.d.ts +0 -140
  84. package/dist/definitions/usage/usage.schema.d.ts.map +0 -1
  85. package/dist/definitions/usage/usage.schema.js +0 -77
  86. package/dist/definitions/webhooks/schemas.d.ts +0 -145
  87. package/dist/definitions/webhooks/schemas.d.ts.map +0 -1
  88. package/dist/definitions/webhooks/schemas.js +0 -97
  89. package/dist/definitions/webhooks/webhooks.schema.d.ts +0 -152
  90. package/dist/definitions/webhooks/webhooks.schema.d.ts.map +0 -1
  91. package/dist/definitions/webhooks/webhooks.schema.js +0 -96
@@ -1,145 +0,0 @@
1
- /**
2
- * Apollo Signal — Internal webhook schemas.
3
- *
4
- * Zod schemas for webhook endpoint create/update and webhook response.
5
- * Internal only — MUST NOT be exported to shared packages.
6
- *
7
- * Design §5.7 ; Requirements §8
8
- */
9
- import { z } from "zod";
10
- export declare const WebhookProjectParamSchema: z.ZodObject<{
11
- projectId: z.ZodString;
12
- }, z.core.$strip>;
13
- export declare const CreateWebhookBodySchema: z.ZodObject<{
14
- url: z.ZodString;
15
- events: z.ZodArray<z.ZodEnum<{
16
- "email.sent": "email.sent";
17
- "email.delivered": "email.delivered";
18
- "email.bounced": "email.bounced";
19
- "email.complained": "email.complained";
20
- "email.opened": "email.opened";
21
- "email.clicked": "email.clicked";
22
- "email.failed": "email.failed";
23
- "email.rejected": "email.rejected";
24
- "email.delivery_delayed": "email.delivery_delayed";
25
- "email.suppressed": "email.suppressed";
26
- "webhook.test": "webhook.test";
27
- }>>;
28
- secret: z.ZodOptional<z.ZodString>;
29
- }, z.core.$strip>;
30
- export declare const UpdateWebhookBodySchema: z.ZodObject<{
31
- url: z.ZodOptional<z.ZodString>;
32
- events: z.ZodOptional<z.ZodArray<z.ZodEnum<{
33
- "email.sent": "email.sent";
34
- "email.delivered": "email.delivered";
35
- "email.bounced": "email.bounced";
36
- "email.complained": "email.complained";
37
- "email.opened": "email.opened";
38
- "email.clicked": "email.clicked";
39
- "email.failed": "email.failed";
40
- "email.rejected": "email.rejected";
41
- "email.delivery_delayed": "email.delivery_delayed";
42
- "email.suppressed": "email.suppressed";
43
- "webhook.test": "webhook.test";
44
- }>>>;
45
- secret: z.ZodOptional<z.ZodString>;
46
- enabled: z.ZodOptional<z.ZodBoolean>;
47
- }, z.core.$strip>;
48
- export declare const WebhookIdParamSchema: z.ZodObject<{
49
- projectId: z.ZodString;
50
- webhookId: z.ZodString;
51
- }, z.core.$strip>;
52
- /**
53
- * Canonical webhook endpoint params — uses `endpointId` field name per T-7.1.
54
- * Matches the domain model's `SignalWebhookEndpoint.id` field.
55
- */
56
- export declare const WebhookParamsSchema: z.ZodObject<{
57
- projectId: z.ZodString;
58
- endpointId: z.ZodString;
59
- }, z.core.$strip>;
60
- export declare const WebhookDeliveryIdParamSchema: z.ZodObject<{
61
- projectId: z.ZodString;
62
- deliveryId: z.ZodCoercedNumber<unknown>;
63
- }, z.core.$strip>;
64
- export declare const ListWebhooksQuerySchema: z.ZodObject<{
65
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
66
- cursor: z.ZodOptional<z.ZodString>;
67
- }, z.core.$strip>;
68
- export declare const WebhookResponseSchema: z.ZodObject<{
69
- id: z.ZodString;
70
- projectId: z.ZodString;
71
- organizationId: z.ZodString;
72
- url: z.ZodString;
73
- events: z.ZodArray<z.ZodEnum<{
74
- "email.sent": "email.sent";
75
- "email.delivered": "email.delivered";
76
- "email.bounced": "email.bounced";
77
- "email.complained": "email.complained";
78
- "email.opened": "email.opened";
79
- "email.clicked": "email.clicked";
80
- "email.failed": "email.failed";
81
- "email.rejected": "email.rejected";
82
- "email.delivery_delayed": "email.delivery_delayed";
83
- "email.suppressed": "email.suppressed";
84
- "webhook.test": "webhook.test";
85
- }>>;
86
- enabled: z.ZodBoolean;
87
- createdAt: z.ZodString;
88
- updatedAt: z.ZodString;
89
- deletedAt: z.ZodNullable<z.ZodString>;
90
- }, z.core.$strip>;
91
- export declare const WebhookListResponseSchema: z.ZodObject<{
92
- data: z.ZodArray<z.ZodObject<{
93
- id: z.ZodString;
94
- projectId: z.ZodString;
95
- organizationId: z.ZodString;
96
- url: z.ZodString;
97
- events: z.ZodArray<z.ZodEnum<{
98
- "email.sent": "email.sent";
99
- "email.delivered": "email.delivered";
100
- "email.bounced": "email.bounced";
101
- "email.complained": "email.complained";
102
- "email.opened": "email.opened";
103
- "email.clicked": "email.clicked";
104
- "email.failed": "email.failed";
105
- "email.rejected": "email.rejected";
106
- "email.delivery_delayed": "email.delivery_delayed";
107
- "email.suppressed": "email.suppressed";
108
- "webhook.test": "webhook.test";
109
- }>>;
110
- enabled: z.ZodBoolean;
111
- createdAt: z.ZodString;
112
- updatedAt: z.ZodString;
113
- deletedAt: z.ZodNullable<z.ZodString>;
114
- }, z.core.$strip>>;
115
- nextCursor: z.ZodNullable<z.ZodString>;
116
- }, z.core.$strip>;
117
- export declare const WebhookDeliveryResponseSchema: z.ZodObject<{
118
- id: z.ZodString;
119
- projectId: z.ZodString;
120
- webhookEndpointId: z.ZodString;
121
- eventType: z.ZodString;
122
- status: z.ZodEnum<{
123
- success: "success";
124
- pending: "pending";
125
- failed: "failed";
126
- }>;
127
- attemptCount: z.ZodNumber;
128
- lastStatusCode: z.ZodNullable<z.ZodNumber>;
129
- lastError: z.ZodNullable<z.ZodString>;
130
- responseBodySnippet: z.ZodNullable<z.ZodString>;
131
- nextAttemptAt: z.ZodNullable<z.ZodString>;
132
- createdAt: z.ZodString;
133
- updatedAt: z.ZodString;
134
- }, z.core.$strip>;
135
- export type WebhookProjectParam = z.infer<typeof WebhookProjectParamSchema>;
136
- export type CreateWebhookBody = z.infer<typeof CreateWebhookBodySchema>;
137
- export type UpdateWebhookBody = z.infer<typeof UpdateWebhookBodySchema>;
138
- export type WebhookIdParam = z.infer<typeof WebhookIdParamSchema>;
139
- export type WebhookParams = z.infer<typeof WebhookParamsSchema>;
140
- export type WebhookDeliveryIdParam = z.infer<typeof WebhookDeliveryIdParamSchema>;
141
- export type ListWebhooksQuery = z.infer<typeof ListWebhooksQuerySchema>;
142
- export type WebhookResponse = z.infer<typeof WebhookResponseSchema>;
143
- export type WebhookListResponse = z.infer<typeof WebhookListResponseSchema>;
144
- export type WebhookDeliveryResponse = z.infer<typeof WebhookDeliveryResponseSchema>;
145
- //# sourceMappingURL=schemas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/definitions/webhooks/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;iBAIlC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;iBAKlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AAMH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;iBAUhC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;iBAGpC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;iBAaxC,CAAC;AAMH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -1,97 +0,0 @@
1
- "use strict";
2
- /**
3
- * Apollo Signal — Internal webhook schemas.
4
- *
5
- * Zod schemas for webhook endpoint create/update and webhook response.
6
- * Internal only — MUST NOT be exported to shared packages.
7
- *
8
- * Design §5.7 ; Requirements §8
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.WebhookDeliveryResponseSchema = exports.WebhookListResponseSchema = exports.WebhookResponseSchema = exports.ListWebhooksQuerySchema = exports.WebhookDeliveryIdParamSchema = exports.WebhookParamsSchema = exports.WebhookIdParamSchema = exports.UpdateWebhookBodySchema = exports.CreateWebhookBodySchema = exports.WebhookProjectParamSchema = void 0;
12
- var zod_1 = require("zod");
13
- // ---------------------------------------------------------------------------
14
- // Shared
15
- // ---------------------------------------------------------------------------
16
- var WebhookEventTypeSchema = zod_1.z.enum([
17
- "email.sent",
18
- "email.delivered",
19
- "email.bounced",
20
- "email.complained",
21
- "email.opened",
22
- "email.clicked",
23
- "email.failed",
24
- "email.rejected",
25
- "email.delivery_delayed",
26
- "email.suppressed",
27
- "webhook.test",
28
- ]);
29
- // ---------------------------------------------------------------------------
30
- // Request schemas
31
- // ---------------------------------------------------------------------------
32
- exports.WebhookProjectParamSchema = zod_1.z.object({
33
- projectId: zod_1.z.string().min(1),
34
- });
35
- exports.CreateWebhookBodySchema = zod_1.z.object({
36
- url: zod_1.z.string().url(),
37
- events: zod_1.z.array(WebhookEventTypeSchema).min(1),
38
- secret: zod_1.z.string().min(16).optional(),
39
- });
40
- exports.UpdateWebhookBodySchema = zod_1.z.object({
41
- url: zod_1.z.string().url().optional(),
42
- events: zod_1.z.array(WebhookEventTypeSchema).min(1).optional(),
43
- secret: zod_1.z.string().min(16).optional(),
44
- enabled: zod_1.z.boolean().optional(),
45
- });
46
- exports.WebhookIdParamSchema = zod_1.z.object({
47
- projectId: zod_1.z.string().min(1),
48
- webhookId: zod_1.z.string().min(1),
49
- });
50
- /**
51
- * Canonical webhook endpoint params — uses `endpointId` field name per T-7.1.
52
- * Matches the domain model's `SignalWebhookEndpoint.id` field.
53
- */
54
- exports.WebhookParamsSchema = zod_1.z.object({
55
- projectId: zod_1.z.string().min(1),
56
- endpointId: zod_1.z.string().min(1),
57
- });
58
- exports.WebhookDeliveryIdParamSchema = zod_1.z.object({
59
- projectId: zod_1.z.string().min(1),
60
- deliveryId: zod_1.z.coerce.number().int().min(1),
61
- });
62
- exports.ListWebhooksQuerySchema = zod_1.z.object({
63
- limit: zod_1.z.coerce.number().int().min(1).max(100).default(25),
64
- cursor: zod_1.z.string().optional(),
65
- });
66
- // ---------------------------------------------------------------------------
67
- // Response schemas
68
- // ---------------------------------------------------------------------------
69
- exports.WebhookResponseSchema = zod_1.z.object({
70
- id: zod_1.z.string(),
71
- projectId: zod_1.z.string(),
72
- organizationId: zod_1.z.string(),
73
- url: zod_1.z.string(),
74
- events: zod_1.z.array(WebhookEventTypeSchema),
75
- enabled: zod_1.z.boolean(),
76
- createdAt: zod_1.z.string().datetime(),
77
- updatedAt: zod_1.z.string().datetime(),
78
- deletedAt: zod_1.z.string().datetime().nullable(),
79
- });
80
- exports.WebhookListResponseSchema = zod_1.z.object({
81
- data: zod_1.z.array(exports.WebhookResponseSchema),
82
- nextCursor: zod_1.z.string().nullable(),
83
- });
84
- exports.WebhookDeliveryResponseSchema = zod_1.z.object({
85
- id: zod_1.z.string(),
86
- projectId: zod_1.z.string(),
87
- webhookEndpointId: zod_1.z.string(),
88
- eventType: zod_1.z.string(),
89
- status: zod_1.z.enum(["pending", "success", "failed"]),
90
- attemptCount: zod_1.z.number().int(),
91
- lastStatusCode: zod_1.z.number().int().nullable(),
92
- lastError: zod_1.z.string().nullable(),
93
- responseBodySnippet: zod_1.z.string().nullable(),
94
- nextAttemptAt: zod_1.z.string().datetime().nullable(),
95
- createdAt: zod_1.z.string().datetime(),
96
- updatedAt: zod_1.z.string().datetime(),
97
- });
@@ -1,152 +0,0 @@
1
- /**
2
- * Apollo Signal — Webhooks Schemas
3
- *
4
- * Subpath: @apollo-deploy/signal-schemas/webhooks
5
- */
6
- import { z } from 'zod';
7
- export declare const WebhookEventTypeSchema: z.ZodEnum<{
8
- "email.sent": "email.sent";
9
- "email.delivered": "email.delivered";
10
- "email.bounced": "email.bounced";
11
- "email.complained": "email.complained";
12
- "email.opened": "email.opened";
13
- "email.clicked": "email.clicked";
14
- "email.failed": "email.failed";
15
- "email.rejected": "email.rejected";
16
- "email.delivery_delayed": "email.delivery_delayed";
17
- "email.suppressed": "email.suppressed";
18
- "webhook.test": "webhook.test";
19
- }>;
20
- export declare const WebhookProjectParamSchema: z.ZodObject<{
21
- projectId: z.ZodString;
22
- }, z.core.$strip>;
23
- export declare const CreateWebhookBodySchema: z.ZodObject<{
24
- url: z.ZodString;
25
- events: z.ZodArray<z.ZodEnum<{
26
- "email.sent": "email.sent";
27
- "email.delivered": "email.delivered";
28
- "email.bounced": "email.bounced";
29
- "email.complained": "email.complained";
30
- "email.opened": "email.opened";
31
- "email.clicked": "email.clicked";
32
- "email.failed": "email.failed";
33
- "email.rejected": "email.rejected";
34
- "email.delivery_delayed": "email.delivery_delayed";
35
- "email.suppressed": "email.suppressed";
36
- "webhook.test": "webhook.test";
37
- }>>;
38
- secret: z.ZodOptional<z.ZodString>;
39
- }, z.core.$strip>;
40
- export declare const UpdateWebhookBodySchema: z.ZodObject<{
41
- url: z.ZodOptional<z.ZodString>;
42
- events: z.ZodOptional<z.ZodArray<z.ZodEnum<{
43
- "email.sent": "email.sent";
44
- "email.delivered": "email.delivered";
45
- "email.bounced": "email.bounced";
46
- "email.complained": "email.complained";
47
- "email.opened": "email.opened";
48
- "email.clicked": "email.clicked";
49
- "email.failed": "email.failed";
50
- "email.rejected": "email.rejected";
51
- "email.delivery_delayed": "email.delivery_delayed";
52
- "email.suppressed": "email.suppressed";
53
- "webhook.test": "webhook.test";
54
- }>>>;
55
- secret: z.ZodOptional<z.ZodString>;
56
- enabled: z.ZodOptional<z.ZodBoolean>;
57
- }, z.core.$strip>;
58
- export declare const WebhookIdParamSchema: z.ZodObject<{
59
- projectId: z.ZodString;
60
- webhookId: z.ZodString;
61
- }, z.core.$strip>;
62
- export declare const WebhookParamsSchema: z.ZodObject<{
63
- projectId: z.ZodString;
64
- endpointId: z.ZodString;
65
- }, z.core.$strip>;
66
- export declare const WebhookDeliveryIdParamSchema: z.ZodObject<{
67
- projectId: z.ZodString;
68
- deliveryId: z.ZodCoercedNumber<unknown>;
69
- }, z.core.$strip>;
70
- export declare const ListWebhooksQuerySchema: z.ZodObject<{
71
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
72
- cursor: z.ZodOptional<z.ZodString>;
73
- }, z.core.$strip>;
74
- export declare const WebhookResponseSchema: z.ZodObject<{
75
- id: z.ZodString;
76
- projectId: z.ZodString;
77
- organizationId: z.ZodString;
78
- url: z.ZodString;
79
- events: z.ZodArray<z.ZodEnum<{
80
- "email.sent": "email.sent";
81
- "email.delivered": "email.delivered";
82
- "email.bounced": "email.bounced";
83
- "email.complained": "email.complained";
84
- "email.opened": "email.opened";
85
- "email.clicked": "email.clicked";
86
- "email.failed": "email.failed";
87
- "email.rejected": "email.rejected";
88
- "email.delivery_delayed": "email.delivery_delayed";
89
- "email.suppressed": "email.suppressed";
90
- "webhook.test": "webhook.test";
91
- }>>;
92
- enabled: z.ZodBoolean;
93
- createdAt: z.ZodString;
94
- updatedAt: z.ZodString;
95
- deletedAt: z.ZodNullable<z.ZodString>;
96
- }, z.core.$strip>;
97
- export declare const WebhookListResponseSchema: z.ZodObject<{
98
- data: z.ZodArray<z.ZodObject<{
99
- id: z.ZodString;
100
- projectId: z.ZodString;
101
- organizationId: z.ZodString;
102
- url: z.ZodString;
103
- events: z.ZodArray<z.ZodEnum<{
104
- "email.sent": "email.sent";
105
- "email.delivered": "email.delivered";
106
- "email.bounced": "email.bounced";
107
- "email.complained": "email.complained";
108
- "email.opened": "email.opened";
109
- "email.clicked": "email.clicked";
110
- "email.failed": "email.failed";
111
- "email.rejected": "email.rejected";
112
- "email.delivery_delayed": "email.delivery_delayed";
113
- "email.suppressed": "email.suppressed";
114
- "webhook.test": "webhook.test";
115
- }>>;
116
- enabled: z.ZodBoolean;
117
- createdAt: z.ZodString;
118
- updatedAt: z.ZodString;
119
- deletedAt: z.ZodNullable<z.ZodString>;
120
- }, z.core.$strip>>;
121
- nextCursor: z.ZodNullable<z.ZodString>;
122
- }, z.core.$strip>;
123
- export declare const WebhookDeliveryResponseSchema: z.ZodObject<{
124
- id: z.ZodString;
125
- projectId: z.ZodString;
126
- webhookEndpointId: z.ZodString;
127
- eventType: z.ZodString;
128
- status: z.ZodEnum<{
129
- success: "success";
130
- pending: "pending";
131
- failed: "failed";
132
- }>;
133
- attemptCount: z.ZodNumber;
134
- lastStatusCode: z.ZodNullable<z.ZodNumber>;
135
- lastError: z.ZodNullable<z.ZodString>;
136
- responseBodySnippet: z.ZodNullable<z.ZodString>;
137
- nextAttemptAt: z.ZodNullable<z.ZodString>;
138
- createdAt: z.ZodString;
139
- updatedAt: z.ZodString;
140
- }, z.core.$strip>;
141
- export type WebhookEventType = z.infer<typeof WebhookEventTypeSchema>;
142
- export type WebhookProjectParam = z.infer<typeof WebhookProjectParamSchema>;
143
- export type CreateWebhookBody = z.infer<typeof CreateWebhookBodySchema>;
144
- export type UpdateWebhookBody = z.infer<typeof UpdateWebhookBodySchema>;
145
- export type WebhookIdParam = z.infer<typeof WebhookIdParamSchema>;
146
- export type WebhookParams = z.infer<typeof WebhookParamsSchema>;
147
- export type WebhookDeliveryIdParam = z.infer<typeof WebhookDeliveryIdParamSchema>;
148
- export type ListWebhooksQuery = z.infer<typeof ListWebhooksQuerySchema>;
149
- export type WebhookResponse = z.infer<typeof WebhookResponseSchema>;
150
- export type WebhookListResponse = z.infer<typeof WebhookListResponseSchema>;
151
- export type WebhookDeliveryResponse = z.infer<typeof WebhookDeliveryResponseSchema>;
152
- //# sourceMappingURL=webhooks.schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhooks.schema.d.ts","sourceRoot":"","sources":["../../../src/definitions/webhooks/webhooks.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAMH,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;iBAIlC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;iBAKlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AAMH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;iBAUhC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;iBAGpC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;iBAaxC,CAAC;AAMH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -1,96 +0,0 @@
1
- "use strict";
2
- /**
3
- * Apollo Signal — Webhooks Schemas
4
- *
5
- * Subpath: @apollo-deploy/signal-schemas/webhooks
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.WebhookDeliveryResponseSchema = exports.WebhookListResponseSchema = exports.WebhookResponseSchema = exports.ListWebhooksQuerySchema = exports.WebhookDeliveryIdParamSchema = exports.WebhookParamsSchema = exports.WebhookIdParamSchema = exports.UpdateWebhookBodySchema = exports.CreateWebhookBodySchema = exports.WebhookProjectParamSchema = exports.WebhookEventTypeSchema = void 0;
9
- var zod_1 = require("zod");
10
- // ---------------------------------------------------------------------------
11
- // Shared enums
12
- // ---------------------------------------------------------------------------
13
- exports.WebhookEventTypeSchema = zod_1.z.enum([
14
- 'email.sent', 'email.delivered', 'email.bounced', 'email.complained',
15
- 'email.opened', 'email.clicked', 'email.failed', 'email.rejected',
16
- 'email.delivery_delayed', 'email.suppressed', 'webhook.test',
17
- ]);
18
- // ---------------------------------------------------------------------------
19
- // Request schemas
20
- // ---------------------------------------------------------------------------
21
- exports.WebhookProjectParamSchema = zod_1.z.object({
22
- projectId: zod_1.z.string().min(1),
23
- });
24
- exports.CreateWebhookBodySchema = zod_1.z.object({
25
- url: zod_1.z.string().url(),
26
- events: zod_1.z.array(exports.WebhookEventTypeSchema).min(1),
27
- secret: zod_1.z.string().min(16).optional(),
28
- });
29
- exports.UpdateWebhookBodySchema = zod_1.z.object({
30
- url: zod_1.z.string().url().optional(),
31
- events: zod_1.z.array(exports.WebhookEventTypeSchema).min(1).optional(),
32
- secret: zod_1.z.string().min(16).optional(),
33
- enabled: zod_1.z.boolean().optional(),
34
- });
35
- exports.WebhookIdParamSchema = zod_1.z.object({
36
- projectId: zod_1.z.string().min(1),
37
- webhookId: zod_1.z.string().min(1),
38
- });
39
- exports.WebhookParamsSchema = zod_1.z.object({
40
- projectId: zod_1.z.string().min(1),
41
- endpointId: zod_1.z.string().min(1),
42
- });
43
- exports.WebhookDeliveryIdParamSchema = zod_1.z.object({
44
- projectId: zod_1.z.string().min(1),
45
- deliveryId: zod_1.z.coerce.number().int().min(1),
46
- });
47
- exports.ListWebhooksQuerySchema = zod_1.z.object({
48
- limit: zod_1.z.coerce.number().int().min(1).max(100).default(25),
49
- cursor: zod_1.z.string().optional(),
50
- });
51
- // ---------------------------------------------------------------------------
52
- // Response schemas
53
- // ---------------------------------------------------------------------------
54
- exports.WebhookResponseSchema = zod_1.z.object({
55
- id: zod_1.z.string(),
56
- projectId: zod_1.z.string(),
57
- organizationId: zod_1.z.string(),
58
- url: zod_1.z.string(),
59
- events: zod_1.z.array(exports.WebhookEventTypeSchema),
60
- enabled: zod_1.z.boolean(),
61
- createdAt: zod_1.z.string().datetime(),
62
- updatedAt: zod_1.z.string().datetime(),
63
- deletedAt: zod_1.z.string().datetime().nullable(),
64
- });
65
- exports.WebhookListResponseSchema = zod_1.z.object({
66
- data: zod_1.z.array(exports.WebhookResponseSchema),
67
- nextCursor: zod_1.z.string().nullable(),
68
- });
69
- exports.WebhookDeliveryResponseSchema = zod_1.z.object({
70
- id: zod_1.z.string(),
71
- projectId: zod_1.z.string(),
72
- webhookEndpointId: zod_1.z.string(),
73
- eventType: zod_1.z.string(),
74
- status: zod_1.z.enum(['pending', 'success', 'failed']),
75
- attemptCount: zod_1.z.number().int(),
76
- lastStatusCode: zod_1.z.number().int().nullable(),
77
- lastError: zod_1.z.string().nullable(),
78
- responseBodySnippet: zod_1.z.string().nullable(),
79
- nextAttemptAt: zod_1.z.string().datetime().nullable(),
80
- createdAt: zod_1.z.string().datetime(),
81
- updatedAt: zod_1.z.string().datetime(),
82
- });
83
- // ---------------------------------------------------------------------------
84
- // Schema registry — promotes types to OpenAPI components/schemas
85
- // ---------------------------------------------------------------------------
86
- zod_1.z.globalRegistry.add(exports.WebhookEventTypeSchema, { id: 'WebhookEventType' });
87
- zod_1.z.globalRegistry.add(exports.WebhookProjectParamSchema, { id: 'WebhookProjectParam' });
88
- zod_1.z.globalRegistry.add(exports.CreateWebhookBodySchema, { id: 'CreateWebhookBody' });
89
- zod_1.z.globalRegistry.add(exports.UpdateWebhookBodySchema, { id: 'UpdateWebhookBody' });
90
- zod_1.z.globalRegistry.add(exports.WebhookIdParamSchema, { id: 'WebhookIdParam' });
91
- zod_1.z.globalRegistry.add(exports.WebhookParamsSchema, { id: 'WebhookParams' });
92
- zod_1.z.globalRegistry.add(exports.WebhookDeliveryIdParamSchema, { id: 'WebhookDeliveryIdParam' });
93
- zod_1.z.globalRegistry.add(exports.ListWebhooksQuerySchema, { id: 'ListWebhooksQuery' });
94
- zod_1.z.globalRegistry.add(exports.WebhookResponseSchema, { id: 'WebhookResponse' });
95
- zod_1.z.globalRegistry.add(exports.WebhookListResponseSchema, { id: 'WebhookListResponse' });
96
- zod_1.z.globalRegistry.add(exports.WebhookDeliveryResponseSchema, { id: 'WebhookDeliveryResponse' });