@@ -132,9 +132,6 @@ var _ = dsl.Service("mailing-list", func() {
132132 GrpsIOServiceUIDAttribute ()
133133 GrpsIOServiceBaseAttributes ()
134134
135- WritersAttribute ()
136- AuditorsAttribute ()
137-
138135 dsl .Required ("type" , "project_uid" , "version" )
139136 })
140137 dsl .Result (GrpsIOServiceWithReadonlyAttributes )
@@ -187,6 +184,72 @@ var _ = dsl.Service("mailing-list", func() {
187184 })
188185 })
189186
187+ dsl .Method ("get-grpsio-service-settings" , func () {
188+ dsl .Description ("Get GroupsIO service settings (writers and auditors)" )
189+ dsl .Security (JWTAuth )
190+ dsl .Payload (func () {
191+ BearerTokenAttribute ()
192+ VersionAttribute ()
193+ GrpsIOServiceUIDAttribute ()
194+ })
195+ dsl .Result (func () {
196+ dsl .Attribute ("service_settings" , GrpsIOServiceSettings )
197+ ETagAttribute ()
198+ dsl .Required ("service_settings" )
199+ })
200+ dsl .Error ("BadRequest" , BadRequestError , "Bad request" )
201+ dsl .Error ("NotFound" , NotFoundError , "Service settings not found" )
202+ dsl .Error ("InternalServerError" , InternalServerError , "Internal server error" )
203+ dsl .Error ("ServiceUnavailable" , ServiceUnavailableError , "Service unavailable" )
204+ dsl .HTTP (func () {
205+ dsl .GET ("/groupsio/services/{uid}/settings" )
206+ dsl .Param ("version:v" )
207+ dsl .Param ("uid" )
208+ dsl .Header ("bearer_token:Authorization" )
209+ dsl .Response (dsl .StatusOK , func () {
210+ dsl .Body ("service_settings" )
211+ dsl .Header ("etag:ETag" )
212+ })
213+ dsl .Response ("BadRequest" , dsl .StatusBadRequest )
214+ dsl .Response ("NotFound" , dsl .StatusNotFound )
215+ dsl .Response ("InternalServerError" , dsl .StatusInternalServerError )
216+ dsl .Response ("ServiceUnavailable" , dsl .StatusServiceUnavailable )
217+ })
218+ })
219+
220+ dsl .Method ("update-grpsio-service-settings" , func () {
221+ dsl .Description ("Update GroupsIO service settings (writers and auditors)" )
222+ dsl .Security (JWTAuth )
223+ dsl .Payload (func () {
224+ BearerTokenAttribute ()
225+ VersionAttribute ()
226+ IfMatchAttribute ()
227+ GrpsIOServiceUIDAttribute ()
228+ WritersAttribute ()
229+ AuditorsAttribute ()
230+ dsl .Required ("version" , "uid" )
231+ })
232+ dsl .Result (GrpsIOServiceSettings )
233+ dsl .Error ("BadRequest" , BadRequestError , "Bad request" )
234+ dsl .Error ("NotFound" , NotFoundError , "Service settings not found" )
235+ dsl .Error ("Conflict" , ConflictError , "Conflict - ETag mismatch" )
236+ dsl .Error ("InternalServerError" , InternalServerError , "Internal server error" )
237+ dsl .Error ("ServiceUnavailable" , ServiceUnavailableError , "Service unavailable" )
238+ dsl .HTTP (func () {
239+ dsl .PUT ("/groupsio/services/{uid}/settings" )
240+ dsl .Param ("version:v" )
241+ dsl .Param ("uid" )
242+ dsl .Header ("bearer_token:Authorization" )
243+ dsl .Header ("if_match:If-Match" )
244+ dsl .Response (dsl .StatusOK )
245+ dsl .Response ("BadRequest" , dsl .StatusBadRequest )
246+ dsl .Response ("NotFound" , dsl .StatusNotFound )
247+ dsl .Response ("Conflict" , dsl .StatusConflict )
248+ dsl .Response ("InternalServerError" , dsl .StatusInternalServerError )
249+ dsl .Response ("ServiceUnavailable" , dsl .StatusServiceUnavailable )
250+ })
251+ })
252+
190253 // Mailing List Management endpoints
191254 dsl .Method ("create-grpsio-mailing-list" , func () {
192255 dsl .Description ("Create GroupsIO mailing list/subgroup with comprehensive validation" )
@@ -197,6 +260,7 @@ var _ = dsl.Service("mailing-list", func() {
197260
198261 GrpsIOMailingListBaseAttributes ()
199262
263+ // Settings fields (writers and auditors) for initial mailing list setup
200264 WritersAttribute ()
201265 AuditorsAttribute ()
202266
@@ -267,9 +331,6 @@ var _ = dsl.Service("mailing-list", func() {
267331 GrpsIOMailingListUIDAttribute ()
268332 GrpsIOMailingListBaseAttributes ()
269333
270- WritersAttribute ()
271- AuditorsAttribute ()
272-
273334 dsl .Required ("group_name" , "public" , "type" , "description" , "title" , "service_uid" , "version" )
274335 })
275336 dsl .Result (GrpsIOMailingListWithReadonlyAttributes )
@@ -322,6 +383,72 @@ var _ = dsl.Service("mailing-list", func() {
322383 })
323384 })
324385
386+ dsl .Method ("get-grpsio-mailing-list-settings" , func () {
387+ dsl .Description ("Get GroupsIO mailing list settings (writers and auditors)" )
388+ dsl .Security (JWTAuth )
389+ dsl .Payload (func () {
390+ BearerTokenAttribute ()
391+ VersionAttribute ()
392+ GrpsIOMailingListUIDAttribute ()
393+ })
394+ dsl .Result (func () {
395+ dsl .Attribute ("mailing_list_settings" , GrpsIOMailingListSettings )
396+ ETagAttribute ()
397+ dsl .Required ("mailing_list_settings" )
398+ })
399+ dsl .Error ("BadRequest" , BadRequestError , "Bad request" )
400+ dsl .Error ("NotFound" , NotFoundError , "Mailing list settings not found" )
401+ dsl .Error ("InternalServerError" , InternalServerError , "Internal server error" )
402+ dsl .Error ("ServiceUnavailable" , ServiceUnavailableError , "Service unavailable" )
403+ dsl .HTTP (func () {
404+ dsl .GET ("/groupsio/mailing-lists/{uid}/settings" )
405+ dsl .Param ("version:v" )
406+ dsl .Param ("uid" )
407+ dsl .Header ("bearer_token:Authorization" )
408+ dsl .Response (dsl .StatusOK , func () {
409+ dsl .Body ("mailing_list_settings" )
410+ dsl .Header ("etag:ETag" )
411+ })
412+ dsl .Response ("BadRequest" , dsl .StatusBadRequest )
413+ dsl .Response ("NotFound" , dsl .StatusNotFound )
414+ dsl .Response ("InternalServerError" , dsl .StatusInternalServerError )
415+ dsl .Response ("ServiceUnavailable" , dsl .StatusServiceUnavailable )
416+ })
417+ })
418+
419+ dsl .Method ("update-grpsio-mailing-list-settings" , func () {
420+ dsl .Description ("Update GroupsIO mailing list settings (writers and auditors)" )
421+ dsl .Security (JWTAuth )
422+ dsl .Payload (func () {
423+ BearerTokenAttribute ()
424+ VersionAttribute ()
425+ IfMatchAttribute ()
426+ GrpsIOMailingListUIDAttribute ()
427+ WritersAttribute ()
428+ AuditorsAttribute ()
429+ dsl .Required ("version" , "uid" )
430+ })
431+ dsl .Result (GrpsIOMailingListSettings )
432+ dsl .Error ("BadRequest" , BadRequestError , "Bad request" )
433+ dsl .Error ("NotFound" , NotFoundError , "Mailing list settings not found" )
434+ dsl .Error ("Conflict" , ConflictError , "Conflict - ETag mismatch" )
435+ dsl .Error ("InternalServerError" , InternalServerError , "Internal server error" )
436+ dsl .Error ("ServiceUnavailable" , ServiceUnavailableError , "Service unavailable" )
437+ dsl .HTTP (func () {
438+ dsl .PUT ("/groupsio/mailing-lists/{uid}/settings" )
439+ dsl .Param ("version:v" )
440+ dsl .Param ("uid" )
441+ dsl .Header ("bearer_token:Authorization" )
442+ dsl .Header ("if_match:If-Match" )
443+ dsl .Response (dsl .StatusOK )
444+ dsl .Response ("BadRequest" , dsl .StatusBadRequest )
445+ dsl .Response ("NotFound" , dsl .StatusNotFound )
446+ dsl .Response ("Conflict" , dsl .StatusConflict )
447+ dsl .Response ("InternalServerError" , dsl .StatusInternalServerError )
448+ dsl .Response ("ServiceUnavailable" , dsl .StatusServiceUnavailable )
449+ })
450+ })
451+
325452 // Member management endpoints
326453 dsl .Method ("create-grpsio-mailing-list-member" , func () {
327454 dsl .Description ("Create a new member for a GroupsIO mailing list" )
0 commit comments