<commit_before>// Type definitions for vertex 0.0.3
// Project: https://github.com/wokim/vertex
// Definitions by: <NAME> <https://github.com/wokim/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

/// <reference path="../bluebird/bluebird.d.ts" />
/// <reference path="../mongoose/mongoose.d.ts" />
/// <reference path="../redis/redis.d.ts" />
/// <reference path="../restify/restify.d.ts" />
/// <reference path="../amqplib/amqplib.d.ts" />
/// <reference path="../socket.io/socket.io.d.ts" />

declare module "vertex" {
  import Promise = require('bluebird');
  import mongoose = require('mongoose');
  import redis = require('redis');
  import restify = require('restify');
  import amqp = require('amqplib/callback_api');
  import io = require('socket.io');

  export interface AMQPAdapterOptions {
      url: string;
      socketOptions?: amqp.SocketOptions;
  }

  export interface MongooseAdapterOptions {
    uri: string;
    connectionOption?: mongoose.ConnectionOption;
  }

  export interface RedisAdapterOptions {
    port: number;
    host: string;
    clientOpts?: redis.ClientOpts;
  }

  export interface RestifyAdapterOptions {
    serverOptions?: restify.ServerOptions;
    store: ISessionStore;
    port: number;
    secret: string;
  }

  export interface ISessionStore {
    getSession(sid: string): Promise<any>;
    setSession(sid: string, session: any): Promise<any>;
    deleteSession(sid: string): Promise<void>;
  }
  
  export interface SocketIOAdapterOptions {
    port: number;
  }

  /**
   * ServiceOptions
   * @interface
   */
  export interface ServiceOptions {
    mongoose?: MongooseAdapterOptions;
    redis?: RedisAdapterOptions;
    restify?: RestifyAdapterOptions;
    amqp?: AMQPAdapterOptions;
    socketio?: SocketIOAdapterOptions;
  }

  /**
   * IAbstractAdapter
   * @interface
   */
  export interface IAbstractAdapter {
    adaptee: any;
    initialize(): Promise<void>;
  }

  /**
   * IListenableAdapter
   * @interface
   */
  export interface IListenableAdapter extends IAbstractAdapter {<commit_msg>Added IToken interface declaration<commit_after>// Type definitions for vertex 0.0.3
// Project: https://github.com/wokim/vertex
// Definitions by: <NAME> <https://github.com/wokim/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

/// <reference path="../bluebird/bluebird.d.ts" />
/// <reference path="../mongoose/mongoose.d.ts" />
/// <reference path="../redis/redis.d.ts" />
/// <reference path="../restify/restify.d.ts" />
/// <reference path="../amqplib/amqplib.d.ts" />
/// <reference path="../socket.io/socket.io.d.ts" />

declare module "vertex" {
  import Promise = require('bluebird');
  import mongoose = require('mongoose');
  import redis = require('redis');
  import restify = require('restify');
  import amqp = require('amqplib/callback_api');
  import io = require('socket.io');

  export interface AMQPAdapterOptions {
      url: string;
      socketOptions?: amqp.SocketOptions;
  }

  export interface MongooseAdapterOptions {
    uri: string;
    connectionOption?: mongoose.ConnectionOption;
  }

  export interface RedisAdapterOptions {
    port: number;
    host: string;
    clientOpts?: redis.ClientOpts;
  }

  export interface RestifyAdapterOptions {
    serverOptions?: restify.ServerOptions;
    store: ISessionStore;
    port: number;
    secret: string;
  }

  export interface ISessionStore {
    getSession(sid: string): Promise<any>;
    setSession(sid: string, session: any): Promise<any>;
    deleteSession(sid: string): Promise<void>;
  }

  export interface IToken {
    sid: string;
  }
  
  export interface SocketIOAdapterOptions {
    port: number;
  }

  /**
   * ServiceOptions
   * @interface
   */
  export interface ServiceOptions {
    mongoose?: MongooseAdapterOptions;
    redis?: RedisAdapterOptions;
    restify?: RestifyAdapterOptions;
    amqp?: AMQPAdapterOptions;
    socketio?: SocketIOAdapterOptions;
  }

  /**
   * IAbstractAdapter
   * @interface
   */
  export interface IAbstractAdapter {
    adaptee: any;
    initialize(): Promise<void>;
  }

  /**
   * IListenableAdapter
   * @interface
   */
  export interface IListenableAdapter extends IAbstractAdapter {
{'fraction_non_alphanumeric': 0.13868439800522442, 'fraction_numerical': 0.0014248397055331276, 'mean_word_length': 3.4430379746835444, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2713471', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1282, 'n_words': 270}