arvo-core 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,10 +58,10 @@ import ArvoOrchestratorContract from '.';
|
|
58
58
|
* In this example, the actual init schema will be an intersection of the provided schema
|
59
59
|
* and the OrchestrationInitEventBaseSchema, ensuring all necessary fields are included.
|
60
60
|
*/
|
61
|
-
export declare const createArvoOrchestratorContract: <TUri extends string, TName extends string, TInit extends z.
|
61
|
+
export declare const createArvoOrchestratorContract: <TUri extends string, TName extends string, TInit extends z.AnyZodObject, TComplete extends z.AnyZodObject>(param: ICreateArvoOrchestratorContract<TUri, TName, TInit, TComplete>) => ArvoOrchestratorContract<TUri, `arvo.orc.${TName}`, z.ZodObject<z.objectUtil.extendShape<{
|
62
62
|
parentSubject$$: z.ZodNullable<z.ZodString>;
|
63
|
-
}, "
|
64
|
-
parentSubject$$:
|
65
|
-
}, {
|
66
|
-
parentSubject$$:
|
67
|
-
}
|
63
|
+
}, TInit["shape"]>, TInit["_def"]["unknownKeys"], TInit["_def"]["catchall"], z.objectOutputType<z.objectUtil.extendShape<{
|
64
|
+
parentSubject$$: z.ZodNullable<z.ZodString>;
|
65
|
+
}, TInit["shape"]>, TInit["_def"]["catchall"], TInit["_def"]["unknownKeys"]>, z.objectInputType<z.objectUtil.extendShape<{
|
66
|
+
parentSubject$$: z.ZodNullable<z.ZodString>;
|
67
|
+
}, TInit["shape"]>, TInit["_def"]["catchall"], TInit["_def"]["unknownKeys"]>>, `arvo.orc.${TName}.done`, TComplete>;
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.createArvoOrchestratorContract = void 0;
|
7
|
-
var zod_1 = require("zod");
|
8
7
|
var _1 = __importDefault(require("."));
|
9
8
|
var typegen_1 = require("./typegen");
|
10
9
|
var schema_1 = require("./schema");
|
@@ -86,11 +85,12 @@ var createArvoOrchestratorContract = function (param) {
|
|
86
85
|
if (!isLowerAlphanumeric(param.name)) {
|
87
86
|
throw new Error("Invalid 'name' = '".concat(param.name, "'. The 'name' must only contain alphanumeric characters. e.g. test.orchestrator"));
|
88
87
|
}
|
88
|
+
var mergedSchema = schema_1.OrchestrationInitEventBaseSchema.merge(param.schema.init);
|
89
89
|
return new _1.default({
|
90
90
|
uri: param.uri,
|
91
91
|
init: {
|
92
92
|
type: typegen_1.ArvoOrchestratorEventTypeGen.init(param.name),
|
93
|
-
schema:
|
93
|
+
schema: mergedSchema,
|
94
94
|
},
|
95
95
|
complete: {
|
96
96
|
type: typegen_1.ArvoOrchestratorEventTypeGen.complete(param.name),
|