From 7d8c7e39c279759230b4b4d83b940eada72a33e6 Mon Sep 17 00:00:00 2001 From: Oli Yu Date: Wed, 4 Sep 2024 14:30:09 -0500 Subject: [PATCH] Adding pipelines binding types --- types/defines/pipeline-transform.d.ts | 14 -------------- types/defines/pipelines.d.ts | 13 +++++++++++++ 2 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 types/defines/pipelines.d.ts diff --git a/types/defines/pipeline-transform.d.ts b/types/defines/pipeline-transform.d.ts index b07665f3e601..8b3c89efe7b4 100644 --- a/types/defines/pipeline-transform.d.ts +++ b/types/defines/pipeline-transform.d.ts @@ -12,17 +12,3 @@ export abstract class PipelineTransform { public transformJson(data: object[]): Promise; } -export type PipelineResponse = { - success: boolean - error?: string -} - -export interface Pipeline { - /** - * send recieves an array of javascript objects which are sent - * into the pipeline for processing via binding - * @param data The data to be send - * @returns A promise containing the outcome of the send - */ - send(data: object[]): Promise -} diff --git a/types/defines/pipelines.d.ts b/types/defines/pipelines.d.ts new file mode 100644 index 000000000000..7ed2d312c212 --- /dev/null +++ b/types/defines/pipelines.d.ts @@ -0,0 +1,13 @@ +// Copyright (c) 2022-2023 Cloudflare, Inc. +// Licensed under the Apache 2.0 license found in the LICENSE file or at: +// https://opensource.org/licenses/Apache-2.0 + +export interface Pipeline { + /** + * send takes an array of javascript objects which are + * then received by the pipeline for processing + * + * @param data The data to be sent + */ + send(data: object[]): Promise +}