arvo-core 1.0.2 → 1.0.4

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/CHANGELOG.md CHANGED
@@ -8,3 +8,11 @@
8
8
 
9
9
  - Update ArvoContract description
10
10
 
11
+ ## [1.0.3] - 2024-08-31
12
+
13
+ - Making type in ArvoEvent a generic string for better type control
14
+
15
+ ## [0.0.4] - 2024-08-31
16
+
17
+ - Created an event factory generator for creating contractually compliant events
18
+
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  # Arvo
4
2
 
5
3
  ## What is Arvo
@@ -28,13 +26,11 @@ This core package defines primitive types and utility functions to help you quic
28
26
 
29
27
  ## Documentation & Resources
30
28
 
31
-
32
- | Source | Link |
33
- | --------------- | ------------------------
34
- | Package | https://www.npmjs.com/package/arvo-core?activeTab=readme |
35
- | Github | https://github.com/SaadAhmad123/arvo-core |
36
- | Documenation | https://saadahmad123.github.io/arvo-core/index.html |
37
-
29
+ | Source | Link |
30
+ | ------------ | -------------------------------------------------------- |
31
+ | Package | https://www.npmjs.com/package/arvo-core?activeTab=readme |
32
+ | Github | https://github.com/SaadAhmad123/arvo-core |
33
+ | Documenation | https://saadahmad123.github.io/arvo-core/index.html |
38
34
 
39
35
  ## Installation
40
36
 
@@ -43,11 +39,11 @@ You can install the core package via `npm` or `yarn`
43
39
  ```bash
44
40
  npm install arvo-core
45
41
  ```
42
+
46
43
  ```bash
47
44
  yarn add arvo-core
48
45
  ```
49
46
 
50
-
51
47
  ## Components
52
48
 
53
49
  At its core, Arvo has only three main data structures:
@@ -70,9 +66,15 @@ To start using Arvo in your project:
70
66
 
71
67
  - Install the package as shown in the Installation section.
72
68
  - Import the necessary components:
69
+
73
70
  ```javascript
74
- import { createArvoEvent, createArvoContract, createArvoContractLibrary } from 'arvo-core';
71
+ import {
72
+ createArvoEvent,
73
+ createArvoContract,
74
+ createArvoContractLibrary,
75
+ } from 'arvo-core';
75
76
  ```
77
+
76
78
  - Begin defining your events and contracts using the provided classes.
77
79
 
78
80
  ## License
@@ -80,4 +82,5 @@ import { createArvoEvent, createArvoContract, createArvoContractLibrary } from '
80
82
  This package is available under the MIT License. For more details, refer to the [LICENSE.md](LICENSE.md) file in the project repository.
81
83
 
82
84
  ## Change Logs
83
- For a detailed list of changes and updates, please refer to the [document](CHANGELOG.md) file.
85
+
86
+ For a detailed list of changes and updates, please refer to the [document](CHANGELOG.md) file.
@@ -1,5 +1,9 @@
1
1
  import { IArvoContract } from './types';
2
- import ArvoContract from '.';
2
+ import ArvoContract, { ExtractEventType } from '.';
3
+ import { CreateArvoEvent } from '../ArvoEvent/types';
4
+ import { TelemetryContext } from '../OpenTelemetry/types';
5
+ import { ArvoContractRecord } from './types';
6
+ import { z } from 'zod';
3
7
  /**
4
8
  * Infers the ArvoContract type from a given IArvoContract.
5
9
  */
@@ -33,3 +37,41 @@ export type InferArvoContract<T> = T extends IArvoContract<infer U, infer V, inf
33
37
  * });
34
38
  */
35
39
  export declare const createArvoContract: <const TContract extends IArvoContract>(contract: TContract) => InferArvoContract<TContract>;
