@hoover-institution/hubspot-lib
Version:
A toolkit for deep integration with HubSpot's Marketing Events API with a plugin-based architecture.
31 lines (27 loc) • 995 B
TypeScript
// types/events.d.ts
/**
* Core event identifiers used by the plugin system.
* Keys represent internal hook codes, values are descriptive names.
*/
export const EVENTS: {
CREATE_EVENT: "onCreateMarketingEvent";
GET_EVENT: "onGetMarketingEvent";
GET_EVENTS: "onGetMarketingEvents";
DELETE_EVENT: "onDeleteMarketingEvent";
REGISTER_EMAIL: "onRegisterEmail";
GET_CONTACTS_BY_STATE: "onGetContactsByState";
CREATE_OR_FIND_CONTACT_LIST: "onCreateOrFindContactList";
GET_CONTACT_EVENT_STATE: "onGetContactEventState";
ADD_CONTACT_TO_LIST: "onAddContactToList";
REMOVE_CONTACT_FROM_LIST: "onRemoveContactFromList";
ASSOCIATE_LIST_WITH_EVENT: "onAssociateListWithEvent";
MARKETING_EVENT_ERROR: "onMarketingEventError";
};
/**
* Union of all internal event keys (e.g., "CREATE_EVENT").
*/
export type EventKey = keyof typeof EVENTS;
/**
* Union of all external event handler names (e.g., "onCreateMarketingEvent").
*/
export type EventLabel = (typeof EVENTS)[EventKey];