Mirror of https://github.com/roostorg/coop github.com/roostorg/coop
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 255 lines 6.8 kB view raw
1declare module 'homoglyph-search'; 2declare module 'nilsimsa'; 3 4declare module 'uuid-apikey'; 5 6declare interface String { 7 toUpperCase<T extends string>(this: T): Uppercase<T>; 8 toLowerCase<T extends string>(this: T): Lowercase<T>; 9} 10 11declare module '@graphql-tools/schema' { 12 import { GraphQLSchema } from 'graphql'; 13 14 import { IExecutableSchemaDefinition } from './types.js'; 15 16 export declare function makeExecutableSchema<TContext = any>({ 17 typeDefs, 18 resolvers, 19 resolverValidationOptions, 20 parseOptions, 21 inheritResolversFromInterfaces, 22 pruningOptions, 23 updateResolversInPlace, 24 schemaExtensions, 25 }: IExecutableSchemaDefinition<TContext>): GraphQLSchema; 26} 27 28declare module 'stream-to-blob' { 29 export default function streamToBlob( 30 stream: NodeJS.ReadableStream, 31 mimeType?: string | null, 32 ): Promise<Blob>; 33} 34 35declare module 'latlon-geohash' { 36 export interface Point { 37 lat: number; 38 lon: number; 39 } 40 41 /** 42 * Encodes latitude/longitude to geohash, either to specified precision or to automatically 43 * evaluated precision. 44 * 45 * @param lat - Latitude in degrees. 46 * @param lng - Longitude in degrees. 47 * @param [precision] - Number of characters in resulting geohash. 48 * @returns Geohash of supplied latitude/longitude. 49 * @throws Invalid geohash. 50 * 51 * @example 52 * var geohash = Geohash.encode(52.205, 0.119, 7); // geohash: 'u120fxw' 53 */ 54 export function encode(lat: number, lng: number, precision?: number): string; 55 56 /** 57 * Decode geohash to latitude/longitude (location is approximate centre of geohash cell, 58 * to reasonable precision). 59 * 60 * @param geohash - Geohash string to be converted to latitude/longitude. 61 * @returns (Center of) geohashed location. 62 * @throws Invalid geohash. 63 * 64 * @example 65 * var latlon = Geohash.decode('u120fxw'); // latlon: { lat: 52.205, lon: 0.1188 } 66 */ 67 export function decode(geohash: string): Point; 68} 69 70declare module '@stdlib/stats-binomial-test' { 71 /** 72 * A [successes, failures] tuple. 73 */ 74 type Tuple = [number, number]; 75 76 /** 77 * Interface defining function options. 78 */ 79 interface Options { 80 /** 81 * Significance level (default: 0.05). 82 */ 83 alpha?: number; 84 85 /** 86 * Alternative hypothesis (`two-sided`, `less`, or `greater`; default: 'two-sided'). 87 */ 88 alternative?: 'two-sided' | 'less' | 'greater'; 89 90 /** 91 * Success probability under H0 (default: 0.5) 92 */ 93 p?: number; 94 } 95 96 /** 97 * Test result. 98 */ 99 interface Results { 100 /** 101 * Used significance level. 102 */ 103 alpha: number; 104 105 /** 106 * Test decision. 107 */ 108 rejected: boolean; 109 110 /** 111 * p-value of the test. 112 */ 113 pValue: number; 114 115 /** 116 * Sample proportion. 117 */ 118 statistic: number; 119 120 /** 121 * 1-alpha confidence interval for the success probability. 122 */ 123 ci: Array<number>; 124 125 /** 126 * Assumed success probability under H0. 127 */ 128 nullValue: number; 129 130 /** 131 * Alternative hypothesis (`two-sided`, `less`, or `greater`). 132 */ 133 alternative: string; 134 135 /** 136 * Name of test. 137 */ 138 method: string; 139 140 /** 141 * Function to print formatted output. 142 */ 143 print: Function; 144 } 145 146 /** 147 * Interface of test for the success probability in a Bernoulli experiment. 148 */ 149 interface BinomialTest { 150 /** 151 * Computes an exact test for the success probability in a Bernoulli experiment. 152 * 153 * @param x - number of successes 154 * @param n - total number of observations 155 * @param options - function options 156 * @param options.alpha - significance level (default: 0.05) 157 * @param options.alternative - alternative hypothesis (`two-sided`, `less`, or `greater`; default: 'two-sided') 158 * @param options.p - success probability under H0 (default: 0.5) 159 * @throws must provide valid options 160 * @returns test results 161 * 162 * @example 163 * var out = binomialTest( 682, 925 ); 164 * // returns {...} 165 * 166 * out = binomialTest( 682, 925, { 167 * 'p': 0.75, 168 * 'alpha': 0.05 169 * }); 170 * // returns {...} 171 */ 172 (x: number, n: number, options?: Options): Results; 173 174 /** 175 * Computes an exact test for the success probability in a Bernoulli experiment. 176 * 177 * @param x - two-element array with number of successes and number of failures 178 * @param options - function options 179 * @param options.alpha - significance level (default: 0.05) 180 * @param options.alternative - alternative hypothesis (`two-sided`, `less`, or `greater`; default: 'two-sided') 181 * @param options.p - success probability under H0 (default: 0.5) 182 * @throws must provide valid options 183 * @returns test results 184 * 185 * @example 186 * var out = binomialTest( [ 682, 243 ] ); 187 * // returns {...} 188 * 189 * out = binomialTest( [ 682, 243 ], { 190 * 'p': 0.75, 191 * 'alpha': 0.05 192 * }); 193 * // returns {...} 194 */ 195 (x: Tuple, options?: Options): Results; 196 } 197 198 /** 199 * Computes an exact test for the success probability in a Bernoulli experiment. 200 * 201 * @param x - number of successes or two-element array with successes and failures 202 * @param n - total number of observations 203 * @param options - function options 204 * @param options.alpha - significance level (default: 0.05) 205 * @param options.alternative - alternative hypothesis (`two-sided`, `less`, or `greater`; default: 'two-sided') 206 * @param options.p - success probability under H0 (default: 0.5) 207 * @throws must provide valid options 208 * @returns test results 209 * 210 * @example 211 * var out = binomialTest( 682, 925 ); 212 * // returns {...} 213 * 214 * @example 215 * var out = binomialTest( [ 682, 243 ] ); 216 * // returns {...} 217 */ 218 var binomialTest: BinomialTest; 219 220 // EXPORTS // 221 222 export = binomialTest; 223} 224 225namespace NodeJS { 226 interface ProcessEnv { 227 DATABASE_HOST?: string; 228 DATABASE_READ_ONLY_HOST?: string; 229 DATABASE_PORT?: string; 230 DATABASE_NAME?: string; 231 DATABASE_USER?: string; 232 DATABASE_PASSWORD?: string; 233 SESSION_SECRET?: string; 234 WAREHOUSE_ADAPTER?: string; 235 ANALYTICS_ADAPTER?: string; 236 DATA_WAREHOUSE_PROVIDER?: string; 237 NODE_ENV?: string; 238 EXPOSE_SENSITIVE_IMPLEMENTATION_DETAILS_IN_ERRORS?: string; 239 ALLOW_USER_INPUT_LOCALHOST_URIS?: string; 240 SEQUELIZE_PRINT_LOGS?: string; 241 REDIS_USE_CLUSTER?: string; 242 REDIS_HOST?: string; 243 REDIS_PORT?: string; 244 REDIS_USER?: string; 245 REDIS_PASSWORD?: string; 246 GROQ_SECRET_KEY?: string; 247 SENDGRID_API_KEY?: string; 248 GOOGLE_PLACES_API_KEY?: string; 249 READ_ME_JWT_SECRET?: string; 250 GOOGLE_TRANSLATE_API_KEY?: string; 251 OPEN_AI_API_KEY?: string; 252 SLACK_APP_BEARER_TOKEN?: string; 253 GRAPHQL_OPAQUE_SCALAR_SECRET?: string; 254 } 255}