UNPKG

@phasesdk/api-client-for-economic

Version:

e-conomic REST API Library for Node.js is a powerful tool designed to simplify integration with the e-conomic platform for developers building Node.js applications. With this library, developers can effortlessly leverage the full functionality of the e-co

70 lines (69 loc) 2.37 kB
import OpenApi from "../../OpenApi"; import { AuthToken } from "../../../types/Economic.type"; import { HttpResponse } from "../../../types/Http.type"; export type ProductGroup = { id: number; name: string; domesticAccountId: number; objectVersion: string | null; }; export type AllProductGroups = { items: ProductGroup[]; }; export default class ProductGroups extends OpenApi { private version; getVersion(): string; setVersion(version: string): this; getUrlSegment(): string; constructor(authToken: AuthToken); /** * * @see https://apis.e-conomic.com/#Products..tag/ProductGroups/operation/GetNumberOfProductGroups * @param {number} cursorValue * @returns {Promise<HttpResponse>} */ count(): Promise<HttpResponse>; /** * Get all product groups * * @see https://apis.e-conomic.com/#Products..tag/ProductGroups/operation/GetAllProductGroups * @param {number} cursorValue * @returns {Promise<HttpResponse<AllProductGroups>>} */ getAll(cursorValue?: number): Promise<HttpResponse<AllProductGroups>>; /** * This endpoint is to load a page of Employee Groups. * * @see https://apis.e-conomic.com/#Products..tag/ProductGroups/operation/GetPageOfProductGroups * * @param {number} offset * @param {number} limit * @returns {Promise<HttpResponse>} */ get(skipPages?: number, limit?: number): Promise<HttpResponse<ProductGroup[]>>; /** * Get single product group. * * @see https://apis.e-conomic.com/#Products..tag/ProductGroups/operation/GetProductGroupById * * @param {number} id * @returns {Promise<HttpResponse>} */ getFor(id: number): Promise<HttpResponse<ProductGroup>>; /** * Create a new product group * * @see https://apis.e-conomic.com/#Projects..tag/Employee-groups/operation/CreateEmployeeGroup * @param {ProductGroup} employeeGroup * @returns {Promise<HttpResponse>} */ create(data: ProductGroup): Promise<HttpResponse<ProductGroup>>; /** * Product group update * * @see https://apis.e-conomic.com/#Products..tag/ProductGroups/operation/GetAllProductGroups * @param {ProductGroup} data * @returns {Promise<HttpResponse>} */ update(data: ProductGroup): Promise<HttpResponse<ProductGroup>>; }