Skip to content

Commit d6e46f5

Browse files
committed
Fix CI types error
1 parent 091eb74 commit d6e46f5

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

x-pack/plugins/notifications/server/services/connectors_email_service.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
*/
77

88
import type { IUnsecuredActionsClient } from '@kbn/actions-plugin/server';
9-
import type { RelatedSavedObjects } from '@kbn/actions-plugin/server/lib/related_saved_objects';
10-
import type { EmailService, PlainTextEmail, RelatedSavedObject } from './types';
9+
import type { EmailService, PlainTextEmail } from './types';
1110

1211
export class ConnectorsEmailService implements EmailService {
1312
constructor(
@@ -25,13 +24,11 @@ export class ConnectorsEmailService implements EmailService {
2524
message: params.message,
2625
},
2726
...(params.context?.relatedObjects?.length && {
28-
relatedSavedObjects: this._getRelatedSavedObjects(params.context!.relatedObjects!),
27+
relatedSavedObjects: params.context!.relatedObjects!.map(
28+
({ id, type, spaceId: namespace }) => ({ id, type, namespace })
29+
),
2930
}),
3031
}));
3132
return await this.actionsClient.bulkEnqueueExecution(this.requesterId, actions);
3233
}
33-
34-
private _getRelatedSavedObjects(relatedObjects: RelatedSavedObject[]): RelatedSavedObjects {
35-
return relatedObjects.map(({ id, type, spaceId: namespace }) => ({ id, type, namespace }));
36-
}
3734
}

x-pack/plugins/notifications/server/services/licensed_email_service.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import { Subject } from 'rxjs';
9-
import { licenseMock } from '@kbn/licensing-plugin/common/licensing.mock';
9+
import { licensingMock } from '@kbn/licensing-plugin/server/mocks';
1010
import { loggerMock } from '@kbn/logging-mocks';
1111
import { LicensedEmailService } from './licensed_email_service';
1212
import type { ILicense } from '@kbn/licensing-plugin/server';
@@ -18,8 +18,8 @@ const emailServiceMock: EmailService = {
1818
sendPlainTextEmail: jest.fn(),
1919
};
2020

21-
const validLicense = licenseMock.createLicenseMock();
22-
const invalidLicense = licenseMock.createLicenseMock();
21+
const validLicense = licensingMock.createLicenseMock();
22+
const invalidLicense = licensingMock.createLicenseMock();
2323
invalidLicense.type = 'basic';
2424
invalidLicense.check = jest.fn(() => ({
2525
state: 'invalid',

x-pack/plugins/notifications/tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"public/**/*",
1414
"common/**/*"
1515
],
16-
"references": [
17-
{ "path": "../actions/tsconfig.json" }
16+
"kbn_references": [
17+
{ "path": "../../../src/core/tsconfig.json" },
18+
{ "path": "../actions/tsconfig.json" },
19+
{ "path": "../licensing/tsconfig.json" }
1820
]
1921
}

0 commit comments

Comments
 (0)