feat(v2.6.0): implement GlobalEnvelope, T1-T9 hardening, 12 tools, and CI acceptance test suite
This commit is contained in:
Vendored
+31
-4
@@ -1,15 +1,21 @@
|
||||
import { CourierAdapter } from "./adapters/base.js";
|
||||
import { GoogleMapsAdapter } from "./adapters/google_maps.js";
|
||||
import { CourierConfig } from "./config.js";
|
||||
import { AddressValidationRequest, AddressValidationResponse, CourierRateComparisonRequest, CourierRateComparisonResponse, FraudRiskScoreResponse, NdrResolutionRequest, NdrResolutionResponse, ParcelCreateRequest, ParcelResponse, SupportedCourier, TrackingResponse, ZoneRateRequest, ZoneRateResponse } from "./types.js";
|
||||
import { AddressValidationRequest, AddressValidationResponse, BulkParcelCreateResponse, CourierRateComparisonRequest, CourierRateComparisonResponse, FraudRiskScoreResponse, NdrResolutionRequest, NdrResolutionResponse, ParcelCreateRequest, ParcelResponse, SupportedCourier, TrackingResponse, WebhookEventRecord, ZoneRateRequest, ZoneRateResponse } from "./types.js";
|
||||
export declare function clearIdempotencyStore(): void;
|
||||
export declare function recordWebhookEvent(event: WebhookEventRecord): void;
|
||||
export declare function clearWebhookEvents(): void;
|
||||
export declare class CourierRegistry {
|
||||
private adapters;
|
||||
private googleMaps;
|
||||
constructor(config?: CourierConfig);
|
||||
listCouriers(): {
|
||||
courier: SupportedCourier;
|
||||
is_configured: boolean;
|
||||
}[];
|
||||
couriers: {
|
||||
courier: SupportedCourier;
|
||||
is_configured: boolean;
|
||||
}[];
|
||||
configured_count: number;
|
||||
};
|
||||
getAdapter(name: SupportedCourier): CourierAdapter;
|
||||
getGoogleMaps(): GoogleMapsAdapter;
|
||||
resolveSmartAutoCourierOrder(address: string, priority?: string): SupportedCourier[];
|
||||
@@ -20,5 +26,26 @@ export declare class CourierRegistry {
|
||||
validateAddress(req: AddressValidationRequest): Promise<AddressValidationResponse>;
|
||||
calculateZoneAndRate(req: ZoneRateRequest): Promise<ZoneRateResponse>;
|
||||
compareRates(req: CourierRateComparisonRequest): Promise<CourierRateComparisonResponse>;
|
||||
/**
|
||||
* Task T2 — Honest Draft-Only NDR Resolution
|
||||
* 1. Verifies consignment_id exists via trackParcel (throws CONSIGNMENT_NOT_FOUND if bogus).
|
||||
* 2. Generates Bengali WhatsApp copy + carrier ticket drafts with status: "DRAFT_GENERATED" and actions_executed: [].
|
||||
*/
|
||||
resolveNdr(req: NdrResolutionRequest): Promise<NdrResolutionResponse>;
|
||||
/**
|
||||
* Task T8 — cancel_parcel(courier, consignment_id)
|
||||
*/
|
||||
cancelParcel(courier: SupportedCourier, consignmentId: string): Promise<any>;
|
||||
/**
|
||||
* Task T8 — bulk_create_parcels(items[], dry_run?)
|
||||
*/
|
||||
bulkCreateParcels(items: ParcelCreateRequest[], dryRun?: boolean, tenantId?: string): Promise<BulkParcelCreateResponse>;
|
||||
/**
|
||||
* Task T8 — get_webhook_events(consignment_id?, since?)
|
||||
*/
|
||||
getWebhookEvents(consignmentId?: string, since?: string): {
|
||||
success: boolean;
|
||||
count: number;
|
||||
events: WebhookEventRecord[];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user