@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
346 lines • 11.7 kB
TypeScript
import * as z from "zod/v3";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
* Timestamp in milliseconds, or a valid Date string.
*
* @remarks
*
* Selects data from (including) this date and time.
* Will be adjusted according to the desired time granularity.
*/
export type CountEventsQueryParamSince = number | string;
/**
* Timestamp in milliseconds, or a valid Date string.
*
* @remarks
*
* Selects data until (including) this date.
* Will be adjusted according to the desired time granularity.
*/
export type CountEventsQueryParamUntil = number | string;
export type CountEventsRequest = {
/**
* The project identifier or the project name
*/
projectId: string;
/**
* Timestamp in milliseconds, or a valid Date string.
*
* @remarks
*
* Selects data from (including) this date and time.
* Will be adjusted according to the desired time granularity.
*/
since?: number | string | undefined;
/**
* Timestamp in milliseconds, or a valid Date string.
*
* @remarks
*
* Selects data until (including) this date.
* Will be adjusted according to the desired time granularity.
*/
until?: number | string | undefined;
/**
* OData-compliant filter. Encode the value when sending it in a URL.
*
* @remarks
*
* Allows filtering on one or multiple dimensions.
*
* Supported dimensions: country, deviceType, environment, requestPath, referrerHostname, osName, browserName, route, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, eventName.
*
* JSON dimensions filtered by key: flags/<name>, eventData/<property>, for example eventData/plan eq 'pro'. Wrap keys containing characters other than letters, digits, and underscores in single quotes, for example flags/'my-flag' eq 'true'.
*
* Supported operations include eq, ne, in, and logical operators and, or, not with parentheses. Functions such as startswith are supported by the OData parser.
*/
filter?: string | undefined;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
};
export type CountEventsQuery = {
since: string;
until: string;
filter?: string | undefined;
};
export type CountEventsData2 = {
visitors: number;
count: number;
};
export type CountEventsData1 = {
projectId: string;
country: string;
deviceType: string;
environment: string;
requestPath: string;
referrerHostname: string;
osName: string;
browserName: string;
route: string;
utmSource: string;
utmMedium: string;
utmCampaign: string;
utmContent: string;
utmTerm: string;
flags: string;
errorMessage: string;
entryRevalidateSeconds: string;
projectName: string;
deploymentId: string;
pathType: string;
pathTypeVariant: string;
requestHostname: string;
requestResolvedIp: string;
requestMethod: string;
requestExtension: string;
requestId: string;
requestApi: string;
referrerUrl: string;
serverActionName: string;
httpStatus: string;
errorCode: string;
source: string;
edgeType: string;
reason: string;
edgeNetworkRegion: string;
functionRegion: string;
imageTransformationRegion: string;
dataCacheRegion: string;
cause: string;
runtime: string;
provider: string;
isrCacheRegion: string;
isrAction: string;
cacheResult: string;
cacheOperation: string;
cacheHostname: string;
cachePath: string;
cacheHitState: string;
cacheHitLevel: string;
cacheApi: string;
cacheReason: string;
pprState: string;
clientIp: string;
clientIpCountry: string;
clientUserAgent: string;
httpAccept: string;
clientJa4Digest: string;
asnId: string;
asnName: string;
botName: string;
botCategory: string;
botCategoryLegacy: string;
botVerified: string;
botCheckResult: string;
deepAnalysisCheck: string;
wafAction: string;
wafRuleId: string;
ruleCategory: string;
skewProtection: string;
functionStartType: string;
functionDispatcher: string;
isAdditionalRequest: string;
originHostname: string;
originPath: string;
originRoute: string;
fetchType: string;
fetchIndex: string;
imageSource: string;
sourceImage: string;
sourceImagePathname: string;
sourceImageHostname: string;
sourceImageHash: string;
optimizedQuality: string;
optimizedWidthPixels: string;
optimizedFormatMimeType: string;
vdcOperationOrigin: string;
entryName: string;
entryId: string;
entryItemId: string;
tagName: string;
cacheTags: string;
storeId: string;
storeName: string;
blobOperationType: string;
blobOperationLevel: string;
visitorId: string;
eventName: string;
attributionTarget: string;
attributionEventName: string;
metricName: string;
attributes: string;
flagKey: string;
flagVariant: string;
flagEvaluationReason: string;
flagClientName: string;
sdkKeyId: string;
sdkKeyEnvironment: string;
reportingProjectId: string;
reportingProjectName: string;
eventData: string;
middlewareAction: string;
middlewareActionTarget: string;
aiModel: string;
aiGatewayModelId: string;
aiProvider: string;
aiModelType: string;
servedSpeed: string;
virtualModelSlug: string;
virtualModelKind: string;
inferenceEndpointSlug: string;
inferenceScope: string;
inferenceGeoRegion: string;
inferenceProviderRegion: string;
requestedInferenceRegion: string;
costCurrency: string;
marketCostCurrency: string;
cachedInputTokensCurrency: string;
cacheCreationInputTokensCurrency: string;
cacheCreation1hInputTokensCurrency: string;
surchargeCostCurrency: string;
gatewayCostCurrency: string;
keyId: string;
keyName: string;
authMethod: string;
appName: string;
codingAgent: string;
isByok: string;
spendAttribution: string;
isPrivateModel: string;
isStreaming: string;
isRequestZdr: string;
hipaaRequested: string;
quotaRequested: string;
quotaEntityId: string;
quotaEntityType: string;
videoResolution: string;
videoAspectRatio: string;
piiRedactionApplied: string;
moderationApplied: string;
queueName: string;
consumerGroup: string;
messageId: string;
eventType: string;
notificationUrl: string;
queueRegion: string;
sandboxSessionId: string;
sandboxName: string;
workflowRunId: string;
workflowName: string;
workflowStatus: string;
stepRunId: string;
workflowStepName: string;
workflowEventType: string;
region: string;
specVersion: string;
contentType: string;
rewriteDestinationHostname: string;
externalRewriteTargetHost: string;
externalRewriteTargetPath: string;
commitSha: string;
reviewConclusion: string;
pullRequestNumber: string;
repositoryName: string;
repositoryOwner: string;
reviewStatus: string;
pullRequestState: string;
triggeringTag: string;
redirectLocation: string;
microfrontendsResponseReason: string;
microfrontendsMatchedPath: string;
microfrontendsDefaultAppDeploymentId: string;
microfrontendsDefaultAppProjectId: string;
service: string;
isPrefetchRequest: string;
spendReportGroupBy: string;
spendReportDatePart: string;
providerAttemptCanonicalSlug: string;
providerAttemptCredentialType: string;
providerAttemptSuccess: string;
providerAttemptStatusCode: string;
providerAttemptTimeout: string;
providerAttemptIsFinal: string;
providerAttemptNumber: string;
providerAttemptTotalInRequest: string;
generationId: string;
sessionId: string;
contentCaptureStatus: string;
contentCaptureInputs: string;
contentCaptureOutputs: string;
transcriptStatus: string;
transcriptInputs: string;
transcriptOutputs: string;
providerAttemptError: string;
providerAttemptSafetyIdentifier: string;
providerAttemptDevSafetyIdentifier: string;
providerAttemptRegion: string;
providerAttemptModelIndex: string;
toolCallType: string;
toolCallProvider: string;
toolCallSuccess: string;
toolCallErrorType: string;
toolCallStatusCode: string;
environmentId: string;
billableRegion: string;
direction: string;
networkTenancy: string;
trafficSource: string;
networkId: string;
privatelinkEndpointId: string;
privatelinkDnsName: string;
privatelinkIpAddress: string;
additionalProperties?: {
[k: string]: number | null;
} | undefined;
};
export type CountEventsData = CountEventsData1 | CountEventsData2;
export type CountEventsResponseBody = {
version: number;
query: CountEventsQuery;
data: CountEventsData1 | CountEventsData2;
};
/** @internal */
export type CountEventsQueryParamSince$Outbound = number | string;
/** @internal */
export declare const CountEventsQueryParamSince$outboundSchema: z.ZodType<CountEventsQueryParamSince$Outbound, z.ZodTypeDef, CountEventsQueryParamSince>;
export declare function countEventsQueryParamSinceToJSON(countEventsQueryParamSince: CountEventsQueryParamSince): string;
/** @internal */
export type CountEventsQueryParamUntil$Outbound = number | string;
/** @internal */
export declare const CountEventsQueryParamUntil$outboundSchema: z.ZodType<CountEventsQueryParamUntil$Outbound, z.ZodTypeDef, CountEventsQueryParamUntil>;
export declare function countEventsQueryParamUntilToJSON(countEventsQueryParamUntil: CountEventsQueryParamUntil): string;
/** @internal */
export type CountEventsRequest$Outbound = {
projectId: string;
since?: number | string | undefined;
until?: number | string | undefined;
filter?: string | undefined;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export declare const CountEventsRequest$outboundSchema: z.ZodType<CountEventsRequest$Outbound, z.ZodTypeDef, CountEventsRequest>;
export declare function countEventsRequestToJSON(countEventsRequest: CountEventsRequest): string;
/** @internal */
export declare const CountEventsQuery$inboundSchema: z.ZodType<CountEventsQuery, z.ZodTypeDef, unknown>;
export declare function countEventsQueryFromJSON(jsonString: string): SafeParseResult<CountEventsQuery, SDKValidationError>;
/** @internal */
export declare const CountEventsData2$inboundSchema: z.ZodType<CountEventsData2, z.ZodTypeDef, unknown>;
export declare function countEventsData2FromJSON(jsonString: string): SafeParseResult<CountEventsData2, SDKValidationError>;
/** @internal */
export declare const CountEventsData1$inboundSchema: z.ZodType<CountEventsData1, z.ZodTypeDef, unknown>;
export declare function countEventsData1FromJSON(jsonString: string): SafeParseResult<CountEventsData1, SDKValidationError>;
/** @internal */
export declare const CountEventsData$inboundSchema: z.ZodType<CountEventsData, z.ZodTypeDef, unknown>;
export declare function countEventsDataFromJSON(jsonString: string): SafeParseResult<CountEventsData, SDKValidationError>;
/** @internal */
export declare const CountEventsResponseBody$inboundSchema: z.ZodType<CountEventsResponseBody, z.ZodTypeDef, unknown>;
export declare function countEventsResponseBodyFromJSON(jsonString: string): SafeParseResult<CountEventsResponseBody, SDKValidationError>;
//# sourceMappingURL=counteventsop.d.ts.map