@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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/definitions/domains/domain.schema.d.ts +10 -10
- package/dist/definitions/domains/request.schema.d.ts +4 -0
- package/dist/definitions/domains/request.schema.d.ts.map +1 -1
- package/dist/definitions/domains/request.schema.js +4 -0
- package/dist/definitions/domains/request.schema.js.map +1 -1
- package/dist/definitions/domains/response.schema.d.ts +36 -36
- package/dist/definitions/emails/domain.schema.d.ts +1 -1
- package/dist/definitions/emails/request.schema.d.ts +1 -1
- package/dist/definitions/emails/response.schema.d.ts +32 -2
- package/dist/definitions/emails/response.schema.d.ts.map +1 -1
- package/dist/definitions/emails/response.schema.js +14 -0
- package/dist/definitions/emails/response.schema.js.map +1 -1
- package/dist/definitions/index.d.ts +1 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/index.js +1 -0
- package/dist/definitions/index.js.map +1 -1
- package/dist/definitions/migrations/index.d.ts +3 -0
- package/dist/definitions/migrations/index.d.ts.map +1 -0
- package/dist/definitions/migrations/index.js +3 -0
- package/dist/definitions/migrations/index.js.map +1 -0
- package/dist/definitions/migrations/request.schema.d.ts +10 -0
- package/dist/definitions/migrations/request.schema.d.ts.map +1 -0
- package/dist/definitions/migrations/request.schema.js +10 -0
- package/dist/definitions/migrations/request.schema.js.map +1 -0
- package/dist/definitions/migrations/response.schema.d.ts +18 -0
- package/dist/definitions/migrations/response.schema.d.ts.map +1 -0
- package/dist/definitions/migrations/response.schema.js +18 -0
- package/dist/definitions/migrations/response.schema.js.map +1 -0
- package/dist/definitions/projects/domain.schema.d.ts +2 -2
- package/dist/definitions/projects/request.schema.d.ts +1 -1
- package/dist/definitions/projects/response.schema.d.ts +3 -3
- package/dist/definitions/signal-email/domain.schema.d.ts +2 -2
- package/dist/definitions/signal-email/response.schema.d.ts +2 -2
- package/dist/definitions/signal-projects/domain.schema.d.ts +6 -6
- package/dist/definitions/signal-projects/request.schema.d.ts +2 -2
- package/dist/definitions/signal-projects/response.schema.d.ts +20 -20
- package/dist/definitions/webhooks/domain.schema.d.ts +1 -1
- package/dist/definitions/webhooks/response.schema.d.ts +1 -1
- package/package.json +7 -3
- package/dist/definitions/deliverability/deliverability.schema.d.ts +0 -98
- package/dist/definitions/deliverability/deliverability.schema.d.ts.map +0 -1
- package/dist/definitions/deliverability/deliverability.schema.js +0 -77
- package/dist/definitions/deliverability/schemas.d.ts +0 -91
- package/dist/definitions/deliverability/schemas.d.ts.map +0 -1
- package/dist/definitions/deliverability/schemas.js +0 -67
- package/dist/definitions/domains/domains.schema.d.ts +0 -668
- package/dist/definitions/domains/domains.schema.d.ts.map +0 -1
- package/dist/definitions/domains/domains.schema.js +0 -113
- package/dist/definitions/domains/schemas.d.ts +0 -545
- package/dist/definitions/domains/schemas.d.ts.map +0 -1
- package/dist/definitions/domains/schemas.js +0 -110
- package/dist/definitions/emails/emails.schema.d.ts +0 -230
- package/dist/definitions/emails/emails.schema.d.ts.map +0 -1
- package/dist/definitions/emails/emails.schema.js +0 -176
- package/dist/definitions/emails/schemas.d.ts +0 -284
- package/dist/definitions/emails/schemas.d.ts.map +0 -1
- package/dist/definitions/emails/schemas.js +0 -227
- package/dist/definitions/health/health.schema.d.ts +0 -27
- package/dist/definitions/health/health.schema.d.ts.map +0 -1
- package/dist/definitions/health/health.schema.js +0 -23
- package/dist/definitions/health/schemas.d.ts +0 -30
- package/dist/definitions/health/schemas.d.ts.map +0 -1
- package/dist/definitions/health/schemas.js +0 -23
- package/dist/definitions/projects/projects.schema.d.ts +0 -8
- package/dist/definitions/projects/projects.schema.d.ts.map +0 -1
- package/dist/definitions/projects/projects.schema.js +0 -23
- package/dist/definitions/projects/schemas.d.ts +0 -114
- package/dist/definitions/projects/schemas.d.ts.map +0 -1
- package/dist/definitions/projects/schemas.js +0 -87
- package/dist/definitions/suppressions/schemas.d.ts +0 -90
- package/dist/definitions/suppressions/schemas.d.ts.map +0 -1
- package/dist/definitions/suppressions/schemas.js +0 -68
- package/dist/definitions/suppressions/suppressions.schema.d.ts +0 -79
- package/dist/definitions/suppressions/suppressions.schema.d.ts.map +0 -1
- package/dist/definitions/suppressions/suppressions.schema.js +0 -63
- package/dist/definitions/templates/schemas.d.ts +0 -113
- package/dist/definitions/templates/schemas.d.ts.map +0 -1
- package/dist/definitions/templates/schemas.js +0 -80
- package/dist/definitions/usage/schemas.d.ts +0 -156
- package/dist/definitions/usage/schemas.d.ts.map +0 -1
- package/dist/definitions/usage/schemas.js +0 -83
- package/dist/definitions/usage/usage.schema.d.ts +0 -140
- package/dist/definitions/usage/usage.schema.d.ts.map +0 -1
- package/dist/definitions/usage/usage.schema.js +0 -77
- package/dist/definitions/webhooks/schemas.d.ts +0 -145
- package/dist/definitions/webhooks/schemas.d.ts.map +0 -1
- package/dist/definitions/webhooks/schemas.js +0 -97
- package/dist/definitions/webhooks/webhooks.schema.d.ts +0 -152
- package/dist/definitions/webhooks/webhooks.schema.d.ts.map +0 -1
- package/dist/definitions/webhooks/webhooks.schema.js +0 -96
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Apollo Signal — Template internal contracts (Zod schemas).
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ListVersionsResponseSchema = exports.ListTemplatesResponseSchema = exports.TemplateResponseSchema = exports.ListTemplatesQuerySchema = exports.ProjectParamSchema = exports.TemplateParamSchema = exports.UpdateTemplateBodySchema = exports.CreateTemplateBodySchema = exports.TemplateSchema = exports.TemplateVersionSchema = void 0;
|
|
7
|
-
var v4_1 = require("zod/v4");
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
// Common sub-schemas
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
exports.TemplateVersionSchema = v4_1.z.object({
|
|
12
|
-
id: v4_1.z.string(),
|
|
13
|
-
templateId: v4_1.z.string(),
|
|
14
|
-
versionNumber: v4_1.z.number().int().positive(),
|
|
15
|
-
subject: v4_1.z.string(),
|
|
16
|
-
html: v4_1.z.string().nullable(),
|
|
17
|
-
text: v4_1.z.string().nullable(),
|
|
18
|
-
createdByUserId: v4_1.z.string(),
|
|
19
|
-
createdAt: v4_1.z.string().datetime({ offset: true }),
|
|
20
|
-
});
|
|
21
|
-
exports.TemplateSchema = v4_1.z.object({
|
|
22
|
-
id: v4_1.z.string(),
|
|
23
|
-
projectId: v4_1.z.string(),
|
|
24
|
-
name: v4_1.z.string(),
|
|
25
|
-
description: v4_1.z.string().nullable(),
|
|
26
|
-
activeVersionId: v4_1.z.string().nullable(),
|
|
27
|
-
status: v4_1.z.enum(["active", "archived"]),
|
|
28
|
-
createdByUserId: v4_1.z.string(),
|
|
29
|
-
createdAt: v4_1.z.string().datetime({ offset: true }),
|
|
30
|
-
updatedAt: v4_1.z.string().datetime({ offset: true }),
|
|
31
|
-
});
|
|
32
|
-
// ---------------------------------------------------------------------------
|
|
33
|
-
// Request schemas
|
|
34
|
-
// ---------------------------------------------------------------------------
|
|
35
|
-
exports.CreateTemplateBodySchema = v4_1.z.object({
|
|
36
|
-
name: v4_1.z.string().min(1).max(255),
|
|
37
|
-
description: v4_1.z.string().max(1000).optional(),
|
|
38
|
-
subject: v4_1.z.string().min(1).max(998),
|
|
39
|
-
html: v4_1.z.string().min(1).optional(),
|
|
40
|
-
text: v4_1.z.string().min(1).optional(),
|
|
41
|
-
}).refine(function (b) { return b.html !== undefined || b.text !== undefined; }, { message: "At least one of html or text must be provided", path: ["html"] });
|
|
42
|
-
exports.UpdateTemplateBodySchema = v4_1.z.object({
|
|
43
|
-
name: v4_1.z.string().min(1).max(255).optional(),
|
|
44
|
-
description: v4_1.z.string().max(1000).nullable().optional(),
|
|
45
|
-
subject: v4_1.z.string().min(1).max(998).optional(),
|
|
46
|
-
html: v4_1.z.string().min(1).nullable().optional(),
|
|
47
|
-
text: v4_1.z.string().min(1).nullable().optional(),
|
|
48
|
-
}).refine(function (b) {
|
|
49
|
-
return b.name !== undefined ||
|
|
50
|
-
b.description !== undefined ||
|
|
51
|
-
b.subject !== undefined ||
|
|
52
|
-
b.html !== undefined ||
|
|
53
|
-
b.text !== undefined;
|
|
54
|
-
}, { message: "At least one field must be provided to update" });
|
|
55
|
-
exports.TemplateParamSchema = v4_1.z.object({
|
|
56
|
-
projectId: v4_1.z.string().min(1),
|
|
57
|
-
templateId: v4_1.z.string().min(1),
|
|
58
|
-
});
|
|
59
|
-
exports.ProjectParamSchema = v4_1.z.object({
|
|
60
|
-
projectId: v4_1.z.string().min(1),
|
|
61
|
-
});
|
|
62
|
-
exports.ListTemplatesQuerySchema = v4_1.z.object({
|
|
63
|
-
limit: v4_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
64
|
-
cursor: v4_1.z.string().optional(),
|
|
65
|
-
});
|
|
66
|
-
// ---------------------------------------------------------------------------
|
|
67
|
-
// Response schemas
|
|
68
|
-
// ---------------------------------------------------------------------------
|
|
69
|
-
exports.TemplateResponseSchema = v4_1.z.object({
|
|
70
|
-
template: exports.TemplateSchema,
|
|
71
|
-
activeVersion: exports.TemplateVersionSchema.nullable(),
|
|
72
|
-
});
|
|
73
|
-
exports.ListTemplatesResponseSchema = v4_1.z.object({
|
|
74
|
-
data: v4_1.z.array(exports.TemplateSchema),
|
|
75
|
-
nextCursor: v4_1.z.string().nullable(),
|
|
76
|
-
});
|
|
77
|
-
exports.ListVersionsResponseSchema = v4_1.z.object({
|
|
78
|
-
data: v4_1.z.array(exports.TemplateVersionSchema),
|
|
79
|
-
nextCursor: v4_1.z.string().nullable(),
|
|
80
|
-
});
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Apollo Signal — Internal usage schemas (usage module).
|
|
3
|
-
*
|
|
4
|
-
* Zod schemas for usage aggregate and billing entitlements responses.
|
|
5
|
-
* Internal only — MUST NOT be exported to shared packages.
|
|
6
|
-
*
|
|
7
|
-
* Design §5.9 ; Requirements §10
|
|
8
|
-
*/
|
|
9
|
-
import { z } from "zod";
|
|
10
|
-
export declare const UsageQuerySchema: z.ZodObject<{
|
|
11
|
-
since: z.ZodOptional<z.ZodString>;
|
|
12
|
-
until: z.ZodOptional<z.ZodString>;
|
|
13
|
-
}, z.core.$strip>;
|
|
14
|
-
export declare const UsageProjectParamSchema: z.ZodObject<{
|
|
15
|
-
projectId: z.ZodString;
|
|
16
|
-
}, z.core.$strip>;
|
|
17
|
-
/** Alias for {@link UsageProjectParamSchema} — canonical name per T-7.1. */
|
|
18
|
-
export declare const UsageParamsSchema: z.ZodObject<{
|
|
19
|
-
projectId: z.ZodString;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
export declare const UsageAggregateItemSchema: z.ZodObject<{
|
|
22
|
-
type: z.ZodString;
|
|
23
|
-
total: z.ZodNumber;
|
|
24
|
-
since: z.ZodString;
|
|
25
|
-
until: z.ZodString;
|
|
26
|
-
}, z.core.$strip>;
|
|
27
|
-
export declare const UsageAggregateResponseSchema: z.ZodObject<{
|
|
28
|
-
projectId: z.ZodString;
|
|
29
|
-
items: z.ZodArray<z.ZodObject<{
|
|
30
|
-
type: z.ZodString;
|
|
31
|
-
total: z.ZodNumber;
|
|
32
|
-
since: z.ZodString;
|
|
33
|
-
until: z.ZodString;
|
|
34
|
-
}, z.core.$strip>>;
|
|
35
|
-
since: z.ZodString;
|
|
36
|
-
until: z.ZodString;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
|
-
/** A single quota dimension: how much is used vs the plan limit. */
|
|
39
|
-
export declare const QuotaEntrySchema: z.ZodObject<{
|
|
40
|
-
current: z.ZodNumber;
|
|
41
|
-
limit: z.ZodNumber;
|
|
42
|
-
}, z.core.$strip>;
|
|
43
|
-
/**
|
|
44
|
-
* All quota dimensions for the org's Signal subscription.
|
|
45
|
-
* Keys mirror `SignalEntitlements` numeric fields.
|
|
46
|
-
*/
|
|
47
|
-
export declare const UsageEntitlementsSchema: z.ZodObject<{
|
|
48
|
-
maxProjects: z.ZodObject<{
|
|
49
|
-
current: z.ZodNumber;
|
|
50
|
-
limit: z.ZodNumber;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
maxDomains: z.ZodObject<{
|
|
53
|
-
current: z.ZodNumber;
|
|
54
|
-
limit: z.ZodNumber;
|
|
55
|
-
}, z.core.$strip>;
|
|
56
|
-
maxWebhooks: z.ZodObject<{
|
|
57
|
-
current: z.ZodNumber;
|
|
58
|
-
limit: z.ZodNumber;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
maxApiKeys: z.ZodObject<{
|
|
61
|
-
current: z.ZodNumber;
|
|
62
|
-
limit: z.ZodNumber;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
|
-
dailySends: z.ZodObject<{
|
|
65
|
-
current: z.ZodNumber;
|
|
66
|
-
limit: z.ZodNumber;
|
|
67
|
-
}, z.core.$strip>;
|
|
68
|
-
monthlySends: z.ZodObject<{
|
|
69
|
-
current: z.ZodNumber;
|
|
70
|
-
limit: z.ZodNumber;
|
|
71
|
-
}, z.core.$strip>;
|
|
72
|
-
aiCredits: z.ZodObject<{
|
|
73
|
-
current: z.ZodNumber;
|
|
74
|
-
limit: z.ZodNumber;
|
|
75
|
-
}, z.core.$strip>;
|
|
76
|
-
dataRetentionDays: z.ZodObject<{
|
|
77
|
-
current: z.ZodNumber;
|
|
78
|
-
limit: z.ZodNumber;
|
|
79
|
-
}, z.core.$strip>;
|
|
80
|
-
}, z.core.$strip>;
|
|
81
|
-
/**
|
|
82
|
-
* All feature flags for the org's Signal subscription.
|
|
83
|
-
* Keys mirror `SignalEntitlements` boolean fields.
|
|
84
|
-
*/
|
|
85
|
-
export declare const FeatureEntitlementsSchema: z.ZodObject<{
|
|
86
|
-
customTrackingDomain: z.ZodBoolean;
|
|
87
|
-
advancedWebhooks: z.ZodBoolean;
|
|
88
|
-
signedWebhooks: z.ZodBoolean;
|
|
89
|
-
readEngagement: z.ZodBoolean;
|
|
90
|
-
enrichedTracking: z.ZodBoolean;
|
|
91
|
-
forwardingDetection: z.ZodBoolean;
|
|
92
|
-
deliverabilityAdvisor: z.ZodBoolean;
|
|
93
|
-
realtimeStream: z.ZodBoolean;
|
|
94
|
-
sendTimeOptimisation: z.ZodBoolean;
|
|
95
|
-
dedicatedIps: z.ZodBoolean;
|
|
96
|
-
multiRegion: z.ZodBoolean;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
export declare const EntitlementsResponseSchema: z.ZodObject<{
|
|
99
|
-
planId: z.ZodString;
|
|
100
|
-
usage: z.ZodObject<{
|
|
101
|
-
maxProjects: z.ZodObject<{
|
|
102
|
-
current: z.ZodNumber;
|
|
103
|
-
limit: z.ZodNumber;
|
|
104
|
-
}, z.core.$strip>;
|
|
105
|
-
maxDomains: z.ZodObject<{
|
|
106
|
-
current: z.ZodNumber;
|
|
107
|
-
limit: z.ZodNumber;
|
|
108
|
-
}, z.core.$strip>;
|
|
109
|
-
maxWebhooks: z.ZodObject<{
|
|
110
|
-
current: z.ZodNumber;
|
|
111
|
-
limit: z.ZodNumber;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
maxApiKeys: z.ZodObject<{
|
|
114
|
-
current: z.ZodNumber;
|
|
115
|
-
limit: z.ZodNumber;
|
|
116
|
-
}, z.core.$strip>;
|
|
117
|
-
dailySends: z.ZodObject<{
|
|
118
|
-
current: z.ZodNumber;
|
|
119
|
-
limit: z.ZodNumber;
|
|
120
|
-
}, z.core.$strip>;
|
|
121
|
-
monthlySends: z.ZodObject<{
|
|
122
|
-
current: z.ZodNumber;
|
|
123
|
-
limit: z.ZodNumber;
|
|
124
|
-
}, z.core.$strip>;
|
|
125
|
-
aiCredits: z.ZodObject<{
|
|
126
|
-
current: z.ZodNumber;
|
|
127
|
-
limit: z.ZodNumber;
|
|
128
|
-
}, z.core.$strip>;
|
|
129
|
-
dataRetentionDays: z.ZodObject<{
|
|
130
|
-
current: z.ZodNumber;
|
|
131
|
-
limit: z.ZodNumber;
|
|
132
|
-
}, z.core.$strip>;
|
|
133
|
-
}, z.core.$strip>;
|
|
134
|
-
features: z.ZodObject<{
|
|
135
|
-
customTrackingDomain: z.ZodBoolean;
|
|
136
|
-
advancedWebhooks: z.ZodBoolean;
|
|
137
|
-
signedWebhooks: z.ZodBoolean;
|
|
138
|
-
readEngagement: z.ZodBoolean;
|
|
139
|
-
enrichedTracking: z.ZodBoolean;
|
|
140
|
-
forwardingDetection: z.ZodBoolean;
|
|
141
|
-
deliverabilityAdvisor: z.ZodBoolean;
|
|
142
|
-
realtimeStream: z.ZodBoolean;
|
|
143
|
-
sendTimeOptimisation: z.ZodBoolean;
|
|
144
|
-
dedicatedIps: z.ZodBoolean;
|
|
145
|
-
multiRegion: z.ZodBoolean;
|
|
146
|
-
}, z.core.$strip>;
|
|
147
|
-
}, z.core.$strip>;
|
|
148
|
-
export type UsageQuery = z.infer<typeof UsageQuerySchema>;
|
|
149
|
-
export type UsageParams = z.infer<typeof UsageParamsSchema>;
|
|
150
|
-
export type UsageAggregateItem = z.infer<typeof UsageAggregateItemSchema>;
|
|
151
|
-
export type UsageAggregateResponse = z.infer<typeof UsageAggregateResponseSchema>;
|
|
152
|
-
export type QuotaEntry = z.infer<typeof QuotaEntrySchema>;
|
|
153
|
-
export type UsageEntitlements = z.infer<typeof UsageEntitlementsSchema>;
|
|
154
|
-
export type FeatureEntitlements = z.infer<typeof FeatureEntitlementsSchema>;
|
|
155
|
-
export type EntitlementsResponse = z.infer<typeof EntitlementsResponseSchema>;
|
|
156
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/definitions/usage/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,gBAAg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
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Apollo Signal — Internal usage schemas (usage module).
|
|
4
|
-
*
|
|
5
|
-
* Zod schemas for usage aggregate and billing entitlements responses.
|
|
6
|
-
* Internal only — MUST NOT be exported to shared packages.
|
|
7
|
-
*
|
|
8
|
-
* Design §5.9 ; Requirements §10
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.EntitlementsResponseSchema = exports.FeatureEntitlementsSchema = exports.UsageEntitlementsSchema = exports.QuotaEntrySchema = exports.UsageAggregateResponseSchema = exports.UsageAggregateItemSchema = exports.UsageParamsSchema = exports.UsageProjectParamSchema = exports.UsageQuerySchema = void 0;
|
|
12
|
-
var zod_1 = require("zod");
|
|
13
|
-
// ---------------------------------------------------------------------------
|
|
14
|
-
// Request schemas
|
|
15
|
-
// ---------------------------------------------------------------------------
|
|
16
|
-
exports.UsageQuerySchema = zod_1.z.object({
|
|
17
|
-
since: zod_1.z.string().datetime().optional(),
|
|
18
|
-
until: zod_1.z.string().datetime().optional(),
|
|
19
|
-
});
|
|
20
|
-
exports.UsageProjectParamSchema = zod_1.z.object({
|
|
21
|
-
projectId: zod_1.z.string().min(1),
|
|
22
|
-
});
|
|
23
|
-
/** Alias for {@link UsageProjectParamSchema} — canonical name per T-7.1. */
|
|
24
|
-
exports.UsageParamsSchema = exports.UsageProjectParamSchema;
|
|
25
|
-
// ---------------------------------------------------------------------------
|
|
26
|
-
// Response schemas
|
|
27
|
-
// ---------------------------------------------------------------------------
|
|
28
|
-
exports.UsageAggregateItemSchema = zod_1.z.object({
|
|
29
|
-
type: zod_1.z.string(),
|
|
30
|
-
total: zod_1.z.number().int(),
|
|
31
|
-
since: zod_1.z.string().datetime(),
|
|
32
|
-
until: zod_1.z.string().datetime(),
|
|
33
|
-
});
|
|
34
|
-
exports.UsageAggregateResponseSchema = zod_1.z.object({
|
|
35
|
-
projectId: zod_1.z.string(),
|
|
36
|
-
items: zod_1.z.array(exports.UsageAggregateItemSchema),
|
|
37
|
-
since: zod_1.z.string().datetime(),
|
|
38
|
-
until: zod_1.z.string().datetime(),
|
|
39
|
-
});
|
|
40
|
-
// ---------------------------------------------------------------------------
|
|
41
|
-
// Entitlements response schemas
|
|
42
|
-
// ---------------------------------------------------------------------------
|
|
43
|
-
/** A single quota dimension: how much is used vs the plan limit. */
|
|
44
|
-
exports.QuotaEntrySchema = zod_1.z.object({
|
|
45
|
-
current: zod_1.z.number().int(),
|
|
46
|
-
limit: zod_1.z.number().int(),
|
|
47
|
-
});
|
|
48
|
-
/**
|
|
49
|
-
* All quota dimensions for the org's Signal subscription.
|
|
50
|
-
* Keys mirror `SignalEntitlements` numeric fields.
|
|
51
|
-
*/
|
|
52
|
-
exports.UsageEntitlementsSchema = zod_1.z.object({
|
|
53
|
-
maxProjects: exports.QuotaEntrySchema,
|
|
54
|
-
maxDomains: exports.QuotaEntrySchema,
|
|
55
|
-
maxWebhooks: exports.QuotaEntrySchema,
|
|
56
|
-
maxApiKeys: exports.QuotaEntrySchema,
|
|
57
|
-
dailySends: exports.QuotaEntrySchema,
|
|
58
|
-
monthlySends: exports.QuotaEntrySchema,
|
|
59
|
-
aiCredits: exports.QuotaEntrySchema,
|
|
60
|
-
dataRetentionDays: exports.QuotaEntrySchema,
|
|
61
|
-
});
|
|
62
|
-
/**
|
|
63
|
-
* All feature flags for the org's Signal subscription.
|
|
64
|
-
* Keys mirror `SignalEntitlements` boolean fields.
|
|
65
|
-
*/
|
|
66
|
-
exports.FeatureEntitlementsSchema = zod_1.z.object({
|
|
67
|
-
customTrackingDomain: zod_1.z.boolean(),
|
|
68
|
-
advancedWebhooks: zod_1.z.boolean(),
|
|
69
|
-
signedWebhooks: zod_1.z.boolean(),
|
|
70
|
-
readEngagement: zod_1.z.boolean(),
|
|
71
|
-
enrichedTracking: zod_1.z.boolean(),
|
|
72
|
-
forwardingDetection: zod_1.z.boolean(),
|
|
73
|
-
deliverabilityAdvisor: zod_1.z.boolean(),
|
|
74
|
-
realtimeStream: zod_1.z.boolean(),
|
|
75
|
-
sendTimeOptimisation: zod_1.z.boolean(),
|
|
76
|
-
dedicatedIps: zod_1.z.boolean(),
|
|
77
|
-
multiRegion: zod_1.z.boolean(),
|
|
78
|
-
});
|
|
79
|
-
exports.EntitlementsResponseSchema = zod_1.z.object({
|
|
80
|
-
planId: zod_1.z.string(),
|
|
81
|
-
usage: exports.UsageEntitlementsSchema,
|
|
82
|
-
features: exports.FeatureEntitlementsSchema,
|
|
83
|
-
});
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Apollo Signal — Usage Schemas
|
|
3
|
-
*
|
|
4
|
-
* Subpath: @apollo-deploy/signal-schemas/usage
|
|
5
|
-
*/
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
export declare const UsageQuerySchema: z.ZodObject<{
|
|
8
|
-
since: z.ZodOptional<z.ZodString>;
|
|
9
|
-
until: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
export declare const UsageProjectParamSchema: z.ZodObject<{
|
|
12
|
-
projectId: z.ZodString;
|
|
13
|
-
}, z.core.$strip>;
|
|
14
|
-
export declare const UsageAggregateItemSchema: z.ZodObject<{
|
|
15
|
-
type: z.ZodString;
|
|
16
|
-
total: z.ZodNumber;
|
|
17
|
-
since: z.ZodString;
|
|
18
|
-
until: z.ZodString;
|
|
19
|
-
}, z.core.$strip>;
|
|
20
|
-
export declare const UsageAggregateResponseSchema: z.ZodObject<{
|
|
21
|
-
projectId: z.ZodString;
|
|
22
|
-
items: z.ZodArray<z.ZodObject<{
|
|
23
|
-
type: z.ZodString;
|
|
24
|
-
total: z.ZodNumber;
|
|
25
|
-
since: z.ZodString;
|
|
26
|
-
until: z.ZodString;
|
|
27
|
-
}, z.core.$strip>>;
|
|
28
|
-
since: z.ZodString;
|
|
29
|
-
until: z.ZodString;
|
|
30
|
-
}, z.core.$strip>;
|
|
31
|
-
export declare const QuotaEntrySchema: z.ZodObject<{
|
|
32
|
-
current: z.ZodNumber;
|
|
33
|
-
limit: z.ZodNumber;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
export declare const UsageEntitlementsSchema: z.ZodObject<{
|
|
36
|
-
maxProjects: z.ZodObject<{
|
|
37
|
-
current: z.ZodNumber;
|
|
38
|
-
limit: z.ZodNumber;
|
|
39
|
-
}, z.core.$strip>;
|
|
40
|
-
maxDomains: z.ZodObject<{
|
|
41
|
-
current: z.ZodNumber;
|
|
42
|
-
limit: z.ZodNumber;
|
|
43
|
-
}, z.core.$strip>;
|
|
44
|
-
maxWebhooks: z.ZodObject<{
|
|
45
|
-
current: z.ZodNumber;
|
|
46
|
-
limit: z.ZodNumber;
|
|
47
|
-
}, z.core.$strip>;
|
|
48
|
-
maxApiKeys: z.ZodObject<{
|
|
49
|
-
current: z.ZodNumber;
|
|
50
|
-
limit: z.ZodNumber;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
dailySends: z.ZodObject<{
|
|
53
|
-
current: z.ZodNumber;
|
|
54
|
-
limit: z.ZodNumber;
|
|
55
|
-
}, z.core.$strip>;
|
|
56
|
-
monthlySends: z.ZodObject<{
|
|
57
|
-
current: z.ZodNumber;
|
|
58
|
-
limit: z.ZodNumber;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
aiCredits: z.ZodObject<{
|
|
61
|
-
current: z.ZodNumber;
|
|
62
|
-
limit: z.ZodNumber;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
|
-
dataRetentionDays: z.ZodObject<{
|
|
65
|
-
current: z.ZodNumber;
|
|
66
|
-
limit: z.ZodNumber;
|
|
67
|
-
}, z.core.$strip>;
|
|
68
|
-
}, z.core.$strip>;
|
|
69
|
-
export declare const FeatureEntitlementsSchema: z.ZodObject<{
|
|
70
|
-
customTrackingDomain: z.ZodBoolean;
|
|
71
|
-
advancedWebhooks: z.ZodBoolean;
|
|
72
|
-
signedWebhooks: z.ZodBoolean;
|
|
73
|
-
readEngagement: z.ZodBoolean;
|
|
74
|
-
enrichedTracking: z.ZodBoolean;
|
|
75
|
-
forwardingDetection: z.ZodBoolean;
|
|
76
|
-
deliverabilityAdvisor: z.ZodBoolean;
|
|
77
|
-
realtimeStream: z.ZodBoolean;
|
|
78
|
-
sendTimeOptimisation: z.ZodBoolean;
|
|
79
|
-
dedicatedIps: z.ZodBoolean;
|
|
80
|
-
multiRegion: z.ZodBoolean;
|
|
81
|
-
}, z.core.$strip>;
|
|
82
|
-
export declare const EntitlementsResponseSchema: z.ZodObject<{
|
|
83
|
-
planId: z.ZodString;
|
|
84
|
-
usage: z.ZodObject<{
|
|
85
|
-
maxProjects: z.ZodObject<{
|
|
86
|
-
current: z.ZodNumber;
|
|
87
|
-
limit: z.ZodNumber;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
|
-
maxDomains: z.ZodObject<{
|
|
90
|
-
current: z.ZodNumber;
|
|
91
|
-
limit: z.ZodNumber;
|
|
92
|
-
}, z.core.$strip>;
|
|
93
|
-
maxWebhooks: z.ZodObject<{
|
|
94
|
-
current: z.ZodNumber;
|
|
95
|
-
limit: z.ZodNumber;
|
|
96
|
-
}, z.core.$strip>;
|
|
97
|
-
maxApiKeys: z.ZodObject<{
|
|
98
|
-
current: z.ZodNumber;
|
|
99
|
-
limit: z.ZodNumber;
|
|
100
|
-
}, z.core.$strip>;
|
|
101
|
-
dailySends: z.ZodObject<{
|
|
102
|
-
current: z.ZodNumber;
|
|
103
|
-
limit: z.ZodNumber;
|
|
104
|
-
}, z.core.$strip>;
|
|
105
|
-
monthlySends: z.ZodObject<{
|
|
106
|
-
current: z.ZodNumber;
|
|
107
|
-
limit: z.ZodNumber;
|
|
108
|
-
}, z.core.$strip>;
|
|
109
|
-
aiCredits: z.ZodObject<{
|
|
110
|
-
current: z.ZodNumber;
|
|
111
|
-
limit: z.ZodNumber;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
dataRetentionDays: z.ZodObject<{
|
|
114
|
-
current: z.ZodNumber;
|
|
115
|
-
limit: z.ZodNumber;
|
|
116
|
-
}, z.core.$strip>;
|
|
117
|
-
}, z.core.$strip>;
|
|
118
|
-
features: z.ZodObject<{
|
|
119
|
-
customTrackingDomain: z.ZodBoolean;
|
|
120
|
-
advancedWebhooks: z.ZodBoolean;
|
|
121
|
-
signedWebhooks: z.ZodBoolean;
|
|
122
|
-
readEngagement: z.ZodBoolean;
|
|
123
|
-
enrichedTracking: z.ZodBoolean;
|
|
124
|
-
forwardingDetection: z.ZodBoolean;
|
|
125
|
-
deliverabilityAdvisor: z.ZodBoolean;
|
|
126
|
-
realtimeStream: z.ZodBoolean;
|
|
127
|
-
sendTimeOptimisation: z.ZodBoolean;
|
|
128
|
-
dedicatedIps: z.ZodBoolean;
|
|
129
|
-
multiRegion: z.ZodBoolean;
|
|
130
|
-
}, z.core.$strip>;
|
|
131
|
-
}, z.core.$strip>;
|
|
132
|
-
export type UsageQuery = z.infer<typeof UsageQuerySchema>;
|
|
133
|
-
export type UsageProjectParam = z.infer<typeof UsageProjectParamSchema>;
|
|
134
|
-
export type UsageAggregateItem = z.infer<typeof UsageAggregateItemSchema>;
|
|
135
|
-
export type UsageAggregateResponse = z.infer<typeof UsageAggregateResponseSchema>;
|
|
136
|
-
export type QuotaEntry = z.infer<typeof QuotaEntrySchema>;
|
|
137
|
-
export type UsageEntitlements = z.infer<typeof UsageEntitlementsSchema>;
|
|
138
|
-
export type FeatureEntitlements = z.infer<typeof FeatureEntitlementsSchema>;
|
|
139
|
-
export type EntitlementsResponse = z.infer<typeof EntitlementsResponseSchema>;
|
|
140
|
-
//# sourceMappingURL=usage.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.schema.d.ts","sourceRoot":"","sources":["../../../src/definitions/usage/usage.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAA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ath: @apollo-deploy/signal-schemas/usage
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.EntitlementsResponseSchema = exports.FeatureEntitlementsSchema = exports.UsageEntitlementsSchema = exports.QuotaEntrySchema = exports.UsageAggregateResponseSchema = exports.UsageAggregateItemSchema = exports.UsageProjectParamSchema = exports.UsageQuerySchema = void 0;
|
|
9
|
-
var zod_1 = require("zod");
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
// Request schemas
|
|
12
|
-
// ---------------------------------------------------------------------------
|
|
13
|
-
exports.UsageQuerySchema = zod_1.z.object({
|
|
14
|
-
since: zod_1.z.string().datetime().optional(),
|
|
15
|
-
until: zod_1.z.string().datetime().optional(),
|
|
16
|
-
});
|
|
17
|
-
exports.UsageProjectParamSchema = zod_1.z.object({
|
|
18
|
-
projectId: zod_1.z.string().min(1),
|
|
19
|
-
});
|
|
20
|
-
// ---------------------------------------------------------------------------
|
|
21
|
-
// Response schemas
|
|
22
|
-
// ---------------------------------------------------------------------------
|
|
23
|
-
exports.UsageAggregateItemSchema = zod_1.z.object({
|
|
24
|
-
type: zod_1.z.string(),
|
|
25
|
-
total: zod_1.z.number().int(),
|
|
26
|
-
since: zod_1.z.string().datetime(),
|
|
27
|
-
until: zod_1.z.string().datetime(),
|
|
28
|
-
});
|
|
29
|
-
exports.UsageAggregateResponseSchema = zod_1.z.object({
|
|
30
|
-
projectId: zod_1.z.string(),
|
|
31
|
-
items: zod_1.z.array(exports.UsageAggregateItemSchema),
|
|
32
|
-
since: zod_1.z.string().datetime(),
|
|
33
|
-
until: zod_1.z.string().datetime(),
|
|
34
|
-
});
|
|
35
|
-
exports.QuotaEntrySchema = zod_1.z.object({
|
|
36
|
-
current: zod_1.z.number().int(),
|
|
37
|
-
limit: zod_1.z.number().int(),
|
|
38
|
-
});
|
|
39
|
-
exports.UsageEntitlementsSchema = zod_1.z.object({
|
|
40
|
-
maxProjects: exports.QuotaEntrySchema,
|
|
41
|
-
maxDomains: exports.QuotaEntrySchema,
|
|
42
|
-
maxWebhooks: exports.QuotaEntrySchema,
|
|
43
|
-
maxApiKeys: exports.QuotaEntrySchema,
|
|
44
|
-
dailySends: exports.QuotaEntrySchema,
|
|
45
|
-
monthlySends: exports.QuotaEntrySchema,
|
|
46
|
-
aiCredits: exports.QuotaEntrySchema,
|
|
47
|
-
dataRetentionDays: exports.QuotaEntrySchema,
|
|
48
|
-
});
|
|
49
|
-
exports.FeatureEntitlementsSchema = zod_1.z.object({
|
|
50
|
-
customTrackingDomain: zod_1.z.boolean(),
|
|
51
|
-
advancedWebhooks: zod_1.z.boolean(),
|
|
52
|
-
signedWebhooks: zod_1.z.boolean(),
|
|
53
|
-
readEngagement: zod_1.z.boolean(),
|
|
54
|
-
enrichedTracking: zod_1.z.boolean(),
|
|
55
|
-
forwardingDetection: zod_1.z.boolean(),
|
|
56
|
-
deliverabilityAdvisor: zod_1.z.boolean(),
|
|
57
|
-
realtimeStream: zod_1.z.boolean(),
|
|
58
|
-
sendTimeOptimisation: zod_1.z.boolean(),
|
|
59
|
-
dedicatedIps: zod_1.z.boolean(),
|
|
60
|
-
multiRegion: zod_1.z.boolean(),
|
|
61
|
-
});
|
|
62
|
-
exports.EntitlementsResponseSchema = zod_1.z.object({
|
|
63
|
-
planId: zod_1.z.string(),
|
|
64
|
-
usage: exports.UsageEntitlementsSchema,
|
|
65
|
-
features: exports.FeatureEntitlementsSchema,
|
|
66
|
-
});
|
|
67
|
-
// ---------------------------------------------------------------------------
|
|
68
|
-
// Schema registry — promotes types to OpenAPI components/schemas
|
|
69
|
-
// ---------------------------------------------------------------------------
|
|
70
|
-
zod_1.z.globalRegistry.add(exports.UsageQuerySchema, { id: 'UsageQuery' });
|
|
71
|
-
zod_1.z.globalRegistry.add(exports.UsageProjectParamSchema, { id: 'UsageProjectParam' });
|
|
72
|
-
zod_1.z.globalRegistry.add(exports.UsageAggregateItemSchema, { id: 'UsageAggregateItem' });
|
|
73
|
-
zod_1.z.globalRegistry.add(exports.UsageAggregateResponseSchema, { id: 'UsageAggregateResponse' });
|
|
74
|
-
zod_1.z.globalRegistry.add(exports.QuotaEntrySchema, { id: 'QuotaEntry' });
|
|
75
|
-
zod_1.z.globalRegistry.add(exports.UsageEntitlementsSchema, { id: 'UsageEntitlements' });
|
|
76
|
-
zod_1.z.globalRegistry.add(exports.FeatureEntitlementsSchema, { id: 'FeatureEntitlements' });
|
|
77
|
-
zod_1.z.globalRegistry.add(exports.EntitlementsResponseSchema, { id: 'EntitlementsResponse' });
|