@types/arangodb
Advanced tools
Comparing version 3.4.0 to 3.4.1
@@ -94,2 +94,3 @@ // Type definitions for ArangoDB 3.4 | ||
type ViewType = "arangosearch"; | ||
type KeyGeneratorType = "traditional" | "autoincrement"; | ||
type ErrorName = | ||
@@ -467,8 +468,25 @@ | "ERROR_NO_ERROR" | ||
interface CreateCollectionOptions { | ||
waitForSync?: boolean; | ||
journalSize?: number; | ||
isVolatile?: boolean; | ||
isSystem?: boolean; | ||
keyOptions?: { | ||
type?: KeyGeneratorType; | ||
allowUserKeys?: boolean; | ||
increment?: number; | ||
offset?: number; | ||
}; | ||
numberOfShards?: number; | ||
shardKeys?: string[]; | ||
replicationFactor?: number; | ||
} | ||
interface CollectionProperties { | ||
waitForSync: boolean; | ||
journalSize: number; | ||
isSystem: boolean; | ||
isVolatile: boolean; | ||
keyOptions?: { | ||
type: string; | ||
type: KeyGeneratorType; | ||
allowUserKeys: boolean; | ||
@@ -493,3 +511,3 @@ increment?: number; | ||
type: IndexType; | ||
fields: ReadonlyArray<keyof T>; | ||
fields: ReadonlyArray<keyof T | string>; | ||
sparse?: boolean; | ||
@@ -503,3 +521,3 @@ unique?: boolean; | ||
type: IndexType; | ||
fields: Array<keyof T>; | ||
fields: Array<keyof T | string>; | ||
sparse: boolean; | ||
@@ -527,2 +545,4 @@ unique: boolean; | ||
type Patch<T> = { [K in keyof T]?: T[K] | Patch<T[K]> }; | ||
interface DocumentMetadata { | ||
@@ -580,2 +600,3 @@ _key: string; | ||
limit?: number; | ||
mergeObjects?: boolean; | ||
} | ||
@@ -715,3 +736,3 @@ | ||
selector: string | DocumentLike, | ||
data: Partial<Document<T>>, | ||
data: Patch<Document<T>>, | ||
options?: UpdateOptions | ||
@@ -721,3 +742,3 @@ ): UpdateResult<T>; | ||
selectors: ReadonlyArray<string | DocumentLike>, | ||
data: ReadonlyArray<Partial<Document<T>>>, | ||
data: ReadonlyArray<Patch<Document<T>>>, | ||
options?: UpdateOptions | ||
@@ -727,3 +748,3 @@ ): Array<UpdateResult<T>>; | ||
example: Partial<Document<T>>, | ||
newValue: Partial<Document<T>>, | ||
newValue: Patch<Document<T>>, | ||
keepNull?: boolean, | ||
@@ -735,3 +756,3 @@ waitForSync?: boolean, | ||
example: Partial<Document<T>>, | ||
newValue: Partial<Document<T>>, | ||
newValue: Patch<Document<T>>, | ||
options?: UpdateByExampleOptions | ||
@@ -758,2 +779,6 @@ ): number; | ||
interface AqlLiteral { | ||
toAQL: () => string; | ||
} | ||
interface Cursor<T = any> { | ||
@@ -876,10 +901,10 @@ toArray(): T[]; | ||
_collections(): Collection[]; | ||
_create(name: string, properties?: CollectionProperties): Collection; | ||
_create(name: string, properties?: CreateCollectionOptions): Collection; | ||
_createDocumentCollection( | ||
name: string, | ||
properties?: CollectionProperties | ||
properties?: CreateCollectionOptions | ||
): Collection; | ||
_createEdgeCollection( | ||
name: string, | ||
properties?: CollectionProperties | ||
properties?: CreateCollectionOptions | ||
): Collection; | ||
@@ -945,4 +970,22 @@ _drop(name: string): void; | ||
} | ||
interface CollectionSessionStorage extends SessionStorage { | ||
new: () => Session; | ||
save: (session: Session) => Session; | ||
clear: (session: Session) => boolean; | ||
prune: () => string[]; | ||
} | ||
interface SessionsMiddleware extends DelegateMiddleware { | ||
storage: SessionStorage; | ||
transport: SessionTransport[]; | ||
} | ||
type Middleware = (req: Request, res: Response, next: NextFunction) => void; | ||
type SimpleMiddleware = ( | ||
req: Request, | ||
res: Response, | ||
next: NextFunction | ||
) => void; | ||
interface DelegateMiddleware { | ||
register: (endpoint: Endpoint) => SimpleMiddleware; | ||
} | ||
type Middleware = SimpleMiddleware | DelegateMiddleware; | ||
type Handler = ((req: Request, res: Response) => void); | ||
@@ -1230,3 +1273,3 @@ type NextFunction = () => void; | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1236,4 +1279,4 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1243,5 +1286,5 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware1: Middleware, | ||
middleware2: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware1: SimpleMiddleware, | ||
middleware2: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1251,6 +1294,6 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware1: Middleware, | ||
middleware2: Middleware, | ||
middleware3: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware1: SimpleMiddleware, | ||
middleware2: SimpleMiddleware, | ||
middleware3: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1260,7 +1303,7 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware1: Middleware, | ||
middleware2: Middleware, | ||
middleware3: Middleware, | ||
middleware4: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware1: SimpleMiddleware, | ||
middleware2: SimpleMiddleware, | ||
middleware3: SimpleMiddleware, | ||
middleware4: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1270,8 +1313,8 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware1: Middleware, | ||
middleware2: Middleware, | ||
middleware3: Middleware, | ||
middleware4: Middleware, | ||
middleware5: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware1: SimpleMiddleware, | ||
middleware2: SimpleMiddleware, | ||
middleware3: SimpleMiddleware, | ||
middleware4: SimpleMiddleware, | ||
middleware5: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1281,9 +1324,9 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware1: Middleware, | ||
middleware2: Middleware, | ||
middleware3: Middleware, | ||
middleware4: Middleware, | ||
middleware5: Middleware, | ||
middleware6: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware1: SimpleMiddleware, | ||
middleware2: SimpleMiddleware, | ||
middleware3: SimpleMiddleware, | ||
middleware4: SimpleMiddleware, | ||
middleware5: SimpleMiddleware, | ||
middleware6: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1293,10 +1336,10 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware1: Middleware, | ||
middleware2: Middleware, | ||
middleware3: Middleware, | ||
middleware4: Middleware, | ||
middleware5: Middleware, | ||
middleware6: Middleware, | ||
middleware7: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware1: SimpleMiddleware, | ||
middleware2: SimpleMiddleware, | ||
middleware3: SimpleMiddleware, | ||
middleware4: SimpleMiddleware, | ||
middleware5: SimpleMiddleware, | ||
middleware6: SimpleMiddleware, | ||
middleware7: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1306,11 +1349,11 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware1: Middleware, | ||
middleware2: Middleware, | ||
middleware3: Middleware, | ||
middleware4: Middleware, | ||
middleware5: Middleware, | ||
middleware6: Middleware, | ||
middleware7: Middleware, | ||
middleware8: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware1: SimpleMiddleware, | ||
middleware2: SimpleMiddleware, | ||
middleware3: SimpleMiddleware, | ||
middleware4: SimpleMiddleware, | ||
middleware5: SimpleMiddleware, | ||
middleware6: SimpleMiddleware, | ||
middleware7: SimpleMiddleware, | ||
middleware8: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1320,12 +1363,12 @@ name?: string | ||
function route( | ||
pathOrMiddleware: string | Middleware, | ||
middleware1: Middleware, | ||
middleware2: Middleware, | ||
middleware3: Middleware, | ||
middleware4: Middleware, | ||
middleware5: Middleware, | ||
middleware6: Middleware, | ||
middleware7: Middleware, | ||
middleware8: Middleware, | ||
middleware9: Middleware, | ||
pathOrMiddleware: string | SimpleMiddleware, | ||
middleware1: SimpleMiddleware, | ||
middleware2: SimpleMiddleware, | ||
middleware3: SimpleMiddleware, | ||
middleware4: SimpleMiddleware, | ||
middleware5: SimpleMiddleware, | ||
middleware6: SimpleMiddleware, | ||
middleware7: SimpleMiddleware, | ||
middleware8: SimpleMiddleware, | ||
middleware9: SimpleMiddleware, | ||
handler: Handler, | ||
@@ -1353,2 +1396,9 @@ name?: string | ||
function aql(strings: TemplateStringsArray, ...args: any[]): ArangoDB.Query; | ||
namespace aql { | ||
function literal(value: any): ArangoDB.AqlLiteral; | ||
} | ||
function query( | ||
strings: TemplateStringsArray, | ||
...args: any[] | ||
): ArangoDB.Cursor; | ||
function time(): number; | ||
@@ -1389,6 +1439,2 @@ const db: ArangoDB.Database & { | ||
declare module "@arangodb/foxx/sessions" { | ||
interface SessionsMiddleware extends Foxx.Middleware { | ||
storage: Foxx.SessionStorage; | ||
transport: Foxx.SessionTransport[]; | ||
} | ||
interface SessionsOptions { | ||
@@ -1403,3 +1449,5 @@ storage: Foxx.SessionStorage | string | ArangoDB.Collection; | ||
} | ||
function sessionsMiddleware(options: SessionsOptions): Foxx.Middleware; | ||
function sessionsMiddleware( | ||
options: SessionsOptions | ||
): Foxx.SessionsMiddleware; | ||
export = sessionsMiddleware; | ||
@@ -1415,5 +1463,2 @@ } | ||
} | ||
interface CollectionStorage extends Foxx.SessionStorage { | ||
prune: () => string[]; | ||
} | ||
function collectionStorage( | ||
@@ -1423,3 +1468,3 @@ options: | ||
| CollectionStorageOptions["collection"] | ||
): CollectionStorage; | ||
): Foxx.CollectionSessionStorage; | ||
export = collectionStorage; | ||
@@ -1426,0 +1471,0 @@ } |
{ | ||
"name": "@types/arangodb", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "TypeScript definitions for ArangoDB", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git.git" | ||
}, | ||
@@ -24,4 +24,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "4c0f19baa9257ce0f33d4dac6723ff834dbba10fd8468b6e0a28c076a3824179", | ||
"typesPublisherContentHash": "f274a46fcba6dbfb01a597af9a0c7049cdd6a9cf2bf81573bd02bdd3ab8cee3b", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/arangodb | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/arangodb | ||
Additional Details | ||
* Last updated: Tue, 24 Apr 2018 23:52:29 GMT | ||
* Last updated: Tue, 08 May 2018 16:35:40 GMT | ||
* Dependencies: graphql, node | ||
@@ -14,0 +14,0 @@ * Global values: Foxx |
Sorry, the diff of this file is not supported yet
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
1805
63184