mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-27 01:19:00 +02:00
WIP
This commit is contained in:
parent
85cba75fab
commit
f588fbdfc4
2
.github/workflows/build_prs_jest_report.yaml
vendored
2
.github/workflows/build_prs_jest_report.yaml
vendored
@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull_requests: write
|
pull-requests: write
|
||||||
name: build # temporary solution to trick branch protection rules
|
name: build # temporary solution to trick branch protection rules
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -16,7 +16,7 @@ import type { IPrivateProjectChecker } from '../private-project/privateProjectCh
|
|||||||
import type { ProjectAccess } from '../private-project/privateProjectStore.js';
|
import type { ProjectAccess } from '../private-project/privateProjectStore.js';
|
||||||
import type { IAccessReadModel } from '../access/access-read-model-type.js';
|
import type { IAccessReadModel } from '../access/access-read-model-type.js';
|
||||||
import lodash from 'lodash';
|
import lodash from 'lodash';
|
||||||
import type { IEventList, IBaseEvent } from '../../events/index.js';
|
import type { IEventList, IBaseEvent, IEvent } from '../../events/index.js';
|
||||||
import type { ITag } from '../../tags/index.js';
|
import type { ITag } from '../../tags/index.js';
|
||||||
const { isEqual } = lodash;
|
const { isEqual } = lodash;
|
||||||
|
|
||||||
@ -103,6 +103,28 @@ export default class EventService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async searchUserEvents(
|
||||||
|
search: IEventSearchParams,
|
||||||
|
): Promise<{ events: IEvent[] }> {
|
||||||
|
const queryParams = this.convertToDbParams(search);
|
||||||
|
|
||||||
|
const events = await this.eventStore.searchEvents(
|
||||||
|
{
|
||||||
|
limit: search.limit,
|
||||||
|
offset: search.offset,
|
||||||
|
query: search.query,
|
||||||
|
types: search.types,
|
||||||
|
},
|
||||||
|
queryParams,
|
||||||
|
{
|
||||||
|
withIp: this.isEnterprise,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
return {
|
||||||
|
events,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
onEvent(
|
onEvent(
|
||||||
eventName: string | symbol,
|
eventName: string | symbol,
|
||||||
listener: (...args: any[]) => void,
|
listener: (...args: any[]) => void,
|
||||||
|
@ -14,6 +14,7 @@ export interface IEventSearchParams {
|
|||||||
to?: string;
|
to?: string;
|
||||||
createdBy?: string;
|
createdBy?: string;
|
||||||
type?: string;
|
type?: string;
|
||||||
|
types?: string[];
|
||||||
environment?: string;
|
environment?: string;
|
||||||
offset: number;
|
offset: number;
|
||||||
limit: number;
|
limit: number;
|
||||||
|
Loading…
Reference in New Issue
Block a user