| 
									
										
										
										
											2022-10-22 11:51:07 -08:00
										 |  |  | import { BaseCRUDAPI } from "../base/base-clients"; | 
					
						
							|  |  |  | import { GroupEventNotifierCreate, GroupEventNotifierOut, GroupEventNotifierUpdate } from "~/lib/api/types/group"; | 
					
						
							| 
									
										
										
										
											2022-01-09 21:04:24 -09:00
										 |  |  | 
 | 
					
						
							|  |  |  | const prefix = "/api"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const routes = { | 
					
						
							|  |  |  |   eventNotifier: `${prefix}/groups/events/notifications`, | 
					
						
							|  |  |  |   eventNotifierId: (id: string | number) => `${prefix}/groups/events/notifications/${id}`, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-22 11:51:07 -08:00
										 |  |  | export class GroupEventNotifierApi extends BaseCRUDAPI< | 
					
						
							|  |  |  |   GroupEventNotifierCreate, | 
					
						
							|  |  |  |   GroupEventNotifierOut, | 
					
						
							|  |  |  |   GroupEventNotifierUpdate | 
					
						
							|  |  |  | > { | 
					
						
							| 
									
										
										
										
											2022-01-09 21:04:24 -09:00
										 |  |  |   baseRoute = routes.eventNotifier; | 
					
						
							|  |  |  |   itemRoute = routes.eventNotifierId; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   async test(itemId: string) { | 
					
						
							|  |  |  |     return await this.requests.post(`${this.baseRoute}/${itemId}/test`, {}); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |