akua-sdk
Version:
TypeScript SDK for Akua Acquiring Processor
38 lines (37 loc) • 1.51 kB
TypeScript
import { HttpClient } from '../http/client';
import { ApiResponse } from '../types';
import { OrganizationDTO } from '../types/dtos';
import { CreateOrganizationRequest } from '../types/organization/';
/**
* Service responsible for managing organization-related operations in the Akua API.
* @class OrganizationService
*/
export declare class OrganizationService {
private readonly httpClient;
/**
* Creates an instance of OrganizationService.
* @param {HttpClient} httpClient - The HTTP client instance used for making API requests.
*/
constructor(httpClient: HttpClient);
/**
* Creates a new organization in the Akua system.
* @async
* @param {CreateOrganizationRequest} createOrganizationRequest - The data required to create a new organization.
* @returns {Promise<ApiResponse<OrganizationDTO>>} A promise that resolves to the newly created organization information.
* @example
* // Create a new organization
* await organizationService.create({
* name: 'Acme Corp'
* });
*/
create(createOrganizationRequest: CreateOrganizationRequest): Promise<ApiResponse<OrganizationDTO>>;
/**
* Retrieves all organizations from the Akua system.
* @async
* @returns {Promise<ApiResponse<OrganizationDTO[]>>} A promise that resolves to an array of organization DTOs.
* @example
* // Get all organizations
* await organizationService.get();
*/
get(): Promise<ApiResponse<OrganizationDTO[]>>;
}