Skip to content

Commit

Permalink
feat(sources): add missing feedback to sources api
Browse files Browse the repository at this point in the history
CTCORE-10099
  • Loading branch information
ClaudineL committed Jun 21, 2024
1 parent 5dc8e81 commit 3f90390
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/resources/Sources/Sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {ActivityOperation} from '../Enums.js';
import Resource from '../Resource.js';
import {ScheduleModel} from '../SecurityCache/index.js';
import SourcesDatasets from './SourcesDatasets/SourcesDatasets.js';
import SourcesFeedback from './SourcesFeedback/SourcesFeedback.js';
import SourcesFields from './SourcesFields/SourcesFields.js';
import {
CreateSourceModel,
Expand All @@ -24,6 +25,7 @@ export default class Sources extends Resource {
mappings: SourcesMappings;
datasets: SourcesDatasets;
metadata: SourcesMetadata;
feedback: SourcesFeedback;

constructor(
protected api: API,
Expand All @@ -35,6 +37,7 @@ export default class Sources extends Resource {
this.mappings = new SourcesMappings(api, serverlessApi);
this.datasets = new SourcesDatasets(api, serverlessApi);
this.metadata = new SourcesMetadata(api, serverlessApi);
this.feedback = new SourcesFeedback(api, serverlessApi);
}

create(source: New<CreateSourceModel, 'resourceId'>, options?: CreateSourceOptions) {
Expand Down
15 changes: 15 additions & 0 deletions src/resources/Sources/tests/Sources.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import {New} from '../../BaseInterfaces.js';
import {ActivityOperation} from '../../Enums.js';
import {ScheduleModel} from '../../SecurityCache/index.js';
import Sources from '../Sources.js';
import SourcesDatasets from '../SourcesDatasets/SourcesDatasets.js';
import SourcesFeedback from '../SourcesFeedback/SourcesFeedback.js';
import SourcesFields from '../SourcesFields/SourcesFields.js';
import {CreateSourceModel, ListSourcesParams, RawSourceConfig} from '../SourcesInterfaces.js';
import SourcesMappings from '../SourcesMappings/SourcesMappings.js';
import SourcesMetadata from '../SourcesMetadata/SourcesMetadata.js';

jest.mock('../../../APICore.js');

Expand Down Expand Up @@ -360,5 +363,17 @@ describe('Sources', () => {
it('should have a mappings client', () => {
expect(source.mappings).toBeInstanceOf(SourcesMappings);
});

it('should have a datasets client', () => {
expect(source.datasets).toBeInstanceOf(SourcesDatasets);
});

it('should have a metadata client', () => {
expect(source.metadata).toBeInstanceOf(SourcesMetadata);
});

it('should have a feedback client', () => {
expect(source.feedback).toBeInstanceOf(SourcesFeedback);
});
});
});

0 comments on commit 3f90390

Please sign in to comment.