@types/graphql-upload
Advanced tools
Comparing version 8.0.12 to 15.0.0
@@ -1,53 +0,11 @@ | ||
// Type definitions for graphql-upload 8.0 | ||
// Type definitions for graphql-upload 15.0 | ||
// Project: https://github.com/jaydenseric/graphql-upload#readme | ||
// Definitions by: Mike Marcacci <https://github.com/mike-marcacci> | ||
// Simon Feiden <https://github.com/rdsfj> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 4.1 | ||
// TypeScript Version: 4.8 | ||
/* tslint:disable:no-unnecessary-generics */ | ||
// Linter does not accept files without definitions. Disabling the rule at | ||
// the top of the file doesn't work either: It breaks the meta data parser. | ||
import { IncomingMessage, ServerResponse } from "http"; | ||
import { GraphQLScalarType } from "graphql"; | ||
import { RequestHandler } from "express"; | ||
import { DefaultContext, DefaultState, Middleware } from "koa"; | ||
import { ReadStream } from "fs-capacitor"; | ||
export interface UploadOptions { | ||
maxFieldSize?: number | undefined; | ||
maxFileSize?: number | undefined; | ||
maxFiles?: number | undefined; | ||
} | ||
export interface GraphQLOperation { | ||
query: string; | ||
operationName?: null | string | undefined; | ||
variables?: null | unknown | undefined; | ||
} | ||
export function processRequest( | ||
request: IncomingMessage, | ||
response: ServerResponse, | ||
uploadOptions?: UploadOptions | ||
): Promise<GraphQLOperation | GraphQLOperation[]>; | ||
export function graphqlUploadExpress( | ||
uploadOptions?: UploadOptions | ||
): RequestHandler; | ||
export function graphqlUploadKoa <StateT = DefaultState, ContextT = DefaultContext>( | ||
uploadOptions?: UploadOptions | ||
): Middleware<StateT, ContextT>; | ||
export const GraphQLUpload: GraphQLScalarType; | ||
export interface FileUpload { | ||
filename: string; | ||
mimetype: string; | ||
encoding: string; | ||
createReadStream(): ReadStream; | ||
} | ||
export class Upload { | ||
promise: Promise<FileUpload>; | ||
file?: FileUpload; | ||
} | ||
export {}; |
{ | ||
"name": "@types/graphql-upload", | ||
"version": "8.0.12", | ||
"version": "15.0.0", | ||
"description": "TypeScript definitions for graphql-upload", | ||
@@ -12,2 +12,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-upload", | ||
"githubUsername": "mike-marcacci" | ||
}, | ||
{ | ||
"name": "Simon Feiden", | ||
"url": "https://github.com/rdsfj", | ||
"githubUsername": "rdsfj" | ||
} | ||
@@ -29,4 +34,22 @@ ], | ||
}, | ||
"typesPublisherContentHash": "08997f7d084d2eaa2c1c03473515a1562b742bb27421ee5204976ca57dd4e736", | ||
"typeScriptVersion": "4.1" | ||
"typesPublisherContentHash": "42b1ad89cd0fc4c7f835e2f97aecf063aff939294fc042798dc67aee023f5bd6", | ||
"typeScriptVersion": "4.8", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
"./GraphQLUpload.js": { | ||
"types": "./GraphQLUpload.d.ts" | ||
}, | ||
"./Upload.js": { | ||
"types": "./Upload.d.ts" | ||
}, | ||
"./graphqlUploadExpress.js": { | ||
"types": "./graphqlUploadExpress.d.ts" | ||
}, | ||
"./graphqlUploadKoa.js": { | ||
"types": "./graphqlUploadKoa.d.ts" | ||
}, | ||
"./processRequest.js": { | ||
"types": "./processRequest.d.ts" | ||
} | ||
} | ||
} |
@@ -9,62 +9,5 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-upload. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-upload/index.d.ts) | ||
````ts | ||
// Type definitions for graphql-upload 8.0 | ||
// Project: https://github.com/jaydenseric/graphql-upload#readme | ||
// Definitions by: Mike Marcacci <https://github.com/mike-marcacci> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 4.1 | ||
/* tslint:disable:no-unnecessary-generics */ | ||
import { IncomingMessage, ServerResponse } from "http"; | ||
import { GraphQLScalarType } from "graphql"; | ||
import { RequestHandler } from "express"; | ||
import { DefaultContext, DefaultState, Middleware } from "koa"; | ||
import { ReadStream } from "fs-capacitor"; | ||
export interface UploadOptions { | ||
maxFieldSize?: number | undefined; | ||
maxFileSize?: number | undefined; | ||
maxFiles?: number | undefined; | ||
} | ||
export interface GraphQLOperation { | ||
query: string; | ||
operationName?: null | string | undefined; | ||
variables?: null | unknown | undefined; | ||
} | ||
export function processRequest( | ||
request: IncomingMessage, | ||
response: ServerResponse, | ||
uploadOptions?: UploadOptions | ||
): Promise<GraphQLOperation | GraphQLOperation[]>; | ||
export function graphqlUploadExpress( | ||
uploadOptions?: UploadOptions | ||
): RequestHandler; | ||
export function graphqlUploadKoa <StateT = DefaultState, ContextT = DefaultContext>( | ||
uploadOptions?: UploadOptions | ||
): Middleware<StateT, ContextT>; | ||
export const GraphQLUpload: GraphQLScalarType; | ||
export interface FileUpload { | ||
filename: string; | ||
mimetype: string; | ||
encoding: string; | ||
createReadStream(): ReadStream; | ||
} | ||
export class Upload { | ||
promise: Promise<FileUpload>; | ||
file?: FileUpload; | ||
} | ||
```` | ||
### Additional Details | ||
* Last updated: Wed, 19 Oct 2022 22:03:12 GMT | ||
* Last updated: Thu, 29 Dec 2022 10:32:36 GMT | ||
* Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/fs-capacitor](https://npmjs.com/package/@types/fs-capacitor), [@types/graphql](https://npmjs.com/package/@types/graphql), [@types/koa](https://npmjs.com/package/@types/koa) | ||
@@ -74,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by [Mike Marcacci](https://github.com/mike-marcacci). | ||
These definitions were written by [Mike Marcacci](https://github.com/mike-marcacci), and [Simon Feiden](https://github.com/rdsfj). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9
55
5687
17