/opt/canhelp/node_modules/svix/src/api
NameSizeModeActions
application.ts43230644editdlrm
authentication.ts56880644editdlrm
backgroundTask.ts22170644editdlrm
connector.ts36530644editdlrm
endpoint.ts147070644editdlrm
environment.ts18290644editdlrm
eventType.ts59960644editdlrm
health.ts4200644editdlrm
ingest.ts15190644editdlrm
ingestEndpoint.ts84960644editdlrm
ingestSource.ts39150644editdlrm
integration.ts46440644editdlrm
message.ts87830644editdlrm
messageAttempt.ts106990644editdlrm
messagePoller.ts37310644editdlrm
operationalWebhook.ts3580644editdlrm
operationalWebhookEndpoint.ts71700644editdlrm
statistics.ts28460644editdlrm
streaming.ts27190644editdlrm
streamingEvents.ts21200644editdlrm
streamingEventType.ts41010644editdlrm
streamingSink.ts64160644editdlrm
streamingStream.ts31960644editdlrm
Edit: /opt/canhelp/node_modules/svix/src/api/statistics.ts (2846B)
// this file is @generated import { type AggregateEventTypesOut, AggregateEventTypesOutSerializer, } from "../models/aggregateEventTypesOut"; import { type AppUsageStatsIn, AppUsageStatsInSerializer, } from "../models/appUsageStatsIn"; import { type AppUsageStatsOut, AppUsageStatsOutSerializer, } from "../models/appUsageStatsOut"; import { HttpMethod, SvixRequest, type SvixRequestContext } from "../request"; export interface StatisticsAggregateAppStatsOptions { idempotencyKey?: string; } export class Statistics { public constructor(private readonly requestCtx: SvixRequestContext) {} /** * Creates a background task to calculate the message destinations for all applications in the environment. * * Note that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to * retrieve the results of the operation. * * The completed background task will return a payload like the following: * ```json * { * "id": "qtask_33qe39Stble9Rn3ZxFrqL5ZSsjT", * "status": "finished", * "task": "application.stats", * "data": { * "appStats": [ * { * "messageDestinations": 2, * "appId": "app_33W1An2Zz5cO9SWbhHsYyDmVC6m", * "appUid": null * } * ] * } * } * ``` */ public aggregateAppStats( appUsageStatsIn: AppUsageStatsIn, options?: StatisticsAggregateAppStatsOptions ): Promise { const request = new SvixRequest(HttpMethod.POST, "/api/v1/stats/usage/app"); request.setHeaderParam("idempotency-key", options?.idempotencyKey); request.setBody(AppUsageStatsInSerializer._toJsonObject(appUsageStatsIn)); return request.send(this.requestCtx, AppUsageStatsOutSerializer._fromJsonObject); } /** * Creates a background task to calculate the listed event types for all apps in the organization. * * Note that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to * retrieve the results of the operation. * * The completed background task will return a payload like the following: * ```json * { * "id": "qtask_33qe39Stble9Rn3ZxFrqL5ZSsjT", * "status": "finished", * "task": "event-type.aggregate", * "data": { * "event_types": [ * { * "appId": "app_33W1An2Zz5cO9SWbhHsYyDmVC6m", * "explicitlySubscribedEventTypes": ["user.signup", "user.deleted"], * "hasCatchAllEndpoint": false * } * ] * } * } * ``` */ public aggregateEventTypes(): Promise { const request = new SvixRequest(HttpMethod.PUT, "/api/v1/stats/usage/event-types"); return request.send( this.requestCtx, AggregateEventTypesOutSerializer._fromJsonObject ); } }