import type { TriggerSourceDTO, TriggerSourceCreateRequestDTO, PaginatedResponseDTO } from '@explorins/pers-sdk'; import type { TriggerSourceQueryOptions } from '@explorins/pers-sdk/trigger-source'; export type { TriggerSourceQueryOptions } from '@explorins/pers-sdk/trigger-source'; /** * React hook for TriggerSource operations in the PERS SDK * * Manages trigger sources which are physical or digital activation points for campaigns: * - **QR_CODE**: Scannable QR codes at physical locations * - **NFC_TAG**: NFC tap points for contactless interactions * - **GPS_GEOFENCE**: Location-based triggers with radius detection * - **API_WEBHOOK**: External system integration triggers * - **TRANSACTION**: Purchase/payment based triggers * * TriggerSources are standalone entities that can be created, managed, and then * assigned to campaigns. This separation allows reuse across multiple campaigns. * * **Admin Only**: All create, update, and delete operations require admin authentication. * * @returns TriggerSource hook with CRUD operations * * @example Basic TriggerSource Operations * ```typescript * function TriggerSourceManager() { * const { * getAll, * getById, * create, * update, * remove * } = useTriggerSources(); * * // List all QR code trigger sources * const loadQRSources = async () => { * const { data: sources } = await getAll({ type: 'QR_CODE' }); * console.log('QR Sources:', sources); * }; * * // Create a new QR code for a store * const createStoreQR = async () => { * const source = await create({ * type: 'QR_CODE', * name: 'Store Entrance QR', * description: 'Scan at the entrance', * businessId: 'business-123', * coordsLatitude: 47.6062, * coordsLongitude: -122.3321 * }); * console.log('Created:', source.id); * }; * } * ``` * * @example GPS Geofence Trigger * ```typescript * const { create } = useTriggerSources(); * * // Create a GPS geofence around a location * const geofence = await create({ * type: 'GPS_GEOFENCE', * name: 'Downtown Area', * coordsLatitude: 47.6062, * coordsLongitude: -122.3321, * metadata: { radiusMeters: 100 } * }); * ``` */ export declare const useTriggerSources: () => { getAll: (options?: TriggerSourceQueryOptions) => Promise>; getById: (triggerSourceId: string) => Promise; create: (triggerSource: TriggerSourceCreateRequestDTO) => Promise; update: (triggerSourceId: string, triggerSource: Partial) => Promise; remove: (triggerSourceId: string) => Promise; isAvailable: boolean; }; export type TriggerSourceHook = ReturnType; //# sourceMappingURL=useTriggerSources.d.ts.map