<commit_before>// Type definitions for [gstore-node] [1.0.0]
// Project: [gstore-node]
// Definitions by: [<NAME>] <[http://s.loix.me]>

/// <reference types="node" />

import { Stream } from 'stream';

export = GstoreNode;

declare function GstoreNode(config?: GstoreNode.GstoreConfig): GstoreNode.Gstore;

declare namespace GstoreNode {
    /**
     * gstore-node Instance
     *
     * @class Gstore
     */
    class Gstore {
        constructor();

        /**
         * The unerlying google-cloud Datastore instance
         */
        ds: any;

        /**
         * The underlying gstore-cache instance
         *
         * @type {GstoreCache}
         */
        cache: GstoreCache.Cache;

        Schema: typeof Schema;

        /**
         * Default Values helpers for Schemas
         *
         * @type {{ NOW: string }}
         */
        defaultValues: { NOW: string };

        errors: {
            codes: ErrorCodes;
            GstoreError: typeof GstoreError;
            ValidationError: typeof ValidationError;
            TypeError: typeof TypeError;
            ValueError: typeof ValueError;
        }

        /**
         * Initialize a @google-cloud/datastore Transaction
         */
        transaction(): any;

        /**
         * Connect gstore node to the Datastore instance
         *
         * @param {Datastore} datastore A Datastore instance
         */
        connect(datastore: Datastore): void;

        /**
         * Initalize a gstore-node Model
         *
         * @param {string} entityKind The Google Entity Kind
         * @returns {Model} A gstore Model
         */
        model<T = {[propName: string]: any}>(entityKind: string, schema: Schema): Model<T>;

        /**
         * Create a DataLoader instance
         *
         * @returns {DataLoader} The DataLoader instance
         * @link https://sebelga.gitbooks.io/gstore-node/content/dataloader.html#dataloader
         */
        createDataLoader(): DataLoader;

        /**
         * This method is an alias of the underlying @google-cloud/datastore save() method, with the exception that you can pass it an Entity instance or an Array of entities instances and this method will first convert the instances to the correct Datastore format before saving.<commit_msg>fix(typings): Add missing generics to Schema in Model creation<commit_after>// Type definitions for [gstore-node] [1.0.0]
// Project: [gstore-node]
// Definitions by: [<NAME>] <[http://s.loix.me]>

/// <reference types="node" />

import { Stream } from 'stream';

export = GstoreNode;

declare function GstoreNode(config?: GstoreNode.GstoreConfig): GstoreNode.Gstore;

declare namespace GstoreNode {
    /**
     * gstore-node Instance
     *
     * @class Gstore
     */
    class Gstore {
        constructor();

        /**
         * The unerlying google-cloud Datastore instance
         */
        ds: any;

        /**
         * The underlying gstore-cache instance
         *
         * @type {GstoreCache}
         */
        cache: GstoreCache.Cache;

        Schema: typeof Schema;

        /**
         * Default Values helpers for Schemas
         *
         * @type {{ NOW: string }}
         */
        defaultValues: { NOW: string };

        errors: {
            codes: ErrorCodes;
            GstoreError: typeof GstoreError;
            ValidationError: typeof ValidationError;
            TypeError: typeof TypeError;
            ValueError: typeof ValueError;
        }

        /**
         * Initialize a @google-cloud/datastore Transaction
         */
        transaction(): any;

        /**
         * Connect gstore node to the Datastore instance
         *
         * @param {Datastore} datastore A Datastore instance
         */
        connect(datastore: Datastore): void;

        /**
         * Initalize a gstore-node Model
         *
         * @param {string} entityKind The Google Entity Kind
         * @returns {Model} A gstore Model
         */
        model<T = {[propName: string]: any}>(entityKind: string, schema: Schema<T>): Model<T>;

        /**
         * Create a DataLoader instance
         *
         * @returns {DataLoader} The DataLoader instance
         * @link https://sebelga.gitbooks.io/gstore-node/content/dataloader.html#dataloader
         */
        createDataLoader(): DataLoader;

        /**
         * This method is an alias of the underlying @google-cloud/datastore save() method, with the exception that you can pass it an Entity instance or an Array of entities instances and this method will first convert the instances to the correct Datastore format before saving.
{'fraction_non_alphanumeric': 0.10181582360570687, 'fraction_numerical': 0.0012970168612191958, 'mean_word_length': 1.9118942731277533, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 2, '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': '3656926', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1229, 'n_words': 369}