Skip to content

Commit

Permalink
Adding pipelines binding types
Browse files Browse the repository at this point in the history
  • Loading branch information
oliy authored and hhoughgg committed Sep 4, 2024
1 parent 1ed0dea commit 7d8c7e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
14 changes: 0 additions & 14 deletions types/defines/pipeline-transform.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,3 @@ export abstract class PipelineTransform {
public transformJson(data: object[]): Promise<object[]>;
}

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<PipelineResponse>
}
13 changes: 13 additions & 0 deletions types/defines/pipelines.d.ts
Original file line number Diff line number Diff line change
@@ -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<void>
}

0 comments on commit 7d8c7e3

Please sign in to comment.