mirror of
https://github.com/suitenumerique/messages.git
synced 2026-09-26 11:44:55 +02:00
✨(frontend) add a button and modal to create maildomains (#313)
* ✨(feat) create modal, serializer and add button * ✨(frontend) refetch on domain creation * 🚨(frontend) fix linter * ✅(backend) add domain creation test * ✨(frontend) add toaster for domain creation * 💬(frontend) add translation and fix small typo * ✨(front+back) add custom_attributes on domain creation * 💄(frontend) add style for create domain modal * 💬(frontend) add missing translations + add end of file line breaks * 🎨(frontend) move toaster to admin layout * 🦺(frontend) validate domain name in frontend * 💄(frontend) remove unused css * ✅(backend) add more tests * 🎨(backend) improve maildomain structure * 🎨(frontend) follow nitpicks
This commit is contained in:
@@ -2370,6 +2370,45 @@
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"operationId": "maildomains_create",
|
||||
"description": "ViewSet for listing MailDomains the user administers.\nProvides a top-level entry for mail domain administration.\nEndpoint: /maildomains/",
|
||||
"tags": [
|
||||
"maildomains"
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MailDomainAdminWriteRequest"
|
||||
}
|
||||
},
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MailDomainAdminWriteRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"cookieAuth": []
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MailDomainAdminWrite"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1.0/maildomains/{maildomain_pk}/mailboxes/": {
|
||||
@@ -4336,6 +4375,80 @@
|
||||
"updated_at"
|
||||
]
|
||||
},
|
||||
"MailDomainAdminWrite": {
|
||||
"type": "object",
|
||||
"description": "Serialize mail domains for creating / editing admin view.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"readOnly": true,
|
||||
"description": "primary key for the record as UUID"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9][a-z0-9.-]*[a-z0-9]$",
|
||||
"maxLength": 253
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"readOnly": true,
|
||||
"title": "Created on",
|
||||
"description": "date and time at which a record was created"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"readOnly": true,
|
||||
"title": "Updated on",
|
||||
"description": "date and time at which a record was last updated"
|
||||
},
|
||||
"oidc_autojoin": {
|
||||
"type": "boolean",
|
||||
"description": "Create mailboxes automatically based on OIDC emails."
|
||||
},
|
||||
"identity_sync": {
|
||||
"type": "boolean",
|
||||
"description": "Sync mailboxes to an identity provider."
|
||||
},
|
||||
"custom_attributes": {
|
||||
"description": "Metadata to sync to the maildomain group in the identity provider."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"created_at",
|
||||
"id",
|
||||
"name",
|
||||
"updated_at"
|
||||
]
|
||||
},
|
||||
"MailDomainAdminWriteRequest": {
|
||||
"type": "object",
|
||||
"description": "Serialize mail domains for creating / editing admin view.",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^[a-z0-9][a-z0-9.-]*[a-z0-9]$",
|
||||
"maxLength": 253
|
||||
},
|
||||
"oidc_autojoin": {
|
||||
"type": "boolean",
|
||||
"description": "Create mailboxes automatically based on OIDC emails."
|
||||
},
|
||||
"identity_sync": {
|
||||
"type": "boolean",
|
||||
"description": "Sync mailboxes to an identity provider."
|
||||
},
|
||||
"custom_attributes": {
|
||||
"description": "Metadata to sync to the maildomain group in the identity provider."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"Mailbox": {
|
||||
"type": "object",
|
||||
"description": "Serialize mailboxes.",
|
||||
|
||||
Reference in New Issue
Block a user