Skip to content

Commit 1c2ad41

Browse files
committed
use types from lib
1 parent 027ea78 commit 1c2ad41

3 files changed

Lines changed: 7 additions & 19 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@graphql-tools/schema": "^8.5.1",
4040
"@graphql-tools/utils": "^8.9.0",
4141
"@hawk.so/nodejs": "^3.1.1",
42-
"@hawk.so/types": "^0.1.31",
42+
"@hawk.so/types": "^0.1.33",
4343
"@n1ru4l/json-patch-plus": "^0.2.0",
4444
"@types/amqp-connection-manager": "^2.0.4",
4545
"@types/bson": "^4.0.5",

src/utils/merge.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
import mergeWith from 'lodash.mergewith';
22
import cloneDeep from 'lodash.clonedeep';
33
import { patch } from '@n1ru4l/json-patch-plus';
4-
5-
type HawkEvent = {
6-
payload: {
7-
[key: string]: any;
8-
};
9-
}
10-
11-
type HawkEventRepetition = {
12-
payload: {
13-
[key: string]: any;
14-
};
15-
delta: string;
16-
}
4+
import { GroupedEventDBScheme, RepetitionDBScheme } from '@hawk.so/types';
175

186
/**
197
* One of the features of the events is that their repetition is the difference
@@ -76,7 +64,7 @@ function stringifyPayloadField(payload: any, field: string) {
7664
* @param repetition {HawkEventRepetition} - The repetition to process
7765
* @returns {HawkEvent} Updated event with processed repetition payload
7866
*/
79-
export function composeFullRepetitionEvent(originalEvent: HawkEvent, repetition: HawkEventRepetition | undefined): HawkEvent {
67+
export function composeFullRepetitionEvent(originalEvent: GroupedEventDBScheme, repetition: RepetitionDBScheme | undefined): GroupedEventDBScheme {
8068
/**
8169
* Make a deep copy of the original event, because we need to avoid mutating the original event
8270
*/

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,10 @@
458458
dependencies:
459459
"@types/mongodb" "^3.5.34"
460460

461-
"@hawk.so/types@^0.1.31":
462-
version "0.1.31"
463-
resolved "https://registry.yarnpkg.com/@hawk.so/types/-/types-0.1.31.tgz#fba2c3451e927558bfcc3b1d942baaf8e72ad214"
464-
integrity sha512-o1LeA3JVIUPRSIZegKwAdl4noQ1KYxwr80eisJMlghP9knu6PbYw20rIMyan5qQ3epOWs8gO1CU3iwHZprFiCg==
461+
"@hawk.so/types@^0.1.33":
462+
version "0.1.33"
463+
resolved "https://registry.yarnpkg.com/@hawk.so/types/-/types-0.1.33.tgz#feb077b699b3e0001552588a372e1efe6cd58f40"
464+
integrity sha512-q3AdVxzQ8Qk8qyYiAcAacxNZXWTG/oLmVpjQlcLm2Eh5OJgpaZvH8hQCeRQ/ml1cqbYW8gUrRbMMCS2QOcwxEw==
465465
dependencies:
466466
"@types/mongodb" "^3.5.34"
467467

0 commit comments

Comments
 (0)