mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-04 03:03:18 -05:00 
			
		
		
		
	Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
		
			
				
	
	
		
			26 lines
		
	
	
		
			711 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			711 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { ValidatorsApi } from "./public/validators";
 | 
						|
import { ExploreApi } from "./public/explore";
 | 
						|
import { SharedApi } from "./public/shared";
 | 
						|
import type { ApiRequestInstance } from "~/lib/api/types/non-generated";
 | 
						|
 | 
						|
export class PublicApi {
 | 
						|
  public validators: ValidatorsApi;
 | 
						|
  public shared: SharedApi;
 | 
						|
 | 
						|
  constructor(requests: ApiRequestInstance) {
 | 
						|
    this.validators = new ValidatorsApi(requests);
 | 
						|
    this.shared = new SharedApi(requests);
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
export class PublicExploreApi extends PublicApi {
 | 
						|
  public explore: ExploreApi;
 | 
						|
 | 
						|
  constructor(requests: ApiRequestInstance, groupSlug: string) {
 | 
						|
    super(requests);
 | 
						|
    this.explore = new ExploreApi(requests, groupSlug);
 | 
						|
 | 
						|
    Object.freeze(this);
 | 
						|
  }
 | 
						|
}
 |