import type { HttpClient, RequestParams } from "../http-client"; export declare class Events { http: HttpClient; constructor(http: HttpClient); /** * @description Get custom event, created in Omnisend app. * * @tags Events * @name GetEventsEventId * @summary Get custom event * @request GET:/events/{eventID} * @secure */ getEventsEventId: (eventId: string, params?: RequestParams) => Promise; /** * @description Trigger custom event to Omnisend. To make your custom automation flow to work you need: 1. Create a custom event in the [Omnisend application](https://app.omnisend.com) while adding custom `fields`. 2. Create flow(s) with that custom event. 3. Pass all required fields (`eventID`, `email`, `phone`), including the required custom `fields`, that you created in Step 2. * * @tags Events * @name PostEventsEventId * @summary Trigger custom event * @request POST:/events/{eventID} * @secure */ postEventsEventId: (eventId: string, data: { /** * Email or phone number is required * @format email */ email?: string; /** Email or phone number is required */ phone?: string; /** customFields - pass only fields defined in Omnisend app. You can check defined fields, their types and requisiteness by using GET /events endpoint. */ fields?: { key?: string; }; }, params?: RequestParams) => Promise; /** * @description Get custom events, created in Omnisend app. * * @tags Events * @name GetEvents * @summary List custom events * @request GET:/events * @secure */ getEvents: (params?: RequestParams) => Promise; /** * @description Trigger (by event’s system name) or create event. If custom event doesn’t exist - it will be created with passed event’s fields. Custom event field types will be determined automatically*. If existing custom event will be triggered with additional fields - they will be added to custom event fields. If triggered existing custom event's field types will differ from existing ones, you’ll get an error. **Note:** numbers like 10, 10.00, 10.0 will be interpreted as **integers**. If you want custom event field to be interpreted as **float**, pass **10.01** or etc (number not with leading zeros). * * @tags Events * @name PostEvents * @summary Trigger or create custom event * @request POST:/events * @secure */ postEvents: (data: { /** Event name */ name?: string; /** Event system name */ systemName: string; /** * Email or phone number is required * @format email */ email?: string; /** Email or phone number is required */ phone?: string; /** Event custom fields */ fields?: { fieldSystemName?: string; }; }, params?: RequestParams) => Promise; }