40
+ /**
41
+ * Creates a contractual ArvoEvent factory based on the provided contract.
42
+ *
43
+ * @template T - The type of the contract.
44
+ * @template TAccepts - The type of events the contract accepts.
45
+ * @template TEmits - The type of events the contract emits.
46
+ * @param {ArvoContract<T, TAccepts, TEmits>} contract - The ArvoContract to base the events on.
47
+ * @returns {Object} An object with 'accepts' and 'emits' methods for creating events.
48
+ */
49
+ export declare const createContractualArvoEvent: <T extends string = string, TAccepts extends ArvoContractRecord = ArvoContractRecord, TEmits extends ArvoContractRecord = ArvoContractRecord>(contract: ArvoContract<T, TAccepts, TEmits>) => {
50
+ /**
51
+ * Creates an ArvoEvent as per the accept record of the contract.
52
+ *
53
+ * @template TExtension - The type of extensions to add to the event.
54
+ * @param {CreateArvoEvent<z.infer<TAccepts['schema']>, TAccepts['type']>} event - The event to create.
55
+ * @param {TExtension} [extensions] - Optional extensions to add to the event.
56
+ * @param {TelemetryContext} [telemetry] - Optional telemetry context for tracing.
57
+ * @returns The created ArvoEvent as per the accept record of the contract.
58
+ * @throws {Error} If the event data fails validation against the contract.
59
+ */
60
+ accepts: <TExtension extends Record<string, any>>(event: CreateArvoEvent<z.infer<TAccepts["schema"]>, TAccepts["type"]>, extensions?: TExtension, telemetry?: TelemetryContext) => import("..").ArvoEvent<z.TypeOf<z.TypeOf<TAccepts["schema"]>>, TExtension, string>;
61
+ /**
62
+ * Creates an ArvoEvent as per one of the emits record in the contract.
63
+ *
64
+ * @template U - The specific event type from TEmits.
65
+ * @template TExtension - The type of extensions to add to the event.
66
+ * @param {CreateArvoEvent<z.infer<Extract<TEmits, { type: U }>['schema']>, U>} event - The event to create.
67
+ * @param {TExtension} [extensions] - Optional extensions to add to the event.
68
+ * @param {TelemetryContext} [telemetry] - Optional telemetry context for tracing.
69
+ * @returns The created ArvoEvent as per one of the emits records of the contract.
70
+ * @throws {Error} If the event data fails validation against the contract.
71
+ */
72
+ emits: <U extends ExtractEventType<TEmits>, TExtension extends Record<string, any>>(event: CreateArvoEvent<z.infer<Extract<TEmits, {
73
+ type: U;
74
+ }>["schema"]>, U>, extensions?: TExtension, telemetry?: TelemetryContext) => import("..").ArvoEvent<z.TypeOf<Extract<TEmits, {
75
+ type: U;
76
+ }>["schema"]>, TExtension, string>;
77
+ };
@@ -1,10 +1,23 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createArvoContract = void 0;
17
+ exports.createContractualArvoEvent = exports.createArvoContract = void 0;
7
18
  var _1 = __importDefault(require("."));
