@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
86 lines • 4.8 kB
TypeScript
import { HTTPClient } from '../../core/client';
import { BaseServiceClient } from '../../core/base-client';
import { type HealthCheckResource, type HealthCheckDataResource, type PingResource, type PingDataResource, type AddressResource, type AddressDataResource, type CashDrawerResource, type CashDrawerDataResource, type CompanyResource, type CompanyDataResource, type CodeP21Resource, type CodeP21DataResource, type LocationResource, type LocationDataResource, type PaymentTypesResource, type PaymentTypesDataResource } from './resources';
/**
* P21 Core API Client
* @description Client for interacting with P21 Core system API endpoints for address management, cash drawer operations, company data, location management, and payment processing within the Prophet 21 ERP system
* @fullPath api.p21Core
* @service p21-core
* @domain enterprise-resource-planning
* @discoverable true
* @searchTerms ["p21-core", "prophet 21", "ERP", "addresses", "cash drawer", "company data", "locations", "payment types", "shipping methods", "business operations", "corporate addresses"]
* @relatedEndpoints ["api.p21Core.address", "api.p21Core.cashDrawer", "api.p21Core.company", "api.p21Core.location", "api.p21Core.paymentTypes", "api.p21Core.codes"]
* @commonPatterns ["ERP data management", "Address and shipping setup", "Cash drawer operations", "Company configuration", "Location management", "Payment processing setup"]
* @workflow ["erp-setup", "address-management", "financial-operations", "location-configuration", "payment-processing"]
* @prerequisites ["Valid P21 system access", "ERP authentication", "Company-specific permissions"]
* @nextSteps ["api.commerce.cartHeaders for e-commerce integration", "api.orders for order processing", "api.pricing for pricing management"]
* @businessRules ["Company-scoped data access", "Location-based permissions", "Cash drawer security controls", "Address validation for shipping"]
* @functionalArea "enterprise-resource-planning"
* @caching "Cache company and location data for 30 minutes, real-time for cash drawer operations"
* @performance "Supports pagination for all list operations, optimized for ERP transaction volumes"
* @example
* ```typescript
* import { HTTPClient } from '@augur/api-client/core';
* import { P21CoreClient } from '@augur/api-client/services/p21-core';
*
* const client = new P21CoreClient(new HTTPClient({ baseURL: 'https://p21-core.augur-api.com' }));
*
* // List companies with pagination
* const companies = await client.company.list({ limit: 20, offset: 0 });
* console.log(companies.data); // Company[]
*
* // Get company details
* const company = await client.company.get({ companyUid: 123 });
* console.log(company.data); // Company
*
* // List addresses for shipping configuration
* const addresses = await client.address.list({ carrierFlag: 'Y' });
* console.log(addresses.data); // Address[]
*
* // Get cash drawer status
* const cashDrawers = await client.cashDrawer.list({ statusCd: 704 });
* ```
*/
export declare class P21CoreClient extends BaseServiceClient {
private readonly _schemaRefs;
private get schemaRefs();
/** Health check resource */
readonly healthCheck: HealthCheckResource;
/** Health check data resource (data-only) */
readonly healthCheckData: HealthCheckDataResource;
/** Ping resource */
readonly ping: PingResource;
/** Ping data resource (data-only) */
readonly pingData: PingDataResource;
/** Address resource */
readonly address: AddressResource;
/** Address data resource (data-only) */
readonly addressData: AddressDataResource;
/** Cash drawer resource */
readonly cashDrawer: CashDrawerResource;
/** Cash drawer data resource (data-only) */
readonly cashDrawerData: CashDrawerDataResource;
/** Company resource */
readonly company: CompanyResource;
/** Company data resource (data-only) */
readonly companyData: CompanyDataResource;
/** Code P21 resource */
readonly codeP21: CodeP21Resource;
/** Code P21 data resource (data-only) */
readonly codeP21Data: CodeP21DataResource;
/** Location resource */
readonly location: LocationResource;
/** Location data resource (data-only) */
readonly locationData: LocationDataResource;
/** Payment types resource */
readonly paymentTypes: PaymentTypesResource;
/** Payment types data resource (data-only) */
readonly paymentTypesData: PaymentTypesDataResource;
/**
* Create a new P21CoreClient instance
* @param http Configured HTTPClient instance with authentication
* @param baseUrl Base URL for the P21 Core API (default: https://p21-core.augur-api.com)
*/
constructor(http: HTTPClient, baseUrl?: string);
}
//# sourceMappingURL=client.d.ts.map