60 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
/* generated using openapi-typescript-codegen -- do no edit */
 | 
						|
/* istanbul ignore file */
 | 
						|
/* tslint:disable */
 | 
						|
/* eslint-disable */
 | 
						|
import type { ProductCreateRequest } from '../models/ProductCreateRequest';
 | 
						|
import type { ProductCreateResponse } from '../models/ProductCreateResponse';
 | 
						|
import type { ProductGetResponse } from '../models/ProductGetResponse';
 | 
						|
import type { CancelablePromise } from '../core/CancelablePromise';
 | 
						|
import { OpenAPI } from '../core/OpenAPI';
 | 
						|
import { request as __request } from '../core/request';
 | 
						|
export class ProductService {
 | 
						|
    /**
 | 
						|
     * Create Product
 | 
						|
     * @returns ProductCreateResponse Successful Response
 | 
						|
     * @throws ApiError
 | 
						|
     */
 | 
						|
    public static createProductProductCreatePost({
 | 
						|
        requestBody,
 | 
						|
    }: {
 | 
						|
        requestBody: ProductCreateRequest,
 | 
						|
    }): CancelablePromise<ProductCreateResponse> {
 | 
						|
        return __request(OpenAPI, {
 | 
						|
            method: 'POST',
 | 
						|
            url: '/product/create',
 | 
						|
            body: requestBody,
 | 
						|
            mediaType: 'application/json',
 | 
						|
            errors: {
 | 
						|
                422: `Validation Error`,
 | 
						|
            },
 | 
						|
        });
 | 
						|
    }
 | 
						|
    /**
 | 
						|
     * Get Product
 | 
						|
     * @returns ProductGetResponse Successful Response
 | 
						|
     * @throws ApiError
 | 
						|
     */
 | 
						|
    public static getProductsByClientId({
 | 
						|
        clientId,
 | 
						|
        page,
 | 
						|
        itemsPerPage,
 | 
						|
    }: {
 | 
						|
        clientId: number,
 | 
						|
        page: number,
 | 
						|
        itemsPerPage: number,
 | 
						|
    }): CancelablePromise<ProductGetResponse> {
 | 
						|
        return __request(OpenAPI, {
 | 
						|
            method: 'GET',
 | 
						|
            url: '/product/get',
 | 
						|
            query: {
 | 
						|
                'client_id': clientId,
 | 
						|
                'page': page,
 | 
						|
                'items_per_page': itemsPerPage,
 | 
						|
            },
 | 
						|
            errors: {
 | 
						|
                422: `Validation Error`,
 | 
						|
            },
 | 
						|
        });
 | 
						|
    }
 | 
						|
}
 |