19
+ var helpers_1 = require("../ArvoEvent/helpers");
20
+ var OpenTelemetry_1 = require("../OpenTelemetry");
8
21
  /**
9
22
  * Creates an ArvoContract instance from the given contract specification.
10
23
  *
@@ -37,3 +50,54 @@ var createArvoContract = function (contract) {
37
50
  return new _1.default(contract);
38
51
  };
39
52
  exports.createArvoContract = createArvoContract;
53
+ /**
54
+ * Creates a contractual ArvoEvent factory based on the provided contract.
55
+ *
56
+ * @template T - The type of the contract.
57
+ * @template TAccepts - The type of events the contract accepts.
58
+ * @template TEmits - The type of events the contract emits.
59
+ * @param {ArvoContract<T, TAccepts, TEmits>} contract - The ArvoContract to base the events on.
60
+ * @returns {Object} An object with 'accepts' and 'emits' methods for creating events.
61
+ */
62
+ var createContractualArvoEvent = function (contract) { return ({
63
+ /**
64
+ * Creates an ArvoEvent as per the accept record of the contract.
65
+ *
66
+ * @template TExtension - The type of extensions to add to the event.
67
+ * @param {CreateArvoEvent<z.infer<TAccepts['schema']>, TAccepts['type']>} event - The event to create.
68
+ * @param {TExtension} [extensions] - Optional extensions to add to the event.
69
+ * @param {TelemetryContext} [telemetry] - Optional telemetry context for tracing.
70
+ * @returns The created ArvoEvent as per the accept record of the contract.
71
+ * @throws {Error} If the event data fails validation against the contract.
72
+ */
73
+ accepts: function (event, extensions, telemetry) {
74
+ return (0, OpenTelemetry_1.createOtelSpan)(telemetry || 'ArvoEvent Creation Tracer', 'createArvoContractEvent.accepts', {}, function () {
75
+ var validationResult = contract.validateInput(event.type, event.data);
76
+ if (!validationResult.success) {
77
+ throw new Error("Accept Event data validation failed: ".concat(validationResult.error.message));
78
+ }
79
+ return (0, helpers_1.createArvoEvent)(__assign(__assign({}, event), { data: validationResult.data }), extensions, telemetry);
80
+ });
81
+ },
82
+ /**
83
+ * Creates an ArvoEvent as per one of the emits record in the contract.
84
+ *
85
+ * @template U - The specific event type from TEmits.
86
+ * @template TExtension - The type of extensions to add to the event.
87
+ * @param {CreateArvoEvent<z.infer<Extract<TEmits, { type: U }>['schema']>, U>} event - The event to create.
88
+ * @param {TExtension} [extensions] - Optional extensions to add to the event.
89
+ * @param {TelemetryContext} [telemetry] - Optional telemetry context for tracing.
90
+ * @returns The created ArvoEvent as per one of the emits records of the contract.
91
+ * @throws {Error} If the event data fails validation against the contract.
92
+ */
93
+ emits: function (event, extensions, telemetry) {
94
+ return (0, OpenTelemetry_1.createOtelSpan)(telemetry || 'ArvoEvent Creation Tracer', 'createArvoContractEvent.emits', {}, function () {
95
+ var validationResult = contract.validateOutput(event.type, event.data);
96
+ if (!validationResult.success) {
97
+ throw new Error("Emit Event data validation failed: ".concat(validationResult.error.message));
98
+ }
99
+ return (0, helpers_1.createArvoEvent)(__assign(__assign({}, event), { data: validationResult.data }), extensions, telemetry);
100
+ });
101
+ },
102
+ }); };
103
+ exports.createContractualArvoEvent = createContractualArvoEvent;
@@ -4,7 +4,7 @@ import { ArvoContractRecord, IArvoContract } from './types';
4
4
  * Extracts the event type from a given type T.
5
5
  * @template T - The type to extract the event type from.
6
6
  */
7
- type ExtractEventType<T> = T extends {
7
+ export type ExtractEventType<T> = T extends {
8
8
  type: infer U;
9
9
  } ? U : never;
10
10
  /**
@@ -33,13 +33,13 @@ export default class ArvoContract<T extends string = string, TAccepts extends Ar
33
33
  get uri(): T;
34
34
  /**
35
35
  * Gets the accepted record type and schema.
36
- * @returns {Readonly<TAccepts>} The frozen accepts object.
36
+ * @returns {TAccepts} The frozen accepts object.
37
37
  */
38
38
  get accepts(): TAccepts;
39
39
  /**
40
40
  * Gets all emitted event types and schemas as a readonly record.
41
41
  * Use this when you need to access all emitted events at once.
42
- * @returns {Readonly<Record<ExtractEventType<TEmits>, TEmits>>} A frozen record of all emitted events.
42
+ * @returns {Record<ExtractEventType<TEmits>, TEmits>} A frozen record of all emitted events.
43
43
  */
44
44
  get emits(): Record<ExtractEventType<TEmits>, TEmits>;
45
45
  /**
@@ -47,7 +47,7 @@ export default class ArvoContract<T extends string = string, TAccepts extends Ar
47
47
  * Use this when you need to access a single emitted event by its type.
48
48
  * @template U - The type of the emit record to retrieve.
49
49
  * @param {U} type - The type of the emit record.
50
- * @returns {Readonly<Extract<TEmits, { type: U }>>} The emit record.
50
+ * @returns {Extract<TEmits, { type: U }>} The emit record.
51
51
  * @throws {Error} If the emit type is not found in the contract.
52
52
  */
53
53
  getEmit<U extends ExtractEventType<TEmits>>(type: U): Extract<TEmits, {
@@ -128,4 +128,3 @@ export default class ArvoContract<T extends string = string, TAccepts extends Ar
128
128
  }[];
129
129
  };
130
130
  }
