go-mokapi 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- /// <reference path="types/globals.d.ts" />
1
+ /// <reference path="types/global.d.ts" />
2
2
  /// <reference path="types/faker.d.ts" />
3
3
  /// <reference path="types/http.d.ts" />
4
4
  /// <reference path="types/kafka.d.ts" />
5
- /// <reference path="types/mokapi.d.ts" />
5
+ /// <reference path="types/index.d.ts" />
6
6
  /// <reference path="types/mustache.d.ts" />
7
7
  /// <reference path="types/yaml.d.ts" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "go-mokapi",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "description": "Easy and flexible API mocking",
5
5
  "homepage": "https://mokapi.io",
6
6
  "repository": {
package/types/index.d.ts CHANGED
@@ -122,7 +122,7 @@ export interface EventHandler {
122
122
  * })
123
123
  * }
124
124
  */
125
- export type HttpEventHandler = (request: HttpRequest, response: HttpResponse) => boolean;
125
+ export type HttpEventHandler = (request: HttpRequest, response: HttpResponse) => boolean | Promise<boolean>;
126
126
 
127
127
  /**
128
128
  * HttpRequest is an object used by HttpEventHandler that contains request-specific
@@ -204,7 +204,7 @@ export interface Url {
204
204
  * })
205
205
  * }
206
206
  */
207
- export type KafkaEventHandler = (message: KafkaEventMessage) => boolean;
207
+ export type KafkaEventHandler = (message: KafkaEventMessage) => boolean | Promise<boolean>;
208
208
 
209
209
  /**
210
210
  * KafkaEventMessage is an object used by KafkaEventHandler that contains Kafka-specific message data.
@@ -243,7 +243,7 @@ export interface KafkaEventMessage {
243
243
  * })
244
244
  * }
245
245
  */
246
- export type LdapEventHandler = (request: LdapSearchRequest, response: LdapSearchResponse) => boolean;
246
+ export type LdapEventHandler = (request: LdapSearchRequest, response: LdapSearchResponse) => boolean | Promise<boolean>;
247
247
 
248
248
  /**
249
249
  * LdapSearchRequest is an object used by LdapEventHandler that contains request-specific data.
@@ -343,7 +343,7 @@ export enum LdapResultStatus {
343
343
  SizeLimitExceeded = 4,
344
344
  }
345
345
 
346
- export type SmtpEventHandler = (record: SmtpEventMessage) => boolean;
346
+ export type SmtpEventHandler = (record: SmtpEventMessage) => boolean | Promise<boolean>;
347
347
 
348
348
  export interface SmtpEventMessage {
349
349
  server: string;