@spacefast/common 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/brand.d.ts +15 -0
- package/dist/brand.js +24 -0
- package/dist/config/domains.d.ts +30 -0
- package/dist/config/domains.js +75 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +3 -0
- package/dist/contracts/abuse.d.ts +93 -0
- package/dist/contracts/abuse.js +50 -0
- package/dist/contracts/access.d.ts +409 -0
- package/dist/contracts/access.js +396 -0
- package/dist/contracts/account.d.ts +28 -0
- package/dist/contracts/account.js +54 -0
- package/dist/contracts/activity.d.ts +118 -0
- package/dist/contracts/activity.js +180 -0
- package/dist/contracts/analytics.d.ts +56 -0
- package/dist/contracts/analytics.js +91 -0
- package/dist/contracts/annotations.d.ts +327 -0
- package/dist/contracts/annotations.js +234 -0
- package/dist/contracts/api-keys.d.ts +517 -0
- package/dist/contracts/api-keys.js +235 -0
- package/dist/contracts/archives.d.ts +332 -0
- package/dist/contracts/archives.js +120 -0
- package/dist/contracts/auth.d.ts +86 -0
- package/dist/contracts/auth.js +82 -0
- package/dist/contracts/beta.d.ts +106 -0
- package/dist/contracts/beta.js +104 -0
- package/dist/contracts/billing.d.ts +328 -0
- package/dist/contracts/billing.js +203 -0
- package/dist/contracts/builds.d.ts +504 -0
- package/dist/contracts/builds.js +248 -0
- package/dist/contracts/channels.d.ts +49 -0
- package/dist/contracts/channels.js +51 -0
- package/dist/contracts/common.d.ts +238 -0
- package/dist/contracts/common.js +175 -0
- package/dist/contracts/deployments.d.ts +574 -0
- package/dist/contracts/deployments.js +97 -0
- package/dist/contracts/device-auth.d.ts +194 -0
- package/dist/contracts/device-auth.js +162 -0
- package/dist/contracts/domains.d.ts +6115 -0
- package/dist/contracts/domains.js +1435 -0
- package/dist/contracts/enums.d.ts +196 -0
- package/dist/contracts/enums.js +211 -0
- package/dist/contracts/error-code-meta.d.ts +1560 -0
- package/dist/contracts/error-code-meta.js +400 -0
- package/dist/contracts/error-codes.d.ts +13 -0
- package/dist/contracts/error-codes.js +416 -0
- package/dist/contracts/events.d.ts +398 -0
- package/dist/contracts/events.js +320 -0
- package/dist/contracts/fast-domain-search.d.ts +19 -0
- package/dist/contracts/fast-domain-search.js +22 -0
- package/dist/contracts/features.d.ts +240 -0
- package/dist/contracts/features.js +406 -0
- package/dist/contracts/git.d.ts +288 -0
- package/dist/contracts/git.js +116 -0
- package/dist/contracts/ids.d.ts +35 -0
- package/dist/contracts/ids.js +45 -0
- package/dist/contracts/intercom.d.ts +6 -0
- package/dist/contracts/intercom.js +5 -0
- package/dist/contracts/internal.d.ts +103 -0
- package/dist/contracts/internal.js +92 -0
- package/dist/contracts/mcp.d.ts +788 -0
- package/dist/contracts/mcp.js +161 -0
- package/dist/contracts/me.d.ts +81 -0
- package/dist/contracts/me.js +104 -0
- package/dist/contracts/oauth-resources.d.ts +30 -0
- package/dist/contracts/oauth-resources.js +61 -0
- package/dist/contracts/operations.d.ts +54 -0
- package/dist/contracts/operations.js +14 -0
- package/dist/contracts/plan-policy.d.ts +85 -0
- package/dist/contracts/plan-policy.js +75 -0
- package/dist/contracts/platform.d.ts +359 -0
- package/dist/contracts/platform.js +216 -0
- package/dist/contracts/push-new.d.ts +156 -0
- package/dist/contracts/push-new.js +52 -0
- package/dist/contracts/quotas.d.ts +16 -0
- package/dist/contracts/quotas.js +36 -0
- package/dist/contracts/repository-connections.d.ts +231 -0
- package/dist/contracts/repository-connections.js +106 -0
- package/dist/contracts/resources.d.ts +529 -0
- package/dist/contracts/resources.js +209 -0
- package/dist/contracts/routes.d.ts +45 -0
- package/dist/contracts/routes.js +31 -0
- package/dist/contracts/runtime-api.d.ts +449 -0
- package/dist/contracts/runtime-api.js +513 -0
- package/dist/contracts/sites.d.ts +393 -0
- package/dist/contracts/sites.js +121 -0
- package/dist/contracts/slugs.d.ts +31 -0
- package/dist/contracts/slugs.js +47 -0
- package/dist/contracts/space-config.d.ts +216 -0
- package/dist/contracts/space-config.js +237 -0
- package/dist/contracts/space-theme.d.ts +25 -0
- package/dist/contracts/space-theme.js +49 -0
- package/dist/contracts/spaces.d.ts +2760 -0
- package/dist/contracts/spaces.js +589 -0
- package/dist/contracts/superadmin-activity.d.ts +205 -0
- package/dist/contracts/superadmin-activity.js +107 -0
- package/dist/contracts/superadmin-emails.d.ts +212 -0
- package/dist/contracts/superadmin-emails.js +112 -0
- package/dist/contracts/superadmin-queues.d.ts +414 -0
- package/dist/contracts/superadmin-queues.js +202 -0
- package/dist/contracts/superadmin-runtime.d.ts +27 -0
- package/dist/contracts/superadmin-runtime.js +38 -0
- package/dist/contracts/superadmin-spaces.d.ts +429 -0
- package/dist/contracts/superadmin-spaces.js +82 -0
- package/dist/contracts/superadmin-tenants.d.ts +180 -0
- package/dist/contracts/superadmin-tenants.js +117 -0
- package/dist/contracts/superadmin.d.ts +654 -0
- package/dist/contracts/superadmin.js +309 -0
- package/dist/contracts/tags.d.ts +1140 -0
- package/dist/contracts/tags.js +1050 -0
- package/dist/contracts/teams.d.ts +233 -0
- package/dist/contracts/teams.js +174 -0
- package/dist/contracts/telemetry.d.ts +2 -0
- package/dist/contracts/telemetry.js +1 -0
- package/dist/contracts/transfers.d.ts +105 -0
- package/dist/contracts/transfers.js +48 -0
- package/dist/contracts/variables.d.ts +189 -0
- package/dist/contracts/variables.js +82 -0
- package/dist/contracts/webhooks.d.ts +159 -0
- package/dist/contracts/webhooks.js +59 -0
- package/dist/contracts/zero.d.ts +1538 -0
- package/dist/contracts/zero.js +755 -0
- package/dist/docs/agent-prose.d.ts +35 -0
- package/dist/docs/agent-prose.js +153 -0
- package/dist/docs/agent-setup.d.ts +6 -0
- package/dist/docs/agent-setup.js +164 -0
- package/dist/docs/agent-solutions.d.ts +110 -0
- package/dist/docs/agent-solutions.js +181 -0
- package/dist/docs/error-docs.d.ts +12 -0
- package/dist/docs/error-docs.js +1601 -0
- package/dist/docs/skill-distribution.d.ts +12 -0
- package/dist/docs/skill-distribution.js +18 -0
- package/dist/domain-exploration.d.ts +108 -0
- package/dist/domain-exploration.js +488 -0
- package/dist/domain-normalize.d.ts +1 -0
- package/dist/domain-normalize.js +14 -0
- package/dist/domain-zones.d.ts +1 -0
- package/dist/domain-zones.js +5272 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/access-policy.d.ts +39 -0
- package/dist/utils/access-policy.js +232 -0
- package/dist/utils/api.d.ts +4 -0
- package/dist/utils/api.js +13 -0
- package/dist/utils/auth-redirect.d.ts +1 -0
- package/dist/utils/auth-redirect.js +48 -0
- package/dist/utils/auth.d.ts +5 -0
- package/dist/utils/auth.js +13 -0
- package/dist/utils/build-settings.d.ts +49 -0
- package/dist/utils/build-settings.js +366 -0
- package/dist/utils/claim-token.d.ts +1 -0
- package/dist/utils/claim-token.js +9 -0
- package/dist/utils/collections.d.ts +1 -0
- package/dist/utils/collections.js +5 -0
- package/dist/utils/concurrency.d.ts +1 -0
- package/dist/utils/concurrency.js +18 -0
- package/dist/utils/content-type.d.ts +10 -0
- package/dist/utils/content-type.js +145 -0
- package/dist/utils/error-display.d.ts +7 -0
- package/dist/utils/error-display.js +42 -0
- package/dist/utils/error.d.ts +1 -0
- package/dist/utils/error.js +3 -0
- package/dist/utils/generate-space-name.d.ts +14 -0
- package/dist/utils/generate-space-name.js +95 -0
- package/dist/utils/git-repository.d.ts +5 -0
- package/dist/utils/git-repository.js +99 -0
- package/dist/utils/guards.d.ts +1 -0
- package/dist/utils/guards.js +3 -0
- package/dist/utils/publish-detection.d.ts +10 -0
- package/dist/utils/publish-detection.js +118 -0
- package/dist/utils/publish-policy.d.ts +69 -0
- package/dist/utils/publish-policy.js +429 -0
- package/dist/utils/query-client.d.ts +7 -0
- package/dist/utils/query-client.js +21 -0
- package/dist/utils/query-keys.d.ts +75 -0
- package/dist/utils/query-keys.js +78 -0
- package/dist/utils/runtime-paths.d.ts +7 -0
- package/dist/utils/runtime-paths.js +28 -0
- package/dist/utils/runtime-upload.d.ts +19 -0
- package/dist/utils/runtime-upload.js +27 -0
- package/dist/utils/slug.d.ts +5 -0
- package/dist/utils/slug.js +13 -0
- package/dist/utils/space-config.d.ts +75 -0
- package/dist/utils/space-config.js +415 -0
- package/dist/utils/space-theme.d.ts +16 -0
- package/dist/utils/space-theme.js +89 -0
- package/dist/utils/static-runtime-policy.d.ts +17 -0
- package/dist/utils/static-runtime-policy.js +103 -0
- package/dist/utils/upload-session.d.ts +34 -0
- package/dist/utils/upload-session.js +69 -0
- package/dist/utils/urls.d.ts +2 -0
- package/dist/utils/urls.js +7 -0
- package/dist/utils/version-path.d.ts +6 -0
- package/dist/utils/version-path.js +51 -0
- package/dist/utils/wpcom-auth-redirects.d.ts +14 -0
- package/dist/utils/wpcom-auth-redirects.js +49 -0
- package/dist/utils/zero-realtime-signature.d.ts +12 -0
- package/dist/utils/zero-realtime-signature.js +45 -0
- package/dist/vocabulary.d.ts +230 -0
- package/dist/vocabulary.js +218 -0
- package/package.json +58 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const superadminActivityListQuerySchema: z.ZodObject<{
|
|
3
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const SuperadminLatestUserSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
email: z.ZodString;
|
|
9
|
+
role: z.ZodNullable<z.ZodString>;
|
|
10
|
+
banned: z.ZodBoolean;
|
|
11
|
+
isAutomattician: z.ZodBoolean;
|
|
12
|
+
wpcom: z.ZodBoolean;
|
|
13
|
+
betaEnrolledAt: z.ZodNullable<z.ZodString>;
|
|
14
|
+
createdAt: z.ZodString;
|
|
15
|
+
updatedAt: z.ZodString;
|
|
16
|
+
teamCount: z.ZodNumber;
|
|
17
|
+
latestSessionAt: z.ZodNullable<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const SuperadminLatestUserListSchema: z.ZodObject<{
|
|
20
|
+
users: z.ZodArray<z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
email: z.ZodString;
|
|
24
|
+
role: z.ZodNullable<z.ZodString>;
|
|
25
|
+
banned: z.ZodBoolean;
|
|
26
|
+
isAutomattician: z.ZodBoolean;
|
|
27
|
+
wpcom: z.ZodBoolean;
|
|
28
|
+
betaEnrolledAt: z.ZodNullable<z.ZodString>;
|
|
29
|
+
createdAt: z.ZodString;
|
|
30
|
+
updatedAt: z.ZodString;
|
|
31
|
+
teamCount: z.ZodNumber;
|
|
32
|
+
latestSessionAt: z.ZodNullable<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export declare const SuperadminLatestSpaceSchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
title: z.ZodString;
|
|
38
|
+
slug: z.ZodString;
|
|
39
|
+
status: z.ZodString;
|
|
40
|
+
tenantId: z.ZodString;
|
|
41
|
+
tenantName: z.ZodNullable<z.ZodString>;
|
|
42
|
+
teamId: z.ZodNullable<z.ZodString>;
|
|
43
|
+
teamSlug: z.ZodNullable<z.ZodString>;
|
|
44
|
+
teamName: z.ZodNullable<z.ZodString>;
|
|
45
|
+
externalCustomerId: z.ZodNullable<z.ZodString>;
|
|
46
|
+
placementMode: z.ZodString;
|
|
47
|
+
siteId: z.ZodNullable<z.ZodString>;
|
|
48
|
+
siteClass: z.ZodNullable<z.ZodString>;
|
|
49
|
+
siteStatus: z.ZodNullable<z.ZodString>;
|
|
50
|
+
liveHostname: z.ZodNullable<z.ZodString>;
|
|
51
|
+
disabledAt: z.ZodNullable<z.ZodString>;
|
|
52
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
53
|
+
createdAt: z.ZodString;
|
|
54
|
+
updatedAt: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export declare const SuperadminLatestSpaceListSchema: z.ZodObject<{
|
|
57
|
+
spaces: z.ZodArray<z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
title: z.ZodString;
|
|
60
|
+
slug: z.ZodString;
|
|
61
|
+
status: z.ZodString;
|
|
62
|
+
tenantId: z.ZodString;
|
|
63
|
+
tenantName: z.ZodNullable<z.ZodString>;
|
|
64
|
+
teamId: z.ZodNullable<z.ZodString>;
|
|
65
|
+
teamSlug: z.ZodNullable<z.ZodString>;
|
|
66
|
+
teamName: z.ZodNullable<z.ZodString>;
|
|
67
|
+
externalCustomerId: z.ZodNullable<z.ZodString>;
|
|
68
|
+
placementMode: z.ZodString;
|
|
69
|
+
siteId: z.ZodNullable<z.ZodString>;
|
|
70
|
+
siteClass: z.ZodNullable<z.ZodString>;
|
|
71
|
+
siteStatus: z.ZodNullable<z.ZodString>;
|
|
72
|
+
liveHostname: z.ZodNullable<z.ZodString>;
|
|
73
|
+
disabledAt: z.ZodNullable<z.ZodString>;
|
|
74
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
75
|
+
createdAt: z.ZodString;
|
|
76
|
+
updatedAt: z.ZodString;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export declare const SuperadminLatestVersionSchema: z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
number: z.ZodNullable<z.ZodNumber>;
|
|
82
|
+
spaceId: z.ZodString;
|
|
83
|
+
spaceTitle: z.ZodNullable<z.ZodString>;
|
|
84
|
+
spaceSlug: z.ZodNullable<z.ZodString>;
|
|
85
|
+
teamSlug: z.ZodNullable<z.ZodString>;
|
|
86
|
+
teamName: z.ZodNullable<z.ZodString>;
|
|
87
|
+
status: z.ZodString;
|
|
88
|
+
failureCode: z.ZodNullable<z.ZodString>;
|
|
89
|
+
failureMessage: z.ZodNullable<z.ZodString>;
|
|
90
|
+
failedStage: z.ZodNullable<z.ZodString>;
|
|
91
|
+
fileCount: z.ZodNumber;
|
|
92
|
+
totalBytes: z.ZodNumber;
|
|
93
|
+
sourceKind: z.ZodNullable<z.ZodString>;
|
|
94
|
+
sourceClient: z.ZodNullable<z.ZodString>;
|
|
95
|
+
createdByActorType: z.ZodNullable<z.ZodString>;
|
|
96
|
+
createdByActorId: z.ZodNullable<z.ZodString>;
|
|
97
|
+
warningCount: z.ZodNumber;
|
|
98
|
+
errorCount: z.ZodNumber;
|
|
99
|
+
createdAt: z.ZodString;
|
|
100
|
+
updatedAt: z.ZodString;
|
|
101
|
+
readyAt: z.ZodNullable<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export declare const SuperadminLatestVersionListSchema: z.ZodObject<{
|
|
104
|
+
versions: z.ZodArray<z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
number: z.ZodNullable<z.ZodNumber>;
|
|
107
|
+
spaceId: z.ZodString;
|
|
108
|
+
spaceTitle: z.ZodNullable<z.ZodString>;
|
|
109
|
+
spaceSlug: z.ZodNullable<z.ZodString>;
|
|
110
|
+
teamSlug: z.ZodNullable<z.ZodString>;
|
|
111
|
+
teamName: z.ZodNullable<z.ZodString>;
|
|
112
|
+
status: z.ZodString;
|
|
113
|
+
failureCode: z.ZodNullable<z.ZodString>;
|
|
114
|
+
failureMessage: z.ZodNullable<z.ZodString>;
|
|
115
|
+
failedStage: z.ZodNullable<z.ZodString>;
|
|
116
|
+
fileCount: z.ZodNumber;
|
|
117
|
+
totalBytes: z.ZodNumber;
|
|
118
|
+
sourceKind: z.ZodNullable<z.ZodString>;
|
|
119
|
+
sourceClient: z.ZodNullable<z.ZodString>;
|
|
120
|
+
createdByActorType: z.ZodNullable<z.ZodString>;
|
|
121
|
+
createdByActorId: z.ZodNullable<z.ZodString>;
|
|
122
|
+
warningCount: z.ZodNumber;
|
|
123
|
+
errorCount: z.ZodNumber;
|
|
124
|
+
createdAt: z.ZodString;
|
|
125
|
+
updatedAt: z.ZodString;
|
|
126
|
+
readyAt: z.ZodNullable<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export declare const SuperadminBadExperienceSourceSchema: z.ZodEnum<{
|
|
130
|
+
version_failure: "version_failure";
|
|
131
|
+
version_diagnostic: "version_diagnostic";
|
|
132
|
+
webhook_delivery: "webhook_delivery";
|
|
133
|
+
abuse_report: "abuse_report";
|
|
134
|
+
safety_review: "safety_review";
|
|
135
|
+
}>;
|
|
136
|
+
export declare const SuperadminBadExperienceSeveritySchema: z.ZodEnum<{
|
|
137
|
+
hot: "hot";
|
|
138
|
+
info: "info";
|
|
139
|
+
warn: "warn";
|
|
140
|
+
}>;
|
|
141
|
+
export declare const SuperadminBadExperienceItemSchema: z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
source: z.ZodEnum<{
|
|
144
|
+
version_failure: "version_failure";
|
|
145
|
+
version_diagnostic: "version_diagnostic";
|
|
146
|
+
webhook_delivery: "webhook_delivery";
|
|
147
|
+
abuse_report: "abuse_report";
|
|
148
|
+
safety_review: "safety_review";
|
|
149
|
+
}>;
|
|
150
|
+
severity: z.ZodEnum<{
|
|
151
|
+
hot: "hot";
|
|
152
|
+
info: "info";
|
|
153
|
+
warn: "warn";
|
|
154
|
+
}>;
|
|
155
|
+
title: z.ZodString;
|
|
156
|
+
detail: z.ZodString;
|
|
157
|
+
code: z.ZodNullable<z.ZodString>;
|
|
158
|
+
status: z.ZodNullable<z.ZodString>;
|
|
159
|
+
tenantId: z.ZodNullable<z.ZodString>;
|
|
160
|
+
spaceId: z.ZodNullable<z.ZodString>;
|
|
161
|
+
resourceType: z.ZodString;
|
|
162
|
+
resourceId: z.ZodString;
|
|
163
|
+
occurredAt: z.ZodString;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export declare const SuperadminBadExperienceListSchema: z.ZodObject<{
|
|
166
|
+
items: z.ZodArray<z.ZodObject<{
|
|
167
|
+
id: z.ZodString;
|
|
168
|
+
source: z.ZodEnum<{
|
|
169
|
+
version_failure: "version_failure";
|
|
170
|
+
version_diagnostic: "version_diagnostic";
|
|
171
|
+
webhook_delivery: "webhook_delivery";
|
|
172
|
+
abuse_report: "abuse_report";
|
|
173
|
+
safety_review: "safety_review";
|
|
174
|
+
}>;
|
|
175
|
+
severity: z.ZodEnum<{
|
|
176
|
+
hot: "hot";
|
|
177
|
+
info: "info";
|
|
178
|
+
warn: "warn";
|
|
179
|
+
}>;
|
|
180
|
+
title: z.ZodString;
|
|
181
|
+
detail: z.ZodString;
|
|
182
|
+
code: z.ZodNullable<z.ZodString>;
|
|
183
|
+
status: z.ZodNullable<z.ZodString>;
|
|
184
|
+
tenantId: z.ZodNullable<z.ZodString>;
|
|
185
|
+
spaceId: z.ZodNullable<z.ZodString>;
|
|
186
|
+
resourceType: z.ZodString;
|
|
187
|
+
resourceId: z.ZodString;
|
|
188
|
+
occurredAt: z.ZodString;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
summary: z.ZodObject<{
|
|
191
|
+
hot: z.ZodNumber;
|
|
192
|
+
warn: z.ZodNumber;
|
|
193
|
+
info: z.ZodNumber;
|
|
194
|
+
versionFailures: z.ZodNumber;
|
|
195
|
+
diagnostics: z.ZodNumber;
|
|
196
|
+
webhooks: z.ZodNumber;
|
|
197
|
+
abuseReports: z.ZodNumber;
|
|
198
|
+
safetyReviews: z.ZodNumber;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
export type SuperadminLatestUser = z.infer<typeof SuperadminLatestUserSchema>;
|
|
202
|
+
export type SuperadminLatestSpace = z.infer<typeof SuperadminLatestSpaceSchema>;
|
|
203
|
+
export type SuperadminLatestVersion = z.infer<typeof SuperadminLatestVersionSchema>;
|
|
204
|
+
export type SuperadminBadExperienceItem = z.infer<typeof SuperadminBadExperienceItemSchema>;
|
|
205
|
+
export type SuperadminBadExperienceList = z.infer<typeof SuperadminBadExperienceListSchema>;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const superadminActivityListQuerySchema = z.object({
|
|
3
|
+
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
4
|
+
});
|
|
5
|
+
export const SuperadminLatestUserSchema = z.object({
|
|
6
|
+
id: z.string(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
email: z.string().email(),
|
|
9
|
+
role: z.string().nullable(),
|
|
10
|
+
banned: z.boolean(),
|
|
11
|
+
isAutomattician: z.boolean(),
|
|
12
|
+
wpcom: z.boolean(),
|
|
13
|
+
betaEnrolledAt: z.string().datetime().nullable(),
|
|
14
|
+
createdAt: z.string().datetime(),
|
|
15
|
+
updatedAt: z.string().datetime(),
|
|
16
|
+
teamCount: z.number().int().nonnegative(),
|
|
17
|
+
latestSessionAt: z.string().datetime().nullable(),
|
|
18
|
+
});
|
|
19
|
+
export const SuperadminLatestUserListSchema = z.object({
|
|
20
|
+
users: z.array(SuperadminLatestUserSchema),
|
|
21
|
+
});
|
|
22
|
+
export const SuperadminLatestSpaceSchema = z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
title: z.string(),
|
|
25
|
+
slug: z.string(),
|
|
26
|
+
status: z.string(),
|
|
27
|
+
tenantId: z.string(),
|
|
28
|
+
tenantName: z.string().nullable(),
|
|
29
|
+
teamId: z.string().nullable(),
|
|
30
|
+
teamSlug: z.string().nullable(),
|
|
31
|
+
teamName: z.string().nullable(),
|
|
32
|
+
externalCustomerId: z.string().nullable(),
|
|
33
|
+
placementMode: z.string(),
|
|
34
|
+
siteId: z.string().nullable(),
|
|
35
|
+
siteClass: z.string().nullable(),
|
|
36
|
+
siteStatus: z.string().nullable(),
|
|
37
|
+
liveHostname: z.string().nullable(),
|
|
38
|
+
disabledAt: z.string().datetime().nullable(),
|
|
39
|
+
deletedAt: z.string().datetime().nullable(),
|
|
40
|
+
createdAt: z.string().datetime(),
|
|
41
|
+
updatedAt: z.string().datetime(),
|
|
42
|
+
});
|
|
43
|
+
export const SuperadminLatestSpaceListSchema = z.object({
|
|
44
|
+
spaces: z.array(SuperadminLatestSpaceSchema),
|
|
45
|
+
});
|
|
46
|
+
export const SuperadminLatestVersionSchema = z.object({
|
|
47
|
+
id: z.string(),
|
|
48
|
+
number: z.number().int().nullable(),
|
|
49
|
+
spaceId: z.string(),
|
|
50
|
+
spaceTitle: z.string().nullable(),
|
|
51
|
+
spaceSlug: z.string().nullable(),
|
|
52
|
+
teamSlug: z.string().nullable(),
|
|
53
|
+
teamName: z.string().nullable(),
|
|
54
|
+
status: z.string(),
|
|
55
|
+
failureCode: z.string().nullable(),
|
|
56
|
+
failureMessage: z.string().nullable(),
|
|
57
|
+
failedStage: z.string().nullable(),
|
|
58
|
+
fileCount: z.number().int().nonnegative(),
|
|
59
|
+
totalBytes: z.number().nonnegative(),
|
|
60
|
+
sourceKind: z.string().nullable(),
|
|
61
|
+
sourceClient: z.string().nullable(),
|
|
62
|
+
createdByActorType: z.string().nullable(),
|
|
63
|
+
createdByActorId: z.string().nullable(),
|
|
64
|
+
warningCount: z.number().int().nonnegative(),
|
|
65
|
+
errorCount: z.number().int().nonnegative(),
|
|
66
|
+
createdAt: z.string().datetime(),
|
|
67
|
+
updatedAt: z.string().datetime(),
|
|
68
|
+
readyAt: z.string().datetime().nullable(),
|
|
69
|
+
});
|
|
70
|
+
export const SuperadminLatestVersionListSchema = z.object({
|
|
71
|
+
versions: z.array(SuperadminLatestVersionSchema),
|
|
72
|
+
});
|
|
73
|
+
export const SuperadminBadExperienceSourceSchema = z.enum([
|
|
74
|
+
"version_failure",
|
|
75
|
+
"version_diagnostic",
|
|
76
|
+
"webhook_delivery",
|
|
77
|
+
"abuse_report",
|
|
78
|
+
"safety_review",
|
|
79
|
+
]);
|
|
80
|
+
export const SuperadminBadExperienceSeveritySchema = z.enum(["hot", "warn", "info"]);
|
|
81
|
+
export const SuperadminBadExperienceItemSchema = z.object({
|
|
82
|
+
id: z.string(),
|
|
83
|
+
source: SuperadminBadExperienceSourceSchema,
|
|
84
|
+
severity: SuperadminBadExperienceSeveritySchema,
|
|
85
|
+
title: z.string(),
|
|
86
|
+
detail: z.string(),
|
|
87
|
+
code: z.string().nullable(),
|
|
88
|
+
status: z.string().nullable(),
|
|
89
|
+
tenantId: z.string().nullable(),
|
|
90
|
+
spaceId: z.string().nullable(),
|
|
91
|
+
resourceType: z.string(),
|
|
92
|
+
resourceId: z.string(),
|
|
93
|
+
occurredAt: z.string().datetime(),
|
|
94
|
+
});
|
|
95
|
+
export const SuperadminBadExperienceListSchema = z.object({
|
|
96
|
+
items: z.array(SuperadminBadExperienceItemSchema),
|
|
97
|
+
summary: z.object({
|
|
98
|
+
hot: z.number().int().nonnegative(),
|
|
99
|
+
warn: z.number().int().nonnegative(),
|
|
100
|
+
info: z.number().int().nonnegative(),
|
|
101
|
+
versionFailures: z.number().int().nonnegative(),
|
|
102
|
+
diagnostics: z.number().int().nonnegative(),
|
|
103
|
+
webhooks: z.number().int().nonnegative(),
|
|
104
|
+
abuseReports: z.number().int().nonnegative(),
|
|
105
|
+
safetyReviews: z.number().int().nonnegative(),
|
|
106
|
+
}),
|
|
107
|
+
});
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const superadminEmailStatusValues: readonly ["all", "scheduled", "sent", "delivered", "bounced", "dropped", "complained", "opened", "clicked", "failed"];
|
|
3
|
+
export declare const superadminEmailCategoryValues: readonly ["transactional", "announcements", "offers", "system"];
|
|
4
|
+
export declare const superadminEmailListQuerySchema: z.ZodObject<{
|
|
5
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
6
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
7
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
8
|
+
failed: "failed";
|
|
9
|
+
all: "all";
|
|
10
|
+
delivered: "delivered";
|
|
11
|
+
scheduled: "scheduled";
|
|
12
|
+
sent: "sent";
|
|
13
|
+
bounced: "bounced";
|
|
14
|
+
dropped: "dropped";
|
|
15
|
+
complained: "complained";
|
|
16
|
+
opened: "opened";
|
|
17
|
+
clicked: "clicked";
|
|
18
|
+
}>>;
|
|
19
|
+
search: z.ZodOptional<z.ZodString>;
|
|
20
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
template: z.ZodOptional<z.ZodString>;
|
|
22
|
+
category: z.ZodDefault<z.ZodEnum<{
|
|
23
|
+
system: "system";
|
|
24
|
+
all: "all";
|
|
25
|
+
transactional: "transactional";
|
|
26
|
+
announcements: "announcements";
|
|
27
|
+
offers: "offers";
|
|
28
|
+
}>>;
|
|
29
|
+
timeRange: z.ZodDefault<z.ZodEnum<{
|
|
30
|
+
all: "all";
|
|
31
|
+
"7d": "7d";
|
|
32
|
+
"30d": "30d";
|
|
33
|
+
now: "now";
|
|
34
|
+
"1h": "1h";
|
|
35
|
+
"24h": "24h";
|
|
36
|
+
}>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export declare const superadminEmailSendSchema: z.ZodObject<{
|
|
39
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
40
|
+
subject: z.ZodString;
|
|
41
|
+
text: z.ZodString;
|
|
42
|
+
html: z.ZodOptional<z.ZodString>;
|
|
43
|
+
template: z.ZodDefault<z.ZodString>;
|
|
44
|
+
category: z.ZodDefault<z.ZodEnum<{
|
|
45
|
+
system: "system";
|
|
46
|
+
transactional: "transactional";
|
|
47
|
+
announcements: "announcements";
|
|
48
|
+
offers: "offers";
|
|
49
|
+
}>>;
|
|
50
|
+
type: z.ZodDefault<z.ZodString>;
|
|
51
|
+
props: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
52
|
+
sendAt: z.ZodOptional<z.ZodString>;
|
|
53
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export declare const SuperadminEmailMetadataSchema: z.ZodObject<{
|
|
56
|
+
providerMessageId: z.ZodOptional<z.ZodString>;
|
|
57
|
+
bounceType: z.ZodOptional<z.ZodString>;
|
|
58
|
+
bounceReason: z.ZodOptional<z.ZodString>;
|
|
59
|
+
smtpStatus: z.ZodOptional<z.ZodString>;
|
|
60
|
+
deferredReason: z.ZodOptional<z.ZodString>;
|
|
61
|
+
deferredAttempts: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
dropReason: z.ZodOptional<z.ZodString>;
|
|
63
|
+
unsubscribeGroupId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
64
|
+
sendError: z.ZodOptional<z.ZodString>;
|
|
65
|
+
linkClicks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
|
+
url: z.ZodString;
|
|
67
|
+
clickedAt: z.ZodString;
|
|
68
|
+
}, z.core.$strip>>>;
|
|
69
|
+
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
|
+
type: z.ZodString;
|
|
71
|
+
receivedAt: z.ZodString;
|
|
72
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
73
|
+
}, z.core.$strip>>>;
|
|
74
|
+
}, z.core.$loose>;
|
|
75
|
+
export declare const SuperadminEmailSchema: z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
idempotencyKey: z.ZodString;
|
|
78
|
+
provider: z.ZodString;
|
|
79
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
80
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
email: z.ZodString;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
to: z.ZodString;
|
|
86
|
+
from: z.ZodString;
|
|
87
|
+
subject: z.ZodString;
|
|
88
|
+
text: z.ZodString;
|
|
89
|
+
html: z.ZodNullable<z.ZodString>;
|
|
90
|
+
type: z.ZodString;
|
|
91
|
+
template: z.ZodString;
|
|
92
|
+
category: z.ZodString;
|
|
93
|
+
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
94
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
95
|
+
metadata: z.ZodNullable<z.ZodObject<{
|
|
96
|
+
providerMessageId: z.ZodOptional<z.ZodString>;
|
|
97
|
+
bounceType: z.ZodOptional<z.ZodString>;
|
|
98
|
+
bounceReason: z.ZodOptional<z.ZodString>;
|
|
99
|
+
smtpStatus: z.ZodOptional<z.ZodString>;
|
|
100
|
+
deferredReason: z.ZodOptional<z.ZodString>;
|
|
101
|
+
deferredAttempts: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
dropReason: z.ZodOptional<z.ZodString>;
|
|
103
|
+
unsubscribeGroupId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
104
|
+
sendError: z.ZodOptional<z.ZodString>;
|
|
105
|
+
linkClicks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
106
|
+
url: z.ZodString;
|
|
107
|
+
clickedAt: z.ZodString;
|
|
108
|
+
}, z.core.$strip>>>;
|
|
109
|
+
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
110
|
+
type: z.ZodString;
|
|
111
|
+
receivedAt: z.ZodString;
|
|
112
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
114
|
+
}, z.core.$loose>>;
|
|
115
|
+
sendAt: z.ZodNullable<z.ZodString>;
|
|
116
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
117
|
+
deliveredAt: z.ZodNullable<z.ZodString>;
|
|
118
|
+
bouncedAt: z.ZodNullable<z.ZodString>;
|
|
119
|
+
complainedAt: z.ZodNullable<z.ZodString>;
|
|
120
|
+
droppedAt: z.ZodNullable<z.ZodString>;
|
|
121
|
+
firstClickedAt: z.ZodNullable<z.ZodString>;
|
|
122
|
+
openedAt: z.ZodNullable<z.ZodString>;
|
|
123
|
+
fakeOpenedAt: z.ZodNullable<z.ZodString>;
|
|
124
|
+
combinedOpenedAt: z.ZodNullable<z.ZodString>;
|
|
125
|
+
unsubscribedAt: z.ZodNullable<z.ZodString>;
|
|
126
|
+
failedAt: z.ZodNullable<z.ZodString>;
|
|
127
|
+
createdAt: z.ZodString;
|
|
128
|
+
updatedAt: z.ZodString;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export declare const SuperadminEmailListSchema: z.ZodObject<{
|
|
131
|
+
emails: z.ZodArray<z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
idempotencyKey: z.ZodString;
|
|
134
|
+
provider: z.ZodString;
|
|
135
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
136
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
137
|
+
id: z.ZodString;
|
|
138
|
+
name: z.ZodString;
|
|
139
|
+
email: z.ZodString;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
to: z.ZodString;
|
|
142
|
+
from: z.ZodString;
|
|
143
|
+
subject: z.ZodString;
|
|
144
|
+
text: z.ZodString;
|
|
145
|
+
html: z.ZodNullable<z.ZodString>;
|
|
146
|
+
type: z.ZodString;
|
|
147
|
+
template: z.ZodString;
|
|
148
|
+
category: z.ZodString;
|
|
149
|
+
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
150
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
151
|
+
metadata: z.ZodNullable<z.ZodObject<{
|
|
152
|
+
providerMessageId: z.ZodOptional<z.ZodString>;
|
|
153
|
+
bounceType: z.ZodOptional<z.ZodString>;
|
|
154
|
+
bounceReason: z.ZodOptional<z.ZodString>;
|
|
155
|
+
smtpStatus: z.ZodOptional<z.ZodString>;
|
|
156
|
+
deferredReason: z.ZodOptional<z.ZodString>;
|
|
157
|
+
deferredAttempts: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
dropReason: z.ZodOptional<z.ZodString>;
|
|
159
|
+
unsubscribeGroupId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
160
|
+
sendError: z.ZodOptional<z.ZodString>;
|
|
161
|
+
linkClicks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
162
|
+
url: z.ZodString;
|
|
163
|
+
clickedAt: z.ZodString;
|
|
164
|
+
}, z.core.$strip>>>;
|
|
165
|
+
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
166
|
+
type: z.ZodString;
|
|
167
|
+
receivedAt: z.ZodString;
|
|
168
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
169
|
+
}, z.core.$strip>>>;
|
|
170
|
+
}, z.core.$loose>>;
|
|
171
|
+
sendAt: z.ZodNullable<z.ZodString>;
|
|
172
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
173
|
+
deliveredAt: z.ZodNullable<z.ZodString>;
|
|
174
|
+
bouncedAt: z.ZodNullable<z.ZodString>;
|
|
175
|
+
complainedAt: z.ZodNullable<z.ZodString>;
|
|
176
|
+
droppedAt: z.ZodNullable<z.ZodString>;
|
|
177
|
+
firstClickedAt: z.ZodNullable<z.ZodString>;
|
|
178
|
+
openedAt: z.ZodNullable<z.ZodString>;
|
|
179
|
+
fakeOpenedAt: z.ZodNullable<z.ZodString>;
|
|
180
|
+
combinedOpenedAt: z.ZodNullable<z.ZodString>;
|
|
181
|
+
unsubscribedAt: z.ZodNullable<z.ZodString>;
|
|
182
|
+
failedAt: z.ZodNullable<z.ZodString>;
|
|
183
|
+
createdAt: z.ZodString;
|
|
184
|
+
updatedAt: z.ZodString;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
total: z.ZodNumber;
|
|
187
|
+
limit: z.ZodNumber;
|
|
188
|
+
offset: z.ZodNumber;
|
|
189
|
+
pagination: z.ZodObject<{
|
|
190
|
+
count: z.ZodNumber;
|
|
191
|
+
next: z.ZodNullable<z.ZodNumber>;
|
|
192
|
+
prev: z.ZodNullable<z.ZodNumber>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
export declare const SuperadminEmailSendResultSchema: z.ZodObject<{
|
|
196
|
+
emails: z.ZodArray<z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
199
|
+
email: z.ZodOptional<z.ZodString>;
|
|
200
|
+
status: z.ZodEnum<{
|
|
201
|
+
error: "error";
|
|
202
|
+
scheduled: "scheduled";
|
|
203
|
+
sent: "sent";
|
|
204
|
+
}>;
|
|
205
|
+
error: z.ZodOptional<z.ZodString>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export type SuperadminEmail = z.infer<typeof SuperadminEmailSchema>;
|
|
209
|
+
export type SuperadminEmailList = z.infer<typeof SuperadminEmailListSchema>;
|
|
210
|
+
export type SuperadminEmailListQuery = z.infer<typeof superadminEmailListQuerySchema>;
|
|
211
|
+
export type SuperadminEmailSend = z.infer<typeof superadminEmailSendSchema>;
|
|
212
|
+
export type SuperadminEmailSendResult = z.infer<typeof SuperadminEmailSendResultSchema>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makeOffsetListSchema } from "./common.js";
|
|
3
|
+
import { superadminPaginationSchema } from "./superadmin.js";
|
|
4
|
+
export const superadminEmailStatusValues = [
|
|
5
|
+
"all",
|
|
6
|
+
"scheduled",
|
|
7
|
+
"sent",
|
|
8
|
+
"delivered",
|
|
9
|
+
"bounced",
|
|
10
|
+
"dropped",
|
|
11
|
+
"complained",
|
|
12
|
+
"opened",
|
|
13
|
+
"clicked",
|
|
14
|
+
"failed",
|
|
15
|
+
];
|
|
16
|
+
export const superadminEmailCategoryValues = [
|
|
17
|
+
"transactional",
|
|
18
|
+
"announcements",
|
|
19
|
+
"offers",
|
|
20
|
+
"system",
|
|
21
|
+
];
|
|
22
|
+
export const superadminEmailListQuerySchema = z.object({
|
|
23
|
+
limit: z.coerce.number().int().min(1).max(100).default(25),
|
|
24
|
+
offset: z.coerce.number().int().min(0).default(0),
|
|
25
|
+
status: z.enum(superadminEmailStatusValues).default("all"),
|
|
26
|
+
search: z.string().trim().optional(),
|
|
27
|
+
userId: z.string().trim().optional(),
|
|
28
|
+
template: z.string().trim().optional(),
|
|
29
|
+
category: z.enum(["all", ...superadminEmailCategoryValues]).default("all"),
|
|
30
|
+
timeRange: z.enum(["now", "1h", "24h", "7d", "30d", "all"]).default("all"),
|
|
31
|
+
});
|
|
32
|
+
export const superadminEmailSendSchema = z.object({
|
|
33
|
+
recipients: z.array(z.string().trim().min(1)).min(1).max(100),
|
|
34
|
+
subject: z.string().trim().min(1).max(998),
|
|
35
|
+
text: z.string().min(1),
|
|
36
|
+
html: z.string().optional(),
|
|
37
|
+
template: z.string().trim().min(1).default("generic-message"),
|
|
38
|
+
category: z.enum(superadminEmailCategoryValues).default("transactional"),
|
|
39
|
+
type: z.string().trim().min(1).default("generic-message"),
|
|
40
|
+
props: z.record(z.string(), z.unknown()).default({}),
|
|
41
|
+
sendAt: z.string().datetime().optional(),
|
|
42
|
+
jobId: z.string().trim().min(1).optional(),
|
|
43
|
+
});
|
|
44
|
+
export const SuperadminEmailMetadataSchema = z
|
|
45
|
+
.object({
|
|
46
|
+
providerMessageId: z.string().optional(),
|
|
47
|
+
bounceType: z.string().optional(),
|
|
48
|
+
bounceReason: z.string().optional(),
|
|
49
|
+
smtpStatus: z.string().optional(),
|
|
50
|
+
deferredReason: z.string().optional(),
|
|
51
|
+
deferredAttempts: z.number().optional(),
|
|
52
|
+
dropReason: z.string().optional(),
|
|
53
|
+
unsubscribeGroupId: z.number().nullable().optional(),
|
|
54
|
+
sendError: z.string().optional(),
|
|
55
|
+
linkClicks: z.array(z.object({ url: z.string(), clickedAt: z.string() })).optional(),
|
|
56
|
+
events: z
|
|
57
|
+
.array(z.object({
|
|
58
|
+
type: z.string(),
|
|
59
|
+
receivedAt: z.string(),
|
|
60
|
+
payload: z.record(z.string(), z.unknown()).optional(),
|
|
61
|
+
}))
|
|
62
|
+
.optional(),
|
|
63
|
+
})
|
|
64
|
+
.passthrough();
|
|
65
|
+
export const SuperadminEmailSchema = z.object({
|
|
66
|
+
id: z.string(),
|
|
67
|
+
idempotencyKey: z.string(),
|
|
68
|
+
provider: z.string(),
|
|
69
|
+
userId: z.string().nullable(),
|
|
70
|
+
user: z
|
|
71
|
+
.object({
|
|
72
|
+
id: z.string(),
|
|
73
|
+
name: z.string(),
|
|
74
|
+
email: z.string().email(),
|
|
75
|
+
})
|
|
76
|
+
.nullable(),
|
|
77
|
+
to: z.string().email(),
|
|
78
|
+
from: z.string().email(),
|
|
79
|
+
subject: z.string(),
|
|
80
|
+
text: z.string(),
|
|
81
|
+
html: z.string().nullable(),
|
|
82
|
+
type: z.string(),
|
|
83
|
+
template: z.string(),
|
|
84
|
+
category: z.string(),
|
|
85
|
+
props: z.record(z.string(), z.unknown()),
|
|
86
|
+
options: z.record(z.string(), z.unknown()),
|
|
87
|
+
metadata: SuperadminEmailMetadataSchema.nullable(),
|
|
88
|
+
sendAt: z.string().datetime().nullable(),
|
|
89
|
+
sentAt: z.string().datetime().nullable(),
|
|
90
|
+
deliveredAt: z.string().datetime().nullable(),
|
|
91
|
+
bouncedAt: z.string().datetime().nullable(),
|
|
92
|
+
complainedAt: z.string().datetime().nullable(),
|
|
93
|
+
droppedAt: z.string().datetime().nullable(),
|
|
94
|
+
firstClickedAt: z.string().datetime().nullable(),
|
|
95
|
+
openedAt: z.string().datetime().nullable(),
|
|
96
|
+
fakeOpenedAt: z.string().datetime().nullable(),
|
|
97
|
+
combinedOpenedAt: z.string().datetime().nullable(),
|
|
98
|
+
unsubscribedAt: z.string().datetime().nullable(),
|
|
99
|
+
failedAt: z.string().datetime().nullable(),
|
|
100
|
+
createdAt: z.string().datetime(),
|
|
101
|
+
updatedAt: z.string().datetime(),
|
|
102
|
+
});
|
|
103
|
+
export const SuperadminEmailListSchema = makeOffsetListSchema("emails", SuperadminEmailSchema, superadminPaginationSchema);
|
|
104
|
+
export const SuperadminEmailSendResultSchema = z.object({
|
|
105
|
+
emails: z.array(z.object({
|
|
106
|
+
id: z.string(),
|
|
107
|
+
userId: z.string().nullable().optional(),
|
|
108
|
+
email: z.string().optional(),
|
|
109
|
+
status: z.enum(["sent", "scheduled", "error"]),
|
|
110
|
+
error: z.string().optional(),
|
|
111
|
+
})),
|
|
112
|
+
});
|