From 70b1ab75bb94a2aad4185ffe8623839ba1458e1f Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 28 Feb 2025 18:06:27 +0100 Subject: [PATCH] Update OpenAPI spec and regenerate libs --- javascript/src/api/ingestEndpoint.ts | 205 + javascript/src/api/message.ts | 10 +- javascript/src/models/endpointIn.ts | 3 + .../src/models/expungeAllContentsOut.ts | 32 + javascript/src/models/index.ts | 10 +- .../src/models/ingestEndpointHeadersIn.ts | 20 + .../src/models/ingestEndpointHeadersOut.ts | 23 + javascript/src/models/ingestEndpointIn.ts | 45 + javascript/src/models/ingestEndpointOut.ts | 47 + .../src/models/ingestEndpointSecretIn.ts | 26 + .../src/models/ingestEndpointSecretOut.ts | 26 + javascript/src/models/ingestEndpointUpdate.ts | 36 + .../models/listResponseIngestEndpointOut.ts | 32 + lib-openapi.json | 20495 +++++++++------- python/svix/api/ingest_endpoint.py | 323 + python/svix/api/message.py | 15 +- python/svix/models/__init__.py | 20 +- python/svix/models/endpoint_in.py | 2 + ...nts_out.py => expunge_all_contents_out.py} | 2 +- .../svix/models/ingest_endpoint_headers_in.py | 8 + .../models/ingest_endpoint_headers_out.py | 10 + python/svix/models/ingest_endpoint_in.py | 25 + python/svix/models/ingest_endpoint_out.py | 28 + .../svix/models/ingest_endpoint_secret_in.py | 12 + .../svix/models/ingest_endpoint_secret_out.py | 11 + python/svix/models/ingest_endpoint_update.py | 19 + .../list_response_ingest_endpoint_out.py | 15 + rust/src/api/ingest.rs | 16 + rust/src/api/ingest_endpoint.rs | 177 + rust/src/api/message.rs | 2 +- rust/src/api/mod.rs | 11 + rust/src/models/endpoint_in.rs | 4 + ...nts_out.rs => expunge_all_contents_out.rs} | 4 +- rust/src/models/ingest_endpoint_headers_in.rs | 13 + .../src/models/ingest_endpoint_headers_out.rs | 15 + rust/src/models/ingest_endpoint_in.rs | 46 + rust/src/models/ingest_endpoint_out.rs | 55 + rust/src/models/ingest_endpoint_secret_in.rs | 19 + rust/src/models/ingest_endpoint_secret_out.rs | 18 + rust/src/models/ingest_endpoint_update.rs | 37 + .../list_response_ingest_endpoint_out.rs | 29 + rust/src/models/mod.rs | 20 +- svix-cli/src/cmds/api/ingest_endpoint.rs | 186 + svix-cli/src/cmds/api/mod.rs | 2 + 44 files changed, 13075 insertions(+), 9079 deletions(-) create mode 100644 javascript/src/api/ingestEndpoint.ts create mode 100644 javascript/src/models/expungeAllContentsOut.ts create mode 100644 javascript/src/models/ingestEndpointHeadersIn.ts create mode 100644 javascript/src/models/ingestEndpointHeadersOut.ts create mode 100644 javascript/src/models/ingestEndpointIn.ts create mode 100644 javascript/src/models/ingestEndpointOut.ts create mode 100644 javascript/src/models/ingestEndpointSecretIn.ts create mode 100644 javascript/src/models/ingestEndpointSecretOut.ts create mode 100644 javascript/src/models/ingestEndpointUpdate.ts create mode 100644 javascript/src/models/listResponseIngestEndpointOut.ts create mode 100644 python/svix/api/ingest_endpoint.py rename python/svix/models/{expung_all_contents_out.py => expunge_all_contents_out.py} (87%) create mode 100644 python/svix/models/ingest_endpoint_headers_in.py create mode 100644 python/svix/models/ingest_endpoint_headers_out.py create mode 100644 python/svix/models/ingest_endpoint_in.py create mode 100644 python/svix/models/ingest_endpoint_out.py create mode 100644 python/svix/models/ingest_endpoint_secret_in.py create mode 100644 python/svix/models/ingest_endpoint_secret_out.py create mode 100644 python/svix/models/ingest_endpoint_update.py create mode 100644 python/svix/models/list_response_ingest_endpoint_out.py create mode 100644 rust/src/api/ingest.rs create mode 100644 rust/src/api/ingest_endpoint.rs rename rust/src/models/{expung_all_contents_out.rs => expunge_all_contents_out.rs} (88%) create mode 100644 rust/src/models/ingest_endpoint_headers_in.rs create mode 100644 rust/src/models/ingest_endpoint_headers_out.rs create mode 100644 rust/src/models/ingest_endpoint_in.rs create mode 100644 rust/src/models/ingest_endpoint_out.rs create mode 100644 rust/src/models/ingest_endpoint_secret_in.rs create mode 100644 rust/src/models/ingest_endpoint_secret_out.rs create mode 100644 rust/src/models/ingest_endpoint_update.rs create mode 100644 rust/src/models/list_response_ingest_endpoint_out.rs create mode 100644 svix-cli/src/cmds/api/ingest_endpoint.rs diff --git a/javascript/src/api/ingestEndpoint.ts b/javascript/src/api/ingestEndpoint.ts new file mode 100644 index 000000000..297d2ed43 --- /dev/null +++ b/javascript/src/api/ingestEndpoint.ts @@ -0,0 +1,205 @@ +// this file is @generated +import { + IngestEndpointHeadersIn, + IngestEndpointHeadersInSerializer, +} from "../models/ingestEndpointHeadersIn"; +import { + IngestEndpointHeadersOut, + IngestEndpointHeadersOutSerializer, +} from "../models/ingestEndpointHeadersOut"; +import { IngestEndpointIn, IngestEndpointInSerializer } from "../models/ingestEndpointIn"; +import { + IngestEndpointOut, + IngestEndpointOutSerializer, +} from "../models/ingestEndpointOut"; +import { + IngestEndpointSecretIn, + IngestEndpointSecretInSerializer, +} from "../models/ingestEndpointSecretIn"; +import { + IngestEndpointSecretOut, + IngestEndpointSecretOutSerializer, +} from "../models/ingestEndpointSecretOut"; +import { + IngestEndpointUpdate, + IngestEndpointUpdateSerializer, +} from "../models/ingestEndpointUpdate"; +import { + ListResponseIngestEndpointOut, + ListResponseIngestEndpointOutSerializer, +} from "../models/listResponseIngestEndpointOut"; +import { Ordering } from "../models/ordering"; +import { HttpMethod, SvixRequest, SvixRequestContext } from "../request"; + +export interface IngestEndpointListOptions { + /** 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 IngestEndpointCreateOptions { + idempotencyKey?: string; +} + +export interface IngestEndpointRotateSecretOptions { + idempotencyKey?: string; +} + +export class IngestEndpoint { + public constructor(private readonly requestCtx: SvixRequestContext) {} + + /** List ingest endpoints. */ + public list( + options?: IngestEndpointListOptions + ): Promise { + const request = new SvixRequest( + HttpMethod.GET, + "/ingest/api/v1/source/{source_id}/endpoint" + ); + + request.setQueryParam("limit", options?.limit); + request.setQueryParam("iterator", options?.iterator); + request.setQueryParam("order", options?.order); + + return request.send( + this.requestCtx, + ListResponseIngestEndpointOutSerializer._fromJsonObject + ); + } + + /** Create an ingest endpoint. */ + public create( + ingestEndpointIn: IngestEndpointIn, + options?: IngestEndpointCreateOptions + ): Promise { + const request = new SvixRequest( + HttpMethod.POST, + "/ingest/api/v1/source/{source_id}/endpoint" + ); + + request.setHeaderParam("idempotency-key", options?.idempotencyKey); + request.setBody(IngestEndpointInSerializer._toJsonObject(ingestEndpointIn)); + + return request.send(this.requestCtx, IngestEndpointOutSerializer._fromJsonObject); + } + + /** Get an ingest endpoint. */ + public get(endpointId: string): Promise { + const request = new SvixRequest( + HttpMethod.GET, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}" + ); + + request.setPathParam("endpoint_id", endpointId); + + return request.send(this.requestCtx, IngestEndpointOutSerializer._fromJsonObject); + } + + /** Update an ingest endpoint. */ + public update( + endpointId: string, + ingestEndpointUpdate: IngestEndpointUpdate + ): Promise { + const request = new SvixRequest( + HttpMethod.PUT, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}" + ); + + request.setPathParam("endpoint_id", endpointId); + request.setBody(IngestEndpointUpdateSerializer._toJsonObject(ingestEndpointUpdate)); + + return request.send(this.requestCtx, IngestEndpointOutSerializer._fromJsonObject); + } + + /** Delete an ingest endpoint. */ + public delete(endpointId: string): Promise { + const request = new SvixRequest( + HttpMethod.DELETE, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}" + ); + + request.setPathParam("endpoint_id", endpointId); + + return request.sendNoResponseBody(this.requestCtx); + } + + /** Get the additional headers to be sent with the ingest. */ + public getHeaders(endpointId: string): Promise { + const request = new SvixRequest( + HttpMethod.GET, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers" + ); + + request.setPathParam("endpoint_id", endpointId); + + return request.send( + this.requestCtx, + IngestEndpointHeadersOutSerializer._fromJsonObject + ); + } + + /** Set the additional headers to be sent to the endpoint. */ + public updateHeaders( + endpointId: string, + ingestEndpointHeadersIn: IngestEndpointHeadersIn + ): Promise { + const request = new SvixRequest( + HttpMethod.PUT, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers" + ); + + request.setPathParam("endpoint_id", endpointId); + request.setBody( + IngestEndpointHeadersInSerializer._toJsonObject(ingestEndpointHeadersIn) + ); + + return request.sendNoResponseBody(this.requestCtx); + } + + /** + * Get an ingest endpoint's signing secret. + * + * This is used to verify the authenticity of the webhook. + * For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/). + */ + public getSecret(endpointId: string): Promise { + const request = new SvixRequest( + HttpMethod.GET, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret" + ); + + request.setPathParam("endpoint_id", endpointId); + + return request.send( + this.requestCtx, + IngestEndpointSecretOutSerializer._fromJsonObject + ); + } + + /** + * Rotates an ingest endpoint's signing secret. + * + * The previous secret will remain valid for the next 24 hours. + */ + public rotateSecret( + endpointId: string, + ingestEndpointSecretIn: IngestEndpointSecretIn, + options?: IngestEndpointRotateSecretOptions + ): Promise { + const request = new SvixRequest( + HttpMethod.POST, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret/rotate" + ); + + request.setPathParam("endpoint_id", endpointId); + request.setHeaderParam("idempotency-key", options?.idempotencyKey); + request.setBody( + IngestEndpointSecretInSerializer._toJsonObject(ingestEndpointSecretIn) + ); + + return request.sendNoResponseBody(this.requestCtx); + } +} diff --git a/javascript/src/api/message.ts b/javascript/src/api/message.ts index 3bee1b217..17ac24264 100644 --- a/javascript/src/api/message.ts +++ b/javascript/src/api/message.ts @@ -1,8 +1,8 @@ // this file is @generated import { - ExpungAllContentsOut, - ExpungAllContentsOutSerializer, -} from "../models/expungAllContentsOut"; + ExpungeAllContentsOut, + ExpungeAllContentsOutSerializer, +} from "../models/expungeAllContentsOut"; import { ListResponseMessageOut, ListResponseMessageOutSerializer, @@ -115,7 +115,7 @@ export class Message { public expungeAllContents( appId: string, options?: MessageExpungeAllContentsOptions - ): Promise { + ): Promise { const request = new SvixRequest( HttpMethod.POST, "/api/v1/app/{app_id}/msg/expunge-all-contents" @@ -124,7 +124,7 @@ export class Message { request.setPathParam("app_id", appId); request.setHeaderParam("idempotency-key", options?.idempotencyKey); - return request.send(this.requestCtx, ExpungAllContentsOutSerializer._fromJsonObject); + return request.send(this.requestCtx, ExpungeAllContentsOutSerializer._fromJsonObject); } /** Get a message by its ID or eventID. */ diff --git a/javascript/src/models/endpointIn.ts b/javascript/src/models/endpointIn.ts index f8268621d..585346332 100644 --- a/javascript/src/models/endpointIn.ts +++ b/javascript/src/models/endpointIn.ts @@ -7,6 +7,7 @@ export interface EndpointIn { description?: string; disabled?: boolean; filterTypes?: string[] | null; + headers?: { [key: string]: string } | null; metadata?: { [key: string]: string }; rateLimit?: number | null; /** @@ -29,6 +30,7 @@ export const EndpointInSerializer = { description: object["description"], disabled: object["disabled"], filterTypes: object["filterTypes"], + headers: object["headers"], metadata: object["metadata"], rateLimit: object["rateLimit"], secret: object["secret"], @@ -44,6 +46,7 @@ export const EndpointInSerializer = { description: self.description, disabled: self.disabled, filterTypes: self.filterTypes, + headers: self.headers, metadata: self.metadata, rateLimit: self.rateLimit, secret: self.secret, diff --git a/javascript/src/models/expungeAllContentsOut.ts b/javascript/src/models/expungeAllContentsOut.ts new file mode 100644 index 000000000..c4203556b --- /dev/null +++ b/javascript/src/models/expungeAllContentsOut.ts @@ -0,0 +1,32 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ +import { + BackgroundTaskStatus, + BackgroundTaskStatusSerializer, +} from "./backgroundTaskStatus"; +import { BackgroundTaskType, BackgroundTaskTypeSerializer } from "./backgroundTaskType"; + +export interface ExpungeAllContentsOut { + /** The QueueBackgroundTask's ID. */ + id: string; + status: BackgroundTaskStatus; + task: BackgroundTaskType; +} + +export const ExpungeAllContentsOutSerializer = { + _fromJsonObject(object: any): ExpungeAllContentsOut { + return { + id: object["id"], + status: BackgroundTaskStatusSerializer._fromJsonObject(object["status"]), + task: BackgroundTaskTypeSerializer._fromJsonObject(object["task"]), + }; + }, + + _toJsonObject(self: ExpungeAllContentsOut): any { + return { + id: self.id, + status: BackgroundTaskStatusSerializer._toJsonObject(self.status), + task: BackgroundTaskTypeSerializer._toJsonObject(self.task), + }; + }, +}; diff --git a/javascript/src/models/index.ts b/javascript/src/models/index.ts index a42e3612c..d8c686c0f 100644 --- a/javascript/src/models/index.ts +++ b/javascript/src/models/index.ts @@ -38,7 +38,14 @@ export { EventTypeIn } from "./eventTypeIn"; export { EventTypeOut } from "./eventTypeOut"; export { EventTypePatch } from "./eventTypePatch"; export { EventTypeUpdate } from "./eventTypeUpdate"; -export { ExpungAllContentsOut } from "./expungAllContentsOut"; +export { ExpungeAllContentsOut } from "./expungeAllContentsOut"; +export { IngestEndpointHeadersIn } from "./ingestEndpointHeadersIn"; +export { IngestEndpointHeadersOut } from "./ingestEndpointHeadersOut"; +export { IngestEndpointIn } from "./ingestEndpointIn"; +export { IngestEndpointOut } from "./ingestEndpointOut"; +export { IngestEndpointSecretIn } from "./ingestEndpointSecretIn"; +export { IngestEndpointSecretOut } from "./ingestEndpointSecretOut"; +export { IngestEndpointUpdate } from "./ingestEndpointUpdate"; export { IntegrationIn } from "./integrationIn"; export { IntegrationKeyOut } from "./integrationKeyOut"; export { IntegrationOut } from "./integrationOut"; @@ -48,6 +55,7 @@ export { ListResponseBackgroundTaskOut } from "./listResponseBackgroundTaskOut"; export { ListResponseEndpointMessageOut } from "./listResponseEndpointMessageOut"; export { ListResponseEndpointOut } from "./listResponseEndpointOut"; export { ListResponseEventTypeOut } from "./listResponseEventTypeOut"; +export { ListResponseIngestEndpointOut } from "./listResponseIngestEndpointOut"; export { ListResponseIntegrationOut } from "./listResponseIntegrationOut"; export { ListResponseMessageAttemptOut } from "./listResponseMessageAttemptOut"; export { ListResponseMessageEndpointOut } from "./listResponseMessageEndpointOut"; diff --git a/javascript/src/models/ingestEndpointHeadersIn.ts b/javascript/src/models/ingestEndpointHeadersIn.ts new file mode 100644 index 000000000..0724d6f0a --- /dev/null +++ b/javascript/src/models/ingestEndpointHeadersIn.ts @@ -0,0 +1,20 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ + +export interface IngestEndpointHeadersIn { + headers: { [key: string]: string }; +} + +export const IngestEndpointHeadersInSerializer = { + _fromJsonObject(object: any): IngestEndpointHeadersIn { + return { + headers: object["headers"], + }; + }, + + _toJsonObject(self: IngestEndpointHeadersIn): any { + return { + headers: self.headers, + }; + }, +}; diff --git a/javascript/src/models/ingestEndpointHeadersOut.ts b/javascript/src/models/ingestEndpointHeadersOut.ts new file mode 100644 index 000000000..605294890 --- /dev/null +++ b/javascript/src/models/ingestEndpointHeadersOut.ts @@ -0,0 +1,23 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ + +export interface IngestEndpointHeadersOut { + headers: { [key: string]: string }; + sensitive: string[]; +} + +export const IngestEndpointHeadersOutSerializer = { + _fromJsonObject(object: any): IngestEndpointHeadersOut { + return { + headers: object["headers"], + sensitive: object["sensitive"], + }; + }, + + _toJsonObject(self: IngestEndpointHeadersOut): any { + return { + headers: self.headers, + sensitive: self.sensitive, + }; + }, +}; diff --git a/javascript/src/models/ingestEndpointIn.ts b/javascript/src/models/ingestEndpointIn.ts new file mode 100644 index 000000000..6afa62b5e --- /dev/null +++ b/javascript/src/models/ingestEndpointIn.ts @@ -0,0 +1,45 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ + +export interface IngestEndpointIn { + description?: string; + disabled?: boolean; + metadata?: { [key: string]: string }; + rateLimit?: number | null; + /** + * The endpoint's verification secret. + * + * Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + * It is recommended to not set this and let the server generate the secret. + */ + secret?: string | null; + /** Optional unique identifier for the endpoint. */ + uid?: string | null; + url: string; +} + +export const IngestEndpointInSerializer = { + _fromJsonObject(object: any): IngestEndpointIn { + return { + description: object["description"], + disabled: object["disabled"], + metadata: object["metadata"], + rateLimit: object["rateLimit"], + secret: object["secret"], + uid: object["uid"], + url: object["url"], + }; + }, + + _toJsonObject(self: IngestEndpointIn): any { + return { + description: self.description, + disabled: self.disabled, + metadata: self.metadata, + rateLimit: self.rateLimit, + secret: self.secret, + uid: self.uid, + url: self.url, + }; + }, +}; diff --git a/javascript/src/models/ingestEndpointOut.ts b/javascript/src/models/ingestEndpointOut.ts new file mode 100644 index 000000000..28475c808 --- /dev/null +++ b/javascript/src/models/ingestEndpointOut.ts @@ -0,0 +1,47 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ + +export interface IngestEndpointOut { + createdAt: Date; + /** An example endpoint name. */ + description: string; + disabled?: boolean; + /** The Endpoint's ID. */ + id: string; + metadata: { [key: string]: string }; + rateLimit?: number | null; + /** Optional unique identifier for the endpoint. */ + uid?: string | null; + updatedAt: Date; + url: string; +} + +export const IngestEndpointOutSerializer = { + _fromJsonObject(object: any): IngestEndpointOut { + return { + createdAt: new Date(object["createdAt"]), + description: object["description"], + disabled: object["disabled"], + id: object["id"], + metadata: object["metadata"], + rateLimit: object["rateLimit"], + uid: object["uid"], + updatedAt: new Date(object["updatedAt"]), + url: object["url"], + }; + }, + + _toJsonObject(self: IngestEndpointOut): any { + return { + createdAt: self.createdAt, + description: self.description, + disabled: self.disabled, + id: self.id, + metadata: self.metadata, + rateLimit: self.rateLimit, + uid: self.uid, + updatedAt: self.updatedAt, + url: self.url, + }; + }, +}; diff --git a/javascript/src/models/ingestEndpointSecretIn.ts b/javascript/src/models/ingestEndpointSecretIn.ts new file mode 100644 index 000000000..b02edd7f4 --- /dev/null +++ b/javascript/src/models/ingestEndpointSecretIn.ts @@ -0,0 +1,26 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ + +export interface IngestEndpointSecretIn { + /** + * The endpoint's verification secret. + * + * Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + * It is recommended to not set this and let the server generate the secret. + */ + key?: string | null; +} + +export const IngestEndpointSecretInSerializer = { + _fromJsonObject(object: any): IngestEndpointSecretIn { + return { + key: object["key"], + }; + }, + + _toJsonObject(self: IngestEndpointSecretIn): any { + return { + key: self.key, + }; + }, +}; diff --git a/javascript/src/models/ingestEndpointSecretOut.ts b/javascript/src/models/ingestEndpointSecretOut.ts new file mode 100644 index 000000000..47c2075a7 --- /dev/null +++ b/javascript/src/models/ingestEndpointSecretOut.ts @@ -0,0 +1,26 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ + +export interface IngestEndpointSecretOut { + /** + * The endpoint's verification secret. + * + * Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + * It is recommended to not set this and let the server generate the secret. + */ + key: string; +} + +export const IngestEndpointSecretOutSerializer = { + _fromJsonObject(object: any): IngestEndpointSecretOut { + return { + key: object["key"], + }; + }, + + _toJsonObject(self: IngestEndpointSecretOut): any { + return { + key: self.key, + }; + }, +}; diff --git a/javascript/src/models/ingestEndpointUpdate.ts b/javascript/src/models/ingestEndpointUpdate.ts new file mode 100644 index 000000000..f0c7e67a7 --- /dev/null +++ b/javascript/src/models/ingestEndpointUpdate.ts @@ -0,0 +1,36 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ + +export interface IngestEndpointUpdate { + description?: string; + disabled?: boolean; + metadata?: { [key: string]: string }; + rateLimit?: number | null; + /** Optional unique identifier for the endpoint. */ + uid?: string | null; + url: string; +} + +export const IngestEndpointUpdateSerializer = { + _fromJsonObject(object: any): IngestEndpointUpdate { + return { + description: object["description"], + disabled: object["disabled"], + metadata: object["metadata"], + rateLimit: object["rateLimit"], + uid: object["uid"], + url: object["url"], + }; + }, + + _toJsonObject(self: IngestEndpointUpdate): any { + return { + description: self.description, + disabled: self.disabled, + metadata: self.metadata, + rateLimit: self.rateLimit, + uid: self.uid, + url: self.url, + }; + }, +}; diff --git a/javascript/src/models/listResponseIngestEndpointOut.ts b/javascript/src/models/listResponseIngestEndpointOut.ts new file mode 100644 index 000000000..ebb5031e0 --- /dev/null +++ b/javascript/src/models/listResponseIngestEndpointOut.ts @@ -0,0 +1,32 @@ +// this file is @generated +/* eslint @typescript-eslint/no-explicit-any: 0 */ +import { IngestEndpointOut, IngestEndpointOutSerializer } from "./ingestEndpointOut"; + +export interface ListResponseIngestEndpointOut { + data: IngestEndpointOut[]; + done: boolean; + iterator: string | null; + prevIterator?: string | null; +} + +export const ListResponseIngestEndpointOutSerializer = { + _fromJsonObject(object: any): ListResponseIngestEndpointOut { + return { + data: object["data"].map((item: IngestEndpointOut) => + IngestEndpointOutSerializer._fromJsonObject(item) + ), + done: object["done"], + iterator: object["iterator"], + prevIterator: object["prevIterator"], + }; + }, + + _toJsonObject(self: ListResponseIngestEndpointOut): any { + return { + data: self.data.map((item) => IngestEndpointOutSerializer._toJsonObject(item)), + done: self.done, + iterator: self.iterator, + prevIterator: self.prevIterator, + }; + }, +}; diff --git a/lib-openapi.json b/lib-openapi.json index bd10bdb3e..334b02d86 100644 --- a/lib-openapi.json +++ b/lib-openapi.json @@ -88,6 +88,28 @@ ], "type": "object" }, + "AdobeSignConfig": { + "properties": { + "clientId": { + "type": "string" + } + }, + "required": [ + "clientId" + ], + "type": "object" + }, + "AdobeSignResponse": { + "properties": { + "xAdobeSignClientId": { + "type": "string" + } + }, + "required": [ + "xAdobeSignClientId" + ], + "type": "object" + }, "AggregateEventTypesOut": { "properties": { "id": { @@ -968,6 +990,26 @@ ], "type": "object" }, + "CronConfig": { + "properties": { + "contentType": { + "description": "Override the default content-type.\n\nRecommended if the payload is not JSON.", + "nullable": true, + "type": "string" + }, + "payload": { + "type": "string" + }, + "schedule": { + "type": "string" + } + }, + "required": [ + "payload", + "schedule" + ], + "type": "object" + }, "CustomColorPalette": { "properties": { "backgroundHover": { @@ -1161,6 +1203,15 @@ ], "description": "A copy of [`backgroundtask::Data`], but serialized with camelCase fields for customers." }, + "DocusignConfig": { + "properties": { + "secret": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, "Duration": { "properties": { "nanos": { @@ -1569,6 +1620,17 @@ "type": "array", "uniqueItems": true }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "example": { + "X-Example": "123", + "X-Foobar": "Bar" + }, + "nullable": true, + "type": "object" + }, "metadata": { "additionalProperties": { "type": "string" @@ -1686,7 +1748,7 @@ "items": { "example": "project_1337", "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", "type": "string" }, "nullable": true, @@ -3052,7 +3114,7 @@ ], "type": "object" }, - "ExpungAllContentsOut": { + "ExpungeAllContentsOut": { "properties": { "id": { "description": "The QueueBackgroundTask's ID.", @@ -3129,6 +3191,15 @@ ], "type": "object" }, + "GithubConfig": { + "properties": { + "secret": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudStorageConfig": { "description": "Configuration for a Google Cloud Storage sink.\n\nWrite stream events into the named bucket using the supplied Google Cloud credentials.", "properties": { @@ -3176,6 +3247,15 @@ "title": "HttpError", "type": "object" }, + "HubspotConfig": { + "properties": { + "secret": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, "HubspotOauthConfigIn": { "properties": { "refresh_token": { @@ -3225,649 +3305,3245 @@ }, "type": "object" }, - "IntegrationIn": { + "IngestEndpointHeadersIn": { "properties": { - "featureFlags": { - "description": "The set of feature flags the integration will have access to.", - "example": [], + "headers": { + "additionalProperties": { + "type": "string" + }, + "example": { + "X-Example": "123", + "X-Foobar": "Bar" + }, + "type": "object" + } + }, + "required": [ + "headers" + ], + "type": "object" + }, + "IngestEndpointHeadersOut": { + "properties": { + "headers": { + "additionalProperties": { + "type": "string" + }, + "example": { + "X-Example": "123", + "X-Foobar": "Bar" + }, + "type": "object" + }, + "sensitive": { + "example": [ + "Authorization" + ], "items": { - "example": "cool-new-feature", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "maxItems": 25, - "minItems": 1, "type": "array", "uniqueItems": true - }, - "name": { - "example": "Example Integration", - "type": "string" } }, "required": [ - "name" + "headers", + "sensitive" ], "type": "object" }, - "IntegrationKeyOut": { + "IngestEndpointIn": { "properties": { - "key": { - "example": "integsk_kV3ts5tKPNJN4Dl25cMTfUNdmabxbX0O", + "description": { + "default": "", + "example": "An example endpoint name", + "type": "string" + }, + "disabled": { + "default": false, + "example": false, + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "type": "object" + }, + "rateLimit": { + "format": "uint16", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "secret": { + "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", + "nullable": true, + "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", + "type": "string" + }, + "uid": { + "description": "Optional unique identifier for the endpoint.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "url": { + "example": "https://example.com/webhook/", + "format": "uri", + "maxLength": 65536, + "minLength": 1, "type": "string" } }, "required": [ - "key" + "url" ], "type": "object" }, - "IntegrationOut": { + "IngestEndpointOut": { "properties": { "createdAt": { "format": "date-time", "type": "string" }, - "featureFlags": { - "default": [], - "description": "The set of feature flags the integration has access to.", - "example": [], - "items": { - "example": "cool-new-feature", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "maxItems": 25, - "minItems": 1, - "type": "array", - "uniqueItems": true + "description": { + "description": "An example endpoint name.", + "type": "string" + }, + "disabled": { + "default": false, + "example": false, + "type": "boolean" }, "id": { - "description": "The Integration's ID.", - "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^integ_[A-Za-z0-9]{27}$", + "description": "The Endpoint's ID.", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "pattern": "^ep_[A-Za-z0-9]{27}$", "type": "string" }, - "name": { - "example": "Example Integration", + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "rateLimit": { + "format": "uint16", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "uid": { + "description": "Optional unique identifier for the endpoint.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" + }, + "url": { + "example": "https://example.com/webhook/", + "format": "uri", + "maxLength": 65536, + "minLength": 1, + "type": "string" } }, "required": [ "createdAt", + "description", "id", - "name", - "updatedAt" + "metadata", + "updatedAt", + "url" ], "type": "object" }, - "IntegrationUpdate": { + "IngestEndpointSecretIn": { "properties": { - "featureFlags": { - "description": "The set of feature flags the integration will have access to.", - "example": [], - "items": { - "example": "cool-new-feature", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "maxItems": 25, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, - "name": { - "example": "Example Integration", + "key": { + "default": null, + "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", + "nullable": true, + "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", "type": "string" } }, - "required": [ - "name" - ], "type": "object" }, - "KafkaSecurityProtocolType": { - "enum": [ - "plaintext", - "ssl", - "sasl-ssl" - ], - "type": "string" - }, - "ListResponse_ActiveApplicationOut_": { + "IngestEndpointSecretOut": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/ActiveApplicationOut" - }, - "type": "array" - }, - "done": { - "type": "boolean" - }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" - }, - "prevIterator": { - "example": "-iterator", - "nullable": true, + "key": { + "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", + "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", "type": "string" } }, "required": [ - "data", - "done", - "iterator" + "key" ], "type": "object" }, - "ListResponse_ApplicationOut_": { + "IngestEndpointUpdate": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/ApplicationOut" - }, - "type": "array" + "description": { + "default": "", + "example": "An example endpoint name", + "type": "string" }, - "done": { + "disabled": { + "default": false, + "example": false, "type": "boolean" }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" - }, - "prevIterator": { - "example": "-iterator", - "nullable": true, - "type": "string" - } - }, - "required": [ - "data", - "done", - "iterator" - ], - "type": "object" - }, - "ListResponse_ApplicationStats_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/ApplicationStats" + "metadata": { + "additionalProperties": { + "type": "string" }, - "type": "array" + "default": {}, + "type": "object" }, - "done": { - "type": "boolean" + "rateLimit": { + "format": "uint16", + "minimum": 1, + "nullable": true, + "type": "integer" }, - "iterator": { - "example": "iterator", + "uid": { + "description": "Optional unique identifier for the endpoint.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, + "url": { + "example": "https://example.com/webhook/", + "format": "uri", + "maxLength": 65536, + "minLength": 1, "type": "string" } }, "required": [ - "data", - "done", - "iterator" + "url" ], "type": "object" }, - "ListResponse_BackgroundTaskOut_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/BackgroundTaskOut" - }, - "type": "array" - }, - "done": { - "type": "boolean" - }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" - }, - "prevIterator": { - "example": "-iterator", - "nullable": true, - "type": "string" - } + "IngestHeaders": { + "additionalProperties": { + "type": "string" }, - "required": [ - "data", - "done", - "iterator" - ], "type": "object" }, - "ListResponse_EndpointMessageOut_": { + "IngestLogOut": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/EndpointMessageOut" - }, - "type": "array" - }, - "done": { - "type": "boolean" + "created_at": { + "format": "date-time", + "type": "string" }, - "iterator": { - "example": "iterator", - "nullable": true, + "error_text": { "type": "string" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, + "headers": { + "$ref": "#/components/schemas/IngestHeaders" + }, + "id": { + "description": "The ErrorLog's ID.", + "example": "log2yZwUhtgs5Ai8T9yRQJXA", + "maxLength": 25, + "minLength": 25, + "pattern": "^log[A-Za-z0-9]{22}$", "type": "string" - } - }, - "required": [ - "data", - "done", - "iterator" - ], - "type": "object" - }, - "ListResponse_EndpointOut_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/EndpointOut" - }, - "type": "array" }, - "done": { - "type": "boolean" + "payload": { + "type": "string" }, - "iterator": { - "example": "iterator", - "nullable": true, + "source_id": { + "description": "The Source's ID.", + "example": "src_2yZwUhtgs5Ai8T9yRQJXA", + "maxLength": 26, + "minLength": 26, + "pattern": "^src_[A-Za-z0-9]{22}$", "type": "string" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, + "status_code": { + "format": "int16", + "type": "integer" + }, + "updated_at": { + "format": "date-time", "type": "string" } }, "required": [ - "data", - "done", - "iterator" + "created_at", + "error_text", + "headers", + "id", + "payload", + "source_id", + "status_code", + "updated_at" ], "type": "object" }, - "ListResponse_EventTypeOut_": { + "IngestPathWithToken": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/EventTypeOut" - }, - "type": "array" - }, - "done": { - "type": "boolean" - }, - "iterator": { - "example": "iterator", - "nullable": true, + "source_id": { + "description": "The Source's ID.", + "example": "src_2yZwUhtgs5Ai8T9yRQJXA", + "maxLength": 26, + "minLength": 26, + "pattern": "^src_[A-Za-z0-9]{22}$", "type": "string" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, + "token": { + "maxLength": 16, + "minLength": 16, + "pattern": "^[A-Za-z0-9]+$", "type": "string" } }, "required": [ - "data", - "done", - "iterator" + "source_id", + "token" ], "type": "object" }, - "ListResponse_IntegrationOut_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/IntegrationOut" - }, + "IngestResponse": { + "anyOf": [ + { + "items": [ + { + "description": "The IngestMessageUid's ID.", + "example": "whk_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^whk_[A-Za-z0-9]{27}$", + "type": "string" + }, + { + "description": "The Application's UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, "type": "array" }, - "done": { - "type": "boolean" + { + "$ref": "#/components/schemas/ZoomCrcResponse" }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" + { + "$ref": "#/components/schemas/SlackChallengeResponse" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, - "type": "string" + { + "$ref": "#/components/schemas/AdobeSignResponse" } - }, - "required": [ - "data", - "done", - "iterator" ], - "type": "object" + "description": "Some providers need to generate responses to incoming ingest requests." }, - "ListResponse_MessageAttemptEndpointOut_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/MessageAttemptEndpointOut" + "IngestSourceIn": { + "oneOf": [ + { + "description": "Webhooks with no verification scheme or special handling.", + "properties": { + "type": { + "enum": [ + "genericWebhook" + ], + "type": "string" + } }, - "type": "array" - }, - "done": { - "type": "boolean" - }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" + "required": [ + "type" + ], + "type": "object" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, - "type": "string" - } - }, - "required": [ - "data", - "done", - "iterator" - ], - "type": "object" - }, - "ListResponse_MessageAttemptOut_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/MessageAttemptOut" + { + "properties": { + "config": { + "$ref": "#/components/schemas/CronConfig" + }, + "type": { + "enum": [ + "cron" + ], + "type": "string" + } }, - "type": "array" - }, - "done": { - "type": "boolean" + "required": [ + "config", + "type" + ], + "type": "object" }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/AdobeSignConfig" + }, + "type": { + "enum": [ + "adobeSign" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, - "type": "string" - } - }, - "required": [ - "data", - "done", - "iterator" - ], - "type": "object" - }, - "ListResponse_MessageEndpointOut_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/MessageEndpointOut" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "beehiiv" + ], + "type": "string" + } }, - "type": "array" + "required": [ + "config", + "type" + ], + "type": "object" }, - "done": { - "type": "boolean" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "brex" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "clerk" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, - "type": "string" - } - }, - "required": [ - "data", - "done", - "iterator" - ], - "type": "object" - }, - "ListResponse_MessageOut_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/MessageOut" + { + "properties": { + "config": { + "$ref": "#/components/schemas/DocusignConfig" + }, + "type": { + "enum": [ + "docusign" + ], + "type": "string" + } }, - "type": "array" + "required": [ + "config", + "type" + ], + "type": "object" }, - "done": { - "type": "boolean" + { + "properties": { + "config": { + "$ref": "#/components/schemas/GithubConfig" + }, + "type": { + "enum": [ + "github" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "guesty" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, - "type": "string" - } - }, - "required": [ - "data", - "done", - "iterator" - ], - "type": "object" - }, - "ListResponse_OperationalWebhookEndpointOut_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/OperationalWebhookEndpointOut" + { + "properties": { + "config": { + "$ref": "#/components/schemas/HubspotConfig" + }, + "type": { + "enum": [ + "hubspot" + ], + "type": "string" + } }, - "type": "array" + "required": [ + "config", + "type" + ], + "type": "object" }, - "done": { - "type": "boolean" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "incidentIo" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "iterator": { + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "lithic" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "nash" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "pleo" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "replicate" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "resend" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "safebase" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "sardine" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "type": { + "enum": [ + "segment" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/ShopifyConfig" + }, + "type": { + "enum": [ + "shopify" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SlackConfig" + }, + "type": { + "enum": [ + "slack" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/StripeConfig" + }, + "type": { + "enum": [ + "stripe" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "stych" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "svix" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/ZoomConfig" + }, + "type": { + "enum": [ + "zoom" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + } + ], + "properties": { + "name": { + "maxLength": 256, + "minLength": 2, + "type": "string" + }, + "transformation": { + "nullable": true, + "type": "string" + }, + "transformationEnabled": { + "default": false, + "type": "boolean" + }, + "uid": { + "description": "The Source's UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "nullable": true, + "pattern": "^(?!src_)[a-zA-Z0-9_-]+$", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "IngestSourceOut": { + "oneOf": [ + { + "description": "Webhooks with no verification scheme or special handling.", + "properties": { + "type": { + "enum": [ + "genericWebhook" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/CronConfig" + }, + "type": { + "enum": [ + "cron" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/AdobeSignConfig" + }, + "type": { + "enum": [ + "adobeSign" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "beehiiv" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "brex" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "clerk" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/DocusignConfig" + }, + "type": { + "enum": [ + "docusign" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/GithubConfig" + }, + "type": { + "enum": [ + "github" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "guesty" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/HubspotConfig" + }, + "type": { + "enum": [ + "hubspot" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "incidentIo" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "lithic" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "nash" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "pleo" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "replicate" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "resend" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "safebase" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "sardine" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "type": { + "enum": [ + "segment" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/ShopifyConfig" + }, + "type": { + "enum": [ + "shopify" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SlackConfig" + }, + "type": { + "enum": [ + "slack" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/StripeConfig" + }, + "type": { + "enum": [ + "stripe" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "stych" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SvixConfig" + }, + "type": { + "enum": [ + "svix" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/ZoomConfig" + }, + "type": { + "enum": [ + "zoom" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + } + ], + "properties": { + "createdAt": { + "format": "date-time", + "type": "string" + }, + "id": { + "description": "The Source's ID.", + "example": "src_2yZwUhtgs5Ai8T9yRQJXA", + "maxLength": 26, + "minLength": 26, + "pattern": "^src_[A-Za-z0-9]{22}$", + "type": "string" + }, + "ingestUrl": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "name": { + "type": "string" + }, + "transformation": { + "nullable": true, + "type": "string" + }, + "transformationEnabled": { + "type": "boolean" + }, + "uid": { + "description": "The Source's UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "nullable": true, + "pattern": "^(?!src_)[a-zA-Z0-9_-]+$", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "createdAt", + "id", + "name", + "transformationEnabled", + "updatedAt" + ], + "type": "object" + }, + "IntegrationIn": { + "properties": { + "featureFlags": { + "description": "The set of feature flags the integration will have access to.", + "example": [], + "items": { + "example": "cool-new-feature", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "maxItems": 25, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "name": { + "example": "Example Integration", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "IntegrationKeyOut": { + "properties": { + "key": { + "example": "integsk_kV3ts5tKPNJN4Dl25cMTfUNdmabxbX0O", + "type": "string" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "IntegrationOut": { + "properties": { + "createdAt": { + "format": "date-time", + "type": "string" + }, + "featureFlags": { + "default": [], + "description": "The set of feature flags the integration has access to.", + "example": [], + "items": { + "example": "cool-new-feature", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "maxItems": 25, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "id": { + "description": "The Integration's ID.", + "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^integ_[A-Za-z0-9]{27}$", + "type": "string" + }, + "name": { + "example": "Example Integration", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "createdAt", + "id", + "name", + "updatedAt" + ], + "type": "object" + }, + "IntegrationUpdate": { + "properties": { + "featureFlags": { + "description": "The set of feature flags the integration will have access to.", + "example": [], + "items": { + "example": "cool-new-feature", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "maxItems": 25, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "name": { + "example": "Example Integration", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "KafkaSecurityProtocolType": { + "enum": [ + "plaintext", + "ssl", + "sasl-ssl" + ], + "type": "string" + }, + "ListResponse_ActiveApplicationOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/ActiveApplicationOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_ApplicationOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/ApplicationOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_ApplicationStats_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/ApplicationStats" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_BackgroundTaskOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/BackgroundTaskOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_EndpointMessageOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/EndpointMessageOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_EndpointOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/EndpointOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_EventTypeOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/EventTypeOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_IngestEndpointOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/IngestEndpointOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_IngestLogOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/IngestLogOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_IngestSourceOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/IngestSourceOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_IntegrationOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/IntegrationOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_MessageAttemptEndpointOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/MessageAttemptEndpointOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_MessageAttemptOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/MessageAttemptOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_MessageEndpointOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/MessageEndpointOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_MessageOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/MessageOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_OperationalWebhookEndpointOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/OperationalWebhookEndpointOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_SinkOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/SinkOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_StreamEventTypeOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/StreamEventTypeOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_StreamOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/StreamOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_StreamSinkOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/StreamSinkOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "example": "iterator", + "nullable": true, + "type": "string" + }, + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "ListResponse_TemplateOut_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/TemplateOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { "example": "iterator", "nullable": true, "type": "string" }, - "prevIterator": { - "example": "-iterator", + "prevIterator": { + "example": "-iterator", + "nullable": true, + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "MessageAttemptEndpointOut": { + "properties": { + "endpointId": { + "description": "The Endpoint's ID.", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "id": { + "description": "The MessageAttempt's ID.", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^atmpt_[A-Za-z0-9]{27}$", + "type": "string" + }, + "msg": { + "$ref": "#/components/schemas/MessageOut", + "nullable": true + }, + "msgId": { + "description": "The Message's ID.", + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^msg_[A-Za-z0-9]{27}$", + "type": "string" + }, + "response": { + "example": "{}", + "type": "string" + }, + "responseDurationMs": { + "description": "Response duration in milliseconds.", + "format": "int64", + "type": "integer" + }, + "responseStatusCode": { + "example": 200, + "format": "int16", + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/MessageStatus" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "triggerType": { + "$ref": "#/components/schemas/MessageAttemptTriggerType" + }, + "url": { + "example": "https://example.com/webhook/", + "format": "uri", + "maxLength": 65536, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "endpointId", + "id", + "msgId", + "response", + "responseDurationMs", + "responseStatusCode", + "status", + "timestamp", + "triggerType", + "url" + ], + "type": "object" + }, + "MessageAttemptExhaustedEvent": { + "description": "Sent when a message delivery has failed (all of the retry attempts have been exhausted).", + "properties": { + "data": { + "$ref": "#/components/schemas/MessageAttemptExhaustedEventData" + }, + "type": { + "default": "message.attempt.exhausted", + "enum": [ + "message.attempt.exhausted" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + "MessageAttemptExhaustedEventData": { + "description": "Sent when a message delivery has failed (all of the retry attempts have been exhausted) as a \"message.attempt.exhausted\" type or after it's failed four times as a \"message.attempt.failing\" event.", + "properties": { + "appId": { + "description": "The Application's ID.", + "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^app_[A-Za-z0-9]{27}$", + "type": "string" + }, + "appUid": { + "description": "The Application's UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "endpointId": { + "description": "The Endpoint's ID.", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "lastAttempt": { + "$ref": "#/components/schemas/MessageAttemptFailedData" + }, + "msgEventId": { + "description": "The Message's UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "msgId": { + "description": "The Message's ID.", + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^msg_[A-Za-z0-9]{27}$", + "type": "string" + } + }, + "required": [ + "appId", + "endpointId", + "lastAttempt", + "msgId" + ], + "type": "object" + }, + "MessageAttemptFailedData": { + "properties": { + "id": { + "description": "The MessageAttempt's ID.", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^atmpt_[A-Za-z0-9]{27}$", + "type": "string" + }, + "responseStatusCode": { + "format": "int16", + "type": "integer" + }, + "timestamp": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "responseStatusCode", + "timestamp" + ], + "type": "object" + }, + "MessageAttemptFailingEvent": { + "description": "Sent after a message has been failing for a few times.\nIt's sent on the fourth failure. It complements `message.attempt.exhausted` which is sent after the last failure.", + "properties": { + "data": { + "$ref": "#/components/schemas/MessageAttemptFailingEventData" + }, + "type": { + "default": "message.attempt.failing", + "enum": [ + "message.attempt.failing" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + "MessageAttemptFailingEventData": { + "description": "Sent when a message delivery has failed (all of the retry attempts have been exhausted) as a \"message.attempt.exhausted\" type or after it's failed four times as a \"message.attempt.failing\" event.", + "properties": { + "appId": { + "description": "The Application's ID.", + "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^app_[A-Za-z0-9]{27}$", + "type": "string" + }, + "appUid": { + "description": "The Application's UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "endpointId": { + "description": "The Endpoint's ID.", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "lastAttempt": { + "$ref": "#/components/schemas/MessageAttemptFailedData" + }, + "msgEventId": { + "description": "The Message's UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "msgId": { + "description": "The Message's ID.", + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^msg_[A-Za-z0-9]{27}$", + "type": "string" + } + }, + "required": [ + "appId", + "endpointId", + "lastAttempt", + "msgId" + ], + "type": "object" + }, + "MessageAttemptHeadersOut": { + "properties": { + "responseHeaders": { + "items": { + "items": { + "type": "string" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "nullable": true, + "type": "array" + }, + "sensitive": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "sentHeaders": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "required": [ + "sensitive", + "sentHeaders" + ], + "type": "object" + }, + "MessageAttemptOut": { + "properties": { + "endpointId": { + "description": "The Endpoint's ID.", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "id": { + "description": "The MessageAttempt's ID.", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^atmpt_[A-Za-z0-9]{27}$", + "type": "string" + }, + "msg": { + "$ref": "#/components/schemas/MessageOut", + "nullable": true + }, + "msgId": { + "description": "The Message's ID.", + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^msg_[A-Za-z0-9]{27}$", + "type": "string" + }, + "response": { + "example": "{}", + "type": "string" + }, + "responseDurationMs": { + "description": "Response duration in milliseconds.", + "format": "int64", + "type": "integer" + }, + "responseStatusCode": { + "example": 200, + "format": "int16", + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/MessageStatus" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "triggerType": { + "$ref": "#/components/schemas/MessageAttemptTriggerType" + }, + "url": { + "example": "https://example.com/webhook/", + "format": "uri", + "maxLength": 65536, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "endpointId", + "id", + "msgId", + "response", + "responseDurationMs", + "responseStatusCode", + "status", + "timestamp", + "triggerType", + "url" + ], + "type": "object" + }, + "MessageAttemptRecoveredEvent": { + "description": "Sent on a successful dispatch after an earlier failure op webhook has already been sent.", + "properties": { + "data": { + "$ref": "#/components/schemas/MessageAttemptRecoveredEventData" + }, + "type": { + "default": "message.attempt.recovered", + "enum": [ + "message.attempt.recovered" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + "MessageAttemptRecoveredEventData": { + "description": "Sent when a message delivery has failed (all of the retry attempts have been exhausted) as a \"message.attempt.exhausted\" type or after it's failed four times as a \"message.attempt.failing\" event.", + "properties": { + "appId": { + "description": "The Application's ID.", + "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^app_[A-Za-z0-9]{27}$", + "type": "string" + }, + "appUid": { + "description": "The Application's UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "endpointId": { + "description": "The Endpoint's ID.", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "lastAttempt": { + "$ref": "#/components/schemas/MessageAttemptFailedData" + }, + "msgEventId": { + "description": "The Message's UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "msgId": { + "description": "The Message's ID.", + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^msg_[A-Za-z0-9]{27}$", + "type": "string" + } + }, + "required": [ + "appId", + "endpointId", + "lastAttempt", + "msgId" + ], + "type": "object" + }, + "MessageAttemptTriggerType": { + "description": "The reason an attempt was made:\n- Scheduled = 0\n- Manual = 1", + "enum": [ + 0, + 1 + ], + "title": "MessageAttemptTriggerType", + "type": "integer", + "x-enum-varnames": [ + "Scheduled", + "Manual" + ] + }, + "MessageBroadcastIn": { + "properties": { + "channels": { + "description": "List of free-form identifiers that endpoints can filter by.", + "example": [ + "project_123", + "group_2" + ], + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "maxItems": 10, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "eventId": { + "description": "Optional unique identifier for the message.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "eventType": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "payload": { + "additionalProperties": true, + "example": { + "email": "test@example.com", + "type": "user.created", + "username": "test_user" + }, + "type": "object" + }, + "payloadRetentionHours": { + "default": null, + "description": "Optional number of hours to retain the message payload. Note that this is mutually exclusive with `payloadRetentionPeriod`.", + "format": "int64", + "maximum": 2160, + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "payloadRetentionPeriod": { + "default": 90, + "description": "Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with `payloadRetentionHours`.", + "example": 90, + "format": "int64", + "maximum": 90, + "minimum": 1, + "nullable": true, + "type": "integer" + } + }, + "required": [ + "eventType", + "payload" + ], + "type": "object" + }, + "MessageBroadcastOut": { + "properties": { + "id": { + "description": "The QueueBackgroundTask's ID.", + "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^qtask_[A-Za-z0-9]{27}$", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" + }, + "task": { + "$ref": "#/components/schemas/BackgroundTaskType" + } + }, + "required": [ + "id", + "status", + "task" + ], + "type": "object" + }, + "MessageEndpointOut": { + "properties": { + "channels": { + "description": "List of message channels this endpoint listens to (omit for all).", + "example": [ + "project_123", + "group_2" + ], + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "maxItems": 10, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "createdAt": { + "format": "date-time", + "type": "string" + }, + "description": { + "description": "An example endpoint name.", + "type": "string" + }, + "disabled": { + "default": false, + "example": false, + "type": "boolean" + }, + "filterTypes": { + "example": [ + "user.signup", + "user.deleted" + ], + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "id": { + "description": "The Endpoint's ID.", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "nextAttempt": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "rateLimit": { + "format": "uint16", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/MessageStatus" + }, + "uid": { + "description": "Optional unique identifier for the endpoint.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": "string" + }, + "url": { + "example": "https://example.com/webhook/", + "format": "uri", + "maxLength": 65536, + "minLength": 1, + "type": "string" + }, + "version": { + "deprecated": true, + "example": 1, + "format": "int32", + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "createdAt", + "description", + "id", + "status", + "updatedAt", + "url", + "version" + ], + "type": "object" + }, + "MessageEventsOut": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/MessageOut" + }, + "type": "array" + }, + "done": { + "type": "boolean" + }, + "iterator": { + "type": "string" + } + }, + "required": [ + "data", + "done", + "iterator" + ], + "type": "object" + }, + "MessageIn": { + "properties": { + "application": { + "$ref": "#/components/schemas/ApplicationIn", + "description": "Optionally creates a new application alongside the message.\n\nIf the application id or uid that is used in the path already exists, this argument is ignored.", + "nullable": true + }, + "channels": { + "description": "List of free-form identifiers that endpoints can filter by", + "example": [ + "project_123", + "group_2" + ], + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "maxItems": 10, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "eventId": { + "description": "Optional unique identifier for the message", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "eventType": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "payload": { + "additionalProperties": true, + "description": "JSON payload to send as the request body of the webhook.\n\nWe also support sending non-JSON payloads. Please contact us for more information.", + "example": { + "email": "test@example.com", + "type": "user.created", + "username": "test_user" + }, + "type": "object" + }, + "payloadRetentionHours": { + "default": null, + "description": "Optional number of hours to retain the message payload. Note that this is mutually exclusive with `payloadRetentionPeriod`.", + "format": "int64", + "maximum": 2160, + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "payloadRetentionPeriod": { + "default": 90, + "description": "Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with `payloadRetentionHours`.", + "example": 90, + "format": "int64", + "maximum": 90, + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "tags": { + "description": "List of free-form tags that can be filtered by when listing messages", + "example": [ + "my_tag", + "other" + ], + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", + "type": "string" + }, + "maxItems": 5, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "transformationsParams": { + "additionalProperties": true, + "description": "Extra parameters to pass to Transformations (for future use)", + "nullable": true, + "type": "object" + } + }, + "required": [ + "eventType", + "payload" + ], + "type": "object" + }, + "MessageOut": { + "properties": { + "channels": { + "description": "List of free-form identifiers that endpoints can filter by", + "example": [ + "project_123", + "group_2" + ], + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "maxItems": 10, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "eventId": { + "description": "Optional unique identifier for the message", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "eventType": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "id": { + "description": "The Message's ID.", + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^msg_[A-Za-z0-9]{27}$", + "type": "string" + }, + "payload": { + "additionalProperties": true, + "example": { + "email": "test@example.com", + "type": "user.created", + "username": "test_user" + }, + "type": "object" + }, + "tags": { + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "timestamp": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "eventType", + "id", + "payload", + "timestamp" + ], + "type": "object" + }, + "MessagePrecheckIn": { + "properties": { + "channels": { + "example": [ + "project_123", + "group_2" + ], + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "maxItems": 10, + "minItems": 1, "nullable": true, + "type": "array", + "uniqueItems": true + }, + "eventType": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + } + }, + "required": [ + "eventType" + ], + "type": "object" + }, + "MessagePrecheckOut": { + "properties": { + "active": { + "type": "boolean" + } + }, + "required": [ + "active" + ], + "type": "object" + }, + "MessageRawPayloadOut": { + "properties": { + "payload": { + "example": "{\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"}", + "type": "string" + } + }, + "required": [ + "payload" + ], + "type": "object" + }, + "MessageStatus": { + "description": "The sending status of the message:\n- Success = 0\n- Pending = 1\n- Fail = 2\n- Sending = 3", + "enum": [ + 0, + 1, + 2, + 3 + ], + "title": "MessageStatus", + "type": "integer", + "x-enum-varnames": [ + "Success", + "Pending", + "Fail", + "Sending" + ] + }, + "MessageSubscriberAuthTokenOut": { + "properties": { + "bridgeToken": { + "type": "string" + }, + "token": { "type": "string" } }, "required": [ - "data", - "done", - "iterator" + "bridgeToken", + "token" ], "type": "object" }, - "ListResponse_SinkOut_": { + "OAuthPayloadIn": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/SinkOut" - }, - "type": "array" - }, - "done": { - "type": "boolean" - }, - "iterator": { - "example": "iterator", - "nullable": true, + "code": { "type": "string" }, - "prevIterator": { - "example": "-iterator", - "nullable": true, + "redirectUri": { "type": "string" } }, "required": [ - "data", - "done", - "iterator" + "code", + "redirectUri" ], "type": "object" }, - "ListResponse_StreamEventTypeOut_": { + "OAuthPayloadOut": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/StreamEventTypeOut" - }, - "type": "array" - }, - "done": { - "type": "boolean" + "accessToken": { + "nullable": true, + "type": "string" }, - "iterator": { - "example": "iterator", + "error": { "nullable": true, "type": "string" }, - "prevIterator": { - "example": "-iterator", + "refreshToken": { "nullable": true, "type": "string" } }, + "type": "object" + }, + "Oauth2AuthMethodInOut": { + "description": "The method used for authenticating to the OAuth authorization server.\n\n`clientSecretJwt` will construct a JWT used for authentication with the oauth authorization server. This method is less commonly used and may not be supported by all oauth providers. `clientSecretBasic` will authenticate to the oauth authorization server using an `Authorization` header with the client secret as the value. This is the most common means of authentication. `clientSecretPost` will authenticate to the oauth authorization server by passing the client secret in a `client_secret` field in the request body. This method may not be supported by all oauth providers, and in general `clientSecretBasic` should be preferred.", + "enum": [ + "clientSecretJwt", + "clientSecretBasic", + "clientSecretPost" + ], + "type": "string" + }, + "Oauth2GrantTypeInOut": { + "enum": [ + "clientCredentials", + "refreshToken" + ], + "type": "string" + }, + "OauthJwsSigningAlgorithm": { + "enum": [ + "RS256" + ], + "type": "string" + }, + "OneTimeTokenIn": { + "properties": { + "oneTimeToken": { + "type": "string" + } + }, "required": [ - "data", - "done", - "iterator" + "oneTimeToken" ], "type": "object" }, - "ListResponse_StreamOut_": { + "OneTimeTokenOut": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/StreamOut" - }, - "type": "array" - }, - "done": { - "type": "boolean" - }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" - }, - "prevIterator": { - "example": "-iterator", - "nullable": true, + "token": { "type": "string" } }, "required": [ - "data", - "done", - "iterator" + "token" ], "type": "object" }, - "ListResponse_StreamSinkOut_": { + "OperationalWebhookEndpointHeadersIn": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/StreamSinkOut" + "headers": { + "additionalProperties": { + "type": "string" }, - "type": "array" - }, - "done": { - "type": "boolean" - }, - "iterator": { - "example": "iterator", - "nullable": true, - "type": "string" - }, - "prevIterator": { - "example": "-iterator", - "nullable": true, - "type": "string" + "example": { + "X-Example": "123", + "X-Foobar": "Bar" + }, + "type": "object" } }, "required": [ - "data", - "done", - "iterator" + "headers" ], "type": "object" }, - "ListResponse_TemplateOut_": { + "OperationalWebhookEndpointHeadersOut": { "properties": { - "data": { + "headers": { + "additionalProperties": { + "type": "string" + }, + "example": { + "X-Example": "123", + "X-Foobar": "Bar" + }, + "type": "object" + }, + "sensitive": { + "example": [ + "Authorization" + ], "items": { - "$ref": "#/components/schemas/TemplateOut" + "type": "string" }, - "type": "array" + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "headers", + "sensitive" + ], + "type": "object" + }, + "OperationalWebhookEndpointIn": { + "properties": { + "description": { + "default": "", + "example": "An example endpoint name", + "type": "string" }, - "done": { + "disabled": { + "default": false, + "example": false, "type": "boolean" }, - "iterator": { - "example": "iterator", + "filterTypes": { + "example": [ + "message.attempt.failing" + ], + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "type": "object" + }, + "rateLimit": { + "format": "uint16", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "secret": { + "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", "nullable": true, + "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", "type": "string" }, - "prevIterator": { - "example": "-iterator", + "uid": { + "description": "Optional unique identifier for the endpoint.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "url": { + "example": "https://example.com/webhook/", + "format": "uri", + "maxLength": 65536, + "minLength": 1, "type": "string" } }, "required": [ - "data", - "done", - "iterator" + "url" ], "type": "object" }, - "MessageAttemptEndpointOut": { + "OperationalWebhookEndpointOut": { "properties": { - "endpointId": { + "createdAt": { + "format": "date-time", + "type": "string" + }, + "description": { + "description": "An example endpoint name.", + "type": "string" + }, + "disabled": { + "default": false, + "example": false, + "type": "boolean" + }, + "filterTypes": { + "example": [ + "message.attempt.failing" + ], + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "id": { "description": "The Endpoint's ID.", "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", "maxLength": 30, @@ -3875,50 +6551,31 @@ "pattern": "^ep_[A-Za-z0-9]{27}$", "type": "string" }, - "id": { - "description": "The MessageAttempt's ID.", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^atmpt_[A-Za-z0-9]{27}$", - "type": "string" - }, - "msg": { - "$ref": "#/components/schemas/MessageOut", - "nullable": true - }, - "msgId": { - "description": "The Message's ID.", - "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^msg_[A-Za-z0-9]{27}$", - "type": "string" - }, - "response": { - "example": "{}", - "type": "string" - }, - "responseDurationMs": { - "description": "Response duration in milliseconds.", - "format": "int64", - "type": "integer" + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" }, - "responseStatusCode": { - "example": 200, - "format": "int16", + "rateLimit": { + "format": "uint16", + "minimum": 0, + "nullable": true, "type": "integer" }, - "status": { - "$ref": "#/components/schemas/MessageStatus" + "uid": { + "description": "Optional unique identifier for the endpoint.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "timestamp": { + "updatedAt": { "format": "date-time", "type": "string" }, - "triggerType": { - "$ref": "#/components/schemas/MessageAttemptTriggerType" - }, "url": { "example": "https://example.com/webhook/", "format": "uri", @@ -3928,52 +6585,85 @@ } }, "required": [ - "endpointId", + "createdAt", + "description", "id", - "msgId", - "response", - "responseDurationMs", - "responseStatusCode", - "status", - "timestamp", - "triggerType", + "metadata", + "updatedAt", "url" ], "type": "object" }, - "MessageAttemptExhaustedEvent": { - "description": "Sent when a message delivery has failed (all of the retry attempts have been exhausted).", + "OperationalWebhookEndpointSecretIn": { "properties": { - "data": { - "$ref": "#/components/schemas/MessageAttemptExhaustedEventData" - }, - "type": { - "default": "message.attempt.exhausted", - "enum": [ - "message.attempt.exhausted" - ], + "key": { + "default": null, + "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", + "nullable": true, + "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", + "type": "string" + } + }, + "type": "object" + }, + "OperationalWebhookEndpointSecretOut": { + "properties": { + "key": { + "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", + "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", "type": "string" } }, "required": [ - "data", - "type" + "key" ], "type": "object" }, - "MessageAttemptExhaustedEventData": { - "description": "Sent when a message delivery has failed (all of the retry attempts have been exhausted) as a \"message.attempt.exhausted\" type or after it's failed four times as a \"message.attempt.failing\" event.", + "OperationalWebhookEndpointUpdate": { "properties": { - "appId": { - "description": "The Application's ID.", - "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^app_[A-Za-z0-9]{27}$", + "description": { + "default": "", + "example": "An example endpoint name", "type": "string" }, - "appUid": { - "description": "The Application's UID.", + "disabled": { + "default": false, + "example": false, + "type": "boolean" + }, + "filterTypes": { + "example": [ + "message.attempt.failing" + ], + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "type": "object" + }, + "rateLimit": { + "format": "uint16", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "uid": { + "description": "Optional unique identifier for the endpoint.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -3981,19 +6671,50 @@ "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "endpointId": { - "description": "The Endpoint's ID.", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "pattern": "^ep_[A-Za-z0-9]{27}$", + "url": { + "example": "https://example.com/webhook/", + "format": "uri", + "maxLength": 65536, + "minLength": 1, "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "Ordering": { + "description": "Defines the ordering in a listing of results.", + "enum": [ + "ascending", + "descending" + ], + "type": "string" + }, + "PollingEndpointMessageOut": { + "description": "The MessageOut equivalent of polling endpoint", + "properties": { + "channels": { + "description": "List of free-form identifiers that endpoints can filter by", + "example": [ + "project_123", + "group_2" + ], + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "maxItems": 10, + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true }, - "lastAttempt": { - "$ref": "#/components/schemas/MessageAttemptFailedData" - }, - "msgEventId": { - "description": "The Message's UID.", + "eventId": { + "description": "Optional unique identifier for the message", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -4001,36 +6722,47 @@ "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "msgId": { + "eventType": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "nullable": true, + "type": "object" + }, + "id": { "description": "The Message's ID.", "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", "maxLength": 31, "minLength": 31, "pattern": "^msg_[A-Za-z0-9]{27}$", "type": "string" - } - }, - "required": [ - "appId", - "endpointId", - "lastAttempt", - "msgId" - ], - "type": "object" - }, - "MessageAttemptFailedData": { - "properties": { - "id": { - "description": "The MessageAttempt's ID.", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^atmpt_[A-Za-z0-9]{27}$", - "type": "string" }, - "responseStatusCode": { - "format": "int16", - "type": "integer" + "payload": { + "additionalProperties": true, + "example": { + "email": "test@example.com", + "type": "user.created", + "username": "test_user" + }, + "type": "object" + }, + "tags": { + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true }, "timestamp": { "format": "date-time", @@ -4038,388 +6770,427 @@ } }, "required": [ + "eventType", "id", - "responseStatusCode", + "payload", "timestamp" ], "type": "object" }, - "MessageAttemptFailingEvent": { - "description": "Sent after a message has been failing for a few times.\nIt's sent on the fourth failure. It complements `message.attempt.exhausted` which is sent after the last failure.", + "PollingEndpointOut": { "properties": { "data": { - "$ref": "#/components/schemas/MessageAttemptFailingEventData" + "items": { + "$ref": "#/components/schemas/PollingEndpointMessageOut" + }, + "type": "array" }, - "type": { - "default": "message.attempt.failing", - "enum": [ - "message.attempt.failing" - ], + "done": { + "type": "boolean" + }, + "iterator": { "type": "string" } }, "required": [ "data", - "type" + "done", + "iterator" ], "type": "object" }, - "MessageAttemptFailingEventData": { - "description": "Sent when a message delivery has failed (all of the retry attempts have been exhausted) as a \"message.attempt.exhausted\" type or after it's failed four times as a \"message.attempt.failing\" event.", + "RabbitMqConfig": { + "description": "Configuration for a RabbitMq sink.", "properties": { - "appId": { - "description": "The Application's ID.", - "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^app_[A-Za-z0-9]{27}$", + "routingKey": { "type": "string" }, - "appUid": { - "description": "The Application's UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "uri": { "type": "string" - }, - "endpointId": { - "description": "The Endpoint's ID.", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "pattern": "^ep_[A-Za-z0-9]{27}$", + } + }, + "required": [ + "routingKey", + "uri" + ], + "type": "object" + }, + "RecoverIn": { + "properties": { + "since": { + "format": "date-time", "type": "string" }, - "lastAttempt": { - "$ref": "#/components/schemas/MessageAttemptFailedData" - }, - "msgEventId": { - "description": "The Message's UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, + "until": { + "format": "date-time", "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "msgId": { - "description": "The Message's ID.", - "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^msg_[A-Za-z0-9]{27}$", "type": "string" } }, "required": [ - "appId", - "endpointId", - "lastAttempt", - "msgId" + "since" ], "type": "object" }, - "MessageAttemptHeadersOut": { + "RecoverOut": { "properties": { - "responseHeaders": { - "items": { - "items": { - "type": "string" - }, - "maxItems": 2, - "minItems": 2, - "type": "array" - }, - "nullable": true, - "type": "array" + "id": { + "description": "The QueueBackgroundTask's ID.", + "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^qtask_[A-Za-z0-9]{27}$", + "type": "string" }, - "sensitive": { - "items": { - "type": "string" - }, - "type": "array", - "uniqueItems": true + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" }, - "sentHeaders": { - "additionalProperties": { - "type": "string" - }, - "type": "object" + "task": { + "$ref": "#/components/schemas/BackgroundTaskType" } }, "required": [ - "sensitive", - "sentHeaders" + "id", + "status", + "task" ], "type": "object" }, - "MessageAttemptOut": { + "RedshiftConfig": { + "description": "Configuration parameters for defining a Redshift sink.", "properties": { - "endpointId": { - "description": "The Endpoint's ID.", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "pattern": "^ep_[A-Za-z0-9]{27}$", + "accessKeyId": { "type": "string" }, - "id": { - "description": "The MessageAttempt's ID.", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^atmpt_[A-Za-z0-9]{27}$", + "clusterIdentifier": { "type": "string" }, - "msg": { - "$ref": "#/components/schemas/MessageOut", - "nullable": true + "dbName": { + "description": "Database name.\n\nOnly required if not using transformations.", + "type": "string" }, - "msgId": { - "description": "The Message's ID.", - "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^msg_[A-Za-z0-9]{27}$", + "dbUser": { "type": "string" }, - "response": { - "example": "{}", + "region": { "type": "string" }, - "responseDurationMs": { - "description": "Response duration in milliseconds.", - "format": "int64", - "type": "integer" + "schemaName": { + "description": "Schema name.\n\nOnly used if not using transformations.", + "nullable": true, + "type": "string" }, - "responseStatusCode": { - "example": 200, - "format": "int16", - "type": "integer" + "secretAccessKey": { + "type": "string" }, - "status": { - "$ref": "#/components/schemas/MessageStatus" + "tableName": { + "description": "Table name.\n\nOnly required if not using transformations.", + "type": "string" + } + }, + "required": [ + "accessKeyId", + "clusterIdentifier", + "dbUser", + "region", + "secretAccessKey" + ], + "type": "object" + }, + "ReplayIn": { + "properties": { + "since": { + "format": "date-time", + "type": "string" }, - "timestamp": { + "until": { "format": "date-time", + "nullable": true, + "type": "string" + } + }, + "required": [ + "since" + ], + "type": "object" + }, + "ReplayOut": { + "properties": { + "id": { + "description": "The QueueBackgroundTask's ID.", + "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^qtask_[A-Za-z0-9]{27}$", "type": "string" }, - "triggerType": { - "$ref": "#/components/schemas/MessageAttemptTriggerType" + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" + }, + "task": { + "$ref": "#/components/schemas/BackgroundTaskType" + } + }, + "required": [ + "id", + "status", + "task" + ], + "type": "object" + }, + "RetrySchedule": { + "items": { + "$ref": "#/components/schemas/Duration" + }, + "type": "array" + }, + "RetryScheduleInOut": { + "properties": { + "retrySchedule": { + "$ref": "#/components/schemas/RetrySchedule", + "nullable": true + } + }, + "type": "object" + }, + "RotatePollerTokenIn": { + "properties": { + "expiry": { + "description": "How long the token will be valid for, in seconds. Can be up to 31,536,000 seconds (1 year).", + "format": "int64", + "maximum": 31536000, + "minimum": 1, + "nullable": true, + "type": "integer" }, - "url": { - "example": "https://example.com/webhook/", - "format": "uri", - "maxLength": 65536, - "minLength": 1, + "oldTokenExpiry": { + "default": 300, + "description": "Updates the previous token's expiration, in seconds.\n\nIf set to 0, the old token will immediately be revoked. Must be between 0 and 86,400 seconds (1 day).\n\nDefaults to 300 seconds (5 minutes).", + "format": "int64", + "maximum": 86400, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "RotateTokenOut": { + "properties": { + "ingestUrl": { "type": "string" } }, "required": [ - "endpointId", - "id", - "msgId", - "response", - "responseDurationMs", - "responseStatusCode", - "status", - "timestamp", - "triggerType", - "url" + "ingestUrl" ], "type": "object" }, - "MessageAttemptRecoveredEvent": { - "description": "Sent on a successful dispatch after an earlier failure op webhook has already been sent.", + "RotatedUrlOut": { "properties": { - "data": { - "$ref": "#/components/schemas/MessageAttemptRecoveredEventData" - }, - "type": { - "default": "message.attempt.recovered", - "enum": [ - "message.attempt.recovered" - ], + "url": { "type": "string" } }, "required": [ - "data", - "type" + "url" ], "type": "object" }, - "MessageAttemptRecoveredEventData": { - "description": "Sent when a message delivery has failed (all of the retry attempts have been exhausted) as a \"message.attempt.exhausted\" type or after it's failed four times as a \"message.attempt.failing\" event.", + "S3Config": { "properties": { - "appId": { - "description": "The Application's ID.", - "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^app_[A-Za-z0-9]{27}$", - "type": "string" - }, - "appUid": { - "description": "The Application's UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "accessKeyId": { "type": "string" }, - "endpointId": { - "description": "The Endpoint's ID.", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "pattern": "^ep_[A-Za-z0-9]{27}$", + "bucket": { "type": "string" }, - "lastAttempt": { - "$ref": "#/components/schemas/MessageAttemptFailedData" - }, - "msgEventId": { - "description": "The Message's UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "region": { "type": "string" }, - "msgId": { - "description": "The Message's ID.", - "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^msg_[A-Za-z0-9]{27}$", + "secretAccessKey": { "type": "string" } }, "required": [ - "appId", - "endpointId", - "lastAttempt", - "msgId" + "accessKeyId", + "bucket", + "region", + "secretAccessKey" ], "type": "object" }, - "MessageAttemptTriggerType": { - "description": "The reason an attempt was made:\n- Scheduled = 0\n- Manual = 1", - "enum": [ - 0, - 1 + "SegmentConfig": { + "properties": { + "secret": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ShopifyConfig": { + "properties": { + "secret": { + "type": "string" + } + }, + "required": [ + "secret" ], - "title": "MessageAttemptTriggerType", - "type": "integer", - "x-enum-varnames": [ - "Scheduled", - "Manual" - ] + "type": "object" }, - "MessageBroadcastIn": { + "SinkHttpConfig": { "properties": { - "channels": { - "description": "List of free-form identifiers that endpoints can filter by.", - "example": [ - "project_123", - "group_2" - ], - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "headers": { + "additionalProperties": { "type": "string" }, - "maxItems": 10, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true + "default": {}, + "type": "object" }, - "eventId": { - "description": "Optional unique identifier for the message.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, + "key": { + "default": null, "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "eventType": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "url": { + "format": "uri", "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "SinkIn": { + "oneOf": [ + { + "properties": { + "routingKey": { + "type": "string" + }, + "type": { + "enum": [ + "rabbitMQ" + ], + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "required": [ + "routingKey", + "type", + "uri" + ], + "type": "object" }, - "payload": { - "additionalProperties": true, - "example": { - "email": "test@example.com", - "type": "user.created", - "username": "test_user" + { + "properties": { + "accessKey": { + "type": "string" + }, + "queueDsn": { + "format": "uri", + "type": "string" + }, + "region": { + "type": "string" + }, + "secretKey": { + "type": "string" + }, + "type": { + "enum": [ + "sqs" + ], + "type": "string" + } + }, + "required": [ + "accessKey", + "queueDsn", + "region", + "secretKey", + "type" + ], + "type": "object" + }, + { + "properties": { + "brokers": { + "type": "string" + }, + "saslPassword": { + "description": "Password for SASL, if `security_protocol` is `sasl-ssl`.", + "nullable": true, + "type": "string" + }, + "saslUsername": { + "description": "Username for SASL, if `security_protocol` is `sasl-ssl`.", + "nullable": true, + "type": "string" + }, + "securityProtocol": { + "$ref": "#/components/schemas/KafkaSecurityProtocolType" + }, + "topic": { + "type": "string" + }, + "type": { + "enum": [ + "kafka" + ], + "type": "string" + } }, + "required": [ + "brokers", + "securityProtocol", + "topic", + "type" + ], "type": "object" }, - "payloadRetentionHours": { - "default": null, - "description": "Optional number of hours to retain the message payload. Note that this is mutually exclusive with `payloadRetentionPeriod`.", - "format": "int64", - "maximum": 2160, - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "payloadRetentionPeriod": { - "default": 90, - "description": "Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with `payloadRetentionHours`.", - "example": 90, - "format": "int64", - "maximum": 90, - "minimum": 1, - "nullable": true, - "type": "integer" - } - }, - "required": [ - "eventType", - "payload" - ], - "type": "object" - }, - "MessageBroadcastOut": { - "properties": { - "id": { - "description": "The QueueBackgroundTask's ID.", - "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^qtask_[A-Za-z0-9]{27}$", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" + { + "properties": { + "type": { + "enum": [ + "http" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "type": "object" }, - "task": { - "$ref": "#/components/schemas/BackgroundTaskType" + { + "properties": { + "type": { + "enum": [ + "eventStream" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" } - }, - "required": [ - "id", - "status", - "task" ], - "type": "object" - }, - "MessageEndpointOut": { "properties": { "channels": { - "description": "List of message channels this endpoint listens to (omit for all).", + "description": "List of message channels this sink listens to (omit for all).", "example": [ "project_123", "group_2" @@ -4436,12 +7207,9 @@ "type": "array", "uniqueItems": true }, - "createdAt": { - "format": "date-time", - "type": "string" - }, "description": { - "description": "An example endpoint name.", + "default": "", + "example": "An example endpoint name", "type": "string" }, "disabled": { @@ -4466,98 +7234,178 @@ "type": "array", "uniqueItems": true }, - "id": { - "description": "The Endpoint's ID.", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "pattern": "^ep_[A-Za-z0-9]{27}$", - "type": "string" - }, - "nextAttempt": { - "format": "date-time", - "nullable": true, - "type": "string" + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "type": "object" }, "rateLimit": { "format": "uint16", - "minimum": 0, + "minimum": 1, "nullable": true, "type": "integer" }, - "status": { - "$ref": "#/components/schemas/MessageStatus" + "secret": { + "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", + "nullable": true, + "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", + "type": "string" }, "uid": { - "description": "Optional unique identifier for the endpoint.", + "description": "Optional unique identifier for the sink.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, "nullable": true, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - }, + } + }, + "type": "object" + }, + "SinkOtelV1Config": { + "properties": { "url": { - "example": "https://example.com/webhook/", "format": "uri", - "maxLength": 65536, - "minLength": 1, "type": "string" - }, - "version": { - "deprecated": true, - "example": 1, - "format": "int32", - "minimum": 1, - "type": "integer" } }, "required": [ - "createdAt", - "description", - "id", - "status", - "updatedAt", - "url", - "version" + "url" ], "type": "object" }, - "MessageEventsOut": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/MessageOut" + "SinkOut": { + "oneOf": [ + { + "properties": { + "routingKey": { + "type": "string" + }, + "type": { + "enum": [ + "rabbitMQ" + ], + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "required": [ + "routingKey", + "type", + "uri" + ], + "type": "object" + }, + { + "properties": { + "accessKey": { + "type": "string" + }, + "queueDsn": { + "format": "uri", + "type": "string" + }, + "region": { + "type": "string" + }, + "secretKey": { + "type": "string" + }, + "type": { + "enum": [ + "sqs" + ], + "type": "string" + } + }, + "required": [ + "accessKey", + "queueDsn", + "region", + "secretKey", + "type" + ], + "type": "object" + }, + { + "properties": { + "brokers": { + "type": "string" + }, + "saslPassword": { + "description": "Password for SASL, if `security_protocol` is `sasl-ssl`.", + "nullable": true, + "type": "string" + }, + "saslUsername": { + "description": "Username for SASL, if `security_protocol` is `sasl-ssl`.", + "nullable": true, + "type": "string" + }, + "securityProtocol": { + "$ref": "#/components/schemas/KafkaSecurityProtocolType" + }, + "topic": { + "type": "string" + }, + "type": { + "enum": [ + "kafka" + ], + "type": "string" + } + }, + "required": [ + "brokers", + "securityProtocol", + "topic", + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "http" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } }, - "type": "array" - }, - "done": { - "type": "boolean" + "required": [ + "type", + "url" + ], + "type": "object" }, - "iterator": { - "type": "string" + { + "properties": { + "type": { + "enum": [ + "eventStream" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" } - }, - "required": [ - "data", - "done", - "iterator" ], - "type": "object" - }, - "MessageIn": { "properties": { - "application": { - "$ref": "#/components/schemas/ApplicationIn", - "description": "Optionally creates a new application alongside the message.\n\nIf the application id or uid that is used in the path already exists, this argument is ignored.", - "nullable": true - }, "channels": { - "description": "List of free-form identifiers that endpoints can filter by", + "description": "List of message channels this endpoint listens to (omit for all).", "example": [ "project_123", "group_2" @@ -4574,103 +7422,58 @@ "type": "array", "uniqueItems": true }, - "eventId": { - "description": "Optional unique identifier for the message", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "createdAt": { + "format": "date-time", "type": "string" }, - "eventType": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": { + "description": "An example endpoint name.", "type": "string" }, - "payload": { - "additionalProperties": true, - "description": "JSON payload to send as the request body of the webhook.\n\nWe also support sending non-JSON payloads. Please contact us for more information.", - "example": { - "email": "test@example.com", - "type": "user.created", - "username": "test_user" - }, - "type": "object" - }, - "payloadRetentionHours": { - "default": null, - "description": "Optional number of hours to retain the message payload. Note that this is mutually exclusive with `payloadRetentionPeriod`.", - "format": "int64", - "maximum": 2160, - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "payloadRetentionPeriod": { - "default": 90, - "description": "Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with `payloadRetentionHours`.", - "example": 90, - "format": "int64", - "maximum": 90, - "minimum": 1, - "nullable": true, - "type": "integer" + "disabled": { + "default": false, + "example": false, + "type": "boolean" }, - "tags": { - "description": "List of free-form tags that can be filtered by when listing messages", + "filterTypes": { "example": [ - "my_tag", - "other" + "user.signup", + "user.deleted" ], "items": { - "example": "project_1337", - "maxLength": 128, + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "maxItems": 5, + "minItems": 1, "nullable": true, "type": "array", "uniqueItems": true }, - "transformationsParams": { - "additionalProperties": true, - "description": "Extra parameters to pass to Transformations (for future use)", - "nullable": true, - "type": "object" - } - }, - "required": [ - "eventType", - "payload" - ], - "type": "object" - }, - "MessageOut": { - "properties": { - "channels": { - "description": "List of free-form identifiers that endpoints can filter by", - "example": [ - "project_123", - "group_2" - ], - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "id": { + "description": "The Endpoint's ID.", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "metadata": { + "additionalProperties": { "type": "string" }, - "maxItems": 10, - "minItems": 1, + "type": "object" + }, + "rateLimit": { + "format": "uint16", + "minimum": 0, "nullable": true, - "type": "array", - "uniqueItems": true + "type": "integer" }, - "eventId": { - "description": "Optional unique identifier for the message", + "uid": { + "description": "Optional unique identifier for the endpoint.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -4678,353 +7481,525 @@ "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "eventType": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "id": { - "description": "The Message's ID.", - "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^msg_[A-Za-z0-9]{27}$", - "type": "string" - }, - "payload": { - "additionalProperties": true, - "example": { - "email": "test@example.com", - "type": "user.created", - "username": "test_user" - }, - "type": "object" - }, - "tags": { - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "timestamp": { + "updatedAt": { "format": "date-time", "type": "string" } }, "required": [ - "eventType", + "createdAt", + "description", "id", - "payload", - "timestamp" + "metadata", + "updatedAt" ], "type": "object" }, - "MessagePrecheckIn": { + "SinkPayloadFormat": { + "enum": [ + "json" + ], + "type": "string" + }, + "SinkSecretOut": { "properties": { - "channels": { - "example": [ - "project_123", - "group_2" - ], - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "maxItems": 10, - "minItems": 1, + "key": { + "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", + "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", + "nullable": true, + "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", + "type": "string" + } + }, + "type": "object" + }, + "SinkStatus": { + "enum": [ + "enabled", + "paused", + "disabled", + "retrying" + ], + "type": "string" + }, + "SinkStatusIn": { + "enum": [ + "enabled", + "disabled" + ], + "type": "string" + }, + "SinkTransformIn": { + "properties": { + "code": { + "maxLength": 51200, + "minLength": 10, + "nullable": true, + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "SinkTransformationOut": { + "properties": { + "code": { "nullable": true, - "type": "array", - "uniqueItems": true + "type": "string" }, - "eventType": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "enabled": { + "default": true, + "type": "boolean" + } + }, + "type": "object" + }, + "SlackChallengeResponse": { + "properties": { + "challenge": { "type": "string" } }, "required": [ - "eventType" + "challenge" ], "type": "object" }, - "MessagePrecheckOut": { + "SlackConfig": { "properties": { - "active": { - "type": "boolean" + "secret": { + "type": "string" } }, "required": [ - "active" + "secret" ], "type": "object" }, - "MessageRawPayloadOut": { + "SnowflakeConfig": { + "description": "Configuration parameters for defining a Snowflake sink.", "properties": { - "payload": { - "example": "{\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"}", + "accountIdentifier": { + "description": "Snowflake account identifier, which includes both the organization and account IDs separated by a hyphen.", + "type": "string" + }, + "dbName": { + "description": "Database name.\n\nOnly required if not using transformations.", + "type": "string" + }, + "privateKey": { + "description": "PEM-encoded private key used for signing token-based requests to the Snowflake API.\n\nBeginning/end delimiters are not required.", + "type": "string" + }, + "schemaName": { + "description": "Schema name.\n\nOnly required if not using transformations.", + "type": "string" + }, + "tableName": { + "description": "Table name.\n\nOnly required if not using transformations.", + "type": "string" + }, + "userId": { + "description": "The Snowflake user id.", "type": "string" } }, "required": [ - "payload" + "accountIdentifier", + "privateKey", + "userId" ], "type": "object" }, - "MessageStatus": { - "description": "The sending status of the message:\n- Success = 0\n- Pending = 1\n- Fail = 2\n- Sending = 3", + "StatisticsPeriod": { + "description": "Period length for a statistics data point.", + "enum": [ + "OneDay", + "FiveMinutes" + ], + "type": "string" + }, + "StatusCodeClass": { + "description": "The different classes of HTTP status codes:\n- CodeNone = 0\n- Code1xx = 100\n- Code2xx = 200\n- Code3xx = 300\n- Code4xx = 400\n- Code5xx = 500", "enum": [ 0, - 1, - 2, - 3 + 100, + 200, + 300, + 400, + 500 ], - "title": "MessageStatus", + "title": "StatusCodeClass", "type": "integer", "x-enum-varnames": [ - "Success", - "Pending", - "Fail", - "Sending" + "CodeNone", + "Code1xx", + "Code2xx", + "Code3xx", + "Code4xx", + "Code5xx" ] }, - "MessageSubscriberAuthTokenOut": { + "StreamEventTypeIn": { "properties": { - "bridgeToken": { + "description": { + "nullable": true, "type": "string" }, - "token": { + "name": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" } }, "required": [ - "bridgeToken", - "token" + "name" ], "type": "object" }, - "OAuthPayloadIn": { + "StreamEventTypeOut": { "properties": { - "code": { + "createdAt": { + "format": "date-time", "type": "string" }, - "redirectUri": { + "description": { + "nullable": true, + "type": "string" + }, + "name": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "updatedAt": { + "format": "date-time", "type": "string" } }, "required": [ - "code", - "redirectUri" + "createdAt", + "name", + "updatedAt" ], "type": "object" }, - "OAuthPayloadOut": { + "StreamEventTypePatch": { "properties": { - "accessToken": { - "nullable": true, - "type": "string" - }, - "error": { + "description": { "nullable": true, "type": "string" }, - "refreshToken": { + "name": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, "nullable": true, - "type": "string" - } - }, - "type": "object" - }, - "Oauth2AuthMethodInOut": { - "description": "The method used for authenticating to the OAuth authorization server.\n\n`clientSecretJwt` will construct a JWT used for authentication with the oauth authorization server. This method is less commonly used and may not be supported by all oauth providers. `clientSecretBasic` will authenticate to the oauth authorization server using an `Authorization` header with the client secret as the value. This is the most common means of authentication. `clientSecretPost` will authenticate to the oauth authorization server by passing the client secret in a `client_secret` field in the request body. This method may not be supported by all oauth providers, and in general `clientSecretBasic` should be preferred.", - "enum": [ - "clientSecretJwt", - "clientSecretBasic", - "clientSecretPost" - ], - "type": "string" - }, - "Oauth2GrantTypeInOut": { - "enum": [ - "clientCredentials", - "refreshToken" - ], - "type": "string" - }, - "OauthJwsSigningAlgorithm": { - "enum": [ - "RS256" - ], - "type": "string" - }, - "OneTimeTokenIn": { - "properties": { - "oneTimeToken": { + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" } }, "required": [ - "oneTimeToken" + "description" ], "type": "object" }, - "OneTimeTokenOut": { + "StreamIn": { "properties": { - "token": { + "description": { + "description": "The stream's description.", + "minLength": 1, + "type": "string" + }, + "uid": { + "description": "An optional unique identifier for the stream.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "nullable": true, + "pattern": "^(?!strm_)[a-zA-Z0-9_-]+$", "type": "string" } }, "required": [ - "token" + "description" ], "type": "object" }, - "OperationalWebhookEndpointHeadersIn": { + "StreamOut": { "properties": { - "headers": { - "additionalProperties": { - "type": "string" - }, - "example": { - "X-Example": "123", - "X-Foobar": "Bar" - }, - "type": "object" + "createdAt": { + "format": "date-time", + "type": "string" + }, + "description": { + "description": "The stream's description.", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The stream's ID.", + "example": "strm_2yZwUhtgs5Ai8T9yRQJXA", + "maxLength": 27, + "minLength": 27, + "pattern": "^strm_[A-Za-z0-9]{22}$", + "type": "string" + }, + "uid": { + "description": "The stream's UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "nullable": true, + "pattern": "^(?!strm_)[a-zA-Z0-9_-]+$", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": "string" } }, "required": [ - "headers" + "createdAt", + "id", + "updatedAt" ], "type": "object" }, - "OperationalWebhookEndpointHeadersOut": { + "StreamPatch": { "properties": { - "headers": { - "additionalProperties": { - "type": "string" - }, - "example": { - "X-Example": "123", - "X-Foobar": "Bar" - }, - "type": "object" + "description": { + "description": "The Stream's description.", + "type": "string" }, - "sensitive": { - "example": [ - "Authorization" - ], - "items": { - "type": "string" - }, - "type": "array", - "uniqueItems": true + "uid": { + "description": "An optional unique identifier for the stream.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "nullable": true, + "pattern": "^(?!strm_)[a-zA-Z0-9_-]+$", + "type": "string" } }, - "required": [ - "headers", - "sensitive" - ], "type": "object" }, - "OperationalWebhookEndpointIn": { + "StreamPortalAccessIn": { "properties": { - "description": { - "default": "", - "example": "An example endpoint name", - "type": "string" - }, - "disabled": { - "default": false, - "example": false, - "type": "boolean" + "expiry": { + "default": 604800, + "description": "How long the token will be valid for, in seconds.\n\nValid values are between 1 hour and 7 days. The default is 7 days.", + "format": "uint64", + "maximum": 604800, + "minimum": 3600, + "nullable": true, + "type": "integer" }, - "filterTypes": { - "example": [ - "message.attempt.failing" - ], + "featureFlags": { + "description": "The set of feature flags the created token will have access to.", + "example": [], "items": { - "description": "The event type's name", - "example": "user.signup", + "example": "cool-new-feature", "maxLength": 256, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, + "maxItems": 25, "minItems": 1, - "nullable": true, "type": "array", "uniqueItems": true }, - "metadata": { - "additionalProperties": { - "type": "string" + "readOnly": { + "description": "Whether the app portal should be in read-only mode.", + "nullable": true, + "type": "boolean" + } + }, + "type": "object" + }, + "StreamSinkIn": { + "oneOf": [ + { + "properties": { + "config": { + "$ref": "#/components/schemas/AzureBlobStorageConfig" + }, + "type": { + "enum": [ + "azureBlobStorage" + ], + "type": "string" + } }, - "default": {}, + "required": [ + "config", + "type" + ], "type": "object" }, - "rateLimit": { - "format": "uint16", - "minimum": 1, - "nullable": true, - "type": "integer" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SinkOtelV1Config" + }, + "type": { + "enum": [ + "otelV1HttpTrace" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "secret": { - "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", - "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", - "nullable": true, - "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SinkHttpConfig" + }, + "type": { + "enum": [ + "http" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "uid": { - "description": "Optional unique identifier for the endpoint.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/S3Config" + }, + "type": { + "enum": [ + "amazonS3" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "url": { - "example": "https://example.com/webhook/", - "format": "uri", - "maxLength": 65536, - "minLength": 1, - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SnowflakeConfig" + }, + "type": { + "enum": [ + "snowflake" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/GoogleCloudStorageConfig" + }, + "type": { + "enum": [ + "googleCloudStorage" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/RedshiftConfig" + }, + "type": { + "enum": [ + "redshift" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/BigQueryConfig" + }, + "type": { + "enum": [ + "bigQuery" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/RabbitMqConfig" + }, + "type": { + "enum": [ + "rabbitMq" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" } - }, - "required": [ - "url" ], - "type": "object" - }, - "OperationalWebhookEndpointOut": { "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "description": { - "description": "An example endpoint name.", - "type": "string" - }, - "disabled": { - "default": false, - "example": false, - "type": "boolean" + "batchSize": { + "default": 100, + "description": "How many events we will attempt to accumulate before sending a request to the Sink.", + "format": "uint16", + "maximum": 1000, + "minimum": 0, + "type": "integer" }, - "filterTypes": { - "example": [ - "message.attempt.failing" - ], + "eventTypes": { + "default": [], + "description": "A list of event types that filter which events are dispatched to the Sink. An empty list (or null) will not filter out any events.", "items": { "description": "The event type's name", "example": "user.signup", @@ -5032,105 +8007,220 @@ "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "id": { - "description": "The Endpoint's ID.", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "pattern": "^ep_[A-Za-z0-9]{27}$", - "type": "string" + "type": "array" }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "type": "object" + "format": { + "$ref": "#/components/schemas/SinkPayloadFormat", + "description": "The format of data sent to the sink. When events are dispatched to the sink, we will attempt to send them in the preferred format. (Note that for some sink types, such as `amazonS3`, the format is ignored.)" }, - "rateLimit": { + "maxWaitSecs": { + "default": 0, + "description": "How many seconds we will wait to accumulate events of `batchSize`, before sending a request to the Sink. For example, with a `batchSize` of 100 and `maxWaitSecs` of 10, we will wait _at most_ 10 seconds before sending a request to the Sink. If 100 events accumulate faster than 10 seconds, we will send the request to the Sink as soon as possible.", "format": "uint16", + "maximum": 3600, "minimum": 0, - "nullable": true, "type": "integer" }, + "status": { + "$ref": "#/components/schemas/SinkStatusIn", + "default": "enabled", + "description": "Whether the sink will receive events.\n\nIf the sink is `enabled`, any events posted to the stream will be dispatched to the Sink in the same order that events were posted to the stream.\n\nIf the sink is `paused`, events will *not* be dispatched to the sink until the sink is reenabled." + }, "uid": { - "description": "Optional unique identifier for the endpoint.", + "description": "An optional unique identifier for the sink.", "example": "unique-identifier", - "maxLength": 256, + "maxLength": 60, "minLength": 1, "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - }, - "url": { - "example": "https://example.com/webhook/", - "format": "uri", - "maxLength": 65536, - "minLength": 1, + "pattern": "^(?!sink_)[a-zA-Z0-9_-]+$", "type": "string" } }, "required": [ - "createdAt", - "description", - "id", - "metadata", - "updatedAt", - "url" + "format" ], "type": "object" }, - "OperationalWebhookEndpointSecretIn": { - "properties": { - "key": { - "default": null, - "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", - "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", - "nullable": true, - "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", - "type": "string" - } - }, - "type": "object" - }, - "OperationalWebhookEndpointSecretOut": { - "properties": { - "key": { - "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", - "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", - "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", - "type": "string" + "StreamSinkOut": { + "oneOf": [ + { + "properties": { + "config": { + "$ref": "#/components/schemas/AzureBlobStorageConfig" + }, + "type": { + "enum": [ + "azureBlobStorage" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SinkOtelV1Config" + }, + "type": { + "enum": [ + "otelV1HttpTrace" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SinkHttpConfig" + }, + "type": { + "enum": [ + "http" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/S3Config" + }, + "type": { + "enum": [ + "amazonS3" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SnowflakeConfig" + }, + "type": { + "enum": [ + "snowflake" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/GoogleCloudStorageConfig" + }, + "type": { + "enum": [ + "googleCloudStorage" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/RedshiftConfig" + }, + "type": { + "enum": [ + "redshift" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/BigQueryConfig" + }, + "type": { + "enum": [ + "bigQuery" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/RabbitMqConfig" + }, + "type": { + "enum": [ + "rabbitMq" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" } - }, - "required": [ - "key" ], - "type": "object" - }, - "OperationalWebhookEndpointUpdate": { "properties": { - "description": { - "default": "", - "example": "An example endpoint name", + "batchSize": { + "format": "int32", + "type": "integer" + }, + "createdAt": { + "format": "date-time", "type": "string" }, - "disabled": { - "default": false, - "example": false, - "type": "boolean" + "currentIterator": { + "nullable": true, + "type": "string" }, - "filterTypes": { - "example": [ - "message.attempt.failing" - ], + "eventTypes": { + "default": [], "items": { "description": "The event type's name", "example": "user.signup", @@ -5138,2092 +8228,2096 @@ "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "minItems": 1, + "type": "array" + }, + "failureReason": { "nullable": true, - "type": "array", - "uniqueItems": true + "type": "string" }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "type": "object" + "format": { + "$ref": "#/components/schemas/SinkPayloadFormat" }, - "rateLimit": { - "format": "uint16", - "minimum": 1, - "nullable": true, + "id": { + "description": "The sink's ID.", + "example": "sink_2yZwUhtgs5Ai8T9yRQJXA", + "maxLength": 27, + "minLength": 27, + "pattern": "^sink_[A-Za-z0-9]{22}$", + "type": "string" + }, + "maxWaitSecs": { + "format": "int32", "type": "integer" }, + "status": { + "$ref": "#/components/schemas/SinkStatus" + }, "uid": { - "description": "Optional unique identifier for the endpoint.", + "description": "The sink's UID.", "example": "unique-identifier", - "maxLength": 256, + "maxLength": 60, "minLength": 1, "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "pattern": "^(?!sink_)[a-zA-Z0-9_-]+$", "type": "string" }, - "url": { - "example": "https://example.com/webhook/", - "format": "uri", - "maxLength": 65536, - "minLength": 1, + "updatedAt": { + "format": "date-time", "type": "string" } }, "required": [ - "url" + "batchSize", + "createdAt", + "format", + "id", + "maxWaitSecs", + "status", + "updatedAt" ], "type": "object" }, - "Ordering": { - "description": "Defines the ordering in a listing of results.", - "enum": [ - "ascending", - "descending" - ], - "type": "string" - }, - "PollingEndpointMessageOut": { - "description": "The MessageOut equivalent of polling endpoint", - "properties": { - "channels": { - "description": "List of free-form identifiers that endpoints can filter by", - "example": [ - "project_123", - "group_2" + "StreamSinkPatch": { + "oneOf": [ + { + "properties": { + "config": { + "$ref": "#/components/schemas/AzureBlobStorageConfig" + }, + "type": { + "enum": [ + "azureBlobStorage" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" ], - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SinkOtelV1Config" + }, + "type": { + "enum": [ + "otelV1HttpTrace" + ], + "type": "string" + } }, - "maxItems": 10, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true + "required": [ + "config", + "type" + ], + "type": "object" }, - "eventId": { - "description": "Optional unique identifier for the message", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SinkHttpConfig" + }, + "type": { + "enum": [ + "http" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "eventType": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/S3Config" + }, + "type": { + "enum": [ + "amazonS3" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "headers": { - "additionalProperties": { - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/SnowflakeConfig" + }, + "type": { + "enum": [ + "snowflake" + ], + "type": "string" + } }, - "nullable": true, + "required": [ + "config", + "type" + ], "type": "object" }, - "id": { - "description": "The Message's ID.", - "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^msg_[A-Za-z0-9]{27}$", - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/GoogleCloudStorageConfig" + }, + "type": { + "enum": [ + "googleCloudStorage" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" }, - "payload": { - "additionalProperties": true, - "example": { - "email": "test@example.com", - "type": "user.created", - "username": "test_user" + { + "properties": { + "config": { + "$ref": "#/components/schemas/RedshiftConfig" + }, + "type": { + "enum": [ + "redshift" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/BigQueryConfig" + }, + "type": { + "enum": [ + "bigQuery" + ], + "type": "string" + } }, + "required": [ + "config", + "type" + ], "type": "object" }, - "tags": { - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + { + "properties": { + "config": { + "$ref": "#/components/schemas/RabbitMqConfig" + }, + "type": { + "enum": [ + "rabbitMq" + ], + "type": "string" + } }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "timestamp": { - "format": "date-time", - "type": "string" + "required": [ + "config", + "type" + ], + "type": "object" } - }, - "required": [ - "eventType", - "id", - "payload", - "timestamp" ], - "type": "object" - }, - "PollingEndpointOut": { "properties": { - "data": { + "batchSize": { + "default": null, + "format": "uint16", + "maximum": 1000, + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "eventTypes": { "items": { - "$ref": "#/components/schemas/PollingEndpointMessageOut" + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, "type": "array" }, - "done": { - "type": "boolean" + "format": { + "$ref": "#/components/schemas/SinkPayloadFormat", + "default": null, + "nullable": true }, - "iterator": { + "maxWaitSecs": { + "default": null, + "format": "uint16", + "maximum": 3600, + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/SinkStatusIn", + "default": null, + "nullable": true + }, + "uid": { + "description": "The StreamSink's UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "nullable": true, + "pattern": "^(?!sink_)[a-zA-Z0-9_-]+$", "type": "string" } }, - "required": [ - "data", - "done", - "iterator" - ], "type": "object" }, - "RecoverIn": { + "StripeConfig": { "properties": { - "since": { - "format": "date-time", - "type": "string" - }, - "until": { - "format": "date-time", - "nullable": true, + "secret": { "type": "string" } }, "required": [ - "since" + "secret" ], "type": "object" }, - "RecoverOut": { + "SvixConfig": { "properties": { - "id": { - "description": "The QueueBackgroundTask's ID.", - "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^qtask_[A-Za-z0-9]{27}$", + "secret": { "type": "string" - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "task": { - "$ref": "#/components/schemas/BackgroundTaskType" } }, "required": [ - "id", - "status", - "task" + "secret" ], "type": "object" }, - "RedshiftConfig": { - "description": "Configuration parameters for defining a Redshift sink.", + "TemplateOut": { "properties": { - "accessKeyId": { - "type": "string" - }, - "clusterIdentifier": { - "type": "string" - }, - "dbName": { - "description": "Database name.\n\nOnly required if not using transformations.", - "type": "string" - }, - "dbUser": { + "createdAt": { + "format": "date-time", "type": "string" }, - "region": { + "description": { "type": "string" }, - "schemaName": { - "description": "Schema name.\n\nOnly used if not using transformations.", + "featureFlag": { + "example": "cool-new-feature", + "maxLength": 256, "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "secretAccessKey": { - "type": "string" - }, - "tableName": { - "description": "Table name.\n\nOnly required if not using transformations.", - "type": "string" - } - }, - "required": [ - "accessKeyId", - "clusterIdentifier", - "dbUser", - "region", - "secretAccessKey" - ], - "type": "object" - }, - "ReplayIn": { - "properties": { - "since": { - "format": "date-time", - "type": "string" - }, - "until": { - "format": "date-time", + "filterTypes": { + "example": [ + "user.signup", + "user.deleted" + ], + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "minItems": 1, "nullable": true, - "type": "string" - } - }, - "required": [ - "since" - ], - "type": "object" - }, - "ReplayOut": { - "properties": { + "type": "array", + "uniqueItems": true + }, "id": { - "description": "The QueueBackgroundTask's ID.", - "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^qtask_[A-Za-z0-9]{27}$", + "description": "The TransformationTemplate's ID.", + "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 34, + "minLength": 34, + "pattern": "^trtmpl_[A-Za-z0-9]{27}$", "type": "string" }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" + "instructions": { + "type": "string" }, - "task": { - "$ref": "#/components/schemas/BackgroundTaskType" - } - }, - "required": [ - "id", - "status", - "task" - ], - "type": "object" - }, - "RetrySchedule": { - "items": { - "$ref": "#/components/schemas/Duration" - }, - "type": "array" - }, - "RetryScheduleInOut": { - "properties": { - "retrySchedule": { - "$ref": "#/components/schemas/RetrySchedule", - "nullable": true - } - }, - "type": "object" - }, - "RotatePollerTokenIn": { - "properties": { - "expiry": { - "description": "How long the token will be valid for, in seconds. Can be up to 31,536,000 seconds (1 year).", - "format": "int64", - "maximum": 31536000, - "minimum": 1, + "instructionsLink": { + "format": "uri", "nullable": true, - "type": "integer" - }, - "oldTokenExpiry": { - "default": 300, - "description": "Updates the previous token's expiration, in seconds.\n\nIf set to 0, the old token will immediately be revoked. Must be between 0 and 86,400 seconds (1 day).\n\nDefaults to 300 seconds (5 minutes).", - "format": "int64", - "maximum": 86400, - "minimum": 0, - "type": "integer" - } - }, - "type": "object" - }, - "RotatedUrlOut": { - "properties": { - "url": { "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - }, - "S3Config": { - "properties": { - "accessKeyId": { + }, + "kind": { + "$ref": "#/components/schemas/ConnectorKind" + }, + "logo": { + "format": "uri", "type": "string" }, - "bucket": { + "name": { "type": "string" }, - "region": { + "orgId": { + "description": "The Organization's ID.", + "example": "org_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "pattern": "^org_[A-Za-z0-9]{27}$", "type": "string" }, - "secretAccessKey": { + "transformation": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", "type": "string" } }, "required": [ - "accessKeyId", - "bucket", - "region", - "secretAccessKey" + "createdAt", + "description", + "id", + "instructions", + "kind", + "logo", + "name", + "orgId", + "transformation", + "updatedAt" ], "type": "object" }, - "SinkHttpConfig": { + "TemplatePatch": { "properties": { - "headers": { - "additionalProperties": { + "description": { + "type": "string" + }, + "featureFlag": { + "example": "cool-new-feature", + "maxLength": 256, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "filterTypes": { + "example": [ + "user.signup", + "user.deleted" + ], + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "default": {}, - "type": "object" + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true }, - "key": { - "default": null, + "instructions": { + "type": "string" + }, + "instructionsLink": { + "format": "uri", "nullable": true, "type": "string" }, - "url": { + "kind": { + "$ref": "#/components/schemas/ConnectorKind" + }, + "logo": { "format": "uri", "type": "string" + }, + "name": { + "type": "string" + }, + "transformation": { + "maxLength": 51200, + "minLength": 10, + "type": "string" } }, - "required": [ - "url" - ], "type": "object" }, - "SinkIn": { - "oneOf": [ - { - "properties": { - "routingKey": { - "type": "string" - }, - "type": { - "enum": [ - "rabbitMQ" - ], - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "required": [ - "routingKey", - "type", - "uri" - ], - "type": "object" + "TemplateUpdate": { + "properties": { + "description": { + "default": "", + "type": "string" }, - { - "properties": { - "accessKey": { - "type": "string" - }, - "queueDsn": { - "format": "uri", - "type": "string" - }, - "region": { - "type": "string" - }, - "secretKey": { - "type": "string" - }, - "type": { - "enum": [ - "sqs" - ], - "type": "string" - } - }, - "required": [ - "accessKey", - "queueDsn", - "region", - "secretKey", - "type" - ], - "type": "object" + "featureFlag": { + "example": "cool-new-feature", + "maxLength": 256, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - { - "properties": { - "brokers": { - "type": "string" - }, - "saslPassword": { - "description": "Password for SASL, if `security_protocol` is `sasl-ssl`.", - "nullable": true, - "type": "string" - }, - "saslUsername": { - "description": "Username for SASL, if `security_protocol` is `sasl-ssl`.", - "nullable": true, - "type": "string" - }, - "securityProtocol": { - "$ref": "#/components/schemas/KafkaSecurityProtocolType" - }, - "topic": { - "type": "string" - }, - "type": { - "enum": [ - "kafka" - ], - "type": "string" - } - }, - "required": [ - "brokers", - "securityProtocol", - "topic", - "type" + "filterTypes": { + "example": [ + "user.signup", + "user.deleted" ], - "type": "object" - }, - { - "properties": { - "type": { - "enum": [ - "http" - ], - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "required": [ - "type", - "url" - ], - "type": "object" + "minItems": 1, + "nullable": true, + "type": "array", + "uniqueItems": true }, - { - "properties": { - "type": { - "enum": [ - "eventStream" - ], - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" + "instructions": { + "default": "", + "type": "string" + }, + "instructionsLink": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "kind": { + "$ref": "#/components/schemas/ConnectorKind", + "default": "Custom" + }, + "logo": { + "format": "uri", + "type": "string" + }, + "name": { + "default": "", + "type": "string" + }, + "transformation": { + "maxLength": 51200, + "minLength": 10, + "type": "string" } + }, + "required": [ + "logo", + "transformation" + ], + "type": "object" + }, + "TransformationHttpMethod": { + "enum": [ + "POST", + "PUT", + "PATCH" ], + "type": "string" + }, + "TransformationSimulateIn": { "properties": { "channels": { - "description": "List of message channels this sink listens to (omit for all).", - "example": [ - "project_123", - "group_2" - ], "items": { "example": "project_1337", "maxLength": 128, "pattern": "^[a-zA-Z0-9\\-_.:]+$", "type": "string" }, - "maxItems": 10, - "minItems": 1, "nullable": true, "type": "array", "uniqueItems": true }, - "description": { - "default": "", - "example": "An example endpoint name", + "code": { + "maxLength": 51200, + "minLength": 10, "type": "string" }, - "disabled": { - "default": false, - "example": false, - "type": "boolean" + "eventType": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "filterTypes": { - "example": [ - "user.signup", - "user.deleted" - ], + "payload": { + "additionalProperties": true, + "type": "object" + } + }, + "required": [ + "code", + "eventType", + "payload" + ], + "type": "object" + }, + "TransformationSimulateOut": { + "properties": { + "method": { + "$ref": "#/components/schemas/TransformationHttpMethod", + "nullable": true + }, + "payload": { + "type": "string" + }, + "url": { + "format": "uri", + "maxLength": 65536, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "payload", + "url" + ], + "type": "object" + }, + "ValidationError": { + "description": "Validation errors have their own schema to provide context for invalid requests eg. mismatched types and out of bounds values. There may be any number of these per 422 UNPROCESSABLE ENTITY error.", + "properties": { + "loc": { + "description": "The location as a [`Vec`] of [`String`]s -- often in the form `[\"body\", \"field_name\"]`, `[\"query\", \"field_name\"]`, etc. They may, however, be arbitrarily deep.", "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true + "type": "array" }, - "metadata": { - "additionalProperties": { + "msg": { + "description": "The message accompanying the validation error item.", + "type": "string" + }, + "type": { + "description": "The type of error, often \"type_error\" or \"value_error\", but sometimes with more context like as \"value_error.number.not_ge\"", + "type": "string" + } + }, + "required": [ + "loc", + "msg", + "type" + ], + "type": "object" + }, + "ZoomConfig": { + "properties": { + "secret": { + "type": "string" + } + }, + "required": [ + "secret" + ], + "type": "object" + }, + "ZoomCrcResponse": { + "properties": { + "encryptedToken": { + "type": "string" + }, + "plainToken": { + "type": "string" + } + }, + "required": [ + "encryptedToken", + "plainToken" + ], + "type": "object" + } + }, + "securitySchemes": { + "HTTPBearer": { + "description": "HTTP Bearer token passed in the `Authorization` header", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "description": "Welcome to the Svix API documentation!\n\nUseful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/)\n\n# Introduction\n\nThis is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com).\n\n## Main concepts\n\nIn Svix you have four important entities you will be interacting with:\n\n- `messages`: these are the webhooks being sent. They can have contents and a few other properties.\n- `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform.\n- `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type).\n- `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint.\n\n\n## Authentication\n\nGet your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys).\n\n\n\n\n## Code samples\n\nThe code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/).\n\n\n## Idempotency\n\nSvix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response.\n\nTo perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions.\n\nSvix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result for a period of up to 12 hours.\n\nPlease note that idempotency is only supported for `POST` requests.\n\n\n## Cross-Origin Resource Sharing\n\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n", + "title": "Svix API", + "version": "1.59.2", + "x-logo": { + "altText": "Svix Logo", + "url": "https://www.svix.com/static/img/brand-padded.svg" + } + }, + "openapi": "3.1.0", + "paths": { + "/api/v1/app": { + "get": { + "description": "List of all the organization's applications.", + "operationId": "v1.application.list", + "parameters": [ + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "nullable": true, + "pattern": "^app_[A-Za-z0-9]{27}$", "type": "string" }, - "default": {}, - "type": "object" - }, - "rateLimit": { - "format": "uint16", - "minimum": 1, - "nullable": true, - "type": "integer" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponse_ApplicationOut_" + } + } + }, + "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Not Found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" }, - "secret": { - "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", - "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", - "nullable": true, - "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", - "type": "string" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" }, - "uid": { - "description": "Optional unique identifier for the sink.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" } }, - "type": "object" - }, - "SinkOtelV1Config": { - "properties": { - "url": { - "format": "uri", - "type": "string" + "security": [ + { + "HTTPBearer": [] } - }, - "required": [ - "url" ], - "type": "object" - }, - "SinkOut": { - "oneOf": [ + "summary": "List Applications", + "tags": [ + "Application" + ], + "x-codeSamples": [ { - "properties": { - "routingKey": { - "type": "string" - }, - "type": { - "enum": [ - "rabbitMQ" - ], - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "required": [ - "routingKey", - "type", - "uri" - ], - "type": "object" + "label": "JavaScript", + "lang": "JavaScript", + "source": "const listResponseApplicationOut = await svix.application.list();" }, { - "properties": { - "accessKey": { - "type": "string" - }, - "queueDsn": { - "format": "uri", - "type": "string" - }, - "region": { - "type": "string" - }, - "secretKey": { - "type": "string" - }, - "type": { - "enum": [ - "sqs" - ], - "type": "string" - } - }, - "required": [ - "accessKey", - "queueDsn", - "region", - "secretKey", - "type" - ], - "type": "object" + "label": "TypeScript", + "lang": "JavaScript", + "source": "const listResponseApplicationOut = await svix.application.list();" }, { - "properties": { - "brokers": { - "type": "string" - }, - "saslPassword": { - "description": "Password for SASL, if `security_protocol` is `sasl-ssl`.", - "nullable": true, - "type": "string" - }, - "saslUsername": { - "description": "Username for SASL, if `security_protocol` is `sasl-ssl`.", - "nullable": true, - "type": "string" - }, - "securityProtocol": { - "$ref": "#/components/schemas/KafkaSecurityProtocolType" - }, - "topic": { - "type": "string" - }, - "type": { - "enum": [ - "kafka" - ], - "type": "string" - } - }, - "required": [ - "brokers", - "securityProtocol", - "topic", - "type" - ], - "type": "object" + "label": "Python", + "lang": "Python", + "source": "list_response_application_out = svix.application.list(options=...)" }, { - "properties": { - "type": { - "enum": [ - "http" - ], - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [ - "type", - "url" - ], - "type": "object" + "label": "Python (Async)", + "lang": "Python", + "source": "list_response_application_out = await svix.application.list(options=...)" }, { - "properties": { - "type": { - "enum": [ - "eventStream" - ], - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" + "label": "Go", + "lang": "Go", + "source": "listResponseApplicationOut, err := svixClient.Application.List(ctx, nil)" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val listResponseApplicationOut = svix.application.list()" + }, + { + "label": "Java", + "lang": "Java", + "source": "ListResponseApplicationOut listResponseApplicationOut = svix.getApplication().list();" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "list_response_application_out = svix.application.list()" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let list_response_application_out = svix.application().list(None).await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var listResponseApplicationOut = await svix.Application.ListAsync();" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix application list " + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "properties": { - "channels": { - "description": "List of message channels this endpoint listens to (omit for all).", - "example": [ - "project_123", - "group_2" - ], - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", + ] + }, + "post": { + "description": "Create a new application.", + "operationId": "v1.application.create", + "parameters": [ + { + "description": "Get an existing application, or create a new one if doesn't exist. It's two separate functions in the libs.", + "in": "query", + "name": "get_if_exists", + "schema": { + "default": false, + "description": "Get an existing application, or create a new one if doesn't exist. It's two separate functions in the libs.", + "type": "boolean" + }, + "style": "form" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { "type": "string" }, - "maxItems": 10, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationIn" + } + } }, - "createdAt": { - "format": "date-time", - "type": "string" + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationOut" + } + } + }, + "description": "" }, - "description": { - "description": "An example endpoint name.", - "type": "string" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationOut" + } + } + }, + "description": "" }, - "disabled": { - "default": false, - "example": false, - "type": "boolean" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" }, - "filterTypes": { - "example": [ - "user.signup", - "user.deleted" - ], - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } }, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true + "description": "Unauthorized" }, - "id": { - "description": "The Endpoint's ID.", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "pattern": "^ep_[A-Za-z0-9]{27}$", - "type": "string" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" }, - "metadata": { - "additionalProperties": { - "type": "string" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } }, - "type": "object" + "description": "Not Found" }, - "rateLimit": { - "format": "uint16", - "minimum": 0, - "nullable": true, - "type": "integer" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" }, - "uid": { - "description": "Optional unique identifier for the endpoint.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" }, - "updatedAt": { - "format": "date-time", - "type": "string" + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" } }, - "required": [ - "createdAt", - "description", - "id", - "metadata", - "updatedAt" - ], - "type": "object" - }, - "SinkPayloadFormat": { - "enum": [ - "json" - ], - "type": "string" - }, - "SinkSecretOut": { - "properties": { - "key": { - "description": "The endpoint's verification secret.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`.\nIt is recommended to not set this and let the server generate the secret.", - "example": "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", - "nullable": true, - "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$", - "type": "string" + "security": [ + { + "HTTPBearer": [] } - }, - "type": "object" - }, - "SinkStatus": { - "enum": [ - "enabled", - "paused", - "disabled" ], - "type": "string" - }, - "SinkStatusIn": { - "enum": [ - "enabled", - "paused" + "summary": "Create Application", + "tags": [ + "Application" ], - "type": "string" - }, - "SinkTransformIn": { - "properties": { - "code": { - "maxLength": 51200, - "minLength": 10, - "nullable": true, - "type": "string" + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.create({\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "enabled": { - "type": "boolean" - } - }, - "type": "object" - }, - "SinkTransformationOut": { - "properties": { - "code": { - "nullable": true, - "type": "string" + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.create({\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "enabled": { - "default": true, - "type": "boolean" - } - }, - "type": "object" - }, - "SnowflakeConfig": { - "description": "Configuration parameters for defining a Snowflake sink.", - "properties": { - "accountIdentifier": { - "description": "Snowflake account identifier, which includes both the organization and account IDs separated by a hyphen.", - "type": "string" + { + "label": "Python", + "lang": "Python", + "source": "application_out = svix.application.create(ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-identifier\"\n), options=...)" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "application_out = await svix.application.create(ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-identifier\"\n), options=...)" + }, + { + "label": "Go", + "lang": "Go", + "source": "applicationOut, err := svixClient.Application.Create(ctx, &ApplicationIn{\n Name: \"My first application\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n})" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val applicationOut = svix.application.create(ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n)" }, - "dbName": { - "description": "Database name.\n\nOnly required if not using transformations.", - "type": "string" + { + "label": "Java", + "lang": "Java", + "source": "ApplicationOut applicationOut = svix.getApplication().create(new ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n);" }, - "privateKey": { - "description": "PEM-encoded private key used for signing token-based requests to the Snowflake API.\n\nBeginning/end delimiters are not required.", - "type": "string" + { + "label": "Ruby", + "lang": "Ruby", + "source": "application_out = svix.application.create(Svix::ApplicationIn.new({\n \"name\": \"My first application\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\"\n}))" }, - "schemaName": { - "description": "Schema name.\n\nOnly required if not using transformations.", - "type": "string" + { + "label": "Rust", + "lang": "Rust", + "source": "let application_out = svix.application().create(ApplicationIn {\n name: \"My first application\".to_string(),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n}, None).await?;" }, - "tableName": { - "description": "Table name.\n\nOnly required if not using transformations.", - "type": "string" + { + "label": "C#", + "lang": "C#", + "source": "var applicationOut = await svix.Application.CreateAsync(new ApplicationIn{\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "userId": { - "description": "The Snowflake user id.", - "type": "string" - } - }, - "required": [ - "accountIdentifier", - "privateKey", - "userId" - ], - "type": "object" - }, - "StatisticsPeriod": { - "description": "Period length for a statistics data point.", - "enum": [ - "OneDay", - "FiveMinutes" - ], - "type": "string" - }, - "StatusCodeClass": { - "description": "The different classes of HTTP status codes:\n- CodeNone = 0\n- Code1xx = 100\n- Code2xx = 200\n- Code3xx = 300\n- Code4xx = 400\n- Code5xx = 500", - "enum": [ - 0, - 100, - 200, - 300, - 400, - 500 - ], - "title": "StatusCodeClass", - "type": "integer", - "x-enum-varnames": [ - "CodeNone", - "Code1xx", - "Code2xx", - "Code3xx", - "Code4xx", - "Code5xx" - ] - }, - "StreamEventTypeIn": { - "properties": { - "description": { - "nullable": true, - "type": "string" + { + "label": "CLI", + "lang": "Shell", + "source": "svix application create '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n}'" }, - "name": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n }'" } - }, - "required": [ - "name" - ], - "type": "object" - }, - "StreamEventTypeOut": { - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" + ] + } + }, + "/api/v1/app/stats/usage": { + "get": { + "description": "Get basic statistics for all applications.", + "operationId": "get_app_usage_stats_api_v1_app_stats_usage__get", + "parameters": [ + { + "description": "Filter the range to data after this date.", + "in": "query", + "name": "since", + "required": true, + "schema": { + "description": "Filter the range to data after this date.", + "format": "date-time", + "type": "string" + }, + "style": "form" }, - "description": { - "nullable": true, - "type": "string" + { + "description": "Filter the range to data before this date.", + "in": "query", + "name": "until", + "required": true, + "schema": { + "description": "Filter the range to data before this date.", + "format": "date-time", + "type": "string" + }, + "style": "form" }, - "name": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + { + "description": "Limit the number of returned items.", + "in": "query", + "name": "limit", + "schema": { + "default": 50, + "description": "Limit the number of returned items.", + "format": "int", + "maximum": 250, + "nullable": true, + "type": "integer" + }, + "style": "form" }, - "updatedAt": { - "format": "date-time", - "type": "string" + { + "description": "The iterator to use (depends on the chosen ordering).", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator to use (depends on the chosen ordering).", + "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "nullable": true, + "pattern": "^app_[A-Za-z0-9]{27}$", + "type": "string" + }, + "style": "form" } - }, - "required": [ - "createdAt", - "name", - "updatedAt" ], - "type": "object" - }, - "StreamEventTypePatch": { - "properties": { - "description": { - "nullable": true, - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponse_ApplicationStats_" + } + } + }, + "description": "" }, - "name": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - } - }, - "required": [ - "description" - ], - "type": "object" - }, - "StreamIn": { - "properties": { - "description": { - "description": "The stream's description.", - "minLength": 1, - "type": "string" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" }, - "uid": { - "description": "An optional unique identifier for the stream.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, - "nullable": true, - "pattern": "^(?!strm_)[a-zA-Z0-9_-]+$", - "type": "string" - } - }, - "required": [ - "description" - ], - "type": "object" - }, - "StreamOut": { - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" }, - "description": { - "description": "The stream's description.", - "nullable": true, - "type": "string" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Not Found" }, - "id": { - "description": "The stream's ID.", - "example": "strm_2yZwUhtgs5Ai8T9yRQJXA", - "maxLength": 27, - "minLength": 27, - "pattern": "^strm_[A-Za-z0-9]{22}$", - "type": "string" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" }, - "uid": { - "description": "The stream's UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, - "nullable": true, - "pattern": "^(?!strm_)[a-zA-Z0-9_-]+$", - "type": "string" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" }, - "updatedAt": { - "format": "date-time", - "type": "string" + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" } }, - "required": [ - "createdAt", - "id", - "updatedAt" + "security": [ + { + "HTTPBearer": [] + } ], - "type": "object" - }, - "StreamPatch": { - "properties": { - "description": { - "description": "The Stream's description.", - "type": "string" - }, - "uid": { - "description": "An optional unique identifier for the stream.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, - "nullable": true, - "pattern": "^(?!strm_)[a-zA-Z0-9_-]+$", - "type": "string" + "summary": "Get App Usage Stats", + "tags": [ + "Application" + ], + "x-codeSamples": [ + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/stats/usage' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - }, - "type": "object" - }, - "StreamPortalAccessIn": { - "properties": { - "expiry": { - "default": 604800, - "description": "How long the token will be valid for, in seconds.\n\nValid values are between 1 hour and 7 days. The default is 7 days.", - "format": "uint64", - "maximum": 604800, - "minimum": 3600, - "nullable": true, - "type": "integer" - }, - "featureFlags": { - "description": "The set of feature flags the created token will have access to.", - "example": [], - "items": { - "example": "cool-new-feature", + ], + "x-hidden": true + } + }, + "/api/v1/app/{app_id}": { + "delete": { + "description": "Delete an application.", + "operationId": "v1.application.delete", + "parameters": [ + { + "description": "The Application's ID or UID.", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The Application's ID or UID.", + "example": "unique-identifier", "maxLength": 256, + "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "maxItems": 25, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, - "readOnly": { - "description": "Whether the app portal should be in read-only mode.", - "nullable": true, - "type": "boolean" + "style": "simple" } - }, - "type": "object" - }, - "StreamSinkIn": { - "oneOf": [ - { - "properties": { - "config": { - "$ref": "#/components/schemas/AzureBlobStorageConfig" - }, - "type": { - "enum": [ - "azureBlobStorage" - ], - "type": "string" - } - }, - "required": [ - "config", - "type" - ], - "type": "object" + ], + "responses": { + "204": { + "description": "no content" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SinkOtelV1Config" - }, - "type": { - "enum": [ - "otelV1HttpTrace" - ], - "type": "string" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Bad request" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SinkHttpConfig" - }, - "type": { - "enum": [ - "http" - ], - "type": "string" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Unauthorized" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/S3Config" - }, - "type": { - "enum": [ - "amazonS3" - ], - "type": "string" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Forbidden" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SnowflakeConfig" - }, - "type": { - "enum": [ - "snowflake" - ], - "type": "string" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Not Found" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/GoogleCloudStorageConfig" - }, - "type": { - "enum": [ - "googleCloudStorage" - ], - "type": "string" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Conflict" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/RedshiftConfig" - }, - "type": { - "enum": [ - "redshift" - ], - "type": "string" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Validation Error" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/BigQueryConfig" - }, - "type": { - "enum": [ - "bigQuery" - ], - "type": "string" + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Too Many Requests" + } + }, + "security": [ + { + "HTTPBearer": [] } ], - "properties": { - "batchSize": { - "default": 100, - "description": "How many events we will attempt to accumulate before sending a request to the Sink.", - "format": "uint16", - "maximum": 1000, - "minimum": 0, - "type": "integer" + "summary": "Delete Application", + "tags": [ + "Application" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "await svix.application.delete(\"app_id\");" }, - "eventTypes": { - "default": [], - "description": "A list of event types that filter which events are dispatched to the Sink. An empty list (or null) will not filter out any events.", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "type": "array" + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "await svix.application.delete(\"app_id\");" }, - "format": { - "$ref": "#/components/schemas/SinkPayloadFormat", - "description": "The format of data sent to the sink. When events are dispatched to the sink, we will attempt to send them in the preferred format. (Note that for some sink types, such as `amazonS3`, the format is ignored.)" + { + "label": "Python", + "lang": "Python", + "source": "svix.application.delete(\"app_id\")" }, - "maxWaitSecs": { - "default": 0, - "description": "How many seconds we will wait to accumulate events of `batchSize`, before sending a request to the Sink. For example, with a `batchSize` of 100 and `maxWaitSecs` of 10, we will wait _at most_ 10 seconds before sending a request to the Sink. If 100 events accumulate faster than 10 seconds, we will send the request to the Sink as soon as possible.", - "format": "uint16", - "maximum": 3600, - "minimum": 0, - "type": "integer" + { + "label": "Python (Async)", + "lang": "Python", + "source": "await svix.application.delete(\"app_id\")" }, - "status": { - "$ref": "#/components/schemas/SinkStatusIn", - "default": "enabled", - "description": "Whether the sink will receive events.\n\nIf the sink is `enabled`, any events posted to the stream will be dispatched to the Sink in the same order that events were posted to the stream.\n\nIf the sink is `paused`, events will *not* be dispatched to the sink until the sink is reenabled." + { + "label": "Go", + "lang": "Go", + "source": "err := svixClient.Application.Delete(ctx, \"app_id\")" }, - "uid": { - "description": "An optional unique identifier for the sink.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, - "nullable": true, - "pattern": "^(?!sink_)[a-zA-Z0-9_-]+$", - "type": "string" + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "svix.application.delete(\"app_id\")" + }, + { + "label": "Java", + "lang": "Java", + "source": "svix.getApplication().delete(\"app_id\");" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "svix.application.delete(\"app_id\")" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "svix.application().delete(\"app_id\").await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "await svix.Application.DeleteAsync(\"app_id\");" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix application delete \"app_id\"" + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - }, - "required": [ - "format" - ], - "type": "object" + ] }, - "StreamSinkOut": { - "oneOf": [ + "get": { + "description": "Get an application.", + "operationId": "v1.application.get", + "parameters": [ { - "properties": { - "config": { - "$ref": "#/components/schemas/AzureBlobStorageConfig" - }, - "type": { - "enum": [ - "azureBlobStorage" - ], - "type": "string" + "description": "The Application's ID or UID.", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The Application's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SinkOtelV1Config" - }, - "type": { - "enum": [ - "otelV1HttpTrace" - ], - "type": "string" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Bad request" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SinkHttpConfig" - }, - "type": { - "enum": [ - "http" - ], - "type": "string" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Unauthorized" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/S3Config" - }, - "type": { - "enum": [ - "amazonS3" - ], - "type": "string" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Forbidden" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SnowflakeConfig" - }, - "type": { - "enum": [ - "snowflake" - ], - "type": "string" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Not Found" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/GoogleCloudStorageConfig" - }, - "type": { - "enum": [ - "googleCloudStorage" - ], - "type": "string" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Conflict" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/RedshiftConfig" - }, - "type": { - "enum": [ - "redshift" - ], - "type": "string" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Validation Error" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/BigQueryConfig" - }, - "type": { - "enum": [ - "bigQuery" - ], - "type": "string" + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Too Many Requests" + } + }, + "security": [ + { + "HTTPBearer": [] } ], - "properties": { - "batchSize": { - "format": "int32", - "type": "integer" + "summary": "Get Application", + "tags": [ + "Application" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.get(\"app_id\");" }, - "createdAt": { - "format": "date-time", - "type": "string" + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.get(\"app_id\");" }, - "currentIterator": { - "nullable": true, - "type": "string" + { + "label": "Python", + "lang": "Python", + "source": "application_out = svix.application.get(\"app_id\")" }, - "disabledReason": { - "nullable": true, - "type": "string" + { + "label": "Python (Async)", + "lang": "Python", + "source": "application_out = await svix.application.get(\"app_id\")" }, - "eventTypes": { - "default": [], - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "type": "array" + { + "label": "Go", + "lang": "Go", + "source": "applicationOut, err := svixClient.Application.Get(ctx, \"app_id\")" }, - "format": { - "$ref": "#/components/schemas/SinkPayloadFormat" + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val applicationOut = svix.application.get(\"app_id\")" }, - "id": { - "description": "The sink's ID.", - "example": "sink_2yZwUhtgs5Ai8T9yRQJXA", - "maxLength": 27, - "minLength": 27, - "pattern": "^sink_[A-Za-z0-9]{22}$", - "type": "string" + { + "label": "Java", + "lang": "Java", + "source": "ApplicationOut applicationOut = svix.getApplication().get(\"app_id\");" }, - "maxWaitSecs": { - "format": "int32", - "type": "integer" + { + "label": "Ruby", + "lang": "Ruby", + "source": "application_out = svix.application.get(\"app_id\")" }, - "status": { - "$ref": "#/components/schemas/SinkStatus" + { + "label": "Rust", + "lang": "Rust", + "source": "let application_out = svix.application().get(\"app_id\").await?;" }, - "uid": { - "description": "The sink's UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, - "nullable": true, - "pattern": "^(?!sink_)[a-zA-Z0-9_-]+$", - "type": "string" + { + "label": "C#", + "lang": "C#", + "source": "var applicationOut = await svix.Application.GetAsync(\"app_id\");" }, - "updatedAt": { - "format": "date-time", - "type": "string" + { + "label": "CLI", + "lang": "Shell", + "source": "svix application get \"app_id\"" + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - }, - "required": [ - "batchSize", - "createdAt", - "format", - "id", - "maxWaitSecs", - "status", - "updatedAt" - ], - "type": "object" + ] }, - "StreamSinkPatch": { - "oneOf": [ + "patch": { + "description": "Partially update an application.", + "operationId": "v1.application.patch", + "parameters": [ { - "properties": { - "config": { - "$ref": "#/components/schemas/AzureBlobStorageConfig" - }, - "type": { - "enum": [ - "azureBlobStorage" - ], - "type": "string" + "description": "The Application's ID or UID.", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The Application's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationPatch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SinkOtelV1Config" - }, - "type": { - "enum": [ - "otelV1HttpTrace" - ], - "type": "string" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Bad request" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SinkHttpConfig" - }, - "type": { - "enum": [ - "http" - ], - "type": "string" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Unauthorized" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/S3Config" - }, - "type": { - "enum": [ - "amazonS3" - ], - "type": "string" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Forbidden" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/SnowflakeConfig" - }, - "type": { - "enum": [ - "snowflake" - ], - "type": "string" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Not Found" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/GoogleCloudStorageConfig" - }, - "type": { - "enum": [ - "googleCloudStorage" - ], - "type": "string" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Conflict" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/RedshiftConfig" - }, - "type": { - "enum": [ - "redshift" - ], - "type": "string" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Validation Error" }, - { - "properties": { - "config": { - "$ref": "#/components/schemas/BigQueryConfig" - }, - "type": { - "enum": [ - "bigQuery" - ], - "type": "string" + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } } }, - "required": [ - "config", - "type" - ], - "type": "object" + "description": "Too Many Requests" + } + }, + "security": [ + { + "HTTPBearer": [] } ], - "properties": { - "batchSize": { - "default": null, - "format": "uint16", - "maximum": 1000, - "minimum": 0, - "nullable": true, - "type": "integer" + "summary": "Patch Application", + "tags": [ + "Application" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.patch(\"app_id\", {\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "eventTypes": { - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "type": "array" + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.patch(\"app_id\", {\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "format": { - "$ref": "#/components/schemas/SinkPayloadFormat", - "default": null, - "nullable": true + { + "label": "Python", + "lang": "Python", + "source": "application_out = svix.application.patch(\"app_id\", ApplicationPatch(\n rate_limit=None,\n uid=\"unique-identifier\"\n))" }, - "maxWaitSecs": { - "default": null, - "format": "uint16", - "maximum": 3600, - "minimum": 0, - "nullable": true, - "type": "integer" + { + "label": "Python (Async)", + "lang": "Python", + "source": "application_out = await svix.application.patch(\"app_id\", ApplicationPatch(\n rate_limit=None,\n uid=\"unique-identifier\"\n))" + }, + { + "label": "Go", + "lang": "Go", + "source": "applicationOut, err := svixClient.Application.Patch(ctx, \"app_id\", &ApplicationPatch{\n RateLimit: nil,\n Uid: \"unique-identifier\",\n})" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val applicationOut = svix.application.patch(\"app_id\", ApplicationPatch()\n .rateLimit(null)\n .uid(\"unique-identifier\")\n)" + }, + { + "label": "Java", + "lang": "Java", + "source": "ApplicationOut applicationOut = svix.getApplication().patch(\"app_id\", new ApplicationPatch()\n .rateLimit(null)\n .uid(\"unique-identifier\")\n);" }, - "status": { - "$ref": "#/components/schemas/SinkStatusIn", - "default": null, - "nullable": true + { + "label": "Ruby", + "lang": "Ruby", + "source": "application_out = svix.application.patch(\"app_id\", Svix::ApplicationPatch.new({\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\"\n}))" }, - "uid": { - "description": "The StreamSink's UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, - "nullable": true, - "pattern": "^(?!sink_)[a-zA-Z0-9_-]+$", - "type": "string" - } - }, - "type": "object" - }, - "TemplateOut": { - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" + { + "label": "Rust", + "lang": "Rust", + "source": "let application_out = svix.application().patch(\"app_id\", ApplicationPatch {\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n}).await?;" }, - "description": { - "type": "string" + { + "label": "C#", + "lang": "C#", + "source": "var applicationOut = await svix.Application.PatchAsync(\"app_id\", new ApplicationPatch{\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "featureFlag": { - "example": "cool-new-feature", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + { + "label": "CLI", + "lang": "Shell", + "source": "svix application patch \"app_id\" '{\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n}'" }, - "filterTypes": { - "example": [ - "user.signup", - "user.deleted" - ], - "items": { - "description": "The event type's name", - "example": "user.signup", + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n }'" + } + ] + }, + "put": { + "description": "Update an application.", + "operationId": "v1.application.update", + "parameters": [ + { + "description": "The Application's ID or UID.", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The Application's ID or UID.", + "example": "unique-identifier", "maxLength": 256, + "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationIn" + } + } }, - "id": { - "description": "The TransformationTemplate's ID.", - "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 34, - "minLength": 34, - "pattern": "^trtmpl_[A-Za-z0-9]{27}$", - "type": "string" + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationOut" + } + } + }, + "description": "" }, - "instructions": { - "type": "string" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationOut" + } + } + }, + "description": "" }, - "instructionsLink": { - "format": "uri", - "nullable": true, - "type": "string" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" }, - "kind": { - "$ref": "#/components/schemas/ConnectorKind" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Unauthorized" }, - "logo": { - "format": "uri", - "type": "string" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" }, - "name": { - "type": "string" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Not Found" }, - "orgId": { - "description": "The Organization's ID.", - "example": "org_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "pattern": "^org_[A-Za-z0-9]{27}$", - "type": "string" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" }, - "transformation": { - "type": "string" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" }, - "updatedAt": { - "format": "date-time", - "type": "string" + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" } }, - "required": [ - "createdAt", - "description", - "id", - "instructions", - "kind", - "logo", - "name", - "orgId", - "transformation", - "updatedAt" + "security": [ + { + "HTTPBearer": [] + } ], - "type": "object" - }, - "TemplatePatch": { - "properties": { - "description": { - "type": "string" - }, - "featureFlag": { - "example": "cool-new-feature", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + "summary": "Update Application", + "tags": [ + "Application" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.update(\"app_id\", {\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "filterTypes": { - "example": [ - "user.signup", - "user.deleted" - ], - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.update(\"app_id\", {\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "instructions": { - "type": "string" + { + "label": "Python", + "lang": "Python", + "source": "application_out = svix.application.update(\"app_id\", ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-identifier\"\n))" }, - "instructionsLink": { - "format": "uri", - "nullable": true, - "type": "string" + { + "label": "Python (Async)", + "lang": "Python", + "source": "application_out = await svix.application.update(\"app_id\", ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-identifier\"\n))" }, - "kind": { - "$ref": "#/components/schemas/ConnectorKind" + { + "label": "Go", + "lang": "Go", + "source": "applicationOut, err := svixClient.Application.Update(ctx, \"app_id\", &ApplicationIn{\n Name: \"My first application\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n})" }, - "logo": { - "format": "uri", - "type": "string" + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val applicationOut = svix.application.update(\"app_id\", ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n)" }, - "name": { - "type": "string" + { + "label": "Java", + "lang": "Java", + "source": "ApplicationOut applicationOut = svix.getApplication().update(\"app_id\", new ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n);" }, - "transformation": { - "maxLength": 51200, - "minLength": 10, - "type": "string" - } - }, - "type": "object" - }, - "TemplateUpdate": { - "properties": { - "description": { - "default": "", - "type": "string" + { + "label": "Ruby", + "lang": "Ruby", + "source": "application_out = svix.application.update(\"app_id\", Svix::ApplicationIn.new({\n \"name\": \"My first application\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\"\n}))" }, - "featureFlag": { - "example": "cool-new-feature", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + { + "label": "Rust", + "lang": "Rust", + "source": "let application_out = svix.application().update(\"app_id\", ApplicationIn {\n name: \"My first application\".to_string(),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n}).await?;" }, - "filterTypes": { - "example": [ - "user.signup", - "user.deleted" - ], - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "minItems": 1, - "nullable": true, - "type": "array", - "uniqueItems": true + { + "label": "C#", + "lang": "C#", + "source": "var applicationOut = await svix.Application.UpdateAsync(\"app_id\", new ApplicationIn{\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" }, - "instructions": { - "default": "", - "type": "string" + { + "label": "CLI", + "lang": "Shell", + "source": "svix application update \"app_id\" '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n}'" }, - "instructionsLink": { - "format": "uri", - "nullable": true, - "type": "string" + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n }'" + } + ] + } + }, + "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}": { + "get": { + "description": "List attempts by endpoint id\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.\n", + "operationId": "v1.message-attempt.list-by-endpoint", + "parameters": [ + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" }, - "kind": { - "$ref": "#/components/schemas/ConnectorKind", - "default": "Custom" + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "nullable": true, + "pattern": "^atmpt_[A-Za-z0-9]{27}$", + "type": "string" + }, + "style": "form" }, - "logo": { - "format": "uri", - "type": "string" + { + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/MessageStatus", + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "nullable": true + }, + "style": "form" }, - "name": { - "default": "", - "type": "string" + { + "description": "Filter response based on the HTTP status code", + "explode": false, + "in": "query", + "name": "status_code_class", + "schema": { + "$ref": "#/components/schemas/StatusCodeClass", + "description": "Filter response based on the HTTP status code", + "nullable": true + }, + "style": "form" }, - "transformation": { - "maxLength": 51200, - "minLength": 10, - "type": "string" - } - }, - "required": [ - "logo", - "transformation" - ], - "type": "object" - }, - "TransformationHttpMethod": { - "enum": [ - "POST", - "PUT", - "PATCH" - ], - "type": "string" - }, - "TransformationSimulateIn": { - "properties": { - "channels": { - "items": { + { + "description": "Filter response based on the channel", + "in": "query", + "name": "channel", + "schema": { + "description": "Filter response based on the channel", "example": "project_1337", "maxLength": 128, + "nullable": true, "pattern": "^[a-zA-Z0-9\\-_.:]+$", "type": "string" }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "code": { - "maxLength": 51200, - "minLength": 10, - "type": "string" - }, - "eventType": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "payload": { - "additionalProperties": true, - "type": "object" - } - }, - "required": [ - "code", - "eventType", - "payload" - ], - "type": "object" - }, - "TransformationSimulateOut": { - "properties": { - "method": { - "$ref": "#/components/schemas/TransformationHttpMethod", - "nullable": true - }, - "payload": { - "type": "string" + "style": "form" }, - "url": { - "format": "uri", - "maxLength": 65536, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "payload", - "url" - ], - "type": "object" - }, - "ValidationError": { - "description": "Validation errors have their own schema to provide context for invalid requests eg. mismatched types and out of bounds values. There may be any number of these per 422 UNPROCESSABLE ENTITY error.", - "properties": { - "loc": { - "description": "The location as a [`Vec`] of [`String`]s -- often in the form `[\"body\", \"field_name\"]`, `[\"query\", \"field_name\"]`, etc. They may, however, be arbitrarily deep.", - "items": { + { + "description": "Filter response based on the tag", + "in": "query", + "name": "tag", + "schema": { + "description": "Filter response based on the tag", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", "type": "string" }, - "type": "array" - }, - "msg": { - "description": "The message accompanying the validation error item.", - "type": "string" + "style": "form" }, - "type": { - "description": "The type of error, often \"type_error\" or \"value_error\", but sometimes with more context like as \"value_error.number.not_ge\"", - "type": "string" - } - }, - "required": [ - "loc", - "msg", - "type" - ], - "type": "object" - } - }, - "securitySchemes": { - "HTTPBearer": { - "description": "HTTP Bearer token passed in the `Authorization` header", - "scheme": "bearer", - "type": "http" - } - } - }, - "info": { - "description": "Welcome to the Svix API documentation!\n\nUseful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/)\n\n# Introduction\n\nThis is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com).\n\n## Main concepts\n\nIn Svix you have four important entities you will be interacting with:\n\n- `messages`: these are the webhooks being sent. They can have contents and a few other properties.\n- `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform.\n- `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type).\n- `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint.\n\n\n## Authentication\n\nGet your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys).\n\n\n\n\n## Code samples\n\nThe code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/).\n\n\n## Idempotency\n\nSvix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response.\n\nTo perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions.\n\nSvix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result for a period of up to 12 hours.\n\nPlease note that idempotency is only supported for `POST` requests.\n\n\n## Cross-Origin Resource Sharing\n\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n", - "title": "Svix API", - "version": "1.60.1", - "x-logo": { - "altText": "Svix Logo", - "url": "https://www.svix.com/static/img/brand-padded.svg" - } - }, - "openapi": "3.1.0", - "paths": { - "/api/v1/app": { - "get": { - "description": "List of all the organization's applications.", - "operationId": "v1.application.list", - "parameters": [ { - "description": "Limit the number of returned items", + "description": "Only include items created before a certain date", "in": "query", - "name": "limit", + "name": "before", "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" + "description": "Only include items created before a certain date", + "format": "date-time", + "nullable": true, + "type": "string" }, "style": "form" }, { - "description": "The iterator returned from a prior invocation", + "description": "Only include items created after a certain date", "in": "query", - "name": "iterator", + "name": "after", "schema": { - "description": "The iterator returned from a prior invocation", - "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, + "description": "Only include items created after a certain date", + "format": "date-time", "nullable": true, - "pattern": "^app_[A-Za-z0-9]{27}$", "type": "string" }, "style": "form" }, { - "description": "The sorting order of the returned items", + "description": "When `true` attempt content is included in the response", "in": "query", - "name": "order", + "name": "with_content", "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true + "default": true, + "description": "When `true` attempt content is included in the response", + "type": "boolean" + }, + "style": "form" + }, + { + "description": "When `true`, the message information is included in the response", + "in": "query", + "name": "with_msg", + "schema": { + "default": false, + "description": "When `true`, the message information is included in the response", + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Filter response based on the event type", + "in": "query", + "name": "event_types", + "schema": { + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true }, "style": "form" + }, + { + "description": "The Application's ID or UID.", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The Application's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + }, + { + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, + "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" } ], "responses": { @@ -7231,7 +10325,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_ApplicationOut_" + "$ref": "#/components/schemas/ListResponse_MessageAttemptOut_" } } }, @@ -7313,124 +10407,211 @@ "HTTPBearer": [] } ], - "summary": "List Applications", + "summary": "List Attempts By Endpoint", "tags": [ - "Application" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseApplicationOut = await svix.application.list();" + "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseApplicationOut = await svix.application.list();" + "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_application_out = svix.application.list(options=...)" + "source": "list_response_message_attempt_out = svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_application_out = await svix.application.list(options=...)" + "source": "list_response_message_attempt_out = await svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "listResponseApplicationOut, err := svixClient.Application.List(ctx, nil)" + "source": "listResponseMessageAttemptOut, err := svixClient.MessageAttempt.ListByEndpoint(ctx, \"app_id\", \"endpoint_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseApplicationOut = svix.application.list()" + "source": "val listResponseMessageAttemptOut = svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseApplicationOut listResponseApplicationOut = svix.getApplication().list();" + "source": "ListResponseMessageAttemptOut listResponseMessageAttemptOut = svix.getMessageAttempt().listByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_application_out = svix.application.list()" + "source": "list_response_message_attempt_out = svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_application_out = svix.application().list(None).await?;" + "source": "let list_response_message_attempt_out = svix.message_attempt().list_by_endpoint(\"app_id\", \"endpoint_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseApplicationOut = await svix.Application.ListAsync();" + "source": "var listResponseMessageAttemptOut = await svix.MessageAttempt.ListByEndpointAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix application list " + "source": "svix message-attempt list-by-endpoint \"app_id\" \"endpoint_id\"" + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + } + ] + } + }, + "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/count": { + "get": { + "description": "Like `v1.message-attempt.list-by-endpoint` but returning a count only.", + "operationId": "v1.message-attempt.count-by-endpoint", + "parameters": [ + { + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/MessageStatus", + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "nullable": true + }, + "style": "form" + }, + { + "description": "Filter response based on the HTTP status code", + "explode": false, + "in": "query", + "name": "status_code_class", + "schema": { + "$ref": "#/components/schemas/StatusCodeClass", + "description": "Filter response based on the HTTP status code", + "nullable": true + }, + "style": "form" + }, + { + "description": "Filter response based on the channel", + "in": "query", + "name": "channel", + "schema": { + "description": "Filter response based on the channel", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter response based on the tag", + "in": "query", + "name": "tag", + "schema": { + "description": "Filter response based on the tag", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Only include items created before a certain date", + "in": "query", + "name": "before", + "schema": { + "description": "Only include items created before a certain date", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only include items created after a certain date", + "in": "query", + "name": "after", + "schema": { + "description": "Only include items created after a certain date", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" }, { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } - ] - }, - "post": { - "description": "Create a new application.", - "operationId": "v1.application.create", - "parameters": [ - { - "description": "Get an existing application, or create a new one if doesn't exist. It's two separate functions in the libs.", + "description": "Filter response based on the event type", "in": "query", - "name": "get_if_exists", + "name": "event_types", "schema": { - "default": false, - "description": "Get an existing application, or create a new one if doesn't exist. It's two separate functions in the libs.", - "type": "boolean" + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true }, "style": "form" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Application's ID or UID.", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The Application's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + }, + { + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationOut" - } - } - }, - "description": "" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationOut" + "$ref": "#/components/schemas/CountOut" } } }, @@ -7512,239 +10693,210 @@ "HTTPBearer": [] } ], - "summary": "Create Application", + "summary": "Count Attempts By Endpoint", "tags": [ - "Application" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.create({\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" + "source": "const countOut = await svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.create({\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" + "source": "const countOut = await svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "application_out = svix.application.create(ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-identifier\"\n), options=...)" + "source": "count_out = svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "application_out = await svix.application.create(ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-identifier\"\n), options=...)" + "source": "count_out = await svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "applicationOut, err := svixClient.Application.Create(ctx, &ApplicationIn{\n Name: \"My first application\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n})" + "source": "countOut, err := svixClient.MessageAttempt.CountByEndpoint(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val applicationOut = svix.application.create(ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n)" + "source": "val countOut = svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "ApplicationOut applicationOut = svix.getApplication().create(new ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n);" + "source": "CountOut countOut = svix.getMessageAttempt().countByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "application_out = svix.application.create(Svix::ApplicationIn.new({\n \"name\": \"My first application\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\"\n}))" + "source": "count_out = svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let application_out = svix.application().create(ApplicationIn {\n name: \"My first application\".to_string(),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n}, None).await?;" + "source": "let count_out = svix.message_attempt().count_by_endpoint(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var applicationOut = await svix.Application.CreateAsync(new ApplicationIn{\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" + "source": "var countOut = await svix.MessageAttempt.CountByEndpointAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix application create '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n}'" + "source": "svix message-attempt count-by-endpoint \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/count' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/stats/usage": { + "/api/v1/app/{app_id}/attempt/msg/{msg_id}": { "get": { - "description": "Get basic statistics for all applications.", - "operationId": "get_app_usage_stats_api_v1_app_stats_usage__get", + "description": "List attempts by message ID.\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.", + "operationId": "v1.message-attempt.list-by-msg", "parameters": [ { - "description": "Filter the range to data after this date.", + "description": "Limit the number of returned items", "in": "query", - "name": "since", - "required": true, + "name": "limit", "schema": { - "description": "Filter the range to data after this date.", - "format": "date-time", - "type": "string" + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" }, "style": "form" }, { - "description": "Filter the range to data before this date.", + "description": "The iterator returned from a prior invocation", "in": "query", - "name": "until", - "required": true, + "name": "iterator", "schema": { - "description": "Filter the range to data before this date.", - "format": "date-time", + "description": "The iterator returned from a prior invocation", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "nullable": true, + "pattern": "^atmpt_[A-Za-z0-9]{27}$", "type": "string" }, "style": "form" }, { - "description": "Limit the number of returned items.", + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, "in": "query", - "name": "limit", + "name": "status", "schema": { - "default": 50, - "description": "Limit the number of returned items.", - "format": "int", - "maximum": 250, - "nullable": true, - "type": "integer" + "$ref": "#/components/schemas/MessageStatus", + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "nullable": true }, "style": "form" }, { - "description": "The iterator to use (depends on the chosen ordering).", + "description": "Filter response based on the HTTP status code", + "explode": false, "in": "query", - "name": "iterator", + "name": "status_code_class", "schema": { - "description": "The iterator to use (depends on the chosen ordering).", - "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "nullable": true, - "pattern": "^app_[A-Za-z0-9]{27}$", - "type": "string" + "$ref": "#/components/schemas/StatusCodeClass", + "description": "Filter response based on the HTTP status code", + "nullable": true }, "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResponse_ApplicationStats_" - } - } - }, - "description": "" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Bad request" - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Unauthorized" }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } + { + "description": "Filter response based on the channel", + "in": "query", + "name": "channel", + "schema": { + "description": "Filter response based on the channel", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" }, - "description": "Forbidden" + "style": "form" }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } + { + "description": "Filter response based on the tag", + "in": "query", + "name": "tag", + "schema": { + "description": "Filter response based on the tag", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", + "type": "string" }, - "description": "Not Found" + "style": "form" }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } + { + "description": "Filter the attempts based on the attempted endpoint", + "in": "query", + "name": "endpoint_id", + "schema": { + "description": "Filter the attempts based on the attempted endpoint", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "description": "Conflict" + "style": "form" }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } + { + "description": "Only include items created before a certain date", + "in": "query", + "name": "before", + "schema": { + "description": "Only include items created before a certain date", + "format": "date-time", + "nullable": true, + "type": "string" }, - "description": "Validation Error" + "style": "form" }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Too Many Requests" - } - }, - "security": [ { - "HTTPBearer": [] - } - ], - "summary": "Get App Usage Stats", - "tags": [ - "Application" - ], - "x-codeSamples": [ + "description": "Only include items created after a certain date", + "in": "query", + "name": "after", + "schema": { + "description": "Only include items created after a certain date", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/stats/usage' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } - ], - "x-hidden": true - } - }, - "/api/v1/app/{app_id}": { - "delete": { - "description": "Delete an application.", - "operationId": "v1.application.delete", - "parameters": [ + "description": "When `true` attempt content is included in the response", + "in": "query", + "name": "with_content", + "schema": { + "default": true, + "description": "When `true` attempt content is included in the response", + "type": "boolean" + }, + "style": "form" + }, { "description": "The Application's ID or UID.", "in": "path", @@ -7759,11 +10911,52 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The Message's ID or UID.", + "in": "path", + "name": "msg_id", + "required": true, + "schema": { + "description": "The Message's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Filter response based on the event type", + "in": "query", + "name": "event_types", + "schema": { + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" } ], "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponse_MessageAttemptOut_" + } + } + }, + "description": "" }, "400": { "content": { @@ -7841,76 +11034,78 @@ "HTTPBearer": [] } ], - "summary": "Delete Application", + "summary": "List Attempts By Msg", "tags": [ - "Application" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.application.delete(\"app_id\");" + "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByMsg(\"app_id\", \"msg_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.application.delete(\"app_id\");" + "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByMsg(\"app_id\", \"msg_id\");" }, { "label": "Python", "lang": "Python", - "source": "svix.application.delete(\"app_id\")" + "source": "list_response_message_attempt_out = svix.message_attempt.list_by_msg(\"app_id\", \"msg_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.application.delete(\"app_id\")" + "source": "list_response_message_attempt_out = await svix.message_attempt.list_by_msg(\"app_id\", \"msg_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Application.Delete(ctx, \"app_id\")" + "source": "listResponseMessageAttemptOut, err := svixClient.MessageAttempt.ListByMsg(ctx, \"app_id\", \"msg_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.application.delete(\"app_id\")" + "source": "val listResponseMessageAttemptOut = svix.messageAttempt.listByMsg(\"app_id\", \"msg_id\")" }, { "label": "Java", "lang": "Java", - "source": "svix.getApplication().delete(\"app_id\");" + "source": "ListResponseMessageAttemptOut listResponseMessageAttemptOut = svix.getMessageAttempt().listByMsg(\"app_id\", \"msg_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.application.delete(\"app_id\")" + "source": "list_response_message_attempt_out = svix.message_attempt.list_by_msg(\"app_id\", \"msg_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "svix.application().delete(\"app_id\").await?;" + "source": "let list_response_message_attempt_out = svix.message_attempt().list_by_msg(\"app_id\", \"msg_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Application.DeleteAsync(\"app_id\");" + "source": "var listResponseMessageAttemptOut = await svix.MessageAttempt.ListByMsgAsync(\"app_id\", \"msg_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix application delete \"app_id\"" + "source": "svix message-attempt list-by-msg \"app_id\" \"msg_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/msg/{msg_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - }, + } + }, + "/api/v1/app/{app_id}/endpoint": { "get": { - "description": "Get an application.", - "operationId": "v1.application.get", + "description": "List the application's endpoints.", + "operationId": "v1.endpoint.list", "parameters": [ { "description": "The Application's ID or UID.", @@ -7926,6 +11121,45 @@ "type": "string" }, "style": "simple" + }, + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "nullable": true, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], "responses": { @@ -7933,7 +11167,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationOut" + "$ref": "#/components/schemas/ListResponse_EndpointOut_" } } }, @@ -8015,76 +11249,76 @@ "HTTPBearer": [] } ], - "summary": "Get Application", + "summary": "List Endpoints", "tags": [ - "Application" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.get(\"app_id\");" + "source": "const listResponseEndpointOut = await svix.endpoint.list(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.get(\"app_id\");" + "source": "const listResponseEndpointOut = await svix.endpoint.list(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "application_out = svix.application.get(\"app_id\")" + "source": "list_response_endpoint_out = svix.endpoint.list(\"app_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "application_out = await svix.application.get(\"app_id\")" + "source": "list_response_endpoint_out = await svix.endpoint.list(\"app_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "applicationOut, err := svixClient.Application.Get(ctx, \"app_id\")" + "source": "listResponseEndpointOut, err := svixClient.Endpoint.List(ctx, \"app_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val applicationOut = svix.application.get(\"app_id\")" + "source": "val listResponseEndpointOut = svix.endpoint.list(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "ApplicationOut applicationOut = svix.getApplication().get(\"app_id\");" + "source": "ListResponseEndpointOut listResponseEndpointOut = svix.getEndpoint().list(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "application_out = svix.application.get(\"app_id\")" + "source": "list_response_endpoint_out = svix.endpoint.list(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let application_out = svix.application().get(\"app_id\").await?;" + "source": "let list_response_endpoint_out = svix.endpoint().list(\"app_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var applicationOut = await svix.Application.GetAsync(\"app_id\");" + "source": "var listResponseEndpointOut = await svix.Endpoint.ListAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix application get \"app_id\"" + "source": "svix endpoint list \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] }, - "patch": { - "description": "Partially update an application.", - "operationId": "v1.application.patch", + "post": { + "description": "Create a new endpoint for the application.\n\nWhen `secret` is `null` the secret is automatically generated (recommended).", + "operationId": "v1.endpoint.create", "parameters": [ { "description": "The Application's ID or UID.", @@ -8100,24 +11334,33 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationPatch" + "$ref": "#/components/schemas/EndpointIn" } } }, "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationOut" + "$ref": "#/components/schemas/EndpointOut" } } }, @@ -8199,76 +11442,78 @@ "HTTPBearer": [] } ], - "summary": "Patch Application", + "summary": "Create Endpoint", "tags": [ - "Application" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.patch(\"app_id\", {\n rateLimit: null,\n uid: \"unique-identifier\"\n});" + "source": "const endpointOut = await svix.endpoint.create(\"app_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"],\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.patch(\"app_id\", {\n rateLimit: null,\n uid: \"unique-identifier\"\n});" + "source": "const endpointOut = await svix.endpoint.create(\"app_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"],\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" }, { "label": "Python", "lang": "Python", - "source": "application_out = svix.application.patch(\"app_id\", ApplicationPatch(\n rate_limit=None,\n uid=\"unique-identifier\"\n))" + "source": "endpoint_out = svix.endpoint.create(\"app_id\", EndpointIn(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n url=\"https://example.com/webhook/\",\n version=1,\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"],\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "application_out = await svix.application.patch(\"app_id\", ApplicationPatch(\n rate_limit=None,\n uid=\"unique-identifier\"\n))" + "source": "endpoint_out = await svix.endpoint.create(\"app_id\", EndpointIn(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n url=\"https://example.com/webhook/\",\n version=1,\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"],\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "applicationOut, err := svixClient.Application.Patch(ctx, \"app_id\", &ApplicationPatch{\n RateLimit: nil,\n Uid: \"unique-identifier\",\n})" + "source": "endpointOut, err := svixClient.Endpoint.Create(ctx, \"app_id\", &EndpointIn{\n Description: \"An example endpoint name\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n Url: \"https://example.com/webhook/\",\n Version: 1,\n Disabled: false,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n Channels: []string{\"project_123\", \"group_2\"},\n Secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n Headers: map[string]interface{}{\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val applicationOut = svix.application.patch(\"app_id\", ApplicationPatch()\n .rateLimit(null)\n .uid(\"unique-identifier\")\n)" + "source": "val endpointOut = svix.endpoint.create(\"app_id\", EndpointIn()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .url(\"https://example.com/webhook/\")\n .version(1)\n .disabled(false)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .channels(arrayOf(\"project_123\", \"group_2\"))\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n .headers(/* ... */)\n)" }, { "label": "Java", "lang": "Java", - "source": "ApplicationOut applicationOut = svix.getApplication().patch(\"app_id\", new ApplicationPatch()\n .rateLimit(null)\n .uid(\"unique-identifier\")\n);" + "source": "EndpointOut endpointOut = svix.getEndpoint().create(\"app_id\", new EndpointIn()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .url(\"https://example.com/webhook/\")\n .version(1)\n .disabled(false)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .channels(new String[]{\"project_123\", \"group_2\"})\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n .headers(/* ... */)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "application_out = svix.application.patch(\"app_id\", Svix::ApplicationPatch.new({\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\"\n}))" + "source": "endpoint_out = svix.endpoint.create(\"app_id\", Svix::EndpointIn.new({\n \"description\": \"An example endpoint name\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let application_out = svix.application().patch(\"app_id\", ApplicationPatch {\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n}).await?;" + "source": "let endpoint_out = svix.endpoint().create(\"app_id\", EndpointIn {\n description: Some(\"An example endpoint name\".to_string()),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n url: \"https://example.com/webhook/\".to_string(),\n version: Some(1),\n disabled: Some(false),\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n secret: Some(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\".to_string()),\n headers: Some(json!({\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"})),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var applicationOut = await svix.Application.PatchAsync(\"app_id\", new ApplicationPatch{\n rateLimit: null,\n uid: \"unique-identifier\"\n});" + "source": "var endpointOut = await svix.Endpoint.CreateAsync(\"app_id\", new EndpointIn{\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n channels: new string[] {\"project_123\", \"group_2\"},\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n headers: /* ... */\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix application patch \"app_id\" '{\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n}'" + "source": "svix endpoint create \"app_id\" '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" } ] - }, - "put": { - "description": "Update an application.", - "operationId": "v1.application.update", + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}": { + "delete": { + "description": "Delete an endpoint.", + "operationId": "v1.endpoint.delete", "parameters": [ { "description": "The Application's ID or UID.", @@ -8284,38 +11529,26 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, + "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationIn" - } - } - }, - "required": true - }, "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationOut" - } - } - }, - "description": "" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -8393,224 +11626,77 @@ "HTTPBearer": [] } ], - "summary": "Update Application", + "summary": "Delete Endpoint", "tags": [ - "Application" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.update(\"app_id\", {\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" + "source": "await svix.endpoint.delete(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.update(\"app_id\", {\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" + "source": "await svix.endpoint.delete(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "application_out = svix.application.update(\"app_id\", ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-identifier\"\n))" + "source": "svix.endpoint.delete(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "application_out = await svix.application.update(\"app_id\", ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-identifier\"\n))" + "source": "await svix.endpoint.delete(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "applicationOut, err := svixClient.Application.Update(ctx, \"app_id\", &ApplicationIn{\n Name: \"My first application\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n})" + "source": "err := svixClient.Endpoint.Delete(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val applicationOut = svix.application.update(\"app_id\", ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n)" + "source": "svix.endpoint.delete(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "ApplicationOut applicationOut = svix.getApplication().update(\"app_id\", new ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n);" + "source": "svix.getEndpoint().delete(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "application_out = svix.application.update(\"app_id\", Svix::ApplicationIn.new({\n \"name\": \"My first application\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\"\n}))" + "source": "svix.endpoint.delete(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", - "lang": "Rust", - "source": "let application_out = svix.application().update(\"app_id\", ApplicationIn {\n name: \"My first application\".to_string(),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n}).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var applicationOut = await svix.Application.UpdateAsync(\"app_id\", new ApplicationIn{\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-identifier\"\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix application update \"app_id\" '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n}'" - }, - { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\"\n }'" - } - ] - } - }, - "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}": { - "get": { - "description": "List attempts by endpoint id\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.\n", - "operationId": "v1.message-attempt.list-by-endpoint", - "parameters": [ - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "nullable": true, - "pattern": "^atmpt_[A-Za-z0-9]{27}$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", - "explode": false, - "in": "query", - "name": "status", - "schema": { - "$ref": "#/components/schemas/MessageStatus", - "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", - "nullable": true - }, - "style": "form" - }, - { - "description": "Filter response based on the HTTP status code", - "explode": false, - "in": "query", - "name": "status_code_class", - "schema": { - "$ref": "#/components/schemas/StatusCodeClass", - "description": "Filter response based on the HTTP status code", - "nullable": true - }, - "style": "form" - }, - { - "description": "Filter response based on the channel", - "in": "query", - "name": "channel", - "schema": { - "description": "Filter response based on the channel", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the tag", - "in": "query", - "name": "tag", - "schema": { - "description": "Filter response based on the tag", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Only include items created before a certain date", - "in": "query", - "name": "before", - "schema": { - "description": "Only include items created before a certain date", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Only include items created after a certain date", - "in": "query", - "name": "after", - "schema": { - "description": "Only include items created after a certain date", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "When `true` attempt content is included in the response", - "in": "query", - "name": "with_content", - "schema": { - "default": true, - "description": "When `true` attempt content is included in the response", - "type": "boolean" - }, - "style": "form" - }, - { - "description": "When `true`, the message information is included in the response", - "in": "query", - "name": "with_msg", - "schema": { - "default": false, - "description": "When `true`, the message information is included in the response", - "type": "boolean" - }, - "style": "form" - }, - { - "description": "Filter response based on the event type", - "in": "query", - "name": "event_types", - "schema": { - "description": "Filter response based on the event type", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" + "lang": "Rust", + "source": "svix.endpoint().delete(\"app_id\", \"endpoint_id\").await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "await svix.Endpoint.DeleteAsync(\"app_id\", \"endpoint_id\");" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix endpoint delete \"app_id\" \"endpoint_id\"" }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + } + ] + }, + "get": { + "description": "Get an endpoint.", + "operationId": "v1.endpoint.get", + "parameters": [ { "description": "The Application's ID or UID.", "in": "path", @@ -8647,7 +11733,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_MessageAttemptOut_" + "$ref": "#/components/schemas/EndpointOut" } } }, @@ -8729,174 +11815,77 @@ "HTTPBearer": [] } ], - "summary": "List Attempts By Endpoint", + "summary": "Get Endpoint", "tags": [ - "Message Attempt" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\");" + "source": "const endpointOut = await svix.endpoint.get(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\");" + "source": "const endpointOut = await svix.endpoint.get(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_message_attempt_out = svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\", options=...)" + "source": "endpoint_out = svix.endpoint.get(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_message_attempt_out = await svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\", options=...)" + "source": "endpoint_out = await svix.endpoint.get(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "listResponseMessageAttemptOut, err := svixClient.MessageAttempt.ListByEndpoint(ctx, \"app_id\", \"endpoint_id\", nil)" + "source": "endpointOut, err := svixClient.Endpoint.Get(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseMessageAttemptOut = svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\")" + "source": "val endpointOut = svix.endpoint.get(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseMessageAttemptOut listResponseMessageAttemptOut = svix.getMessageAttempt().listByEndpoint(\"app_id\", \"endpoint_id\");" + "source": "EndpointOut endpointOut = svix.getEndpoint().get(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_message_attempt_out = svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\")" + "source": "endpoint_out = svix.endpoint.get(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_message_attempt_out = svix.message_attempt().list_by_endpoint(\"app_id\", \"endpoint_id\", None).await?;" + "source": "let endpoint_out = svix.endpoint().get(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseMessageAttemptOut = await svix.MessageAttempt.ListByEndpointAsync(\"app_id\", \"endpoint_id\");" + "source": "var endpointOut = await svix.Endpoint.GetAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message-attempt list-by-endpoint \"app_id\" \"endpoint_id\"" + "source": "svix endpoint get \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - } - }, - "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/count": { - "get": { - "description": "Like `v1.message-attempt.list-by-endpoint` but returning a count only.", - "operationId": "v1.message-attempt.count-by-endpoint", + }, + "patch": { + "description": "Partially update an endpoint.", + "operationId": "v1.endpoint.patch", "parameters": [ - { - "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", - "explode": false, - "in": "query", - "name": "status", - "schema": { - "$ref": "#/components/schemas/MessageStatus", - "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", - "nullable": true - }, - "style": "form" - }, - { - "description": "Filter response based on the HTTP status code", - "explode": false, - "in": "query", - "name": "status_code_class", - "schema": { - "$ref": "#/components/schemas/StatusCodeClass", - "description": "Filter response based on the HTTP status code", - "nullable": true - }, - "style": "form" - }, - { - "description": "Filter response based on the channel", - "in": "query", - "name": "channel", - "schema": { - "description": "Filter response based on the channel", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the tag", - "in": "query", - "name": "tag", - "schema": { - "description": "Filter response based on the tag", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Only include items created before a certain date", - "in": "query", - "name": "before", - "schema": { - "description": "Only include items created before a certain date", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Only include items created after a certain date", - "in": "query", - "name": "after", - "schema": { - "description": "Only include items created after a certain date", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the event type", - "in": "query", - "name": "event_types", - "schema": { - "description": "Filter response based on the event type", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" - }, { "description": "The Application's ID or UID.", "in": "path", @@ -8928,12 +11917,22 @@ "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointPatch" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CountOut" + "$ref": "#/components/schemas/EndpointOut" } } }, @@ -9015,210 +12014,77 @@ "HTTPBearer": [] } ], - "summary": "Count Attempts By Endpoint", + "summary": "Patch Endpoint", "tags": [ - "Message Attempt" - ], - "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const countOut = await svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const countOut = await svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "count_out = svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "count_out = await svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "countOut, err := svixClient.MessageAttempt.CountByEndpoint(ctx, \"app_id\", \"endpoint_id\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val countOut = svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "CountOut countOut = svix.getMessageAttempt().countByEndpoint(\"app_id\", \"endpoint_id\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "count_out = svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let count_out = svix.message_attempt().count_by_endpoint(\"app_id\", \"endpoint_id\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var countOut = await svix.MessageAttempt.CountByEndpointAsync(\"app_id\", \"endpoint_id\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix message-attempt count-by-endpoint \"app_id\" \"endpoint_id\"" - }, - { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/count' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } + "Endpoint" ], - "x-hidden": true - } - }, - "/api/v1/app/{app_id}/attempt/msg/{msg_id}": { - "get": { - "description": "List attempts by message ID.\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.", - "operationId": "v1.message-attempt.list-by-msg", - "parameters": [ - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const endpointOut = await svix.endpoint.patch(\"app_id\", \"endpoint_id\", {\n rateLimit: null,\n uid: \"unique-identifier\",\n version: 1,\n filterTypes: null,\n channels: null,\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" }, { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "nullable": true, - "pattern": "^atmpt_[A-Za-z0-9]{27}$", - "type": "string" - }, - "style": "form" + "label": "TypeScript", + "lang": "JavaScript", + "source": "const endpointOut = await svix.endpoint.patch(\"app_id\", \"endpoint_id\", {\n rateLimit: null,\n uid: \"unique-identifier\",\n version: 1,\n filterTypes: null,\n channels: null,\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" }, { - "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", - "explode": false, - "in": "query", - "name": "status", - "schema": { - "$ref": "#/components/schemas/MessageStatus", - "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", - "nullable": true - }, - "style": "form" + "label": "Python", + "lang": "Python", + "source": "endpoint_out = svix.endpoint.patch(\"app_id\", \"endpoint_id\", EndpointPatch(\n rate_limit=None,\n uid=\"unique-identifier\",\n version=1,\n filter_types=None,\n channels=None,\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n))" }, { - "description": "Filter response based on the HTTP status code", - "explode": false, - "in": "query", - "name": "status_code_class", - "schema": { - "$ref": "#/components/schemas/StatusCodeClass", - "description": "Filter response based on the HTTP status code", - "nullable": true - }, - "style": "form" + "label": "Python (Async)", + "lang": "Python", + "source": "endpoint_out = await svix.endpoint.patch(\"app_id\", \"endpoint_id\", EndpointPatch(\n rate_limit=None,\n uid=\"unique-identifier\",\n version=1,\n filter_types=None,\n channels=None,\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n))" }, { - "description": "Filter response based on the channel", - "in": "query", - "name": "channel", - "schema": { - "description": "Filter response based on the channel", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "style": "form" + "label": "Go", + "lang": "Go", + "source": "endpointOut, err := svixClient.Endpoint.Patch(ctx, \"app_id\", \"endpoint_id\", &EndpointPatch{\n RateLimit: nil,\n Uid: \"unique-identifier\",\n Version: 1,\n FilterTypes: nil,\n Channels: nil,\n Secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n})" }, { - "description": "Filter response based on the tag", - "in": "query", - "name": "tag", - "schema": { - "description": "Filter response based on the tag", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" + "label": "Kotlin", + "lang": "Kotlin", + "source": "val endpointOut = svix.endpoint.patch(\"app_id\", \"endpoint_id\", EndpointPatch()\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .version(1)\n .filterTypes(null)\n .channels(null)\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n)" }, { - "description": "Filter the attempts based on the attempted endpoint", - "in": "query", - "name": "endpoint_id", - "schema": { - "description": "Filter the attempts based on the attempted endpoint", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" + "label": "Java", + "lang": "Java", + "source": "EndpointOut endpointOut = svix.getEndpoint().patch(\"app_id\", \"endpoint_id\", new EndpointPatch()\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .version(1)\n .filterTypes(null)\n .channels(null)\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n);" }, { - "description": "Only include items created before a certain date", - "in": "query", - "name": "before", - "schema": { - "description": "Only include items created before a certain date", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" + "label": "Ruby", + "lang": "Ruby", + "source": "endpoint_out = svix.endpoint.patch(\"app_id\", \"endpoint_id\", Svix::EndpointPatch.new({\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\",\n \"version\": 1,\n \"filter_types\": nil,\n \"channels\": nil,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}))" }, { - "description": "Only include items created after a certain date", - "in": "query", - "name": "after", - "schema": { - "description": "Only include items created after a certain date", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" + "label": "Rust", + "lang": "Rust", + "source": "let endpoint_out = svix.endpoint().patch(\"app_id\", \"endpoint_id\", EndpointPatch {\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n version: Some(1),\n filter_types: None,\n channels: None,\n secret: Some(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\".to_string()),\n}).await?;" }, { - "description": "When `true` attempt content is included in the response", - "in": "query", - "name": "with_content", - "schema": { - "default": true, - "description": "When `true` attempt content is included in the response", - "type": "boolean" - }, - "style": "form" + "label": "C#", + "lang": "C#", + "source": "var endpointOut = await svix.Endpoint.PatchAsync(\"app_id\", \"endpoint_id\", new EndpointPatch{\n rateLimit: null,\n uid: \"unique-identifier\",\n version: 1,\n filterTypes: null,\n channels: null,\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix endpoint patch \"app_id\" \"endpoint_id\" '{\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"version\": 1,\n \"filterTypes\": null,\n \"channels\": null,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}'" }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"version\": 1,\n \"filterTypes\": null,\n \"channels\": null,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + } + ] + }, + "put": { + "description": "Update an endpoint.", + "operationId": "v1.endpoint.update", + "parameters": [ { "description": "The Application's ID or UID.", "in": "path", @@ -9235,12 +12101,12 @@ "style": "simple" }, { - "description": "The Message's ID or UID.", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "msg_id", + "name": "endpoint_id", "required": true, "schema": { - "description": "The Message's ID or UID.", + "description": "The Endpoint's ID or UID.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -9248,33 +12114,34 @@ "type": "string" }, "style": "simple" - }, - { - "description": "Filter response based on the event type", - "in": "query", - "name": "event_types", - "schema": { - "description": "Filter response based on the event type", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointUpdate" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_MessageAttemptOut_" + "$ref": "#/components/schemas/EndpointOut" + } + } + }, + "description": "" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointOut" } } }, @@ -9356,132 +12223,108 @@ "HTTPBearer": [] } ], - "summary": "List Attempts By Msg", + "summary": "Update Endpoint", "tags": [ - "Message Attempt" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByMsg(\"app_id\", \"msg_id\");" + "source": "const endpointOut = await svix.endpoint.update(\"app_id\", \"endpoint_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"]\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByMsg(\"app_id\", \"msg_id\");" + "source": "const endpointOut = await svix.endpoint.update(\"app_id\", \"endpoint_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"]\n});" }, { "label": "Python", "lang": "Python", - "source": "list_response_message_attempt_out = svix.message_attempt.list_by_msg(\"app_id\", \"msg_id\", options=...)" + "source": "endpoint_out = svix.endpoint.update(\"app_id\", \"endpoint_id\", EndpointUpdate(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n url=\"https://example.com/webhook/\",\n version=1,\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"]\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_message_attempt_out = await svix.message_attempt.list_by_msg(\"app_id\", \"msg_id\", options=...)" + "source": "endpoint_out = await svix.endpoint.update(\"app_id\", \"endpoint_id\", EndpointUpdate(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n url=\"https://example.com/webhook/\",\n version=1,\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"]\n))" }, { "label": "Go", "lang": "Go", - "source": "listResponseMessageAttemptOut, err := svixClient.MessageAttempt.ListByMsg(ctx, \"app_id\", \"msg_id\", nil)" + "source": "endpointOut, err := svixClient.Endpoint.Update(ctx, \"app_id\", \"endpoint_id\", &EndpointUpdate{\n Description: \"An example endpoint name\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n Url: \"https://example.com/webhook/\",\n Version: 1,\n Disabled: false,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n Channels: []string{\"project_123\", \"group_2\"},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseMessageAttemptOut = svix.messageAttempt.listByMsg(\"app_id\", \"msg_id\")" + "source": "val endpointOut = svix.endpoint.update(\"app_id\", \"endpoint_id\", EndpointUpdate()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .url(\"https://example.com/webhook/\")\n .version(1)\n .disabled(false)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .channels(arrayOf(\"project_123\", \"group_2\"))\n)" }, { "label": "Java", "lang": "Java", - "source": "ListResponseMessageAttemptOut listResponseMessageAttemptOut = svix.getMessageAttempt().listByMsg(\"app_id\", \"msg_id\");" + "source": "EndpointOut endpointOut = svix.getEndpoint().update(\"app_id\", \"endpoint_id\", new EndpointUpdate()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .url(\"https://example.com/webhook/\")\n .version(1)\n .disabled(false)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .channels(new String[]{\"project_123\", \"group_2\"})\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_message_attempt_out = svix.message_attempt.list_by_msg(\"app_id\", \"msg_id\")" + "source": "endpoint_out = svix.endpoint.update(\"app_id\", \"endpoint_id\", Svix::EndpointUpdate.new({\n \"description\": \"An example endpoint name\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_message_attempt_out = svix.message_attempt().list_by_msg(\"app_id\", \"msg_id\", None).await?;" + "source": "let endpoint_out = svix.endpoint().update(\"app_id\", \"endpoint_id\", EndpointUpdate {\n description: Some(\"An example endpoint name\".to_string()),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n url: \"https://example.com/webhook/\".to_string(),\n version: Some(1),\n disabled: Some(false),\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseMessageAttemptOut = await svix.MessageAttempt.ListByMsgAsync(\"app_id\", \"msg_id\");" + "source": "var endpointOut = await svix.Endpoint.UpdateAsync(\"app_id\", \"endpoint_id\", new EndpointUpdate{\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n channels: new string[] {\"project_123\", \"group_2\"}\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix message-attempt list-by-msg \"app_id\" \"msg_id\"" + "source": "svix endpoint update \"app_id\" \"endpoint_id\" '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/msg/{msg_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers": { "get": { - "description": "List the application's endpoints.", - "operationId": "v1.endpoint.list", + "description": "Get the additional headers to be sent with the webhook.", + "operationId": "v1.endpoint.get-headers", "parameters": [ { "description": "The Application's ID or UID.", "in": "path", "name": "app_id", - "required": true, - "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", + "required": true, "schema": { - "description": "The iterator returned from a prior invocation", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "nullable": true, - "pattern": "^ep_[A-Za-z0-9]{27}$", + "description": "The Application's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "style": "form" + "style": "simple" }, { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "style": "form" + "style": "simple" } ], "responses": { @@ -9489,7 +12332,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_EndpointOut_" + "$ref": "#/components/schemas/EndpointHeadersOut" } } }, @@ -9571,7 +12414,7 @@ "HTTPBearer": [] } ], - "summary": "List Endpoints", + "summary": "Get Endpoint Headers", "tags": [ "Endpoint" ], @@ -9579,68 +12422,68 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseEndpointOut = await svix.endpoint.list(\"app_id\");" + "source": "const endpointHeadersOut = await svix.endpoint.getHeaders(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseEndpointOut = await svix.endpoint.list(\"app_id\");" + "source": "const endpointHeadersOut = await svix.endpoint.getHeaders(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_endpoint_out = svix.endpoint.list(\"app_id\", options=...)" + "source": "endpoint_headers_out = svix.endpoint.get_headers(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_endpoint_out = await svix.endpoint.list(\"app_id\", options=...)" + "source": "endpoint_headers_out = await svix.endpoint.get_headers(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "listResponseEndpointOut, err := svixClient.Endpoint.List(ctx, \"app_id\", nil)" + "source": "endpointHeadersOut, err := svixClient.Endpoint.GetHeaders(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseEndpointOut = svix.endpoint.list(\"app_id\")" + "source": "val endpointHeadersOut = svix.endpoint.getHeaders(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseEndpointOut listResponseEndpointOut = svix.getEndpoint().list(\"app_id\");" + "source": "EndpointHeadersOut endpointHeadersOut = svix.getEndpoint().getHeaders(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_endpoint_out = svix.endpoint.list(\"app_id\")" + "source": "endpoint_headers_out = svix.endpoint.get_headers(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_endpoint_out = svix.endpoint().list(\"app_id\", None).await?;" + "source": "let endpoint_headers_out = svix.endpoint().get_headers(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseEndpointOut = await svix.Endpoint.ListAsync(\"app_id\");" + "source": "var endpointHeadersOut = await svix.Endpoint.GetHeadersAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint list \"app_id\"" + "source": "svix endpoint get-headers \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] }, - "post": { - "description": "Create a new endpoint for the application.\n\nWhen `secret` is `null` the secret is automatically generated (recommended).", - "operationId": "v1.endpoint.create", + "patch": { + "description": "Partially set the additional headers to be sent with the webhook.", + "operationId": "v1.endpoint.patch-headers", "parameters": [ { "description": "The Application's ID or UID.", @@ -9658,10 +12501,16 @@ "style": "simple" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -9671,22 +12520,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointIn" + "$ref": "#/components/schemas/EndpointHeadersPatchIn" } } }, "required": true }, "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -9764,7 +12606,7 @@ "HTTPBearer": [] } ], - "summary": "Create Endpoint", + "summary": "Patch Endpoint Headers", "tags": [ "Endpoint" ], @@ -9772,70 +12614,68 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointOut = await svix.endpoint.create(\"app_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"],\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" + "source": "await svix.endpoint.patchHeaders(\"app_id\", \"endpoint_id\", {\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointOut = await svix.endpoint.create(\"app_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"],\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" + "source": "await svix.endpoint.patchHeaders(\"app_id\", \"endpoint_id\", {\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" }, { "label": "Python", "lang": "Python", - "source": "endpoint_out = svix.endpoint.create(\"app_id\", EndpointIn(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n url=\"https://example.com/webhook/\",\n version=1,\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"],\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n), options=...)" + "source": "svix.endpoint.patch_headers(\"app_id\", \"endpoint_id\", EndpointHeadersPatchIn(\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_out = await svix.endpoint.create(\"app_id\", EndpointIn(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n url=\"https://example.com/webhook/\",\n version=1,\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"],\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n), options=...)" + "source": "await svix.endpoint.patch_headers(\"app_id\", \"endpoint_id\", EndpointHeadersPatchIn(\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n))" }, { "label": "Go", "lang": "Go", - "source": "endpointOut, err := svixClient.Endpoint.Create(ctx, \"app_id\", &EndpointIn{\n Description: \"An example endpoint name\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n Url: \"https://example.com/webhook/\",\n Version: 1,\n Disabled: false,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n Channels: []string{\"project_123\", \"group_2\"},\n Secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n})" + "source": "err := svixClient.Endpoint.PatchHeaders(ctx, \"app_id\", \"endpoint_id\", &EndpointHeadersPatchIn{\n Headers: map[string]interface{}{\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointOut = svix.endpoint.create(\"app_id\", EndpointIn()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .url(\"https://example.com/webhook/\")\n .version(1)\n .disabled(false)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .channels(arrayOf(\"project_123\", \"group_2\"))\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n)" + "source": "svix.endpoint.patchHeaders(\"app_id\", \"endpoint_id\", EndpointHeadersPatchIn()\n .headers(/* ... */)\n)" }, { "label": "Java", "lang": "Java", - "source": "EndpointOut endpointOut = svix.getEndpoint().create(\"app_id\", new EndpointIn()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .url(\"https://example.com/webhook/\")\n .version(1)\n .disabled(false)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .channels(new String[]{\"project_123\", \"group_2\"})\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n);" + "source": "svix.getEndpoint().patchHeaders(\"app_id\", \"endpoint_id\", new EndpointHeadersPatchIn()\n .headers(/* ... */)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_out = svix.endpoint.create(\"app_id\", Svix::EndpointIn.new({\n \"description\": \"An example endpoint name\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}))" + "source": "svix.endpoint.patch_headers(\"app_id\", \"endpoint_id\", Svix::EndpointHeadersPatchIn.new({\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_out = svix.endpoint().create(\"app_id\", EndpointIn {\n description: Some(\"An example endpoint name\".to_string()),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n url: \"https://example.com/webhook/\".to_string(),\n version: Some(1),\n disabled: Some(false),\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n secret: Some(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\".to_string()),\n}, None).await?;" + "source": "svix.endpoint().patch_headers(\"app_id\", \"endpoint_id\", EndpointHeadersPatchIn {\n headers: json!({\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}),\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointOut = await svix.Endpoint.CreateAsync(\"app_id\", new EndpointIn{\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n channels: new string[] {\"project_123\", \"group_2\"},\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" + "source": "await svix.Endpoint.PatchHeadersAsync(\"app_id\", \"endpoint_id\", new EndpointHeadersPatchIn{\n headers: /* ... */\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint create \"app_id\" '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}'" + "source": "svix endpoint patch-headers \"app_id\" \"endpoint_id\" '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" } ] - } - }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}": { - "delete": { - "description": "Delete an endpoint.", - "operationId": "v1.endpoint.delete", + }, + "put": { + "description": "Set the additional headers to be sent with the webhook.", + "operationId": "v1.endpoint.update-headers", "parameters": [ { "description": "The Application's ID or UID.", @@ -9868,6 +12708,16 @@ "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointHeadersIn" + } + } + }, + "required": true + }, "responses": { "204": { "description": "no content" @@ -9948,7 +12798,7 @@ "HTTPBearer": [] } ], - "summary": "Delete Endpoint", + "summary": "Update Endpoint Headers", "tags": [ "Endpoint" ], @@ -9956,69 +12806,174 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.delete(\"app_id\", \"endpoint_id\");" + "source": "await svix.endpoint.updateHeaders(\"app_id\", \"endpoint_id\", {\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.delete(\"app_id\", \"endpoint_id\");" + "source": "await svix.endpoint.updateHeaders(\"app_id\", \"endpoint_id\", {\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.delete(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.update_headers(\"app_id\", \"endpoint_id\", EndpointHeadersIn(\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.delete(\"app_id\", \"endpoint_id\")" + "source": "await svix.endpoint.update_headers(\"app_id\", \"endpoint_id\", EndpointHeadersIn(\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n))" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.Delete(ctx, \"app_id\", \"endpoint_id\")" + "source": "err := svixClient.Endpoint.UpdateHeaders(ctx, \"app_id\", \"endpoint_id\", &EndpointHeadersIn{\n Headers: map[string]interface{}{\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.delete(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.updateHeaders(\"app_id\", \"endpoint_id\", EndpointHeadersIn()\n .headers(/* ... */)\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().delete(\"app_id\", \"endpoint_id\");" + "source": "svix.getEndpoint().updateHeaders(\"app_id\", \"endpoint_id\", new EndpointHeadersIn()\n .headers(/* ... */)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.delete(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.update_headers(\"app_id\", \"endpoint_id\", Svix::EndpointHeadersIn.new({\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().delete(\"app_id\", \"endpoint_id\").await?;" + "source": "svix.endpoint().update_headers(\"app_id\", \"endpoint_id\", EndpointHeadersIn {\n headers: json!({\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}),\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.DeleteAsync(\"app_id\", \"endpoint_id\");" + "source": "await svix.Endpoint.UpdateHeadersAsync(\"app_id\", \"endpoint_id\", new EndpointHeadersIn{\n headers: /* ... */\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint delete \"app_id\" \"endpoint_id\"" + "source": "svix endpoint update-headers \"app_id\" \"endpoint_id\" '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" } ] - }, + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg": { "get": { - "description": "Get an endpoint.", - "operationId": "v1.endpoint.get", + "description": "List messages for a particular endpoint. Additionally includes metadata about the latest message attempt.\n\nThe `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.\n", + "operationId": "v1.message-attempt.list-attempted-messages", "parameters": [ + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "nullable": true, + "pattern": "^msg_[A-Za-z0-9]{27}$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter response based on the channel", + "in": "query", + "name": "channel", + "schema": { + "description": "Filter response based on the channel", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter response based on the message tags", + "in": "query", + "name": "tag", + "schema": { + "description": "Filter response based on the message tags", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/MessageStatus", + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "nullable": true + }, + "style": "form" + }, + { + "description": "Only include items created before a certain date", + "in": "query", + "name": "before", + "schema": { + "description": "Only include items created before a certain date", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only include items created after a certain date", + "in": "query", + "name": "after", + "schema": { + "description": "Only include items created after a certain date", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "When `true` message payloads are included in the response", + "in": "query", + "name": "with_content", + "schema": { + "default": true, + "description": "When `true` message payloads are included in the response", + "type": "boolean" + }, + "style": "form" + }, { "description": "The Application's ID or UID.", "in": "path", @@ -10048,6 +13003,25 @@ "type": "string" }, "style": "simple" + }, + { + "description": "Filter response based on the event type", + "in": "query", + "name": "event_types", + "schema": { + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" } ], "responses": { @@ -10055,7 +13029,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointOut" + "$ref": "#/components/schemas/ListResponse_EndpointMessageOut_" } } }, @@ -10137,76 +13111,78 @@ "HTTPBearer": [] } ], - "summary": "Get Endpoint", + "summary": "List Attempted Messages", "tags": [ - "Endpoint" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointOut = await svix.endpoint.get(\"app_id\", \"endpoint_id\");" + "source": "const listResponseEndpointMessageOut = await svix.messageAttempt.listAttemptedMessages(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointOut = await svix.endpoint.get(\"app_id\", \"endpoint_id\");" + "source": "const listResponseEndpointMessageOut = await svix.messageAttempt.listAttemptedMessages(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "endpoint_out = svix.endpoint.get(\"app_id\", \"endpoint_id\")" + "source": "list_response_endpoint_message_out = svix.message_attempt.list_attempted_messages(\"app_id\", \"endpoint_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_out = await svix.endpoint.get(\"app_id\", \"endpoint_id\")" + "source": "list_response_endpoint_message_out = await svix.message_attempt.list_attempted_messages(\"app_id\", \"endpoint_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "endpointOut, err := svixClient.Endpoint.Get(ctx, \"app_id\", \"endpoint_id\")" + "source": "listResponseEndpointMessageOut, err := svixClient.MessageAttempt.ListAttemptedMessages(ctx, \"app_id\", \"endpoint_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointOut = svix.endpoint.get(\"app_id\", \"endpoint_id\")" + "source": "val listResponseEndpointMessageOut = svix.messageAttempt.listAttemptedMessages(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "EndpointOut endpointOut = svix.getEndpoint().get(\"app_id\", \"endpoint_id\");" + "source": "ListResponseEndpointMessageOut listResponseEndpointMessageOut = svix.getMessageAttempt().listAttemptedMessages(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_out = svix.endpoint.get(\"app_id\", \"endpoint_id\")" + "source": "list_response_endpoint_message_out = svix.message_attempt.list_attempted_messages(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_out = svix.endpoint().get(\"app_id\", \"endpoint_id\").await?;" + "source": "let list_response_endpoint_message_out = svix.message_attempt().list_attempted_messages(\"app_id\", \"endpoint_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointOut = await svix.Endpoint.GetAsync(\"app_id\", \"endpoint_id\");" + "source": "var listResponseEndpointMessageOut = await svix.MessageAttempt.ListAttemptedMessagesAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint get \"app_id\" \"endpoint_id\"" + "source": "svix message-attempt list-attempted-messages \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - }, - "patch": { - "description": "Partially update an endpoint.", - "operationId": "v1.endpoint.patch", + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt": { + "post": { + "description": "Creates and sends a message to the specified endpoint.\n\nThe message attempt and response from the endpoint is returned.", + "operationId": "create_message_attempt_for_endpoint", "parameters": [ { "description": "The Application's ID or UID.", @@ -10237,24 +13213,33 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointPatch" + "$ref": "#/components/schemas/MessageIn" } } }, "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointOut" + "$ref": "#/components/schemas/MessageAttemptOut" } } }, @@ -10336,76 +13321,24 @@ "HTTPBearer": [] } ], - "summary": "Patch Endpoint", + "summary": "Create Message Attempt For Endpoint", "tags": [ - "Endpoint" + "Message" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const endpointOut = await svix.endpoint.patch(\"app_id\", \"endpoint_id\", {\n rateLimit: null,\n uid: \"unique-identifier\",\n version: 1,\n filterTypes: null,\n channels: null,\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const endpointOut = await svix.endpoint.patch(\"app_id\", \"endpoint_id\", {\n rateLimit: null,\n uid: \"unique-identifier\",\n version: 1,\n filterTypes: null,\n channels: null,\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "endpoint_out = svix.endpoint.patch(\"app_id\", \"endpoint_id\", EndpointPatch(\n rate_limit=None,\n uid=\"unique-identifier\",\n version=1,\n filter_types=None,\n channels=None,\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n))" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "endpoint_out = await svix.endpoint.patch(\"app_id\", \"endpoint_id\", EndpointPatch(\n rate_limit=None,\n uid=\"unique-identifier\",\n version=1,\n filter_types=None,\n channels=None,\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n))" - }, - { - "label": "Go", - "lang": "Go", - "source": "endpointOut, err := svixClient.Endpoint.Patch(ctx, \"app_id\", \"endpoint_id\", &EndpointPatch{\n RateLimit: nil,\n Uid: \"unique-identifier\",\n Version: 1,\n FilterTypes: nil,\n Channels: nil,\n Secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val endpointOut = svix.endpoint.patch(\"app_id\", \"endpoint_id\", EndpointPatch()\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .version(1)\n .filterTypes(null)\n .channels(null)\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "EndpointOut endpointOut = svix.getEndpoint().patch(\"app_id\", \"endpoint_id\", new EndpointPatch()\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .version(1)\n .filterTypes(null)\n .channels(null)\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "endpoint_out = svix.endpoint.patch(\"app_id\", \"endpoint_id\", Svix::EndpointPatch.new({\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\",\n \"version\": 1,\n \"filter_types\": nil,\n \"channels\": nil,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let endpoint_out = svix.endpoint().patch(\"app_id\", \"endpoint_id\", EndpointPatch {\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n version: Some(1),\n filter_types: None,\n channels: None,\n secret: Some(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\".to_string()),\n}).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var endpointOut = await svix.Endpoint.PatchAsync(\"app_id\", \"endpoint_id\", new EndpointPatch{\n rateLimit: null,\n uid: \"unique-identifier\",\n version: 1,\n filterTypes: null,\n channels: null,\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix endpoint patch \"app_id\" \"endpoint_id\" '{\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"version\": 1,\n \"filterTypes\": null,\n \"channels\": null,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"version\": 1,\n \"filterTypes\": null,\n \"channels\": null,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null,\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n }'" } - ] - }, - "put": { - "description": "Update an endpoint.", - "operationId": "v1.endpoint.update", + ], + "x-hidden": true + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls": { + "delete": { + "description": "Delete endpoint mTLS configuration.", + "operationId": "v1.endpoint.delete-mtls-config", "parameters": [ { "description": "The Application's ID or UID.", @@ -10438,36 +13371,9 @@ "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointUpdate" - } - } - }, - "required": true - }, "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointOut" - } - } - }, - "description": "" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -10545,7 +13451,7 @@ "HTTPBearer": [] } ], - "summary": "Update Endpoint", + "summary": "Delete Endpoint Mtls Config", "tags": [ "Endpoint" ], @@ -10553,70 +13459,69 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointOut = await svix.endpoint.update(\"app_id\", \"endpoint_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"]\n});" + "source": "await svix.endpoint.deleteMtlsConfig(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointOut = await svix.endpoint.update(\"app_id\", \"endpoint_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"]\n});" + "source": "await svix.endpoint.deleteMtlsConfig(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "endpoint_out = svix.endpoint.update(\"app_id\", \"endpoint_id\", EndpointUpdate(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n url=\"https://example.com/webhook/\",\n version=1,\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"]\n))" + "source": "svix.endpoint.delete_mtls_config(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_out = await svix.endpoint.update(\"app_id\", \"endpoint_id\", EndpointUpdate(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n url=\"https://example.com/webhook/\",\n version=1,\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"]\n))" + "source": "await svix.endpoint.delete_mtls_config(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "endpointOut, err := svixClient.Endpoint.Update(ctx, \"app_id\", \"endpoint_id\", &EndpointUpdate{\n Description: \"An example endpoint name\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n Url: \"https://example.com/webhook/\",\n Version: 1,\n Disabled: false,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n Channels: []string{\"project_123\", \"group_2\"},\n})" + "source": "err := svixClient.Endpoint.DeleteMtlsConfig(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointOut = svix.endpoint.update(\"app_id\", \"endpoint_id\", EndpointUpdate()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .url(\"https://example.com/webhook/\")\n .version(1)\n .disabled(false)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .channels(arrayOf(\"project_123\", \"group_2\"))\n)" + "source": "svix.endpoint.deleteMtlsConfig(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "EndpointOut endpointOut = svix.getEndpoint().update(\"app_id\", \"endpoint_id\", new EndpointUpdate()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .url(\"https://example.com/webhook/\")\n .version(1)\n .disabled(false)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .channels(new String[]{\"project_123\", \"group_2\"})\n);" + "source": "svix.getEndpoint().deleteMtlsConfig(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_out = svix.endpoint.update(\"app_id\", \"endpoint_id\", Svix::EndpointUpdate.new({\n \"description\": \"An example endpoint name\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n}))" + "source": "svix.endpoint.delete_mtls_config(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_out = svix.endpoint().update(\"app_id\", \"endpoint_id\", EndpointUpdate {\n description: Some(\"An example endpoint name\".to_string()),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n url: \"https://example.com/webhook/\".to_string(),\n version: Some(1),\n disabled: Some(false),\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n}).await?;" + "source": "svix.endpoint().delete_mtls_config(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointOut = await svix.Endpoint.UpdateAsync(\"app_id\", \"endpoint_id\", new EndpointUpdate{\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n url: \"https://example.com/webhook/\",\n version: 1,\n disabled: false,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n channels: new string[] {\"project_123\", \"group_2\"}\n});" + "source": "await svix.Endpoint.DeleteMtlsConfigAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint update \"app_id\" \"endpoint_id\" '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n}'" + "source": "svix endpoint delete-mtls-config \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n }'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] - } - }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers": { + ], + "x-hidden": true + }, "get": { - "description": "Get the additional headers to be sent with the webhook.", - "operationId": "v1.endpoint.get-headers", + "description": "Get endpoint mTLS configuration.", + "operationId": "v1.endpoint.get-mtls-config", "parameters": [ { "description": "The Application's ID or UID.", @@ -10654,7 +13559,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointHeadersOut" + "$ref": "#/components/schemas/EndpointMtlsConfigOut" } } }, @@ -10736,7 +13641,7 @@ "HTTPBearer": [] } ], - "summary": "Get Endpoint Headers", + "summary": "Get Endpoint Mtls Config", "tags": [ "Endpoint" ], @@ -10744,68 +13649,69 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointHeadersOut = await svix.endpoint.getHeaders(\"app_id\", \"endpoint_id\");" + "source": "const endpointMtlsConfigOut = await svix.endpoint.getMtlsConfig(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointHeadersOut = await svix.endpoint.getHeaders(\"app_id\", \"endpoint_id\");" + "source": "const endpointMtlsConfigOut = await svix.endpoint.getMtlsConfig(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "endpoint_headers_out = svix.endpoint.get_headers(\"app_id\", \"endpoint_id\")" + "source": "endpoint_mtls_config_out = svix.endpoint.get_mtls_config(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_headers_out = await svix.endpoint.get_headers(\"app_id\", \"endpoint_id\")" + "source": "endpoint_mtls_config_out = await svix.endpoint.get_mtls_config(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "endpointHeadersOut, err := svixClient.Endpoint.GetHeaders(ctx, \"app_id\", \"endpoint_id\")" + "source": "endpointMtlsConfigOut, err := svixClient.Endpoint.GetMtlsConfig(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointHeadersOut = svix.endpoint.getHeaders(\"app_id\", \"endpoint_id\")" + "source": "val endpointMtlsConfigOut = svix.endpoint.getMtlsConfig(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "EndpointHeadersOut endpointHeadersOut = svix.getEndpoint().getHeaders(\"app_id\", \"endpoint_id\");" + "source": "EndpointMtlsConfigOut endpointMtlsConfigOut = svix.getEndpoint().getMtlsConfig(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_headers_out = svix.endpoint.get_headers(\"app_id\", \"endpoint_id\")" + "source": "endpoint_mtls_config_out = svix.endpoint.get_mtls_config(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_headers_out = svix.endpoint().get_headers(\"app_id\", \"endpoint_id\").await?;" + "source": "let endpoint_mtls_config_out = svix.endpoint().get_mtls_config(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointHeadersOut = await svix.Endpoint.GetHeadersAsync(\"app_id\", \"endpoint_id\");" + "source": "var endpointMtlsConfigOut = await svix.Endpoint.GetMtlsConfigAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint get-headers \"app_id\" \"endpoint_id\"" + "source": "svix endpoint get-mtls-config \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] - }, - "patch": { - "description": "Partially set the additional headers to be sent with the webhook.", - "operationId": "v1.endpoint.patch-headers", + ], + "x-hidden": true + }, + "put": { + "description": "Create / update endpoint mTLS configuration.", + "operationId": "v1.endpoint.update-mtls-config", "parameters": [ { "description": "The Application's ID or UID.", @@ -10842,7 +13748,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointHeadersPatchIn" + "$ref": "#/components/schemas/EndpointMtlsConfigIn" } } }, @@ -10928,7 +13834,7 @@ "HTTPBearer": [] } ], - "summary": "Patch Endpoint Headers", + "summary": "Update Endpoint Mtls Config", "tags": [ "Endpoint" ], @@ -10936,68 +13842,71 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.patchHeaders(\"app_id\", \"endpoint_id\", {\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" + "source": "await svix.endpoint.updateMtlsConfig(\"app_id\", \"endpoint_id\", {\n serverCaCert: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.patchHeaders(\"app_id\", \"endpoint_id\", {\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" + "source": "await svix.endpoint.updateMtlsConfig(\"app_id\", \"endpoint_id\", {\n serverCaCert: null\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.patch_headers(\"app_id\", \"endpoint_id\", EndpointHeadersPatchIn(\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n))" + "source": "svix.endpoint.update_mtls_config(\"app_id\", \"endpoint_id\", EndpointMtlsConfigIn(\n server_ca_cert=None\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.patch_headers(\"app_id\", \"endpoint_id\", EndpointHeadersPatchIn(\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n))" + "source": "await svix.endpoint.update_mtls_config(\"app_id\", \"endpoint_id\", EndpointMtlsConfigIn(\n server_ca_cert=None\n))" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.PatchHeaders(ctx, \"app_id\", \"endpoint_id\", &EndpointHeadersPatchIn{\n Headers: map[string]interface{}{\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"},\n})" + "source": "err := svixClient.Endpoint.UpdateMtlsConfig(ctx, \"app_id\", \"endpoint_id\", &EndpointMtlsConfigIn{\n ServerCaCert: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.patchHeaders(\"app_id\", \"endpoint_id\", EndpointHeadersPatchIn()\n .headers(/* ... */)\n)" + "source": "svix.endpoint.updateMtlsConfig(\"app_id\", \"endpoint_id\", EndpointMtlsConfigIn()\n .serverCaCert(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().patchHeaders(\"app_id\", \"endpoint_id\", new EndpointHeadersPatchIn()\n .headers(/* ... */)\n);" + "source": "svix.getEndpoint().updateMtlsConfig(\"app_id\", \"endpoint_id\", new EndpointMtlsConfigIn()\n .serverCaCert(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.patch_headers(\"app_id\", \"endpoint_id\", Svix::EndpointHeadersPatchIn.new({\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}))" + "source": "svix.endpoint.update_mtls_config(\"app_id\", \"endpoint_id\", Svix::EndpointMtlsConfigIn.new({\n \"server_ca_cert\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().patch_headers(\"app_id\", \"endpoint_id\", EndpointHeadersPatchIn {\n headers: json!({\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}),\n}).await?;" + "source": "svix.endpoint().update_mtls_config(\"app_id\", \"endpoint_id\", EndpointMtlsConfigIn {\n server_ca_cert: None,\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.PatchHeadersAsync(\"app_id\", \"endpoint_id\", new EndpointHeadersPatchIn{\n headers: /* ... */\n});" + "source": "await svix.Endpoint.UpdateMtlsConfigAsync(\"app_id\", \"endpoint_id\", new EndpointMtlsConfigIn{\n serverCaCert: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint patch-headers \"app_id\" \"endpoint_id\" '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}'" + "source": "svix endpoint update-mtls-config \"app_id\" \"endpoint_id\" '{\n \"serverCaCert\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"serverCaCert\": null\n }'" } - ] - }, - "put": { - "description": "Set the additional headers to be sent with the webhook.", - "operationId": "v1.endpoint.update-headers", + ], + "x-hidden": true + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth": { + "delete": { + "description": "Delete endpoint OAuth configuration.", + "operationId": "v1.endpoint.delete-oauth-config", "parameters": [ { "description": "The Application's ID or UID.", @@ -11030,16 +13939,6 @@ "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointHeadersIn" - } - } - }, - "required": true - }, "responses": { "204": { "description": "no content" @@ -11120,7 +14019,7 @@ "HTTPBearer": [] } ], - "summary": "Update Endpoint Headers", + "summary": "Delete Endpoint Oauth Config", "tags": [ "Endpoint" ], @@ -11128,174 +14027,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.updateHeaders(\"app_id\", \"endpoint_id\", {\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" + "source": "await svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.updateHeaders(\"app_id\", \"endpoint_id\", {\n headers: {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n});" + "source": "await svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.update_headers(\"app_id\", \"endpoint_id\", EndpointHeadersIn(\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n))" + "source": "svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.update_headers(\"app_id\", \"endpoint_id\", EndpointHeadersIn(\n headers={\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"}\n))" + "source": "await svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.UpdateHeaders(ctx, \"app_id\", \"endpoint_id\", &EndpointHeadersIn{\n Headers: map[string]interface{}{\"X-Example\": \"123\", \"X-Foobar\": \"Bar\"},\n})" + "source": "err := svixClient.Endpoint.DeleteOauthConfig(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.updateHeaders(\"app_id\", \"endpoint_id\", EndpointHeadersIn()\n .headers(/* ... */)\n)" + "source": "svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().updateHeaders(\"app_id\", \"endpoint_id\", new EndpointHeadersIn()\n .headers(/* ... */)\n);" + "source": "svix.getEndpoint().deleteOauthConfig(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.update_headers(\"app_id\", \"endpoint_id\", Svix::EndpointHeadersIn.new({\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}))" + "source": "svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().update_headers(\"app_id\", \"endpoint_id\", EndpointHeadersIn {\n headers: json!({\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}),\n}).await?;" + "source": "svix.endpoint().delete_oauth_config(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.UpdateHeadersAsync(\"app_id\", \"endpoint_id\", new EndpointHeadersIn{\n headers: /* ... */\n});" + "source": "await svix.Endpoint.DeleteOauthConfigAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint update-headers \"app_id\" \"endpoint_id\" '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n}'" + "source": "svix endpoint delete-oauth-config \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] - } - }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg": { + ], + "x-hidden": true + }, "get": { - "description": "List messages for a particular endpoint. Additionally includes metadata about the latest message attempt.\n\nThe `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.\n", - "operationId": "v1.message-attempt.list-attempted-messages", + "description": "Get endpoint OAuth configuration.", + "operationId": "v1.endpoint.get-oauth-config", "parameters": [ - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "nullable": true, - "pattern": "^msg_[A-Za-z0-9]{27}$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the channel", - "in": "query", - "name": "channel", - "schema": { - "description": "Filter response based on the channel", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the message tags", - "in": "query", - "name": "tag", - "schema": { - "description": "Filter response based on the message tags", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", - "explode": false, - "in": "query", - "name": "status", - "schema": { - "$ref": "#/components/schemas/MessageStatus", - "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", - "nullable": true - }, - "style": "form" - }, - { - "description": "Only include items created before a certain date", - "in": "query", - "name": "before", - "schema": { - "description": "Only include items created before a certain date", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Only include items created after a certain date", - "in": "query", - "name": "after", - "schema": { - "description": "Only include items created after a certain date", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "When `true` message payloads are included in the response", - "in": "query", - "name": "with_content", - "schema": { - "default": true, - "description": "When `true` message payloads are included in the response", - "type": "boolean" - }, - "style": "form" - }, { "description": "The Application's ID or UID.", "in": "path", @@ -11325,25 +14120,6 @@ "type": "string" }, "style": "simple" - }, - { - "description": "Filter response based on the event type", - "in": "query", - "name": "event_types", - "schema": { - "description": "Filter response based on the event type", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" } ], "responses": { @@ -11351,7 +14127,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_EndpointMessageOut_" + "$ref": "#/components/schemas/EndpointOauthConfigOut" } } }, @@ -11433,78 +14209,77 @@ "HTTPBearer": [] } ], - "summary": "List Attempted Messages", + "summary": "Get Endpoint Oauth Config", "tags": [ - "Message Attempt" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseEndpointMessageOut = await svix.messageAttempt.listAttemptedMessages(\"app_id\", \"endpoint_id\");" + "source": "const endpointOauthConfigOut = await svix.endpoint.getOauthConfig(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseEndpointMessageOut = await svix.messageAttempt.listAttemptedMessages(\"app_id\", \"endpoint_id\");" + "source": "const endpointOauthConfigOut = await svix.endpoint.getOauthConfig(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_endpoint_message_out = svix.message_attempt.list_attempted_messages(\"app_id\", \"endpoint_id\", options=...)" + "source": "endpoint_oauth_config_out = svix.endpoint.get_oauth_config(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_endpoint_message_out = await svix.message_attempt.list_attempted_messages(\"app_id\", \"endpoint_id\", options=...)" + "source": "endpoint_oauth_config_out = await svix.endpoint.get_oauth_config(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "listResponseEndpointMessageOut, err := svixClient.MessageAttempt.ListAttemptedMessages(ctx, \"app_id\", \"endpoint_id\", nil)" + "source": "endpointOauthConfigOut, err := svixClient.Endpoint.GetOauthConfig(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseEndpointMessageOut = svix.messageAttempt.listAttemptedMessages(\"app_id\", \"endpoint_id\")" + "source": "val endpointOauthConfigOut = svix.endpoint.getOauthConfig(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseEndpointMessageOut listResponseEndpointMessageOut = svix.getMessageAttempt().listAttemptedMessages(\"app_id\", \"endpoint_id\");" + "source": "EndpointOauthConfigOut endpointOauthConfigOut = svix.getEndpoint().getOauthConfig(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_endpoint_message_out = svix.message_attempt.list_attempted_messages(\"app_id\", \"endpoint_id\")" + "source": "endpoint_oauth_config_out = svix.endpoint.get_oauth_config(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_endpoint_message_out = svix.message_attempt().list_attempted_messages(\"app_id\", \"endpoint_id\", None).await?;" + "source": "let endpoint_oauth_config_out = svix.endpoint().get_oauth_config(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseEndpointMessageOut = await svix.MessageAttempt.ListAttemptedMessagesAsync(\"app_id\", \"endpoint_id\");" + "source": "var endpointOauthConfigOut = await svix.Endpoint.GetOauthConfigAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message-attempt list-attempted-messages \"app_id\" \"endpoint_id\"" + "source": "svix endpoint get-oauth-config \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] - } - }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt": { - "post": { - "description": "Creates and sends a message to the specified endpoint.\n\nThe message attempt and response from the endpoint is returned.", - "operationId": "create_message_attempt_for_endpoint", + ], + "x-hidden": true + }, + "put": { + "description": "Create / update endpoint OAuth configuration.", + "operationId": "v1.endpoint.update-oauth-config", "parameters": [ { "description": "The Application's ID or UID.", @@ -11535,37 +14310,21 @@ "type": "string" }, "style": "simple" - }, - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { - "type": "string" - }, - "style": "simple" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageIn" + "$ref": "#/components/schemas/EndpointOauthConfigIn" } } }, "required": true }, "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageAttemptOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -11643,24 +14402,79 @@ "HTTPBearer": [] } ], - "summary": "Create Message Attempt For Endpoint", + "summary": "Update Endpoint Oauth Config", "tags": [ - "Message" + "Endpoint" ], "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "await svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", {\n jwtParams: null,\n clientSecret: null,\n scopes: null,\n extraParams: null,\n refreshToken: null\n});" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "await svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", {\n jwtParams: null,\n clientSecret: null,\n scopes: null,\n extraParams: null,\n refreshToken: null\n});" + }, + { + "label": "Python", + "lang": "Python", + "source": "svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn(\n jwt_params=None,\n client_secret=None,\n scopes=None,\n extra_params=None,\n refresh_token=None\n))" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "await svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn(\n jwt_params=None,\n client_secret=None,\n scopes=None,\n extra_params=None,\n refresh_token=None\n))" + }, + { + "label": "Go", + "lang": "Go", + "source": "err := svixClient.Endpoint.UpdateOauthConfig(ctx, \"app_id\", \"endpoint_id\", &EndpointOauthConfigIn{\n JwtParams: nil,\n ClientSecret: nil,\n Scopes: nil,\n ExtraParams: nil,\n RefreshToken: nil,\n})" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn()\n .jwtParams(null)\n .clientSecret(null)\n .scopes(null)\n .extraParams(null)\n .refreshToken(null)\n)" + }, + { + "label": "Java", + "lang": "Java", + "source": "svix.getEndpoint().updateOauthConfig(\"app_id\", \"endpoint_id\", new EndpointOauthConfigIn()\n .jwtParams(null)\n .clientSecret(null)\n .scopes(null)\n .extraParams(null)\n .refreshToken(null)\n);" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", Svix::EndpointOauthConfigIn.new({\n \"jwt_params\": nil,\n \"client_secret\": nil,\n \"scopes\": nil,\n \"extra_params\": nil,\n \"refresh_token\": nil\n}))" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "svix.endpoint().update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn {\n jwt_params: None,\n client_secret: None,\n scopes: None,\n extra_params: None,\n refresh_token: None,\n}).await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "await svix.Endpoint.UpdateOauthConfigAsync(\"app_id\", \"endpoint_id\", new EndpointOauthConfigIn{\n jwtParams: null,\n clientSecret: null,\n scopes: null,\n extraParams: null,\n refreshToken: null\n});" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix endpoint update-oauth-config \"app_id\" \"endpoint_id\" '{\n \"jwtParams\": null,\n \"clientSecret\": null,\n \"scopes\": null,\n \"extraParams\": null,\n \"refreshToken\": null\n}'" + }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null,\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"jwtParams\": null,\n \"clientSecret\": null,\n \"scopes\": null,\n \"extraParams\": null,\n \"refreshToken\": null\n }'" } ], "x-hidden": true } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls": { - "delete": { - "description": "Delete endpoint mTLS configuration.", - "operationId": "v1.endpoint.delete-mtls-config", + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover": { + "post": { + "description": "Resend all failed messages since a given time.\n\nMessages that were sent successfully, even if failed initially, are not resent.", + "operationId": "v1.endpoint.recover", "parameters": [ { "description": "The Application's ID or UID.", @@ -11691,11 +14505,37 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecoverIn" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "no content" + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecoverOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -11773,7 +14613,7 @@ "HTTPBearer": [] } ], - "summary": "Delete Endpoint Mtls Config", + "summary": "Recover Failed Webhooks", "tags": [ "Endpoint" ], @@ -11781,69 +14621,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.deleteMtlsConfig(\"app_id\", \"endpoint_id\");" + "source": "const recoverOut = await svix.endpoint.recover(\"app_id\", \"endpoint_id\", {\n until: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.deleteMtlsConfig(\"app_id\", \"endpoint_id\");" + "source": "const recoverOut = await svix.endpoint.recover(\"app_id\", \"endpoint_id\", {\n until: null\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.delete_mtls_config(\"app_id\", \"endpoint_id\")" + "source": "recover_out = svix.endpoint.recover(\"app_id\", \"endpoint_id\", RecoverIn(\n until=None\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.delete_mtls_config(\"app_id\", \"endpoint_id\")" + "source": "recover_out = await svix.endpoint.recover(\"app_id\", \"endpoint_id\", RecoverIn(\n until=None\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.DeleteMtlsConfig(ctx, \"app_id\", \"endpoint_id\")" + "source": "recoverOut, err := svixClient.Endpoint.Recover(ctx, \"app_id\", \"endpoint_id\", &RecoverIn{\n Until: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.deleteMtlsConfig(\"app_id\", \"endpoint_id\")" + "source": "val recoverOut = svix.endpoint.recover(\"app_id\", \"endpoint_id\", RecoverIn()\n .until(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().deleteMtlsConfig(\"app_id\", \"endpoint_id\");" + "source": "RecoverOut recoverOut = svix.getEndpoint().recover(\"app_id\", \"endpoint_id\", new RecoverIn()\n .until(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.delete_mtls_config(\"app_id\", \"endpoint_id\")" + "source": "recover_out = svix.endpoint.recover(\"app_id\", \"endpoint_id\", Svix::RecoverIn.new({\n \"until\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().delete_mtls_config(\"app_id\", \"endpoint_id\").await?;" + "source": "let recover_out = svix.endpoint().recover(\"app_id\", \"endpoint_id\", RecoverIn {\n until: None,\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.DeleteMtlsConfigAsync(\"app_id\", \"endpoint_id\");" + "source": "var recoverOut = await svix.Endpoint.RecoverAsync(\"app_id\", \"endpoint_id\", new RecoverIn{\n until: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint delete-mtls-config \"app_id\" \"endpoint_id\"" + "source": "svix endpoint recover \"app_id\" \"endpoint_id\" '{\n \"until\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"until\": null\n }'" } - ], - "x-hidden": true - }, - "get": { - "description": "Get endpoint mTLS configuration.", - "operationId": "v1.endpoint.get-mtls-config", + ] + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing": { + "post": { + "description": "Replays messages to the endpoint.\n\nOnly messages that were created after `since` will be sent.\nMessages that were previously sent to the endpoint are not resent.", + "operationId": "v1.endpoint.replay-missing", "parameters": [ { "description": "The Application's ID or UID.", @@ -11874,14 +14715,33 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplayIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "202": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointMtlsConfigOut" + "$ref": "#/components/schemas/ReplayOut" } } }, @@ -11963,7 +14823,7 @@ "HTTPBearer": [] } ], - "summary": "Get Endpoint Mtls Config", + "summary": "Replay Missing Webhooks", "tags": [ "Endpoint" ], @@ -11971,69 +14831,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointMtlsConfigOut = await svix.endpoint.getMtlsConfig(\"app_id\", \"endpoint_id\");" + "source": "const replayOut = await svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", {\n until: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointMtlsConfigOut = await svix.endpoint.getMtlsConfig(\"app_id\", \"endpoint_id\");" + "source": "const replayOut = await svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", {\n until: null\n});" }, { "label": "Python", "lang": "Python", - "source": "endpoint_mtls_config_out = svix.endpoint.get_mtls_config(\"app_id\", \"endpoint_id\")" + "source": "replay_out = svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", ReplayIn(\n until=None\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_mtls_config_out = await svix.endpoint.get_mtls_config(\"app_id\", \"endpoint_id\")" + "source": "replay_out = await svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", ReplayIn(\n until=None\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "endpointMtlsConfigOut, err := svixClient.Endpoint.GetMtlsConfig(ctx, \"app_id\", \"endpoint_id\")" + "source": "replayOut, err := svixClient.Endpoint.ReplayMissing(ctx, \"app_id\", \"endpoint_id\", &ReplayIn{\n Until: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointMtlsConfigOut = svix.endpoint.getMtlsConfig(\"app_id\", \"endpoint_id\")" + "source": "val replayOut = svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", ReplayIn()\n .until(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "EndpointMtlsConfigOut endpointMtlsConfigOut = svix.getEndpoint().getMtlsConfig(\"app_id\", \"endpoint_id\");" + "source": "ReplayOut replayOut = svix.getEndpoint().replayMissing(\"app_id\", \"endpoint_id\", new ReplayIn()\n .until(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_mtls_config_out = svix.endpoint.get_mtls_config(\"app_id\", \"endpoint_id\")" + "source": "replay_out = svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", Svix::ReplayIn.new({\n \"until\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_mtls_config_out = svix.endpoint().get_mtls_config(\"app_id\", \"endpoint_id\").await?;" + "source": "let replay_out = svix.endpoint().replay_missing(\"app_id\", \"endpoint_id\", ReplayIn {\n until: None,\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointMtlsConfigOut = await svix.Endpoint.GetMtlsConfigAsync(\"app_id\", \"endpoint_id\");" + "source": "var replayOut = await svix.Endpoint.ReplayMissingAsync(\"app_id\", \"endpoint_id\", new ReplayIn{\n until: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint get-mtls-config \"app_id\" \"endpoint_id\"" + "source": "svix endpoint replay-missing \"app_id\" \"endpoint_id\" '{\n \"until\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"until\": null\n }'" } - ], - "x-hidden": true - }, - "put": { - "description": "Create / update endpoint mTLS configuration.", - "operationId": "v1.endpoint.update-mtls-config", + ] + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret": { + "get": { + "description": "Get the endpoint's signing secret.\n\nThis is used to verify the authenticity of the webhook.\nFor more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).", + "operationId": "v1.endpoint.get-secret", "parameters": [ { "description": "The Application's ID or UID.", @@ -12066,19 +14927,16 @@ "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointMtlsConfigIn" - } - } - }, - "required": true - }, "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointSecretOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -12156,7 +15014,7 @@ "HTTPBearer": [] } ], - "summary": "Update Endpoint Mtls Config", + "summary": "Get Endpoint Secret", "tags": [ "Endpoint" ], @@ -12164,71 +15022,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.updateMtlsConfig(\"app_id\", \"endpoint_id\", {\n serverCaCert: null\n});" + "source": "const endpointSecretOut = await svix.endpoint.getSecret(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.updateMtlsConfig(\"app_id\", \"endpoint_id\", {\n serverCaCert: null\n});" + "source": "const endpointSecretOut = await svix.endpoint.getSecret(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.update_mtls_config(\"app_id\", \"endpoint_id\", EndpointMtlsConfigIn(\n server_ca_cert=None\n))" + "source": "endpoint_secret_out = svix.endpoint.get_secret(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.update_mtls_config(\"app_id\", \"endpoint_id\", EndpointMtlsConfigIn(\n server_ca_cert=None\n))" + "source": "endpoint_secret_out = await svix.endpoint.get_secret(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.UpdateMtlsConfig(ctx, \"app_id\", \"endpoint_id\", &EndpointMtlsConfigIn{\n ServerCaCert: nil,\n})" + "source": "endpointSecretOut, err := svixClient.Endpoint.GetSecret(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.updateMtlsConfig(\"app_id\", \"endpoint_id\", EndpointMtlsConfigIn()\n .serverCaCert(null)\n)" + "source": "val endpointSecretOut = svix.endpoint.getSecret(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().updateMtlsConfig(\"app_id\", \"endpoint_id\", new EndpointMtlsConfigIn()\n .serverCaCert(null)\n);" + "source": "EndpointSecretOut endpointSecretOut = svix.getEndpoint().getSecret(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.update_mtls_config(\"app_id\", \"endpoint_id\", Svix::EndpointMtlsConfigIn.new({\n \"server_ca_cert\": nil\n}))" + "source": "endpoint_secret_out = svix.endpoint.get_secret(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().update_mtls_config(\"app_id\", \"endpoint_id\", EndpointMtlsConfigIn {\n server_ca_cert: None,\n}).await?;" + "source": "let endpoint_secret_out = svix.endpoint().get_secret(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.UpdateMtlsConfigAsync(\"app_id\", \"endpoint_id\", new EndpointMtlsConfigIn{\n serverCaCert: null\n});" + "source": "var endpointSecretOut = await svix.Endpoint.GetSecretAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint update-mtls-config \"app_id\" \"endpoint_id\" '{\n \"serverCaCert\": null\n}'" + "source": "svix endpoint get-secret \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"serverCaCert\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth": { - "delete": { - "description": "Delete endpoint OAuth configuration.", - "operationId": "v1.endpoint.delete-oauth-config", + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate": { + "post": { + "description": "Rotates the endpoint's signing secret.\n\nThe previous secret will remain valid for the next 24 hours.", + "operationId": "v1.endpoint.rotate-secret", "parameters": [ { "description": "The Application's ID or UID.", @@ -12259,8 +15116,27 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointSecretRotateIn" + } + } + }, + "required": true + }, "responses": { "204": { "description": "no content" @@ -12341,7 +15217,7 @@ "HTTPBearer": [] } ], - "summary": "Delete Endpoint Oauth Config", + "summary": "Rotate Endpoint Secret", "tags": [ "Endpoint" ], @@ -12349,69 +15225,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\");" + "source": "await svix.endpoint.rotateSecret(\"app_id\", \"endpoint_id\", {\n key: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\");" + "source": "await svix.endpoint.rotateSecret(\"app_id\", \"endpoint_id\", {\n key: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.rotate_secret(\"app_id\", \"endpoint_id\", EndpointSecretRotateIn(\n key=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" + "source": "await svix.endpoint.rotate_secret(\"app_id\", \"endpoint_id\", EndpointSecretRotateIn(\n key=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.DeleteOauthConfig(ctx, \"app_id\", \"endpoint_id\")" + "source": "err := svixClient.Endpoint.RotateSecret(ctx, \"app_id\", \"endpoint_id\", &EndpointSecretRotateIn{\n Key: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.rotateSecret(\"app_id\", \"endpoint_id\", EndpointSecretRotateIn()\n .key(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().deleteOauthConfig(\"app_id\", \"endpoint_id\");" + "source": "svix.getEndpoint().rotateSecret(\"app_id\", \"endpoint_id\", new EndpointSecretRotateIn()\n .key(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.rotate_secret(\"app_id\", \"endpoint_id\", Svix::EndpointSecretRotateIn.new({\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().delete_oauth_config(\"app_id\", \"endpoint_id\").await?;" + "source": "svix.endpoint().rotate_secret(\"app_id\", \"endpoint_id\", EndpointSecretRotateIn {\n key: Some(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\".to_string()),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.DeleteOauthConfigAsync(\"app_id\", \"endpoint_id\");" + "source": "await svix.Endpoint.RotateSecretAsync(\"app_id\", \"endpoint_id\", new EndpointSecretRotateIn{\n key: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint delete-oauth-config \"app_id\" \"endpoint_id\"" + "source": "svix endpoint rotate-secret \"app_id\" \"endpoint_id\" '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" } - ], - "x-hidden": true - }, - "get": { - "description": "Get endpoint OAuth configuration.", - "operationId": "v1.endpoint.get-oauth-config", + ] + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example": { + "post": { + "description": "Send an example message for an event.", + "operationId": "v1.endpoint.send-example", "parameters": [ { "description": "The Application's ID or UID.", @@ -12442,14 +15319,33 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventExampleIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "202": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointOauthConfigOut" + "$ref": "#/components/schemas/MessageOut" } } }, @@ -12531,7 +15427,7 @@ "HTTPBearer": [] } ], - "summary": "Get Endpoint Oauth Config", + "summary": "Send Event Type Example Message", "tags": [ "Endpoint" ], @@ -12539,69 +15435,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointOauthConfigOut = await svix.endpoint.getOauthConfig(\"app_id\", \"endpoint_id\");" + "source": "const messageOut = await svix.endpoint.sendExample(\"app_id\", \"endpoint_id\", {\n eventType: \"user.signup\"\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointOauthConfigOut = await svix.endpoint.getOauthConfig(\"app_id\", \"endpoint_id\");" + "source": "const messageOut = await svix.endpoint.sendExample(\"app_id\", \"endpoint_id\", {\n eventType: \"user.signup\"\n});" }, { "label": "Python", "lang": "Python", - "source": "endpoint_oauth_config_out = svix.endpoint.get_oauth_config(\"app_id\", \"endpoint_id\")" + "source": "message_out = svix.endpoint.send_example(\"app_id\", \"endpoint_id\", EventExampleIn(\n event_type=\"user.signup\"\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_oauth_config_out = await svix.endpoint.get_oauth_config(\"app_id\", \"endpoint_id\")" + "source": "message_out = await svix.endpoint.send_example(\"app_id\", \"endpoint_id\", EventExampleIn(\n event_type=\"user.signup\"\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "endpointOauthConfigOut, err := svixClient.Endpoint.GetOauthConfig(ctx, \"app_id\", \"endpoint_id\")" + "source": "messageOut, err := svixClient.Endpoint.SendExample(ctx, \"app_id\", \"endpoint_id\", &EventExampleIn{\n EventType: \"user.signup\",\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointOauthConfigOut = svix.endpoint.getOauthConfig(\"app_id\", \"endpoint_id\")" + "source": "val messageOut = svix.endpoint.sendExample(\"app_id\", \"endpoint_id\", EventExampleIn()\n .eventType(\"user.signup\")\n)" }, { "label": "Java", "lang": "Java", - "source": "EndpointOauthConfigOut endpointOauthConfigOut = svix.getEndpoint().getOauthConfig(\"app_id\", \"endpoint_id\");" + "source": "MessageOut messageOut = svix.getEndpoint().sendExample(\"app_id\", \"endpoint_id\", new EventExampleIn()\n .eventType(\"user.signup\")\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_oauth_config_out = svix.endpoint.get_oauth_config(\"app_id\", \"endpoint_id\")" + "source": "message_out = svix.endpoint.send_example(\"app_id\", \"endpoint_id\", Svix::EventExampleIn.new({\n \"event_type\": \"user.signup\"\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_oauth_config_out = svix.endpoint().get_oauth_config(\"app_id\", \"endpoint_id\").await?;" + "source": "let message_out = svix.endpoint().send_example(\"app_id\", \"endpoint_id\", EventExampleIn {\n event_type: \"user.signup\".to_string(),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointOauthConfigOut = await svix.Endpoint.GetOauthConfigAsync(\"app_id\", \"endpoint_id\");" + "source": "var messageOut = await svix.Endpoint.SendExampleAsync(\"app_id\", \"endpoint_id\", new EventExampleIn{\n eventType: \"user.signup\"\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint get-oauth-config \"app_id\" \"endpoint_id\"" + "source": "svix endpoint send-example \"app_id\" \"endpoint_id\" '{\n \"eventType\": \"user.signup\"\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventType\": \"user.signup\"\n }'" } - ], - "x-hidden": true - }, - "put": { - "description": "Create / update endpoint OAuth configuration.", - "operationId": "v1.endpoint.update-oauth-config", + ] + } + }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats": { + "get": { + "description": "Get basic statistics for the endpoint.", + "operationId": "v1.endpoint.get-stats", "parameters": [ { "description": "The Application's ID or UID.", @@ -12632,21 +15529,42 @@ "type": "string" }, "style": "simple" + }, + { + "description": "Filter the range to data starting from this date.", + "in": "query", + "name": "since", + "schema": { + "description": "Filter the range to data starting from this date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter the range to data ending by this date.", + "in": "query", + "name": "until", + "schema": { + "description": "Filter the range to data ending by this date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointOauthConfigIn" - } - } - }, - "required": true - }, "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointStats" + } + } + }, + "description": "" }, "400": { "content": { @@ -12724,7 +15642,7 @@ "HTTPBearer": [] } ], - "summary": "Update Endpoint Oauth Config", + "summary": "Endpoint Stats", "tags": [ "Endpoint" ], @@ -12732,71 +15650,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", {\n jwtParams: null,\n clientSecret: null,\n scopes: null,\n extraParams: null,\n refreshToken: null\n});" + "source": "const endpointStats = await svix.endpoint.getStats(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", {\n jwtParams: null,\n clientSecret: null,\n scopes: null,\n extraParams: null,\n refreshToken: null\n});" + "source": "const endpointStats = await svix.endpoint.getStats(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn(\n jwt_params=None,\n client_secret=None,\n scopes=None,\n extra_params=None,\n refresh_token=None\n))" + "source": "endpoint_stats = svix.endpoint.get_stats(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn(\n jwt_params=None,\n client_secret=None,\n scopes=None,\n extra_params=None,\n refresh_token=None\n))" + "source": "endpoint_stats = await svix.endpoint.get_stats(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.UpdateOauthConfig(ctx, \"app_id\", \"endpoint_id\", &EndpointOauthConfigIn{\n JwtParams: nil,\n ClientSecret: nil,\n Scopes: nil,\n ExtraParams: nil,\n RefreshToken: nil,\n})" + "source": "endpointStats, err := svixClient.Endpoint.GetStats(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn()\n .jwtParams(null)\n .clientSecret(null)\n .scopes(null)\n .extraParams(null)\n .refreshToken(null)\n)" + "source": "val endpointStats = svix.endpoint.getStats(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().updateOauthConfig(\"app_id\", \"endpoint_id\", new EndpointOauthConfigIn()\n .jwtParams(null)\n .clientSecret(null)\n .scopes(null)\n .extraParams(null)\n .refreshToken(null)\n);" + "source": "EndpointStats endpointStats = svix.getEndpoint().getStats(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", Svix::EndpointOauthConfigIn.new({\n \"jwt_params\": nil,\n \"client_secret\": nil,\n \"scopes\": nil,\n \"extra_params\": nil,\n \"refresh_token\": nil\n}))" + "source": "endpoint_stats = svix.endpoint.get_stats(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn {\n jwt_params: None,\n client_secret: None,\n scopes: None,\n extra_params: None,\n refresh_token: None,\n}).await?;" + "source": "let endpoint_stats = svix.endpoint().get_stats(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.UpdateOauthConfigAsync(\"app_id\", \"endpoint_id\", new EndpointOauthConfigIn{\n jwtParams: null,\n clientSecret: null,\n scopes: null,\n extraParams: null,\n refreshToken: null\n});" + "source": "var endpointStats = await svix.Endpoint.GetStatsAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint update-oauth-config \"app_id\" \"endpoint_id\" '{\n \"jwtParams\": null,\n \"clientSecret\": null,\n \"scopes\": null,\n \"extraParams\": null,\n \"refreshToken\": null\n}'" + "source": "svix endpoint get-stats \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"jwtParams\": null,\n \"clientSecret\": null,\n \"scopes\": null,\n \"extraParams\": null,\n \"refreshToken\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover": { - "post": { - "description": "Resend all failed messages since a given time.\n\nMessages that were sent successfully, even if failed initially, are not resent.", - "operationId": "v1.endpoint.recover", + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation": { + "get": { + "description": "Get the transformation code associated with this endpoint.", + "operationId": "v1.endpoint.transformation-get", "parameters": [ { "description": "The Application's ID or UID.", @@ -12827,33 +15744,14 @@ "type": "string" }, "style": "simple" - }, - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { - "type": "string" - }, - "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverIn" - } - } - }, - "required": true - }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RecoverOut" + "$ref": "#/components/schemas/EndpointTransformationOut" } } }, @@ -12935,7 +15833,7 @@ "HTTPBearer": [] } ], - "summary": "Recover Failed Webhooks", + "summary": "Get Endpoint Transformation", "tags": [ "Endpoint" ], @@ -12943,70 +15841,68 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const recoverOut = await svix.endpoint.recover(\"app_id\", \"endpoint_id\", {\n until: null\n});" + "source": "const endpointTransformationOut = await svix.endpoint.transformationGet(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const recoverOut = await svix.endpoint.recover(\"app_id\", \"endpoint_id\", {\n until: null\n});" + "source": "const endpointTransformationOut = await svix.endpoint.transformationGet(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "recover_out = svix.endpoint.recover(\"app_id\", \"endpoint_id\", RecoverIn(\n until=None\n), options=...)" + "source": "endpoint_transformation_out = svix.endpoint.transformation_get(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "recover_out = await svix.endpoint.recover(\"app_id\", \"endpoint_id\", RecoverIn(\n until=None\n), options=...)" + "source": "endpoint_transformation_out = await svix.endpoint.transformation_get(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "recoverOut, err := svixClient.Endpoint.Recover(ctx, \"app_id\", \"endpoint_id\", &RecoverIn{\n Until: nil,\n})" + "source": "endpointTransformationOut, err := svixClient.Endpoint.TransformationGet(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val recoverOut = svix.endpoint.recover(\"app_id\", \"endpoint_id\", RecoverIn()\n .until(null)\n)" + "source": "val endpointTransformationOut = svix.endpoint.transformationGet(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "RecoverOut recoverOut = svix.getEndpoint().recover(\"app_id\", \"endpoint_id\", new RecoverIn()\n .until(null)\n);" + "source": "EndpointTransformationOut endpointTransformationOut = svix.getEndpoint().transformationGet(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "recover_out = svix.endpoint.recover(\"app_id\", \"endpoint_id\", Svix::RecoverIn.new({\n \"until\": nil\n}))" + "source": "endpoint_transformation_out = svix.endpoint.transformation_get(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let recover_out = svix.endpoint().recover(\"app_id\", \"endpoint_id\", RecoverIn {\n until: None,\n}, None).await?;" + "source": "let endpoint_transformation_out = svix.endpoint().transformation_get(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var recoverOut = await svix.Endpoint.RecoverAsync(\"app_id\", \"endpoint_id\", new RecoverIn{\n until: null\n});" + "source": "var endpointTransformationOut = await svix.Endpoint.TransformationGetAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint recover \"app_id\" \"endpoint_id\" '{\n \"until\": null\n}'" + "source": "svix endpoint transformation-get \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"until\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - } - }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing": { - "post": { - "description": "Replays messages to the endpoint.\n\nOnly messages that were created after `since` will be sent.\nMessages that were previously sent to the endpoint are not resent.", - "operationId": "v1.endpoint.replay-missing", + }, + "patch": { + "description": "Set or unset the transformation code associated with this endpoint.", + "operationId": "v1.endpoint.transformation-partial-update", "parameters": [ { "description": "The Application's ID or UID.", @@ -13037,37 +15933,21 @@ "type": "string" }, "style": "simple" - }, - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { - "type": "string" - }, - "style": "simple" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReplayIn" + "$ref": "#/components/schemas/EndpointTransformationIn" } } }, "required": true }, "responses": { - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReplayOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -13145,7 +16025,7 @@ "HTTPBearer": [] } ], - "summary": "Replay Missing Webhooks", + "summary": "Set Endpoint Transformation", "tags": [ "Endpoint" ], @@ -13153,70 +16033,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const replayOut = await svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", {\n until: null\n});" + "source": "await svix.endpoint.transformationPartialUpdate(\"app_id\", \"endpoint_id\", {\n code: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const replayOut = await svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", {\n until: null\n});" + "source": "await svix.endpoint.transformationPartialUpdate(\"app_id\", \"endpoint_id\", {\n code: null\n});" }, { "label": "Python", "lang": "Python", - "source": "replay_out = svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", ReplayIn(\n until=None\n), options=...)" + "source": "svix.endpoint.transformation_partial_update(\"app_id\", \"endpoint_id\", EndpointTransformationIn(\n code=None\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "replay_out = await svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", ReplayIn(\n until=None\n), options=...)" + "source": "await svix.endpoint.transformation_partial_update(\"app_id\", \"endpoint_id\", EndpointTransformationIn(\n code=None\n))" }, { "label": "Go", "lang": "Go", - "source": "replayOut, err := svixClient.Endpoint.ReplayMissing(ctx, \"app_id\", \"endpoint_id\", &ReplayIn{\n Until: nil,\n})" + "source": "err := svixClient.Endpoint.TransformationPartialUpdate(ctx, \"app_id\", \"endpoint_id\", &EndpointTransformationIn{\n Code: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val replayOut = svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", ReplayIn()\n .until(null)\n)" + "source": "svix.endpoint.transformationPartialUpdate(\"app_id\", \"endpoint_id\", EndpointTransformationIn()\n .code(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "ReplayOut replayOut = svix.getEndpoint().replayMissing(\"app_id\", \"endpoint_id\", new ReplayIn()\n .until(null)\n);" + "source": "svix.getEndpoint().transformationPartialUpdate(\"app_id\", \"endpoint_id\", new EndpointTransformationIn()\n .code(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "replay_out = svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", Svix::ReplayIn.new({\n \"until\": nil\n}))" + "source": "svix.endpoint.transformation_partial_update(\"app_id\", \"endpoint_id\", Svix::EndpointTransformationIn.new({\n \"code\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let replay_out = svix.endpoint().replay_missing(\"app_id\", \"endpoint_id\", ReplayIn {\n until: None,\n}, None).await?;" + "source": "svix.endpoint().transformation_partial_update(\"app_id\", \"endpoint_id\", EndpointTransformationIn {\n code: None,\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "var replayOut = await svix.Endpoint.ReplayMissingAsync(\"app_id\", \"endpoint_id\", new ReplayIn{\n until: null\n});" + "source": "await svix.Endpoint.TransformationPartialUpdateAsync(\"app_id\", \"endpoint_id\", new EndpointTransformationIn{\n code: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint replay-missing \"app_id\" \"endpoint_id\" '{\n \"until\": null\n}'" + "source": "svix endpoint transformation-partial-update \"app_id\" \"endpoint_id\" '{\n \"code\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"until\": null\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"code\": null\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret": { - "get": { - "description": "Get the endpoint's signing secret.\n\nThis is used to verify the authenticity of the webhook.\nFor more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).", - "operationId": "v1.endpoint.get-secret", + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation-template/oauth/hubspot": { + "put": { + "description": "Create / update endpoint Hubspot OAuth configuration.\n\nSpecific private endpoint just for us, to avoid exposing the Hubspot secret to the client.", + "operationId": "v1.endpoint.update-hubspot-oauth-config", "parameters": [ { "description": "The Application's ID or UID.", @@ -13249,16 +16129,19 @@ "style": "simple" } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointSecretOut" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HubspotOauthConfigIn" } - }, - "description": "" + } + }, + "required": true + }, + "responses": { + "204": { + "description": "no content" }, "400": { "content": { @@ -13336,78 +16219,79 @@ "HTTPBearer": [] } ], - "summary": "Get Endpoint Secret", + "summary": "Update Hubspot Oauth Config", "tags": [ - "Endpoint" + "Transformation Template" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointSecretOut = await svix.endpoint.getSecret(\"app_id\", \"endpoint_id\");" + "source": "await svix.endpoint.updateHubspotOauthConfig(\"app_id\", \"endpoint_id\", \n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointSecretOut = await svix.endpoint.getSecret(\"app_id\", \"endpoint_id\");" + "source": "await svix.endpoint.updateHubspotOauthConfig(\"app_id\", \"endpoint_id\", \n});" }, { "label": "Python", "lang": "Python", - "source": "endpoint_secret_out = svix.endpoint.get_secret(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.update_hubspot_oauth_config(\"app_id\", \"endpoint_id\", HubspotOauthConfigIn\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_secret_out = await svix.endpoint.get_secret(\"app_id\", \"endpoint_id\")" + "source": "await svix.endpoint.update_hubspot_oauth_config(\"app_id\", \"endpoint_id\", HubspotOauthConfigIn\n))" }, { "label": "Go", "lang": "Go", - "source": "endpointSecretOut, err := svixClient.Endpoint.GetSecret(ctx, \"app_id\", \"endpoint_id\")" + "source": "err := svixClient.Endpoint.UpdateHubspotOauthConfig(ctx, \"app_id\", \"endpoint_id\", &HubspotOauthConfigIn{\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointSecretOut = svix.endpoint.getSecret(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.updateHubspotOauthConfig(\"app_id\", \"endpoint_id\", HubspotOauthConfigIn()\n)" }, { "label": "Java", "lang": "Java", - "source": "EndpointSecretOut endpointSecretOut = svix.getEndpoint().getSecret(\"app_id\", \"endpoint_id\");" + "source": "svix.getEndpoint().updateHubspotOauthConfig(\"app_id\", \"endpoint_id\", new HubspotOauthConfigIn()\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_secret_out = svix.endpoint.get_secret(\"app_id\", \"endpoint_id\")" + "source": "svix.endpoint.update_hubspot_oauth_config(\"app_id\", \"endpoint_id\", Svix::HubspotOauthConfigIn.new(\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_secret_out = svix.endpoint().get_secret(\"app_id\", \"endpoint_id\").await?;" + "source": "svix.endpoint().update_hubspot_oauth_config(\"app_id\", \"endpoint_id\", HubspotOauthConfigIn {\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointSecretOut = await svix.Endpoint.GetSecretAsync(\"app_id\", \"endpoint_id\");" + "source": "await svix.Endpoint.UpdateHubspotOauthConfigAsync(\"app_id\", \"endpoint_id\", new HubspotOauthConfigIn\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint get-secret \"app_id\" \"endpoint_id\"" + "source": "svix endpoint update-hubspot-oauth-config \"app_id\" \"endpoint_id\" '\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation-template/oauth/hubspot' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate": { "post": { - "description": "Rotates the endpoint's signing secret.\n\nThe previous secret will remain valid for the next 24 hours.", - "operationId": "v1.endpoint.rotate-secret", + "description": "Simulate running the transformation on the payload and code.", + "operationId": "v1.endpoint.transformation-simulate", "parameters": [ { "description": "The Application's ID or UID.", @@ -13453,15 +16337,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointSecretRotateIn" + "$ref": "#/components/schemas/EndpointTransformationSimulateIn" } } }, "required": true }, "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointTransformationSimulateOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -13539,7 +16430,7 @@ "HTTPBearer": [] } ], - "summary": "Rotate Endpoint Secret", + "summary": "Simulate", "tags": [ "Endpoint" ], @@ -13547,70 +16438,71 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.rotateSecret(\"app_id\", \"endpoint_id\", {\n key: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" + "source": "const endpointTransformationSimulateOut = await svix.endpoint.transformationSimulate(\"app_id\", \"endpoint_id\", {\n eventType: \"user.signup\",\n channels: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.rotateSecret(\"app_id\", \"endpoint_id\", {\n key: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" + "source": "const endpointTransformationSimulateOut = await svix.endpoint.transformationSimulate(\"app_id\", \"endpoint_id\", {\n eventType: \"user.signup\",\n channels: null\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.rotate_secret(\"app_id\", \"endpoint_id\", EndpointSecretRotateIn(\n key=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n), options=...)" + "source": "endpoint_transformation_simulate_out = svix.endpoint.transformation_simulate(\"app_id\", \"endpoint_id\", EndpointTransformationSimulateIn(\n event_type=\"user.signup\",\n channels=None\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.rotate_secret(\"app_id\", \"endpoint_id\", EndpointSecretRotateIn(\n key=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n), options=...)" + "source": "endpoint_transformation_simulate_out = await svix.endpoint.transformation_simulate(\"app_id\", \"endpoint_id\", EndpointTransformationSimulateIn(\n event_type=\"user.signup\",\n channels=None\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.RotateSecret(ctx, \"app_id\", \"endpoint_id\", &EndpointSecretRotateIn{\n Key: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n})" + "source": "endpointTransformationSimulateOut, err := svixClient.Endpoint.TransformationSimulate(ctx, \"app_id\", \"endpoint_id\", &EndpointTransformationSimulateIn{\n EventType: \"user.signup\",\n Channels: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.rotateSecret(\"app_id\", \"endpoint_id\", EndpointSecretRotateIn()\n .key(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n)" + "source": "val endpointTransformationSimulateOut = svix.endpoint.transformationSimulate(\"app_id\", \"endpoint_id\", EndpointTransformationSimulateIn()\n .eventType(\"user.signup\")\n .channels(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().rotateSecret(\"app_id\", \"endpoint_id\", new EndpointSecretRotateIn()\n .key(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n);" + "source": "EndpointTransformationSimulateOut endpointTransformationSimulateOut = svix.getEndpoint().transformationSimulate(\"app_id\", \"endpoint_id\", new EndpointTransformationSimulateIn()\n .eventType(\"user.signup\")\n .channels(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.rotate_secret(\"app_id\", \"endpoint_id\", Svix::EndpointSecretRotateIn.new({\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}))" + "source": "endpoint_transformation_simulate_out = svix.endpoint.transformation_simulate(\"app_id\", \"endpoint_id\", Svix::EndpointTransformationSimulateIn.new({\n \"event_type\": \"user.signup\",\n \"channels\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().rotate_secret(\"app_id\", \"endpoint_id\", EndpointSecretRotateIn {\n key: Some(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\".to_string()),\n}, None).await?;" + "source": "let endpoint_transformation_simulate_out = svix.endpoint().transformation_simulate(\"app_id\", \"endpoint_id\", EndpointTransformationSimulateIn {\n event_type: \"user.signup\".to_string(),\n channels: None,\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.RotateSecretAsync(\"app_id\", \"endpoint_id\", new EndpointSecretRotateIn{\n key: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n});" + "source": "var endpointTransformationSimulateOut = await svix.Endpoint.TransformationSimulateAsync(\"app_id\", \"endpoint_id\", new EndpointTransformationSimulateIn{\n eventType: \"user.signup\",\n channels: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint rotate-secret \"app_id\" \"endpoint_id\" '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n}'" + "source": "svix endpoint transformation-simulate \"app_id\" \"endpoint_id\" '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n }'" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example": { - "post": { - "description": "Send an example message for an event.", - "operationId": "v1.endpoint.send-example", + "/api/v1/app/{app_id}/events": { + "get": { + "description": "Reads the stream of created messages for an application.", + "operationId": "v1.message.events", "parameters": [ { "description": "The Application's ID or UID.", @@ -13628,46 +16520,83 @@ "style": "simple" }, { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "nullable": true, "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "Filter response based on the event type", + "in": "query", + "name": "event_types", + "schema": { + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" + }, + { + "description": "Filter response based on the event type.", + "in": "query", + "name": "channels", + "schema": { + "description": "Filter response based on the event type.", + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "in": "query", + "name": "after", "schema": { + "format": "date-time", + "nullable": true, "type": "string" }, - "style": "simple" + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventExampleIn" - } - } - }, - "required": true - }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageOut" + "$ref": "#/components/schemas/MessageEventsOut" } } }, @@ -13749,78 +16678,79 @@ "HTTPBearer": [] } ], - "summary": "Send Event Type Example Message", + "summary": "Message Events", "tags": [ - "Endpoint" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageOut = await svix.endpoint.sendExample(\"app_id\", \"endpoint_id\", {\n eventType: \"user.signup\"\n});" + "source": "const messageEventsOut = await svix.message.events(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageOut = await svix.endpoint.sendExample(\"app_id\", \"endpoint_id\", {\n eventType: \"user.signup\"\n});" + "source": "const messageEventsOut = await svix.message.events(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "message_out = svix.endpoint.send_example(\"app_id\", \"endpoint_id\", EventExampleIn(\n event_type=\"user.signup\"\n), options=...)" + "source": "message_events_out = svix.message.events(\"app_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_out = await svix.endpoint.send_example(\"app_id\", \"endpoint_id\", EventExampleIn(\n event_type=\"user.signup\"\n), options=...)" + "source": "message_events_out = await svix.message.events(\"app_id\")" }, { "label": "Go", "lang": "Go", - "source": "messageOut, err := svixClient.Endpoint.SendExample(ctx, \"app_id\", \"endpoint_id\", &EventExampleIn{\n EventType: \"user.signup\",\n})" + "source": "messageEventsOut, err := svixClient.Message.Events(ctx, \"app_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageOut = svix.endpoint.sendExample(\"app_id\", \"endpoint_id\", EventExampleIn()\n .eventType(\"user.signup\")\n)" + "source": "val messageEventsOut = svix.message.events(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "MessageOut messageOut = svix.getEndpoint().sendExample(\"app_id\", \"endpoint_id\", new EventExampleIn()\n .eventType(\"user.signup\")\n);" + "source": "MessageEventsOut messageEventsOut = svix.getMessage().events(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_out = svix.endpoint.send_example(\"app_id\", \"endpoint_id\", Svix::EventExampleIn.new({\n \"event_type\": \"user.signup\"\n}))" + "source": "message_events_out = svix.message.events(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let message_out = svix.endpoint().send_example(\"app_id\", \"endpoint_id\", EventExampleIn {\n event_type: \"user.signup\".to_string(),\n}, None).await?;" + "source": "let message_events_out = svix.message().events(\"app_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageOut = await svix.Endpoint.SendExampleAsync(\"app_id\", \"endpoint_id\", new EventExampleIn{\n eventType: \"user.signup\"\n});" + "source": "var messageEventsOut = await svix.Message.EventsAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint send-example \"app_id\" \"endpoint_id\" '{\n \"eventType\": \"user.signup\"\n}'" + "source": "svix message events \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventType\": \"user.signup\"\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats": { + "/api/v1/app/{app_id}/events/subscription/{subscription_id}": { "get": { - "description": "Get basic statistics for the endpoint.", - "operationId": "v1.endpoint.get-stats", + "description": "Reads the stream of created messages for an application, but using server-managed iterator tracking.", + "operationId": "v1.message.events-subscription", "parameters": [ { "description": "The Application's ID or UID.", @@ -13838,12 +16768,12 @@ "style": "simple" }, { - "description": "The Endpoint's ID or UID.", + "description": "The EventsSubscription's ID or UID.", "in": "path", - "name": "endpoint_id", + "name": "subscription_id", "required": true, "schema": { - "description": "The Endpoint's ID or UID.", + "description": "The EventsSubscription's ID or UID.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -13853,23 +16783,70 @@ "style": "simple" }, { - "description": "Filter the range to data starting from this date.", + "description": "Limit the number of returned items", "in": "query", - "name": "since", + "name": "limit", "schema": { - "description": "Filter the range to data starting from this date.", - "format": "date-time", + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", "nullable": true, "type": "string" }, "style": "form" }, { - "description": "Filter the range to data ending by this date.", + "description": "Filter response based on the event type", "in": "query", - "name": "until", + "name": "event_types", + "schema": { + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" + }, + { + "description": "Filter response based on the event type.", + "in": "query", + "name": "channels", + "schema": { + "description": "Filter response based on the event type.", + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" + }, + { + "in": "query", + "name": "after", "schema": { - "description": "Filter the range to data ending by this date.", "format": "date-time", "nullable": true, "type": "string" @@ -13882,7 +16859,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointStats" + "$ref": "#/components/schemas/MessageEventsOut" } } }, @@ -13964,78 +16941,79 @@ "HTTPBearer": [] } ], - "summary": "Endpoint Stats", + "summary": "Message Events Subscription", "tags": [ - "Endpoint" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointStats = await svix.endpoint.getStats(\"app_id\", \"endpoint_id\");" + "source": "const messageEventsOut = await svix.message.eventsSubscription(\"app_id\", \"subscription_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointStats = await svix.endpoint.getStats(\"app_id\", \"endpoint_id\");" + "source": "const messageEventsOut = await svix.message.eventsSubscription(\"app_id\", \"subscription_id\");" }, { "label": "Python", "lang": "Python", - "source": "endpoint_stats = svix.endpoint.get_stats(\"app_id\", \"endpoint_id\")" + "source": "message_events_out = svix.message.events_subscription(\"app_id\", \"subscription_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_stats = await svix.endpoint.get_stats(\"app_id\", \"endpoint_id\")" + "source": "message_events_out = await svix.message.events_subscription(\"app_id\", \"subscription_id\")" }, { "label": "Go", "lang": "Go", - "source": "endpointStats, err := svixClient.Endpoint.GetStats(ctx, \"app_id\", \"endpoint_id\")" + "source": "messageEventsOut, err := svixClient.Message.EventsSubscription(ctx, \"app_id\", \"subscription_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointStats = svix.endpoint.getStats(\"app_id\", \"endpoint_id\")" + "source": "val messageEventsOut = svix.message.eventsSubscription(\"app_id\", \"subscription_id\")" }, { "label": "Java", "lang": "Java", - "source": "EndpointStats endpointStats = svix.getEndpoint().getStats(\"app_id\", \"endpoint_id\");" + "source": "MessageEventsOut messageEventsOut = svix.getMessage().eventsSubscription(\"app_id\", \"subscription_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_stats = svix.endpoint.get_stats(\"app_id\", \"endpoint_id\")" + "source": "message_events_out = svix.message.events_subscription(\"app_id\", \"subscription_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_stats = svix.endpoint().get_stats(\"app_id\", \"endpoint_id\").await?;" + "source": "let message_events_out = svix.message().events_subscription(\"app_id\", \"subscription_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointStats = await svix.Endpoint.GetStatsAsync(\"app_id\", \"endpoint_id\");" + "source": "var messageEventsOut = await svix.Message.EventsSubscriptionAsync(\"app_id\", \"subscription_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint get-stats \"app_id\" \"endpoint_id\"" + "source": "svix message events-subscription \"app_id\" \"subscription_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events/subscription/{subscription_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation": { - "get": { - "description": "Get the transformation code associated with this endpoint.", - "operationId": "v1.endpoint.transformation-get", + "/api/v1/app/{app_id}/events/subscription/{subscription_id}/create-token": { + "post": { + "description": "Creates an auth token that can be used with the `v1.message.events-subscription` endpoint.", + "operationId": "v1.message.events-subscription.create-token", "parameters": [ { "description": "The Application's ID or UID.", @@ -14053,12 +17031,12 @@ "style": "simple" }, { - "description": "The Endpoint's ID or UID.", + "description": "The EventsSubscription's ID or UID.", "in": "path", - "name": "endpoint_id", + "name": "subscription_id", "required": true, "schema": { - "description": "The Endpoint's ID or UID.", + "description": "The EventsSubscription's ID or UID.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -14066,6 +17044,15 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], "responses": { @@ -14073,7 +17060,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointTransformationOut" + "$ref": "#/components/schemas/MessageSubscriberAuthTokenOut" } } }, @@ -14155,76 +17142,24 @@ "HTTPBearer": [] } ], - "summary": "Get Endpoint Transformation", + "summary": "Message Events Create Token", "tags": [ - "Endpoint" + "Message" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const endpointTransformationOut = await svix.endpoint.transformationGet(\"app_id\", \"endpoint_id\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const endpointTransformationOut = await svix.endpoint.transformationGet(\"app_id\", \"endpoint_id\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "endpoint_transformation_out = svix.endpoint.transformation_get(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "endpoint_transformation_out = await svix.endpoint.transformation_get(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "endpointTransformationOut, err := svixClient.Endpoint.TransformationGet(ctx, \"app_id\", \"endpoint_id\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val endpointTransformationOut = svix.endpoint.transformationGet(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "EndpointTransformationOut endpointTransformationOut = svix.getEndpoint().transformationGet(\"app_id\", \"endpoint_id\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "endpoint_transformation_out = svix.endpoint.transformation_get(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let endpoint_transformation_out = svix.endpoint().transformation_get(\"app_id\", \"endpoint_id\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var endpointTransformationOut = await svix.Endpoint.TransformationGetAsync(\"app_id\", \"endpoint_id\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix endpoint transformation-get \"app_id\" \"endpoint_id\"" - }, { "label": "cURL", - "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } - ] - }, - "patch": { - "description": "Set or unset the transformation code associated with this endpoint.", - "operationId": "v1.endpoint.transformation-partial-update", + "lang": "Shell", + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events/subscription/{subscription_id}/create-token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + } + ], + "x-hidden": true + } + }, + "/api/v1/app/{app_id}/inbound/msg/{inbound_token}": { + "post": { + "description": "Handles a raw inbound webhook for the application.", + "operationId": "v1.inbound.msg", "parameters": [ { "description": "The Application's ID or UID.", @@ -14242,18 +17177,35 @@ "style": "simple" }, { - "description": "The Endpoint's ID or UID.", "in": "path", - "name": "endpoint_id", + "name": "inbound_token", "required": true, "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", + "type": "string" + }, + "style": "simple" + }, + { + "description": "The event type's name", + "in": "query", + "name": "event_type", + "schema": { + "description": "The event type's name", + "example": "user.signup", "maxLength": 256, - "minLength": 1, + "nullable": true, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, + "style": "form" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, "style": "simple" } ], @@ -14261,15 +17213,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointTransformationIn" + "type": "string" } } }, "required": true }, "responses": { - "204": { - "description": "no content" + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -14347,78 +17306,79 @@ "HTTPBearer": [] } ], - "summary": "Set Endpoint Transformation", + "summary": "Handle Inbound", "tags": [ - "Endpoint" + "Inbound" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.transformationPartialUpdate(\"app_id\", \"endpoint_id\", {\n code: null\n});" + "source": "const messageOut = await svix.inbound.msg(\"app_id\", \"inbound_token\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.transformationPartialUpdate(\"app_id\", \"endpoint_id\", {\n code: null\n});" + "source": "const messageOut = await svix.inbound.msg(\"app_id\", \"inbound_token\");" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.transformation_partial_update(\"app_id\", \"endpoint_id\", EndpointTransformationIn(\n code=None\n))" + "source": "message_out = svix.inbound.msg(\"app_id\", \"inbound_token\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.transformation_partial_update(\"app_id\", \"endpoint_id\", EndpointTransformationIn(\n code=None\n))" + "source": "message_out = await svix.inbound.msg(\"app_id\", \"inbound_token\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.TransformationPartialUpdate(ctx, \"app_id\", \"endpoint_id\", &EndpointTransformationIn{\n Code: nil,\n})" + "source": "messageOut, err := svixClient.Inbound.Msg(ctx, \"app_id\", \"inbound_token\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.transformationPartialUpdate(\"app_id\", \"endpoint_id\", EndpointTransformationIn()\n .code(null)\n)" + "source": "val messageOut = svix.inbound.msg(\"app_id\", \"inbound_token\")" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().transformationPartialUpdate(\"app_id\", \"endpoint_id\", new EndpointTransformationIn()\n .code(null)\n);" + "source": "MessageOut messageOut = svix.getInbound().msg(\"app_id\", \"inbound_token\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.transformation_partial_update(\"app_id\", \"endpoint_id\", Svix::EndpointTransformationIn.new({\n \"code\": nil\n}))" + "source": "message_out = svix.inbound.msg(\"app_id\", \"inbound_token\")" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().transformation_partial_update(\"app_id\", \"endpoint_id\", EndpointTransformationIn {\n code: None,\n}).await?;" + "source": "let message_out = svix.inbound().msg(\"app_id\", \"inbound_token\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.TransformationPartialUpdateAsync(\"app_id\", \"endpoint_id\", new EndpointTransformationIn{\n code: null\n});" + "source": "var messageOut = await svix.Inbound.MsgAsync(\"app_id\", \"inbound_token\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint transformation-partial-update \"app_id\" \"endpoint_id\" '{\n \"code\": null\n}'" + "source": "svix inbound msg \"app_id\" \"inbound_token\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"code\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/inbound/msg/{inbound_token}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation-template/oauth/hubspot": { - "put": { - "description": "Create / update endpoint Hubspot OAuth configuration.\n\nSpecific private endpoint just for us, to avoid exposing the Hubspot secret to the client.", - "operationId": "v1.endpoint.update-hubspot-oauth-config", + "/api/v1/app/{app_id}/inbound/rotate-url": { + "post": { + "description": "Invalidates the previous inbound url (if one exists), producing a new inbound\nURL for this app.", + "operationId": "v1.inbound.rotate-url", "parameters": [ { "description": "The Application's ID or UID.", @@ -14436,34 +17396,25 @@ "style": "simple" }, { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HubspotOauthConfigIn" - } - } - }, - "required": true - }, "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RotatedUrlOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -14541,79 +17492,79 @@ "HTTPBearer": [] } ], - "summary": "Update Hubspot Oauth Config", + "summary": "Rotate Url", "tags": [ - "Transformation Template" + "Inbound" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.endpoint.updateHubspotOauthConfig(\"app_id\", \"endpoint_id\", \n});" + "source": "const rotatedUrlOut = await svix.inbound.rotateUrl(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.endpoint.updateHubspotOauthConfig(\"app_id\", \"endpoint_id\", \n});" + "source": "const rotatedUrlOut = await svix.inbound.rotateUrl(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "svix.endpoint.update_hubspot_oauth_config(\"app_id\", \"endpoint_id\", HubspotOauthConfigIn\n))" + "source": "rotated_url_out = svix.inbound.rotate_url(\"app_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.endpoint.update_hubspot_oauth_config(\"app_id\", \"endpoint_id\", HubspotOauthConfigIn\n))" + "source": "rotated_url_out = await svix.inbound.rotate_url(\"app_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Endpoint.UpdateHubspotOauthConfig(ctx, \"app_id\", \"endpoint_id\", &HubspotOauthConfigIn{\n})" + "source": "rotatedUrlOut, err := svixClient.Inbound.RotateUrl(ctx, \"app_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.endpoint.updateHubspotOauthConfig(\"app_id\", \"endpoint_id\", HubspotOauthConfigIn()\n)" + "source": "val rotatedUrlOut = svix.inbound.rotateUrl(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "svix.getEndpoint().updateHubspotOauthConfig(\"app_id\", \"endpoint_id\", new HubspotOauthConfigIn()\n);" + "source": "RotatedUrlOut rotatedUrlOut = svix.getInbound().rotateUrl(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.endpoint.update_hubspot_oauth_config(\"app_id\", \"endpoint_id\", Svix::HubspotOauthConfigIn.new(\n}))" + "source": "rotated_url_out = svix.inbound.rotate_url(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "svix.endpoint().update_hubspot_oauth_config(\"app_id\", \"endpoint_id\", HubspotOauthConfigIn {\n}).await?;" + "source": "let rotated_url_out = svix.inbound().rotate_url(\"app_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Endpoint.UpdateHubspotOauthConfigAsync(\"app_id\", \"endpoint_id\", new HubspotOauthConfigIn\n});" + "source": "var rotatedUrlOut = await svix.Inbound.RotateUrlAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint update-hubspot-oauth-config \"app_id\" \"endpoint_id\" '\n}'" + "source": "svix inbound rotate-url \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation-template/oauth/hubspot' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/inbound/rotate-url' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate": { - "post": { - "description": "Simulate running the transformation on the payload and code.", - "operationId": "v1.endpoint.transformation-simulate", + "/api/v1/app/{app_id}/integration": { + "get": { + "description": "List the application's integrations.", + "operationId": "v1.integration.list", "parameters": [ { "description": "The Application's ID or UID.", @@ -14631,46 +17582,51 @@ "style": "simple" }, { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" }, - "style": "simple" + "style": "form" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", "schema": { + "description": "The iterator returned from a prior invocation", + "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "nullable": true, + "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndpointTransformationSimulateIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EndpointTransformationSimulateOut" + "$ref": "#/components/schemas/ListResponse_IntegrationOut_" } } }, @@ -14752,79 +17708,76 @@ "HTTPBearer": [] } ], - "summary": "Simulate", + "summary": "List Integrations", "tags": [ - "Endpoint" + "Integration" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const endpointTransformationSimulateOut = await svix.endpoint.transformationSimulate(\"app_id\", \"endpoint_id\", {\n eventType: \"user.signup\",\n channels: null\n});" + "source": "const listResponseIntegrationOut = await svix.integration.list(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const endpointTransformationSimulateOut = await svix.endpoint.transformationSimulate(\"app_id\", \"endpoint_id\", {\n eventType: \"user.signup\",\n channels: null\n});" + "source": "const listResponseIntegrationOut = await svix.integration.list(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "endpoint_transformation_simulate_out = svix.endpoint.transformation_simulate(\"app_id\", \"endpoint_id\", EndpointTransformationSimulateIn(\n event_type=\"user.signup\",\n channels=None\n), options=...)" + "source": "list_response_integration_out = svix.integration.list(\"app_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "endpoint_transformation_simulate_out = await svix.endpoint.transformation_simulate(\"app_id\", \"endpoint_id\", EndpointTransformationSimulateIn(\n event_type=\"user.signup\",\n channels=None\n), options=...)" + "source": "list_response_integration_out = await svix.integration.list(\"app_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "endpointTransformationSimulateOut, err := svixClient.Endpoint.TransformationSimulate(ctx, \"app_id\", \"endpoint_id\", &EndpointTransformationSimulateIn{\n EventType: \"user.signup\",\n Channels: nil,\n})" + "source": "listResponseIntegrationOut, err := svixClient.Integration.List(ctx, \"app_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val endpointTransformationSimulateOut = svix.endpoint.transformationSimulate(\"app_id\", \"endpoint_id\", EndpointTransformationSimulateIn()\n .eventType(\"user.signup\")\n .channels(null)\n)" + "source": "val listResponseIntegrationOut = svix.integration.list(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "EndpointTransformationSimulateOut endpointTransformationSimulateOut = svix.getEndpoint().transformationSimulate(\"app_id\", \"endpoint_id\", new EndpointTransformationSimulateIn()\n .eventType(\"user.signup\")\n .channels(null)\n);" + "source": "ListResponseIntegrationOut listResponseIntegrationOut = svix.getIntegration().list(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "endpoint_transformation_simulate_out = svix.endpoint.transformation_simulate(\"app_id\", \"endpoint_id\", Svix::EndpointTransformationSimulateIn.new({\n \"event_type\": \"user.signup\",\n \"channels\": nil\n}))" + "source": "list_response_integration_out = svix.integration.list(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let endpoint_transformation_simulate_out = svix.endpoint().transformation_simulate(\"app_id\", \"endpoint_id\", EndpointTransformationSimulateIn {\n event_type: \"user.signup\".to_string(),\n channels: None,\n}, None).await?;" + "source": "let list_response_integration_out = svix.integration().list(\"app_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var endpointTransformationSimulateOut = await svix.Endpoint.TransformationSimulateAsync(\"app_id\", \"endpoint_id\", new EndpointTransformationSimulateIn{\n eventType: \"user.signup\",\n channels: null\n});" + "source": "var listResponseIntegrationOut = await svix.Integration.ListAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint transformation-simulate \"app_id\" \"endpoint_id\" '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n}'" + "source": "svix integration list \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true - } - }, - "/api/v1/app/{app_id}/events": { - "get": { - "description": "Reads the stream of created messages for an application.", - "operationId": "v1.message.events", + ] + }, + "post": { + "description": "Create an integration.", + "operationId": "v1.integration.create", "parameters": [ { "description": "The Application's ID or UID.", @@ -14842,83 +17795,31 @@ "style": "simple" }, { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the event type", - "in": "query", - "name": "event_types", - "schema": { - "description": "Filter response based on the event type", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" - }, - { - "description": "Filter response based on the event type.", - "in": "query", - "name": "channels", - "schema": { - "description": "Filter response based on the event type.", - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" - }, - { - "in": "query", - "name": "after", + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "format": "date-time", - "nullable": true, "type": "string" }, - "style": "form" + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageEventsOut" + "$ref": "#/components/schemas/IntegrationOut" } } }, @@ -15000,79 +17901,78 @@ "HTTPBearer": [] } ], - "summary": "Message Events", + "summary": "Create Integration", "tags": [ - "Message" + "Integration" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageEventsOut = await svix.message.events(\"app_id\");" + "source": "const integrationOut = await svix.integration.create(\"app_id\", {\n name: \"Example Integration\",\n featureFlags: []\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageEventsOut = await svix.message.events(\"app_id\");" + "source": "const integrationOut = await svix.integration.create(\"app_id\", {\n name: \"Example Integration\",\n featureFlags: []\n});" }, { "label": "Python", "lang": "Python", - "source": "message_events_out = svix.message.events(\"app_id\")" + "source": "integration_out = svix.integration.create(\"app_id\", IntegrationIn(\n name=\"Example Integration\",\n feature_flags=[]\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_events_out = await svix.message.events(\"app_id\")" + "source": "integration_out = await svix.integration.create(\"app_id\", IntegrationIn(\n name=\"Example Integration\",\n feature_flags=[]\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "messageEventsOut, err := svixClient.Message.Events(ctx, \"app_id\")" + "source": "integrationOut, err := svixClient.Integration.Create(ctx, \"app_id\", &IntegrationIn{\n Name: \"Example Integration\",\n FeatureFlags: []interface{}{},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageEventsOut = svix.message.events(\"app_id\")" + "source": "val integrationOut = svix.integration.create(\"app_id\", IntegrationIn()\n .name(\"Example Integration\")\n .featureFlags(arrayOf())\n)" }, { "label": "Java", "lang": "Java", - "source": "MessageEventsOut messageEventsOut = svix.getMessage().events(\"app_id\");" + "source": "IntegrationOut integrationOut = svix.getIntegration().create(\"app_id\", new IntegrationIn()\n .name(\"Example Integration\")\n .featureFlags(new Object[]{})\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_events_out = svix.message.events(\"app_id\")" + "source": "integration_out = svix.integration.create(\"app_id\", Svix::IntegrationIn.new({\n \"name\": \"Example Integration\",\n \"feature_flags\": []\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let message_events_out = svix.message().events(\"app_id\").await?;" + "source": "let integration_out = svix.integration().create(\"app_id\", IntegrationIn {\n name: \"Example Integration\".to_string(),\n feature_flags: Some(vec![]),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageEventsOut = await svix.Message.EventsAsync(\"app_id\");" + "source": "var integrationOut = await svix.Integration.CreateAsync(\"app_id\", new IntegrationIn{\n name: \"Example Integration\",\n featureFlags: new Object[] {}\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix message events \"app_id\"" + "source": "svix integration create \"app_id\" '{\n \"name\": \"Example Integration\",\n \"featureFlags\": []\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"Example Integration\",\n \"featureFlags\": []\n }'" } - ], - "x-hidden": true + ] } }, - "/api/v1/app/{app_id}/events/subscription/{subscription_id}": { - "get": { - "description": "Reads the stream of created messages for an application, but using server-managed iterator tracking.", - "operationId": "v1.message.events-subscription", + "/api/v1/app/{app_id}/integration/{integ_id}": { + "delete": { + "description": "Delete an integration.", + "operationId": "v1.integration.delete", "parameters": [ { "description": "The Application's ID or UID.", @@ -15090,102 +17990,24 @@ "style": "simple" }, { - "description": "The EventsSubscription's ID or UID.", + "description": "The Integration's ID.", "in": "path", - "name": "subscription_id", + "name": "integ_id", "required": true, "schema": { - "description": "The EventsSubscription's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "The Integration's ID.", + "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" - }, - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the event type", - "in": "query", - "name": "event_types", - "schema": { - "description": "Filter response based on the event type", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" - }, - { - "description": "Filter response based on the event type.", - "in": "query", - "name": "channels", - "schema": { - "description": "Filter response based on the event type.", - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" - }, - { - "in": "query", - "name": "after", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageEventsOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -15263,79 +18085,76 @@ "HTTPBearer": [] } ], - "summary": "Message Events Subscription", + "summary": "Delete Integration", "tags": [ - "Message" + "Integration" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageEventsOut = await svix.message.eventsSubscription(\"app_id\", \"subscription_id\");" + "source": "await svix.integration.delete(\"app_id\", \"integ_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageEventsOut = await svix.message.eventsSubscription(\"app_id\", \"subscription_id\");" + "source": "await svix.integration.delete(\"app_id\", \"integ_id\");" }, { "label": "Python", "lang": "Python", - "source": "message_events_out = svix.message.events_subscription(\"app_id\", \"subscription_id\")" + "source": "svix.integration.delete(\"app_id\", \"integ_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_events_out = await svix.message.events_subscription(\"app_id\", \"subscription_id\")" + "source": "await svix.integration.delete(\"app_id\", \"integ_id\")" }, { "label": "Go", "lang": "Go", - "source": "messageEventsOut, err := svixClient.Message.EventsSubscription(ctx, \"app_id\", \"subscription_id\")" + "source": "err := svixClient.Integration.Delete(ctx, \"app_id\", \"integ_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageEventsOut = svix.message.eventsSubscription(\"app_id\", \"subscription_id\")" + "source": "svix.integration.delete(\"app_id\", \"integ_id\")" }, { "label": "Java", "lang": "Java", - "source": "MessageEventsOut messageEventsOut = svix.getMessage().eventsSubscription(\"app_id\", \"subscription_id\");" + "source": "svix.getIntegration().delete(\"app_id\", \"integ_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_events_out = svix.message.events_subscription(\"app_id\", \"subscription_id\")" + "source": "svix.integration.delete(\"app_id\", \"integ_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let message_events_out = svix.message().events_subscription(\"app_id\", \"subscription_id\").await?;" + "source": "svix.integration().delete(\"app_id\", \"integ_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageEventsOut = await svix.Message.EventsSubscriptionAsync(\"app_id\", \"subscription_id\");" + "source": "await svix.Integration.DeleteAsync(\"app_id\", \"integ_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message events-subscription \"app_id\" \"subscription_id\"" + "source": "svix integration delete \"app_id\" \"integ_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events/subscription/{subscription_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } - ], - "x-hidden": true - } - }, - "/api/v1/app/{app_id}/events/subscription/{subscription_id}/create-token": { - "post": { - "description": "Creates an auth token that can be used with the `v1.message.events-subscription` endpoint.", - "operationId": "v1.message.events-subscription.create-token", + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + } + ] + }, + "get": { + "description": "Get an integration.", + "operationId": "v1.integration.get", "parameters": [ { "description": "The Application's ID or UID.", @@ -15353,25 +18172,16 @@ "style": "simple" }, { - "description": "The EventsSubscription's ID or UID.", + "description": "The Integration's ID.", "in": "path", - "name": "subscription_id", + "name": "integ_id", "required": true, "schema": { - "description": "The EventsSubscription's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { + "description": "The Integration's ID.", + "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" @@ -15382,7 +18192,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageSubscriberAuthTokenOut" + "$ref": "#/components/schemas/IntegrationOut" } } }, @@ -15464,24 +18274,76 @@ "HTTPBearer": [] } ], - "summary": "Message Events Create Token", + "summary": "Get Integration", "tags": [ - "Message" + "Integration" ], "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const integrationOut = await svix.integration.get(\"app_id\", \"integ_id\");" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const integrationOut = await svix.integration.get(\"app_id\", \"integ_id\");" + }, + { + "label": "Python", + "lang": "Python", + "source": "integration_out = svix.integration.get(\"app_id\", \"integ_id\")" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "integration_out = await svix.integration.get(\"app_id\", \"integ_id\")" + }, + { + "label": "Go", + "lang": "Go", + "source": "integrationOut, err := svixClient.Integration.Get(ctx, \"app_id\", \"integ_id\")" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val integrationOut = svix.integration.get(\"app_id\", \"integ_id\")" + }, + { + "label": "Java", + "lang": "Java", + "source": "IntegrationOut integrationOut = svix.getIntegration().get(\"app_id\", \"integ_id\");" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "integration_out = svix.integration.get(\"app_id\", \"integ_id\")" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let integration_out = svix.integration().get(\"app_id\", \"integ_id\").await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var integrationOut = await svix.Integration.GetAsync(\"app_id\", \"integ_id\");" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix integration get \"app_id\" \"integ_id\"" + }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events/subscription/{subscription_id}/create-token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true - } - }, - "/api/v1/app/{app_id}/inbound/msg/{inbound_token}": { - "post": { - "description": "Handles a raw inbound webhook for the application.", - "operationId": "v1.inbound.msg", + ] + }, + "put": { + "description": "Update an integration.", + "operationId": "v1.integration.update", "parameters": [ { "description": "The Application's ID or UID.", @@ -15499,33 +18361,16 @@ "style": "simple" }, { + "description": "The Integration's ID.", "in": "path", - "name": "inbound_token", + "name": "integ_id", "required": true, "schema": { - "type": "string" - }, - "style": "simple" - }, - { - "description": "The event type's name", - "in": "query", - "name": "event_type", - "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { + "description": "The Integration's ID.", + "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" @@ -15535,18 +18380,18 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/IntegrationUpdate" } } }, "required": true }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageOut" + "$ref": "#/components/schemas/IntegrationOut" } } }, @@ -15628,79 +18473,79 @@ "HTTPBearer": [] } ], - "summary": "Handle Inbound", + "summary": "Update Integration", "tags": [ - "Inbound" + "Integration" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageOut = await svix.inbound.msg(\"app_id\", \"inbound_token\");" + "source": "const integrationOut = await svix.integration.update(\"app_id\", \"integ_id\", {\n name: \"Example Integration\",\n featureFlags: []\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageOut = await svix.inbound.msg(\"app_id\", \"inbound_token\");" + "source": "const integrationOut = await svix.integration.update(\"app_id\", \"integ_id\", {\n name: \"Example Integration\",\n featureFlags: []\n});" }, { "label": "Python", "lang": "Python", - "source": "message_out = svix.inbound.msg(\"app_id\", \"inbound_token\", options=...)" + "source": "integration_out = svix.integration.update(\"app_id\", \"integ_id\", IntegrationUpdate(\n name=\"Example Integration\",\n feature_flags=[]\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_out = await svix.inbound.msg(\"app_id\", \"inbound_token\", options=...)" + "source": "integration_out = await svix.integration.update(\"app_id\", \"integ_id\", IntegrationUpdate(\n name=\"Example Integration\",\n feature_flags=[]\n))" }, { "label": "Go", "lang": "Go", - "source": "messageOut, err := svixClient.Inbound.Msg(ctx, \"app_id\", \"inbound_token\")" + "source": "integrationOut, err := svixClient.Integration.Update(ctx, \"app_id\", \"integ_id\", &IntegrationUpdate{\n Name: \"Example Integration\",\n FeatureFlags: []interface{}{},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageOut = svix.inbound.msg(\"app_id\", \"inbound_token\")" + "source": "val integrationOut = svix.integration.update(\"app_id\", \"integ_id\", IntegrationUpdate()\n .name(\"Example Integration\")\n .featureFlags(arrayOf())\n)" }, { "label": "Java", "lang": "Java", - "source": "MessageOut messageOut = svix.getInbound().msg(\"app_id\", \"inbound_token\");" + "source": "IntegrationOut integrationOut = svix.getIntegration().update(\"app_id\", \"integ_id\", new IntegrationUpdate()\n .name(\"Example Integration\")\n .featureFlags(new Object[]{})\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_out = svix.inbound.msg(\"app_id\", \"inbound_token\")" + "source": "integration_out = svix.integration.update(\"app_id\", \"integ_id\", Svix::IntegrationUpdate.new({\n \"name\": \"Example Integration\",\n \"feature_flags\": []\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let message_out = svix.inbound().msg(\"app_id\", \"inbound_token\", None).await?;" + "source": "let integration_out = svix.integration().update(\"app_id\", \"integ_id\", IntegrationUpdate {\n name: \"Example Integration\".to_string(),\n feature_flags: Some(vec![]),\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageOut = await svix.Inbound.MsgAsync(\"app_id\", \"inbound_token\");" + "source": "var integrationOut = await svix.Integration.UpdateAsync(\"app_id\", \"integ_id\", new IntegrationUpdate{\n name: \"Example Integration\",\n featureFlags: new Object[] {}\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix inbound msg \"app_id\" \"inbound_token\"" + "source": "svix integration update \"app_id\" \"integ_id\" '{\n \"name\": \"Example Integration\",\n \"featureFlags\": []\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/inbound/msg/{inbound_token}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"Example Integration\",\n \"featureFlags\": []\n }'" } - ], - "x-hidden": true + ] } }, - "/api/v1/app/{app_id}/inbound/rotate-url": { - "post": { - "description": "Invalidates the previous inbound url (if one exists), producing a new inbound\nURL for this app.", - "operationId": "v1.inbound.rotate-url", + "/api/v1/app/{app_id}/integration/{integ_id}/key": { + "get": { + "deprecated": true, + "description": "Get an integration's key.", + "operationId": "v1.integration.get-key", "parameters": [ { "description": "The Application's ID or UID.", @@ -15718,10 +18563,16 @@ "style": "simple" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Integration's ID.", + "in": "path", + "name": "integ_id", + "required": true, "schema": { + "description": "The Integration's ID.", + "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" @@ -15732,7 +18583,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RotatedUrlOut" + "$ref": "#/components/schemas/IntegrationKeyOut" } } }, @@ -15814,79 +18665,78 @@ "HTTPBearer": [] } ], - "summary": "Rotate Url", + "summary": "Get Integration Key", "tags": [ - "Inbound" + "Integration" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const rotatedUrlOut = await svix.inbound.rotateUrl(\"app_id\");" + "source": "const integrationKeyOut = await svix.integration.getKey(\"app_id\", \"integ_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const rotatedUrlOut = await svix.inbound.rotateUrl(\"app_id\");" + "source": "const integrationKeyOut = await svix.integration.getKey(\"app_id\", \"integ_id\");" }, { "label": "Python", "lang": "Python", - "source": "rotated_url_out = svix.inbound.rotate_url(\"app_id\", options=...)" + "source": "integration_key_out = svix.integration.get_key(\"app_id\", \"integ_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "rotated_url_out = await svix.inbound.rotate_url(\"app_id\", options=...)" + "source": "integration_key_out = await svix.integration.get_key(\"app_id\", \"integ_id\")" }, { "label": "Go", "lang": "Go", - "source": "rotatedUrlOut, err := svixClient.Inbound.RotateUrl(ctx, \"app_id\")" + "source": "integrationKeyOut, err := svixClient.Integration.GetKey(ctx, \"app_id\", \"integ_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val rotatedUrlOut = svix.inbound.rotateUrl(\"app_id\")" + "source": "val integrationKeyOut = svix.integration.getKey(\"app_id\", \"integ_id\")" }, { "label": "Java", "lang": "Java", - "source": "RotatedUrlOut rotatedUrlOut = svix.getInbound().rotateUrl(\"app_id\");" + "source": "IntegrationKeyOut integrationKeyOut = svix.getIntegration().getKey(\"app_id\", \"integ_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "rotated_url_out = svix.inbound.rotate_url(\"app_id\")" + "source": "integration_key_out = svix.integration.get_key(\"app_id\", \"integ_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let rotated_url_out = svix.inbound().rotate_url(\"app_id\", None).await?;" + "source": "let integration_key_out = svix.integration().get_key(\"app_id\", \"integ_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var rotatedUrlOut = await svix.Inbound.RotateUrlAsync(\"app_id\");" + "source": "var integrationKeyOut = await svix.Integration.GetKeyAsync(\"app_id\", \"integ_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix inbound rotate-url \"app_id\"" + "source": "svix integration get-key \"app_id\" \"integ_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/inbound/rotate-url' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/key' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] } }, - "/api/v1/app/{app_id}/integration": { - "get": { - "description": "List the application's integrations.", - "operationId": "v1.integration.list", + "/api/v1/app/{app_id}/integration/{integ_id}/key/rotate": { + "post": { + "description": "Rotate the integration's key. The previous key will be immediately revoked.", + "operationId": "v1.integration.rotate-key", "parameters": [ { "description": "The Application's ID or UID.", @@ -15904,43 +18754,28 @@ "style": "simple" }, { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", + "description": "The Integration's ID.", + "in": "path", + "name": "integ_id", + "required": true, "schema": { - "description": "The iterator returned from a prior invocation", + "description": "The Integration's ID.", "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", "maxLength": 33, "minLength": 33, - "nullable": true, "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, - "style": "form" + "style": "simple" }, { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true + "type": "string" }, - "style": "form" + "style": "simple" } ], "responses": { @@ -15948,7 +18783,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_IntegrationOut_" + "$ref": "#/components/schemas/IntegrationKeyOut" } } }, @@ -16030,7 +18865,7 @@ "HTTPBearer": [] } ], - "summary": "List Integrations", + "summary": "Rotate Integration Key", "tags": [ "Integration" ], @@ -16038,68 +18873,70 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseIntegrationOut = await svix.integration.list(\"app_id\");" + "source": "const integrationKeyOut = await svix.integration.rotateKey(\"app_id\", \"integ_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseIntegrationOut = await svix.integration.list(\"app_id\");" + "source": "const integrationKeyOut = await svix.integration.rotateKey(\"app_id\", \"integ_id\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_integration_out = svix.integration.list(\"app_id\", options=...)" + "source": "integration_key_out = svix.integration.rotate_key(\"app_id\", \"integ_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_integration_out = await svix.integration.list(\"app_id\", options=...)" + "source": "integration_key_out = await svix.integration.rotate_key(\"app_id\", \"integ_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "listResponseIntegrationOut, err := svixClient.Integration.List(ctx, \"app_id\", nil)" + "source": "integrationKeyOut, err := svixClient.Integration.RotateKey(ctx, \"app_id\", \"integ_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseIntegrationOut = svix.integration.list(\"app_id\")" + "source": "val integrationKeyOut = svix.integration.rotateKey(\"app_id\", \"integ_id\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseIntegrationOut listResponseIntegrationOut = svix.getIntegration().list(\"app_id\");" + "source": "IntegrationKeyOut integrationKeyOut = svix.getIntegration().rotateKey(\"app_id\", \"integ_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_integration_out = svix.integration.list(\"app_id\")" + "source": "integration_key_out = svix.integration.rotate_key(\"app_id\", \"integ_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_integration_out = svix.integration().list(\"app_id\", None).await?;" + "source": "let integration_key_out = svix.integration().rotate_key(\"app_id\", \"integ_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseIntegrationOut = await svix.Integration.ListAsync(\"app_id\");" + "source": "var integrationKeyOut = await svix.Integration.RotateKeyAsync(\"app_id\", \"integ_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix integration list \"app_id\"" + "source": "svix integration rotate-key \"app_id\" \"integ_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/key/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - }, - "post": { - "description": "Create an integration.", - "operationId": "v1.integration.create", + } + }, + "/api/v1/app/{app_id}/msg": { + "get": { + "description": "List all of the application's messages.\n\nThe `before` and `after` parameters let you filter all items created before or after a certain date. These can be used alongside an iterator to paginate over results\nwithin a certain window.\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.", + "operationId": "v1.message.list", "parameters": [ { "description": "The Application's ID or UID.", @@ -16117,31 +18954,122 @@ "style": "simple" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 31, + "minLength": 31, + "nullable": true, + "pattern": "^msg_[A-Za-z0-9]{27}$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter response based on the channel.", + "in": "query", + "name": "channel", "schema": { + "description": "Filter response based on the channel.", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "Only include items created before a certain date.", + "in": "query", + "name": "before", + "schema": { + "description": "Only include items created before a certain date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only include items created after a certain date.", + "in": "query", + "name": "after", + "schema": { + "description": "Only include items created after a certain date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "When `true` message payloads are included in the response.", + "in": "query", + "name": "with_content", + "schema": { + "default": true, + "description": "When `true` message payloads are included in the response.", + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Filter messages matching the provided tag.", + "in": "query", + "name": "tag", + "schema": { + "description": "Filter messages matching the provided tag.", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_./\\\\#]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter response based on the event type", + "in": "query", + "name": "event_types", + "schema": { + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntegrationIn" - } - } - }, - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationOut" + "$ref": "#/components/schemas/ListResponse_MessageOut_" } } }, @@ -16223,78 +19151,76 @@ "HTTPBearer": [] } ], - "summary": "Create Integration", + "summary": "List Messages", "tags": [ - "Integration" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const integrationOut = await svix.integration.create(\"app_id\", {\n name: \"Example Integration\",\n featureFlags: []\n});" + "source": "const listResponseMessageOut = await svix.message.list(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const integrationOut = await svix.integration.create(\"app_id\", {\n name: \"Example Integration\",\n featureFlags: []\n});" + "source": "const listResponseMessageOut = await svix.message.list(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "integration_out = svix.integration.create(\"app_id\", IntegrationIn(\n name=\"Example Integration\",\n feature_flags=[]\n), options=...)" + "source": "list_response_message_out = svix.message.list(\"app_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "integration_out = await svix.integration.create(\"app_id\", IntegrationIn(\n name=\"Example Integration\",\n feature_flags=[]\n), options=...)" + "source": "list_response_message_out = await svix.message.list(\"app_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "integrationOut, err := svixClient.Integration.Create(ctx, \"app_id\", &IntegrationIn{\n Name: \"Example Integration\",\n FeatureFlags: []interface{}{},\n})" + "source": "listResponseMessageOut, err := svixClient.Message.List(ctx, \"app_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val integrationOut = svix.integration.create(\"app_id\", IntegrationIn()\n .name(\"Example Integration\")\n .featureFlags(arrayOf())\n)" + "source": "val listResponseMessageOut = svix.message.list(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "IntegrationOut integrationOut = svix.getIntegration().create(\"app_id\", new IntegrationIn()\n .name(\"Example Integration\")\n .featureFlags(new Object[]{})\n);" + "source": "ListResponseMessageOut listResponseMessageOut = svix.getMessage().list(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "integration_out = svix.integration.create(\"app_id\", Svix::IntegrationIn.new({\n \"name\": \"Example Integration\",\n \"feature_flags\": []\n}))" + "source": "list_response_message_out = svix.message.list(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let integration_out = svix.integration().create(\"app_id\", IntegrationIn {\n name: \"Example Integration\".to_string(),\n feature_flags: Some(vec![]),\n}, None).await?;" + "source": "let list_response_message_out = svix.message().list(\"app_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var integrationOut = await svix.Integration.CreateAsync(\"app_id\", new IntegrationIn{\n name: \"Example Integration\",\n featureFlags: new Object[] {}\n});" + "source": "var listResponseMessageOut = await svix.Message.ListAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix integration create \"app_id\" '{\n \"name\": \"Example Integration\",\n \"featureFlags\": []\n}'" + "source": "svix message list \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"Example Integration\",\n \"featureFlags\": []\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - } - }, - "/api/v1/app/{app_id}/integration/{integ_id}": { - "delete": { - "description": "Delete an integration.", - "operationId": "v1.integration.delete", + }, + "post": { + "description": "Creates a new message and dispatches it to all of the application's endpoints.\n\nThe `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made.\nIf a message with the same `eventId` already exists for the application, a 409 conflict error will be returned.\n\nThe `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types.\nMessages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema.\n\nThe `payload` property is the webhook's body (the actual webhook message). Svix supports payload sizes of up to ~350kb, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.", + "operationId": "v1.message.create", "parameters": [ { "description": "The Application's ID or UID.", @@ -16312,24 +19238,46 @@ "style": "simple" }, { - "description": "The Integration's ID.", - "in": "path", - "name": "integ_id", - "required": true, + "description": "When `true`, message payloads are included in the response.", + "in": "query", + "name": "with_content", + "schema": { + "default": true, + "description": "When `true`, message payloads are included in the response.", + "type": "boolean" + }, + "style": "form" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Integration's ID.", - "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageIn" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "no content" + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -16381,6 +19329,16 @@ }, "description": "Conflict" }, + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Payload too large" + }, "422": { "content": { "application/json": { @@ -16407,76 +19365,78 @@ "HTTPBearer": [] } ], - "summary": "Delete Integration", + "summary": "Create Message", "tags": [ - "Integration" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.integration.delete(\"app_id\", \"integ_id\");" + "source": "const messageOut = await svix.message.create(\"app_id\", {\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n channels: [\"project_123\", \"group_2\"],\n application: null,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nconst messageOut = await svix.message.create(\n \"app_id\",\n svix.messageInRaw(\"user.signup\", \"This is a raw body.\", \"text/plain\"),\n);\n" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.integration.delete(\"app_id\", \"integ_id\");" + "source": "const messageOut = await svix.message.create(\"app_id\", {\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n channels: [\"project_123\", \"group_2\"],\n application: null,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nconst messageOut = await svix.message.create(\n \"app_id\",\n svix.messageInRaw(\"user.signup\", \"This is a raw body.\", \"text/plain\"),\n);\n" }, { "label": "Python", "lang": "Python", - "source": "svix.integration.delete(\"app_id\", \"integ_id\")" + "source": "message_out = svix.message.create(\"app_id\", MessageIn(\n event_id=\"unique-identifier\",\n event_type=\"user.signup\",\n payload={\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n channels=[\"project_123\", \"group_2\"],\n application=None,\n tags=[\"my_tag\", \"other\"],\n transformations_params=None,\n payload_retention_period=90,\n payload_retention_hours=None\n), options=...)\n\n# Alternatively, with a raw string payload.\nmessage_out = svix.message.create(\"app_id\", svix.message_in_raw(\n event_type=\"user.signup\",\n payload=\"This is a raw body.\",\n content_type=\"text/plain\",\n), options=...)\n" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.integration.delete(\"app_id\", \"integ_id\")" + "source": "message_out = await svix.message.create(\"app_id\", MessageIn(\n event_id=\"unique-identifier\",\n event_type=\"user.signup\",\n payload={\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n channels=[\"project_123\", \"group_2\"],\n application=None,\n tags=[\"my_tag\", \"other\"],\n transformations_params=None,\n payload_retention_period=90,\n payload_retention_hours=None\n), options=...)\n\n# Alternatively, with a raw string payload.\nmessage_out = await svix.message.create(\"app_id\", await svix.message_in_raw(\n event_type=\"user.signup\",\n payload=\"This is a raw body.\",\n content_type=\"text/plain\",\n), options=...)\n" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Integration.Delete(ctx, \"app_id\", \"integ_id\")" + "source": "messageOut, err := svixClient.Message.Create(ctx, \"app_id\", &MessageIn{\n EventId: \"unique-identifier\",\n EventType: \"user.signup\",\n Payload: map[string]interface{}{\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n Channels: []string{\"project_123\", \"group_2\"},\n Application: nil,\n Tags: []string{\"my_tag\", \"other\"},\n TransformationsParams: nil,\n PayloadRetentionPeriod: 90,\n PayloadRetentionHours: nil,\n})\n\n// Alternatively, with a raw string payload.\nmessageOut, err := svixClient.Message.Create(ctx, \"app_id\", &svix.NewMessageInRaw(\n \"user.signup\",\n \"This is a raw body.\",\n svix.StaticNullableString(\"text/plain\"),\n))\n" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.integration.delete(\"app_id\", \"integ_id\")" + "source": "val messageOut = svix.message.create(\"app_id\", MessageIn()\n .eventId(\"unique-identifier\")\n .eventType(\"user.signup\")\n .payload(/* ... */)\n .channels(arrayOf(\"project_123\", \"group_2\"))\n .application(null)\n .tags(arrayOf(\"my_tag\", \"other\"))\n .transformationsParams(null)\n .payloadRetentionPeriod(90)\n .payloadRetentionHours(null)\n)\n\n// Alternatively, with a raw string payload.\nval messageOut = svix.message.create(\"app_id\", svix.messageInRaw(\n eventType = \"user.signup\",\n payload = \"This is a raw body.\",\n contentType = \"text/plain\",\n))\n" }, { "label": "Java", "lang": "Java", - "source": "svix.getIntegration().delete(\"app_id\", \"integ_id\");" + "source": "MessageOut messageOut = svix.getMessage().create(\"app_id\", new MessageIn()\n .eventId(\"unique-identifier\")\n .eventType(\"user.signup\")\n .payload(/* ... */)\n .channels(new String[]{\"project_123\", \"group_2\"})\n .application(null)\n .tags(new String[]{\"my_tag\", \"other\"})\n .transformationsParams(null)\n .payloadRetentionPeriod(90)\n .payloadRetentionHours(null)\n);\n\n// Alternatively, with a raw string payload.\nMessageOut messageOut = svix.getMessage().create(\n \"app_id\",\n Message.messageInRaw(\"This is a raw body.\", \"text/plain\")\n .eventType(\"user.signup\")\n);\n" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.integration.delete(\"app_id\", \"integ_id\")" + "source": "message_out = svix.message.create(\"app_id\", Svix::MessageIn.new({\n \"event_id\": \"unique-identifier\",\n \"event_type\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": nil,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformations_params\": nil,\n \"payload_retention_period\": 90,\n \"payload_retention_hours\": nil\n}))\n\n# Alternatively, with a raw string payload.\nmessage_out = svix.message.create(\"app_id\", Svix.message_in_raw({\n event_type: \"user.signup\",\n payload: \"This is a raw body.\",\n content_type: \"text/plain\",\n}))\n" }, { "label": "Rust", "lang": "Rust", - "source": "svix.integration().delete(\"app_id\", \"integ_id\").await?;" + "source": "let message_out = svix.message().create(\"app_id\", MessageIn {\n event_id: Some(\"unique-identifier\".to_string()),\n event_type: \"user.signup\".to_string(),\n payload: json!({\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"}),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n application: None,\n tags: Some(vec![\"my_tag\".to_string(), \"other\".to_string()]),\n transformations_params: None,\n payload_retention_period: Some(90),\n payload_retention_hours: None,\n}, None).await?;\n\n// Alternatively, with a raw string payload.\nlet message_out = svix.message().create(\n \"app_id\",\n MessageIn::new_raw_payload(\n \"user.signup\".to_string(),\n \"This is a raw body.\".to_string(),\n ).with_content_type(\"text/plain\".to_string()),\n None,\n).await?;\n" }, { "label": "C#", "lang": "C#", - "source": "await svix.Integration.DeleteAsync(\"app_id\", \"integ_id\");" + "source": "var messageOut = await svix.Message.CreateAsync(\"app_id\", new MessageIn{\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: /* ... */,\n channels: new string[] {\"project_123\", \"group_2\"},\n application: null,\n tags: new string[] {\"my_tag\", \"other\"},\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nvar messageOut = await svix.Message.CreateAsync(\n \"app_id\",\n svix.Message.messageInRaw(\n eventType: \"user.signup\",\n payload: \"This is a raw body.\",\n contentType: \"text/plain\",\n ),\n);\n" }, { "label": "CLI", "lang": "Shell", - "source": "svix integration delete \"app_id\" \"integ_id\"" + "source": "svix message create \"app_id\" '{\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null,\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null,\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n }'\n\n# Alternatively, with a raw string payload.\ncurl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"user.signup\",\n \"payload\": {},\n \"transformationsParams\": {\n \"rawPayload\": \"This is a raw body.\",\n \"headers\": { \"content-type\": \"text/plain\" }\n }\n }'\n" } ] - }, - "get": { - "description": "Get an integration.", - "operationId": "v1.integration.get", + } + }, + "/api/v1/app/{app_id}/msg/expunge-all-contents": { + "post": { + "description": "Purge all message content for the application.\n\nDelete all message payloads for the application.", + "operationId": "v1.message.expunge-all-contents", "parameters": [ { "description": "The Application's ID or UID.", @@ -16494,27 +19454,21 @@ "style": "simple" }, { - "description": "The Integration's ID.", - "in": "path", - "name": "integ_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Integration's ID.", - "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" } ], "responses": { - "200": { + "202": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationOut" + "$ref": "#/components/schemas/ExpungeAllContentsOut" } } }, @@ -16596,76 +19550,78 @@ "HTTPBearer": [] } ], - "summary": "Get Integration", + "summary": "Expunge all message contents", "tags": [ - "Integration" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const integrationOut = await svix.integration.get(\"app_id\", \"integ_id\");" + "source": "const expungeAllContentsOut = await svix.message.expungeAllContents(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const integrationOut = await svix.integration.get(\"app_id\", \"integ_id\");" + "source": "const expungeAllContentsOut = await svix.message.expungeAllContents(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "integration_out = svix.integration.get(\"app_id\", \"integ_id\")" + "source": "expunge_all_contents_out = svix.message.expunge_all_contents(\"app_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "integration_out = await svix.integration.get(\"app_id\", \"integ_id\")" + "source": "expunge_all_contents_out = await svix.message.expunge_all_contents(\"app_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "integrationOut, err := svixClient.Integration.Get(ctx, \"app_id\", \"integ_id\")" + "source": "expungeAllContentsOut, err := svixClient.Message.ExpungeAllContents(ctx, \"app_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val integrationOut = svix.integration.get(\"app_id\", \"integ_id\")" + "source": "val expungeAllContentsOut = svix.message.expungeAllContents(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "IntegrationOut integrationOut = svix.getIntegration().get(\"app_id\", \"integ_id\");" + "source": "ExpungeAllContentsOut expungeAllContentsOut = svix.getMessage().expungeAllContents(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "integration_out = svix.integration.get(\"app_id\", \"integ_id\")" + "source": "expunge_all_contents_out = svix.message.expunge_all_contents(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let integration_out = svix.integration().get(\"app_id\", \"integ_id\").await?;" + "source": "let expunge_all_contents_out = svix.message().expunge_all_contents(\"app_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var integrationOut = await svix.Integration.GetAsync(\"app_id\", \"integ_id\");" + "source": "var expungeAllContentsOut = await svix.Message.ExpungeAllContentsAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix integration get \"app_id\" \"integ_id\"" + "source": "svix message expunge-all-contents \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/expunge-all-contents' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - }, - "put": { - "description": "Update an integration.", - "operationId": "v1.integration.update", + } + }, + "/api/v1/app/{app_id}/msg/precheck/active": { + "post": { + "description": "A pre-check call for `create.message` that checks whether endpoints are actively listening to\nthis message.", + "operationId": "v1.message.precheck", "parameters": [ { "description": "The Application's ID or UID.", @@ -16683,16 +19639,10 @@ "style": "simple" }, { - "description": "The Integration's ID.", - "in": "path", - "name": "integ_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Integration's ID.", - "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^integ_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" @@ -16702,7 +19652,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationUpdate" + "$ref": "#/components/schemas/MessagePrecheckIn" } } }, @@ -16713,7 +19663,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationOut" + "$ref": "#/components/schemas/MessagePrecheckOut" } } }, @@ -16795,79 +19745,79 @@ "HTTPBearer": [] } ], - "summary": "Update Integration", + "summary": "Create Message Precheck", "tags": [ - "Integration" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const integrationOut = await svix.integration.update(\"app_id\", \"integ_id\", {\n name: \"Example Integration\",\n featureFlags: []\n});" + "source": "const messagePrecheckOut = await svix.message.precheck(\"app_id\", {\n eventType: \"user.signup\",\n channels: [\"project_123\", \"group_2\"]\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const integrationOut = await svix.integration.update(\"app_id\", \"integ_id\", {\n name: \"Example Integration\",\n featureFlags: []\n});" + "source": "const messagePrecheckOut = await svix.message.precheck(\"app_id\", {\n eventType: \"user.signup\",\n channels: [\"project_123\", \"group_2\"]\n});" }, { "label": "Python", "lang": "Python", - "source": "integration_out = svix.integration.update(\"app_id\", \"integ_id\", IntegrationUpdate(\n name=\"Example Integration\",\n feature_flags=[]\n))" + "source": "message_precheck_out = svix.message.precheck(\"app_id\", MessagePrecheckIn(\n event_type=\"user.signup\",\n channels=[\"project_123\", \"group_2\"]\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "integration_out = await svix.integration.update(\"app_id\", \"integ_id\", IntegrationUpdate(\n name=\"Example Integration\",\n feature_flags=[]\n))" + "source": "message_precheck_out = await svix.message.precheck(\"app_id\", MessagePrecheckIn(\n event_type=\"user.signup\",\n channels=[\"project_123\", \"group_2\"]\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "integrationOut, err := svixClient.Integration.Update(ctx, \"app_id\", \"integ_id\", &IntegrationUpdate{\n Name: \"Example Integration\",\n FeatureFlags: []interface{}{},\n})" + "source": "messagePrecheckOut, err := svixClient.Message.Precheck(ctx, \"app_id\", &MessagePrecheckIn{\n EventType: \"user.signup\",\n Channels: []string{\"project_123\", \"group_2\"},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val integrationOut = svix.integration.update(\"app_id\", \"integ_id\", IntegrationUpdate()\n .name(\"Example Integration\")\n .featureFlags(arrayOf())\n)" + "source": "val messagePrecheckOut = svix.message.precheck(\"app_id\", MessagePrecheckIn()\n .eventType(\"user.signup\")\n .channels(arrayOf(\"project_123\", \"group_2\"))\n)" }, { "label": "Java", "lang": "Java", - "source": "IntegrationOut integrationOut = svix.getIntegration().update(\"app_id\", \"integ_id\", new IntegrationUpdate()\n .name(\"Example Integration\")\n .featureFlags(new Object[]{})\n);" + "source": "MessagePrecheckOut messagePrecheckOut = svix.getMessage().precheck(\"app_id\", new MessagePrecheckIn()\n .eventType(\"user.signup\")\n .channels(new String[]{\"project_123\", \"group_2\"})\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "integration_out = svix.integration.update(\"app_id\", \"integ_id\", Svix::IntegrationUpdate.new({\n \"name\": \"Example Integration\",\n \"feature_flags\": []\n}))" + "source": "message_precheck_out = svix.message.precheck(\"app_id\", Svix::MessagePrecheckIn.new({\n \"event_type\": \"user.signup\",\n \"channels\": [\"project_123\", \"group_2\"]\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let integration_out = svix.integration().update(\"app_id\", \"integ_id\", IntegrationUpdate {\n name: \"Example Integration\".to_string(),\n feature_flags: Some(vec![]),\n}).await?;" + "source": "let message_precheck_out = svix.message().precheck(\"app_id\", MessagePrecheckIn {\n event_type: \"user.signup\".to_string(),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var integrationOut = await svix.Integration.UpdateAsync(\"app_id\", \"integ_id\", new IntegrationUpdate{\n name: \"Example Integration\",\n featureFlags: new Object[] {}\n});" + "source": "var messagePrecheckOut = await svix.Message.PrecheckAsync(\"app_id\", new MessagePrecheckIn{\n eventType: \"user.signup\",\n channels: new string[] {\"project_123\", \"group_2\"}\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix integration update \"app_id\" \"integ_id\" '{\n \"name\": \"Example Integration\",\n \"featureFlags\": []\n}'" + "source": "svix message precheck \"app_id\" '{\n \"eventType\": \"user.signup\",\n \"channels\": [\"project_123\", \"group_2\"]\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"Example Integration\",\n \"featureFlags\": []\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/precheck/active' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventType\": \"user.signup\",\n \"channels\": [\"project_123\", \"group_2\"]\n }'" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/integration/{integ_id}/key": { + "/api/v1/app/{app_id}/msg/{msg_id}": { "get": { - "deprecated": true, - "description": "Get an integration's key.", - "operationId": "v1.integration.get-key", + "description": "Get a message by its ID or eventID.", + "operationId": "v1.message.get", "parameters": [ { "description": "The Application's ID or UID.", @@ -16885,19 +19835,30 @@ "style": "simple" }, { - "description": "The Integration's ID.", + "description": "The Message's ID or UID.", "in": "path", - "name": "integ_id", + "name": "msg_id", "required": true, "schema": { - "description": "The Integration's ID.", - "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^integ_[A-Za-z0-9]{27}$", + "description": "The Message's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" + }, + { + "description": "When `true` message payloads are included in the response.", + "in": "query", + "name": "with_content", + "schema": { + "default": true, + "description": "When `true` message payloads are included in the response.", + "type": "boolean" + }, + "style": "form" } ], "responses": { @@ -16905,7 +19866,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationKeyOut" + "$ref": "#/components/schemas/MessageOut" } } }, @@ -16987,78 +19948,78 @@ "HTTPBearer": [] } ], - "summary": "Get Integration Key", + "summary": "Get Message", "tags": [ - "Integration" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const integrationKeyOut = await svix.integration.getKey(\"app_id\", \"integ_id\");" + "source": "const messageOut = await svix.message.get(\"app_id\", \"msg_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const integrationKeyOut = await svix.integration.getKey(\"app_id\", \"integ_id\");" + "source": "const messageOut = await svix.message.get(\"app_id\", \"msg_id\");" }, { "label": "Python", "lang": "Python", - "source": "integration_key_out = svix.integration.get_key(\"app_id\", \"integ_id\")" + "source": "message_out = svix.message.get(\"app_id\", \"msg_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "integration_key_out = await svix.integration.get_key(\"app_id\", \"integ_id\")" + "source": "message_out = await svix.message.get(\"app_id\", \"msg_id\")" }, { "label": "Go", "lang": "Go", - "source": "integrationKeyOut, err := svixClient.Integration.GetKey(ctx, \"app_id\", \"integ_id\")" + "source": "messageOut, err := svixClient.Message.Get(ctx, \"app_id\", \"msg_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val integrationKeyOut = svix.integration.getKey(\"app_id\", \"integ_id\")" + "source": "val messageOut = svix.message.get(\"app_id\", \"msg_id\")" }, { "label": "Java", "lang": "Java", - "source": "IntegrationKeyOut integrationKeyOut = svix.getIntegration().getKey(\"app_id\", \"integ_id\");" + "source": "MessageOut messageOut = svix.getMessage().get(\"app_id\", \"msg_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "integration_key_out = svix.integration.get_key(\"app_id\", \"integ_id\")" + "source": "message_out = svix.message.get(\"app_id\", \"msg_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let integration_key_out = svix.integration().get_key(\"app_id\", \"integ_id\").await?;" + "source": "let message_out = svix.message().get(\"app_id\", \"msg_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var integrationKeyOut = await svix.Integration.GetKeyAsync(\"app_id\", \"integ_id\");" + "source": "var messageOut = await svix.Message.GetAsync(\"app_id\", \"msg_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix integration get-key \"app_id\" \"integ_id\"" + "source": "svix message get \"app_id\" \"msg_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/key' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] } }, - "/api/v1/app/{app_id}/integration/{integ_id}/key/rotate": { - "post": { - "description": "Rotate the integration's key. The previous key will be immediately revoked.", - "operationId": "v1.integration.rotate-key", + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}": { + "get": { + "description": "`msg_id`: Use a message id or a message `eventId`", + "operationId": "v1.message-attempt.get", "parameters": [ { "description": "The Application's ID or UID.", @@ -17076,25 +20037,31 @@ "style": "simple" }, { - "description": "The Integration's ID.", + "description": "The Message's ID or UID.", "in": "path", - "name": "integ_id", + "name": "msg_id", "required": true, "schema": { - "description": "The Integration's ID.", - "example": "integ_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^integ_[A-Za-z0-9]{27}$", + "description": "The Message's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The MessageAttempt's ID.", + "in": "path", + "name": "attempt_id", + "required": true, "schema": { + "description": "The MessageAttempt's ID.", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^atmpt_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" @@ -17105,7 +20072,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationKeyOut" + "$ref": "#/components/schemas/MessageAttemptOut" } } }, @@ -17187,78 +20154,78 @@ "HTTPBearer": [] } ], - "summary": "Rotate Integration Key", + "summary": "Get Attempt", "tags": [ - "Integration" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const integrationKeyOut = await svix.integration.rotateKey(\"app_id\", \"integ_id\");" + "source": "const messageAttemptOut = await svix.messageAttempt.get(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const integrationKeyOut = await svix.integration.rotateKey(\"app_id\", \"integ_id\");" + "source": "const messageAttemptOut = await svix.messageAttempt.get(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "Python", "lang": "Python", - "source": "integration_key_out = svix.integration.rotate_key(\"app_id\", \"integ_id\", options=...)" + "source": "message_attempt_out = svix.message_attempt.get(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "integration_key_out = await svix.integration.rotate_key(\"app_id\", \"integ_id\", options=...)" + "source": "message_attempt_out = await svix.message_attempt.get(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Go", "lang": "Go", - "source": "integrationKeyOut, err := svixClient.Integration.RotateKey(ctx, \"app_id\", \"integ_id\")" + "source": "messageAttemptOut, err := svixClient.MessageAttempt.Get(ctx, \"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val integrationKeyOut = svix.integration.rotateKey(\"app_id\", \"integ_id\")" + "source": "val messageAttemptOut = svix.messageAttempt.get(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Java", "lang": "Java", - "source": "IntegrationKeyOut integrationKeyOut = svix.getIntegration().rotateKey(\"app_id\", \"integ_id\");" + "source": "MessageAttemptOut messageAttemptOut = svix.getMessageAttempt().get(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "integration_key_out = svix.integration.rotate_key(\"app_id\", \"integ_id\")" + "source": "message_attempt_out = svix.message_attempt.get(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let integration_key_out = svix.integration().rotate_key(\"app_id\", \"integ_id\", None).await?;" + "source": "let message_attempt_out = svix.message_attempt().get(\"app_id\", \"msg_id\", \"attempt_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var integrationKeyOut = await svix.Integration.RotateKeyAsync(\"app_id\", \"integ_id\");" + "source": "var messageAttemptOut = await svix.MessageAttempt.GetAsync(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix integration rotate-key \"app_id\" \"integ_id\"" + "source": "svix message-attempt get \"app_id\" \"msg_id\" \"attempt_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/key/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] } }, - "/api/v1/app/{app_id}/msg": { - "get": { - "description": "List all of the application's messages.\n\nThe `before` and `after` parameters let you filter all items created before or after a certain date. These can be used alongside an iterator to paginate over results\nwithin a certain window.\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.", - "operationId": "v1.message.list", + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content": { + "delete": { + "description": "Deletes the given attempt's response body.\n\nUseful when an endpoint accidentally returned sensitive content.\nThe message can't be replayed or resent once its payload has been deleted or expired.", + "operationId": "v1.message-attempt.expunge-content", "parameters": [ { "description": "The Application's ID or UID.", @@ -17276,126 +20243,39 @@ "style": "simple" }, { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 31, - "minLength": 31, - "nullable": true, - "pattern": "^msg_[A-Za-z0-9]{27}$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the channel.", - "in": "query", - "name": "channel", - "schema": { - "description": "Filter response based on the channel.", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Only include items created before a certain date.", - "in": "query", - "name": "before", - "schema": { - "description": "Only include items created before a certain date.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Only include items created after a certain date.", - "in": "query", - "name": "after", - "schema": { - "description": "Only include items created after a certain date.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "When `true` message payloads are included in the response.", - "in": "query", - "name": "with_content", - "schema": { - "default": true, - "description": "When `true` message payloads are included in the response.", - "type": "boolean" - }, - "style": "form" - }, - { - "description": "Filter messages matching the provided tag.", - "in": "query", - "name": "tag", + "description": "The Message's ID or UID.", + "in": "path", + "name": "msg_id", + "required": true, "schema": { - "description": "Filter messages matching the provided tag.", - "example": "project_1337", - "maxLength": 128, - "nullable": true, + "description": "The Message's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "style": "form" + "style": "simple" }, { - "description": "Filter response based on the event type", - "in": "query", - "name": "event_types", + "description": "The MessageAttempt's ID.", + "in": "path", + "name": "attempt_id", + "required": true, "schema": { - "description": "Filter response based on the event type", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true + "description": "The MessageAttempt's ID.", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^atmpt_[A-Za-z0-9]{27}$", + "type": "string" }, - "style": "form" + "style": "simple" } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResponse_MessageOut_" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -17473,76 +20353,78 @@ "HTTPBearer": [] } ], - "summary": "List Messages", + "summary": "Delete attempt response body", "tags": [ - "Message" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseMessageOut = await svix.message.list(\"app_id\");" + "source": "await svix.messageAttempt.expungeContent(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseMessageOut = await svix.message.list(\"app_id\");" + "source": "await svix.messageAttempt.expungeContent(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_message_out = svix.message.list(\"app_id\", options=...)" + "source": "svix.message_attempt.expunge_content(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_message_out = await svix.message.list(\"app_id\", options=...)" + "source": "await svix.message_attempt.expunge_content(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Go", "lang": "Go", - "source": "listResponseMessageOut, err := svixClient.Message.List(ctx, \"app_id\", nil)" + "source": "err := svixClient.MessageAttempt.ExpungeContent(ctx, \"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseMessageOut = svix.message.list(\"app_id\")" + "source": "svix.messageAttempt.expungeContent(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseMessageOut listResponseMessageOut = svix.getMessage().list(\"app_id\");" + "source": "svix.getMessageAttempt().expungeContent(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_message_out = svix.message.list(\"app_id\")" + "source": "svix.message_attempt.expunge_content(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_message_out = svix.message().list(\"app_id\", None).await?;" + "source": "svix.message_attempt().expunge_content(\"app_id\", \"msg_id\", \"attempt_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseMessageOut = await svix.Message.ListAsync(\"app_id\");" + "source": "await svix.MessageAttempt.ExpungeContentAsync(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message list \"app_id\"" + "source": "svix message-attempt expunge-content \"app_id\" \"msg_id\" \"attempt_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - }, - "post": { - "description": "Creates a new message and dispatches it to all of the application's endpoints.\n\nThe `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made.\nIf a message with the same `eventId` already exists for the application, a 409 conflict error will be returned.\n\nThe `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types.\nMessages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema.\n\nThe `payload` property is the webhook's body (the actual webhook message). Svix supports payload sizes of up to ~350kb, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.", - "operationId": "v1.message.create", + } + }, + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers": { + "get": { + "description": "Calculate and return headers used on a given message attempt", + "operationId": "v1.message-attempt.get-headers", "parameters": [ { "description": "The Application's ID or UID.", @@ -17560,42 +20442,42 @@ "style": "simple" }, { - "description": "When `true`, message payloads are included in the response.", - "in": "query", - "name": "with_content", + "description": "The Message's ID or UID.", + "in": "path", + "name": "msg_id", + "required": true, "schema": { - "default": true, - "description": "When `true`, message payloads are included in the response.", - "type": "boolean" + "description": "The Message's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "style": "form" + "style": "simple" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The MessageAttempt's ID.", + "in": "path", + "name": "attempt_id", + "required": true, "schema": { + "description": "The MessageAttempt's ID.", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^atmpt_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageIn" - } - } - }, - "required": true - }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageOut" + "$ref": "#/components/schemas/MessageAttemptHeadersOut" } } }, @@ -17651,16 +20533,6 @@ }, "description": "Conflict" }, - "413": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Payload too large" - }, "422": { "content": { "application/json": { @@ -17687,78 +20559,79 @@ "HTTPBearer": [] } ], - "summary": "Create Message", + "summary": "Get Attempt Headers", "tags": [ - "Message" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageOut = await svix.message.create(\"app_id\", {\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n channels: [\"project_123\", \"group_2\"],\n application: null,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nconst messageOut = await svix.message.create(\n \"app_id\",\n svix.messageInRaw(\"user.signup\", \"This is a raw body.\", \"text/plain\"),\n);\n" + "source": "const messageAttemptHeadersOut = await svix.messageAttempt.getHeaders(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageOut = await svix.message.create(\"app_id\", {\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n channels: [\"project_123\", \"group_2\"],\n application: null,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nconst messageOut = await svix.message.create(\n \"app_id\",\n svix.messageInRaw(\"user.signup\", \"This is a raw body.\", \"text/plain\"),\n);\n" + "source": "const messageAttemptHeadersOut = await svix.messageAttempt.getHeaders(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "Python", "lang": "Python", - "source": "message_out = svix.message.create(\"app_id\", MessageIn(\n event_id=\"unique-identifier\",\n event_type=\"user.signup\",\n payload={\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n channels=[\"project_123\", \"group_2\"],\n application=None,\n tags=[\"my_tag\", \"other\"],\n transformations_params=None,\n payload_retention_period=90,\n payload_retention_hours=None\n), options=...)\n\n# Alternatively, with a raw string payload.\nmessage_out = svix.message.create(\"app_id\", svix.message_in_raw(\n event_type=\"user.signup\",\n payload=\"This is a raw body.\",\n content_type=\"text/plain\",\n), options=...)\n" + "source": "message_attempt_headers_out = svix.message_attempt.get_headers(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_out = await svix.message.create(\"app_id\", MessageIn(\n event_id=\"unique-identifier\",\n event_type=\"user.signup\",\n payload={\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n channels=[\"project_123\", \"group_2\"],\n application=None,\n tags=[\"my_tag\", \"other\"],\n transformations_params=None,\n payload_retention_period=90,\n payload_retention_hours=None\n), options=...)\n\n# Alternatively, with a raw string payload.\nmessage_out = await svix.message.create(\"app_id\", await svix.message_in_raw(\n event_type=\"user.signup\",\n payload=\"This is a raw body.\",\n content_type=\"text/plain\",\n), options=...)\n" + "source": "message_attempt_headers_out = await svix.message_attempt.get_headers(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Go", "lang": "Go", - "source": "messageOut, err := svixClient.Message.Create(ctx, \"app_id\", &MessageIn{\n EventId: \"unique-identifier\",\n EventType: \"user.signup\",\n Payload: map[string]interface{}{\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n Channels: []string{\"project_123\", \"group_2\"},\n Application: nil,\n Tags: []string{\"my_tag\", \"other\"},\n TransformationsParams: nil,\n PayloadRetentionPeriod: 90,\n PayloadRetentionHours: nil,\n})\n\n// Alternatively, with a raw string payload.\nmessageOut, err := svixClient.Message.Create(ctx, \"app_id\", &svix.NewMessageInRaw(\n \"user.signup\",\n \"This is a raw body.\",\n svix.StaticNullableString(\"text/plain\"),\n))\n" + "source": "messageAttemptHeadersOut, err := svixClient.MessageAttempt.GetHeaders(ctx, \"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageOut = svix.message.create(\"app_id\", MessageIn()\n .eventId(\"unique-identifier\")\n .eventType(\"user.signup\")\n .payload(/* ... */)\n .channels(arrayOf(\"project_123\", \"group_2\"))\n .application(null)\n .tags(arrayOf(\"my_tag\", \"other\"))\n .transformationsParams(null)\n .payloadRetentionPeriod(90)\n .payloadRetentionHours(null)\n)\n\n// Alternatively, with a raw string payload.\nval messageOut = svix.message.create(\"app_id\", svix.messageInRaw(\n eventType = \"user.signup\",\n payload = \"This is a raw body.\",\n contentType = \"text/plain\",\n))\n" + "source": "val messageAttemptHeadersOut = svix.messageAttempt.getHeaders(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Java", "lang": "Java", - "source": "MessageOut messageOut = svix.getMessage().create(\"app_id\", new MessageIn()\n .eventId(\"unique-identifier\")\n .eventType(\"user.signup\")\n .payload(/* ... */)\n .channels(new String[]{\"project_123\", \"group_2\"})\n .application(null)\n .tags(new String[]{\"my_tag\", \"other\"})\n .transformationsParams(null)\n .payloadRetentionPeriod(90)\n .payloadRetentionHours(null)\n);\n\n// Alternatively, with a raw string payload.\nMessageOut messageOut = svix.getMessage().create(\n \"app_id\",\n Message.messageInRaw(\"This is a raw body.\", \"text/plain\")\n .eventType(\"user.signup\")\n);\n" + "source": "MessageAttemptHeadersOut messageAttemptHeadersOut = svix.getMessageAttempt().getHeaders(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_out = svix.message.create(\"app_id\", Svix::MessageIn.new({\n \"event_id\": \"unique-identifier\",\n \"event_type\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": nil,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformations_params\": nil,\n \"payload_retention_period\": 90,\n \"payload_retention_hours\": nil\n}))\n\n# Alternatively, with a raw string payload.\nmessage_out = svix.message.create(\"app_id\", Svix.message_in_raw({\n event_type: \"user.signup\",\n payload: \"This is a raw body.\",\n content_type: \"text/plain\",\n}))\n" + "source": "message_attempt_headers_out = svix.message_attempt.get_headers(\"app_id\", \"msg_id\", \"attempt_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let message_out = svix.message().create(\"app_id\", MessageIn {\n event_id: Some(\"unique-identifier\".to_string()),\n event_type: \"user.signup\".to_string(),\n payload: json!({\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"}),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n application: None,\n tags: Some(vec![\"my_tag\".to_string(), \"other\".to_string()]),\n transformations_params: None,\n payload_retention_period: Some(90),\n payload_retention_hours: None,\n}, None).await?;\n\n// Alternatively, with a raw string payload.\nlet message_out = svix.message().create(\n \"app_id\",\n MessageIn::new_raw_payload(\n \"user.signup\".to_string(),\n \"This is a raw body.\".to_string(),\n ).with_content_type(\"text/plain\".to_string()),\n None,\n).await?;\n" + "source": "let message_attempt_headers_out = svix.message_attempt().get_headers(\"app_id\", \"msg_id\", \"attempt_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageOut = await svix.Message.CreateAsync(\"app_id\", new MessageIn{\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: /* ... */,\n channels: new string[] {\"project_123\", \"group_2\"},\n application: null,\n tags: new string[] {\"my_tag\", \"other\"},\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nvar messageOut = await svix.Message.CreateAsync(\n \"app_id\",\n svix.Message.messageInRaw(\n eventType: \"user.signup\",\n payload: \"This is a raw body.\",\n contentType: \"text/plain\",\n ),\n);\n" + "source": "var messageAttemptHeadersOut = await svix.MessageAttempt.GetHeadersAsync(\"app_id\", \"msg_id\", \"attempt_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message create \"app_id\" '{\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null,\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n}'" + "source": "svix message-attempt get-headers \"app_id\" \"msg_id\" \"attempt_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null,\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n }'\n\n# Alternatively, with a raw string payload.\ncurl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"user.signup\",\n \"payload\": {},\n \"transformationsParams\": {\n \"rawPayload\": \"This is a raw body.\",\n \"headers\": { \"content-type\": \"text/plain\" }\n }\n }'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/msg/expunge-all-contents": { - "post": { - "description": "Purge all message content for the application.\n\nDelete all message payloads for the application.", - "operationId": "v1.message.expunge-all-contents", + "/api/v1/app/{app_id}/msg/{msg_id}/content": { + "delete": { + "description": "Delete the given message's payload.\n\nUseful in cases when a message was accidentally sent with sensitive content.\nThe message can't be replayed or resent once its payload has been deleted or expired.", + "operationId": "v1.message.expunge-content", "parameters": [ { "description": "The Application's ID or UID.", @@ -17776,25 +20649,24 @@ "style": "simple" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Message's ID or UID.", + "in": "path", + "name": "msg_id", + "required": true, "schema": { + "description": "The Message's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], "responses": { - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExpungAllContentsOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -17872,79 +20744,107 @@ "HTTPBearer": [] } ], - "summary": "Expunge all message contents", + "summary": "Delete message payload", "tags": [ - "Application" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const expungAllContentsOut = await svix.message.expungeAllContents(\"app_id\");" + "source": "await svix.message.expungeContent(\"app_id\", \"msg_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const expungAllContentsOut = await svix.message.expungeAllContents(\"app_id\");" + "source": "await svix.message.expungeContent(\"app_id\", \"msg_id\");" }, { "label": "Python", "lang": "Python", - "source": "expung_all_contents_out = svix.message.expunge_all_contents(\"app_id\", options=...)" + "source": "svix.message.expunge_content(\"app_id\", \"msg_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "expung_all_contents_out = await svix.message.expunge_all_contents(\"app_id\", options=...)" + "source": "await svix.message.expunge_content(\"app_id\", \"msg_id\")" }, { "label": "Go", "lang": "Go", - "source": "expungAllContentsOut, err := svixClient.Message.ExpungeAllContents(ctx, \"app_id\")" + "source": "err := svixClient.Message.ExpungeContent(ctx, \"app_id\", \"msg_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val expungAllContentsOut = svix.message.expungeAllContents(\"app_id\")" + "source": "svix.message.expungeContent(\"app_id\", \"msg_id\")" }, { "label": "Java", "lang": "Java", - "source": "ExpungAllContentsOut expungAllContentsOut = svix.getMessage().expungeAllContents(\"app_id\");" + "source": "svix.getMessage().expungeContent(\"app_id\", \"msg_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "expung_all_contents_out = svix.message.expunge_all_contents(\"app_id\")" + "source": "svix.message.expunge_content(\"app_id\", \"msg_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let expung_all_contents_out = svix.message().expunge_all_contents(\"app_id\", None).await?;" + "source": "svix.message().expunge_content(\"app_id\", \"msg_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var expungAllContentsOut = await svix.Message.ExpungeAllContentsAsync(\"app_id\");" + "source": "await svix.Message.ExpungeContentAsync(\"app_id\", \"msg_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message expunge-all-contents \"app_id\"" + "source": "svix message expunge-content \"app_id\" \"msg_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/expunge-all-contents' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/content' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] } }, - "/api/v1/app/{app_id}/msg/precheck/active": { - "post": { - "description": "A pre-check call for `create.message` that checks whether endpoints are actively listening to\nthis message.", - "operationId": "v1.message.precheck", + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint": { + "get": { + "description": "List endpoints attempted by a given message.\n\nAdditionally includes metadata about the latest message attempt.\nBy default, endpoints are listed in ascending order by ID.", + "operationId": "v1.message-attempt.list-attempted-destinations", "parameters": [ + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "nullable": true, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "style": "form" + }, { "description": "The Application's ID or UID.", "in": "path", @@ -17961,31 +20861,27 @@ "style": "simple" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Message's ID or UID.", + "in": "path", + "name": "msg_id", + "required": true, "schema": { + "description": "The Message's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessagePrecheckIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessagePrecheckOut" + "$ref": "#/components/schemas/ListResponse_MessageEndpointOut_" } } }, @@ -18067,79 +20963,78 @@ "HTTPBearer": [] } ], - "summary": "Create Message Precheck", + "summary": "List Attempted Destinations", "tags": [ - "Message" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messagePrecheckOut = await svix.message.precheck(\"app_id\", {\n eventType: \"user.signup\",\n channels: [\"project_123\", \"group_2\"]\n});" + "source": "const listResponseMessageEndpointOut = await svix.messageAttempt.listAttemptedDestinations(\"app_id\", \"msg_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messagePrecheckOut = await svix.message.precheck(\"app_id\", {\n eventType: \"user.signup\",\n channels: [\"project_123\", \"group_2\"]\n});" + "source": "const listResponseMessageEndpointOut = await svix.messageAttempt.listAttemptedDestinations(\"app_id\", \"msg_id\");" }, { "label": "Python", "lang": "Python", - "source": "message_precheck_out = svix.message.precheck(\"app_id\", MessagePrecheckIn(\n event_type=\"user.signup\",\n channels=[\"project_123\", \"group_2\"]\n), options=...)" + "source": "list_response_message_endpoint_out = svix.message_attempt.list_attempted_destinations(\"app_id\", \"msg_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_precheck_out = await svix.message.precheck(\"app_id\", MessagePrecheckIn(\n event_type=\"user.signup\",\n channels=[\"project_123\", \"group_2\"]\n), options=...)" + "source": "list_response_message_endpoint_out = await svix.message_attempt.list_attempted_destinations(\"app_id\", \"msg_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "messagePrecheckOut, err := svixClient.Message.Precheck(ctx, \"app_id\", &MessagePrecheckIn{\n EventType: \"user.signup\",\n Channels: []string{\"project_123\", \"group_2\"},\n})" + "source": "listResponseMessageEndpointOut, err := svixClient.MessageAttempt.ListAttemptedDestinations(ctx, \"app_id\", \"msg_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messagePrecheckOut = svix.message.precheck(\"app_id\", MessagePrecheckIn()\n .eventType(\"user.signup\")\n .channels(arrayOf(\"project_123\", \"group_2\"))\n)" + "source": "val listResponseMessageEndpointOut = svix.messageAttempt.listAttemptedDestinations(\"app_id\", \"msg_id\")" }, { "label": "Java", "lang": "Java", - "source": "MessagePrecheckOut messagePrecheckOut = svix.getMessage().precheck(\"app_id\", new MessagePrecheckIn()\n .eventType(\"user.signup\")\n .channels(new String[]{\"project_123\", \"group_2\"})\n);" + "source": "ListResponseMessageEndpointOut listResponseMessageEndpointOut = svix.getMessageAttempt().listAttemptedDestinations(\"app_id\", \"msg_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_precheck_out = svix.message.precheck(\"app_id\", Svix::MessagePrecheckIn.new({\n \"event_type\": \"user.signup\",\n \"channels\": [\"project_123\", \"group_2\"]\n}))" + "source": "list_response_message_endpoint_out = svix.message_attempt.list_attempted_destinations(\"app_id\", \"msg_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let message_precheck_out = svix.message().precheck(\"app_id\", MessagePrecheckIn {\n event_type: \"user.signup\".to_string(),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n}, None).await?;" + "source": "let list_response_message_endpoint_out = svix.message_attempt().list_attempted_destinations(\"app_id\", \"msg_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var messagePrecheckOut = await svix.Message.PrecheckAsync(\"app_id\", new MessagePrecheckIn{\n eventType: \"user.signup\",\n channels: new string[] {\"project_123\", \"group_2\"}\n});" + "source": "var listResponseMessageEndpointOut = await svix.MessageAttempt.ListAttemptedDestinationsAsync(\"app_id\", \"msg_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message precheck \"app_id\" '{\n \"eventType\": \"user.signup\",\n \"channels\": [\"project_123\", \"group_2\"]\n}'" + "source": "svix message-attempt list-attempted-destinations \"app_id\" \"msg_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/precheck/active' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventType\": \"user.signup\",\n \"channels\": [\"project_123\", \"group_2\"]\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}": { - "get": { - "description": "Get a message by its ID or eventID.", - "operationId": "v1.message.get", + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend": { + "post": { + "description": "Resend a message to the specified endpoint.", + "operationId": "v1.message-attempt.resend", "parameters": [ { "description": "The Application's ID or UID.", @@ -18172,27 +21067,33 @@ "style": "simple" }, { - "description": "When `true` message payloads are included in the response.", - "in": "query", - "name": "with_content", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { - "default": true, - "description": "When `true` message payloads are included in the response.", - "type": "boolean" + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "style": "form" + "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageOut" - } - } - }, - "description": "" + "202": { + "description": "no content" }, "400": { "content": { @@ -18270,78 +21171,78 @@ "HTTPBearer": [] } ], - "summary": "Get Message", + "summary": "Resend Webhook", "tags": [ - "Message" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageOut = await svix.message.get(\"app_id\", \"msg_id\");" + "source": "await svix.messageAttempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageOut = await svix.message.get(\"app_id\", \"msg_id\");" + "source": "await svix.messageAttempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "message_out = svix.message.get(\"app_id\", \"msg_id\")" + "source": "svix.message_attempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_out = await svix.message.get(\"app_id\", \"msg_id\")" + "source": "await svix.message_attempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "messageOut, err := svixClient.Message.Get(ctx, \"app_id\", \"msg_id\")" + "source": "err := svixClient.MessageAttempt.Resend(ctx, \"app_id\", \"msg_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageOut = svix.message.get(\"app_id\", \"msg_id\")" + "source": "svix.messageAttempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "MessageOut messageOut = svix.getMessage().get(\"app_id\", \"msg_id\");" + "source": "svix.getMessageAttempt().resend(\"app_id\", \"msg_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_out = svix.message.get(\"app_id\", \"msg_id\")" + "source": "svix.message_attempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let message_out = svix.message().get(\"app_id\", \"msg_id\").await?;" + "source": "svix.message_attempt().resend(\"app_id\", \"msg_id\", \"endpoint_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageOut = await svix.Message.GetAsync(\"app_id\", \"msg_id\");" + "source": "await svix.MessageAttempt.ResendAsync(\"app_id\", \"msg_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message get \"app_id\" \"msg_id\"" + "source": "svix message-attempt resend \"app_id\" \"msg_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}": { + "/api/v1/app/{app_id}/msg/{msg_id}/raw": { "get": { - "description": "`msg_id`: Use a message id or a message `eventId`", - "operationId": "v1.message-attempt.get", + "description": "Get a message raw payload by its ID or eventID.", + "operationId": "v1.message.get-raw-payload", "parameters": [ { "description": "The Application's ID or UID.", @@ -18372,21 +21273,6 @@ "type": "string" }, "style": "simple" - }, - { - "description": "The MessageAttempt's ID.", - "in": "path", - "name": "attempt_id", - "required": true, - "schema": { - "description": "The MessageAttempt's ID.", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^atmpt_[A-Za-z0-9]{27}$", - "type": "string" - }, - "style": "simple" } ], "responses": { @@ -18394,7 +21280,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageAttemptOut" + "$ref": "#/components/schemas/MessageRawPayloadOut" } } }, @@ -18476,78 +21362,79 @@ "HTTPBearer": [] } ], - "summary": "Get Attempt", + "summary": "Get Raw Message Payload", "tags": [ - "Message Attempt" + "Message" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageAttemptOut = await svix.messageAttempt.get(\"app_id\", \"msg_id\", \"attempt_id\");" + "source": "const messageRawPayloadOut = await svix.message.getRawPayload(\"app_id\", \"msg_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageAttemptOut = await svix.messageAttempt.get(\"app_id\", \"msg_id\", \"attempt_id\");" + "source": "const messageRawPayloadOut = await svix.message.getRawPayload(\"app_id\", \"msg_id\");" }, { "label": "Python", "lang": "Python", - "source": "message_attempt_out = svix.message_attempt.get(\"app_id\", \"msg_id\", \"attempt_id\")" + "source": "message_raw_payload_out = svix.message.get_raw_payload(\"app_id\", \"msg_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_attempt_out = await svix.message_attempt.get(\"app_id\", \"msg_id\", \"attempt_id\")" + "source": "message_raw_payload_out = await svix.message.get_raw_payload(\"app_id\", \"msg_id\")" }, { "label": "Go", "lang": "Go", - "source": "messageAttemptOut, err := svixClient.MessageAttempt.Get(ctx, \"app_id\", \"msg_id\", \"attempt_id\")" + "source": "messageRawPayloadOut, err := svixClient.Message.GetRawPayload(ctx, \"app_id\", \"msg_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageAttemptOut = svix.messageAttempt.get(\"app_id\", \"msg_id\", \"attempt_id\")" + "source": "val messageRawPayloadOut = svix.message.getRawPayload(\"app_id\", \"msg_id\")" }, { "label": "Java", "lang": "Java", - "source": "MessageAttemptOut messageAttemptOut = svix.getMessageAttempt().get(\"app_id\", \"msg_id\", \"attempt_id\");" + "source": "MessageRawPayloadOut messageRawPayloadOut = svix.getMessage().getRawPayload(\"app_id\", \"msg_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_attempt_out = svix.message_attempt.get(\"app_id\", \"msg_id\", \"attempt_id\")" + "source": "message_raw_payload_out = svix.message.get_raw_payload(\"app_id\", \"msg_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let message_attempt_out = svix.message_attempt().get(\"app_id\", \"msg_id\", \"attempt_id\").await?;" + "source": "let message_raw_payload_out = svix.message().get_raw_payload(\"app_id\", \"msg_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageAttemptOut = await svix.MessageAttempt.GetAsync(\"app_id\", \"msg_id\", \"attempt_id\");" + "source": "var messageRawPayloadOut = await svix.Message.GetRawPayloadAsync(\"app_id\", \"msg_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message-attempt get \"app_id\" \"msg_id\" \"attempt_id\"" + "source": "svix message get-raw-payload \"app_id\" \"msg_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/raw' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content": { - "delete": { - "description": "Deletes the given attempt's response body.\n\nUseful when an endpoint accidentally returned sensitive content.\nThe message can't be replayed or resent once its payload has been deleted or expired.", - "operationId": "v1.message-attempt.expunge-content", + "/api/v1/app/{app_id}/poller/{sink_id}": { + "get": { + "description": "Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.", + "operationId": "v1.events-public", "parameters": [ { "description": "The Application's ID or UID.", @@ -18565,12 +21452,12 @@ "style": "simple" }, { - "description": "The Message's ID or UID.", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "msg_id", + "name": "sink_id", "required": true, "schema": { - "description": "The Message's ID or UID.", + "description": "The Endpoint's ID or UID.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -18580,24 +21467,78 @@ "style": "simple" }, { - "description": "The MessageAttempt's ID.", - "in": "path", - "name": "attempt_id", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The MessageAttempt's ID.", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^atmpt_[A-Za-z0-9]{27}$", + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "nullable": true, "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "Filters messages sent with this event type (optional).", + "in": "query", + "name": "event_type", + "schema": { + "description": "Filters messages sent with this event type (optional).", + "example": "user.signup", + "maxLength": 256, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filters messages sent with this channel (optional).", + "in": "query", + "name": "channel", + "schema": { + "description": "Filters messages sent with this channel (optional).", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "after", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" } ], "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PollingEndpointOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -18675,78 +21616,24 @@ "HTTPBearer": [] } ], - "summary": "Delete attempt response body", + "summary": "Public Events", "tags": [ - "Message Attempt" + "Message" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "await svix.messageAttempt.expungeContent(\"app_id\", \"msg_id\", \"attempt_id\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "await svix.messageAttempt.expungeContent(\"app_id\", \"msg_id\", \"attempt_id\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "svix.message_attempt.expunge_content(\"app_id\", \"msg_id\", \"attempt_id\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "await svix.message_attempt.expunge_content(\"app_id\", \"msg_id\", \"attempt_id\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "err := svixClient.MessageAttempt.ExpungeContent(ctx, \"app_id\", \"msg_id\", \"attempt_id\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "svix.messageAttempt.expungeContent(\"app_id\", \"msg_id\", \"attempt_id\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "svix.getMessageAttempt().expungeContent(\"app_id\", \"msg_id\", \"attempt_id\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "svix.message_attempt.expunge_content(\"app_id\", \"msg_id\", \"attempt_id\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "svix.message_attempt().expunge_content(\"app_id\", \"msg_id\", \"attempt_id\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "await svix.MessageAttempt.ExpungeContentAsync(\"app_id\", \"msg_id\", \"attempt_id\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix message-attempt expunge-content \"app_id\" \"msg_id\" \"attempt_id\"" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/poller/{sink_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers": { + "/api/v1/app/{app_id}/sink": { "get": { - "description": "Calculate and return headers used on a given message attempt", - "operationId": "v1.message-attempt.get-headers", + "description": "List the application's sinks.", + "operationId": "v1.sink.list", "parameters": [ { "description": "The Application's ID or UID.", @@ -18764,34 +21651,43 @@ "style": "simple" }, { - "description": "The Message's ID or UID.", - "in": "path", - "name": "msg_id", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The Message's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" }, - "style": "simple" + "style": "form" }, { - "description": "The MessageAttempt's ID.", - "in": "path", - "name": "attempt_id", - "required": true, + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", "schema": { - "description": "The MessageAttempt's ID.", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^atmpt_[A-Za-z0-9]{27}$", + "description": "The iterator returned from a prior invocation", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "nullable": true, + "pattern": "^ep_[A-Za-z0-9]{27}$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], "responses": { @@ -18799,7 +21695,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageAttemptHeadersOut" + "$ref": "#/components/schemas/ListResponse_SinkOut_" } } }, @@ -18881,79 +21777,77 @@ "HTTPBearer": [] } ], - "summary": "Get Attempt Headers", + "summary": "List Sinks", "tags": [ - "Message Attempt" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageAttemptHeadersOut = await svix.messageAttempt.getHeaders(\"app_id\", \"msg_id\", \"attempt_id\");" + "source": "const listResponseSinkOut = await svix.sink.list(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageAttemptHeadersOut = await svix.messageAttempt.getHeaders(\"app_id\", \"msg_id\", \"attempt_id\");" + "source": "const listResponseSinkOut = await svix.sink.list(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "message_attempt_headers_out = svix.message_attempt.get_headers(\"app_id\", \"msg_id\", \"attempt_id\")" + "source": "list_response_sink_out = svix.sink.list(\"app_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_attempt_headers_out = await svix.message_attempt.get_headers(\"app_id\", \"msg_id\", \"attempt_id\")" + "source": "list_response_sink_out = await svix.sink.list(\"app_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "messageAttemptHeadersOut, err := svixClient.MessageAttempt.GetHeaders(ctx, \"app_id\", \"msg_id\", \"attempt_id\")" + "source": "listResponseSinkOut, err := svixClient.Sink.List(ctx, \"app_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageAttemptHeadersOut = svix.messageAttempt.getHeaders(\"app_id\", \"msg_id\", \"attempt_id\")" + "source": "val listResponseSinkOut = svix.sink.list(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "MessageAttemptHeadersOut messageAttemptHeadersOut = svix.getMessageAttempt().getHeaders(\"app_id\", \"msg_id\", \"attempt_id\");" + "source": "ListResponseSinkOut listResponseSinkOut = svix.getSink().list(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_attempt_headers_out = svix.message_attempt.get_headers(\"app_id\", \"msg_id\", \"attempt_id\")" + "source": "list_response_sink_out = svix.sink.list(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let message_attempt_headers_out = svix.message_attempt().get_headers(\"app_id\", \"msg_id\", \"attempt_id\").await?;" + "source": "let list_response_sink_out = svix.sink().list(\"app_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageAttemptHeadersOut = await svix.MessageAttempt.GetHeadersAsync(\"app_id\", \"msg_id\", \"attempt_id\");" + "source": "var listResponseSinkOut = await svix.Sink.ListAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message-attempt get-headers \"app_id\" \"msg_id\" \"attempt_id\"" + "source": "svix sink list \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/sink' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true - } - }, - "/api/v1/app/{app_id}/msg/{msg_id}/content": { - "delete": { - "description": "Delete the given message's payload.\n\nUseful in cases when a message was accidentally sent with sensitive content.\nThe message can't be replayed or resent once its payload has been deleted or expired.", - "operationId": "v1.message.expunge-content", + }, + "post": { + "description": "Create a new sink for the application.", + "operationId": "v1.sink.create", "parameters": [ { "description": "The Application's ID or UID.", @@ -18971,24 +21865,35 @@ "style": "simple" }, { - "description": "The Message's ID or UID.", - "in": "path", - "name": "msg_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Message's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SinkIn" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "no content" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SinkOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -19066,107 +21971,80 @@ "HTTPBearer": [] } ], - "summary": "Delete message payload", + "summary": "Create Sink", "tags": [ - "Message" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.message.expungeContent(\"app_id\", \"msg_id\");" + "source": "const sinkOut = await svix.sink.create(\"app_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"]\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.message.expungeContent(\"app_id\", \"msg_id\");" + "source": "const sinkOut = await svix.sink.create(\"app_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"]\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.message.expunge_content(\"app_id\", \"msg_id\")" + "source": "sink_out = svix.sink.create(\"app_id\", SinkIn(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"]\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.message.expunge_content(\"app_id\", \"msg_id\")" + "source": "sink_out = await svix.sink.create(\"app_id\", SinkIn(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"]\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Message.ExpungeContent(ctx, \"app_id\", \"msg_id\")" + "source": "sinkOut, err := svixClient.Sink.Create(ctx, \"app_id\", &SinkIn{\n Description: \"An example endpoint name\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n Secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n Disabled: false,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n Channels: []string{\"project_123\", \"group_2\"},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.message.expungeContent(\"app_id\", \"msg_id\")" + "source": "val sinkOut = svix.sink.create(\"app_id\", SinkIn()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n .disabled(false)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .channels(arrayOf(\"project_123\", \"group_2\"))\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getMessage().expungeContent(\"app_id\", \"msg_id\");" + "source": "SinkOut sinkOut = svix.getSink().create(\"app_id\", new SinkIn()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n .disabled(false)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .channels(new String[]{\"project_123\", \"group_2\"})\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.message.expunge_content(\"app_id\", \"msg_id\")" + "source": "sink_out = svix.sink.create(\"app_id\", Svix::SinkIn.new({\n \"description\": \"An example endpoint name\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\",\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"disabled\": false,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.message().expunge_content(\"app_id\", \"msg_id\").await?;" + "source": "let sink_out = svix.sink().create(\"app_id\", SinkIn {\n description: Some(\"An example endpoint name\".to_string()),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n secret: Some(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\".to_string()),\n disabled: Some(false),\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Message.ExpungeContentAsync(\"app_id\", \"msg_id\");" + "source": "var sinkOut = await svix.Sink.CreateAsync(\"app_id\", new SinkIn{\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled: false,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n channels: new string[] {\"project_123\", \"group_2\"}\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix message expunge-content \"app_id\" \"msg_id\"" + "source": "svix sink create \"app_id\" '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/content' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/sink' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n }'" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/msg/{msg_id}/endpoint": { + "/api/v1/app/{app_id}/sink/{sink_id}": { "get": { - "description": "List endpoints attempted by a given message.\n\nAdditionally includes metadata about the latest message attempt.\nBy default, endpoints are listed in ascending order by ID.", - "operationId": "v1.message-attempt.list-attempted-destinations", + "description": "Get a sink.", + "operationId": "v1.sink.get", "parameters": [ - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "nullable": true, - "pattern": "^ep_[A-Za-z0-9]{27}$", - "type": "string" - }, - "style": "form" - }, { "description": "The Application's ID or UID.", "in": "path", @@ -19183,12 +22061,12 @@ "style": "simple" }, { - "description": "The Message's ID or UID.", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "msg_id", + "name": "sink_id", "required": true, "schema": { - "description": "The Message's ID or UID.", + "description": "The Endpoint's ID or UID.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -19203,7 +22081,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_MessageEndpointOut_" + "$ref": "#/components/schemas/SinkOut" } } }, @@ -19285,116 +22163,111 @@ "HTTPBearer": [] } ], - "summary": "List Attempted Destinations", + "summary": "Get Sink", "tags": [ - "Message Attempt" + "Endpoint" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseMessageEndpointOut = await svix.messageAttempt.listAttemptedDestinations(\"app_id\", \"msg_id\");" + "source": "const sinkOut = await svix.sink.get(\"app_id\", \"sink_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseMessageEndpointOut = await svix.messageAttempt.listAttemptedDestinations(\"app_id\", \"msg_id\");" + "source": "const sinkOut = await svix.sink.get(\"app_id\", \"sink_id\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_message_endpoint_out = svix.message_attempt.list_attempted_destinations(\"app_id\", \"msg_id\", options=...)" + "source": "sink_out = svix.sink.get(\"app_id\", \"sink_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_message_endpoint_out = await svix.message_attempt.list_attempted_destinations(\"app_id\", \"msg_id\", options=...)" + "source": "sink_out = await svix.sink.get(\"app_id\", \"sink_id\")" }, { "label": "Go", "lang": "Go", - "source": "listResponseMessageEndpointOut, err := svixClient.MessageAttempt.ListAttemptedDestinations(ctx, \"app_id\", \"msg_id\", nil)" + "source": "sinkOut, err := svixClient.Sink.Get(ctx, \"app_id\", \"sink_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseMessageEndpointOut = svix.messageAttempt.listAttemptedDestinations(\"app_id\", \"msg_id\")" + "source": "val sinkOut = svix.sink.get(\"app_id\", \"sink_id\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseMessageEndpointOut listResponseMessageEndpointOut = svix.getMessageAttempt().listAttemptedDestinations(\"app_id\", \"msg_id\");" + "source": "SinkOut sinkOut = svix.getSink().get(\"app_id\", \"sink_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_message_endpoint_out = svix.message_attempt.list_attempted_destinations(\"app_id\", \"msg_id\")" + "source": "sink_out = svix.sink.get(\"app_id\", \"sink_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_message_endpoint_out = svix.message_attempt().list_attempted_destinations(\"app_id\", \"msg_id\", None).await?;" + "source": "let sink_out = svix.sink().get(\"app_id\", \"sink_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseMessageEndpointOut = await svix.MessageAttempt.ListAttemptedDestinationsAsync(\"app_id\", \"msg_id\");" + "source": "var sinkOut = await svix.Sink.GetAsync(\"app_id\", \"sink_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message-attempt list-attempted-destinations \"app_id\" \"msg_id\"" + "source": "svix sink get \"app_id\" \"sink_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/sink/{sink_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend": { - "post": { - "description": "Resend a message to the specified endpoint.", - "operationId": "v1.message-attempt.resend", + "/api/v1/app/{app_id}/stats": { + "get": { + "description": "Get basic statistics for the application.", + "operationId": "v1.application.get-stats", "parameters": [ { - "description": "The Application's ID or UID.", - "in": "path", - "name": "app_id", + "description": "Filter the range to data starting from this date.", + "in": "query", + "name": "since", "required": true, "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "Filter the range to data starting from this date.", + "format": "date-time", "type": "string" }, - "style": "simple" + "style": "form" }, { - "description": "The Message's ID or UID.", - "in": "path", - "name": "msg_id", + "description": "Filter the range to data ending by this date.", + "in": "query", + "name": "until", "required": true, "schema": { - "description": "The Message's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "Filter the range to data ending by this date.", + "format": "date-time", "type": "string" }, - "style": "simple" + "style": "form" }, { - "description": "The Endpoint's ID or UID.", + "description": "The Application's ID or UID.", "in": "path", - "name": "endpoint_id", + "name": "app_id", "required": true, "schema": { - "description": "The Endpoint's ID or UID.", + "description": "The Application's ID or UID.", "example": "unique-identifier", "maxLength": 256, "minLength": 1, @@ -19402,20 +22275,18 @@ "type": "string" }, "style": "simple" - }, - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { - "type": "string" - }, - "style": "simple" } ], "responses": { - "202": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationStats" + } + } + }, + "description": "" }, "400": { "content": { @@ -19493,78 +22364,79 @@ "HTTPBearer": [] } ], - "summary": "Resend Webhook", + "summary": "Get App Stats", "tags": [ - "Message Attempt" + "Application" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.messageAttempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\");" + "source": "const applicationStats = await svix.application.getStats(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.messageAttempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\");" + "source": "const applicationStats = await svix.application.getStats(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "svix.message_attempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\", options=...)" + "source": "application_stats = svix.application.get_stats(\"app_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.message_attempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\", options=...)" + "source": "application_stats = await svix.application.get_stats(\"app_id\")" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.MessageAttempt.Resend(ctx, \"app_id\", \"msg_id\", \"endpoint_id\")" + "source": "applicationStats, err := svixClient.Application.GetStats(ctx, \"app_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.messageAttempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\")" + "source": "val applicationStats = svix.application.getStats(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "svix.getMessageAttempt().resend(\"app_id\", \"msg_id\", \"endpoint_id\");" + "source": "ApplicationStats applicationStats = svix.getApplication().getStats(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.message_attempt.resend(\"app_id\", \"msg_id\", \"endpoint_id\")" + "source": "application_stats = svix.application.get_stats(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "svix.message_attempt().resend(\"app_id\", \"msg_id\", \"endpoint_id\", None).await?;" + "source": "let application_stats = svix.application().get_stats(\"app_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.MessageAttempt.ResendAsync(\"app_id\", \"msg_id\", \"endpoint_id\");" + "source": "var applicationStats = await svix.Application.GetStatsAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix message-attempt resend \"app_id\" \"msg_id\" \"endpoint_id\"" + "source": "svix application get-stats \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/stats' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/app/{app_id}/msg/{msg_id}/raw": { - "get": { - "description": "Get a message raw payload by its ID or eventID.", - "operationId": "v1.message.get-raw-payload", + "/api/v1/auth/app-portal-access/{app_id}": { + "post": { + "description": "Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.", + "operationId": "v1.authentication.app-portal-access", "parameters": [ { "description": "The Application's ID or UID.", @@ -19582,27 +22454,31 @@ "style": "simple" }, { - "description": "The Message's ID or UID.", - "in": "path", - "name": "msg_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Message's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppPortalAccessIn" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageRawPayloadOut" + "$ref": "#/components/schemas/AppPortalAccessOut" } } }, @@ -19684,79 +22560,78 @@ "HTTPBearer": [] } ], - "summary": "Get Raw Message Payload", + "summary": "Get Consumer App Portal Access", "tags": [ - "Message" + "Authentication" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageRawPayloadOut = await svix.message.getRawPayload(\"app_id\", \"msg_id\");" + "source": "const appPortalAccessOut = await svix.authentication.appPortalAccess(\"app_id\", {\n application: null,\n featureFlags: [],\n expiry: null,\n readOnly: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageRawPayloadOut = await svix.message.getRawPayload(\"app_id\", \"msg_id\");" + "source": "const appPortalAccessOut = await svix.authentication.appPortalAccess(\"app_id\", {\n application: null,\n featureFlags: [],\n expiry: null,\n readOnly: null\n});" }, { "label": "Python", "lang": "Python", - "source": "message_raw_payload_out = svix.message.get_raw_payload(\"app_id\", \"msg_id\")" + "source": "app_portal_access_out = svix.authentication.app_portal_access(\"app_id\", AppPortalAccessIn(\n application=None,\n feature_flags=[],\n expiry=None,\n read_only=None\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_raw_payload_out = await svix.message.get_raw_payload(\"app_id\", \"msg_id\")" + "source": "app_portal_access_out = await svix.authentication.app_portal_access(\"app_id\", AppPortalAccessIn(\n application=None,\n feature_flags=[],\n expiry=None,\n read_only=None\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "messageRawPayloadOut, err := svixClient.Message.GetRawPayload(ctx, \"app_id\", \"msg_id\")" + "source": "appPortalAccessOut, err := svixClient.Authentication.AppPortalAccess(ctx, \"app_id\", &AppPortalAccessIn{\n Application: nil,\n FeatureFlags: []interface{}{},\n Expiry: nil,\n ReadOnly: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageRawPayloadOut = svix.message.getRawPayload(\"app_id\", \"msg_id\")" + "source": "val appPortalAccessOut = svix.authentication.appPortalAccess(\"app_id\", AppPortalAccessIn()\n .application(null)\n .featureFlags(arrayOf())\n .expiry(null)\n .readOnly(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "MessageRawPayloadOut messageRawPayloadOut = svix.getMessage().getRawPayload(\"app_id\", \"msg_id\");" + "source": "AppPortalAccessOut appPortalAccessOut = svix.getAuthentication().appPortalAccess(\"app_id\", new AppPortalAccessIn()\n .application(null)\n .featureFlags(new Object[]{})\n .expiry(null)\n .readOnly(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_raw_payload_out = svix.message.get_raw_payload(\"app_id\", \"msg_id\")" + "source": "app_portal_access_out = svix.authentication.app_portal_access(\"app_id\", Svix::AppPortalAccessIn.new({\n \"application\": nil,\n \"feature_flags\": [],\n \"expiry\": nil,\n \"read_only\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let message_raw_payload_out = svix.message().get_raw_payload(\"app_id\", \"msg_id\").await?;" + "source": "let app_portal_access_out = svix.authentication().app_portal_access(\"app_id\", AppPortalAccessIn {\n application: None,\n feature_flags: Some(vec![]),\n expiry: None,\n read_only: None,\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var messageRawPayloadOut = await svix.Message.GetRawPayloadAsync(\"app_id\", \"msg_id\");" + "source": "var appPortalAccessOut = await svix.Authentication.AppPortalAccessAsync(\"app_id\", new AppPortalAccessIn{\n application: null,\n featureFlags: new Object[] {},\n expiry: null,\n readOnly: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix message get-raw-payload \"app_id\" \"msg_id\"" + "source": "svix authentication app-portal-access \"app_id\" '{\n \"application\": null,\n \"featureFlags\": [],\n \"expiry\": null,\n \"readOnly\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/raw' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app-portal-access/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"application\": null,\n \"featureFlags\": [],\n \"expiry\": null,\n \"readOnly\": null\n }'" } - ], - "x-hidden": true + ] } }, - "/api/v1/app/{app_id}/poller/{sink_id}": { - "get": { - "description": "Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.", - "operationId": "v1.events-public", + "/api/v1/auth/app/{app_id}/create-message-token": { + "post": { + "description": "Create a new access token that only allows creating messages inside this application.", + "operationId": "v1.authentication.create-message-token", "parameters": [ { "description": "The Application's ID or UID.", @@ -19774,89 +22649,31 @@ "style": "simple" }, { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "sink_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" - }, - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Filters messages sent with this event type (optional).", - "in": "query", - "name": "event_type", - "schema": { - "description": "Filters messages sent with this event type (optional).", - "example": "user.signup", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filters messages sent with this channel (optional).", - "in": "query", - "name": "channel", - "schema": { - "description": "Filters messages sent with this channel (optional).", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "after", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTokenIn" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollingEndpointOut" + "$ref": "#/components/schemas/AuthTokenOut" } } }, @@ -19938,24 +22755,79 @@ "HTTPBearer": [] } ], - "summary": "Public Events", + "summary": "Create Cmg Token", "tags": [ - "Message" + "Authentication" ], "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const authTokenOut = await svix.authentication.createMessageToken(\"app_id\", {\n expiry: null\n});" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const authTokenOut = await svix.authentication.createMessageToken(\"app_id\", {\n expiry: null\n});" + }, + { + "label": "Python", + "lang": "Python", + "source": "auth_token_out = svix.authentication.create_message_token(\"app_id\", CreateTokenIn(\n expiry=None\n), options=...)" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "auth_token_out = await svix.authentication.create_message_token(\"app_id\", CreateTokenIn(\n expiry=None\n), options=...)" + }, + { + "label": "Go", + "lang": "Go", + "source": "authTokenOut, err := svixClient.Authentication.CreateMessageToken(ctx, \"app_id\", &CreateTokenIn{\n Expiry: nil,\n})" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val authTokenOut = svix.authentication.createMessageToken(\"app_id\", CreateTokenIn()\n .expiry(null)\n)" + }, + { + "label": "Java", + "lang": "Java", + "source": "AuthTokenOut authTokenOut = svix.getAuthentication().createMessageToken(\"app_id\", new CreateTokenIn()\n .expiry(null)\n);" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "auth_token_out = svix.authentication.create_message_token(\"app_id\", Svix::CreateTokenIn.new({\n \"expiry\": nil\n}))" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let auth_token_out = svix.authentication().create_message_token(\"app_id\", CreateTokenIn {\n expiry: None,\n}, None).await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var authTokenOut = await svix.Authentication.CreateMessageTokenAsync(\"app_id\", new CreateTokenIn{\n expiry: null\n});" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix authentication create-message-token \"app_id\" '{\n \"expiry\": null\n}'" + }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/poller/{sink_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/create-message-token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"expiry\": null\n }'" } ], "x-hidden": true } }, - "/api/v1/app/{app_id}/sink": { - "get": { - "description": "List the application's sinks.", - "operationId": "v1.sink.list", + "/api/v1/auth/app/{app_id}/expire-all": { + "post": { + "description": "Expire all of the tokens associated with a specific application.", + "operationId": "v1.authentication.expire-all", "parameters": [ { "description": "The Application's ID or UID.", @@ -19970,58 +22842,31 @@ "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "style": "simple" - }, - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "nullable": true, - "pattern": "^ep_[A-Za-z0-9]{27}$", - "type": "string" - }, - "style": "form" + "style": "simple" }, { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true + "type": "string" }, - "style": "form" + "style": "simple" } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResponse_SinkOut_" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationTokenExpireIn" } - }, - "description": "" + } + }, + "required": true + }, + "responses": { + "204": { + "description": "no content" }, "400": { "content": { @@ -20099,77 +22944,78 @@ "HTTPBearer": [] } ], - "summary": "List Sinks", + "summary": "Expire All", "tags": [ - "Endpoint" + "Authentication" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseSinkOut = await svix.sink.list(\"app_id\");" + "source": "await svix.authentication.expireAll(\"app_id\", {\n expiry: 60\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseSinkOut = await svix.sink.list(\"app_id\");" + "source": "await svix.authentication.expireAll(\"app_id\", {\n expiry: 60\n});" }, { "label": "Python", "lang": "Python", - "source": "list_response_sink_out = svix.sink.list(\"app_id\", options=...)" + "source": "svix.authentication.expire_all(\"app_id\", ApplicationTokenExpireIn(\n expiry=60\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_sink_out = await svix.sink.list(\"app_id\", options=...)" + "source": "await svix.authentication.expire_all(\"app_id\", ApplicationTokenExpireIn(\n expiry=60\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "listResponseSinkOut, err := svixClient.Sink.List(ctx, \"app_id\", nil)" + "source": "err := svixClient.Authentication.ExpireAll(ctx, \"app_id\", &ApplicationTokenExpireIn{\n Expiry: 60,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseSinkOut = svix.sink.list(\"app_id\")" + "source": "svix.authentication.expireAll(\"app_id\", ApplicationTokenExpireIn()\n .expiry(60)\n)" }, { "label": "Java", "lang": "Java", - "source": "ListResponseSinkOut listResponseSinkOut = svix.getSink().list(\"app_id\");" + "source": "svix.getAuthentication().expireAll(\"app_id\", new ApplicationTokenExpireIn()\n .expiry(60)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_sink_out = svix.sink.list(\"app_id\")" + "source": "svix.authentication.expire_all(\"app_id\", Svix::ApplicationTokenExpireIn.new({\n \"expiry\": 60\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_sink_out = svix.sink().list(\"app_id\", None).await?;" + "source": "svix.authentication().expire_all(\"app_id\", ApplicationTokenExpireIn {\n expiry: Some(60),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseSinkOut = await svix.Sink.ListAsync(\"app_id\");" + "source": "await svix.Authentication.ExpireAllAsync(\"app_id\", new ApplicationTokenExpireIn{\n expiry: 60\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix sink list \"app_id\"" + "source": "svix authentication expire-all \"app_id\" '{\n \"expiry\": 60\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/sink' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/expire-all' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"expiry\": 60\n }'" } - ], - "x-hidden": true - }, - "post": { - "description": "Create a new sink for the application.", - "operationId": "v1.sink.create", + ] + } + }, + "/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token": { + "get": { + "description": "Get the current auth token for the poller.", + "operationId": "v1.authentication.get-poller-token", "parameters": [ { "description": "The Application's ID or UID.", @@ -20187,31 +23033,27 @@ "style": "simple" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SinkIn" - } - } - }, - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SinkOut" + "$ref": "#/components/schemas/AuthTokenOut" } } }, @@ -20293,79 +23135,79 @@ "HTTPBearer": [] } ], - "summary": "Create Sink", + "summary": "Get Poller Token", "tags": [ - "Endpoint" + "Authentication" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const sinkOut = await svix.sink.create(\"app_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"]\n});" + "source": "const authTokenOut = await svix.authentication.getPollerToken(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const sinkOut = await svix.sink.create(\"app_id\", {\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled: false,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n channels: [\"project_123\", \"group_2\"]\n});" + "source": "const authTokenOut = await svix.authentication.getPollerToken(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "sink_out = svix.sink.create(\"app_id\", SinkIn(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"]\n), options=...)" + "source": "auth_token_out = svix.authentication.get_poller_token(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "sink_out = await svix.sink.create(\"app_id\", SinkIn(\n description=\"An example endpoint name\",\n rate_limit=None,\n uid=\"unique-identifier\",\n secret=\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled=False,\n filter_types=[\"user.signup\", \"user.deleted\"],\n channels=[\"project_123\", \"group_2\"]\n), options=...)" + "source": "auth_token_out = await svix.authentication.get_poller_token(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "sinkOut, err := svixClient.Sink.Create(ctx, \"app_id\", &SinkIn{\n Description: \"An example endpoint name\",\n RateLimit: nil,\n Uid: \"unique-identifier\",\n Secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n Disabled: false,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n Channels: []string{\"project_123\", \"group_2\"},\n})" + "source": "authTokenOut, err := svixClient.Authentication.GetPollerToken(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val sinkOut = svix.sink.create(\"app_id\", SinkIn()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n .disabled(false)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .channels(arrayOf(\"project_123\", \"group_2\"))\n)" + "source": "val authTokenOut = svix.authentication.getPollerToken(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "SinkOut sinkOut = svix.getSink().create(\"app_id\", new SinkIn()\n .description(\"An example endpoint name\")\n .rateLimit(null)\n .uid(\"unique-identifier\")\n .secret(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\")\n .disabled(false)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .channels(new String[]{\"project_123\", \"group_2\"})\n);" + "source": "AuthTokenOut authTokenOut = svix.getAuthentication().getPollerToken(\"app_id\", \"endpoint_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "sink_out = svix.sink.create(\"app_id\", Svix::SinkIn.new({\n \"description\": \"An example endpoint name\",\n \"rate_limit\": nil,\n \"uid\": \"unique-identifier\",\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"disabled\": false,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n}))" + "source": "auth_token_out = svix.authentication.get_poller_token(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let sink_out = svix.sink().create(\"app_id\", SinkIn {\n description: Some(\"An example endpoint name\".to_string()),\n rate_limit: None,\n uid: Some(\"unique-identifier\".to_string()),\n secret: Some(\"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\".to_string()),\n disabled: Some(false),\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n}, None).await?;" + "source": "let auth_token_out = svix.authentication().get_poller_token(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var sinkOut = await svix.Sink.CreateAsync(\"app_id\", new SinkIn{\n description: \"An example endpoint name\",\n rateLimit: null,\n uid: \"unique-identifier\",\n secret: \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n disabled: false,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n channels: new string[] {\"project_123\", \"group_2\"}\n});" + "source": "var authTokenOut = await svix.Authentication.GetPollerTokenAsync(\"app_id\", \"endpoint_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix sink create \"app_id\" '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n}'" + "source": "svix authentication get-poller-token \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/sink' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true } }, - "/api/v1/app/{app_id}/sink/{sink_id}": { - "get": { - "description": "Get a sink.", - "operationId": "v1.sink.get", + "/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token/rotate": { + "post": { + "description": "Create a new auth token that can for the poller API.", + "operationId": "v1.authentication.rotate-poller-token", "parameters": [ { "description": "The Application's ID or UID.", @@ -20385,7 +23227,7 @@ { "description": "The Endpoint's ID or UID.", "in": "path", - "name": "sink_id", + "name": "endpoint_id", "required": true, "schema": { "description": "The Endpoint's ID or UID.", @@ -20396,14 +23238,33 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RotatePollerTokenIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SinkOut" + "$ref": "#/components/schemas/AuthTokenOut" } } }, @@ -20485,104 +23346,81 @@ "HTTPBearer": [] } ], - "summary": "Get Sink", + "summary": "Rotate Poller Token", "tags": [ - "Endpoint" + "Authentication" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const sinkOut = await svix.sink.get(\"app_id\", \"sink_id\");" + "source": "const authTokenOut = await svix.authentication.rotatePollerToken(\"app_id\", \"endpoint_id\", {\n expiry: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const sinkOut = await svix.sink.get(\"app_id\", \"sink_id\");" + "source": "const authTokenOut = await svix.authentication.rotatePollerToken(\"app_id\", \"endpoint_id\", {\n expiry: null\n});" }, { "label": "Python", "lang": "Python", - "source": "sink_out = svix.sink.get(\"app_id\", \"sink_id\")" + "source": "auth_token_out = svix.authentication.rotate_poller_token(\"app_id\", \"endpoint_id\", RotatePollerTokenIn(\n expiry=None\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "sink_out = await svix.sink.get(\"app_id\", \"sink_id\")" + "source": "auth_token_out = await svix.authentication.rotate_poller_token(\"app_id\", \"endpoint_id\", RotatePollerTokenIn(\n expiry=None\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "sinkOut, err := svixClient.Sink.Get(ctx, \"app_id\", \"sink_id\")" + "source": "authTokenOut, err := svixClient.Authentication.RotatePollerToken(ctx, \"app_id\", \"endpoint_id\", &RotatePollerTokenIn{\n Expiry: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val sinkOut = svix.sink.get(\"app_id\", \"sink_id\")" + "source": "val authTokenOut = svix.authentication.rotatePollerToken(\"app_id\", \"endpoint_id\", RotatePollerTokenIn()\n .expiry(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "SinkOut sinkOut = svix.getSink().get(\"app_id\", \"sink_id\");" + "source": "AuthTokenOut authTokenOut = svix.getAuthentication().rotatePollerToken(\"app_id\", \"endpoint_id\", new RotatePollerTokenIn()\n .expiry(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "sink_out = svix.sink.get(\"app_id\", \"sink_id\")" + "source": "auth_token_out = svix.authentication.rotate_poller_token(\"app_id\", \"endpoint_id\", Svix::RotatePollerTokenIn.new({\n \"expiry\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let sink_out = svix.sink().get(\"app_id\", \"sink_id\").await?;" + "source": "let auth_token_out = svix.authentication().rotate_poller_token(\"app_id\", \"endpoint_id\", RotatePollerTokenIn {\n expiry: None,\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var sinkOut = await svix.Sink.GetAsync(\"app_id\", \"sink_id\");" + "source": "var authTokenOut = await svix.Authentication.RotatePollerTokenAsync(\"app_id\", \"endpoint_id\", new RotatePollerTokenIn{\n expiry: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix sink get \"app_id\" \"sink_id\"" + "source": "svix authentication rotate-poller-token \"app_id\" \"endpoint_id\" '{\n \"expiry\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/sink/{sink_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"expiry\": null\n }'" } ], "x-hidden": true } }, - "/api/v1/app/{app_id}/stats": { - "get": { - "description": "Get basic statistics for the application.", - "operationId": "v1.application.get-stats", + "/api/v1/auth/dashboard-access/{app_id}": { + "post": { + "deprecated": true, + "description": "DEPRECATED: Please use `app-portal-access` instead.\n\nUse this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.", + "operationId": "v1.authentication.dashboard-access", "parameters": [ - { - "description": "Filter the range to data starting from this date.", - "in": "query", - "name": "since", - "required": true, - "schema": { - "description": "Filter the range to data starting from this date.", - "format": "date-time", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter the range to data ending by this date.", - "in": "query", - "name": "until", - "required": true, - "schema": { - "description": "Filter the range to data ending by this date.", - "format": "date-time", - "type": "string" - }, - "style": "form" - }, { "description": "The Application's ID or UID.", "in": "path", @@ -20597,6 +23435,15 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" } ], "responses": { @@ -20604,7 +23451,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationStats" + "$ref": "#/components/schemas/DashboardAccessOut" } } }, @@ -20686,95 +23533,79 @@ "HTTPBearer": [] } ], - "summary": "Get App Stats", + "summary": "Dashboard Access", "tags": [ - "Application" + "Authentication" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const applicationStats = await svix.application.getStats(\"app_id\");" + "source": "const dashboardAccessOut = await svix.authentication.dashboardAccess(\"app_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const applicationStats = await svix.application.getStats(\"app_id\");" + "source": "const dashboardAccessOut = await svix.authentication.dashboardAccess(\"app_id\");" }, { "label": "Python", "lang": "Python", - "source": "application_stats = svix.application.get_stats(\"app_id\")" + "source": "dashboard_access_out = svix.authentication.dashboard_access(\"app_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "application_stats = await svix.application.get_stats(\"app_id\")" + "source": "dashboard_access_out = await svix.authentication.dashboard_access(\"app_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "applicationStats, err := svixClient.Application.GetStats(ctx, \"app_id\")" + "source": "dashboardAccessOut, err := svixClient.Authentication.DashboardAccess(ctx, \"app_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val applicationStats = svix.application.getStats(\"app_id\")" + "source": "val dashboardAccessOut = svix.authentication.dashboardAccess(\"app_id\")" }, { "label": "Java", "lang": "Java", - "source": "ApplicationStats applicationStats = svix.getApplication().getStats(\"app_id\");" + "source": "DashboardAccessOut dashboardAccessOut = svix.getAuthentication().dashboardAccess(\"app_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "application_stats = svix.application.get_stats(\"app_id\")" + "source": "dashboard_access_out = svix.authentication.dashboard_access(\"app_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let application_stats = svix.application().get_stats(\"app_id\").await?;" + "source": "let dashboard_access_out = svix.authentication().dashboard_access(\"app_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var applicationStats = await svix.Application.GetStatsAsync(\"app_id\");" + "source": "var dashboardAccessOut = await svix.Authentication.DashboardAccessAsync(\"app_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix application get-stats \"app_id\"" + "source": "svix authentication dashboard-access \"app_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/stats' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/dashboard-access/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] } }, - "/api/v1/auth/app-portal-access/{app_id}": { + "/api/v1/auth/logout": { "post": { - "description": "Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.", - "operationId": "v1.authentication.app-portal-access", + "description": "Logout an app token.\n\nTrying to log out other tokens will fail.", + "operationId": "v1.authentication.logout", "parameters": [ - { - "description": "The Application's ID or UID.", - "in": "path", - "name": "app_id", - "required": true, - "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, { "description": "The request's idempotency key", "in": "header", @@ -20785,26 +23616,9 @@ "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppPortalAccessIn" - } - } - }, - "required": true - }, "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppPortalAccessOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -20882,7 +23696,7 @@ "HTTPBearer": [] } ], - "summary": "Get Consumer App Portal Access", + "summary": "Logout", "tags": [ "Authentication" ], @@ -20890,86 +23704,71 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const appPortalAccessOut = await svix.authentication.appPortalAccess(\"app_id\", {\n application: null,\n featureFlags: [],\n expiry: null,\n readOnly: null\n});" + "source": "await svix.authentication.logout();" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const appPortalAccessOut = await svix.authentication.appPortalAccess(\"app_id\", {\n application: null,\n featureFlags: [],\n expiry: null,\n readOnly: null\n});" + "source": "await svix.authentication.logout();" }, { "label": "Python", "lang": "Python", - "source": "app_portal_access_out = svix.authentication.app_portal_access(\"app_id\", AppPortalAccessIn(\n application=None,\n feature_flags=[],\n expiry=None,\n read_only=None\n), options=...)" + "source": "svix.authentication.logout(options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "app_portal_access_out = await svix.authentication.app_portal_access(\"app_id\", AppPortalAccessIn(\n application=None,\n feature_flags=[],\n expiry=None,\n read_only=None\n), options=...)" + "source": "await svix.authentication.logout(options=...)" }, { "label": "Go", "lang": "Go", - "source": "appPortalAccessOut, err := svixClient.Authentication.AppPortalAccess(ctx, \"app_id\", &AppPortalAccessIn{\n Application: nil,\n FeatureFlags: []interface{}{},\n Expiry: nil,\n ReadOnly: nil,\n})" + "source": "err := svixClient.Authentication.Logout(ctx)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val appPortalAccessOut = svix.authentication.appPortalAccess(\"app_id\", AppPortalAccessIn()\n .application(null)\n .featureFlags(arrayOf())\n .expiry(null)\n .readOnly(null)\n)" + "source": "svix.authentication.logout()" }, { "label": "Java", "lang": "Java", - "source": "AppPortalAccessOut appPortalAccessOut = svix.getAuthentication().appPortalAccess(\"app_id\", new AppPortalAccessIn()\n .application(null)\n .featureFlags(new Object[]{})\n .expiry(null)\n .readOnly(null)\n);" + "source": "svix.getAuthentication().logout();" }, { "label": "Ruby", "lang": "Ruby", - "source": "app_portal_access_out = svix.authentication.app_portal_access(\"app_id\", Svix::AppPortalAccessIn.new({\n \"application\": nil,\n \"feature_flags\": [],\n \"expiry\": nil,\n \"read_only\": nil\n}))" + "source": "svix.authentication.logout()" }, { "label": "Rust", "lang": "Rust", - "source": "let app_portal_access_out = svix.authentication().app_portal_access(\"app_id\", AppPortalAccessIn {\n application: None,\n feature_flags: Some(vec![]),\n expiry: None,\n read_only: None,\n}, None).await?;" + "source": "svix.authentication().logout(None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var appPortalAccessOut = await svix.Authentication.AppPortalAccessAsync(\"app_id\", new AppPortalAccessIn{\n application: null,\n featureFlags: new Object[] {},\n expiry: null,\n readOnly: null\n});" + "source": "await svix.Authentication.LogoutAsync();" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication app-portal-access \"app_id\" '{\n \"application\": null,\n \"featureFlags\": [],\n \"expiry\": null,\n \"readOnly\": null\n}'" + "source": "svix authentication logout " }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app-portal-access/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"application\": null,\n \"featureFlags\": [],\n \"expiry\": null,\n \"readOnly\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/logout' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] } }, - "/api/v1/auth/app/{app_id}/create-message-token": { + "/api/v1/auth/one-time-token": { "post": { - "description": "Create a new access token that only allows creating messages inside this application.", - "operationId": "v1.authentication.create-message-token", + "description": "This is a one time token.", + "operationId": "v1.authentication.exchange-one-time-token", "parameters": [ - { - "description": "The Application's ID or UID.", - "in": "path", - "name": "app_id", - "required": true, - "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, { "description": "The request's idempotency key", "in": "header", @@ -20984,7 +23783,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTokenIn" + "$ref": "#/components/schemas/OneTimeTokenIn" } } }, @@ -20995,7 +23794,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthTokenOut" + "$ref": "#/components/schemas/OneTimeTokenOut" } } }, @@ -21077,7 +23876,7 @@ "HTTPBearer": [] } ], - "summary": "Create Cmg Token", + "summary": "Exchange One Time Token", "tags": [ "Authentication" ], @@ -21085,83 +23884,82 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const authTokenOut = await svix.authentication.createMessageToken(\"app_id\", {\n expiry: null\n});" + "source": "const oneTimeTokenOut = await svix.authentication.exchangeOneTimeToken(\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const authTokenOut = await svix.authentication.createMessageToken(\"app_id\", {\n expiry: null\n});" + "source": "const oneTimeTokenOut = await svix.authentication.exchangeOneTimeToken(\n});" }, { "label": "Python", "lang": "Python", - "source": "auth_token_out = svix.authentication.create_message_token(\"app_id\", CreateTokenIn(\n expiry=None\n), options=...)" + "source": "one_time_token_out = svix.authentication.exchange_one_time_token(OneTimeTokenIn\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "auth_token_out = await svix.authentication.create_message_token(\"app_id\", CreateTokenIn(\n expiry=None\n), options=...)" + "source": "one_time_token_out = await svix.authentication.exchange_one_time_token(OneTimeTokenIn\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "authTokenOut, err := svixClient.Authentication.CreateMessageToken(ctx, \"app_id\", &CreateTokenIn{\n Expiry: nil,\n})" + "source": "oneTimeTokenOut, err := svixClient.Authentication.ExchangeOneTimeToken(ctx, &OneTimeTokenIn{\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val authTokenOut = svix.authentication.createMessageToken(\"app_id\", CreateTokenIn()\n .expiry(null)\n)" + "source": "val oneTimeTokenOut = svix.authentication.exchangeOneTimeToken(OneTimeTokenIn()\n)" }, { "label": "Java", "lang": "Java", - "source": "AuthTokenOut authTokenOut = svix.getAuthentication().createMessageToken(\"app_id\", new CreateTokenIn()\n .expiry(null)\n);" + "source": "OneTimeTokenOut oneTimeTokenOut = svix.getAuthentication().exchangeOneTimeToken(new OneTimeTokenIn()\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "auth_token_out = svix.authentication.create_message_token(\"app_id\", Svix::CreateTokenIn.new({\n \"expiry\": nil\n}))" + "source": "one_time_token_out = svix.authentication.exchange_one_time_token(Svix::OneTimeTokenIn.new(\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let auth_token_out = svix.authentication().create_message_token(\"app_id\", CreateTokenIn {\n expiry: None,\n}, None).await?;" + "source": "let one_time_token_out = svix.authentication().exchange_one_time_token(OneTimeTokenIn {\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var authTokenOut = await svix.Authentication.CreateMessageTokenAsync(\"app_id\", new CreateTokenIn{\n expiry: null\n});" + "source": "var oneTimeTokenOut = await svix.Authentication.ExchangeOneTimeTokenAsync(new OneTimeTokenIn\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication create-message-token \"app_id\" '{\n \"expiry\": null\n}'" + "source": "svix authentication exchange-one-time-token '\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/create-message-token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"expiry\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/one-time-token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" } ], "x-hidden": true } }, - "/api/v1/auth/app/{app_id}/expire-all": { + "/api/v1/auth/stream-portal-access/{stream_id}": { "post": { - "description": "Expire all of the tokens associated with a specific application.", - "operationId": "v1.authentication.expire-all", + "description": "Use this function to get magic links (and authentication codes) for connecting your users to the Stream Consumer Portal.", + "operationId": "v1.authentication.stream-portal-access", "parameters": [ { - "description": "The Application's ID or UID.", + "description": "The Stream's ID or UID.", "in": "path", - "name": "app_id", + "name": "stream_id", "required": true, "schema": { - "description": "The Application's ID or UID.", + "description": "The Stream's ID or UID.", "example": "unique-identifier", - "maxLength": 256, + "maxLength": 60, "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -21180,15 +23978,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationTokenExpireIn" + "$ref": "#/components/schemas/StreamPortalAccessIn" } } }, "required": true }, "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppPortalAccessOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -21266,7 +24071,7 @@ "HTTPBearer": [] } ], - "summary": "Expire All", + "summary": "Get Stream Portal Access", "tags": [ "Authentication" ], @@ -21274,100 +24079,132 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.authentication.expireAll(\"app_id\", {\n expiry: 60\n});" + "source": "const appPortalAccessOut = await svix.authentication.streamPortalAccess(\"stream_id\", {\n featureFlags: [],\n expiry: null,\n readOnly: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.authentication.expireAll(\"app_id\", {\n expiry: 60\n});" + "source": "const appPortalAccessOut = await svix.authentication.streamPortalAccess(\"stream_id\", {\n featureFlags: [],\n expiry: null,\n readOnly: null\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.authentication.expire_all(\"app_id\", ApplicationTokenExpireIn(\n expiry=60\n), options=...)" + "source": "app_portal_access_out = svix.authentication.stream_portal_access(\"stream_id\", StreamPortalAccessIn(\n feature_flags=[],\n expiry=None,\n read_only=None\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.authentication.expire_all(\"app_id\", ApplicationTokenExpireIn(\n expiry=60\n), options=...)" + "source": "app_portal_access_out = await svix.authentication.stream_portal_access(\"stream_id\", StreamPortalAccessIn(\n feature_flags=[],\n expiry=None,\n read_only=None\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Authentication.ExpireAll(ctx, \"app_id\", &ApplicationTokenExpireIn{\n Expiry: 60,\n})" + "source": "appPortalAccessOut, err := svixClient.Authentication.StreamPortalAccess(ctx, \"stream_id\", &StreamPortalAccessIn{\n FeatureFlags: []interface{}{},\n Expiry: nil,\n ReadOnly: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.authentication.expireAll(\"app_id\", ApplicationTokenExpireIn()\n .expiry(60)\n)" + "source": "val appPortalAccessOut = svix.authentication.streamPortalAccess(\"stream_id\", StreamPortalAccessIn()\n .featureFlags(arrayOf())\n .expiry(null)\n .readOnly(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getAuthentication().expireAll(\"app_id\", new ApplicationTokenExpireIn()\n .expiry(60)\n);" + "source": "AppPortalAccessOut appPortalAccessOut = svix.getAuthentication().streamPortalAccess(\"stream_id\", new StreamPortalAccessIn()\n .featureFlags(new Object[]{})\n .expiry(null)\n .readOnly(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.authentication.expire_all(\"app_id\", Svix::ApplicationTokenExpireIn.new({\n \"expiry\": 60\n}))" + "source": "app_portal_access_out = svix.authentication.stream_portal_access(\"stream_id\", Svix::StreamPortalAccessIn.new({\n \"feature_flags\": [],\n \"expiry\": nil,\n \"read_only\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.authentication().expire_all(\"app_id\", ApplicationTokenExpireIn {\n expiry: Some(60),\n}, None).await?;" + "source": "let app_portal_access_out = svix.authentication().stream_portal_access(\"stream_id\", StreamPortalAccessIn {\n feature_flags: Some(vec![]),\n expiry: None,\n read_only: None,\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Authentication.ExpireAllAsync(\"app_id\", new ApplicationTokenExpireIn{\n expiry: 60\n});" + "source": "var appPortalAccessOut = await svix.Authentication.StreamPortalAccessAsync(\"stream_id\", new StreamPortalAccessIn{\n featureFlags: new Object[] {},\n expiry: null,\n readOnly: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication expire-all \"app_id\" '{\n \"expiry\": 60\n}'" + "source": "svix authentication stream-portal-access \"stream_id\" '{\n \"featureFlags\": [],\n \"expiry\": null,\n \"readOnly\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/expire-all' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"expiry\": 60\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/stream-portal-access/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"featureFlags\": [],\n \"expiry\": null,\n \"readOnly\": null\n }'" } - ] + ], + "x-hidden": true } }, - "/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token": { + "/api/v1/background-task": { "get": { - "description": "Get the current auth token for the poller.", - "operationId": "v1.authentication.get-poller-token", + "description": "List background tasks executed in the past 90 days.", + "operationId": "v1.background-task.list", "parameters": [ { - "description": "The Application's ID or UID.", - "in": "path", - "name": "app_id", - "required": true, + "description": "Filter the response based on the status.", + "in": "query", + "name": "status", "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" + "$ref": "#/components/schemas/BackgroundTaskStatus", + "description": "Filter the response based on the status.", + "nullable": true }, - "style": "simple" + "style": "form" }, { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, + "description": "Filter the response based on the type.", + "in": "query", + "name": "task", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "$ref": "#/components/schemas/BackgroundTaskType", + "description": "Filter the response based on the type.", + "nullable": true + }, + "style": "form" + }, + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "nullable": true, + "pattern": "^qtask_[A-Za-z0-9]{27}$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], "responses": { @@ -21375,7 +24212,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthTokenOut" + "$ref": "#/components/schemas/ListResponse_BackgroundTaskOut_" } } }, @@ -21457,136 +24294,101 @@ "HTTPBearer": [] } ], - "summary": "Get Poller Token", + "summary": "List Background Tasks", "tags": [ - "Authentication" + "Background Task" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const authTokenOut = await svix.authentication.getPollerToken(\"app_id\", \"endpoint_id\");" + "source": "const listResponseBackgroundTaskOut = await svix.backgroundTask.list();" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const authTokenOut = await svix.authentication.getPollerToken(\"app_id\", \"endpoint_id\");" + "source": "const listResponseBackgroundTaskOut = await svix.backgroundTask.list();" }, { "label": "Python", "lang": "Python", - "source": "auth_token_out = svix.authentication.get_poller_token(\"app_id\", \"endpoint_id\")" + "source": "list_response_background_task_out = svix.background_task.list(options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "auth_token_out = await svix.authentication.get_poller_token(\"app_id\", \"endpoint_id\")" + "source": "list_response_background_task_out = await svix.background_task.list(options=...)" }, { "label": "Go", "lang": "Go", - "source": "authTokenOut, err := svixClient.Authentication.GetPollerToken(ctx, \"app_id\", \"endpoint_id\")" + "source": "listResponseBackgroundTaskOut, err := svixClient.BackgroundTask.List(ctx, nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val authTokenOut = svix.authentication.getPollerToken(\"app_id\", \"endpoint_id\")" + "source": "val listResponseBackgroundTaskOut = svix.backgroundTask.list()" }, { "label": "Java", "lang": "Java", - "source": "AuthTokenOut authTokenOut = svix.getAuthentication().getPollerToken(\"app_id\", \"endpoint_id\");" + "source": "ListResponseBackgroundTaskOut listResponseBackgroundTaskOut = svix.getBackgroundTask().list();" }, { "label": "Ruby", "lang": "Ruby", - "source": "auth_token_out = svix.authentication.get_poller_token(\"app_id\", \"endpoint_id\")" + "source": "list_response_background_task_out = svix.background_task.list()" }, { "label": "Rust", "lang": "Rust", - "source": "let auth_token_out = svix.authentication().get_poller_token(\"app_id\", \"endpoint_id\").await?;" + "source": "let list_response_background_task_out = svix.background_task().list(None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var authTokenOut = await svix.Authentication.GetPollerTokenAsync(\"app_id\", \"endpoint_id\");" + "source": "var listResponseBackgroundTaskOut = await svix.BackgroundTask.ListAsync();" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication get-poller-token \"app_id\" \"endpoint_id\"" + "source": "svix background-task list " }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/background-task' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] } }, - "/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token/rotate": { - "post": { - "description": "Create a new auth token that can for the poller API.", - "operationId": "v1.authentication.rotate-poller-token", + "/api/v1/background-task/{task_id}": { + "get": { + "description": "Get a background task by ID.", + "operationId": "v1.background-task.get", "parameters": [ { - "description": "The Application's ID or UID.", - "in": "path", - "name": "app_id", - "required": true, - "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, - { - "description": "The Endpoint's ID or UID.", + "description": "The QueueBackgroundTask's ID.", "in": "path", - "name": "endpoint_id", + "name": "task_id", "required": true, "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { + "description": "The QueueBackgroundTask's ID.", + "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 33, + "minLength": 33, + "pattern": "^qtask_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RotatePollerTokenIn" - } - } - }, - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthTokenOut" + "$ref": "#/components/schemas/BackgroundTaskOut" } } }, @@ -21668,96 +24470,79 @@ "HTTPBearer": [] } ], - "summary": "Rotate Poller Token", + "summary": "Get Background Task", "tags": [ - "Authentication" + "Background Task" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const authTokenOut = await svix.authentication.rotatePollerToken(\"app_id\", \"endpoint_id\", {\n expiry: null\n});" + "source": "const backgroundTaskOut = await svix.backgroundTask.get(\"task_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const authTokenOut = await svix.authentication.rotatePollerToken(\"app_id\", \"endpoint_id\", {\n expiry: null\n});" + "source": "const backgroundTaskOut = await svix.backgroundTask.get(\"task_id\");" }, { "label": "Python", "lang": "Python", - "source": "auth_token_out = svix.authentication.rotate_poller_token(\"app_id\", \"endpoint_id\", RotatePollerTokenIn(\n expiry=None\n), options=...)" + "source": "background_task_out = svix.background_task.get(\"task_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "auth_token_out = await svix.authentication.rotate_poller_token(\"app_id\", \"endpoint_id\", RotatePollerTokenIn(\n expiry=None\n), options=...)" + "source": "background_task_out = await svix.background_task.get(\"task_id\")" }, { "label": "Go", "lang": "Go", - "source": "authTokenOut, err := svixClient.Authentication.RotatePollerToken(ctx, \"app_id\", \"endpoint_id\", &RotatePollerTokenIn{\n Expiry: nil,\n})" + "source": "backgroundTaskOut, err := svixClient.BackgroundTask.Get(ctx, \"task_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val authTokenOut = svix.authentication.rotatePollerToken(\"app_id\", \"endpoint_id\", RotatePollerTokenIn()\n .expiry(null)\n)" + "source": "val backgroundTaskOut = svix.backgroundTask.get(\"task_id\")" }, { "label": "Java", "lang": "Java", - "source": "AuthTokenOut authTokenOut = svix.getAuthentication().rotatePollerToken(\"app_id\", \"endpoint_id\", new RotatePollerTokenIn()\n .expiry(null)\n);" + "source": "BackgroundTaskOut backgroundTaskOut = svix.getBackgroundTask().get(\"task_id\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "auth_token_out = svix.authentication.rotate_poller_token(\"app_id\", \"endpoint_id\", Svix::RotatePollerTokenIn.new({\n \"expiry\": nil\n}))" + "source": "background_task_out = svix.background_task.get(\"task_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let auth_token_out = svix.authentication().rotate_poller_token(\"app_id\", \"endpoint_id\", RotatePollerTokenIn {\n expiry: None,\n}, None).await?;" + "source": "let background_task_out = svix.background_task().get(\"task_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var authTokenOut = await svix.Authentication.RotatePollerTokenAsync(\"app_id\", \"endpoint_id\", new RotatePollerTokenIn{\n expiry: null\n});" + "source": "var backgroundTaskOut = await svix.BackgroundTask.GetAsync(\"task_id\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication rotate-poller-token \"app_id\" \"endpoint_id\" '{\n \"expiry\": null\n}'" + "source": "svix background-task get \"task_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"expiry\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/background-task/{task_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] } }, - "/api/v1/auth/dashboard-access/{app_id}": { + "/api/v1/environment/export": { "post": { - "deprecated": true, - "description": "DEPRECATED: Please use `app-portal-access` instead.\n\nUse this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.", - "operationId": "v1.authentication.dashboard-access", + "description": "Download a JSON file containing all org-settings and event types.", + "operationId": "v1.environment.export", "parameters": [ - { - "description": "The Application's ID or UID.", - "in": "path", - "name": "app_id", - "required": true, - "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, { "description": "The request's idempotency key", "in": "header", @@ -21773,7 +24558,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DashboardAccessOut" + "$ref": "#/components/schemas/EnvironmentOut" } } }, @@ -21855,78 +24640,78 @@ "HTTPBearer": [] } ], - "summary": "Dashboard Access", + "summary": "Export Environment Configuration", "tags": [ - "Authentication" + "Environment" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const dashboardAccessOut = await svix.authentication.dashboardAccess(\"app_id\");" + "source": "const environmentOut = await svix.environment.export();" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const dashboardAccessOut = await svix.authentication.dashboardAccess(\"app_id\");" + "source": "const environmentOut = await svix.environment.export();" }, { "label": "Python", "lang": "Python", - "source": "dashboard_access_out = svix.authentication.dashboard_access(\"app_id\", options=...)" + "source": "environment_out = svix.environment.export(options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "dashboard_access_out = await svix.authentication.dashboard_access(\"app_id\", options=...)" + "source": "environment_out = await svix.environment.export(options=...)" }, { "label": "Go", "lang": "Go", - "source": "dashboardAccessOut, err := svixClient.Authentication.DashboardAccess(ctx, \"app_id\")" + "source": "environmentOut, err := svixClient.Environment.Export(ctx)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val dashboardAccessOut = svix.authentication.dashboardAccess(\"app_id\")" + "source": "val environmentOut = svix.environment.export()" }, { "label": "Java", "lang": "Java", - "source": "DashboardAccessOut dashboardAccessOut = svix.getAuthentication().dashboardAccess(\"app_id\");" + "source": "EnvironmentOut environmentOut = svix.getEnvironment().export();" }, { "label": "Ruby", "lang": "Ruby", - "source": "dashboard_access_out = svix.authentication.dashboard_access(\"app_id\")" + "source": "environment_out = svix.environment.export()" }, { "label": "Rust", "lang": "Rust", - "source": "let dashboard_access_out = svix.authentication().dashboard_access(\"app_id\", None).await?;" + "source": "let environment_out = svix.environment().export(None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var dashboardAccessOut = await svix.Authentication.DashboardAccessAsync(\"app_id\");" + "source": "var environmentOut = await svix.Environment.ExportAsync();" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication dashboard-access \"app_id\"" + "source": "svix environment export " }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/dashboard-access/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/environment/export' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] } }, - "/api/v1/auth/logout": { + "/api/v1/environment/import": { "post": { - "description": "Logout an app token.\n\nTrying to log out other tokens will fail.", - "operationId": "v1.authentication.logout", + "description": "Import a configuration into the active organization.\nIt doesn't delete anything, only adds/updates what was passed to it.", + "operationId": "v1.environment.import", "parameters": [ { "description": "The request's idempotency key", @@ -21938,6 +24723,16 @@ "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentIn" + } + } + }, + "required": true + }, "responses": { "204": { "description": "no content" @@ -22018,105 +24813,84 @@ "HTTPBearer": [] } ], - "summary": "Logout", + "summary": "Import Environment Configuration", "tags": [ - "Authentication" + "Environment" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.authentication.logout();" + "source": "await svix.environment.import({\n eventTypes: null,\n settings: null,\n connectors: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.authentication.logout();" + "source": "await svix.environment.import({\n eventTypes: null,\n settings: null,\n connectors: null\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.authentication.logout(options=...)" + "source": "svix.environment.import(EnvironmentIn(\n event_types=None,\n settings=None,\n connectors=None\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.authentication.logout(options=...)" + "source": "await svix.environment.import(EnvironmentIn(\n event_types=None,\n settings=None,\n connectors=None\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Authentication.Logout(ctx)" + "source": "err := svixClient.Environment.Import(ctx, &EnvironmentIn{\n EventTypes: nil,\n Settings: nil,\n Connectors: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.authentication.logout()" + "source": "svix.environment.import(EnvironmentIn()\n .eventTypes(null)\n .settings(null)\n .connectors(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getAuthentication().logout();" + "source": "svix.getEnvironment().import(new EnvironmentIn()\n .eventTypes(null)\n .settings(null)\n .connectors(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.authentication.logout()" + "source": "svix.environment.import(Svix::EnvironmentIn.new({\n \"event_types\": nil,\n \"settings\": nil,\n \"connectors\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.authentication().logout(None).await?;" + "source": "svix.environment().import(EnvironmentIn {\n event_types: None,\n settings: None,\n connectors: None,\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Authentication.LogoutAsync();" + "source": "await svix.Environment.ImportAsync(new EnvironmentIn{\n eventTypes: null,\n settings: null,\n connectors: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication logout " + "source": "svix environment import '{\n \"eventTypes\": null,\n \"settings\": null,\n \"connectors\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/logout' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/environment/import' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventTypes\": null,\n \"settings\": null,\n \"connectors\": null\n }'" } ] } }, - "/api/v1/auth/one-time-token": { - "post": { - "description": "This is a one time token.", - "operationId": "v1.authentication.exchange-one-time-token", - "parameters": [ - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OneTimeTokenIn" - } - } - }, - "required": true - }, + "/api/v1/environment/settings": { + "get": { + "description": "Get the environment's settings.", + "operationId": "v1.environment.get-settings", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OneTimeTokenOut" + "$ref": "#/components/schemas/EnvironmentSettingsOut" } } }, @@ -22198,120 +24972,147 @@ "HTTPBearer": [] } ], - "summary": "Exchange One Time Token", + "summary": "Get Org Settings", "tags": [ - "Authentication" + "Environment-Settings" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const oneTimeTokenOut = await svix.authentication.exchangeOneTimeToken(\n});" + "source": "const environmentSettingsOut = await svix.environment.getSettings();" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const oneTimeTokenOut = await svix.authentication.exchangeOneTimeToken(\n});" + "source": "const environmentSettingsOut = await svix.environment.getSettings();" }, { "label": "Python", "lang": "Python", - "source": "one_time_token_out = svix.authentication.exchange_one_time_token(OneTimeTokenIn\n), options=...)" + "source": "environment_settings_out = svix.environment.get_settings()" }, { "label": "Python (Async)", "lang": "Python", - "source": "one_time_token_out = await svix.authentication.exchange_one_time_token(OneTimeTokenIn\n), options=...)" + "source": "environment_settings_out = await svix.environment.get_settings()" }, { "label": "Go", "lang": "Go", - "source": "oneTimeTokenOut, err := svixClient.Authentication.ExchangeOneTimeToken(ctx, &OneTimeTokenIn{\n})" + "source": "environmentSettingsOut, err := svixClient.Environment.GetSettings(ctx)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val oneTimeTokenOut = svix.authentication.exchangeOneTimeToken(OneTimeTokenIn()\n)" + "source": "val environmentSettingsOut = svix.environment.getSettings()" }, { "label": "Java", "lang": "Java", - "source": "OneTimeTokenOut oneTimeTokenOut = svix.getAuthentication().exchangeOneTimeToken(new OneTimeTokenIn()\n);" + "source": "EnvironmentSettingsOut environmentSettingsOut = svix.getEnvironment().getSettings();" }, { "label": "Ruby", "lang": "Ruby", - "source": "one_time_token_out = svix.authentication.exchange_one_time_token(Svix::OneTimeTokenIn.new(\n}))" + "source": "environment_settings_out = svix.environment.get_settings()" }, { "label": "Rust", "lang": "Rust", - "source": "let one_time_token_out = svix.authentication().exchange_one_time_token(OneTimeTokenIn {\n}, None).await?;" + "source": "let environment_settings_out = svix.environment().get_settings().await?;" }, { "label": "C#", "lang": "C#", - "source": "var oneTimeTokenOut = await svix.Authentication.ExchangeOneTimeTokenAsync(new OneTimeTokenIn\n});" + "source": "var environmentSettingsOut = await svix.Environment.GetSettingsAsync();" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication exchange-one-time-token '\n}'" + "source": "svix environment get-settings " }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/one-time-token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/environment/settings' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true } }, - "/api/v1/auth/stream-portal-access/{stream_id}": { - "post": { - "description": "Use this function to get magic links (and authentication codes) for connecting your users to the Stream Consumer Portal.", - "operationId": "v1.authentication.stream-portal-access", + "/api/v1/event-type": { + "get": { + "description": "Return the list of event types.", + "operationId": "v1.event-type.list", "parameters": [ { - "description": "The Stream's ID or UID.", - "in": "path", - "name": "stream_id", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The Stream's ID or UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, - "type": "string" + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" }, - "style": "simple" + "style": "form" }, { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", "schema": { + "description": "The iterator returned from a prior invocation", + "example": "user.signup", + "maxLength": 256, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" + }, + { + "description": "When `true` archived (deleted but not expunged) items are included in the response.", + "in": "query", + "name": "include_archived", + "schema": { + "default": false, + "description": "When `true` archived (deleted but not expunged) items are included in the response.", + "type": "boolean" + }, + "style": "form" + }, + { + "description": "When `true` the full item (including the schema) is included in the response.", + "in": "query", + "name": "with_content", + "schema": { + "default": false, + "description": "When `true` the full item (including the schema) is included in the response.", + "type": "boolean" + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StreamPortalAccessIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AppPortalAccessOut" + "$ref": "#/components/schemas/ListResponse_EventTypeOut_" } } }, @@ -22393,148 +25194,103 @@ "HTTPBearer": [] } ], - "summary": "Get Stream Portal Access", + "summary": "List Event Types", "tags": [ - "Authentication" + "Event Type" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const appPortalAccessOut = await svix.authentication.streamPortalAccess(\"stream_id\", {\n featureFlags: [],\n expiry: null,\n readOnly: null\n});" + "source": "const listResponseEventTypeOut = await svix.eventType.list();" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const appPortalAccessOut = await svix.authentication.streamPortalAccess(\"stream_id\", {\n featureFlags: [],\n expiry: null,\n readOnly: null\n});" + "source": "const listResponseEventTypeOut = await svix.eventType.list();" }, { "label": "Python", "lang": "Python", - "source": "app_portal_access_out = svix.authentication.stream_portal_access(\"stream_id\", StreamPortalAccessIn(\n feature_flags=[],\n expiry=None,\n read_only=None\n), options=...)" + "source": "list_response_event_type_out = svix.event_type.list(options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "app_portal_access_out = await svix.authentication.stream_portal_access(\"stream_id\", StreamPortalAccessIn(\n feature_flags=[],\n expiry=None,\n read_only=None\n), options=...)" + "source": "list_response_event_type_out = await svix.event_type.list(options=...)" }, { "label": "Go", "lang": "Go", - "source": "appPortalAccessOut, err := svixClient.Authentication.StreamPortalAccess(ctx, \"stream_id\", &StreamPortalAccessIn{\n FeatureFlags: []interface{}{},\n Expiry: nil,\n ReadOnly: nil,\n})" + "source": "listResponseEventTypeOut, err := svixClient.EventType.List(ctx, nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val appPortalAccessOut = svix.authentication.streamPortalAccess(\"stream_id\", StreamPortalAccessIn()\n .featureFlags(arrayOf())\n .expiry(null)\n .readOnly(null)\n)" + "source": "val listResponseEventTypeOut = svix.eventType.list()" }, { "label": "Java", "lang": "Java", - "source": "AppPortalAccessOut appPortalAccessOut = svix.getAuthentication().streamPortalAccess(\"stream_id\", new StreamPortalAccessIn()\n .featureFlags(new Object[]{})\n .expiry(null)\n .readOnly(null)\n);" + "source": "ListResponseEventTypeOut listResponseEventTypeOut = svix.getEventType().list();" }, { "label": "Ruby", "lang": "Ruby", - "source": "app_portal_access_out = svix.authentication.stream_portal_access(\"stream_id\", Svix::StreamPortalAccessIn.new({\n \"feature_flags\": [],\n \"expiry\": nil,\n \"read_only\": nil\n}))" + "source": "list_response_event_type_out = svix.event_type.list()" }, { "label": "Rust", "lang": "Rust", - "source": "let app_portal_access_out = svix.authentication().stream_portal_access(\"stream_id\", StreamPortalAccessIn {\n feature_flags: Some(vec![]),\n expiry: None,\n read_only: None,\n}, None).await?;" + "source": "let list_response_event_type_out = svix.event_type().list(None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var appPortalAccessOut = await svix.Authentication.StreamPortalAccessAsync(\"stream_id\", new StreamPortalAccessIn{\n featureFlags: new Object[] {},\n expiry: null,\n readOnly: null\n});" + "source": "var listResponseEventTypeOut = await svix.EventType.ListAsync();" }, { "label": "CLI", "lang": "Shell", - "source": "svix authentication stream-portal-access \"stream_id\" '{\n \"featureFlags\": [],\n \"expiry\": null,\n \"readOnly\": null\n}'" + "source": "svix event-type list " }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/stream-portal-access/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"featureFlags\": [],\n \"expiry\": null,\n \"readOnly\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true - } - }, - "/api/v1/background-task": { - "get": { - "description": "List background tasks executed in the past 90 days.", - "operationId": "v1.background-task.list", + ] + }, + "post": { + "description": "Create new or unarchive existing event type.\n\nUnarchiving an event type will allow endpoints to filter on it and messages to be sent with it.\nEndpoints filtering on the event type before archival will continue to filter on it.\nThis operation does not preserve the description and schemas.", + "operationId": "v1.event-type.create", "parameters": [ { - "description": "Filter the response based on the status.", - "in": "query", - "name": "status", - "schema": { - "$ref": "#/components/schemas/BackgroundTaskStatus", - "description": "Filter the response based on the status.", - "nullable": true - }, - "style": "form" - }, - { - "description": "Filter the response based on the type.", - "in": "query", - "name": "task", - "schema": { - "$ref": "#/components/schemas/BackgroundTaskType", - "description": "Filter the response based on the type.", - "nullable": true - }, - "style": "form" - }, - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The iterator returned from a prior invocation", - "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "nullable": true, - "pattern": "^qtask_[A-Za-z0-9]{27}$", "type": "string" }, - "style": "form" - }, - { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", - "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true - }, - "style": "form" + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_BackgroundTaskOut_" + "$ref": "#/components/schemas/EventTypeOut" } } }, @@ -22616,101 +25372,95 @@ "HTTPBearer": [] } ], - "summary": "List Background Tasks", + "summary": "Create Event Type", "tags": [ - "Background Tasks" + "Event Type" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseBackgroundTaskOut = await svix.backgroundTask.list();" + "source": "const eventTypeOut = await svix.eventType.create({\n name: \"user.signup\",\n description: \"A user has signed up\",\n archived: false,\n schemas: {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseBackgroundTaskOut = await svix.backgroundTask.list();" + "source": "const eventTypeOut = await svix.eventType.create({\n name: \"user.signup\",\n description: \"A user has signed up\",\n archived: false,\n schemas: {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "Python", "lang": "Python", - "source": "list_response_background_task_out = svix.background_task.list(options=...)" + "source": "event_type_out = svix.event_type.create(EventTypeIn(\n name=\"user.signup\",\n description=\"A user has signed up\",\n archived=False,\n schemas={\"1\": {\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_background_task_out = await svix.background_task.list(options=...)" + "source": "event_type_out = await svix.event_type.create(EventTypeIn(\n name=\"user.signup\",\n description=\"A user has signed up\",\n archived=False,\n schemas={\"1\": {\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "listResponseBackgroundTaskOut, err := svixClient.BackgroundTask.List(ctx, nil)" + "source": "eventTypeOut, err := svixClient.EventType.Create(ctx, &EventTypeIn{\n Name: \"user.signup\",\n Description: \"A user has signed up\",\n Archived: false,\n Schemas: map[interface{}]interface{}{\"1\": map[string]interface{}{\"description\": \"An invoice was paid by a user\", \"properties\": map[interface{}]interface{}{\"invoiceId\": map[string]interface{}{\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": map[string]interface{}{\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": []string{\"invoiceId\", \"userId\"}, \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n FeatureFlag: \"cool-new-feature\",\n GroupName: \"user\",\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseBackgroundTaskOut = svix.backgroundTask.list()" + "source": "val eventTypeOut = svix.eventType.create(EventTypeIn()\n .name(\"user.signup\")\n .description(\"A user has signed up\")\n .archived(false)\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n)" }, { "label": "Java", "lang": "Java", - "source": "ListResponseBackgroundTaskOut listResponseBackgroundTaskOut = svix.getBackgroundTask().list();" + "source": "EventTypeOut eventTypeOut = svix.getEventType().create(new EventTypeIn()\n .name(\"user.signup\")\n .description(\"A user has signed up\")\n .archived(false)\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_background_task_out = svix.background_task.list()" + "source": "event_type_out = svix.event_type.create(Svix::EventTypeIn.new({\n \"name\": \"user.signup\",\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"feature_flag\": \"cool-new-feature\",\n \"group_name\": \"user\"\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_background_task_out = svix.background_task().list(None).await?;" + "source": "let event_type_out = svix.event_type().create(EventTypeIn {\n name: \"user.signup\".to_string(),\n description: \"A user has signed up\".to_string(),\n archived: Some(false),\n schemas: Some(json!({\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}})),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n group_name: Some(\"user\".to_string()),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseBackgroundTaskOut = await svix.BackgroundTask.ListAsync();" + "source": "var eventTypeOut = await svix.EventType.CreateAsync(new EventTypeIn{\n name: \"user.signup\",\n description: \"A user has signed up\",\n archived: false,\n schemas: /* ... */,\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix background-task list " + "source": "svix event-type create '{\n \"name\": \"user.signup\",\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/background-task' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n }'" } ] } }, - "/api/v1/background-task/{task_id}": { - "get": { - "description": "Get a background task by ID.", - "operationId": "v1.background-task.get", + "/api/v1/event-type/export/openapi": { + "post": { + "description": "Exports event type definitions based on the OpenAPI schemas associated\nwith each existing event type.", + "operationId": "v1.event-type.export-openapi", "parameters": [ { - "description": "The QueueBackgroundTask's ID.", - "in": "path", - "name": "task_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The QueueBackgroundTask's ID.", - "example": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 33, - "minLength": 33, - "pattern": "^qtask_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" } ], "responses": { - "200": { + "202": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BackgroundTaskOut" + "$ref": "#/components/schemas/ExportEventTypeOut" } } }, @@ -22792,78 +25542,79 @@ "HTTPBearer": [] } ], - "summary": "Get Background Task", + "summary": "Event Type Export From Openapi", "tags": [ - "Background Tasks" + "Event Type" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const backgroundTaskOut = await svix.backgroundTask.get(\"task_id\");" + "source": "const exportEventTypeOut = await svix.eventType.exportOpenapi();" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const backgroundTaskOut = await svix.backgroundTask.get(\"task_id\");" + "source": "const exportEventTypeOut = await svix.eventType.exportOpenapi();" }, { "label": "Python", "lang": "Python", - "source": "background_task_out = svix.background_task.get(\"task_id\")" + "source": "export_event_type_out = svix.event_type.export_openapi(options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "background_task_out = await svix.background_task.get(\"task_id\")" + "source": "export_event_type_out = await svix.event_type.export_openapi(options=...)" }, { "label": "Go", "lang": "Go", - "source": "backgroundTaskOut, err := svixClient.BackgroundTask.Get(ctx, \"task_id\")" + "source": "exportEventTypeOut, err := svixClient.EventType.ExportOpenapi(ctx)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val backgroundTaskOut = svix.backgroundTask.get(\"task_id\")" + "source": "val exportEventTypeOut = svix.eventType.exportOpenapi()" }, { "label": "Java", "lang": "Java", - "source": "BackgroundTaskOut backgroundTaskOut = svix.getBackgroundTask().get(\"task_id\");" + "source": "ExportEventTypeOut exportEventTypeOut = svix.getEventType().exportOpenapi();" }, { "label": "Ruby", "lang": "Ruby", - "source": "background_task_out = svix.background_task.get(\"task_id\")" + "source": "export_event_type_out = svix.event_type.export_openapi()" }, { "label": "Rust", "lang": "Rust", - "source": "let background_task_out = svix.background_task().get(\"task_id\").await?;" + "source": "let export_event_type_out = svix.event_type().export_openapi(None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var backgroundTaskOut = await svix.BackgroundTask.GetAsync(\"task_id\");" + "source": "var exportEventTypeOut = await svix.EventType.ExportOpenapiAsync();" }, { "label": "CLI", "lang": "Shell", - "source": "svix background-task get \"task_id\"" + "source": "svix event-type export-openapi " }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/background-task/{task_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/export/openapi' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/environment/export": { + "/api/v1/event-type/import/openapi": { "post": { - "description": "Download a JSON file containing all org-settings and event types.", - "operationId": "v1.environment.export", + "description": "Given an OpenAPI spec, create new or update existing event types.\nIf an existing `archived` event type is updated, it will be unarchived.\n\nThe importer will convert all webhooks found in the either the `webhooks` or `x-webhooks`\ntop-level.", + "operationId": "v1.event-type.import-openapi", "parameters": [ { "description": "The request's idempotency key", @@ -22875,12 +25626,23 @@ "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeImportOpenApiIn" + } + } + }, + "description": "Import a list of event types from webhooks defined in an OpenAPI spec.\n\nThe OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentOut" + "$ref": "#/components/schemas/EventTypeImportOpenApiOut" } } }, @@ -22962,78 +25724,78 @@ "HTTPBearer": [] } ], - "summary": "Export Environment Configuration", + "summary": "Event Type Import From Openapi", "tags": [ - "Environment" + "Event Type" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const environmentOut = await svix.environment.export();" + "source": "const eventTypeImportOpenApiOut = await svix.eventType.importOpenapi({\n spec: {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n specRaw: \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const environmentOut = await svix.environment.export();" + "source": "const eventTypeImportOpenApiOut = await svix.eventType.importOpenapi({\n spec: {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n specRaw: \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n});" }, { "label": "Python", "lang": "Python", - "source": "environment_out = svix.environment.export(options=...)" + "source": "event_type_import_open_api_out = svix.event_type.import_openapi(EventTypeImportOpenApiIn(\n spec={\"info\": {\"title\": \"Webhook Example\", \"version\": \"1.0.0\"}, \"openapi\": \"3.1.0\", \"webhooks\": {\"pet.new\": {\"post\": {\"requestBody\": {\"content\": {\"application/json\": {\"schema\": {\"properties\": {\"id\": {\"format\": \"int64\", \"type\": \"integer\"}, \"name\": {\"type\": \"string\"}, \"tag\": {\"type\": \"string\"}}, \"required\": [\"id\", \"name\"]}}}, \"description\": \"Information about a new pet in the system\"}, \"responses\": {\"200\": {\"description\": \"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n spec_raw=\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "environment_out = await svix.environment.export(options=...)" + "source": "event_type_import_open_api_out = await svix.event_type.import_openapi(EventTypeImportOpenApiIn(\n spec={\"info\": {\"title\": \"Webhook Example\", \"version\": \"1.0.0\"}, \"openapi\": \"3.1.0\", \"webhooks\": {\"pet.new\": {\"post\": {\"requestBody\": {\"content\": {\"application/json\": {\"schema\": {\"properties\": {\"id\": {\"format\": \"int64\", \"type\": \"integer\"}, \"name\": {\"type\": \"string\"}, \"tag\": {\"type\": \"string\"}}, \"required\": [\"id\", \"name\"]}}}, \"description\": \"Information about a new pet in the system\"}, \"responses\": {\"200\": {\"description\": \"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n spec_raw=\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "environmentOut, err := svixClient.Environment.Export(ctx)" + "source": "eventTypeImportOpenApiOut, err := svixClient.EventType.ImportOpenapi(ctx, &EventTypeImportOpenApiIn{\n Spec: map[interface{}]interface{}{\"info\": map[string]interface{}{\"title\": \"Webhook Example\", \"version\": \"1.0.0\"}, \"openapi\": \"3.1.0\", \"webhooks\": map[interface{}]interface{}{\"pet.new\": map[interface{}]interface{}{\"post\": map[interface{}]interface{}{\"requestBody\": map[interface{}]interface{}{\"content\": map[interface{}]interface{}{\"application/json\": map[interface{}]interface{}{\"schema\": map[interface{}]interface{}{\"properties\": map[interface{}]interface{}{\"id\": map[string]interface{}{\"format\": \"int64\", \"type\": \"integer\"}, \"name\": map[string]interface{}{\"type\": \"string\"}, \"tag\": map[string]interface{}{\"type\": \"string\"}}, \"required\": []string{\"id\", \"name\"}}}}, \"description\": \"Information about a new pet in the system\"}, \"responses\": map[interface{}]interface{}{\"200\": map[string]interface{}{\"description\": \"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n SpecRaw: \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\",\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val environmentOut = svix.environment.export()" + "source": "val eventTypeImportOpenApiOut = svix.eventType.importOpenapi(EventTypeImportOpenApiIn()\n .spec(/* ... */)\n .specRaw(\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\")\n)" }, { "label": "Java", "lang": "Java", - "source": "EnvironmentOut environmentOut = svix.getEnvironment().export();" + "source": "EventTypeImportOpenApiOut eventTypeImportOpenApiOut = svix.getEventType().importOpenapi(new EventTypeImportOpenApiIn()\n .spec(/* ... */)\n .specRaw(\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\")\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "environment_out = svix.environment.export()" + "source": "event_type_import_open_api_out = svix.event_type.import_openapi(Svix::EventTypeImportOpenApiIn.new({\n \"spec\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n \"spec_raw\": \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let environment_out = svix.environment().export(None).await?;" + "source": "let event_type_import_open_api_out = svix.event_type().import_openapi(EventTypeImportOpenApiIn {\n spec: Some(json!({\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}})),\n spec_raw: Some(\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\".to_string()),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var environmentOut = await svix.Environment.ExportAsync();" + "source": "var eventTypeImportOpenApiOut = await svix.EventType.ImportOpenapiAsync(new EventTypeImportOpenApiIn{\n spec: /* ... */,\n specRaw: \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix environment export " + "source": "svix event-type import-openapi '{\n \"spec\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n \"specRaw\": \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/environment/export' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/import/openapi' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"spec\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n \"specRaw\": \"\n # Both YAML and JSON are supported\n openapi: 3.1.0\n info:\n title: Webhook Example\n version: 1.0.0\n # Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\n webhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n \n components:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n \"\n }'" } ] } }, - "/api/v1/environment/import": { + "/api/v1/event-type/schema/generate-example": { "post": { - "description": "Import a configuration into the active organization.\nIt doesn't delete anything, only adds/updates what was passed to it.", - "operationId": "v1.environment.import", + "description": "Generates a fake example from the given JSONSchema.", + "operationId": "v1.event-type.generate-example", "parameters": [ { "description": "The request's idempotency key", @@ -23049,15 +25811,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentIn" + "$ref": "#/components/schemas/EventTypeSchemaIn" } } }, "required": true }, "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeExampleOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -23135,88 +25904,109 @@ "HTTPBearer": [] } ], - "summary": "Import Environment Configuration", + "summary": "Generate Schema Example", "tags": [ - "Environment" + "Event Type" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "await svix.environment.import({\n eventTypes: null,\n settings: null,\n connectors: null\n});" + "source": "const eventTypeExampleOut = await svix.eventType.generateExample({\n schema: {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "await svix.environment.import({\n eventTypes: null,\n settings: null,\n connectors: null\n});" + "source": "const eventTypeExampleOut = await svix.eventType.generateExample({\n schema: {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n});" }, { "label": "Python", "lang": "Python", - "source": "svix.environment.import(EnvironmentIn(\n event_types=None,\n settings=None,\n connectors=None\n), options=...)" + "source": "event_type_example_out = svix.event_type.generate_example(EventTypeSchemaIn(\n schema={\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "await svix.environment.import(EnvironmentIn(\n event_types=None,\n settings=None,\n connectors=None\n), options=...)" + "source": "event_type_example_out = await svix.event_type.generate_example(EventTypeSchemaIn(\n schema={\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "err := svixClient.Environment.Import(ctx, &EnvironmentIn{\n EventTypes: nil,\n Settings: nil,\n Connectors: nil,\n})" + "source": "eventTypeExampleOut, err := svixClient.EventType.GenerateExample(ctx, &EventTypeSchemaIn{\n Schema: map[string]interface{}{\"description\": \"An invoice was paid by a user\", \"properties\": map[interface{}]interface{}{\"invoiceId\": map[string]interface{}{\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": map[string]interface{}{\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": []string{\"invoiceId\", \"userId\"}, \"title\": \"Invoice Paid Event\", \"type\": \"object\"},\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "svix.environment.import(EnvironmentIn()\n .eventTypes(null)\n .settings(null)\n .connectors(null)\n)" + "source": "val eventTypeExampleOut = svix.eventType.generateExample(EventTypeSchemaIn()\n .schema(/* ... */)\n)" }, { "label": "Java", "lang": "Java", - "source": "svix.getEnvironment().import(new EnvironmentIn()\n .eventTypes(null)\n .settings(null)\n .connectors(null)\n);" + "source": "EventTypeExampleOut eventTypeExampleOut = svix.getEventType().generateExample(new EventTypeSchemaIn()\n .schema(/* ... */)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "svix.environment.import(Svix::EnvironmentIn.new({\n \"event_types\": nil,\n \"settings\": nil,\n \"connectors\": nil\n}))" + "source": "event_type_example_out = svix.event_type.generate_example(Svix::EventTypeSchemaIn.new({\n \"schema\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "svix.environment().import(EnvironmentIn {\n event_types: None,\n settings: None,\n connectors: None,\n}, None).await?;" + "source": "let event_type_example_out = svix.event_type().generate_example(EventTypeSchemaIn {\n schema: json!({\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}),\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "await svix.Environment.ImportAsync(new EnvironmentIn{\n eventTypes: null,\n settings: null,\n connectors: null\n});" + "source": "var eventTypeExampleOut = await svix.EventType.GenerateExampleAsync(new EventTypeSchemaIn{\n schema: /* ... */\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix environment import '{\n \"eventTypes\": null,\n \"settings\": null,\n \"connectors\": null\n}'" + "source": "svix event-type generate-example '{\n \"schema\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/environment/import' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventTypes\": null,\n \"settings\": null,\n \"connectors\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/schema/generate-example' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"schema\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n }'" } - ] + ], + "x-hidden": true } }, - "/api/v1/environment/settings": { - "get": { - "description": "Get the environment's settings.", - "operationId": "v1.environment.get-settings", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnvironmentSettingsOut" - } - } + "/api/v1/event-type/{event_type_name}": { + "delete": { + "description": "Archive an event type.\n\nEndpoints already configured to filter on an event type will continue to do so after archival.\nHowever, new messages can not be sent with it and endpoints can not filter on it.\nAn event type can be unarchived with the\n[create operation](#operation/create_event_type_api_v1_event_type__post).", + "operationId": "v1.event-type.delete", + "parameters": [ + { + "description": "The event type's name", + "in": "path", + "name": "event_type_name", + "required": true, + "schema": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "description": "" + "style": "simple" + }, + { + "description": "By default event types are archived when \"deleted\". Passing this to `true` deletes them entirely.", + "in": "query", + "name": "expunge", + "schema": { + "default": false, + "description": "By default event types are archived when \"deleted\". Passing this to `true` deletes them entirely.", + "type": "boolean" + }, + "style": "form" + } + ], + "responses": { + "204": { + "description": "no content" }, "400": { "content": { @@ -23294,139 +26084,90 @@ "HTTPBearer": [] } ], - "summary": "Get Org Settings", + "summary": "Delete Event Type", "tags": [ - "Environment-Settings" + "Event Type" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const environmentSettingsOut = await svix.environment.getSettings();" + "source": "await svix.eventType.delete(\"event_type_name\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const environmentSettingsOut = await svix.environment.getSettings();" + "source": "await svix.eventType.delete(\"event_type_name\");" }, { "label": "Python", "lang": "Python", - "source": "environment_settings_out = svix.environment.get_settings()" + "source": "svix.event_type.delete(\"event_type_name\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "environment_settings_out = await svix.environment.get_settings()" + "source": "await svix.event_type.delete(\"event_type_name\")" }, { "label": "Go", "lang": "Go", - "source": "environmentSettingsOut, err := svixClient.Environment.GetSettings(ctx)" + "source": "err := svixClient.EventType.Delete(ctx, \"event_type_name\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val environmentSettingsOut = svix.environment.getSettings()" + "source": "svix.eventType.delete(\"event_type_name\")" }, { "label": "Java", "lang": "Java", - "source": "EnvironmentSettingsOut environmentSettingsOut = svix.getEnvironment().getSettings();" + "source": "svix.getEventType().delete(\"event_type_name\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "environment_settings_out = svix.environment.get_settings()" + "source": "svix.event_type.delete(\"event_type_name\")" }, { "label": "Rust", "lang": "Rust", - "source": "let environment_settings_out = svix.environment().get_settings().await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var environmentSettingsOut = await svix.Environment.GetSettingsAsync();" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix environment get-settings " - }, - { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/environment/settings' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } - ], - "x-hidden": true - } - }, - "/api/v1/event-type": { - "get": { - "description": "Return the list of event types.", - "operationId": "v1.event-type.list", - "parameters": [ - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" + "source": "svix.event_type().delete(\"event_type_name\").await?;" }, { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "example": "user.signup", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" + "label": "C#", + "lang": "C#", + "source": "await svix.EventType.DeleteAsync(\"event_type_name\");" }, { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", - "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true - }, - "style": "form" + "label": "CLI", + "lang": "Shell", + "source": "svix event-type delete \"event_type_name\"" }, { - "description": "When `true` archived (deleted but not expunged) items are included in the response.", - "in": "query", - "name": "include_archived", - "schema": { - "default": false, - "description": "When `true` archived (deleted but not expunged) items are included in the response.", - "type": "boolean" - }, - "style": "form" - }, + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + } + ] + }, + "get": { + "description": "Get an event type.", + "operationId": "v1.event-type.get", + "parameters": [ { - "description": "When `true` the full item (including the schema) is included in the response.", - "in": "query", - "name": "with_content", + "description": "The event type's name", + "in": "path", + "name": "event_type_name", + "required": true, "schema": { - "default": false, - "description": "When `true` the full item (including the schema) is included in the response.", - "type": "boolean" + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" }, - "style": "form" + "style": "simple" } ], "responses": { @@ -23434,7 +26175,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_EventTypeOut_" + "$ref": "#/components/schemas/EventTypeOut" } } }, @@ -23516,7 +26257,7 @@ "HTTPBearer": [] } ], - "summary": "List Event Types", + "summary": "Get Event Type", "tags": [ "Event Type" ], @@ -23524,74 +26265,79 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseEventTypeOut = await svix.eventType.list();" + "source": "const eventTypeOut = await svix.eventType.get(\"event_type_name\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseEventTypeOut = await svix.eventType.list();" + "source": "const eventTypeOut = await svix.eventType.get(\"event_type_name\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_event_type_out = svix.event_type.list(options=...)" + "source": "event_type_out = svix.event_type.get(\"event_type_name\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_event_type_out = await svix.event_type.list(options=...)" + "source": "event_type_out = await svix.event_type.get(\"event_type_name\")" }, { "label": "Go", "lang": "Go", - "source": "listResponseEventTypeOut, err := svixClient.EventType.List(ctx, nil)" + "source": "eventTypeOut, err := svixClient.EventType.Get(ctx, \"event_type_name\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseEventTypeOut = svix.eventType.list()" + "source": "val eventTypeOut = svix.eventType.get(\"event_type_name\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseEventTypeOut listResponseEventTypeOut = svix.getEventType().list();" + "source": "EventTypeOut eventTypeOut = svix.getEventType().get(\"event_type_name\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_event_type_out = svix.event_type.list()" + "source": "event_type_out = svix.event_type.get(\"event_type_name\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_event_type_out = svix.event_type().list(None).await?;" + "source": "let event_type_out = svix.event_type().get(\"event_type_name\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseEventTypeOut = await svix.EventType.ListAsync();" + "source": "var eventTypeOut = await svix.EventType.GetAsync(\"event_type_name\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix event-type list " + "source": "svix event-type get \"event_type_name\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] }, - "post": { - "description": "Create new or unarchive existing event type.\n\nUnarchiving an event type will allow endpoints to filter on it and messages to be sent with it.\nEndpoints filtering on the event type before archival will continue to filter on it.\nThis operation does not preserve the description and schemas.", - "operationId": "v1.event-type.create", + "patch": { + "description": "Partially update an event type.", + "operationId": "v1.event-type.patch", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The event type's name", + "in": "path", + "name": "event_type_name", + "required": true, "schema": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -23601,14 +26347,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventTypeIn" + "$ref": "#/components/schemas/EventTypePatch" } } }, "required": true }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { @@ -23694,7 +26440,7 @@ "HTTPBearer": [] } ], - "summary": "Create Event Type", + "summary": "Patch Event Type", "tags": [ "Event Type" ], @@ -23702,87 +26448,110 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const eventTypeOut = await svix.eventType.create({\n name: \"user.signup\",\n description: \"A user has signed up\",\n archived: false,\n schemas: {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" + "source": "const eventTypeOut = await svix.eventType.patch(\"event_type_name\", {\n schemas: {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const eventTypeOut = await svix.eventType.create({\n name: \"user.signup\",\n description: \"A user has signed up\",\n archived: false,\n schemas: {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" + "source": "const eventTypeOut = await svix.eventType.patch(\"event_type_name\", {\n schemas: {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "Python", "lang": "Python", - "source": "event_type_out = svix.event_type.create(EventTypeIn(\n name=\"user.signup\",\n description=\"A user has signed up\",\n archived=False,\n schemas={\"1\": {\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n), options=...)" + "source": "event_type_out = svix.event_type.patch(\"event_type_name\", EventTypePatch(\n schemas={\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "event_type_out = await svix.event_type.create(EventTypeIn(\n name=\"user.signup\",\n description=\"A user has signed up\",\n archived=False,\n schemas={\"1\": {\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n), options=...)" + "source": "event_type_out = await svix.event_type.patch(\"event_type_name\", EventTypePatch(\n schemas={\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n))" }, { "label": "Go", "lang": "Go", - "source": "eventTypeOut, err := svixClient.EventType.Create(ctx, &EventTypeIn{\n Name: \"user.signup\",\n Description: \"A user has signed up\",\n Archived: false,\n Schemas: map[interface{}]interface{}{\"1\": map[string]interface{}{\"description\": \"An invoice was paid by a user\", \"properties\": map[interface{}]interface{}{\"invoiceId\": map[string]interface{}{\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": map[string]interface{}{\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": []string{\"invoiceId\", \"userId\"}, \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n FeatureFlag: \"cool-new-feature\",\n GroupName: \"user\",\n})" + "source": "eventTypeOut, err := svixClient.EventType.Patch(ctx, \"event_type_name\", &EventTypePatch{\n Schemas: map[string]interface{}{\"description\": \"An invoice was paid by a user\", \"properties\": map[interface{}]interface{}{\"invoiceId\": map[string]interface{}{\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": map[string]interface{}{\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": []string{\"invoiceId\", \"userId\"}, \"title\": \"Invoice Paid Event\", \"type\": \"object\"},\n FeatureFlag: \"cool-new-feature\",\n GroupName: \"user\",\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val eventTypeOut = svix.eventType.create(EventTypeIn()\n .name(\"user.signup\")\n .description(\"A user has signed up\")\n .archived(false)\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n)" + "source": "val eventTypeOut = svix.eventType.patch(\"event_type_name\", EventTypePatch()\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n)" }, { "label": "Java", "lang": "Java", - "source": "EventTypeOut eventTypeOut = svix.getEventType().create(new EventTypeIn()\n .name(\"user.signup\")\n .description(\"A user has signed up\")\n .archived(false)\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n);" + "source": "EventTypeOut eventTypeOut = svix.getEventType().patch(\"event_type_name\", new EventTypePatch()\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "event_type_out = svix.event_type.create(Svix::EventTypeIn.new({\n \"name\": \"user.signup\",\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"feature_flag\": \"cool-new-feature\",\n \"group_name\": \"user\"\n}))" + "source": "event_type_out = svix.event_type.patch(\"event_type_name\", Svix::EventTypePatch.new({\n \"schemas\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n \"feature_flag\": \"cool-new-feature\",\n \"group_name\": \"user\"\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let event_type_out = svix.event_type().create(EventTypeIn {\n name: \"user.signup\".to_string(),\n description: \"A user has signed up\".to_string(),\n archived: Some(false),\n schemas: Some(json!({\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}})),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n group_name: Some(\"user\".to_string()),\n}, None).await?;" + "source": "let event_type_out = svix.event_type().patch(\"event_type_name\", EventTypePatch {\n schemas: Some(json!({\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"})),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n group_name: Some(\"user\".to_string()),\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "var eventTypeOut = await svix.EventType.CreateAsync(new EventTypeIn{\n name: \"user.signup\",\n description: \"A user has signed up\",\n archived: false,\n schemas: /* ... */,\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" + "source": "var eventTypeOut = await svix.EventType.PatchAsync(\"event_type_name\", new EventTypePatch{\n schemas: /* ... */,\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix event-type create '{\n \"name\": \"user.signup\",\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n}'" + "source": "svix event-type patch \"event_type_name\" '{\n \"schemas\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"schemas\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n }'" } ] - } - }, - "/api/v1/event-type/export/openapi": { - "post": { - "description": "Exports event type definitions based on the OpenAPI schemas associated\nwith each existing event type.", - "operationId": "v1.event-type.export-openapi", + }, + "put": { + "description": "Update an event type.", + "operationId": "v1.event-type.update", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The event type's name", + "in": "path", + "name": "event_type_name", + "required": true, "schema": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeUpdate" + } + } + }, + "required": true + }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExportEventTypeOut" + "$ref": "#/components/schemas/EventTypeOut" + } + } + }, + "description": "" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeOut" } } }, @@ -23864,7 +26633,7 @@ "HTTPBearer": [] } ], - "summary": "Event Type Export From Openapi", + "summary": "Update Event Type", "tags": [ "Event Type" ], @@ -23872,99 +26641,92 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const exportEventTypeOut = await svix.eventType.exportOpenapi();" + "source": "const eventTypeOut = await svix.eventType.update(\"event_type_name\", {\n description: \"A user has signed up\",\n archived: false,\n schemas: {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const exportEventTypeOut = await svix.eventType.exportOpenapi();" + "source": "const eventTypeOut = await svix.eventType.update(\"event_type_name\", {\n description: \"A user has signed up\",\n archived: false,\n schemas: {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "Python", "lang": "Python", - "source": "export_event_type_out = svix.event_type.export_openapi(options=...)" + "source": "event_type_out = svix.event_type.update(\"event_type_name\", EventTypeUpdate(\n description=\"A user has signed up\",\n archived=False,\n schemas={\"1\": {\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "export_event_type_out = await svix.event_type.export_openapi(options=...)" + "source": "event_type_out = await svix.event_type.update(\"event_type_name\", EventTypeUpdate(\n description=\"A user has signed up\",\n archived=False,\n schemas={\"1\": {\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n))" }, { "label": "Go", "lang": "Go", - "source": "exportEventTypeOut, err := svixClient.EventType.ExportOpenapi(ctx)" + "source": "eventTypeOut, err := svixClient.EventType.Update(ctx, \"event_type_name\", &EventTypeUpdate{\n Description: \"A user has signed up\",\n Archived: false,\n Schemas: map[interface{}]interface{}{\"1\": map[string]interface{}{\"description\": \"An invoice was paid by a user\", \"properties\": map[interface{}]interface{}{\"invoiceId\": map[string]interface{}{\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": map[string]interface{}{\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": []string{\"invoiceId\", \"userId\"}, \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n FeatureFlag: \"cool-new-feature\",\n GroupName: \"user\",\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val exportEventTypeOut = svix.eventType.exportOpenapi()" + "source": "val eventTypeOut = svix.eventType.update(\"event_type_name\", EventTypeUpdate()\n .description(\"A user has signed up\")\n .archived(false)\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n)" }, { "label": "Java", "lang": "Java", - "source": "ExportEventTypeOut exportEventTypeOut = svix.getEventType().exportOpenapi();" + "source": "EventTypeOut eventTypeOut = svix.getEventType().update(\"event_type_name\", new EventTypeUpdate()\n .description(\"A user has signed up\")\n .archived(false)\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "export_event_type_out = svix.event_type.export_openapi()" + "source": "event_type_out = svix.event_type.update(\"event_type_name\", Svix::EventTypeUpdate.new({\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"feature_flag\": \"cool-new-feature\",\n \"group_name\": \"user\"\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let export_event_type_out = svix.event_type().export_openapi(None).await?;" + "source": "let event_type_out = svix.event_type().update(\"event_type_name\", EventTypeUpdate {\n description: \"A user has signed up\".to_string(),\n archived: Some(false),\n schemas: Some(json!({\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}})),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n group_name: Some(\"user\".to_string()),\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "var exportEventTypeOut = await svix.EventType.ExportOpenapiAsync();" + "source": "var eventTypeOut = await svix.EventType.UpdateAsync(\"event_type_name\", new EventTypeUpdate{\n description: \"A user has signed up\",\n archived: false,\n schemas: /* ... */,\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix event-type export-openapi " + "source": "svix event-type update \"event_type_name\" '{\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/export/openapi' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n }'" } - ], - "x-hidden": true + ] } }, - "/api/v1/event-type/import/openapi": { - "post": { - "description": "Given an OpenAPI spec, create new or update existing event types.\nIf an existing `archived` event type is updated, it will be unarchived.\n\nThe importer will convert all webhooks found in the either the `webhooks` or `x-webhooks`\ntop-level.", - "operationId": "v1.event-type.import-openapi", + "/api/v1/event-type/{event_type_name}/retry-schedule": { + "get": { + "description": "Gets the retry schedule for messages using the given event type.", + "operationId": "v1.event-type.get-retry-schedule", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The event type's name", + "in": "path", + "name": "event_type_name", + "required": true, "schema": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventTypeImportOpenApiIn" - } - } - }, - "description": "Import a list of event types from webhooks defined in an OpenAPI spec.\n\nThe OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventTypeImportOpenApiOut" + "$ref": "#/components/schemas/RetryScheduleInOut" } } }, @@ -24046,7 +26808,7 @@ "HTTPBearer": [] } ], - "summary": "Event Type Import From Openapi", + "summary": "Get Retry Schedule", "tags": [ "Event Type" ], @@ -24054,76 +26816,80 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const eventTypeImportOpenApiOut = await svix.eventType.importOpenapi({\n spec: {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n specRaw: \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n});" + "source": "const retryScheduleInOut = await svix.eventType.getRetrySchedule(\"event_type_name\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const eventTypeImportOpenApiOut = await svix.eventType.importOpenapi({\n spec: {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n specRaw: \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n});" + "source": "const retryScheduleInOut = await svix.eventType.getRetrySchedule(\"event_type_name\");" }, { "label": "Python", "lang": "Python", - "source": "event_type_import_open_api_out = svix.event_type.import_openapi(EventTypeImportOpenApiIn(\n spec={\"info\": {\"title\": \"Webhook Example\", \"version\": \"1.0.0\"}, \"openapi\": \"3.1.0\", \"webhooks\": {\"pet.new\": {\"post\": {\"requestBody\": {\"content\": {\"application/json\": {\"schema\": {\"properties\": {\"id\": {\"format\": \"int64\", \"type\": \"integer\"}, \"name\": {\"type\": \"string\"}, \"tag\": {\"type\": \"string\"}}, \"required\": [\"id\", \"name\"]}}}, \"description\": \"Information about a new pet in the system\"}, \"responses\": {\"200\": {\"description\": \"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n spec_raw=\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n), options=...)" + "source": "retry_schedule_in_out = svix.event_type.get_retry_schedule(\"event_type_name\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "event_type_import_open_api_out = await svix.event_type.import_openapi(EventTypeImportOpenApiIn(\n spec={\"info\": {\"title\": \"Webhook Example\", \"version\": \"1.0.0\"}, \"openapi\": \"3.1.0\", \"webhooks\": {\"pet.new\": {\"post\": {\"requestBody\": {\"content\": {\"application/json\": {\"schema\": {\"properties\": {\"id\": {\"format\": \"int64\", \"type\": \"integer\"}, \"name\": {\"type\": \"string\"}, \"tag\": {\"type\": \"string\"}}, \"required\": [\"id\", \"name\"]}}}, \"description\": \"Information about a new pet in the system\"}, \"responses\": {\"200\": {\"description\": \"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n spec_raw=\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n), options=...)" + "source": "retry_schedule_in_out = await svix.event_type.get_retry_schedule(\"event_type_name\")" }, { "label": "Go", "lang": "Go", - "source": "eventTypeImportOpenApiOut, err := svixClient.EventType.ImportOpenapi(ctx, &EventTypeImportOpenApiIn{\n Spec: map[interface{}]interface{}{\"info\": map[string]interface{}{\"title\": \"Webhook Example\", \"version\": \"1.0.0\"}, \"openapi\": \"3.1.0\", \"webhooks\": map[interface{}]interface{}{\"pet.new\": map[interface{}]interface{}{\"post\": map[interface{}]interface{}{\"requestBody\": map[interface{}]interface{}{\"content\": map[interface{}]interface{}{\"application/json\": map[interface{}]interface{}{\"schema\": map[interface{}]interface{}{\"properties\": map[interface{}]interface{}{\"id\": map[string]interface{}{\"format\": \"int64\", \"type\": \"integer\"}, \"name\": map[string]interface{}{\"type\": \"string\"}, \"tag\": map[string]interface{}{\"type\": \"string\"}}, \"required\": []string{\"id\", \"name\"}}}}, \"description\": \"Information about a new pet in the system\"}, \"responses\": map[interface{}]interface{}{\"200\": map[string]interface{}{\"description\": \"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n SpecRaw: \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\",\n})" + "source": "retryScheduleInOut, err := svixClient.EventType.GetRetrySchedule(ctx, \"event_type_name\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val eventTypeImportOpenApiOut = svix.eventType.importOpenapi(EventTypeImportOpenApiIn()\n .spec(/* ... */)\n .specRaw(\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\")\n)" + "source": "val retryScheduleInOut = svix.eventType.getRetrySchedule(\"event_type_name\")" }, { "label": "Java", "lang": "Java", - "source": "EventTypeImportOpenApiOut eventTypeImportOpenApiOut = svix.getEventType().importOpenapi(new EventTypeImportOpenApiIn()\n .spec(/* ... */)\n .specRaw(\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\")\n);" + "source": "RetryScheduleInOut retryScheduleInOut = svix.getEventType().getRetrySchedule(\"event_type_name\");" }, { "label": "Ruby", "lang": "Ruby", - "source": "event_type_import_open_api_out = svix.event_type.import_openapi(Svix::EventTypeImportOpenApiIn.new({\n \"spec\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n \"spec_raw\": \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n}))" + "source": "retry_schedule_in_out = svix.event_type.get_retry_schedule(\"event_type_name\")" }, { "label": "Rust", "lang": "Rust", - "source": "let event_type_import_open_api_out = svix.event_type().import_openapi(EventTypeImportOpenApiIn {\n spec: Some(json!({\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}})),\n spec_raw: Some(\"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\".to_string()),\n}, None).await?;" + "source": "let retry_schedule_in_out = svix.event_type().get_retry_schedule(\"event_type_name\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var eventTypeImportOpenApiOut = await svix.EventType.ImportOpenapiAsync(new EventTypeImportOpenApiIn{\n spec: /* ... */,\n specRaw: \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n});" + "source": "var retryScheduleInOut = await svix.EventType.GetRetryScheduleAsync(\"event_type_name\");" }, { "label": "CLI", "lang": "Shell", - "source": "svix event-type import-openapi '{\n \"spec\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n \"specRaw\": \"\n# Both YAML and JSON are supported\nopenapi: 3.1.0\ninfo:\n title: Webhook Example\n version: 1.0.0\n# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\nwebhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n\ncomponents:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n\"\n}'" + "source": "svix event-type get-retry-schedule \"event_type_name\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/import/openapi' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"spec\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n \"specRaw\": \"\n # Both YAML and JSON are supported\n openapi: 3.1.0\n info:\n title: Webhook Example\n version: 1.0.0\n # Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components\n webhooks:\n # Each webhook needs a name\n \"pet.new\":\n # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n post:\n requestBody:\n description: Information about a new pet in the system\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/Pet\"\n responses:\n \"200\":\n description: Return a 200 status to indicate that the data was received successfully\n \n components:\n schemas:\n Pet:\n required:\n - id\n - name\n properties:\n id:\n type: integer\n format: int64\n name:\n type: string\n tag:\n type: string\n \"\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/retry-schedule' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] - } - }, - "/api/v1/event-type/schema/generate-example": { - "post": { - "description": "Generates a fake example from the given JSONSchema.", - "operationId": "v1.event-type.generate-example", + ], + "x-hidden": true + }, + "put": { + "description": "Sets a retry schedule for all messages using the given event type.", + "operationId": "v1.event-type.update-retry-schedule", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The event type's name", + "in": "path", + "name": "event_type_name", + "required": true, "schema": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -24133,7 +26899,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventTypeSchemaIn" + "$ref": "#/components/schemas/RetryScheduleInOut" } } }, @@ -24144,7 +26910,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventTypeExampleOut" + "$ref": "#/components/schemas/RetryScheduleInOut" } } }, @@ -24226,7 +26992,7 @@ "HTTPBearer": [] } ], - "summary": "Generate Schema Example", + "summary": "Update Retry Schedule", "tags": [ "Event Type" ], @@ -24234,101 +27000,154 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const eventTypeExampleOut = await svix.eventType.generateExample({\n schema: {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n});" + "source": "const retryScheduleInOut = await svix.eventType.updateRetrySchedule(\"event_type_name\", {\n retrySchedule: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const eventTypeExampleOut = await svix.eventType.generateExample({\n schema: {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n});" + "source": "const retryScheduleInOut = await svix.eventType.updateRetrySchedule(\"event_type_name\", {\n retrySchedule: null\n});" }, { "label": "Python", "lang": "Python", - "source": "event_type_example_out = svix.event_type.generate_example(EventTypeSchemaIn(\n schema={\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}\n), options=...)" + "source": "retry_schedule_in_out = svix.event_type.update_retry_schedule(\"event_type_name\", RetryScheduleInOut(\n retry_schedule=None\n))" }, { "label": "Python (Async)", "lang": "Python", - "source": "event_type_example_out = await svix.event_type.generate_example(EventTypeSchemaIn(\n schema={\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}\n), options=...)" + "source": "retry_schedule_in_out = await svix.event_type.update_retry_schedule(\"event_type_name\", RetryScheduleInOut(\n retry_schedule=None\n))" }, { "label": "Go", "lang": "Go", - "source": "eventTypeExampleOut, err := svixClient.EventType.GenerateExample(ctx, &EventTypeSchemaIn{\n Schema: map[string]interface{}{\"description\": \"An invoice was paid by a user\", \"properties\": map[interface{}]interface{}{\"invoiceId\": map[string]interface{}{\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": map[string]interface{}{\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": []string{\"invoiceId\", \"userId\"}, \"title\": \"Invoice Paid Event\", \"type\": \"object\"},\n})" + "source": "retryScheduleInOut, err := svixClient.EventType.UpdateRetrySchedule(ctx, \"event_type_name\", &RetryScheduleInOut{\n RetrySchedule: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val eventTypeExampleOut = svix.eventType.generateExample(EventTypeSchemaIn()\n .schema(/* ... */)\n)" + "source": "val retryScheduleInOut = svix.eventType.updateRetrySchedule(\"event_type_name\", RetryScheduleInOut()\n .retrySchedule(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "EventTypeExampleOut eventTypeExampleOut = svix.getEventType().generateExample(new EventTypeSchemaIn()\n .schema(/* ... */)\n);" + "source": "RetryScheduleInOut retryScheduleInOut = svix.getEventType().updateRetrySchedule(\"event_type_name\", new RetryScheduleInOut()\n .retrySchedule(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "event_type_example_out = svix.event_type.generate_example(Svix::EventTypeSchemaIn.new({\n \"schema\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n}))" + "source": "retry_schedule_in_out = svix.event_type.update_retry_schedule(\"event_type_name\", Svix::RetryScheduleInOut.new({\n \"retry_schedule\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let event_type_example_out = svix.event_type().generate_example(EventTypeSchemaIn {\n schema: json!({\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}),\n}, None).await?;" + "source": "let retry_schedule_in_out = svix.event_type().update_retry_schedule(\"event_type_name\", RetryScheduleInOut {\n retry_schedule: None,\n}).await?;" }, { "label": "C#", "lang": "C#", - "source": "var eventTypeExampleOut = await svix.EventType.GenerateExampleAsync(new EventTypeSchemaIn{\n schema: /* ... */\n});" + "source": "var retryScheduleInOut = await svix.EventType.UpdateRetryScheduleAsync(\"event_type_name\", new RetryScheduleInOut{\n retrySchedule: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix event-type generate-example '{\n \"schema\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n}'" + "source": "svix event-type update-retry-schedule \"event_type_name\" '{\n \"retrySchedule\": null\n}'" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/schema/generate-example' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"schema\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/retry-schedule' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"retrySchedule\": null\n }'" } ], "x-hidden": true } }, - "/api/v1/event-type/{event_type_name}": { - "delete": { - "description": "Archive an event type.\n\nEndpoints already configured to filter on an event type will continue to do so after archival.\nHowever, new messages can not be sent with it and endpoints can not filter on it.\nAn event type can be unarchived with the\n[create operation](#operation/create_event_type_api_v1_event_type__post).", - "operationId": "v1.event-type.delete", + "/api/v1/events": { + "get": { + "description": "Reads the stream of operational webhook events for this environment.", + "operationId": "v1.events", "parameters": [ { - "description": "The event type's name", - "in": "path", - "name": "event_type_name", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "nullable": true, "type": "string" }, - "style": "simple" + "style": "form" }, { - "description": "By default event types are archived when \"deleted\". Passing this to `true` deletes them entirely.", + "description": "Filter response based on the event type", "in": "query", - "name": "expunge", + "name": "event_types", "schema": { - "default": false, - "description": "By default event types are archived when \"deleted\". Passing this to `true` deletes them entirely.", - "type": "boolean" + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" + }, + { + "description": "Filter response based on the event type.", + "in": "query", + "name": "channels", + "schema": { + "description": "Filter response based on the event type.", + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" + }, + { + "in": "query", + "name": "after", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" }, "style": "form" } ], "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageEventsOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -24406,102 +27225,27 @@ "HTTPBearer": [] } ], - "summary": "Delete Event Type", + "summary": "Events", "tags": [ - "Event Type" + "Events" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "await svix.eventType.delete(\"event_type_name\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "await svix.eventType.delete(\"event_type_name\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "svix.event_type.delete(\"event_type_name\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "await svix.event_type.delete(\"event_type_name\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "err := svixClient.EventType.Delete(ctx, \"event_type_name\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "svix.eventType.delete(\"event_type_name\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "svix.getEventType().delete(\"event_type_name\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "svix.event_type.delete(\"event_type_name\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "svix.event_type().delete(\"event_type_name\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "await svix.EventType.DeleteAsync(\"event_type_name\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix event-type delete \"event_type_name\"" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } - ] - }, - "get": { - "description": "Get an event type.", - "operationId": "v1.event-type.get", - "parameters": [ - { - "description": "The event type's name", - "in": "path", - "name": "event_type_name", - "required": true, - "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventTypeOut" - } - } - }, - "description": "" + "x-hidden": true + } + }, + "/api/v1/health": { + "get": { + "description": "Verify the API server is up and running.", + "operationId": "v1.health.get", + "responses": { + "204": { + "description": "no content" }, "400": { "content": { @@ -24574,92 +27318,29 @@ "description": "Too Many Requests" } }, - "security": [ - { - "HTTPBearer": [] - } - ], - "summary": "Get Event Type", + "summary": "Health", "tags": [ - "Event Type" + "Health" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const eventTypeOut = await svix.eventType.get(\"event_type_name\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const eventTypeOut = await svix.eventType.get(\"event_type_name\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "event_type_out = svix.event_type.get(\"event_type_name\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "event_type_out = await svix.event_type.get(\"event_type_name\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "eventTypeOut, err := svixClient.EventType.Get(ctx, \"event_type_name\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val eventTypeOut = svix.eventType.get(\"event_type_name\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "EventTypeOut eventTypeOut = svix.getEventType().get(\"event_type_name\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "event_type_out = svix.event_type.get(\"event_type_name\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let event_type_out = svix.event_type().get(\"event_type_name\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var eventTypeOut = await svix.EventType.GetAsync(\"event_type_name\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix event-type get \"event_type_name\"" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/health' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] - }, - "patch": { - "description": "Partially update an event type.", - "operationId": "v1.event-type.patch", + } + }, + "/api/v1/msg/broadcast": { + "post": { + "description": "Creates a background task to send the same message to each application in your organization.", + "operationId": "create_broadcast_message", "parameters": [ { - "description": "The event type's name", - "in": "path", - "name": "event_type_name", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -24669,18 +27350,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventTypePatch" + "$ref": "#/components/schemas/MessageBroadcastIn" } } }, "required": true }, "responses": { - "200": { + "202": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventTypeOut" + "$ref": "#/components/schemas/MessageBroadcastOut" } } }, @@ -24762,87 +27443,173 @@ "HTTPBearer": [] } ], - "summary": "Patch Event Type", + "summary": "Create Broadcast Message", "tags": [ - "Event Type" + "Broadcast" ], "x-codeSamples": [ { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const eventTypeOut = await svix.eventType.patch(\"event_type_name\", {\n schemas: {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const eventTypeOut = await svix.eventType.patch(\"event_type_name\", {\n schemas: {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" - }, + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/msg/broadcast' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n }'" + } + ], + "x-hidden": true + } + }, + "/api/v1/operational-webhook/endpoint": { + "get": { + "description": "List operational webhook endpoints.", + "operationId": "v1.operational-webhook.endpoint.list", + "parameters": [ { - "label": "Python", - "lang": "Python", - "source": "event_type_out = svix.event_type.patch(\"event_type_name\", EventTypePatch(\n schemas={\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n))" + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" }, { - "label": "Python (Async)", - "lang": "Python", - "source": "event_type_out = await svix.event_type.patch(\"event_type_name\", EventTypePatch(\n schemas={\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n))" + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "nullable": true, + "pattern": "^ep_[A-Za-z0-9]{27}$", + "type": "string" + }, + "style": "form" }, { - "label": "Go", - "lang": "Go", - "source": "eventTypeOut, err := svixClient.EventType.Patch(ctx, \"event_type_name\", &EventTypePatch{\n Schemas: map[string]interface{}{\"description\": \"An invoice was paid by a user\", \"properties\": map[interface{}]interface{}{\"invoiceId\": map[string]interface{}{\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": map[string]interface{}{\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": []string{\"invoiceId\", \"userId\"}, \"title\": \"Invoice Paid Event\", \"type\": \"object\"},\n FeatureFlag: \"cool-new-feature\",\n GroupName: \"user\",\n})" + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponse_OperationalWebhookEndpointOut_" + } + } + }, + "description": "" }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val eventTypeOut = svix.eventType.patch(\"event_type_name\", EventTypePatch()\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n)" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" }, - { - "label": "Java", - "lang": "Java", - "source": "EventTypeOut eventTypeOut = svix.getEventType().patch(\"event_type_name\", new EventTypePatch()\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n);" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Unauthorized" }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "event_type_out = svix.event_type.patch(\"event_type_name\", Svix::EventTypePatch.new({\n \"schemas\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n \"feature_flag\": \"cool-new-feature\",\n \"group_name\": \"user\"\n}))" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" }, - { - "label": "Rust", - "lang": "Rust", - "source": "let event_type_out = svix.event_type().patch(\"event_type_name\", EventTypePatch {\n schemas: Some(json!({\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"})),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n group_name: Some(\"user\".to_string()),\n}).await?;" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Not Found" }, - { - "label": "C#", - "lang": "C#", - "source": "var eventTypeOut = await svix.EventType.PatchAsync(\"event_type_name\", new EventTypePatch{\n schemas: /* ... */,\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix event-type patch \"event_type_name\" '{\n \"schemas\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n}'" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" + } + }, + "security": [ + { + "HTTPBearer": [] + } + ], + "summary": "List Operational Webhook Endpoints", + "tags": [ + "Webhook Endpoint" + ], + "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"schemas\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] }, - "put": { - "description": "Update an event type.", - "operationId": "v1.event-type.update", + "post": { + "description": "Create an operational webhook endpoint.", + "operationId": "v1.operational-webhook.endpoint.create", "parameters": [ { - "description": "The event type's name", - "in": "path", - "name": "event_type_name", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -24852,28 +27619,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventTypeUpdate" + "$ref": "#/components/schemas/OperationalWebhookEndpointIn" } } }, "required": true }, "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventTypeOut" - } - } - }, - "description": "" - }, "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventTypeOut" + "$ref": "#/components/schemas/OperationalWebhookEndpointOut" } } }, @@ -24955,88 +27712,34 @@ "HTTPBearer": [] } ], - "summary": "Update Event Type", + "summary": "Create Operational Webhook Endpoint", "tags": [ - "Event Type" + "Webhook Endpoint" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const eventTypeOut = await svix.eventType.update(\"event_type_name\", {\n description: \"A user has signed up\",\n archived: false,\n schemas: {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const eventTypeOut = await svix.eventType.update(\"event_type_name\", {\n description: \"A user has signed up\",\n archived: false,\n schemas: {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "event_type_out = svix.event_type.update(\"event_type_name\", EventTypeUpdate(\n description=\"A user has signed up\",\n archived=False,\n schemas={\"1\": {\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n))" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "event_type_out = await svix.event_type.update(\"event_type_name\", EventTypeUpdate(\n description=\"A user has signed up\",\n archived=False,\n schemas={\"1\": {\"description\": \"An invoice was paid by a user\", \"properties\": {\"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": {\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": [\"invoiceId\", \"userId\"], \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n feature_flag=\"cool-new-feature\",\n group_name=\"user\"\n))" - }, - { - "label": "Go", - "lang": "Go", - "source": "eventTypeOut, err := svixClient.EventType.Update(ctx, \"event_type_name\", &EventTypeUpdate{\n Description: \"A user has signed up\",\n Archived: false,\n Schemas: map[interface{}]interface{}{\"1\": map[string]interface{}{\"description\": \"An invoice was paid by a user\", \"properties\": map[interface{}]interface{}{\"invoiceId\": map[string]interface{}{\"description\": \"The invoice id\", \"type\": \"string\"}, \"userId\": map[string]interface{}{\"description\": \"The user id\", \"type\": \"string\"}}, \"required\": []string{\"invoiceId\", \"userId\"}, \"title\": \"Invoice Paid Event\", \"type\": \"object\"}},\n FeatureFlag: \"cool-new-feature\",\n GroupName: \"user\",\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val eventTypeOut = svix.eventType.update(\"event_type_name\", EventTypeUpdate()\n .description(\"A user has signed up\")\n .archived(false)\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "EventTypeOut eventTypeOut = svix.getEventType().update(\"event_type_name\", new EventTypeUpdate()\n .description(\"A user has signed up\")\n .archived(false)\n .schemas(/* ... */)\n .featureFlag(\"cool-new-feature\")\n .groupName(\"user\")\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "event_type_out = svix.event_type.update(\"event_type_name\", Svix::EventTypeUpdate.new({\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"feature_flag\": \"cool-new-feature\",\n \"group_name\": \"user\"\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let event_type_out = svix.event_type().update(\"event_type_name\", EventTypeUpdate {\n description: \"A user has signed up\".to_string(),\n archived: Some(false),\n schemas: Some(json!({\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}})),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n group_name: Some(\"user\".to_string()),\n}).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var eventTypeOut = await svix.EventType.UpdateAsync(\"event_type_name\", new EventTypeUpdate{\n description: \"A user has signed up\",\n archived: false,\n schemas: /* ... */,\n featureFlag: \"cool-new-feature\",\n groupName: \"user\"\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix event-type update \"event_type_name\" '{\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\",\n \"groupName\": \"user\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"disabled\": false,\n \"filterTypes\": [\"message.attempt.failing\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" } ] } }, - "/api/v1/event-type/{event_type_name}/retry-schedule": { - "get": { - "description": "Gets the retry schedule for messages using the given event type.", - "operationId": "v1.event-type.get-retry-schedule", + "/api/v1/operational-webhook/endpoint/{endpoint_id}": { + "delete": { + "description": "Delete an operational webhook endpoint.", + "operationId": "v1.operational-webhook.endpoint.delete", "parameters": [ { - "description": "The event type's name", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "event_type_name", + "name": "endpoint_id", "required": true, "schema": { - "description": "The event type's name", - "example": "user.signup", + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", "maxLength": 256, + "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, @@ -25044,15 +27747,8 @@ } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RetryScheduleInOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -25130,87 +27826,151 @@ "HTTPBearer": [] } ], - "summary": "Get Retry Schedule", + "summary": "Delete Operational Webhook Endpoint", "tags": [ - "Event Type" + "Webhook Endpoint" ], "x-codeSamples": [ { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const retryScheduleInOut = await svix.eventType.getRetrySchedule(\"event_type_name\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const retryScheduleInOut = await svix.eventType.getRetrySchedule(\"event_type_name\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "retry_schedule_in_out = svix.event_type.get_retry_schedule(\"event_type_name\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "retry_schedule_in_out = await svix.event_type.get_retry_schedule(\"event_type_name\")" - }, + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + } + ] + }, + "get": { + "description": "Get an operational webhook endpoint.", + "operationId": "v1.operational-webhook.endpoint.get", + "parameters": [ { - "label": "Go", - "lang": "Go", - "source": "retryScheduleInOut, err := svixClient.EventType.GetRetrySchedule(ctx, \"event_type_name\")" + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, + "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationalWebhookEndpointOut" + } + } + }, + "description": "" }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val retryScheduleInOut = svix.eventType.getRetrySchedule(\"event_type_name\")" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" }, - { - "label": "Java", - "lang": "Java", - "source": "RetryScheduleInOut retryScheduleInOut = svix.getEventType().getRetrySchedule(\"event_type_name\");" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Unauthorized" }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "retry_schedule_in_out = svix.event_type.get_retry_schedule(\"event_type_name\")" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" }, - { - "label": "Rust", - "lang": "Rust", - "source": "let retry_schedule_in_out = svix.event_type().get_retry_schedule(\"event_type_name\").await?;" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Not Found" }, - { - "label": "C#", - "lang": "C#", - "source": "var retryScheduleInOut = await svix.EventType.GetRetryScheduleAsync(\"event_type_name\");" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix event-type get-retry-schedule \"event_type_name\"" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" + } + }, + "security": [ + { + "HTTPBearer": [] + } + ], + "summary": "Get Operational Webhook Endpoint", + "tags": [ + "Webhook Endpoint" + ], + "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/retry-schedule' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] }, "put": { - "description": "Sets a retry schedule for all messages using the given event type.", - "operationId": "v1.event-type.update-retry-schedule", + "description": "Update an operational webhook endpoint.", + "operationId": "v1.operational-webhook.endpoint.update", "parameters": [ { - "description": "The event type's name", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "event_type_name", + "name": "endpoint_id", "required": true, "schema": { - "description": "The event type's name", - "example": "user.signup", + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", "maxLength": 256, + "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, @@ -25221,7 +27981,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RetryScheduleInOut" + "$ref": "#/components/schemas/OperationalWebhookEndpointUpdate" } } }, @@ -25232,7 +27992,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RetryScheduleInOut" + "$ref": "#/components/schemas/OperationalWebhookEndpointOut" } } }, @@ -25314,150 +28074,38 @@ "HTTPBearer": [] } ], - "summary": "Update Retry Schedule", + "summary": "Update Operational Webhook Endpoint", "tags": [ - "Event Type" + "Webhook Endpoint" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const retryScheduleInOut = await svix.eventType.updateRetrySchedule(\"event_type_name\", {\n retrySchedule: null\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const retryScheduleInOut = await svix.eventType.updateRetrySchedule(\"event_type_name\", {\n retrySchedule: null\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "retry_schedule_in_out = svix.event_type.update_retry_schedule(\"event_type_name\", RetryScheduleInOut(\n retry_schedule=None\n))" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "retry_schedule_in_out = await svix.event_type.update_retry_schedule(\"event_type_name\", RetryScheduleInOut(\n retry_schedule=None\n))" - }, - { - "label": "Go", - "lang": "Go", - "source": "retryScheduleInOut, err := svixClient.EventType.UpdateRetrySchedule(ctx, \"event_type_name\", &RetryScheduleInOut{\n RetrySchedule: nil,\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val retryScheduleInOut = svix.eventType.updateRetrySchedule(\"event_type_name\", RetryScheduleInOut()\n .retrySchedule(null)\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "RetryScheduleInOut retryScheduleInOut = svix.getEventType().updateRetrySchedule(\"event_type_name\", new RetryScheduleInOut()\n .retrySchedule(null)\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "retry_schedule_in_out = svix.event_type.update_retry_schedule(\"event_type_name\", Svix::RetryScheduleInOut.new({\n \"retry_schedule\": nil\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let retry_schedule_in_out = svix.event_type().update_retry_schedule(\"event_type_name\", RetryScheduleInOut {\n retry_schedule: None,\n}).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var retryScheduleInOut = await svix.EventType.UpdateRetryScheduleAsync(\"event_type_name\", new RetryScheduleInOut{\n retrySchedule: null\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix event-type update-retry-schedule \"event_type_name\" '{\n \"retrySchedule\": null\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/retry-schedule' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"retrySchedule\": null\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"disabled\": false,\n \"filterTypes\": [\"message.attempt.failing\"]\n }'" } - ], - "x-hidden": true + ] } }, - "/api/v1/events": { + "/api/v1/operational-webhook/endpoint/{endpoint_id}/headers": { "get": { - "description": "Reads the stream of operational webhook events for this environment.", - "operationId": "v1.events", + "description": "Get the additional headers to be sent with the operational webhook.", + "operationId": "v1.operational-webhook.endpoint.get-headers", "parameters": [ { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter response based on the event type", - "in": "query", - "name": "event_types", - "schema": { - "description": "Filter response based on the event type", - "items": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" - }, - { - "description": "Filter response based on the event type.", - "in": "query", - "name": "channels", - "schema": { - "description": "Filter response based on the event type.", - "items": { - "example": "project_1337", - "maxLength": 128, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "nullable": true, - "type": "array", - "uniqueItems": true - }, - "style": "form" - }, - { - "in": "query", - "name": "after", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { - "format": "date-time", - "nullable": true, + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "style": "form" + "style": "simple" } ], "responses": { @@ -25465,7 +28113,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageEventsOut" + "$ref": "#/components/schemas/OperationalWebhookEndpointHeadersOut" } } }, @@ -25547,24 +28195,48 @@ "HTTPBearer": [] } ], - "summary": "Events", + "summary": "Get Operational Webhook Endpoint Headers", "tags": [ - "Events" + "Webhook Endpoint" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + } + ] + }, + "put": { + "description": "Set the additional headers to be sent with the operational webhook.", + "operationId": "v1.operational-webhook.endpoint.update-headers", + "parameters": [ + { + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, + "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" } ], - "x-hidden": true - } - }, - "/api/v1/health": { - "get": { - "description": "Verify the API server is up and running.", - "operationId": "v1.health.get", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationalWebhookEndpointHeadersIn" + } + } + }, + "required": true + }, "responses": { "204": { "description": "no content" @@ -25640,50 +28312,51 @@ "description": "Too Many Requests" } }, - "summary": "Health", + "security": [ + { + "HTTPBearer": [] + } + ], + "summary": "Update Operational Webhook Endpoint Headers", "tags": [ - "Health" + "Webhook Endpoint" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/health' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" } ] } }, - "/api/v1/msg/broadcast": { - "post": { - "description": "Creates a background task to send the same message to each application in your organization.", - "operationId": "create_broadcast_message", + "/api/v1/operational-webhook/endpoint/{endpoint_id}/secret": { + "get": { + "description": "Get an operational webhook endpoint's signing secret.\n\nThis is used to verify the authenticity of the webhook.\nFor more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).", + "operationId": "v1.operational-webhook.endpoint.get-secret", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageBroadcastIn" - } - } - }, - "required": true - }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageBroadcastOut" + "$ref": "#/components/schemas/OperationalWebhookEndpointSecretOut" } } }, @@ -25765,75 +28438,62 @@ "HTTPBearer": [] } ], - "summary": "Create Broadcast Message", + "summary": "Get Operational Webhook Endpoint Secret", "tags": [ - "Broadcast" + "Webhook Endpoint" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/msg/broadcast' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}/secret' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] } }, - "/api/v1/operational-webhook/endpoint": { - "get": { - "description": "List operational webhook endpoints.", - "operationId": "v1.operational-webhook.endpoint.list", + "/api/v1/operational-webhook/endpoint/{endpoint_id}/secret/rotate": { + "post": { + "description": "Rotates an operational webhook endpoint's signing secret.\n\nThe previous secret will remain valid for the next 24 hours.", + "operationId": "v1.operational-webhook.endpoint.rotate-secret", "parameters": [ { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { - "description": "The iterator returned from a prior invocation", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 30, - "minLength": 30, - "nullable": true, - "pattern": "^ep_[A-Za-z0-9]{27}$", + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "style": "form" + "style": "simple" }, { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true + "type": "string" }, - "style": "form" + "style": "simple" } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResponse_OperationalWebhookEndpointOut_" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationalWebhookEndpointSecretIn" } - }, - "description": "" + } + }, + "required": true + }, + "responses": { + "204": { + "description": "no content" }, "400": { "content": { @@ -25911,7 +28571,7 @@ "HTTPBearer": [] } ], - "summary": "List Operational Webhook Endpoints", + "summary": "Rotate Operational Webhook Endpoint Secret", "tags": [ "Webhook Endpoint" ], @@ -25919,40 +28579,62 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}/secret/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" } ] - }, - "post": { - "description": "Create an operational webhook endpoint.", - "operationId": "v1.operational-webhook.endpoint.create", + } + }, + "/api/v1/stats/app/{app_id}/attempt": { + "get": { + "description": "Returns application-level statistics on message attempts", + "operationId": "v1.stats.app-attempts", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "Filter the range to data starting from this date.", + "in": "query", + "name": "startDate", + "schema": { + "description": "Filter the range to data starting from this date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter the range to data ending by this date.", + "in": "query", + "name": "endDate", + "schema": { + "description": "Filter the range to data ending by this date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "The Application's ID or UID.", + "in": "path", + "name": "app_id", + "required": true, "schema": { + "description": "The Application's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointIn" - } - } - }, - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointOut" + "$ref": "#/components/schemas/AttemptStatisticsResponse" } } }, @@ -26034,24 +28716,119 @@ "HTTPBearer": [] } ], - "summary": "Create Operational Webhook Endpoint", + "summary": "Get App Attempt Stats", "tags": [ - "Webhook Endpoint" + "Statistics" ], "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const attemptStatisticsResponse = await svix.stats.appAttempts(\"app_id\");" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const attemptStatisticsResponse = await svix.stats.appAttempts(\"app_id\");" + }, + { + "label": "Python", + "lang": "Python", + "source": "attempt_statistics_response = svix.stats.app_attempts(\"app_id\")" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "attempt_statistics_response = await svix.stats.app_attempts(\"app_id\")" + }, + { + "label": "Go", + "lang": "Go", + "source": "attemptStatisticsResponse, err := svixClient.Stats.AppAttempts(ctx, \"app_id\")" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val attemptStatisticsResponse = svix.stats.appAttempts(\"app_id\")" + }, + { + "label": "Java", + "lang": "Java", + "source": "AttemptStatisticsResponse attemptStatisticsResponse = svix.getStats().appAttempts(\"app_id\");" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "attempt_statistics_response = svix.stats.app_attempts(\"app_id\")" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let attempt_statistics_response = svix.stats().app_attempts(\"app_id\").await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var attemptStatisticsResponse = await svix.Stats.AppAttemptsAsync(\"app_id\");" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix stats app-attempts \"app_id\"" + }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"disabled\": false,\n \"filterTypes\": [\"message.attempt.failing\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stats/app/{app_id}/attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true } }, - "/api/v1/operational-webhook/endpoint/{endpoint_id}": { - "delete": { - "description": "Delete an operational webhook endpoint.", - "operationId": "v1.operational-webhook.endpoint.delete", + "/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt": { + "get": { + "description": "Returns endpoint-level statistics on message attempts.", + "operationId": "v1.stats.endpoint-attempts", "parameters": [ + { + "description": "Filter the range to data starting from this date.", + "in": "query", + "name": "startDate", + "schema": { + "description": "Filter the range to data starting from this date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter the range to data ending by this date.", + "in": "query", + "name": "endDate", + "schema": { + "description": "Filter the range to data ending by this date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "The Application's ID or UID.", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The Application's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + }, { "description": "The Endpoint's ID or UID.", "in": "path", @@ -26069,8 +28846,15 @@ } ], "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttemptStatisticsResponse" + } + } + }, + "description": "" }, "400": { "content": { @@ -26148,44 +28932,106 @@ "HTTPBearer": [] } ], - "summary": "Delete Operational Webhook Endpoint", + "summary": "Get Ep Stats", "tags": [ - "Webhook Endpoint" + "Statistics" ], "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const attemptStatisticsResponse = await svix.stats.endpointAttempts(\"app_id\", \"endpoint_id\");" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const attemptStatisticsResponse = await svix.stats.endpointAttempts(\"app_id\", \"endpoint_id\");" + }, + { + "label": "Python", + "lang": "Python", + "source": "attempt_statistics_response = svix.stats.endpoint_attempts(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "attempt_statistics_response = await svix.stats.endpoint_attempts(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Go", + "lang": "Go", + "source": "attemptStatisticsResponse, err := svixClient.Stats.EndpointAttempts(ctx, \"app_id\", \"endpoint_id\")" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val attemptStatisticsResponse = svix.stats.endpointAttempts(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Java", + "lang": "Java", + "source": "AttemptStatisticsResponse attemptStatisticsResponse = svix.getStats().endpointAttempts(\"app_id\", \"endpoint_id\");" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "attempt_statistics_response = svix.stats.endpoint_attempts(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let attempt_statistics_response = svix.stats().endpoint_attempts(\"app_id\", \"endpoint_id\").await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var attemptStatisticsResponse = await svix.Stats.EndpointAttemptsAsync(\"app_id\", \"endpoint_id\");" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix stats endpoint-attempts \"app_id\" \"endpoint_id\"" + }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] - }, - "get": { - "description": "Get an operational webhook endpoint.", - "operationId": "v1.operational-webhook.endpoint.get", + ], + "x-hidden": true + } + }, + "/api/v1/stats/usage/app": { + "post": { + "description": "Creates a background task to calculate the message destinations for all applications in the environment.\n\nNote that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to\nretrieve the results of the operation.", + "operationId": "v1.statistics.aggregate-app-stats", "parameters": [ { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppUsageStatsIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "202": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointOut" + "$ref": "#/components/schemas/AppUsageStatsOut" } } }, @@ -26267,54 +29113,84 @@ "HTTPBearer": [] } ], - "summary": "Get Operational Webhook Endpoint", + "summary": "Aggregate App Stats", "tags": [ - "Webhook Endpoint" + "Statistics" ], "x-codeSamples": [ { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } - ] - }, - "put": { - "description": "Update an operational webhook endpoint.", - "operationId": "v1.operational-webhook.endpoint.update", - "parameters": [ + "label": "JavaScript", + "lang": "JavaScript", + "source": "const appUsageStatsOut = await svix.statistics.aggregateAppStats({\n appIds: null\n});" + }, { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, - "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointUpdate" - } - } + "label": "TypeScript", + "lang": "JavaScript", + "source": "const appUsageStatsOut = await svix.statistics.aggregateAppStats({\n appIds: null\n});" }, - "required": true - }, + { + "label": "Python", + "lang": "Python", + "source": "app_usage_stats_out = svix.statistics.aggregate_app_stats(AppUsageStatsIn(\n app_ids=None\n), options=...)" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "app_usage_stats_out = await svix.statistics.aggregate_app_stats(AppUsageStatsIn(\n app_ids=None\n), options=...)" + }, + { + "label": "Go", + "lang": "Go", + "source": "appUsageStatsOut, err := svixClient.Statistics.AggregateAppStats(ctx, &AppUsageStatsIn{\n AppIds: nil,\n})" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val appUsageStatsOut = svix.statistics.aggregateAppStats(AppUsageStatsIn()\n .appIds(null)\n)" + }, + { + "label": "Java", + "lang": "Java", + "source": "AppUsageStatsOut appUsageStatsOut = svix.getStatistics().aggregateAppStats(new AppUsageStatsIn()\n .appIds(null)\n);" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "app_usage_stats_out = svix.statistics.aggregate_app_stats(Svix::AppUsageStatsIn.new({\n \"app_ids\": nil\n}))" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let app_usage_stats_out = svix.statistics().aggregate_app_stats(AppUsageStatsIn {\n app_ids: None,\n}, None).await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var appUsageStatsOut = await svix.Statistics.AggregateAppStatsAsync(new AppUsageStatsIn{\n appIds: null\n});" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix statistics aggregate-app-stats '{\n \"appIds\": null\n}'" + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stats/usage/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"appIds\": null\n }'" + } + ] + } + }, + "/api/v1/stats/usage/event-types": { + "put": { + "description": "Creates a background task to calculate the listed event types for all apps in the organization.\n\nNote that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to\nretrieve the results of the operation.", + "operationId": "v1.statistics.aggregate-event-types", "responses": { - "200": { + "202": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointOut" + "$ref": "#/components/schemas/AggregateEventTypesOut" } } }, @@ -26396,38 +29272,117 @@ "HTTPBearer": [] } ], - "summary": "Update Operational Webhook Endpoint", + "summary": "Aggregate Event Types", "tags": [ - "Webhook Endpoint" + "Statistics" ], "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const aggregateEventTypesOut = await svix.statistics.aggregateEventTypes();" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const aggregateEventTypesOut = await svix.statistics.aggregateEventTypes();" + }, + { + "label": "Python", + "lang": "Python", + "source": "aggregate_event_types_out = svix.statistics.aggregate_event_types()" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "aggregate_event_types_out = await svix.statistics.aggregate_event_types()" + }, + { + "label": "Go", + "lang": "Go", + "source": "aggregateEventTypesOut, err := svixClient.Statistics.AggregateEventTypes(ctx)" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val aggregateEventTypesOut = svix.statistics.aggregateEventTypes()" + }, + { + "label": "Java", + "lang": "Java", + "source": "AggregateEventTypesOut aggregateEventTypesOut = svix.getStatistics().aggregateEventTypes();" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "aggregate_event_types_out = svix.statistics.aggregate_event_types()" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let aggregate_event_types_out = svix.statistics().aggregate_event_types().await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var aggregateEventTypesOut = await svix.Statistics.AggregateEventTypesAsync();" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix statistics aggregate-event-types " + }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"disabled\": false,\n \"filterTypes\": [\"message.attempt.failing\"]\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stats/usage/event-types' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ] } }, - "/api/v1/operational-webhook/endpoint/{endpoint_id}/headers": { + "/api/v1/stream": { "get": { - "description": "Get the additional headers to be sent with the operational webhook.", - "operationId": "v1.operational-webhook.endpoint.get-headers", + "description": "List of all the organization's streams.", + "operationId": "v1.stream.stream.list", "parameters": [ { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "strm_2yZwUhtgs5Ai8T9yRQJXA", + "maxLength": 27, + "minLength": 27, + "nullable": true, + "pattern": "^strm_[A-Za-z0-9]{22}$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], "responses": { @@ -26435,7 +29390,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointHeadersOut" + "$ref": "#/components/schemas/ListResponse_StreamOut_" } } }, @@ -26517,33 +29472,28 @@ "HTTPBearer": [] } ], - "summary": "Get Operational Webhook Endpoint Headers", + "summary": "List Streams", "tags": [ - "Webhook Endpoint" + "Stream" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] + ], + "x-hidden": true }, - "put": { - "description": "Set the additional headers to be sent with the operational webhook.", - "operationId": "v1.operational-webhook.endpoint.update-headers", + "post": { + "description": "Creates a new stream.", + "operationId": "v1.stream.stream.create", "parameters": [ { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -26553,15 +29503,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointHeadersIn" + "$ref": "#/components/schemas/StreamIn" } } }, "required": true }, "responses": { - "204": { - "description": "no content" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StreamOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -26639,38 +29596,62 @@ "HTTPBearer": [] } ], - "summary": "Update Operational Webhook Endpoint Headers", + "summary": "Create Stream", "tags": [ - "Webhook Endpoint" + "Stream" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stream' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"uid\": \"unique-identifier\"\n }'" } - ] + ], + "x-hidden": true } }, - "/api/v1/operational-webhook/endpoint/{endpoint_id}/secret": { + "/api/v1/stream/event-type": { "get": { - "description": "Get an operational webhook endpoint's signing secret.\n\nThis is used to verify the authenticity of the webhook.\nFor more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).", - "operationId": "v1.operational-webhook.endpoint.get-secret", + "description": "List of all the organization's event types for streaming.", + "operationId": "v1.stream.event-type.list", "parameters": [ { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "user.signup", "maxLength": 256, - "minLength": 1, + "nullable": true, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], "responses": { @@ -26678,7 +29659,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointSecretOut" + "$ref": "#/components/schemas/ListResponse_StreamEventTypeOut_" } } }, @@ -26760,39 +29741,23 @@ "HTTPBearer": [] } ], - "summary": "Get Operational Webhook Endpoint Secret", + "summary": "List Stream Event Types", "tags": [ - "Webhook Endpoint" + "Stream Event Types" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}/secret' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] - } - }, - "/api/v1/operational-webhook/endpoint/{endpoint_id}/secret/rotate": { + ], + "x-hidden": true + }, "post": { - "description": "Rotates an operational webhook endpoint's signing secret.\n\nThe previous secret will remain valid for the next 24 hours.", - "operationId": "v1.operational-webhook.endpoint.rotate-secret", + "description": "Create an event type for Streams.", + "operationId": "v1.stream.event-type.create", "parameters": [ - { - "description": "The Endpoint's ID or UID.", - "in": "path", - "name": "endpoint_id", - "required": true, - "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, { "description": "The request's idempotency key", "in": "header", @@ -26807,15 +29772,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OperationalWebhookEndpointSecretIn" + "$ref": "#/components/schemas/StreamEventTypeIn" } } }, "required": true }, "responses": { - "204": { - "description": "no content" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StreamEventTypeOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -26893,58 +29865,34 @@ "HTTPBearer": [] } ], - "summary": "Rotate Operational Webhook Endpoint Secret", + "summary": "Create Stream Event Type", "tags": [ - "Webhook Endpoint" + "Stream Event Types" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/operational-webhook/endpoint/{endpoint_id}/secret/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": null\n }'" } - ] + ], + "x-hidden": true } }, - "/api/v1/stats/app/{app_id}/attempt": { - "get": { - "description": "Returns application-level statistics on message attempts", - "operationId": "v1.stats.app-attempts", + "/api/v1/stream/event-type/{name}": { + "delete": { + "description": "Delete an event type.", + "operationId": "v1.stream.event-type.delete", "parameters": [ { - "description": "Filter the range to data starting from this date.", - "in": "query", - "name": "startDate", - "schema": { - "description": "Filter the range to data starting from this date.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter the range to data ending by this date.", - "in": "query", - "name": "endDate", - "schema": { - "description": "Filter the range to data ending by this date.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "The Application's ID or UID.", + "description": "The event type's name", "in": "path", - "name": "app_id", + "name": "name", "required": true, "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", + "description": "The event type's name", + "example": "user.signup", "maxLength": 256, - "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, @@ -26952,15 +29900,8 @@ } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttemptStatisticsResponse" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -27038,129 +29979,32 @@ "HTTPBearer": [] } ], - "summary": "Get App Attempt Stats", + "summary": "Delete Stream Event Type", "tags": [ - "Statistics" + "Stream Event Types" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const attemptStatisticsResponse = await svix.stats.appAttempts(\"app_id\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const attemptStatisticsResponse = await svix.stats.appAttempts(\"app_id\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "attempt_statistics_response = svix.stats.app_attempts(\"app_id\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "attempt_statistics_response = await svix.stats.app_attempts(\"app_id\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "attemptStatisticsResponse, err := svixClient.Stats.AppAttempts(ctx, \"app_id\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val attemptStatisticsResponse = svix.stats.appAttempts(\"app_id\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "AttemptStatisticsResponse attemptStatisticsResponse = svix.getStats().appAttempts(\"app_id\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "attempt_statistics_response = svix.stats.app_attempts(\"app_id\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let attempt_statistics_response = svix.stats().app_attempts(\"app_id\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var attemptStatisticsResponse = await svix.Stats.AppAttemptsAsync(\"app_id\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix stats app-attempts \"app_id\"" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stats/app/{app_id}/attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type/{name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true - } - }, - "/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt": { + }, "get": { - "description": "Returns endpoint-level statistics on message attempts.", - "operationId": "v1.stats.endpoint-attempts", + "description": "Get an event type.", + "operationId": "v1.stream.event-type.get", "parameters": [ { - "description": "Filter the range to data starting from this date.", - "in": "query", - "name": "startDate", - "schema": { - "description": "Filter the range to data starting from this date.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Filter the range to data ending by this date.", - "in": "query", - "name": "endDate", - "schema": { - "description": "Filter the range to data ending by this date.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "The Application's ID or UID.", - "in": "path", - "name": "app_id", - "required": true, - "schema": { - "description": "The Application's ID or UID.", - "example": "unique-identifier", - "maxLength": 256, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "simple" - }, - { - "description": "The Endpoint's ID or UID.", + "description": "The event type's name", "in": "path", - "name": "endpoint_id", + "name": "name", "required": true, "schema": { - "description": "The Endpoint's ID or UID.", - "example": "unique-identifier", + "description": "The event type's name", + "example": "user.signup", "maxLength": 256, - "minLength": 1, "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, @@ -27172,7 +30016,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AttemptStatisticsResponse" + "$ref": "#/components/schemas/StreamEventTypeOut" } } }, @@ -27251,88 +30095,36 @@ }, "security": [ { - "HTTPBearer": [] - } - ], - "summary": "Get Ep Stats", - "tags": [ - "Statistics" - ], - "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const attemptStatisticsResponse = await svix.stats.endpointAttempts(\"app_id\", \"endpoint_id\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const attemptStatisticsResponse = await svix.stats.endpointAttempts(\"app_id\", \"endpoint_id\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "attempt_statistics_response = svix.stats.endpoint_attempts(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "attempt_statistics_response = await svix.stats.endpoint_attempts(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "attemptStatisticsResponse, err := svixClient.Stats.EndpointAttempts(ctx, \"app_id\", \"endpoint_id\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val attemptStatisticsResponse = svix.stats.endpointAttempts(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "AttemptStatisticsResponse attemptStatisticsResponse = svix.getStats().endpointAttempts(\"app_id\", \"endpoint_id\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "attempt_statistics_response = svix.stats.endpoint_attempts(\"app_id\", \"endpoint_id\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let attempt_statistics_response = svix.stats().endpoint_attempts(\"app_id\", \"endpoint_id\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var attemptStatisticsResponse = await svix.Stats.EndpointAttemptsAsync(\"app_id\", \"endpoint_id\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix stats endpoint-attempts \"app_id\" \"endpoint_id\"" - }, + "HTTPBearer": [] + } + ], + "summary": "Get Stream Event Type", + "tags": [ + "Stream Event Types" + ], + "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type/{name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true - } - }, - "/api/v1/stats/usage/app": { - "post": { - "description": "Creates a background task to calculate the message destinations for all applications in the environment.\n\nNote that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to\nretrieve the results of the operation.", - "operationId": "v1.statistics.aggregate-app-stats", + }, + "patch": { + "description": "Patch an event type for Streams.", + "operationId": "v1.stream.event-type.patch", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The event type's name", + "in": "path", + "name": "name", + "required": true, "schema": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -27342,18 +30134,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AppUsageStatsIn" + "$ref": "#/components/schemas/StreamEventTypePatch" } } }, "required": true }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AppUsageStatsOut" + "$ref": "#/components/schemas/StreamEventTypeOut" } } }, @@ -27435,84 +30227,64 @@ "HTTPBearer": [] } ], - "summary": "Aggregate App Stats", + "summary": "Patch Stream Event Type", "tags": [ - "Statistics" + "Stream Event Types" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const appUsageStatsOut = await svix.statistics.aggregateAppStats({\n appIds: null\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const appUsageStatsOut = await svix.statistics.aggregateAppStats({\n appIds: null\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "app_usage_stats_out = svix.statistics.aggregate_app_stats(AppUsageStatsIn(\n app_ids=None\n), options=...)" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "app_usage_stats_out = await svix.statistics.aggregate_app_stats(AppUsageStatsIn(\n app_ids=None\n), options=...)" - }, - { - "label": "Go", - "lang": "Go", - "source": "appUsageStatsOut, err := svixClient.Statistics.AggregateAppStats(ctx, &AppUsageStatsIn{\n AppIds: nil,\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val appUsageStatsOut = svix.statistics.aggregateAppStats(AppUsageStatsIn()\n .appIds(null)\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "AppUsageStatsOut appUsageStatsOut = svix.getStatistics().aggregateAppStats(new AppUsageStatsIn()\n .appIds(null)\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "app_usage_stats_out = svix.statistics.aggregate_app_stats(Svix::AppUsageStatsIn.new({\n \"app_ids\": nil\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let app_usage_stats_out = svix.statistics().aggregate_app_stats(AppUsageStatsIn {\n app_ids: None,\n}, None).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var appUsageStatsOut = await svix.Statistics.AggregateAppStatsAsync(new AppUsageStatsIn{\n appIds: null\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix statistics aggregate-app-stats '{\n \"appIds\": null\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stats/usage/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"appIds\": null\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type/{name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": null\n }'" } - ] - } - }, - "/api/v1/stats/usage/event-types": { + ], + "x-hidden": true + }, "put": { - "description": "Creates a background task to calculate the listed event types for all apps in the organization.\n\nNote that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to\nretrieve the results of the operation.", - "operationId": "v1.statistics.aggregate-event-types", + "description": "Update or create a event type for Streams.", + "operationId": "v1.stream.event-type.update", + "parameters": [ + { + "description": "The event type's name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StreamEventTypeIn" + } + } + }, + "required": true + }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AggregateEventTypesOut" + "$ref": "#/components/schemas/StreamEventTypeOut" + } + } + }, + "description": "" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StreamEventTypeOut" } } }, @@ -27594,117 +30366,150 @@ "HTTPBearer": [] } ], - "summary": "Aggregate Event Types", + "summary": "Update Stream Event Type", "tags": [ - "Statistics" + "Stream Event Types" ], "x-codeSamples": [ { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const aggregateEventTypesOut = await svix.statistics.aggregateEventTypes();" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const aggregateEventTypesOut = await svix.statistics.aggregateEventTypes();" - }, - { - "label": "Python", - "lang": "Python", - "source": "aggregate_event_types_out = svix.statistics.aggregate_event_types()" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "aggregate_event_types_out = await svix.statistics.aggregate_event_types()" - }, + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type/{name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": null\n }'" + } + ], + "x-hidden": true + } + }, + "/api/v1/stream/{stream_id}": { + "delete": { + "description": "Delete a stream.", + "operationId": "v1.stream.stream.delete", + "parameters": [ { - "label": "Go", - "lang": "Go", - "source": "aggregateEventTypesOut, err := svixClient.Statistics.AggregateEventTypes(ctx)" + "description": "The Stream's ID or UID.", + "in": "path", + "name": "stream_id", + "required": true, + "schema": { + "description": "The Stream's ID or UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "no content" }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val aggregateEventTypesOut = svix.statistics.aggregateEventTypes()" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" }, - { - "label": "Java", - "lang": "Java", - "source": "AggregateEventTypesOut aggregateEventTypesOut = svix.getStatistics().aggregateEventTypes();" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Unauthorized" }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "aggregate_event_types_out = svix.statistics.aggregate_event_types()" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" }, - { - "label": "Rust", - "lang": "Rust", - "source": "let aggregate_event_types_out = svix.statistics().aggregate_event_types().await?;" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Not Found" }, - { - "label": "C#", - "lang": "C#", - "source": "var aggregateEventTypesOut = await svix.Statistics.AggregateEventTypesAsync();" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix statistics aggregate-event-types " + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" + } + }, + "security": [ + { + "HTTPBearer": [] + } + ], + "summary": "Delete Stream", + "tags": [ + "Stream" + ], + "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stats/usage/event-types' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ] - } - }, - "/api/v1/stream": { + ], + "x-hidden": true + }, "get": { - "description": "List of all the organization's streams.", - "operationId": "v1.stream.stream.list", + "description": "Get a stream by id or uid.", + "operationId": "v1.stream.stream.get", "parameters": [ { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", + "description": "The Stream's ID or UID.", + "in": "path", + "name": "stream_id", + "required": true, "schema": { - "description": "The iterator returned from a prior invocation", - "example": "strm_2yZwUhtgs5Ai8T9yRQJXA", - "maxLength": 27, - "minLength": 27, - "nullable": true, - "pattern": "^strm_[A-Za-z0-9]{22}$", + "description": "The Stream's ID or UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, "type": "string" }, - "style": "form" - }, - { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", - "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true - }, - "style": "form" + "style": "simple" } ], "responses": { @@ -27712,7 +30517,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_StreamOut_" + "$ref": "#/components/schemas/StreamOut" } } }, @@ -27794,7 +30599,7 @@ "HTTPBearer": [] } ], - "summary": "List Streams", + "summary": "Get Stream", "tags": [ "Stream" ], @@ -27802,20 +30607,25 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true }, - "post": { - "description": "Creates a new stream.", - "operationId": "v1.stream.stream.create", + "patch": { + "description": "Partially update a stream.", + "operationId": "v1.stream.stream.patch", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Stream's ID or UID.", + "in": "path", + "name": "stream_id", + "required": true, "schema": { + "description": "The Stream's ID or UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, "type": "string" }, "style": "simple" @@ -27825,14 +30635,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamIn" + "$ref": "#/components/schemas/StreamPatch" } } }, "required": true }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { @@ -27918,7 +30728,7 @@ "HTTPBearer": [] } ], - "summary": "Create Stream", + "summary": "Patch Stream", "tags": [ "Stream" ], @@ -27926,62 +30736,56 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stream' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"uid\": \"unique-identifier\"\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"uid\": \"unique-identifier\"\n }'" } ], "x-hidden": true - } - }, - "/api/v1/stream/event-type": { - "get": { - "description": "List of all the organization's event types for streaming.", - "operationId": "v1.stream.event-type.list", + }, + "put": { + "description": "Update a stream.", + "operationId": "v1.stream.stream.update", "parameters": [ { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", + "description": "The Stream's ID or UID.", + "in": "path", + "name": "stream_id", + "required": true, "schema": { - "description": "The iterator returned from a prior invocation", - "example": "user.signup", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "The Stream's ID or UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, "type": "string" }, - "style": "form" - }, - { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", - "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true - }, - "style": "form" + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StreamIn" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_StreamEventTypeOut_" + "$ref": "#/components/schemas/StreamOut" + } + } + }, + "description": "" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StreamOut" } } }, @@ -28063,49 +30867,80 @@ "HTTPBearer": [] } ], - "summary": "List Stream Event Types", + "summary": "Update Stream", "tags": [ - "Stream Event Types" + "Stream" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"uid\": \"unique-identifier\"\n }'" } ], "x-hidden": true - }, - "post": { - "description": "Create an event type for Streams.", - "operationId": "v1.stream.event-type.create", + } + }, + "/api/v1/stream/{stream_id}/events": { + "get": { + "description": "Iterate over a stream of events.", + "operationId": "v1.stream.events.get", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Stream's ID or UID.", + "in": "path", + "name": "stream_id", + "required": true, + "schema": { + "description": "The Stream's ID or UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "after", "schema": { + "format": "date-time", + "nullable": true, "type": "string" }, - "style": "simple" + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StreamEventTypeIn" - } - } - }, - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamEventTypeOut" + "$ref": "#/components/schemas/EventStreamOut" } } }, @@ -28187,43 +31022,67 @@ "HTTPBearer": [] } ], - "summary": "Create Stream Event Type", + "summary": "Stream Events", "tags": [ - "Stream Event Types" + "Stream" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true - } - }, - "/api/v1/stream/event-type/{name}": { - "delete": { - "description": "Delete an event type.", - "operationId": "v1.stream.event-type.delete", + }, + "post": { + "description": "Creates events on the Stream.", + "operationId": "v1.stream.events.create", "parameters": [ { - "description": "The event type's name", + "description": "The Stream's ID or UID.", "in": "path", - "name": "name", + "name": "stream_id", "required": true, "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "The Stream's ID or UID.", + "example": "unique-identifier", + "maxLength": 60, + "minLength": 1, + "type": "string" + }, + "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { "type": "string" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateStreamIn" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "no content" + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateStreamOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -28301,36 +31160,63 @@ "HTTPBearer": [] } ], - "summary": "Delete Stream Event Type", + "summary": "Create Events", "tags": [ - "Stream Event Types" + "Stream" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type/{name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"stream\": null\n }'" } ], "x-hidden": true - }, + } + }, + "/api/v1/transformation-template": { "get": { - "description": "Get an event type.", - "operationId": "v1.stream.event-type.get", + "description": "List all transformation templates for an application.", + "operationId": "v1.beta.connector.list", "parameters": [ { - "description": "The event type's name", - "in": "path", - "name": "name", - "required": true, + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 34, + "minLength": 34, + "nullable": true, + "pattern": "^trtmpl_[A-Za-z0-9]{27}$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], "responses": { @@ -28338,7 +31224,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamEventTypeOut" + "$ref": "#/components/schemas/ListResponse_TemplateOut_" } } }, @@ -28420,33 +31306,28 @@ "HTTPBearer": [] } ], - "summary": "Get Stream Event Type", + "summary": "List Transformation Templates", "tags": [ - "Stream Event Types" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type/{name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/transformation-template' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true }, - "patch": { - "description": "Patch an event type for Streams.", - "operationId": "v1.stream.event-type.patch", + "post": { + "description": "Create a new connector.", + "operationId": "v1.beta.connector.create", "parameters": [ { - "description": "The event type's name", - "in": "path", - "name": "name", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -28456,18 +31337,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamEventTypePatch" + "$ref": "#/components/schemas/ConnectorIn" } } }, "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamEventTypeOut" + "$ref": "#/components/schemas/TemplateOut" } } }, @@ -28549,33 +31430,30 @@ "HTTPBearer": [] } ], - "summary": "Patch Stream Event Type", + "summary": "Create Transformation Template", "tags": [ - "Stream Event Types" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type/{name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n }'" } ], "x-hidden": true - }, - "put": { - "description": "Update or create a event type for Streams.", - "operationId": "v1.stream.event-type.update", + } + }, + "/api/v1/transformation-template/generate": { + "post": { + "description": "Use OpenAI's Completion API to generate code for a connector.", + "operationId": "v1.beta.connector.generate", "parameters": [ { - "description": "The event type's name", - "in": "path", - "name": "name", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The event type's name", - "example": "user.signup", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -28585,7 +31463,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamEventTypeIn" + "$ref": "#/components/schemas/GenerateIn" } } }, @@ -28596,17 +31474,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamEventTypeOut" - } - } - }, - "description": "" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StreamEventTypeOut" + "$ref": "#/components/schemas/GenerateOut" } } }, @@ -28688,43 +31556,55 @@ "HTTPBearer": [] } ], - "summary": "Update Stream Event Type", + "summary": "Generate", "tags": [ - "Stream Event Types" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stream/event-type/{name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/generate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" } ], "x-hidden": true } }, - "/api/v1/stream/{stream_id}": { - "delete": { - "description": "Delete a stream.", - "operationId": "v1.stream.stream.delete", + "/api/v1/transformation-template/oauth/discord": { + "post": { + "description": "Get Discord Incoming webhook URL.", + "operationId": "v1.beta.connector.oauth.discord", "parameters": [ { - "description": "The Stream's ID or UID.", - "in": "path", - "name": "stream_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Stream's ID or UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, "type": "string" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuthPayloadIn" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IncomingWebhookPayloadOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -28802,44 +31682,51 @@ "HTTPBearer": [] } ], - "summary": "Delete Stream", + "summary": "Authorize Discord", "tags": [ - "Stream" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/oauth/discord' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" } ], "x-hidden": true - }, - "get": { - "description": "Get a stream by id or uid.", - "operationId": "v1.stream.stream.get", + } + }, + "/api/v1/transformation-template/oauth/hubspot": { + "post": { + "description": "Get Hubspot access token using authorization code.", + "operationId": "v1.beta.connector.oauth.hubspot", "parameters": [ { - "description": "The Stream's ID or UID.", - "in": "path", - "name": "stream_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Stream's ID or UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, "type": "string" }, "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuthPayloadIn" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamOut" + "$ref": "#/components/schemas/OAuthPayloadOut" } } }, @@ -28921,33 +31808,30 @@ "HTTPBearer": [] } ], - "summary": "Get Stream", + "summary": "Authorize Hubspot", "tags": [ - "Stream" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/oauth/hubspot' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" } ], "x-hidden": true - }, - "patch": { - "description": "Partially update a stream.", - "operationId": "v1.stream.stream.patch", + } + }, + "/api/v1/transformation-template/oauth/slack": { + "post": { + "description": "Get Slack Incoming webhook URL.", + "operationId": "v1.beta.connector.oauth.slack", "parameters": [ { - "description": "The Stream's ID or UID.", - "in": "path", - "name": "stream_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Stream's ID or UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, "type": "string" }, "style": "simple" @@ -28957,7 +31841,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamPatch" + "$ref": "#/components/schemas/OAuthPayloadIn" } } }, @@ -28968,7 +31852,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamOut" + "$ref": "#/components/schemas/IncomingWebhookPayloadOut" } } }, @@ -29050,33 +31934,30 @@ "HTTPBearer": [] } ], - "summary": "Patch Stream", + "summary": "Authorize Slack", "tags": [ - "Stream" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"uid\": \"unique-identifier\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/oauth/slack' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" } ], "x-hidden": true - }, - "put": { - "description": "Update a stream.", - "operationId": "v1.stream.stream.update", + } + }, + "/api/v1/transformation-template/simulate": { + "post": { + "description": "Simulate running the transformation on the payload and code.", + "operationId": "v1.beta.connector.simulate", "parameters": [ { - "description": "The Stream's ID or UID.", - "in": "path", - "name": "stream_id", - "required": true, + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", "schema": { - "description": "The Stream's ID or UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, "type": "string" }, "style": "simple" @@ -29086,7 +31967,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamIn" + "$ref": "#/components/schemas/TransformationSimulateIn" } } }, @@ -29097,17 +31978,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamOut" - } - } - }, - "description": "" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StreamOut" + "$ref": "#/components/schemas/TransformationSimulateOut" } } }, @@ -29189,84 +32060,44 @@ "HTTPBearer": [] } ], - "summary": "Update Stream", + "summary": "Simulate", "tags": [ - "Stream" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"uid\": \"unique-identifier\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/simulate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n }'" } ], "x-hidden": true } }, - "/api/v1/stream/{stream_id}/events": { - "get": { - "description": "Iterate over a stream of events.", - "operationId": "v1.stream.events.get", + "/api/v1/transformation-template/{transformation_template_id}": { + "delete": { + "description": "Delete a connector.", + "operationId": "v1.beta.connector.delete", "parameters": [ { - "description": "The Stream's ID or UID.", + "description": "The TransformationTemplate's ID.", "in": "path", - "name": "stream_id", + "name": "transformation_template_id", "required": true, "schema": { - "description": "The Stream's ID or UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, + "description": "The TransformationTemplate's ID.", + "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 34, + "minLength": 34, + "pattern": "^trtmpl_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" - }, - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "after", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventStreamOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -29344,63 +32175,45 @@ "HTTPBearer": [] } ], - "summary": "Stream Events", + "summary": "Delete Transformation Template", "tags": [ - "Stream" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/{transformation_template_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true }, - "post": { - "description": "Creates events on the Stream.", - "operationId": "v1.stream.events.create", + "get": { + "description": "Get a connector.", + "operationId": "v1.beta.connector.get", "parameters": [ { - "description": "The Stream's ID or UID.", + "description": "The TransformationTemplate's ID.", "in": "path", - "name": "stream_id", + "name": "transformation_template_id", "required": true, "schema": { - "description": "The Stream's ID or UID.", - "example": "unique-identifier", - "maxLength": 60, - "minLength": 1, - "type": "string" - }, - "style": "simple" - }, - { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", - "schema": { + "description": "The TransformationTemplate's ID.", + "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 34, + "minLength": 34, + "pattern": "^trtmpl_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateStreamIn" - } - } - }, - "required": true - }, "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateStreamOut" + "$ref": "#/components/schemas/TemplateOut" } } }, @@ -29482,71 +32295,55 @@ "HTTPBearer": [] } ], - "summary": "Create Events", + "summary": "Get Transformation Template", "tags": [ - "Stream" + "Transformation Template" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stream/{stream_id}/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"stream\": null\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/{transformation_template_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } ], "x-hidden": true - } - }, - "/api/v1/transformation-template": { - "get": { - "description": "List all transformation templates for an application.", - "operationId": "v1.transformation-template.list", + }, + "patch": { + "description": "Partially update a connector.", + "operationId": "v1.beta.connector.patch", "parameters": [ { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", + "description": "The TransformationTemplate's ID.", + "in": "path", + "name": "transformation_template_id", + "required": true, "schema": { - "description": "The iterator returned from a prior invocation", + "description": "The TransformationTemplate's ID.", "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", "maxLength": 34, "minLength": 34, - "nullable": true, "pattern": "^trtmpl_[A-Za-z0-9]{27}$", "type": "string" }, - "style": "form" - }, - { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", - "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true - }, - "style": "form" + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplatePatch" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_TemplateOut_" + "$ref": "#/components/schemas/TemplateOut" } } }, @@ -29628,83 +32425,34 @@ "HTTPBearer": [] } ], - "summary": "List Transformation Templates", + "summary": "Patch Transformation Template", "tags": [ "Transformation Template" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const listResponseTemplateOut = await svix.transformationTemplate.list();" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const listResponseTemplateOut = await svix.transformationTemplate.list();" - }, - { - "label": "Python", - "lang": "Python", - "source": "list_response_template_out = svix.transformation_template.list(options=...)" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "list_response_template_out = await svix.transformation_template.list(options=...)" - }, - { - "label": "Go", - "lang": "Go", - "source": "listResponseTemplateOut, err := svixClient.TransformationTemplate.List(ctx, nil)" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val listResponseTemplateOut = svix.transformationTemplate.list()" - }, - { - "label": "Java", - "lang": "Java", - "source": "ListResponseTemplateOut listResponseTemplateOut = svix.getTransformationTemplate().list();" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "list_response_template_out = svix.transformation_template.list()" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let list_response_template_out = svix.transformation_template().list(None).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var listResponseTemplateOut = await svix.TransformationTemplate.ListAsync();" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix transformation-template list " - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/transformation-template' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/{transformation_template_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n }'" } ], "x-hidden": true }, - "post": { - "description": "Create a new transformation template.", - "operationId": "v1.transformation-template.create", + "put": { + "description": "Update a connector.", + "operationId": "v1.beta.connector.update", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The TransformationTemplate's ID.", + "in": "path", + "name": "transformation_template_id", + "required": true, "schema": { + "description": "The TransformationTemplate's ID.", + "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 34, + "minLength": 34, + "pattern": "^trtmpl_[A-Za-z0-9]{27}$", "type": "string" }, "style": "simple" @@ -29714,13 +32462,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConnectorIn" + "$ref": "#/components/schemas/TemplateUpdate" } } }, "required": true }, "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateOut" + } + } + }, + "description": "" + }, "201": { "content": { "application/json": { @@ -29807,106 +32565,71 @@ "HTTPBearer": [] } ], - "summary": "Create Transformation Template", + "summary": "Update Transformation Template", "tags": [ "Transformation Template" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const templateOut = await svix.transformationTemplate.create({\n instructionsLink: null,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const templateOut = await svix.transformationTemplate.create({\n instructionsLink: null,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "template_out = svix.transformation_template.create(ConnectorIn(\n instructions_link=None,\n filter_types=[\"user.signup\", \"user.deleted\"],\n feature_flag=\"cool-new-feature\"\n), options=...)" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "template_out = await svix.transformation_template.create(ConnectorIn(\n instructions_link=None,\n filter_types=[\"user.signup\", \"user.deleted\"],\n feature_flag=\"cool-new-feature\"\n), options=...)" - }, - { - "label": "Go", - "lang": "Go", - "source": "templateOut, err := svixClient.TransformationTemplate.Create(ctx, &ConnectorIn{\n InstructionsLink: nil,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n FeatureFlag: \"cool-new-feature\",\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val templateOut = svix.transformationTemplate.create(ConnectorIn()\n .instructionsLink(null)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .featureFlag(\"cool-new-feature\")\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "TemplateOut templateOut = svix.getTransformationTemplate().create(new ConnectorIn()\n .instructionsLink(null)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .featureFlag(\"cool-new-feature\")\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "template_out = svix.transformation_template.create(Svix::ConnectorIn.new({\n \"instructions_link\": nil,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"feature_flag\": \"cool-new-feature\"\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let template_out = svix.transformation_template().create(ConnectorIn {\n instructions_link: None,\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n}, None).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var templateOut = await svix.TransformationTemplate.CreateAsync(new ConnectorIn{\n instructionsLink: null,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix transformation-template create '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/{transformation_template_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n }'" } ], "x-hidden": true } }, - "/api/v1/transformation-template/generate": { - "post": { - "description": "Use OpenAI's Completion API to generate code for a transformation template.", - "operationId": "v1.transformation-template.generate", + "/ingest/api/v1/source/{source_id}/endpoint": { + "get": { + "description": "List ingest endpoints.", + "operationId": "v1.ingest.endpoint.list", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", "schema": { + "description": "The iterator returned from a prior invocation", + "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "maxLength": 30, + "minLength": 30, + "nullable": true, + "pattern": "^ep_[A-Za-z0-9]{27}$", "type": "string" }, - "style": "simple" + "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GenerateIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GenerateOut" + "$ref": "#/components/schemas/ListResponse_IngestEndpointOut_" } } }, @@ -29988,79 +32711,21 @@ "HTTPBearer": [] } ], - "summary": "Generate", + "summary": "List Ingest Endpoints", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const generateOut = await svix.transformationTemplate.generate(\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const generateOut = await svix.transformationTemplate.generate(\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "generate_out = svix.transformation_template.generate(GenerateIn\n), options=...)" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "generate_out = await svix.transformation_template.generate(GenerateIn\n), options=...)" - }, - { - "label": "Go", - "lang": "Go", - "source": "generateOut, err := svixClient.TransformationTemplate.Generate(ctx, &GenerateIn{\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val generateOut = svix.transformationTemplate.generate(GenerateIn()\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "GenerateOut generateOut = svix.getTransformationTemplate().generate(new GenerateIn()\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "generate_out = svix.transformation_template.generate(Svix::GenerateIn.new(\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let generate_out = svix.transformation_template().generate(GenerateIn {\n}, None).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var generateOut = await svix.TransformationTemplate.GenerateAsync(new GenerateIn\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix transformation-template generate '\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/generate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true - } - }, - "/api/v1/transformation-template/oauth/discord": { + ] + }, "post": { - "description": "Get Discord Incoming webhook URL.", - "operationId": "v1.transformation-template.oauth.discord", + "description": "Create an ingest endpoint.", + "operationId": "v1.ingest.endpoint.create", "parameters": [ { "description": "The request's idempotency key", @@ -30076,18 +32741,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuthPayloadIn" + "$ref": "#/components/schemas/IngestEndpointIn" } } }, "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IncomingWebhookPayloadOut" + "$ref": "#/components/schemas/IngestEndpointOut" } } }, @@ -30169,55 +32834,43 @@ "HTTPBearer": [] } ], - "summary": "Authorize Discord", + "summary": "Create Ingest Endpoint", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/oauth/discord' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"disabled\": false,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" } - ], - "x-hidden": true + ] } }, - "/api/v1/transformation-template/oauth/hubspot": { - "post": { - "description": "Get Hubspot access token using authorization code.", - "operationId": "v1.transformation-template.oauth.hubspot", + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}": { + "delete": { + "description": "Delete an ingest endpoint.", + "operationId": "v1.ingest.endpoint.delete", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthPayloadIn" - } - } - }, - "required": true - }, "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthPayloadOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -30295,51 +32948,44 @@ "HTTPBearer": [] } ], - "summary": "Authorize Hubspot", + "summary": "Delete Ingest Endpoint", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/oauth/hubspot' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true - } - }, - "/api/v1/transformation-template/oauth/slack": { - "post": { - "description": "Get Slack Incoming webhook URL.", - "operationId": "v1.transformation-template.oauth.slack", + ] + }, + "get": { + "description": "Get an ingest endpoint.", + "operationId": "v1.ingest.endpoint.get", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthPayloadIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IncomingWebhookPayloadOut" + "$ref": "#/components/schemas/IngestEndpointOut" } } }, @@ -30421,30 +33067,33 @@ "HTTPBearer": [] } ], - "summary": "Authorize Slack", + "summary": "Get Ingest Endpoint", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/oauth/slack' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true - } - }, - "/api/v1/transformation-template/simulate": { - "post": { - "description": "Simulate running the transformation on the payload and code.", - "operationId": "v1.transformation-template.simulate", + ] + }, + "put": { + "description": "Update an ingest endpoint.", + "operationId": "v1.ingest.endpoint.update", "parameters": [ { - "description": "The request's idempotency key", - "in": "header", - "name": "idempotency-key", + "description": "The Endpoint's ID or UID.", + "in": "path", + "name": "endpoint_id", + "required": true, "schema": { + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" @@ -30454,7 +33103,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransformationSimulateIn" + "$ref": "#/components/schemas/IngestEndpointUpdate" } } }, @@ -30465,7 +33114,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransformationSimulateOut" + "$ref": "#/components/schemas/IngestEndpointOut" } } }, @@ -30547,99 +33196,50 @@ "HTTPBearer": [] } ], - "summary": "Simulate", + "summary": "Update Ingest Endpoint", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const transformationSimulateOut = await svix.transformationTemplate.simulate({\n eventType: \"user.signup\",\n channels: null\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const transformationSimulateOut = await svix.transformationTemplate.simulate({\n eventType: \"user.signup\",\n channels: null\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "transformation_simulate_out = svix.transformation_template.simulate(TransformationSimulateIn(\n event_type=\"user.signup\",\n channels=None\n), options=...)" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "transformation_simulate_out = await svix.transformation_template.simulate(TransformationSimulateIn(\n event_type=\"user.signup\",\n channels=None\n), options=...)" - }, - { - "label": "Go", - "lang": "Go", - "source": "transformationSimulateOut, err := svixClient.TransformationTemplate.Simulate(ctx, &TransformationSimulateIn{\n EventType: \"user.signup\",\n Channels: nil,\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val transformationSimulateOut = svix.transformationTemplate.simulate(TransformationSimulateIn()\n .eventType(\"user.signup\")\n .channels(null)\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "TransformationSimulateOut transformationSimulateOut = svix.getTransformationTemplate().simulate(new TransformationSimulateIn()\n .eventType(\"user.signup\")\n .channels(null)\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "transformation_simulate_out = svix.transformation_template.simulate(Svix::TransformationSimulateIn.new({\n \"event_type\": \"user.signup\",\n \"channels\": nil\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let transformation_simulate_out = svix.transformation_template().simulate(TransformationSimulateIn {\n event_type: \"user.signup\".to_string(),\n channels: None,\n}, None).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var transformationSimulateOut = await svix.TransformationTemplate.SimulateAsync(new TransformationSimulateIn{\n eventType: \"user.signup\",\n channels: null\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix transformation-template simulate '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/simulate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"disabled\": false\n }'" } - ], - "x-hidden": true + ] } }, - "/api/v1/transformation-template/{transformation_template_id}": { - "delete": { - "description": "Delete a transformation template.", - "operationId": "v1.transformation-template.delete", + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers": { + "get": { + "description": "Get the additional headers to be sent with the ingest.", + "operationId": "v1.ingest.endpoint.get-headers", "parameters": [ { - "description": "The TransformationTemplate's ID.", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "transformation_template_id", + "name": "endpoint_id", "required": true, "schema": { - "description": "The TransformationTemplate's ID.", - "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 34, - "minLength": 34, - "pattern": "^trtmpl_[A-Za-z0-9]{27}$", + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], "responses": { - "204": { - "description": "no content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IngestEndpointHeadersOut" + } + } + }, + "description": "" }, "400": { "content": { @@ -30717,104 +33317,51 @@ "HTTPBearer": [] } ], - "summary": "Delete Transformation Template", + "summary": "Get Ingest Endpoint Headers", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "await svix.transformationTemplate.delete(\"transformation_template_id\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "await svix.transformationTemplate.delete(\"transformation_template_id\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "svix.transformation_template.delete(\"transformation_template_id\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "await svix.transformation_template.delete(\"transformation_template_id\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "err := svixClient.TransformationTemplate.Delete(ctx, \"transformation_template_id\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "svix.transformationTemplate.delete(\"transformation_template_id\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "svix.getTransformationTemplate().delete(\"transformation_template_id\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "svix.transformation_template.delete(\"transformation_template_id\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "svix.transformation_template().delete(\"transformation_template_id\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "await svix.TransformationTemplate.DeleteAsync(\"transformation_template_id\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix transformation-template delete \"transformation_template_id\"" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/{transformation_template_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true + ] }, - "get": { - "description": "Get a transformation template.", - "operationId": "v1.transformation-template.get", + "put": { + "description": "Set the additional headers to be sent to the endpoint.", + "operationId": "v1.ingest.endpoint.update-headers", "parameters": [ { - "description": "The TransformationTemplate's ID.", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "transformation_template_id", + "name": "endpoint_id", "required": true, "schema": { - "description": "The TransformationTemplate's ID.", - "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 34, - "minLength": 34, - "pattern": "^trtmpl_[A-Za-z0-9]{27}$", + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TemplateOut" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IngestEndpointHeadersIn" } - }, - "description": "" + } + }, + "required": true + }, + "responses": { + "204": { + "description": "no content" }, "400": { "content": { @@ -30892,110 +33439,46 @@ "HTTPBearer": [] } ], - "summary": "Get Transformation Template", + "summary": "Update Ingest Endpoint Headers", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const templateOut = await svix.transformationTemplate.get(\"transformation_template_id\");" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const templateOut = await svix.transformationTemplate.get(\"transformation_template_id\");" - }, - { - "label": "Python", - "lang": "Python", - "source": "template_out = svix.transformation_template.get(\"transformation_template_id\")" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "template_out = await svix.transformation_template.get(\"transformation_template_id\")" - }, - { - "label": "Go", - "lang": "Go", - "source": "templateOut, err := svixClient.TransformationTemplate.Get(ctx, \"transformation_template_id\")" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val templateOut = svix.transformationTemplate.get(\"transformation_template_id\")" - }, - { - "label": "Java", - "lang": "Java", - "source": "TemplateOut templateOut = svix.getTransformationTemplate().get(\"transformation_template_id\");" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "template_out = svix.transformation_template.get(\"transformation_template_id\")" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let template_out = svix.transformation_template().get(\"transformation_template_id\").await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var templateOut = await svix.TransformationTemplate.GetAsync(\"transformation_template_id\");" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix transformation-template get \"transformation_template_id\"" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/{transformation_template_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" } - ], - "x-hidden": true - }, - "patch": { - "description": "Partially update a transformation template.", - "operationId": "v1.transformation-template.patch", + ] + } + }, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret": { + "get": { + "description": "Get an ingest endpoint's signing secret.\n\nThis is used to verify the authenticity of the webhook.\nFor more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).", + "operationId": "v1.ingest.endpoint.get-secret", "parameters": [ { - "description": "The TransformationTemplate's ID.", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "transformation_template_id", + "name": "endpoint_id", "required": true, "schema": { - "description": "The TransformationTemplate's ID.", - "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 34, - "minLength": 34, - "pattern": "^trtmpl_[A-Za-z0-9]{27}$", + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", "type": "string" }, "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TemplatePatch" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TemplateOut" + "$ref": "#/components/schemas/IngestEndpointSecretOut" } } }, @@ -31077,89 +33560,44 @@ "HTTPBearer": [] } ], - "summary": "Patch Transformation Template", + "summary": "Get Ingest Endpoint Secret", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const templateOut = await svix.transformationTemplate.patch(\"transformation_template_id\", {\n instructionsLink: null,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const templateOut = await svix.transformationTemplate.patch(\"transformation_template_id\", {\n instructionsLink: null,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "template_out = svix.transformation_template.patch(\"transformation_template_id\", TemplatePatch(\n instructions_link=None,\n filter_types=[\"user.signup\", \"user.deleted\"],\n feature_flag=\"cool-new-feature\"\n))" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "template_out = await svix.transformation_template.patch(\"transformation_template_id\", TemplatePatch(\n instructions_link=None,\n filter_types=[\"user.signup\", \"user.deleted\"],\n feature_flag=\"cool-new-feature\"\n))" - }, - { - "label": "Go", - "lang": "Go", - "source": "templateOut, err := svixClient.TransformationTemplate.Patch(ctx, \"transformation_template_id\", &TemplatePatch{\n InstructionsLink: nil,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n FeatureFlag: \"cool-new-feature\",\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val templateOut = svix.transformationTemplate.patch(\"transformation_template_id\", TemplatePatch()\n .instructionsLink(null)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .featureFlag(\"cool-new-feature\")\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "TemplateOut templateOut = svix.getTransformationTemplate().patch(\"transformation_template_id\", new TemplatePatch()\n .instructionsLink(null)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .featureFlag(\"cool-new-feature\")\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "template_out = svix.transformation_template.patch(\"transformation_template_id\", Svix::TemplatePatch.new({\n \"instructions_link\": nil,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"feature_flag\": \"cool-new-feature\"\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let template_out = svix.transformation_template().patch(\"transformation_template_id\", TemplatePatch {\n instructions_link: None,\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n}).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var templateOut = await svix.TransformationTemplate.PatchAsync(\"transformation_template_id\", new TemplatePatch{\n instructionsLink: null,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix transformation-template patch \"transformation_template_id\" '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/{transformation_template_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" } - ], - "x-hidden": true - }, - "put": { - "description": "Update a transformation template.", - "operationId": "v1.transformation-template.update", + ] + } + }, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret/rotate": { + "post": { + "description": "Rotates an ingest endpoint's signing secret.\n\nThe previous secret will remain valid for the next 24 hours.", + "operationId": "v1.ingest.endpoint.rotate-secret", "parameters": [ { - "description": "The TransformationTemplate's ID.", + "description": "The Endpoint's ID or UID.", "in": "path", - "name": "transformation_template_id", + "name": "endpoint_id", "required": true, "schema": { - "description": "The TransformationTemplate's ID.", - "example": "trtmpl_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "maxLength": 34, - "minLength": 34, - "pattern": "^trtmpl_[A-Za-z0-9]{27}$", + "description": "The Endpoint's ID or UID.", + "example": "unique-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + }, + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { "type": "string" }, "style": "simple" @@ -31169,32 +33607,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TemplateUpdate" + "$ref": "#/components/schemas/IngestEndpointSecretIn" } } }, "required": true }, "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TemplateOut" - } - } - }, - "description": "" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TemplateOut" - } - } - }, - "description": "" + "204": { + "description": "no content" }, "400": { "content": { @@ -31272,73 +33693,17 @@ "HTTPBearer": [] } ], - "summary": "Update Transformation Template", + "summary": "Rotate Ingest Endpoint Secret", "tags": [ - "Transformation Template" + "Ingest Endpoint" ], "x-codeSamples": [ - { - "label": "JavaScript", - "lang": "JavaScript", - "source": "const templateOut = await svix.transformationTemplate.update(\"transformation_template_id\", {\n instructionsLink: null,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "TypeScript", - "lang": "JavaScript", - "source": "const templateOut = await svix.transformationTemplate.update(\"transformation_template_id\", {\n instructionsLink: null,\n filterTypes: [\"user.signup\", \"user.deleted\"],\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "Python", - "lang": "Python", - "source": "template_out = svix.transformation_template.update(\"transformation_template_id\", TemplateUpdate(\n instructions_link=None,\n filter_types=[\"user.signup\", \"user.deleted\"],\n feature_flag=\"cool-new-feature\"\n))" - }, - { - "label": "Python (Async)", - "lang": "Python", - "source": "template_out = await svix.transformation_template.update(\"transformation_template_id\", TemplateUpdate(\n instructions_link=None,\n filter_types=[\"user.signup\", \"user.deleted\"],\n feature_flag=\"cool-new-feature\"\n))" - }, - { - "label": "Go", - "lang": "Go", - "source": "templateOut, err := svixClient.TransformationTemplate.Update(ctx, \"transformation_template_id\", &TemplateUpdate{\n InstructionsLink: nil,\n FilterTypes: []string{\"user.signup\", \"user.deleted\"},\n FeatureFlag: \"cool-new-feature\",\n})" - }, - { - "label": "Kotlin", - "lang": "Kotlin", - "source": "val templateOut = svix.transformationTemplate.update(\"transformation_template_id\", TemplateUpdate()\n .instructionsLink(null)\n .filterTypes(arrayOf(\"user.signup\", \"user.deleted\"))\n .featureFlag(\"cool-new-feature\")\n)" - }, - { - "label": "Java", - "lang": "Java", - "source": "TemplateOut templateOut = svix.getTransformationTemplate().update(\"transformation_template_id\", new TemplateUpdate()\n .instructionsLink(null)\n .filterTypes(new String[]{\"user.signup\", \"user.deleted\"})\n .featureFlag(\"cool-new-feature\")\n);" - }, - { - "label": "Ruby", - "lang": "Ruby", - "source": "template_out = svix.transformation_template.update(\"transformation_template_id\", Svix::TemplateUpdate.new({\n \"instructions_link\": nil,\n \"filter_types\": [\"user.signup\", \"user.deleted\"],\n \"feature_flag\": \"cool-new-feature\"\n}))" - }, - { - "label": "Rust", - "lang": "Rust", - "source": "let template_out = svix.transformation_template().update(\"transformation_template_id\", TemplateUpdate {\n instructions_link: None,\n filter_types: Some(vec![\"user.signup\".to_string(), \"user.deleted\".to_string()]),\n feature_flag: Some(\"cool-new-feature\".to_string()),\n}).await?;" - }, - { - "label": "C#", - "lang": "C#", - "source": "var templateOut = await svix.TransformationTemplate.UpdateAsync(\"transformation_template_id\", new TemplateUpdate{\n instructionsLink: null,\n filterTypes: new string[] {\"user.signup\", \"user.deleted\"},\n featureFlag: \"cool-new-feature\"\n});" - }, - { - "label": "CLI", - "lang": "Shell", - "source": "svix transformation-template update \"transformation_template_id\" '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n}'" - }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/{transformation_template_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" } - ], - "x-hidden": true + ] } } }, @@ -31391,7 +33756,7 @@ }, { "description": "The background tasks that have been executed for your environment.", - "name": "Background Tasks" + "name": "Background Task" }, { "description": "Generate statistics about your Svix utilization", @@ -31404,6 +33769,10 @@ { "description": "Manage your environments like development, staging and production.", "name": "Environment" + }, + { + "description": "Configure where Svix Ingest sends messages.", + "name": "Ingest Endpoint" } ], "x-tagGroups": [ @@ -31412,7 +33781,7 @@ "tags": [ "Application", "Event Type", - "Background Tasks", + "Background Task", "Environment" ] }, @@ -31426,6 +33795,12 @@ "Integration" ] }, + { + "name": "Ingest", + "tags": [ + "Ingest Endpoint" + ] + }, { "name": "Utility", "tags": [ diff --git a/python/svix/api/ingest_endpoint.py b/python/svix/api/ingest_endpoint.py new file mode 100644 index 000000000..de5c31d0d --- /dev/null +++ b/python/svix/api/ingest_endpoint.py @@ -0,0 +1,323 @@ +# This file is @generated +import typing as t +from dataclasses import dataclass + +from .. import models +from ..models import ( + IngestEndpointHeadersIn, + IngestEndpointHeadersOut, + IngestEndpointIn, + IngestEndpointOut, + IngestEndpointSecretIn, + IngestEndpointSecretOut, + IngestEndpointUpdate, + ListResponseIngestEndpointOut, +) +from .common import ApiBase, BaseOptions, serialize_params + + +@dataclass +class IngestEndpointListOptions(BaseOptions): + limit: t.Optional[int] = None + """Limit the number of returned items""" + iterator: t.Optional[str] = None + """The iterator returned from a prior invocation""" + order: t.Optional[models.Ordering] = None + """The sorting order of the returned items""" + + def _query_params(self) -> t.Dict[str, str]: + return serialize_params( + { + "limit": self.limit, + "iterator": self.iterator, + "order": self.order, + } + ) + + +@dataclass +class IngestEndpointCreateOptions(BaseOptions): + idempotency_key: t.Optional[str] = None + + def _header_params(self) -> t.Dict[str, str]: + return serialize_params( + { + "idempotency-key": self.idempotency_key, + } + ) + + +@dataclass +class IngestEndpointRotateSecretOptions(BaseOptions): + idempotency_key: t.Optional[str] = None + + def _header_params(self) -> t.Dict[str, str]: + return serialize_params( + { + "idempotency-key": self.idempotency_key, + } + ) + + +class IngestEndpointAsync(ApiBase): + async def list( + self, options: IngestEndpointListOptions = IngestEndpointListOptions() + ) -> ListResponseIngestEndpointOut: + """List ingest endpoints.""" + response = await self._request_asyncio( + method="get", + path="/ingest/api/v1/source/{source_id}/endpoint", + path_params={}, + query_params=options._query_params(), + header_params=options._header_params(), + ) + return ListResponseIngestEndpointOut.model_validate(response.json()) + + async def create( + self, + ingest_endpoint_in: IngestEndpointIn, + options: IngestEndpointCreateOptions = IngestEndpointCreateOptions(), + ) -> IngestEndpointOut: + """Create an ingest endpoint.""" + response = await self._request_asyncio( + method="post", + path="/ingest/api/v1/source/{source_id}/endpoint", + path_params={}, + query_params=options._query_params(), + header_params=options._header_params(), + json_body=ingest_endpoint_in.model_dump_json( + exclude_unset=True, by_alias=True + ), + ) + return IngestEndpointOut.model_validate(response.json()) + + async def get(self, endpoint_id: str) -> IngestEndpointOut: + """Get an ingest endpoint.""" + response = await self._request_asyncio( + method="get", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + path_params={ + "endpoint_id": endpoint_id, + }, + ) + return IngestEndpointOut.model_validate(response.json()) + + async def update( + self, endpoint_id: str, ingest_endpoint_update: IngestEndpointUpdate + ) -> IngestEndpointOut: + """Update an ingest endpoint.""" + response = await self._request_asyncio( + method="put", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + path_params={ + "endpoint_id": endpoint_id, + }, + json_body=ingest_endpoint_update.model_dump_json( + exclude_unset=True, by_alias=True + ), + ) + return IngestEndpointOut.model_validate(response.json()) + + async def delete(self, endpoint_id: str) -> None: + """Delete an ingest endpoint.""" + await self._request_asyncio( + method="delete", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + path_params={ + "endpoint_id": endpoint_id, + }, + ) + + async def get_headers(self, endpoint_id: str) -> IngestEndpointHeadersOut: + """Get the additional headers to be sent with the ingest.""" + response = await self._request_asyncio( + method="get", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers", + path_params={ + "endpoint_id": endpoint_id, + }, + ) + return IngestEndpointHeadersOut.model_validate(response.json()) + + async def update_headers( + self, endpoint_id: str, ingest_endpoint_headers_in: IngestEndpointHeadersIn + ) -> None: + """Set the additional headers to be sent to the endpoint.""" + await self._request_asyncio( + method="put", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers", + path_params={ + "endpoint_id": endpoint_id, + }, + json_body=ingest_endpoint_headers_in.model_dump_json( + exclude_unset=True, by_alias=True + ), + ) + + async def get_secret(self, endpoint_id: str) -> IngestEndpointSecretOut: + """Get an ingest endpoint's signing secret. + + This is used to verify the authenticity of the webhook. + For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).""" + response = await self._request_asyncio( + method="get", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret", + path_params={ + "endpoint_id": endpoint_id, + }, + ) + return IngestEndpointSecretOut.model_validate(response.json()) + + async def rotate_secret( + self, + endpoint_id: str, + ingest_endpoint_secret_in: IngestEndpointSecretIn, + options: IngestEndpointRotateSecretOptions = IngestEndpointRotateSecretOptions(), + ) -> None: + """Rotates an ingest endpoint's signing secret. + + The previous secret will remain valid for the next 24 hours.""" + await self._request_asyncio( + method="post", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret/rotate", + path_params={ + "endpoint_id": endpoint_id, + }, + query_params=options._query_params(), + header_params=options._header_params(), + json_body=ingest_endpoint_secret_in.model_dump_json( + exclude_unset=True, by_alias=True + ), + ) + + +class IngestEndpoint(ApiBase): + def list( + self, options: IngestEndpointListOptions = IngestEndpointListOptions() + ) -> ListResponseIngestEndpointOut: + """List ingest endpoints.""" + response = self._request_sync( + method="get", + path="/ingest/api/v1/source/{source_id}/endpoint", + path_params={}, + query_params=options._query_params(), + header_params=options._header_params(), + ) + return ListResponseIngestEndpointOut.model_validate(response.json()) + + def create( + self, + ingest_endpoint_in: IngestEndpointIn, + options: IngestEndpointCreateOptions = IngestEndpointCreateOptions(), + ) -> IngestEndpointOut: + """Create an ingest endpoint.""" + response = self._request_sync( + method="post", + path="/ingest/api/v1/source/{source_id}/endpoint", + path_params={}, + query_params=options._query_params(), + header_params=options._header_params(), + json_body=ingest_endpoint_in.model_dump_json( + exclude_unset=True, by_alias=True + ), + ) + return IngestEndpointOut.model_validate(response.json()) + + def get(self, endpoint_id: str) -> IngestEndpointOut: + """Get an ingest endpoint.""" + response = self._request_sync( + method="get", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + path_params={ + "endpoint_id": endpoint_id, + }, + ) + return IngestEndpointOut.model_validate(response.json()) + + def update( + self, endpoint_id: str, ingest_endpoint_update: IngestEndpointUpdate + ) -> IngestEndpointOut: + """Update an ingest endpoint.""" + response = self._request_sync( + method="put", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + path_params={ + "endpoint_id": endpoint_id, + }, + json_body=ingest_endpoint_update.model_dump_json( + exclude_unset=True, by_alias=True + ), + ) + return IngestEndpointOut.model_validate(response.json()) + + def delete(self, endpoint_id: str) -> None: + """Delete an ingest endpoint.""" + self._request_sync( + method="delete", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + path_params={ + "endpoint_id": endpoint_id, + }, + ) + + def get_headers(self, endpoint_id: str) -> IngestEndpointHeadersOut: + """Get the additional headers to be sent with the ingest.""" + response = self._request_sync( + method="get", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers", + path_params={ + "endpoint_id": endpoint_id, + }, + ) + return IngestEndpointHeadersOut.model_validate(response.json()) + + def update_headers( + self, endpoint_id: str, ingest_endpoint_headers_in: IngestEndpointHeadersIn + ) -> None: + """Set the additional headers to be sent to the endpoint.""" + self._request_sync( + method="put", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers", + path_params={ + "endpoint_id": endpoint_id, + }, + json_body=ingest_endpoint_headers_in.model_dump_json( + exclude_unset=True, by_alias=True + ), + ) + + def get_secret(self, endpoint_id: str) -> IngestEndpointSecretOut: + """Get an ingest endpoint's signing secret. + + This is used to verify the authenticity of the webhook. + For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).""" + response = self._request_sync( + method="get", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret", + path_params={ + "endpoint_id": endpoint_id, + }, + ) + return IngestEndpointSecretOut.model_validate(response.json()) + + def rotate_secret( + self, + endpoint_id: str, + ingest_endpoint_secret_in: IngestEndpointSecretIn, + options: IngestEndpointRotateSecretOptions = IngestEndpointRotateSecretOptions(), + ) -> None: + """Rotates an ingest endpoint's signing secret. + + The previous secret will remain valid for the next 24 hours.""" + self._request_sync( + method="post", + path="/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret/rotate", + path_params={ + "endpoint_id": endpoint_id, + }, + query_params=options._query_params(), + header_params=options._header_params(), + json_body=ingest_endpoint_secret_in.model_dump_json( + exclude_unset=True, by_alias=True + ), + ) diff --git a/python/svix/api/message.py b/python/svix/api/message.py index 2f66a7b10..e262542e4 100644 --- a/python/svix/api/message.py +++ b/python/svix/api/message.py @@ -3,7 +3,12 @@ from dataclasses import dataclass from datetime import datetime -from ..models import ExpungAllContentsOut, ListResponseMessageOut, MessageIn, MessageOut +from ..models import ( + ExpungeAllContentsOut, + ListResponseMessageOut, + MessageIn, + MessageOut, +) from .common import ApiBase, BaseOptions, serialize_params @@ -174,7 +179,7 @@ async def expunge_all_contents( self, app_id: str, options: MessageExpungeAllContentsOptions = MessageExpungeAllContentsOptions(), - ) -> ExpungAllContentsOut: + ) -> ExpungeAllContentsOut: """Purge all message content for the application. Delete all message payloads for the application.""" @@ -187,7 +192,7 @@ async def expunge_all_contents( query_params=options._query_params(), header_params=options._header_params(), ) - return ExpungAllContentsOut.model_validate(response.json()) + return ExpungeAllContentsOut.model_validate(response.json()) async def get( self, app_id: str, msg_id: str, options: MessageGetOptions = MessageGetOptions() @@ -275,7 +280,7 @@ def expunge_all_contents( self, app_id: str, options: MessageExpungeAllContentsOptions = MessageExpungeAllContentsOptions(), - ) -> ExpungAllContentsOut: + ) -> ExpungeAllContentsOut: """Purge all message content for the application. Delete all message payloads for the application.""" @@ -288,7 +293,7 @@ def expunge_all_contents( query_params=options._query_params(), header_params=options._header_params(), ) - return ExpungAllContentsOut.model_validate(response.json()) + return ExpungeAllContentsOut.model_validate(response.json()) def get( self, app_id: str, msg_id: str, options: MessageGetOptions = MessageGetOptions() diff --git a/python/svix/models/__init__.py b/python/svix/models/__init__.py index 1594ad566..27c377b0f 100644 --- a/python/svix/models/__init__.py +++ b/python/svix/models/__init__.py @@ -39,7 +39,14 @@ from .event_type_out import EventTypeOut from .event_type_patch import EventTypePatch from .event_type_update import EventTypeUpdate -from .expung_all_contents_out import ExpungAllContentsOut +from .expunge_all_contents_out import ExpungeAllContentsOut +from .ingest_endpoint_headers_in import IngestEndpointHeadersIn +from .ingest_endpoint_headers_out import IngestEndpointHeadersOut +from .ingest_endpoint_in import IngestEndpointIn +from .ingest_endpoint_out import IngestEndpointOut +from .ingest_endpoint_secret_in import IngestEndpointSecretIn +from .ingest_endpoint_secret_out import IngestEndpointSecretOut +from .ingest_endpoint_update import IngestEndpointUpdate from .integration_in import IntegrationIn from .integration_key_out import IntegrationKeyOut from .integration_out import IntegrationOut @@ -49,6 +56,7 @@ from .list_response_endpoint_message_out import ListResponseEndpointMessageOut from .list_response_endpoint_out import ListResponseEndpointOut from .list_response_event_type_out import ListResponseEventTypeOut +from .list_response_ingest_endpoint_out import ListResponseIngestEndpointOut from .list_response_integration_out import ListResponseIntegrationOut from .list_response_message_attempt_out import ListResponseMessageAttemptOut from .list_response_message_endpoint_out import ListResponseMessageEndpointOut @@ -120,7 +128,14 @@ "EventTypeOut", "EventTypePatch", "EventTypeUpdate", - "ExpungAllContentsOut", + "ExpungeAllContentsOut", + "IngestEndpointHeadersIn", + "IngestEndpointHeadersOut", + "IngestEndpointIn", + "IngestEndpointOut", + "IngestEndpointSecretIn", + "IngestEndpointSecretOut", + "IngestEndpointUpdate", "IntegrationIn", "IntegrationKeyOut", "IntegrationOut", @@ -130,6 +145,7 @@ "ListResponseEndpointMessageOut", "ListResponseEndpointOut", "ListResponseEventTypeOut", + "ListResponseIngestEndpointOut", "ListResponseIntegrationOut", "ListResponseMessageAttemptOut", "ListResponseMessageEndpointOut", diff --git a/python/svix/models/endpoint_in.py b/python/svix/models/endpoint_in.py index 28b905391..5c46128da 100644 --- a/python/svix/models/endpoint_in.py +++ b/python/svix/models/endpoint_in.py @@ -14,6 +14,8 @@ class EndpointIn(BaseModel): filter_types: t.Optional[t.List[str]] = None + headers: t.Optional[t.Dict[str, str]] = None + metadata: t.Optional[t.Dict[str, str]] = None rate_limit: t.Optional[int] = None diff --git a/python/svix/models/expung_all_contents_out.py b/python/svix/models/expunge_all_contents_out.py similarity index 87% rename from python/svix/models/expung_all_contents_out.py rename to python/svix/models/expunge_all_contents_out.py index 6b5a91276..75d31e00b 100644 --- a/python/svix/models/expung_all_contents_out.py +++ b/python/svix/models/expunge_all_contents_out.py @@ -5,7 +5,7 @@ from .common import BaseModel -class ExpungAllContentsOut(BaseModel): +class ExpungeAllContentsOut(BaseModel): id: str """The QueueBackgroundTask's ID.""" diff --git a/python/svix/models/ingest_endpoint_headers_in.py b/python/svix/models/ingest_endpoint_headers_in.py new file mode 100644 index 000000000..93cdf2575 --- /dev/null +++ b/python/svix/models/ingest_endpoint_headers_in.py @@ -0,0 +1,8 @@ +# this file is @generated +import typing as t + +from .common import BaseModel + + +class IngestEndpointHeadersIn(BaseModel): + headers: t.Dict[str, str] diff --git a/python/svix/models/ingest_endpoint_headers_out.py b/python/svix/models/ingest_endpoint_headers_out.py new file mode 100644 index 000000000..82883db74 --- /dev/null +++ b/python/svix/models/ingest_endpoint_headers_out.py @@ -0,0 +1,10 @@ +# this file is @generated +import typing as t + +from .common import BaseModel + + +class IngestEndpointHeadersOut(BaseModel): + headers: t.Dict[str, str] + + sensitive: t.List[str] diff --git a/python/svix/models/ingest_endpoint_in.py b/python/svix/models/ingest_endpoint_in.py new file mode 100644 index 000000000..5f7ad6cbb --- /dev/null +++ b/python/svix/models/ingest_endpoint_in.py @@ -0,0 +1,25 @@ +# this file is @generated +import typing as t + +from .common import BaseModel + + +class IngestEndpointIn(BaseModel): + description: t.Optional[str] = None + + disabled: t.Optional[bool] = None + + metadata: t.Optional[t.Dict[str, str]] = None + + rate_limit: t.Optional[int] = None + + secret: t.Optional[str] = None + """The endpoint's verification secret. + + Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + It is recommended to not set this and let the server generate the secret.""" + + uid: t.Optional[str] = None + """Optional unique identifier for the endpoint.""" + + url: str diff --git a/python/svix/models/ingest_endpoint_out.py b/python/svix/models/ingest_endpoint_out.py new file mode 100644 index 000000000..ca224099d --- /dev/null +++ b/python/svix/models/ingest_endpoint_out.py @@ -0,0 +1,28 @@ +# this file is @generated +import typing as t +from datetime import datetime + +from .common import BaseModel + + +class IngestEndpointOut(BaseModel): + created_at: datetime + + description: str + """An example endpoint name.""" + + disabled: t.Optional[bool] = None + + id: str + """The Endpoint's ID.""" + + metadata: t.Dict[str, str] + + rate_limit: t.Optional[int] = None + + uid: t.Optional[str] = None + """Optional unique identifier for the endpoint.""" + + updated_at: datetime + + url: str diff --git a/python/svix/models/ingest_endpoint_secret_in.py b/python/svix/models/ingest_endpoint_secret_in.py new file mode 100644 index 000000000..b5bedf617 --- /dev/null +++ b/python/svix/models/ingest_endpoint_secret_in.py @@ -0,0 +1,12 @@ +# this file is @generated +import typing as t + +from .common import BaseModel + + +class IngestEndpointSecretIn(BaseModel): + key: t.Optional[str] = None + """The endpoint's verification secret. + + Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + It is recommended to not set this and let the server generate the secret.""" diff --git a/python/svix/models/ingest_endpoint_secret_out.py b/python/svix/models/ingest_endpoint_secret_out.py new file mode 100644 index 000000000..bc95cd370 --- /dev/null +++ b/python/svix/models/ingest_endpoint_secret_out.py @@ -0,0 +1,11 @@ +# this file is @generated + +from .common import BaseModel + + +class IngestEndpointSecretOut(BaseModel): + key: str + """The endpoint's verification secret. + + Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + It is recommended to not set this and let the server generate the secret.""" diff --git a/python/svix/models/ingest_endpoint_update.py b/python/svix/models/ingest_endpoint_update.py new file mode 100644 index 000000000..3ee26f8ef --- /dev/null +++ b/python/svix/models/ingest_endpoint_update.py @@ -0,0 +1,19 @@ +# this file is @generated +import typing as t + +from .common import BaseModel + + +class IngestEndpointUpdate(BaseModel): + description: t.Optional[str] = None + + disabled: t.Optional[bool] = None + + metadata: t.Optional[t.Dict[str, str]] = None + + rate_limit: t.Optional[int] = None + + uid: t.Optional[str] = None + """Optional unique identifier for the endpoint.""" + + url: str diff --git a/python/svix/models/list_response_ingest_endpoint_out.py b/python/svix/models/list_response_ingest_endpoint_out.py new file mode 100644 index 000000000..bd51d9af4 --- /dev/null +++ b/python/svix/models/list_response_ingest_endpoint_out.py @@ -0,0 +1,15 @@ +# this file is @generated +import typing as t + +from .common import BaseModel +from .ingest_endpoint_out import IngestEndpointOut + + +class ListResponseIngestEndpointOut(BaseModel): + data: t.List[IngestEndpointOut] + + done: bool + + iterator: t.Optional[str] + + prev_iterator: t.Optional[str] = None diff --git a/rust/src/api/ingest.rs b/rust/src/api/ingest.rs new file mode 100644 index 000000000..3f87a6822 --- /dev/null +++ b/rust/src/api/ingest.rs @@ -0,0 +1,16 @@ +use super::IngestEndpoint; +use crate::Configuration; + +pub struct Ingest<'a> { + cfg: &'a Configuration, +} + +impl<'a> Ingest<'a> { + pub(super) fn new(cfg: &'a Configuration) -> Self { + Self { cfg } + } + + pub fn endpoint(&self) -> IngestEndpoint<'a> { + IngestEndpoint::new(self.cfg) + } +} diff --git a/rust/src/api/ingest_endpoint.rs b/rust/src/api/ingest_endpoint.rs new file mode 100644 index 000000000..858a3baed --- /dev/null +++ b/rust/src/api/ingest_endpoint.rs @@ -0,0 +1,177 @@ +use crate::{error::Result, models::*, Configuration}; + +#[derive(Default)] +pub struct IngestEndpointListOptions { + /// Limit the number of returned items + pub limit: Option, + + /// The iterator returned from a prior invocation + pub iterator: Option, + + /// The sorting order of the returned items + pub order: Option, +} + +#[derive(Default)] +pub struct IngestEndpointCreateOptions { + pub idempotency_key: Option, +} + +#[derive(Default)] +pub struct IngestEndpointRotateSecretOptions { + pub idempotency_key: Option, +} + +pub struct IngestEndpoint<'a> { + cfg: &'a Configuration, +} + +impl<'a> IngestEndpoint<'a> { + pub(super) fn new(cfg: &'a Configuration) -> Self { + Self { cfg } + } + + /// List ingest endpoints. + pub async fn list( + &self, + options: Option, + ) -> Result { + let IngestEndpointListOptions { + limit, + iterator, + order, + } = options.unwrap_or_default(); + + crate::request::Request::new( + http1::Method::GET, + "/ingest/api/v1/source/{source_id}/endpoint", + ) + .with_optional_query_param("limit", limit) + .with_optional_query_param("iterator", iterator) + .with_optional_query_param("order", order) + .execute(self.cfg) + .await + } + + /// Create an ingest endpoint. + pub async fn create( + &self, + ingest_endpoint_in: IngestEndpointIn, + options: Option, + ) -> Result { + let IngestEndpointCreateOptions { idempotency_key } = options.unwrap_or_default(); + + crate::request::Request::new( + http1::Method::POST, + "/ingest/api/v1/source/{source_id}/endpoint", + ) + .with_optional_header_param("idempotency-key", idempotency_key) + .with_body_param(ingest_endpoint_in) + .execute(self.cfg) + .await + } + + /// Get an ingest endpoint. + pub async fn get(&self, endpoint_id: String) -> Result { + crate::request::Request::new( + http1::Method::GET, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + ) + .with_path_param("endpoint_id", endpoint_id) + .execute(self.cfg) + .await + } + + /// Update an ingest endpoint. + pub async fn update( + &self, + endpoint_id: String, + ingest_endpoint_update: IngestEndpointUpdate, + ) -> Result { + crate::request::Request::new( + http1::Method::PUT, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + ) + .with_path_param("endpoint_id", endpoint_id) + .with_body_param(ingest_endpoint_update) + .execute(self.cfg) + .await + } + + /// Delete an ingest endpoint. + pub async fn delete(&self, endpoint_id: String) -> Result<()> { + crate::request::Request::new( + http1::Method::DELETE, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}", + ) + .with_path_param("endpoint_id", endpoint_id) + .returns_nothing() + .execute(self.cfg) + .await + } + + /// Get the additional headers to be sent with the ingest. + pub async fn get_headers(&self, endpoint_id: String) -> Result { + crate::request::Request::new( + http1::Method::GET, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers", + ) + .with_path_param("endpoint_id", endpoint_id) + .execute(self.cfg) + .await + } + + /// Set the additional headers to be sent to the endpoint. + pub async fn update_headers( + &self, + endpoint_id: String, + ingest_endpoint_headers_in: IngestEndpointHeadersIn, + ) -> Result<()> { + crate::request::Request::new( + http1::Method::PUT, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers", + ) + .with_path_param("endpoint_id", endpoint_id) + .with_body_param(ingest_endpoint_headers_in) + .returns_nothing() + .execute(self.cfg) + .await + } + + /// Get an ingest endpoint's signing secret. + /// + /// This is used to verify the authenticity of the webhook. + /// For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/). + pub async fn get_secret(&self, endpoint_id: String) -> Result { + crate::request::Request::new( + http1::Method::GET, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret", + ) + .with_path_param("endpoint_id", endpoint_id) + .execute(self.cfg) + .await + } + + /// Rotates an ingest endpoint's signing secret. + /// + /// The previous secret will remain valid for the next 24 hours. + pub async fn rotate_secret( + &self, + endpoint_id: String, + ingest_endpoint_secret_in: IngestEndpointSecretIn, + options: Option, + ) -> Result<()> { + let IngestEndpointRotateSecretOptions { idempotency_key } = options.unwrap_or_default(); + + crate::request::Request::new( + http1::Method::POST, + "/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret/rotate", + ) + .with_path_param("endpoint_id", endpoint_id) + .with_optional_header_param("idempotency-key", idempotency_key) + .with_body_param(ingest_endpoint_secret_in) + .returns_nothing() + .execute(self.cfg) + .await + } +} diff --git a/rust/src/api/message.rs b/rust/src/api/message.rs index 6a0d2d59f..e7ebb6194 100644 --- a/rust/src/api/message.rs +++ b/rust/src/api/message.rs @@ -146,7 +146,7 @@ impl<'a> Message<'a> { &self, app_id: String, options: Option, - ) -> Result { + ) -> Result { let MessageExpungeAllContentsOptions { idempotency_key } = options.unwrap_or_default(); crate::request::Request::new( diff --git a/rust/src/api/mod.rs b/rust/src/api/mod.rs index dd3fefefa..30b9aa5dc 100644 --- a/rust/src/api/mod.rs +++ b/rust/src/api/mod.rs @@ -10,6 +10,8 @@ mod authentication; mod background_task; mod endpoint; mod event_type; +mod ingest; +mod ingest_endpoint; mod integration; mod message; mod message_attempt; @@ -34,6 +36,11 @@ pub use self::{ EventType, EventTypeCreateOptions, EventTypeDeleteOptions, EventTypeImportOpenapiOptions, EventTypeListOptions, }, + ingest::Ingest, + ingest_endpoint::{ + IngestEndpoint, IngestEndpointCreateOptions, IngestEndpointListOptions, + IngestEndpointRotateSecretOptions, + }, integration::{ Integration, IntegrationCreateOptions, IntegrationListOptions, IntegrationRotateKeyOptions, }, @@ -79,6 +86,10 @@ impl Svix { Endpoint::new(&self.cfg) } + pub fn ingest(&self) -> Ingest<'_> { + Ingest::new(&self.cfg) + } + pub fn integration(&self) -> Integration<'_> { Integration::new(&self.cfg) } diff --git a/rust/src/models/endpoint_in.rs b/rust/src/models/endpoint_in.rs index 1bc4adb09..9559a9ac3 100644 --- a/rust/src/models/endpoint_in.rs +++ b/rust/src/models/endpoint_in.rs @@ -17,6 +17,9 @@ pub struct EndpointIn { #[serde(skip_serializing_if = "Option::is_none")] pub filter_types: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub headers: Option>, + #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option>, @@ -51,6 +54,7 @@ impl EndpointIn { description: None, disabled: None, filter_types: None, + headers: None, metadata: None, rate_limit: None, secret: None, diff --git a/rust/src/models/expung_all_contents_out.rs b/rust/src/models/expunge_all_contents_out.rs similarity index 88% rename from rust/src/models/expung_all_contents_out.rs rename to rust/src/models/expunge_all_contents_out.rs index cddff475b..678abbca3 100644 --- a/rust/src/models/expung_all_contents_out.rs +++ b/rust/src/models/expunge_all_contents_out.rs @@ -6,7 +6,7 @@ use super::{ }; #[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] -pub struct ExpungAllContentsOut { +pub struct ExpungeAllContentsOut { /// The QueueBackgroundTask's ID. pub id: String, @@ -15,7 +15,7 @@ pub struct ExpungAllContentsOut { pub task: BackgroundTaskType, } -impl ExpungAllContentsOut { +impl ExpungeAllContentsOut { pub fn new(id: String, status: BackgroundTaskStatus, task: BackgroundTaskType) -> Self { Self { id, status, task } } diff --git a/rust/src/models/ingest_endpoint_headers_in.rs b/rust/src/models/ingest_endpoint_headers_in.rs new file mode 100644 index 000000000..cfd90a9de --- /dev/null +++ b/rust/src/models/ingest_endpoint_headers_in.rs @@ -0,0 +1,13 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct IngestEndpointHeadersIn { + pub headers: std::collections::HashMap, +} + +impl IngestEndpointHeadersIn { + pub fn new(headers: std::collections::HashMap) -> Self { + Self { headers } + } +} diff --git a/rust/src/models/ingest_endpoint_headers_out.rs b/rust/src/models/ingest_endpoint_headers_out.rs new file mode 100644 index 000000000..a77b8162c --- /dev/null +++ b/rust/src/models/ingest_endpoint_headers_out.rs @@ -0,0 +1,15 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct IngestEndpointHeadersOut { + pub headers: std::collections::HashMap, + + pub sensitive: Vec, +} + +impl IngestEndpointHeadersOut { + pub fn new(headers: std::collections::HashMap, sensitive: Vec) -> Self { + Self { headers, sensitive } + } +} diff --git a/rust/src/models/ingest_endpoint_in.rs b/rust/src/models/ingest_endpoint_in.rs new file mode 100644 index 000000000..d61e7629a --- /dev/null +++ b/rust/src/models/ingest_endpoint_in.rs @@ -0,0 +1,46 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct IngestEndpointIn { + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub disabled: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option>, + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + + /// The endpoint's verification secret. + /// + /// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + /// It is recommended to not set this and let the server generate the + /// secret. + #[serde(skip_serializing_if = "Option::is_none")] + pub secret: Option, + + /// Optional unique identifier for the endpoint. + #[serde(skip_serializing_if = "Option::is_none")] + pub uid: Option, + + pub url: String, +} + +impl IngestEndpointIn { + pub fn new(url: String) -> Self { + Self { + description: None, + disabled: None, + metadata: None, + rate_limit: None, + secret: None, + uid: None, + url, + } + } +} diff --git a/rust/src/models/ingest_endpoint_out.rs b/rust/src/models/ingest_endpoint_out.rs new file mode 100644 index 000000000..242683455 --- /dev/null +++ b/rust/src/models/ingest_endpoint_out.rs @@ -0,0 +1,55 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct IngestEndpointOut { + #[serde(rename = "createdAt")] + pub created_at: String, + + /// An example endpoint name. + pub description: String, + + #[serde(skip_serializing_if = "Option::is_none")] + pub disabled: Option, + + /// The Endpoint's ID. + pub id: String, + + pub metadata: std::collections::HashMap, + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + + /// Optional unique identifier for the endpoint. + #[serde(skip_serializing_if = "Option::is_none")] + pub uid: Option, + + #[serde(rename = "updatedAt")] + pub updated_at: String, + + pub url: String, +} + +impl IngestEndpointOut { + pub fn new( + created_at: String, + description: String, + id: String, + metadata: std::collections::HashMap, + updated_at: String, + url: String, + ) -> Self { + Self { + created_at, + description, + disabled: None, + id, + metadata, + rate_limit: None, + uid: None, + updated_at, + url, + } + } +} diff --git a/rust/src/models/ingest_endpoint_secret_in.rs b/rust/src/models/ingest_endpoint_secret_in.rs new file mode 100644 index 000000000..1cec12c68 --- /dev/null +++ b/rust/src/models/ingest_endpoint_secret_in.rs @@ -0,0 +1,19 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct IngestEndpointSecretIn { + /// The endpoint's verification secret. + /// + /// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + /// It is recommended to not set this and let the server generate the + /// secret. + #[serde(skip_serializing_if = "Option::is_none")] + pub key: Option, +} + +impl IngestEndpointSecretIn { + pub fn new() -> Self { + Self { key: None } + } +} diff --git a/rust/src/models/ingest_endpoint_secret_out.rs b/rust/src/models/ingest_endpoint_secret_out.rs new file mode 100644 index 000000000..1c8bef3ab --- /dev/null +++ b/rust/src/models/ingest_endpoint_secret_out.rs @@ -0,0 +1,18 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct IngestEndpointSecretOut { + /// The endpoint's verification secret. + /// + /// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + /// It is recommended to not set this and let the server generate the + /// secret. + pub key: String, +} + +impl IngestEndpointSecretOut { + pub fn new(key: String) -> Self { + Self { key } + } +} diff --git a/rust/src/models/ingest_endpoint_update.rs b/rust/src/models/ingest_endpoint_update.rs new file mode 100644 index 000000000..6950b83b7 --- /dev/null +++ b/rust/src/models/ingest_endpoint_update.rs @@ -0,0 +1,37 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct IngestEndpointUpdate { + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub disabled: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option>, + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + + /// Optional unique identifier for the endpoint. + #[serde(skip_serializing_if = "Option::is_none")] + pub uid: Option, + + pub url: String, +} + +impl IngestEndpointUpdate { + pub fn new(url: String) -> Self { + Self { + description: None, + disabled: None, + metadata: None, + rate_limit: None, + uid: None, + url, + } + } +} diff --git a/rust/src/models/list_response_ingest_endpoint_out.rs b/rust/src/models/list_response_ingest_endpoint_out.rs new file mode 100644 index 000000000..24274ab79 --- /dev/null +++ b/rust/src/models/list_response_ingest_endpoint_out.rs @@ -0,0 +1,29 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::ingest_endpoint_out::IngestEndpointOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseIngestEndpointOut { + pub data: Vec, + + pub done: bool, + + #[serde(skip_serializing_if = "Option::is_none")] + pub iterator: Option, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseIngestEndpointOut { + pub fn new(data: Vec, done: bool) -> Self { + Self { + data, + done, + iterator: None, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/mod.rs b/rust/src/models/mod.rs index 3d48911dc..d01e7e0b3 100644 --- a/rust/src/models/mod.rs +++ b/rust/src/models/mod.rs @@ -39,9 +39,16 @@ pub mod event_type_in; pub mod event_type_out; pub mod event_type_patch; pub mod event_type_update; -pub mod expung_all_contents_out; +pub mod expunge_all_contents_out; pub mod http_error_out; pub mod http_validation_error; +pub mod ingest_endpoint_headers_in; +pub mod ingest_endpoint_headers_out; +pub mod ingest_endpoint_in; +pub mod ingest_endpoint_out; +pub mod ingest_endpoint_secret_in; +pub mod ingest_endpoint_secret_out; +pub mod ingest_endpoint_update; pub mod integration_in; pub mod integration_key_out; pub mod integration_out; @@ -51,6 +58,7 @@ pub mod list_response_background_task_out; pub mod list_response_endpoint_message_out; pub mod list_response_endpoint_out; pub mod list_response_event_type_out; +pub mod list_response_ingest_endpoint_out; pub mod list_response_integration_out; pub mod list_response_message_attempt_endpoint_out; pub mod list_response_message_attempt_out; @@ -122,9 +130,16 @@ pub use self::{ event_type_out::EventTypeOut, event_type_patch::EventTypePatch, event_type_update::EventTypeUpdate, - expung_all_contents_out::ExpungAllContentsOut, + expunge_all_contents_out::ExpungeAllContentsOut, http_error_out::HttpErrorOut, http_validation_error::HttpValidationError, + ingest_endpoint_headers_in::IngestEndpointHeadersIn, + ingest_endpoint_headers_out::IngestEndpointHeadersOut, + ingest_endpoint_in::IngestEndpointIn, + ingest_endpoint_out::IngestEndpointOut, + ingest_endpoint_secret_in::IngestEndpointSecretIn, + ingest_endpoint_secret_out::IngestEndpointSecretOut, + ingest_endpoint_update::IngestEndpointUpdate, integration_in::IntegrationIn, integration_key_out::IntegrationKeyOut, integration_out::IntegrationOut, @@ -134,6 +149,7 @@ pub use self::{ list_response_endpoint_message_out::ListResponseEndpointMessageOut, list_response_endpoint_out::ListResponseEndpointOut, list_response_event_type_out::ListResponseEventTypeOut, + list_response_ingest_endpoint_out::ListResponseIngestEndpointOut, list_response_integration_out::ListResponseIntegrationOut, list_response_message_attempt_endpoint_out::ListResponseMessageAttemptEndpointOut, list_response_message_attempt_out::ListResponseMessageAttemptOut, diff --git a/svix-cli/src/cmds/api/ingest_endpoint.rs b/svix-cli/src/cmds/api/ingest_endpoint.rs new file mode 100644 index 000000000..1a289ce86 --- /dev/null +++ b/svix-cli/src/cmds/api/ingest_endpoint.rs @@ -0,0 +1,186 @@ +use chrono::{DateTime, Utc}; +use clap::{Args, Subcommand}; +use svix::api::*; + +use crate::json::JsonOf; + +#[derive(Args, Clone)] +pub struct IngestEndpointListOptions { + /// Limit the number of returned items + #[arg(long)] + pub limit: Option, + /// The iterator returned from a prior invocation + #[arg(long)] + pub iterator: Option, + /// The sorting order of the returned items + #[arg(long)] + pub order: Option, +} + +impl From for svix::api::IngestEndpointListOptions { + fn from(value: IngestEndpointListOptions) -> Self { + let IngestEndpointListOptions { + limit, + iterator, + order, + } = value; + Self { + limit, + iterator, + order, + } + } +} + +#[derive(Args, Clone)] +pub struct IngestEndpointCreateOptions { + #[arg(long)] + pub idempotency_key: Option, +} + +impl From for svix::api::IngestEndpointCreateOptions { + fn from(value: IngestEndpointCreateOptions) -> Self { + let IngestEndpointCreateOptions { idempotency_key } = value; + Self { idempotency_key } + } +} + +#[derive(Args, Clone)] +pub struct IngestEndpointRotateSecretOptions { + #[arg(long)] + pub idempotency_key: Option, +} + +impl From for svix::api::IngestEndpointRotateSecretOptions { + fn from(value: IngestEndpointRotateSecretOptions) -> Self { + let IngestEndpointRotateSecretOptions { idempotency_key } = value; + Self { idempotency_key } + } +} + +#[derive(Args)] +#[command(args_conflicts_with_subcommands = true, flatten_help = true)] +pub struct IngestEndpointArgs { + #[command(subcommand)] + pub command: IngestEndpointCommands, +} + +#[derive(Subcommand)] +pub enum IngestEndpointCommands { + /// List ingest endpoints. + List { + #[clap(flatten)] + options: IngestEndpointListOptions, + }, + /// Create an ingest endpoint. + Create { + ingest_endpoint_in: JsonOf, + #[clap(flatten)] + options: IngestEndpointCreateOptions, + }, + /// Get an ingest endpoint. + Get { endpoint_id: String }, + /// Update an ingest endpoint. + Update { + endpoint_id: String, + ingest_endpoint_update: JsonOf, + }, + /// Delete an ingest endpoint. + Delete { endpoint_id: String }, + /// Get the additional headers to be sent with the ingest. + GetHeaders { endpoint_id: String }, + /// Set the additional headers to be sent to the endpoint. + UpdateHeaders { + endpoint_id: String, + ingest_endpoint_headers_in: JsonOf, + }, + /// Get an ingest endpoint's signing secret. + /// + /// This is used to verify the authenticity of the webhook. + /// For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/). + GetSecret { endpoint_id: String }, + /// Rotates an ingest endpoint's signing secret. + /// + /// The previous secret will remain valid for the next 24 hours. + RotateSecret { + endpoint_id: String, + ingest_endpoint_secret_in: Option>, + #[clap(flatten)] + options: IngestEndpointRotateSecretOptions, + }, +} + +impl IngestEndpointCommands { + pub async fn exec( + self, + client: &Svix, + color_mode: colored_json::ColorMode, + ) -> anyhow::Result<()> { + match self { + Self::List { options } => { + let resp = client.ingest_endpoint().list(Some(options.into())).await?; + crate::json::print_json_output(&resp, color_mode)?; + } + Self::Create { + ingest_endpoint_in, + options, + } => { + let resp = client + .ingest_endpoint() + .create(ingest_endpoint_in.into_inner(), Some(options.into())) + .await?; + crate::json::print_json_output(&resp, color_mode)?; + } + Self::Get { endpoint_id } => { + let resp = client.ingest_endpoint().get(endpoint_id).await?; + crate::json::print_json_output(&resp, color_mode)?; + } + Self::Update { + endpoint_id, + ingest_endpoint_update, + } => { + let resp = client + .ingest_endpoint() + .update(endpoint_id, ingest_endpoint_update.into_inner()) + .await?; + crate::json::print_json_output(&resp, color_mode)?; + } + Self::Delete { endpoint_id } => { + client.ingest_endpoint().delete(endpoint_id).await?; + } + Self::GetHeaders { endpoint_id } => { + let resp = client.ingest_endpoint().get_headers(endpoint_id).await?; + crate::json::print_json_output(&resp, color_mode)?; + } + Self::UpdateHeaders { + endpoint_id, + ingest_endpoint_headers_in, + } => { + client + .ingest_endpoint() + .update_headers(endpoint_id, ingest_endpoint_headers_in.into_inner()) + .await?; + } + Self::GetSecret { endpoint_id } => { + let resp = client.ingest_endpoint().get_secret(endpoint_id).await?; + crate::json::print_json_output(&resp, color_mode)?; + } + Self::RotateSecret { + endpoint_id, + ingest_endpoint_secret_in, + options, + } => { + client + .ingest_endpoint() + .rotate_secret( + endpoint_id, + ingest_endpoint_secret_in.unwrap_or_default().into_inner(), + Some(options.into()), + ) + .await?; + } + } + + Ok(()) + } +} diff --git a/svix-cli/src/cmds/api/mod.rs b/svix-cli/src/cmds/api/mod.rs index cf4de9e0b..25491c541 100644 --- a/svix-cli/src/cmds/api/mod.rs +++ b/svix-cli/src/cmds/api/mod.rs @@ -5,3 +5,5 @@ pub mod event_type; pub mod integration; pub mod message; pub mod message_attempt; +// FIXME: Needs some template changes to compile +//pub mod ingest_endpoint;