arvo-core 1.2.1 → 1.2.2

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.
@@ -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.ZodTypeAny, TComplete extends z.ZodTypeAny>(param: ICreateArvoOrchestratorContract<TUri, TName, TInit, TComplete>) => ArvoOrchestratorContract<TUri, `arvo.orc.${TName}`, z.ZodIntersection<z.ZodObject<{
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
- }, "strip", z.ZodTypeAny, {
64
- parentSubject$$: string | null;
65
- }, {
66
- parentSubject$$: string | null;
67
- }>, TInit>, `arvo.orc.${TName}.done`, TComplete>;
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: zod_1.z.intersection(schema_1.OrchestrationInitEventBaseSchema, param.schema.init),
93
+ schema: mergedSchema,
94
94
  },
95
95
  complete: {
96
96
  type: typegen_1.ArvoOrchestratorEventTypeGen.complete(param.name),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arvo-core",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "This core package contains all the core classes and components of the Arvo Event Driven System",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {