UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

84 lines 5.46 kB
import { BaseServiceClient } from '../../core/base-client'; import type { HTTPClient } from '../../core/client'; import { type HealthCheckResource, type HealthCheckDataResource, type EntityContactsResource, type EntityContactsDataResource, type EntityCustomersResource, type EntityCustomersDataResource, type TransCategoryResource, type TransCategoryDataResource, type TransCompanyResource, type TransCompanyDataResource, type TransPurchaseOrderReceiptResource, type TransPurchaseOrderReceiptDataResource, type TransUserResource, type TransUserDataResource, type TransWebDisplayTypeResource, type TransWebDisplayTypeDataResource } from './resources'; /** * P21 APIs Client - OpenAPI Path Mirroring Implementation * @description Client for interacting with P21 transactional API endpoints for entity data refresh and CRUD operations on categories, companies, purchase order receipts, users, and web display types within the Prophet 21 ERP system. Follows strict OpenAPI path mirroring pattern. * * @fullPath api.p21Apis * @service p21-apis * @domain transactional-erp-operations * @discoverable true * @searchTerms ["p21-apis", "prophet 21", "ERP", "transactional operations", "entity refresh", "categories", "companies", "users", "web display types", "purchase orders", "data synchronization"] * @relatedEndpoints ["api.p21Core.company.list", "api.orders.poHdr.list", "api.items.categories.list", "api.customers.customer.list"] * @commonPatterns ["ERP data synchronization", "Entity refresh operations", "Transaction CRUD operations", "Category management", "Company data operations", "User management", "Web display configuration"] * @workflow ["erp-transactions", "data-refresh", "entity-management", "category-operations", "company-management", "user-administration", "web-display-setup"] * @prerequisites ["Valid P21 system access", "ERP authentication", "Site ID configuration", "Transactional operation permissions"] * @nextSteps ["api.p21Core for core ERP operations", "api.orders for order processing", "api.items for inventory management"] * @businessRules ["Site-scoped data access", "Bearer JWT authentication required", "Transactional consistency", "Entity refresh synchronization"] * @functionalArea "transactional-erp-operations" * @caching "Real-time operations - no caching for transactional endpoints, cache health check for 5 minutes" * @performance "Supports transactional operations with P21 ERP backend, optimized for individual entity operations" * * @example * ```typescript * const api = new AugurAPI({ bearerToken: 'token', siteId: 'site' }); * * // OpenAPI Path Mirroring Examples: * // /entity-contacts/refresh → api.p21Apis.entityContacts.refresh.get() * const contactsRefresh = await api.p21Apis.entityContacts.refresh.get(); * * // /health-check → api.p21Apis.healthCheck.get() * const health = await api.p21Apis.healthCheck.get(); * * // /trans-category → api.p21Apis.transCategory.create() * const newCategory = await api.p21Apis.transCategory.create(); * * // /trans-category/{categoryUid} → api.p21Apis.transCategory.get(categoryUid) * const category = await api.p21Apis.transCategory.get(123); * * // /trans-web-display-type/defaults → api.p21Apis.transWebDisplayType.defaults.get() * const defaults = await api.p21Apis.transWebDisplayType.defaults.get(); * ``` */ export declare class P21ApisClient extends BaseServiceClient { /** Health check resource */ readonly healthCheck: HealthCheckResource; /** Health check data resource (data-only) */ readonly healthCheckData: HealthCheckDataResource; /** Entity contacts resource */ readonly entityContacts: EntityContactsResource; /** Entity contacts data resource (data-only) */ readonly entityContactsData: EntityContactsDataResource; /** Entity customers resource */ readonly entityCustomers: EntityCustomersResource; /** Entity customers data resource (data-only) */ readonly entityCustomersData: EntityCustomersDataResource; /** Transaction category resource */ readonly transCategory: TransCategoryResource; /** Transaction category data resource (data-only) */ readonly transCategoryData: TransCategoryDataResource; /** Transaction company resource */ readonly transCompany: TransCompanyResource; /** Transaction company data resource (data-only) */ readonly transCompanyData: TransCompanyDataResource; /** Transaction purchase order receipt resource */ readonly transPurchaseOrderReceipt: TransPurchaseOrderReceiptResource; /** Transaction purchase order receipt data resource (data-only) */ readonly transPurchaseOrderReceiptData: TransPurchaseOrderReceiptDataResource; /** Transaction user resource */ readonly transUser: TransUserResource; /** Transaction user data resource (data-only) */ readonly transUserData: TransUserDataResource; /** Transaction web display type resource */ readonly transWebDisplayType: TransWebDisplayTypeResource; /** Transaction web display type data resource (data-only) */ readonly transWebDisplayTypeData: TransWebDisplayTypeDataResource; /** * Create a new P21ApisClient instance * @param http Configured HTTPClient instance with authentication * @param baseUrl Base URL for the P21 APIs service (default: https://p21-apis.augur-api.com) */ constructor(http: HTTPClient, baseUrl?: string); } //# sourceMappingURL=client.d.ts.map