arvo-core 1.0.16 → 1.0.18

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -36,3 +36,7 @@
36
36
 
37
37
  - Added ArvoEvent spec-ed extension getter for a more ergonomic experience
38
38
 
39
+ ## [1.0.18] - 2024-09-07
40
+
41
+ - Fix a type bug in ArvoEvent creation
42
+
@@ -38,4 +38,4 @@ import { ArvoEventData, CloudEventExtension, CreateArvoEvent } from './types';
38
38
  * telemetryContext
39
39
  * );
40
40
  */
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>;
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, TType>;
@@ -30,7 +30,7 @@ export default class ArvoEventFactory<TUri extends string = string, TType extend
30
30
  */
31
31
  accepts<TExtension extends Record<string, any>>(event: Omit<CreateArvoEvent<z.infer<TAcceptSchema>, TType>, 'type'> & {
32
32
  to: string;
33
- }, extensions?: TExtension, telemetry?: TelemetryContext): import("..").ArvoEvent<z.TypeOf<TAcceptSchema>, TExtension, string>;
33
+ }, extensions?: TExtension, telemetry?: TelemetryContext): import("..").ArvoEvent<z.TypeOf<TAcceptSchema>, TExtension, TType>;
34
34
  /**
35
35
  * Creates an ArvoEvent as per one of the emits record in the contract.
36
36
  *
@@ -44,7 +44,7 @@ export default class ArvoEventFactory<TUri extends string = string, TType extend
44
44
  */
45
45
  emits<U extends keyof TEmits & string, TExtension extends Record<string, any>>(event: CreateArvoEvent<z.infer<TEmits[U]>, U> & {
46
46
  to: string;
47
- }, extensions?: TExtension, telemetry?: TelemetryContext): import("..").ArvoEvent<z.TypeOf<z.TypeOf<TEmits[U]>>, TExtension, string>;
47
+ }, extensions?: TExtension, telemetry?: TelemetryContext): import("..").ArvoEvent<z.TypeOf<z.TypeOf<TEmits[U]>>, TExtension, U>;
48
48
  /**
49
49
  * Creates a system error ArvoEvent.
50
50
  *
@@ -61,5 +61,5 @@ export default class ArvoEventFactory<TUri extends string = string, TType extend
61
61
  errorName: string;
62
62
  errorMessage: string;
63
63
  errorStack: string | null;
64
- }, TExtension, string>;
64
+ }, TExtension, `sys.${TType}.error`>;
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arvo-core",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
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": {