@sociate/sociate-api-sdk
Version:
Javascript client for Sociate AI APIs
36 lines (35 loc) • 1.65 kB
TypeScript
import { HttpClient } from '../lib/core/http';
import { CreateProductRequest, DeleteProductRequest, DeleteProductResponse, UploadProductRequest, UploadProductResponse, GetAttributesParams, GetAttributesResponse } from '../types/products';
export declare class ProductsAPI {
private httpClient;
constructor(httpClient: HttpClient);
/**
* Create Products
* @description Create a list of products in the inventory
* @param products - The list of products to create
* @returns The response indicating the success of the operation
*/
create(products: CreateProductRequest): Promise<UploadProductResponse>;
/**
* Upload Products
* @description Upload products data via a form-data request
* @param product - The product data to upload
* @returns The response indicating the success of the operation
*/
upload(product: UploadProductRequest): Promise<UploadProductResponse>;
/**
* Delete Products
* @description Delete a list of products from the inventory
* @param products - The list of product IDs to delete
* @returns The response indicating the success of the operation
*/
delete(products: DeleteProductRequest): Promise<DeleteProductResponse>;
/**
* Fetches the attributes of a product based on the provided parameters.
*
* @param params - The parameters required to get the product attributes.
* @param params.id - The unique identifier of the product.
* @returns A promise that resolves to the attributes of the product.
*/
getAttributes(params: GetAttributesParams): Promise<GetAttributesResponse>;
}