Skip to content

Commit 4bea1d2

Browse files
authored
feat(tem): add missing rules (#1335)
1 parent 63772b2 commit 4bea1d2

File tree

3 files changed

+66
-5
lines changed

3 files changed

+66
-5
lines changed

packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,7 @@ export const marshalCreateEmailRequest = (
426426
request.cc !== undefined
427427
? request.cc.map(elt => marshalCreateEmailRequestAddress(elt, defaults))
428428
: undefined,
429-
from:
430-
request.from !== undefined
431-
? marshalCreateEmailRequestAddress(request.from, defaults)
432-
: undefined,
429+
from: marshalCreateEmailRequestAddress(request.from, defaults),
433430
html: request.html,
434431
project_id: request.projectId ?? defaults.defaultProjectId,
435432
send_before: request.sendBefore,

packages/clients/src/api/tem/v1alpha1/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export type CreateEmailRequest = {
347347
*/
348348
region?: Region
349349
/** Sender information. Must be from a checked domain declared in the Project. */
350-
from?: CreateEmailRequestAddress
350+
from: CreateEmailRequestAddress
351351
/** An array of the primary recipient's information. */
352352
to?: CreateEmailRequestAddress[]
353353
/** An array of the carbon copy recipient's information. */

packages/clients/src/api/tem/v1alpha1/validation-rules.gen.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,70 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
33

4+
export const CreateDomainRequest = {
5+
domainName: {
6+
maxLength: 255,
7+
minLength: 1,
8+
},
9+
}
10+
11+
export const CreateEmailRequest = {
12+
subject: {
13+
minLength: 6,
14+
},
15+
}
16+
17+
export const CreateEmailRequestAddress = {
18+
email: {
19+
minLength: 1,
20+
},
21+
}
22+
23+
export const CreateEmailRequestAttachment = {
24+
name: {
25+
minLength: 1,
26+
},
27+
type: {
28+
minLength: 1,
29+
},
30+
}
31+
32+
export const CreateEmailRequestHeader = {
33+
key: {
34+
minLength: 1,
35+
},
36+
value: {
37+
minLength: 1,
38+
},
39+
}
40+
41+
export const ListDomainsRequest = {
42+
page: {
43+
greaterThan: 0,
44+
},
45+
pageSize: {
46+
greaterThanOrEqual: 1,
47+
lessThanOrEqual: 1000,
48+
},
49+
}
50+
51+
export const ListEmailsRequest = {
52+
page: {
53+
greaterThan: 0,
54+
},
55+
pageSize: {
56+
greaterThanOrEqual: 1,
57+
lessThanOrEqual: 1000,
58+
},
59+
search: {
60+
maxLength: 100,
61+
minLength: 3,
62+
},
63+
subject: {
64+
minLength: 6,
65+
},
66+
}
67+
468
export const ListWebhookEventsRequest = {
569
page: {
670
greaterThan: 0,

0 commit comments

Comments
 (0)