-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e60355
commit ccb6040
Showing
6 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type DocumentRequirementStatus = 'OK' | 'INSUFFICIENT_DOCUMENTS' | 'NB_OF_DOCUMENTS_OVER_LIMIT'; |
12 changes: 12 additions & 0 deletions
12
src/resources/MachineLearning/SESConfiguration/SESConfiguration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import API from '../../../APICore.js'; | ||
import Resource from '../../Resource.js'; | ||
import {SESDocumentGroupPreviewParams, SESDocumentGroupPreview} from './SESConfigurationInterfaces.js'; | ||
|
||
export default class SESConfiguration extends Resource { | ||
static baseUrl = `/rest/organizations/${API.orgPlaceholder}/machinelearning/configuration/ses`; | ||
static previewUrl = `${SESConfiguration.baseUrl}/preview`; | ||
|
||
preview(params: SESDocumentGroupPreviewParams) { | ||
return this.api.post<SESDocumentGroupPreview>(SESConfiguration.previewUrl, params); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
src/resources/MachineLearning/SESConfiguration/SESConfigurationInterfaces.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import {DocumentRequirementStatus} from '../Document.js'; | ||
import {FilterConditions} from '../FilterConditions.js'; | ||
|
||
export interface SESDocumentGroupPreviewParams { | ||
/** | ||
* The sources to consider. | ||
*/ | ||
sources: string[]; | ||
/** | ||
* An array of filtering conditions. | ||
*/ | ||
filterConditions: FilterConditions[]; | ||
/** | ||
* The query that determines the documents to extract | ||
*/ | ||
advancedQuery: string; | ||
} | ||
|
||
export interface SESDocumentGroupPreview { | ||
/** | ||
* The query that was used to fetch document information. | ||
* | ||
* @Example @source==("Salesforce Notifier") | ||
*/ | ||
query: string; | ||
/** | ||
* The total number of documents in the selected sources. | ||
*/ | ||
numberOfDocumentsInSources: number; | ||
/** | ||
* The number of documents that are candidates for learning. | ||
*/ | ||
numberOfValidDocuments: number; | ||
/** | ||
* The number of documents in the selected sources that match the conditions. | ||
*/ | ||
numberOfDocumentsInSourcesMatchingFilters: number; | ||
/** | ||
* The number of documents in the selected sources that match the conditions and have a permanentid | ||
*/ | ||
numberOfDocumentsInSourcesMatchingFiltersWithPermanentId: number; | ||
/** | ||
* The limit of documents that are candidates for learning. | ||
*/ | ||
documentLimit: number; | ||
/** | ||
* Status for the number of required documents to build the model. | ||
*/ | ||
documentRequirementStatus: DocumentRequirementStatus; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './SESConfiguration.js'; | ||
export * from './SESConfigurationInterfaces.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters