Skip to content

Commit e9a48f2

Browse files
authored
Adding 'annotations' to component typing for actions (#18511)
* Adding 'annotations' to component typing for actions * Package bump * Adding idempotentHint * adding skiplibcheck * Removing unused ban-types rule
1 parent f0ff38b commit e9a48f2

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/types",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "Pipedream TypeScript types",
55
"keywords": [
66
"pipedream",

types/src/index.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/ban-types */
21
/* eslint-disable @typescript-eslint/no-explicit-any */
32
export type JSONValue =
43
| string
@@ -70,7 +69,7 @@ export interface HTTPResponse {
7069
/**
7170
* Http Body
7271
*/
73-
body: string | Buffer | NodeJS.ReadableStream;
72+
body: string | Buffer | ReadableStream;
7473
/**
7574
* If true, issue the response when the promise returned is resolved, otherwise issue
7675
* the response at the end of the workflow execution
@@ -115,13 +114,13 @@ export interface IApi {
115114

116115
export interface IFile {
117116
delete(): Promise<void>;
118-
createReadStream(): Promise<NodeJS.ReadableStream>;
119-
createWriteStream(contentType?: string, contentLength?: number): Promise<NodeJS.WritableStream>;
117+
createReadStream(): Promise<ReadableStream>;
118+
createWriteStream(contentType?: string, contentLength?: number): Promise<WritableStream>;
120119
toEncodedString(encoding?: string, start?: number, end?: number): Promise<string>;
121120
toUrl(): Promise<string>;
122121
toFile(localFilePath: string): Promise<void>;
123122
toBuffer(): Promise<Buffer>;
124-
fromReadableStream(readableStream: NodeJS.ReadableStream, contentType?: string, contentSize?: number): Promise<IFile>;
123+
fromReadableStream(readableStream: ReadableStream, contentType?: string, contentSize?: number): Promise<IFile>;
125124
fromFile(localFilePath: string, contentType?: string): Promise<IFile>;
126125
fromUrl(url: string, options?: any): Promise<IFile>;
127126
toJSON(): any;
@@ -384,6 +383,12 @@ export interface Action<
384383
type: "action";
385384
methods?: Methods & ThisType<PropThis<ActionPropDefinitions> & Methods>;
386385
props?: ActionPropDefinitions;
386+
annotations?: {
387+
destructiveHint?: boolean;
388+
idempotentHint?: boolean;
389+
openWorldHint?: boolean;
390+
readOnlyHint?: boolean;
391+
}
387392
additionalProps?: (
388393
previousPropDefs: ActionPropDefinitions
389394
) => Promise<ActionPropDefinitions>;

types/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"lib": ["es6"],
1212
"strictFunctionTypes": true,
1313
"strictNullChecks": true,
14+
"skipLibCheck": true, /* Skip type checking of declaration files in node_modules. */
1415
"baseUrl": ".",
1516
"paths": { "@pipedream/types": ["."] }
1617
},

0 commit comments

Comments
 (0)