go-mokapi 0.21.0 → 0.22.0
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.
package/README.md
CHANGED
|
@@ -107,9 +107,9 @@ Explore tutorials that walk you through mocking different protocols and scenario
|
|
|
107
107
|
|
|
108
108
|
- [Get Started](https://mokapi.io/docs/guides/welcome)
|
|
109
109
|
- [HTTP](https://mokapi.io/docs/guides/http)
|
|
110
|
-
- [Kafka](https://mokapi.io/docs/guides/kafka
|
|
111
|
-
- [LDAP](https://mokapi.io/docs/guides/ldap
|
|
112
|
-
- [SMTP](https://mokapi.io/docs/guides/
|
|
110
|
+
- [Kafka](https://mokapi.io/docs/guides/kafka)
|
|
111
|
+
- [LDAP](https://mokapi.io/docs/guides/ldap)
|
|
112
|
+
- [SMTP](https://mokapi.io/docs/guides/mail)
|
|
113
113
|
- [Javascript API](https://mokapi.io/docs/javascript-api)
|
|
114
114
|
- [Resources](https://mokapi.io/docs/resources)
|
|
115
115
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -406,13 +406,39 @@ export type DateLayout =
|
|
|
406
406
|
| "RFC3339Nano";
|
|
407
407
|
|
|
408
408
|
/**
|
|
409
|
-
*
|
|
409
|
+
* EventArgs object contains additional arguments for an event handler.
|
|
410
|
+
* https://mokapi.io/docs/javascript-api/mokapi/on
|
|
411
|
+
*
|
|
412
|
+
* Use this to customize how the event appears in the dashboard or to control tracking.
|
|
413
|
+
*
|
|
414
|
+
* @property tags Optional key-value pairs used to label the event in the dashboard.
|
|
415
|
+
*
|
|
416
|
+
* @property track Set to `true` to enable tracking of this event handler in the dashboard.
|
|
417
|
+
* If omitted, Mokapi automatically checks whether the response object has
|
|
418
|
+
* been modified and tracks the handler only if a change is detected.
|
|
419
|
+
*
|
|
420
|
+
* @example
|
|
421
|
+
* export default function() {
|
|
422
|
+
* on('http', function(req, res) {
|
|
423
|
+
* res.data = { message: "tracked event" }
|
|
424
|
+
* }, {
|
|
425
|
+
* tags: { feature: 'beta', owner: 'team-a' },
|
|
426
|
+
* track: true
|
|
427
|
+
* })
|
|
428
|
+
* }
|
|
410
429
|
*/
|
|
411
430
|
export interface EventArgs {
|
|
412
431
|
/**
|
|
413
432
|
* Adds or overrides existing tags used in dashboard
|
|
414
433
|
*/
|
|
415
434
|
tags?: { [key: string]: string };
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Set to `true` to enable tracking of this event handler in the dashboard.
|
|
438
|
+
* Set to `false` to disable tracking. If omitted, Mokapi checks the response
|
|
439
|
+
* object to determine if the handler changed it, and tracks it accordingly.
|
|
440
|
+
*/
|
|
441
|
+
track?: boolean;
|
|
416
442
|
}
|
|
417
443
|
|
|
418
444
|
/**
|