131
- export {};
@@ -37,7 +37,7 @@ var ArvoContract = /** @class */ (function () {
37
37
  Object.defineProperty(ArvoContract.prototype, "accepts", {
38
38
  /**
39
39
  * Gets the accepted record type and schema.
40
- * @returns {Readonly<TAccepts>} The frozen accepts object.
40
+ * @returns {TAccepts} The frozen accepts object.
41
41
  */
42
42
  get: function () {
43
43
  return Object.freeze(this._accepts);
@@ -49,7 +49,7 @@ var ArvoContract = /** @class */ (function () {
49
49
  /**
50
50
  * Gets all emitted event types and schemas as a readonly record.
51
51
  * Use this when you need to access all emitted events at once.
52
- * @returns {Readonly<Record<ExtractEventType<TEmits>, TEmits>>} A frozen record of all emitted events.
52
+ * @returns {Record<ExtractEventType<TEmits>, TEmits>} A frozen record of all emitted events.
53
53
  */
54
54
  get: function () {
55
55
  return Object.freeze(this._emits.reduce(function (acc, emit) {
@@ -66,7 +66,7 @@ var ArvoContract = /** @class */ (function () {
66
66
  * Use this when you need to access a single emitted event by its type.
67
67
  * @template U - The type of the emit record to retrieve.
68
68
  * @param {U} type - The type of the emit record.
69
- * @returns {Readonly<Extract<TEmits, { type: U }>>} The emit record.
69
+ * @returns {Extract<TEmits, { type: U }>} The emit record.
70
70
  * @throws {Error} If the emit type is not found in the contract.
71
71
  */
72
72
  ArvoContract.prototype.getEmit = function (type) {
@@ -9,6 +9,7 @@ import { ArvoEventData, CloudEventExtension, CreateArvoEvent } from './types';
9
9
  *
10
10
  * @template TData - The type of the event data, extending ArvoEventData.
11
11
  * @template TExtension - The type of the cloud event extension, extending CloudEventExtension.
12
+ * @template TType - The type name of the event
12
13
  *
13
14
  * @param {CreateArvoEvent<TData>} event - The event data and metadata to create the ArvoEvent.
14
15
  * @param {TExtension} [extensions] - Optional cloud event extensions.
@@ -37,4 +38,4 @@ import { ArvoEventData, CloudEventExtension, CreateArvoEvent } from './types';
37
38
  * telemetryContext
38
39
  * );
39
40
  */
40
- export declare const createArvoEvent: <TData extends ArvoEventData, TExtension extends CloudEventExtension>(event: CreateArvoEvent<TData>, extensions?: TExtension, telemetry?: TelemetryContext) => ArvoEvent<TData, TExtension>;
41
+ export declare const createArvoEvent: <TData extends ArvoEventData, TExtension extends CloudEventExtension, TType extends string>(event: CreateArvoEvent<TData, TType>, extensions?: TExtension, telemetry?: TelemetryContext) => ArvoEvent<TData, TExtension>;
@@ -17,6 +17,7 @@ var uuid_1 = require("uuid");
17
17
  *
18
18
  * @template TData - The type of the event data, extending ArvoEventData.
19
19
  * @template TExtension - The type of the cloud event extension, extending CloudEventExtension.
20
+ * @template TType - The type name of the event
20
21
  *
21
22
  * @param {CreateArvoEvent<TData>} event - The event data and metadata to create the ArvoEvent.
22
23
  * @param {TExtension} [extensions] - Optional cloud event extensions.
@@ -46,7 +47,7 @@ var uuid_1 = require("uuid");
46
47
  * );
47
48
  */
48
49
  var createArvoEvent = function (event, extensions, telemetry) {
49
- return (0, OpenTelemetry_1.createOtelSpan)(telemetry || 'ArvoEvent Creation Tracer', 'Create ArvoEvent', {}, function (span) {
50
+ return (0, OpenTelemetry_1.createOtelSpan)(telemetry || 'ArvoEvent Creation Tracer', 'createArvoEvent', {}, function (span) {
50
51
  if (event.datacontenttype &&
51
52
  event.datacontenttype !== schema_1.ArvoDataContentType) {
52
53
  var warning = (0, utils_1.cleanString)("\n Warning! The provided datacontenttype(=".concat(event.datacontenttype, ")\n is not ArvoEvent compatible (=").concat(schema_1.ArvoDataContentType, "). There may \n be some limited functionality.\n "));
@@ -3,12 +3,13 @@ import { ArvoEventData, ArvoExtension, CloudEventContext, CloudEventExtension, O
3
3
  * Represents an ArvoEvent, which extends the CloudEvent specification.
4
4
  * @template TData - The type of the event data, extending ArvoEventData.
5
5
  * @template TExtension - The type of additional extensions, extending CloudEventExtension.
6
+ * @template TType - The type name of the event
6
7
  */
7
- export default class ArvoEvent<TData extends ArvoEventData = ArvoEventData, TExtension extends CloudEventExtension = CloudEventExtension> {
8
+ export default class ArvoEvent<TData extends ArvoEventData = ArvoEventData, TExtension extends CloudEventExtension = CloudEventExtension, TType extends string = string> {
8
9
  readonly id: string;
9
10
  readonly source: string;
10
11
  readonly specversion: string;
11
- readonly type: string;
12
+ readonly type: TType;
12
13
  readonly subject: string;
13
14
  readonly datacontenttype: string;
14
15
  readonly dataschema: string | null;
@@ -36,7 +37,7 @@ export default class ArvoEvent<TData extends ArvoEventData = ArvoEventData, TExt
36
37
  id: string;
37
38
  source: string;
38
39
  specversion: string;
39
- type: string;
40
+ type: TType;
40
41
  subject: string;
41
42
  datacontenttype: string;
42
43
  dataschema: string | null;
@@ -77,7 +78,7 @@ export default class ArvoEvent<TData extends ArvoEventData = ArvoEventData, TExt
77
78
  'cloudevents.event_source': string;
78
79
  'cloudevents.event_spec_version': string;
79
80
  'cloudevents.event_subject': string;
80
- 'cloudevents.event_type': string;
81
+ 'cloudevents.event_type': string | TType;
81
82
  'cloudevents.event_time': string;
82
83
  'cloudevents.event_datacontenttype': string;
83
84
  'cloudevents.event_dataschema': string;
@@ -17,6 +17,7 @@ var OpenTelemetry_1 = require("../OpenTelemetry");
17
17
  * Represents an ArvoEvent, which extends the CloudEvent specification.
18
18
  * @template TData - The type of the event data, extending ArvoEventData.
19
19
  * @template TExtension - The type of additional extensions, extending CloudEventExtension.
20
+ * @template TType - The type name of the event
20
21
  */
21
22
  var ArvoEvent = /** @class */ (function () {
22
23
  /**
@@ -23,8 +23,9 @@ export type OpenTelemetryExtension = z.infer<typeof OpenTelemetryExtensionSchema
23
23
  /**
24
24
  * Represents the input parameters for creating an ArvoEvent.
25
25
  * @template TData - The type of the event data, extending ArvoEventData.
26
+ * @template TType - The type name of the event
26
27
  */
27
- export type CreateArvoEvent<TData extends ArvoEventData> = {
28
+ export type CreateArvoEvent<TData extends ArvoEventData, TType extends string> = {
28
29
  /** Unique identifier of the event. Must be a non-empty string. If not provided, a UUID will be generated. */
29
30
  id?: string;
30
31
  /** Timestamp of when the occurrence happened. Must be in ISO 8601 format with timezone offset. */
@@ -34,7 +35,7 @@ export type CreateArvoEvent<TData extends ArvoEventData> = {
34
35
  /** The version of the CloudEvents specification used. Must be '1.0' for this version. */
35
36
  specversion?: '1.0';
36
37
  /** Describes the type of event. Should be prefixed with a reverse-DNS name. */
37
- type: string;
38
+ type: TType;
38
39
  /** Identifies the subject of the event. For Arvo, this must be the Process Id. */
39
40
  subject: string;
40
41
  /** Content type of the data value. Must include 'application/cloudevents+json' or
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { exceptionToSpan, logToSpan, getTelemetryContext, getTelemetryCarrier, c
6
6
  import { TelemetryCarrier, TelemetryContext, TelemetryLogLevel } from './OpenTelemetry/types';
7
7
  import { validateURI, cleanString } from './utils';
8
8
  import ArvoContract from './ArvoContract';
9
- import { createArvoContract, InferArvoContract } from './ArvoContract/helpers';
9
+ import { createArvoContract, InferArvoContract, createContractualArvoEvent } from './ArvoContract/helpers';
10
10
  import { ArvoContractValidators } from './ArvoContract/validators';
11
11
  import { ArvoContractRecord, IArvoContract, ResolveArvoContractRecord } from './ArvoContract/types';
12
12
  import ArvoContractLibrary from './ArvoContractLibrary';
@@ -77,4 +77,4 @@ declare const ArvoEventSchemas: {
77
77
  tracestate: string | null;
78
78
  }>;
79
79
  };
80
- export { ArvoEvent, createArvoEvent, ArvoDataContentType, ArvoEventData, CloudEventExtension, ArvoEventSchemas, CloudEventContext, ArvoExtension, OpenTelemetryExtension, CreateArvoEvent, exceptionToSpan, logToSpan, getTelemetryCarrier, getTelemetryContext, createOtelSpan, TelemetryCarrier, TelemetryContext, TelemetryLogLevel, OTelNull, validateURI, cleanString, ArvoContract, createArvoContract, ArvoContractValidators, ArvoContractRecord, InferArvoContract, IArvoContract, ResolveArvoContractRecord, ArvoContractLibrary, createArvoContractLibrary, };
80
+ export { ArvoEvent, createArvoEvent, ArvoDataContentType, ArvoEventData, CloudEventExtension, ArvoEventSchemas, CloudEventContext, ArvoExtension, OpenTelemetryExtension, CreateArvoEvent, exceptionToSpan, logToSpan, getTelemetryCarrier, getTelemetryContext, createOtelSpan, TelemetryCarrier, TelemetryContext, TelemetryLogLevel, OTelNull, validateURI, cleanString, ArvoContract, createArvoContract, ArvoContractValidators, ArvoContractRecord, InferArvoContract, IArvoContract, ResolveArvoContractRecord, ArvoContractLibrary, createArvoContractLibrary, createContractualArvoEvent, };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createArvoContractLibrary = exports.ArvoContractLibrary = exports.ArvoContractValidators = exports.createArvoContract = exports.ArvoContract = exports.cleanString = exports.validateURI = exports.OTelNull = exports.createOtelSpan = exports.getTelemetryContext = exports.getTelemetryCarrier = exports.logToSpan = exports.exceptionToSpan = exports.ArvoEventSchemas = exports.ArvoDataContentType = exports.createArvoEvent = exports.ArvoEvent = void 0;
6
+ exports.createContractualArvoEvent = exports.createArvoContractLibrary = exports.ArvoContractLibrary = exports.ArvoContractValidators = exports.createArvoContract = exports.ArvoContract = exports.cleanString = exports.validateURI = exports.OTelNull = exports.createOtelSpan = exports.getTelemetryContext = exports.getTelemetryCarrier = exports.logToSpan = exports.exceptionToSpan = exports.ArvoEventSchemas = exports.ArvoDataContentType = exports.createArvoEvent = exports.ArvoEvent = void 0;
7
7
  var ArvoEvent_1 = __importDefault(require("./ArvoEvent"));
8
8
  exports.ArvoEvent = ArvoEvent_1.default;
9
9
  var schema_1 = require("./ArvoEvent/schema");
@@ -24,6 +24,7 @@ var ArvoContract_1 = __importDefault(require("./ArvoContract"));
24
24
  exports.ArvoContract = ArvoContract_1.default;
25
25
  var helpers_2 = require("./ArvoContract/helpers");
26
26
  Object.defineProperty(exports, "createArvoContract", { enumerable: true, get: function () { return helpers_2.createArvoContract; } });
27
+ Object.defineProperty(exports, "createContractualArvoEvent", { enumerable: true, get: function () { return helpers_2.createContractualArvoEvent; } });
27
28
  var validators_1 = require("./ArvoContract/validators");
28
29
  Object.defineProperty(exports, "ArvoContractValidators", { enumerable: true, get: function () { return validators_1.ArvoContractValidators; } });
29
30
  var ArvoContractLibrary_1 = __importDefault(require("./ArvoContractLibrary"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arvo-core",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
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": {