@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
71 lines • 3 kB
TypeScript
import { BaseServiceClient } from '../../core/base-client';
import type { HTTPClient } from '../../core/client';
import { type HealthCheckResource, type HealthCheckDataResource, type RatesShopResource, type RatesShopDataResource } from './resources';
/**
* UPS Shipping Service Client
*
* Provides comprehensive UPS shipping rate calculation, service comparison,
* and shipping cost optimization. Offers detailed UPS service options with
* accurate pricing for domestic and international shipments.
*
* **CRITICAL: This client follows OpenAPI Path Mirroring Pattern**
* - /health-check → client.healthCheck.get()
* - /rates-shop → client.ratesShop.get()
*
* @service ups
* @domain shipping-and-logistics
* @fullPath api.ups
* @discoverable true
* @searchTerms ["ups", "shipping", "rates", "logistics", "carrier", "package delivery"]
* @relatedEndpoints ["api.shipping.rates.calculate", "api.logistics.speedship.freight.get", "api.commerce.cart.shipping.calculate"]
* @commonPatterns ["UPS rate shopping", "Shipping cost calculation", "Carrier service comparison", "Delivery estimation"]
* @workflow ["e-commerce-checkout", "order-fulfillment", "shipping-estimation", "carrier-selection"]
* @functionalArea "shipping-and-logistics"
* @businessRules ["Requires UPS API access", "Supports domestic and international shipping", "Provides real-time rate quotes"]
* @performance "Optimized for UPS rate shopping with caching support"
*
* @example
* ```typescript
* import { HTTPClient } from '@augur/api-client/core';
* import { UPSClient } from '@augur/api-client/services/ups';
*
* const http = new HTTPClient('ups', { siteId: 'your-site-id', bearerToken: 'your-token' });
* const ups = new UPSClient(http);
*
* // Check service health
* const health = await ups.healthCheck.get({ 'x-site-id': 'SITE123' });
* const healthData = await ups.healthCheckData.get({ 'x-site-id': 'SITE123' });
*
* // Shop UPS rates
* const rates = await ups.ratesShop.get({
* fromAddress1: '123 Warehouse Blvd',
* fromCity: 'Los Angeles',
* fromStateProvinceCode: 'CA',
* fromPostalCode: '90210',
* fromCountryCode: 'US',
* toAddress1: '456 Customer St',
* toCity: 'New York',
* toStateProvinceCode: 'NY',
* toPostalCode: '10001',
* toCountryCode: 'US',
* weight: 5,
* 'x-site-id': 'SITE123'
* });
*
* // Get just the rates data
* const ratesData = await ups.ratesShopData.get({...});
* ```
*/
export declare class UPSClient extends BaseServiceClient {
/** Health check resource */
readonly healthCheck: HealthCheckResource;
/** Health check data resource (data-only) */
readonly healthCheckData: HealthCheckDataResource;
/** Rates shop resource */
readonly ratesShop: RatesShopResource;
/** Rates shop data resource (data-only) */
readonly ratesShopData: RatesShopDataResource;
constructor(http: HTTPClient, baseUrl?: string);
protected getServiceDescription(): string;
}
//# sourceMappingURL=client.d.ts.map