UNPKG

smart-track

Version:

A TypeScript SDK for integrating with tracking services using the Beckn protocol. Provides adapters for package tracking with built-in error handling, retry logic, and type safety.

75 lines 2.14 kB
import { z } from "zod"; export interface IPackageDetialsPayload { trackingId: string; provider: string; } export declare enum CountryCode { IND = "IND", USA = "USA", AUS = "AUS", GBR = "GBR", CAN = "CAN", DEU = "DEU", FRA = "FRA", JPN = "JPN", CHN = "CHN", RUS = "RUS" } export declare enum BecknAction { TRACK = "track", ORDER = "order", STATUS = "status", SEARCH = "search" } declare enum BacknCoreVersion { V0_9_1 = "0.9.1" } export declare const becknMetadataSchema: z.ZodObject<{ domain: z.ZodDefault<z.ZodString>; country: z.ZodDefault<z.ZodNativeEnum<typeof CountryCode>>; city: z.ZodString; action: z.ZodNativeEnum<typeof BecknAction>; core_version: z.ZodDefault<z.ZodNativeEnum<typeof BacknCoreVersion>>; bap_id: z.ZodDefault<z.ZodString>; bap_uri: z.ZodDefault<z.ZodString>; bpp_id: z.ZodDefault<z.ZodString>; bpp_uri: z.ZodDefault<z.ZodString>; transaction_id: z.ZodDefault<z.ZodString>; message_id: z.ZodDefault<z.ZodString>; timestamp: z.ZodDefault<z.ZodDate>; key: z.ZodOptional<z.ZodString>; ttl: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { domain: string; country: CountryCode; city: string; action: BecknAction; core_version: BacknCoreVersion; bap_id: string; bap_uri: string; bpp_id: string; bpp_uri: string; transaction_id: string; message_id: string; timestamp: Date; key?: string | undefined; ttl?: string | undefined; }, { city: string; action: BecknAction; domain?: string | undefined; country?: CountryCode | undefined; core_version?: BacknCoreVersion | undefined; bap_id?: string | undefined; bap_uri?: string | undefined; bpp_id?: string | undefined; bpp_uri?: string | undefined; transaction_id?: string | undefined; message_id?: string | undefined; timestamp?: Date | undefined; key?: string | undefined; ttl?: string | undefined; }>; export type BecknMetadataSchemaType = z.infer<typeof becknMetadataSchema>; export {}; //# sourceMappingURL=payload.types.d.ts.map