Package ai.shipeasy.admin.api
Class EventsApi
java.lang.Object
ai.shipeasy.admin.api.EventsApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapproveEvent(String id, ApproveEventRequest approveEventRequest, String xProjectId) Approve a pending event Promotes a pending (auto-discovered) event to usable so metrics can query it (`pending` → `0`).okhttp3.CallapproveEventAsync(String id, ApproveEventRequest approveEventRequest, String xProjectId, ApiCallback<ApproveEventResponse> _callback) Approve a pending event (asynchronously) Promotes a pending (auto-discovered) event to usable so metrics can query it (`pending` → `0`).okhttp3.CallapproveEventCall(String id, ApproveEventRequest approveEventRequest, String xProjectId, ApiCallback _callback) Build call for approveEventapproveEventWithHttpInfo(String id, ApproveEventRequest approveEventRequest, String xProjectId) Approve a pending event Promotes a pending (auto-discovered) event to usable so metrics can query it (`pending` → `0`).createEvent(CreateEventRequest createEventRequest, String xProjectId) Register an event Registers a new event name and (optionally) its typed properties.okhttp3.CallcreateEventAsync(CreateEventRequest createEventRequest, String xProjectId, ApiCallback<CreateEventResponse> _callback) Register an event (asynchronously) Registers a new event name and (optionally) its typed properties.okhttp3.CallcreateEventCall(CreateEventRequest createEventRequest, String xProjectId, ApiCallback _callback) Build call for createEventcreateEventWithHttpInfo(CreateEventRequest createEventRequest, String xProjectId) Register an event Registers a new event name and (optionally) its typed properties.deleteEvent(String id, String xProjectId) Archive an event Soft-deletes (archives) the event.okhttp3.CalldeleteEventAsync(String id, String xProjectId, ApiCallback<DeleteEventResponse> _callback) Archive an event (asynchronously) Soft-deletes (archives) the event.okhttp3.CalldeleteEventCall(String id, String xProjectId, ApiCallback _callback) Build call for deleteEventdeleteEventWithHttpInfo(String id, String xProjectId) Archive an event Soft-deletes (archives) the event.Get an event Returns one event's full detail.okhttp3.CallgetEventAsync(String id, String xProjectId, ApiCallback<GetEventResponse> _callback) Get an event (asynchronously) Returns one event's full detail.okhttp3.CallgetEventCall(String id, String xProjectId, ApiCallback _callback) Build call for getEventgetEventWithHttpInfo(String id, String xProjectId) Get an event Returns one event's full detail.intlistEvents(String xProjectId, String q) List events Returns every catalogued event in the project, including pending auto-discovered names.okhttp3.CalllistEventsAsync(String xProjectId, String q, ApiCallback<List<ListEventsResponseInner>> _callback) List events (asynchronously) Returns every catalogued event in the project, including pending auto-discovered names.okhttp3.CalllistEventsCall(String xProjectId, String q, ApiCallback _callback) Build call for listEventslistEventsWithHttpInfo(String xProjectId, String q) List events Returns every catalogued event in the project, including pending auto-discovered names.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex) updateEvent(String id, UpdateEventRequest updateEventRequest, String xProjectId) Update an event Partial update of an event's folder, description, or properties.okhttp3.CallupdateEventAsync(String id, UpdateEventRequest updateEventRequest, String xProjectId, ApiCallback<UpdateEventResponse> _callback) Update an event (asynchronously) Partial update of an event's folder, description, or properties.okhttp3.CallupdateEventCall(String id, UpdateEventRequest updateEventRequest, String xProjectId, ApiCallback _callback) Build call for updateEventupdateEventWithHttpInfo(String id, UpdateEventRequest updateEventRequest, String xProjectId) Update an event Partial update of an event's folder, description, or properties.
-
Constructor Details
-
EventsApi
public EventsApi() -
EventsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
approveEventCall
public okhttp3.Call approveEventCall(@Nonnull String id, @Nonnull ApproveEventRequest approveEventRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for approveEvent- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)approveEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
approveEvent
public ApproveEventResponse approveEvent(@Nonnull String id, @Nonnull ApproveEventRequest approveEventRequest, @Nullable String xProjectId) throws ApiException Approve a pending event Promotes a pending (auto-discovered) event to usable so metrics can query it (`pending` → `0`). You may optionally declare the event's folder, description, or properties in the same call — the body is the same shape as update, and may be empty. **Use case:** Clear an auto-discovered event out of the pending queue so metrics defined on it start resolving.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)approveEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApproveEventResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
approveEventWithHttpInfo
public ApiResponse<ApproveEventResponse> approveEventWithHttpInfo(@Nonnull String id, @Nonnull ApproveEventRequest approveEventRequest, @Nullable String xProjectId) throws ApiException Approve a pending event Promotes a pending (auto-discovered) event to usable so metrics can query it (`pending` → `0`). You may optionally declare the event's folder, description, or properties in the same call — the body is the same shape as update, and may be empty. **Use case:** Clear an auto-discovered event out of the pending queue so metrics defined on it start resolving.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)approveEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<ApproveEventResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
approveEventAsync
public okhttp3.Call approveEventAsync(@Nonnull String id, @Nonnull ApproveEventRequest approveEventRequest, @Nullable String xProjectId, ApiCallback<ApproveEventResponse> _callback) throws ApiException Approve a pending event (asynchronously) Promotes a pending (auto-discovered) event to usable so metrics can query it (`pending` → `0`). You may optionally declare the event's folder, description, or properties in the same call — the body is the same shape as update, and may be empty. **Use case:** Clear an auto-discovered event out of the pending queue so metrics defined on it start resolving.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)approveEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
createEventCall
public okhttp3.Call createEventCall(@Nonnull CreateEventRequest createEventRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for createEvent- Parameters:
createEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createEvent
public CreateEventResponse createEvent(@Nonnull CreateEventRequest createEventRequest, @Nullable String xProjectId) throws ApiException Register an event Registers a new event name and (optionally) its typed properties. Only `name` is required. If the name matches an existing **pending** (auto-discovered) row, this approves that row instead of returning a conflict. Otherwise an already-registered name returns `409`. **Use cases** - **Register a known event** — `{ \"name\": \"checkout_completed\" }` so metrics can reference it. - **Declare typed properties** — supply `properties` to document the event's payload shape.- Parameters:
createEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- CreateEventResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createEventWithHttpInfo
public ApiResponse<CreateEventResponse> createEventWithHttpInfo(@Nonnull CreateEventRequest createEventRequest, @Nullable String xProjectId) throws ApiException Register an event Registers a new event name and (optionally) its typed properties. Only `name` is required. If the name matches an existing **pending** (auto-discovered) row, this approves that row instead of returning a conflict. Otherwise an already-registered name returns `409`. **Use cases** - **Register a known event** — `{ \"name\": \"checkout_completed\" }` so metrics can reference it. - **Declare typed properties** — supply `properties` to document the event's payload shape.- Parameters:
createEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<CreateEventResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createEventAsync
public okhttp3.Call createEventAsync(@Nonnull CreateEventRequest createEventRequest, @Nullable String xProjectId, ApiCallback<CreateEventResponse> _callback) throws ApiException Register an event (asynchronously) Registers a new event name and (optionally) its typed properties. Only `name` is required. If the name matches an existing **pending** (auto-discovered) row, this approves that row instead of returning a conflict. Otherwise an already-registered name returns `409`. **Use cases** - **Register a known event** — `{ \"name\": \"checkout_completed\" }` so metrics can reference it. - **Declare typed properties** — supply `properties` to document the event's payload shape.- Parameters:
createEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
deleteEventCall
public okhttp3.Call deleteEventCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for deleteEvent- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
deleteEvent
public DeleteEventResponse deleteEvent(@Nonnull String id, @Nullable String xProjectId) throws ApiException Archive an event Soft-deletes (archives) the event. Returns `409` if any metric still references it — delete those metrics first. **Use case:** Retire an event from the catalog once no metric depends on it.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- DeleteEventResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteEventWithHttpInfo
public ApiResponse<DeleteEventResponse> deleteEventWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Archive an event Soft-deletes (archives) the event. Returns `409` if any metric still references it — delete those metrics first. **Use case:** Retire an event from the catalog once no metric depends on it.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<DeleteEventResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteEventAsync
public okhttp3.Call deleteEventAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<DeleteEventResponse> _callback) throws ApiException Archive an event (asynchronously) Soft-deletes (archives) the event. Returns `409` if any metric still references it — delete those metrics first. **Use case:** Retire an event from the catalog once no metric depends on it.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
getEventCall
public okhttp3.Call getEventCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for getEvent- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getEvent
public GetEventResponse getEvent(@Nonnull String id, @Nullable String xProjectId) throws ApiException Get an event Returns one event's full detail. Resolves by exact id, unique id-prefix, or exact (unique) name. **Use case:** Inspect one event's declared properties and pending state by id or name.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- GetEventResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getEventWithHttpInfo
public ApiResponse<GetEventResponse> getEventWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Get an event Returns one event's full detail. Resolves by exact id, unique id-prefix, or exact (unique) name. **Use case:** Inspect one event's declared properties and pending state by id or name.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<GetEventResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getEventAsync
public okhttp3.Call getEventAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<GetEventResponse> _callback) throws ApiException Get an event (asynchronously) Returns one event's full detail. Resolves by exact id, unique id-prefix, or exact (unique) name. **Use case:** Inspect one event's declared properties and pending state by id or name.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
listEventsCall
public okhttp3.Call listEventsCall(@Nullable String xProjectId, @Nullable String q, ApiCallback _callback) throws ApiException Build call for listEvents- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listEvents
public List<ListEventsResponseInner> listEvents(@Nullable String xProjectId, @Nullable String q) throws ApiException List events Returns every catalogued event in the project, including pending auto-discovered names. Each row carries its own `pending` flag, so the unapproved queue can be filtered client-side. **Use case:** Snapshot the event catalog — for example to review the pending auto-discovery queue before approving names, or to confirm which events your metrics can reference.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)- Returns:
- List<ListEventsResponseInner>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listEventsWithHttpInfo
public ApiResponse<List<ListEventsResponseInner>> listEventsWithHttpInfo(@Nullable String xProjectId, @Nullable String q) throws ApiException List events Returns every catalogued event in the project, including pending auto-discovered names. Each row carries its own `pending` flag, so the unapproved queue can be filtered client-side. **Use case:** Snapshot the event catalog — for example to review the pending auto-discovery queue before approving names, or to confirm which events your metrics can reference.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)- Returns:
- ApiResponse<List<ListEventsResponseInner>>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listEventsAsync
public okhttp3.Call listEventsAsync(@Nullable String xProjectId, @Nullable String q, ApiCallback<List<ListEventsResponseInner>> _callback) throws ApiException List events (asynchronously) Returns every catalogued event in the project, including pending auto-discovered names. Each row carries its own `pending` flag, so the unapproved queue can be filtered client-side. **Use case:** Snapshot the event catalog — for example to review the pending auto-discovery queue before approving names, or to confirm which events your metrics can reference.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
updateEventCall
public okhttp3.Call updateEventCall(@Nonnull String id, @Nonnull UpdateEventRequest updateEventRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for updateEvent- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)updateEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateEvent
public UpdateEventResponse updateEvent(@Nonnull String id, @Nonnull UpdateEventRequest updateEventRequest, @Nullable String xProjectId) throws ApiException Update an event Partial update of an event's folder, description, or properties. `name` is immutable. `properties` replaces the full set (no merge) — omit it to leave properties unchanged. **Use case:** Refile an event, update its description, or redeclare its typed properties.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)updateEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- UpdateEventResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateEventWithHttpInfo
public ApiResponse<UpdateEventResponse> updateEventWithHttpInfo(@Nonnull String id, @Nonnull UpdateEventRequest updateEventRequest, @Nullable String xProjectId) throws ApiException Update an event Partial update of an event's folder, description, or properties. `name` is immutable. `properties` replaces the full set (no merge) — omit it to leave properties unchanged. **Use case:** Refile an event, update its description, or redeclare its typed properties.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)updateEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<UpdateEventResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateEventAsync
public okhttp3.Call updateEventAsync(@Nonnull String id, @Nonnull UpdateEventRequest updateEventRequest, @Nullable String xProjectId, ApiCallback<UpdateEventResponse> _callback) throws ApiException Update an event (asynchronously) Partial update of an event's folder, description, or properties. `name` is immutable. `properties` replaces the full set (no merge) — omit it to leave properties unchanged. **Use case:** Refile an event, update its description, or redeclare its typed properties.- Parameters:
id- Stable opaque event id (`evt_…`) or the event's `name`. (required)updateEventRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-