/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/ingestSource.ts (3915B)
// this file is @generated import { type IngestSourceIn, IngestSourceInSerializer } from "../models/ingestSourceIn"; import { type IngestSourceOut, IngestSourceOutSerializer, } from "../models/ingestSourceOut"; import { type ListResponseIngestSourceOut, ListResponseIngestSourceOutSerializer, } from "../models/listResponseIngestSourceOut"; import type { Ordering } from "../models/ordering"; import { type RotateTokenOut, RotateTokenOutSerializer } from "../models/rotateTokenOut"; import { HttpMethod, SvixRequest, type SvixRequestContext } from "../request"; export interface IngestSourceListOptions { /** Limit the number of returned items */ limit?: number; /** The iterator returned from a prior invocation */ iterator?: string | null; /** The sorting order of the returned items */ order?: Ordering; } export interface IngestSourceCreateOptions { idempotencyKey?: string; } export interface IngestSourceRotateTokenOptions { idempotencyKey?: string; } export class IngestSource { public constructor(private readonly requestCtx: SvixRequestContext) {} /** List of all the organization's Ingest Sources. */ public list(options?: IngestSourceListOptions): Promise { const request = new SvixRequest(HttpMethod.GET, "/ingest/api/v1/source"); request.setQueryParams({ limit: options?.limit, iterator: options?.iterator, order: options?.order, }); return request.send( this.requestCtx, ListResponseIngestSourceOutSerializer._fromJsonObject ); } /** Create Ingest Source. */ public create( ingestSourceIn: IngestSourceIn, options?: IngestSourceCreateOptions ): Promise { const request = new SvixRequest(HttpMethod.POST, "/ingest/api/v1/source"); request.setHeaderParam("idempotency-key", options?.idempotencyKey); request.setBody(IngestSourceInSerializer._toJsonObject(ingestSourceIn)); return request.send(this.requestCtx, IngestSourceOutSerializer._fromJsonObject); } /** Get an Ingest Source by id or uid. */ public get(sourceId: string): Promise { const request = new SvixRequest(HttpMethod.GET, "/ingest/api/v1/source/{source_id}"); request.setPathParam("source_id", sourceId); return request.send(this.requestCtx, IngestSourceOutSerializer._fromJsonObject); } /** Update an Ingest Source. */ public update( sourceId: string, ingestSourceIn: IngestSourceIn ): Promise { const request = new SvixRequest(HttpMethod.PUT, "/ingest/api/v1/source/{source_id}"); request.setPathParam("source_id", sourceId); request.setBody(IngestSourceInSerializer._toJsonObject(ingestSourceIn)); return request.send(this.requestCtx, IngestSourceOutSerializer._fromJsonObject); } /** Delete an Ingest Source. */ public delete(sourceId: string): Promise { const request = new SvixRequest( HttpMethod.DELETE, "/ingest/api/v1/source/{source_id}" ); request.setPathParam("source_id", sourceId); return request.sendNoResponseBody(this.requestCtx); } /** * Rotate the Ingest Source's Url Token. * * This will rotate the ingest source's token, which is used to * construct the unique `ingestUrl` for the source. Previous tokens * will remain valid for 48 hours after rotation. The token can be * rotated a maximum of three times within the 48-hour period. */ public rotateToken( sourceId: string, options?: IngestSourceRotateTokenOptions ): Promise { const request = new SvixRequest( HttpMethod.POST, "/ingest/api/v1/source/{source_id}/token/rotate" ); request.setPathParam("source_id", sourceId); request.setHeaderParam("idempotency-key", options?.idempotencyKey); return request.send(this.requestCtx, RotateTokenOutSerializer._fromJsonObject); } }