mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-15 06:43:23 +00:00
feat: e-mail templates (#1158)
* View definition added * Get templates and texts from the database. * Fill in texts in templates * Fill in texts in templates * Client API added * Weekly backup * Weekly backup * Daily backup * Weekly backup * Tests added * Corrections from merge branch * Fixes from pull request review
This commit is contained in:
@@ -1620,6 +1620,112 @@ service ManagementService {
|
||||
permission: "policy.delete"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetMailTemplate(google.protobuf.Empty) returns (MailTemplateView) {
|
||||
option (google.api.http) = {
|
||||
get: "/orgs/me/policies/mailtemplate"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.read"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetDefaultMailTemplate(google.protobuf.Empty) returns (MailTemplateView) {
|
||||
option (google.api.http) = {
|
||||
get: "/orgs/default/policies/mailtemplate"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.read"
|
||||
};
|
||||
}
|
||||
|
||||
rpc CreateMailTemplate(MailTemplateUpdate) returns (MailTemplate) {
|
||||
option (google.api.http) = {
|
||||
post: "/orgs/me/policies/mailtemplate"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.write"
|
||||
};
|
||||
}
|
||||
|
||||
rpc UpdateMailTemplate(MailTemplateUpdate) returns (MailTemplate) {
|
||||
option (google.api.http) = {
|
||||
put: "/orgs/me/policies/mailtemplate"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.write"
|
||||
};
|
||||
}
|
||||
|
||||
rpc RemoveMailTemplate(google.protobuf.Empty) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/orgs/me/policies/mailtemplate"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.delete"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
rpc GetMailTexts(google.protobuf.Empty) returns (MailTextsView) {
|
||||
option (google.api.http) = {
|
||||
get: "/orgs/me/policies/mailtexts"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.read"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetDefaultMailTexts(google.protobuf.Empty) returns (MailTextsView) {
|
||||
option (google.api.http) = {
|
||||
get: "/orgs/default/policies/mailtexts"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.read"
|
||||
};
|
||||
}
|
||||
|
||||
rpc CreateMailText(MailTextUpdate) returns (MailText) {
|
||||
option (google.api.http) = {
|
||||
post: "/orgs/me/policies/mailtext"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.write"
|
||||
};
|
||||
}
|
||||
|
||||
rpc UpdateMailText(MailTextUpdate) returns (MailText) {
|
||||
option (google.api.http) = {
|
||||
put: "/orgs/me/policies/mailtext"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.write"
|
||||
};
|
||||
}
|
||||
|
||||
rpc RemoveMailText(MailTextRemove) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/orgs/me/policies/mailtext/type/{mail_text_type}/language/{language}"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "policy.delete"
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
message ZitadelDocs {
|
||||
@@ -2437,6 +2543,7 @@ message ProjectRoleView {
|
||||
string key = 2;
|
||||
string display_name = 3;
|
||||
google.protobuf.Timestamp creation_date = 4;
|
||||
google.protobuf.Timestamp change_date = 5;
|
||||
string group = 6;
|
||||
uint64 sequence = 7;
|
||||
}
|
||||
@@ -3324,3 +3431,66 @@ message PasswordLockoutPolicyView {
|
||||
google.protobuf.Timestamp creation_date = 5;
|
||||
google.protobuf.Timestamp change_date = 6;
|
||||
}
|
||||
message MailTemplate {
|
||||
bytes template = 1;
|
||||
google.protobuf.Timestamp creation_date = 2;
|
||||
google.protobuf.Timestamp change_date = 3;
|
||||
}
|
||||
|
||||
message MailTemplateUpdate {
|
||||
bytes template = 1;
|
||||
}
|
||||
|
||||
message MailTemplateView {
|
||||
bool default = 1;
|
||||
bytes template = 2;
|
||||
google.protobuf.Timestamp creation_date = 3;
|
||||
google.protobuf.Timestamp change_date = 4;
|
||||
}
|
||||
|
||||
message MailText {
|
||||
string mail_text_type = 1;
|
||||
string language = 2;
|
||||
string title = 3;
|
||||
string pre_header = 4;
|
||||
string subject = 5;
|
||||
string greeting = 6;
|
||||
string text = 7;
|
||||
string button_text = 8;
|
||||
google.protobuf.Timestamp creation_date = 9;
|
||||
google.protobuf.Timestamp change_date = 10;
|
||||
}
|
||||
|
||||
message MailTextUpdate {
|
||||
string mail_text_type = 1;
|
||||
string language = 2;
|
||||
string title = 3;
|
||||
string pre_header = 4;
|
||||
string subject = 5;
|
||||
string greeting = 6;
|
||||
string text = 7;
|
||||
string button_text = 8;
|
||||
}
|
||||
|
||||
message MailTextRemove {
|
||||
string mail_text_type = 1;
|
||||
string language = 2;
|
||||
}
|
||||
|
||||
message MailTextsView{
|
||||
repeated MailTextView texts = 1;
|
||||
}
|
||||
|
||||
message MailTextView {
|
||||
bool default = 1;
|
||||
string mail_text_type = 2;
|
||||
string language = 3;
|
||||
string title = 4;
|
||||
string pre_header = 5;
|
||||
string subject = 6;
|
||||
string greeting = 7;
|
||||
string text = 8;
|
||||
string button_text = 9;
|
||||
google.protobuf.Timestamp creation_date = 10;
|
||||
google.protobuf.Timestamp change_date = 11;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user