arvo-core 1.0.8 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -92,26 +92,5 @@ export default class ArvoContract<TUri extends string = string, TType extends st
|
|
92
92
|
* - accepts: An object containing the accepted input type and its JSON Schema representation
|
93
93
|
* - emits: An array of objects, each containing an emitted event type and its JSON Schema representation
|
94
94
|
*/
|
95
|
-
toJsonSchema():
|
96
|
-
uri: TUri;
|
97
|
-
description: string | null;
|
98
|
-
accepts: {
|
99
|
-
type: TType;
|
100
|
-
schema: import("zod-to-json-schema").JsonSchema7Type & {
|
101
|
-
$schema?: string | undefined;
|
102
|
-
definitions?: {
|
103
|
-
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
104
|
-
} | undefined;
|
105
|
-
};
|
106
|
-
};
|
107
|
-
emits: {
|
108
|
-
type: z.ZodLiteral<string>;
|
109
|
-
schema: import("zod-to-json-schema").JsonSchema7Type & {
|
110
|
-
$schema?: string | undefined;
|
111
|
-
definitions?: {
|
112
|
-
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
113
|
-
} | undefined;
|
114
|
-
};
|
115
|
-
}[];
|
116
|
-
};
|
95
|
+
toJsonSchema(): Object;
|
117
96
|
}
|
@@ -11,7 +11,6 @@ var __assign = (this && this.__assign) || function () {
|
|
11
11
|
return __assign.apply(this, arguments);
|
12
12
|
};
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
-
var zod_1 = require("zod");
|
15
14
|
var validators_1 = require("./validators");
|
16
15
|
var zod_to_json_schema_1 = require("zod-to-json-schema");
|
17
16
|
var schema_1 = require("../schema");
|
@@ -174,7 +173,7 @@ var ArvoContract = /** @class */ (function () {
|
|
174
173
|
emits: Object.entries(this._emits).map(function (_a) {
|
175
174
|
var key = _a[0], value = _a[1];
|
176
175
|
return ({
|
177
|
-
type:
|
176
|
+
type: key,
|
178
177
|
schema: (0, zod_to_json_schema_1.zodToJsonSchema)(value),
|
179
178
|
});
|
180
179
|
}),
|
@@ -40,9 +40,7 @@ export default class ArvoEventFactory<TUri extends string = string, TType extend
|
|
40
40
|
* @returns The created ArvoEvent as per one of the emits records of the contract.
|
41
41
|
* @throws If the event data fails validation against the contract.
|
42
42
|
*/
|
43
|
-
emits<U extends keyof TEmits & string, TExtension extends Record<string, any>>(event: CreateArvoEvent<z.infer<TEmits[U]>, U>, extensions?: TExtension, telemetry?: TelemetryContext): import("..").ArvoEvent<z.TypeOf<
|
44
|
-
type: U;
|
45
|
-
}>["schema"]>, TExtension, string>;
|
43
|
+
emits<U extends keyof TEmits & string, TExtension extends Record<string, any>>(event: CreateArvoEvent<z.infer<TEmits[U]>, U>, extensions?: TExtension, telemetry?: TelemetryContext): import("..").ArvoEvent<z.TypeOf<z.TypeOf<TEmits[U]>>, TExtension, string>;
|
46
44
|
/**
|
47
45
|
* Creates a system error ArvoEvent.
|
48
46
|
*
|