diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index afc25bbfa0..bc62bed924 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: ['16.x', '18.x'] + node-version: ['20.x', '22.x'] os: [ubuntu-latest] steps: diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 157b5dc88f..8b0b4df5ad 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -35,38 +35,16 @@ jobs: - name: Execute Node integration tests # continue-on-error: true env: - NATURAL_LANGUAGE_CLASSIFIER_URL: "https://api.us-south.natural-language-classifier.watson.cloud.ibm.com" - NATURAL_LANGUAGE_CLASSIFIER_APIKEY: ${{ secrets.NLC_APIKEY }} - NATURAL_LANGUAGE_CLASSIFIER_ID: ${{ secrets.NLC_CLASSIFIER_ID }} ASSISTANT_URL: "https://api.us-south.assistant.watson.cloud.ibm.com" ASSISTANT_APIKEY: ${{ secrets.WA_APIKEY }} ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKSPACE_ID }} ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSISTANT_ID }} - COMPARE_COMPLY_URL: "https://api.us-south.compare-comply.watson.cloud.ibm.com" - COMPARE_COMPLY_APIKEY: ${{ secrets.CC_APIKEY }} - COMPARE_COMPLY_FEEDBACK_ID: ${{ secrets.CC_FEEDBACK_ID }} - LANGUAGE_TRANSLATOR_URL: "https://api.us-south.language-translator.watson.cloud.ibm.com" - LANGUAGE_TRANSLATOR_APIKEY: ${{ secrets.LT_APIKEY }} NATURAL_LANGUAGE_UNDERSTANDING_URL: "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com" NATURAL_LANGUAGE_UNDERSTANDING_APIKEY: ${{ secrets.NLU_APIKEY }} - PERSONALITY_INSIGHTS_URL: "https://api.us-south.personality-insights.watson.cloud.ibm.com" - PERSONALITY_INSIGHTS_APIKEY: ${{ secrets.PI_APIKEY }} SPEECH_TO_TEXT_URL: "https://api.us-south.speech-to-text.watson.cloud.ibm.com" SPEECH_TO_TEXT_APIKEY: ${{ secrets.STT_APIKEY }} TEXT_TO_SPEECH_URL: "https://api.us-south.text-to-speech.watson.cloud.ibm.com" TEXT_TO_SPEECH_APIKEY: ${{ secrets.TTS_APIKEY }} - TONE_ANALYZER_URL: "https://api.us-south.tone-analyzer.watson.cloud.ibm.com" - TONE_ANALYZER_APIKEY: ${{ secrets.TA_APIKEY }} - VISUAL_RECOGNITION_URL: "https://api.us-south.visual-recognition.watson.cloud.ibm.com" - VISUAL_RECOGNITION_APIKEY: ${{ secrets.VR_APIKEY }} - VISUAL_RECOGNITION_COLLECTION_ID: ${{ secrets.VR_COLLECTION_ID }} - DISCOVERY_URL: "https://api.us-south.discovery.watson.cloud.ibm.com" - DISCOVERY_APIKEY: ${{ secrets.D1_APIKEY }} - DISCOVERY_ENVIRONMENT_ID: ${{ secrets.D1_ENVIRONMENT_ID }} - DISCOVERY_CONFIGURATION_ID: ${{ secrets.D1_CONFIGURATION_ID }} - DISCOVERY_COLLECTION_ID1: ${{ secrets.D1_COLLECTION_ID1 }} - DISCOVERY_COLLECTION_ID2: ${{ secrets.D1_COLLECTION_ID2 }} - DISCOVERY_COLLECTION_ID3: ${{ secrets.D1_COLLECTION_ID3 }} # japanese DISCOVERY_V2_URL: "https://api.us-south.discovery.watson.cloud.ibm.com" DISCOVERY_V2_APIKEY: ${{ secrets.D2_APIKEY }} DISCOVERY_V2_PROJECT_ID: ${{ secrets.D2_PROJECT_ID }} @@ -76,18 +54,9 @@ jobs: mv test/resources/auth.gha.js test/resources/auth.js jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/assistant.v1.test.js jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/assistant.v2.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/compare-comply.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/discovery.v1.test.js jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/discovery.v2.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/language-translator.v3.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/natural-language-classifier.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/personality-insights.v3.test.js jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/speech-to-text.test.js jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/text-to-speech.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/tone-analyzer.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/visual-recognition.custom-classifiers.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/visual-recognition.v3.test.js - jest --silent --coverage=false --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' test/integration/visual-recognition.v4.test.js # Do not notify on success. We will leave the code here just in case we decide to switch gears - name: Notify slack on success diff --git a/.gitignore b/.gitignore index 322a4a079a..13e9632207 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,6 @@ coverage test/resources/auth.js test/resources/-auth.js # to make sure tests run without the auth file test/resources/tts-output.ogg -test/resources/visual_recognition.prepop/images -test/resources/cc_input_auth_file.json -test/resources/cc_output_auth_file.json test/resources/secrets.tar .idea doc/ @@ -22,17 +19,11 @@ lib/*.js conversation/*.js dialog/*.js discovery/*.js -language-translator/*.js -natural-language-classifier/*.js natural-language-understanding/*.js -personality-insights/*.js -tone-analyzer/*.js -visual-recognition/*.js text-to-speech/*.js speech-to-text/*.js authorization/*.js assistant/*.js -compare-comply/*.js iam-token-manager/*.js index.js sdk.js diff --git a/MIGRATION-V8.md b/MIGRATION-V8.md deleted file mode 100644 index 6b8bacf96a..0000000000 --- a/MIGRATION-V8.md +++ /dev/null @@ -1,65 +0,0 @@ -# Upgrading to ibm-watson@8.0 - [Breaking Changes](#breaking-changes) - - [UMD bundle watson.js no longer supported](#umd-bundle-watson.js-no-longer-supported) - - [Support for Node v14 dropped](#support-for-node-v14-dropped) - - [Breaking changes by service](#breaking-changes-by-service) - -- [New Features by Service](#new-features-by-service) - -## Breaking changes - -### UMD bundle watson.js no longer supported -The previously generated `watson.js` UMD bundle will no longer be generated to support updated core requirements - -### Support for Node v14 Dropped -In preparation for Node 14 EOL, the SDK no longer supports Node version 14, as reflected in the `engines` property in the package.json file. Version 14 will reach end of life on 30 April 2023. - -### Breaking changes by service - -#### Assistant v2 -- Parameter `createSession` removed from `createSession` function -- Interface `Environment` property `language` removed -- Interface `EnvironmentReleaseReference` renamed to `BaseEnvironmentReleaseReference` -- Interface `EnvironmentOrchestration` renamed to `BaseEnvironmentOrchestration` -- Interface `SkillReference` renamed to `EnvironmentSkill` - -#### Discovery v2 -- Parameter `smartDocumentUnderstanding` removed from `createCollection` function -- Interface `QueryResponsePassage` and `QueryResultPassage` property `confidence` removed -- Interface `DocumentClassifierEnrichment` property `enrichmentId` is no longer an optional -- QueryAggregation interfaces restructured - -#### Natural Language Understanding -- All `sentimentModel` functions removed - -#### Speech to Text -- `AR_AR_BROADBANDMODEL` model removed in favor of `AR_MS_BROADBANDMODEL` model - - -### New Features by Service - -#### Assistant v2 -- `createAssistant` function -- `listAssistants` function -- `deleteAssistant` function -- `updateEnvironment` function -- `createRelease` function -- `deleteRelease` function -- `getSkill` function -- `updateSkill` function -- `exportSkills` function -- `importSkills` function -- `importSkillsStatus` function -- Improved typing for `message` function call -See details of these functions on IBM's documentation site [here](https://cloud.ibm.com/apidocs/assistant-v2?code=node) - -#### Discovery v2 -- Aggregation types `QueryTopicAggregation` and `QueryTrendAggregation` added - -#### Speech to Text -- added `FR_CA_MULTIMEDIA`, `JA_JP_TELEPHONY`, `NL_NL_MULTIMEDIA`, `SV_SE_TELEPHONY` models - -#### Text to Speech -- added `EN_AU_HEIDIEXPRESSIVE`, `EN_AU_JACKEXPRESSIVE`, `EN_US_ALLISONEXPRESSIVE`, `EN_US_EMMAEXPRESSIVE`, `EN_US_LISAEXPRESSIVE`, `EN_US_MICHAELEXPRESSIVE`, `KO_KR_JINV3VOICE` -- Parameters `ratePercentage` and `pitchPercentage` added to `synthesize` function -See details of these new parameters on IBM's documentation site [here](https://cloud.ibm.com/apidocs/text-to-speech?code=node#synthesize) diff --git a/README.md b/README.md index 59249e2c3f..c63d4b83de 100755 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Node.js client library to use the Watson APIs. * You need an [IBM Cloud][ibm-cloud-onboarding] account. ## Prerequisites -- **Node >=16**: This SDK is tested with Node versions 16 and up. It may work on previous versions but this is not officially supported. +- **Node >= 20**: This SDK is tested with Node versions 16 and up. It may work on previous versions but this is not officially supported. ## Installation @@ -27,10 +27,10 @@ npm install ibm-watson ## Usage ```js -import DiscoveryV1 from 'ibm-watson/discovery/v1'; +import AssistantV2 from 'ibm-watson/assistant/v2'; import { IamAuthenticator } from 'ibm-watson/auth'; -const discoveryClient = new DiscoveryV1({ +const assistantClient = new AssistantV2({ authenticator: new IamAuthenticator({ apikey: '{apikey}' }), version: '{version}', }); @@ -55,7 +55,8 @@ Watson services are migrating to token-based Identity and Access Management (IAM - With some service instances, you authenticate to the API by using **[IAM](#iam)**. - In other instances, you authenticate by providing the **[username and password](#username-and-password)** for the service instance. -- If you're using a Watson service on ICP, you'll need to authenticate in [a specific way](#icp). +- If you are using a Watson service on ICP, you will need to authenticate in [a specific way](#icp). +- If you are using a Watson service on AWS, you will need to authenticate using [mcsp](#mcsp). Authentication is accomplished using dedicated Authenticators for each authentication scheme. Import authenticators from `ibm-watson/auth` or rely on externally-configured credentials which will be read from a credentials file or environment variables. @@ -89,32 +90,26 @@ The file downloaded will be called `ibm-credentials.env`. This is the name the S - Your system's home directory - Your current working directory (the directory Node is executed from) -As long as you set that up correctly, you don't have to worry about setting any authentication options in your code. So, for example, if you created and downloaded the credential file for your Discovery instance, you just need to do the following: +As long as you set that up correctly, you don't have to worry about setting any authentication options in your code. So, for example, if you created and downloaded the credential file for your Assistant instance, you just need to do the following: ```js -const DiscoveryV1 = require('ibm-watson/discovery/v1'); -const discovery = new DiscoveryV1({ version: '2019-02-01' }); +const AssistantV2 = require('ibm-watson/assistant/v2'); +const assistant = new AssistantV2({ version: '2024-08-25' }); ``` And that's it! If you're using more than one service at a time in your code and get two different `ibm-credentials.env` files, just put the contents together in one `ibm-credentials.env` file and the SDK will handle assigning credentials to their appropriate services. -**Special Note**: Due to legacy issues in Assistant V1 and V2 as well as Visual Recognition V3 and V4, the following parameter `serviceName` must be added when creating the service object: +**Special Note**: Due to legacy issues in Assistant V1 and V2, the following parameter `serviceName` must be added when creating the service object: ```js -const AssistantV1 = require('ibm-watson/assistant/v1'); -const assistant = new AssistantV1({ - version: '2020-04-01', +const AssistantV2 = require('ibm-watson/assistant/v2'); +const assistant = new AssistantV2({ + version: '2024-08-25', serviceName: 'assistant', }) ``` -```js -const VisualRecognitionV3 = require('ibm-watson/visual-recognition/v3'); -const assistant = new VisualRecognitionV3({ - version: '2018-03-19', - serviceName: 'visual-recognition', -}) -``` + It is worth noting that if you are planning to rely on VCAP_SERVICES for authentication then the `serviceName` parameter **MUST** be removed otherwise VCAP_SERVICES will not be able to authenticate you. See [Cloud Authentication Prioritization](#cloud-authentication-prioritization) for more details. If you would like to configure the location/name of your credential file, you can set an environment variable called `IBM_CREDENTIALS_FILE`. **This will take precedence over the locations specified above.** Here's how you can do that: @@ -154,7 +149,7 @@ const authenticator = new McspAuthenticator({ url: 'token_service_endpoint', apikey: 'apikey', }) -const assistant = AssistantV2(version='2023-06-15', +const assistant = AssistantV2(version='2024-08-25', authenticator=authenticator) assistant.setServiceUrl('') ``` @@ -170,27 +165,27 @@ When uploading your application to IBM Cloud there is a certain priority Watson You can set or reset the base URL after constructing the client instance using the `setServiceUrl` method: ```js -const DiscoveryV1 = require('ibm-watson/discovery/v1'); +const AssistantV2 = require('ibm-watson/assistant/v2'); -const discovery = DiscoveryV1({ +const assistant = AssistantV2({ /* authenticator, version, etc... */ }); -discovery.setServiceUrl(''); +assistant.setServiceUrl(''); ``` ## Promises All SDK methods are asynchronous, as they are making network requests to Watson services. To handle receiving the data from these requests, the SDK offers support with Promises. ```js -const DiscoveryV1 = require('ibm-watson/discovery/v1'); +const AssistantV2 = require('ibm-watson/assistant/v2'); -const discovery = new DiscoveryV1({ +const assistant = new AssistantV2({ /* authenticator, version, serviceUrl, etc... */ }); // using Promises -discovery.listEnvironments() +assistant.listAssistants() .then(body => { console.log(JSON.stringify(body, null, 2)); }) @@ -199,8 +194,8 @@ discovery.listEnvironments() }); // using Promises provides the ability to use async / await -async function callDiscovery() { // note that callDiscovery also returns a Promise - const body = await discovery.listEnvironments(); +async function callAssistant() { // note that callAssistant also returns a Promise + const body = await assistant.listAssistants(); } ``` @@ -211,7 +206,7 @@ Custom headers can be passed with any request. Each method has an optional param For example, this is how you can pass in custom headers to Watson Assistant service. In this example, the `'custom'` value for `'Accept-Language'` will override the default header for `'Accept-Language'`, and the `'Custom-Header'` while not overriding the default headers, will additionally be sent with the request. ```js -const assistant = new watson.AssistantV1({ +const assistant = new watson.AssistantV2({ /* authenticator, version, serviceUrl, etc... */ }); @@ -238,7 +233,7 @@ The SDK now returns the full HTTP response by default for each method. Here is an example of how to access the response headers for Watson Assistant: ```js -const assistant = new AssistantV1({ +const assistant = new AssistantV2({ /* authenticator, version, serviceUrl, etc... */ }); @@ -261,11 +256,11 @@ assistant.message(params).then( ``` ### Global Transaction ID -Every SDK call returns a response with a transaction ID in the `X-Global-Transaction-Id` header. Together the service instance region, this ID helps support teams troubleshoot issues from relevant logs. +Every SDK call returns a response with a transaction ID in the `X-Global-Transaction-Id` header. Together with the service instance region, this ID helps support teams troubleshoot issues from relevant logs. #### HTTP Example ```js -const assistant = new AssistantV1({ +const assistant = new AssistantV2({ /* authenticator, version, serviceUrl, etc... */ }); @@ -296,7 +291,7 @@ recognizeStream.getTransactionId().then( However, the transaction ID isn't available when the API doesn't return a response for some reason. In that case, you can set your own transaction ID in the request. For example, replace `` in the following example with a unique transaction ID. ```js -const assistant = new AssistantV1({ +const assistant = new AssistantV2({ /* authenticator, version, serviceUrl, etc... */ }); @@ -338,7 +333,7 @@ To use the SDK (which makes HTTPS requests) behind an HTTP proxy, a special tunn See this example configuration: ```js const tunnel = require('tunnel'); -const AssistantV1 = require('ibm-watson/assistant/v1'); +const AssistantV2 = require('ibm-watson/assistant/v2'); const { IamAuthenticator } = require('ibm-watson/auth'); const httpsAgent = tunnel.httpsOverHttp({ @@ -348,13 +343,13 @@ const httpsAgent = tunnel.httpsOverHttp({ }, }); -const assistant = new AssistantV1({ +const assistant = new AssistantV2({ authenticator: new IamAuthenticator({ apikey: 'fakekey-1234' httpsAgent, // not necessary if using Basic or BearerToken authentication proxy: false, }), - version: '2020-01-28', + version: '2024-08-25', httpsAgent, proxy: false, }); @@ -363,13 +358,13 @@ const assistant = new AssistantV1({ ### Sending custom certificates To send custom certificates as a security measure in your request, use the `cert`, `key`, and/or `ca` properties of the HTTPS Agent. See [this documentation](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options) for more information about the options. Note that the entire contents of the file must be provided - not just the file name. ```js -const AssistantV1 = require('ibm-watson/assistant/v1'); +const AssistantV2 = require('ibm-watson/assistant/v2'); const { IamAuthenticator } = require('ibm-watson/auth'); const certFile = fs.readFileSync('./my-cert.pem'); const keyFile = fs.readFileSync('./my-key.pem'); -const assistant = new AssistantV1({ +const assistant = new AssistantV2({ authenticator: new IamAuthenticator({ apikey: 'fakekey-1234', httpsAgent: new https.Agent({ @@ -377,7 +372,7 @@ const assistant = new AssistantV1({ cert: certFile, }) }), - version: '2019-02-28', + version: '2024-08-25', httpsAgent: new https.Agent({ key: keyFile, cert: certFile, @@ -392,7 +387,7 @@ The HTTP client can be configured to disable SSL verification. **Note that this To do this, set `disableSslVerification` to `true` in the service constructor and/or authenticator constructor, like below: ```js -const discovery = new DiscoveryV1({ +const assistant = new AssistantV2({ serviceUrl: '', version: '', authenticator: new IamAuthenticator({ apikey: '', disableSslVerification: true }), // this will disable SSL verification for requests to the token endpoint @@ -407,8 +402,6 @@ To see all possible https agent configuration options go to this [link](https:// You can find links to the documentation at https://cloud.ibm.com/developer/watson/documentation. Find the service that you're interested in, click **API reference**, and then select the **Node** tab. -There are also auto-generated JSDocs available at http://watson-developer-cloud.github.io/node-sdk/master/ - ## Questions If you have issues with the APIs or have a question about the Watson services, see [Stack Overflow](https://stackoverflow.com/questions/tagged/ibm-watson+node.js). @@ -452,13 +445,13 @@ Use the [Assistant][assistant] service to determine the intent of a message. Note: You must first create a workspace via IBM Cloud. See [the documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-index#about) for details. ```js -const AssistantV1 = require('ibm-watson/assistant/v1'); +const AssistantV2 = require('ibm-watson/assistant/v2'); const { IamAuthenticator } = require('ibm-watson/auth'); -const assistant = new AssistantV1({ +const assistant = new AssistantV2({ authenticator: new IamAuthenticator({ apikey: '' }), serviceUrl: 'https://api.us-south.assistant.watson.cloud.ibm.com', - version: '2018-02-16' + version: '2024-08-25' }); assistant.message( @@ -501,73 +494,6 @@ discovery.query( console.log(err); }); ``` -### Discovery v1 - -Use the [Discovery Service][discovery] to search and analyze structured and unstructured data. - -```js -const DiscoveryV1 = require('ibm-watson/discovery/v1'); -const { IamAuthenticator } = require('ibm-watson/auth'); - -const discovery = new DiscoveryV1({ - authenticator: new IamAuthenticator({ apikey: '' }), - serviceUrl: 'https://api.us-south.discovery.watson.cloud.ibm.com', - version: '2017-09-01' -}); - -discovery.query( - { - environmentId: '', - collectionId: '', - query: 'my_query' - }) - .then(response => { - console.log(JSON.stringify(response.result, null, 2)); - }) - .catch(err => { - console.log(err); - }); -``` - -### Language Translator - -Translate text from one language to another or idenfity a language using the [Language Translator][language_translator] service. - -```js -const LanguageTranslatorV3 = require('ibm-watson/language-translator/v3'); -const { IamAuthenticator } = require('ibm-watson/auth'); - -const languageTranslator = new LanguageTranslatorV3({ - authenticator: new IamAuthenticator({ apikey: '' }), - serviceUrl: 'https://api.us-south.language-translator.watson.cloud.ibm.com', - version: 'YYYY-MM-DD', -}); - -languageTranslator.translate( - { - text: 'A sentence must have a verb', - source: 'en', - target: 'es' - }) - .then(response => { - console.log(JSON.stringify(response.result, null, 2)); - }) - .catch(err => { - console.log('error: ', err); - }); - -languageTranslator.identify( - { - text: - 'The language translator service takes text input and identifies the language used.' - }) - .then(response => { - console.log(JSON.stringify(response.result, null, 2)); - }) - .catch(err => { - console.log('error: ', err); - }); -``` ### Natural Language Understanding @@ -689,7 +615,7 @@ The SDK always expects an authenticator to be passed in. To make an unautuhentic const watson = require('ibm-watson'); const { NoAuthAuthenticator } = require('ibm-watson/auth'); -const assistant = new watson.AssistantV1({ +const assistant = new watson.AssistantV2({ authenticator: new NoAuthAuthenticator(), }); ``` @@ -727,9 +653,7 @@ See [CONTRIBUTING](https://github.com/watson-developer-cloud/node-sdk/blob/maste We love to highlight cool open-source projects that use this SDK! If you'd like to get your project added to the list, feel free to make an issue linking us to it. - [Watson Speech to Text Demo App](https://github.com/watson-developer-cloud/speech-to-text-nodejs) - [Watson Assistant Demo App](https://github.com/watson-developer-cloud/assistant-demo) -- [Virtual TJBot Node-RED Nodes](https://github.com/jeancarl/node-red-contrib-virtual-tjbot) - [CLI tool for Watson Assistant](https://github.com/Themandunord/IWAC) -- [CLI tool for Watson Visual Recognition](https://github.com/boneskull/puddlenuts) ## License This library is licensed under Apache 2.0. Full license text is available in @@ -737,11 +661,7 @@ This library is licensed under Apache 2.0. Full license text is available in [assistant]: https://www.ibm.com/cloud/watson-assistant/ [discovery]: https://www.ibm.com/cloud/watson-discovery -[personality_insights]: https://www.ibm.com/watson/services/personality-insights/ -[visual_recognition]: https://www.ibm.com/watson/services/visual-recognition/ -[tone_analyzer]: https://www.ibm.com/watson/services/tone-analyzer/ [text_to_speech]: https://www.ibm.com/watson/services/text-to-speech/ [speech_to_text]: https://www.ibm.com/watson/services/speech-to-text/ -[language_translator]: https://www.ibm.com/watson/services/language-translator/ [examples]: https://github.com/watson-developer-cloud/node-sdk/tree/master/examples [ibm-cloud-onboarding]: http://cloud.ibm.com/registration?target=/developer/watson&cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Node diff --git a/assistant/v1.ts b/assistant/v1.ts index edbe9fe6a9..90e8f805a8 100644 --- a/assistant/v1.ts +++ b/assistant/v1.ts @@ -15,7 +15,7 @@ */ /** - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.1-5136e54a-20241108-203028 */ import * as extend from 'extend'; @@ -4947,13 +4947,17 @@ namespace AssistantV1 { * model interfaces ************************/ - /** AgentAvailabilityMessage. */ + /** + * AgentAvailabilityMessage. + */ export interface AgentAvailabilityMessage { /** The text of the message. */ message?: string; } - /** BulkClassifyOutput. */ + /** + * BulkClassifyOutput. + */ export interface BulkClassifyOutput { /** The user input utterance to classify. */ input?: BulkClassifyUtterance; @@ -4963,19 +4967,25 @@ namespace AssistantV1 { intents?: RuntimeIntent[]; } - /** BulkClassifyResponse. */ + /** + * BulkClassifyResponse. + */ export interface BulkClassifyResponse { /** An array of objects that contain classification information for the submitted input utterances. */ output?: BulkClassifyOutput[]; } - /** The user input utterance to classify. */ + /** + * The user input utterance to classify. + */ export interface BulkClassifyUtterance { /** The text of the input utterance. */ text: string; } - /** A recognized capture group for a pattern-based entity. */ + /** + * A recognized capture group for a pattern-based entity. + */ export interface CaptureGroup { /** A recognized capture group for the entity. */ group: string; @@ -4983,7 +4993,9 @@ namespace AssistantV1 { location?: number[]; } - /** Information used by an integration to transfer the conversation to a different channel. */ + /** + * Information used by an integration to transfer the conversation to a different channel. + */ export interface ChannelTransferInfo { /** An object specifying target channels available for the transfer. Each property of this object represents an * available transfer target. Currently, the only supported property is **chat**, representing the web chat @@ -4992,19 +5004,29 @@ namespace AssistantV1 { target: ChannelTransferTarget; } - /** An object specifying target channels available for the transfer. Each property of this object represents an available transfer target. Currently, the only supported property is **chat**, representing the web chat integration. */ + /** + * An object specifying target channels available for the transfer. Each property of this object represents an + * available transfer target. Currently, the only supported property is **chat**, representing the web chat + * integration. + */ export interface ChannelTransferTarget { /** Information for transferring to the web chat integration. */ chat?: ChannelTransferTargetChat; } - /** Information for transferring to the web chat integration. */ + /** + * Information for transferring to the web chat integration. + */ export interface ChannelTransferTargetChat { /** The URL of the target web chat. */ url?: string; } - /** State information for the conversation. To maintain state, include the context from the previous response. */ + /** + * State information for the conversation. To maintain state, include the context from the previous response. + * + * This type supports additional properties of type any. Any context variable. + */ export interface Context { /** The unique identifier of the conversation. The conversation ID cannot contain any of the following * characters: `+` `=` `&&` `||` `>` `<` `!` `(` `)` `{` `}` `[` `]` `^` `"` `~` `*` `?` `:` `\` `/`. @@ -5014,11 +5036,16 @@ namespace AssistantV1 { system?: JsonObject; /** Metadata related to the message. */ metadata?: MessageContextMetadata; - /** Context accepts additional properties. */ + + /** + * Context accepts additional properties of type any. Any context variable. + */ [propName: string]: any; } - /** Counterexample. */ + /** + * Counterexample. + */ export interface Counterexample { /** The text of a user input marked as irrelevant input. This string must conform to the following restrictions: * - It cannot contain carriage return, newline, or tab characters. @@ -5031,7 +5058,9 @@ namespace AssistantV1 { updated?: string; } - /** CounterexampleCollection. */ + /** + * CounterexampleCollection. + */ export interface CounterexampleCollection { /** An array of objects describing the examples marked as irrelevant input. */ counterexamples: Counterexample[]; @@ -5041,7 +5070,9 @@ namespace AssistantV1 { pagination: Pagination; } - /** CreateEntity. */ + /** + * CreateEntity. + */ export interface CreateEntity { /** The name of the entity. This string must conform to the following restrictions: * - It can contain only Unicode alphanumeric, underscore, and hyphen characters. @@ -5063,7 +5094,9 @@ namespace AssistantV1 { values?: CreateValue[]; } - /** CreateIntent. */ + /** + * CreateIntent. + */ export interface CreateIntent { /** The name of the intent. This string must conform to the following restrictions: * - It can contain only Unicode alphanumeric, underscore, hyphen, and dot characters. @@ -5080,7 +5113,9 @@ namespace AssistantV1 { examples?: Example[]; } - /** CreateValue. */ + /** + * CreateValue. + */ export interface CreateValue { /** The text of the entity value. This string must conform to the following restrictions: * - It cannot contain carriage return, newline, or tab characters. @@ -5118,7 +5153,9 @@ namespace AssistantV1 { } } - /** DialogNode. */ + /** + * DialogNode. + */ export interface DialogNode { /** The unique ID of the dialog node. This is an internal identifier used to refer to the dialog node from other * dialog nodes and in the diagnostic information included with message responses. @@ -5229,7 +5266,9 @@ namespace AssistantV1 { } } - /** DialogNodeAction. */ + /** + * DialogNodeAction. + */ export interface DialogNodeAction { /** The name of the action. */ name: string; @@ -5255,7 +5294,9 @@ namespace AssistantV1 { } } - /** An array of dialog nodes. */ + /** + * An array of dialog nodes. + */ export interface DialogNodeCollection { /** An array of objects describing the dialog nodes defined for the workspace. */ dialog_nodes: DialogNode[]; @@ -5265,15 +5306,24 @@ namespace AssistantV1 { pagination: Pagination; } - /** The context for the dialog node. */ + /** + * The context for the dialog node. + * + * This type supports additional properties of type any. Any context variable. + */ export interface DialogNodeContext { /** Context data intended for specific integrations. */ integrations?: JsonObject; - /** DialogNodeContext accepts additional properties. */ + + /** + * DialogNodeContext accepts additional properties of type any. Any context variable. + */ [propName: string]: any; } - /** The next step to execute following this dialog node. */ + /** + * The next step to execute following this dialog node. + */ export interface DialogNodeNextStep { /** What happens after the dialog node completes. The valid values depend on the node type: * - The following values are valid for any node: @@ -5322,7 +5372,12 @@ namespace AssistantV1 { } } - /** The output of the dialog node. For more information about how to specify dialog node output, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses). */ + /** + * The output of the dialog node. For more information about how to specify dialog node output, see the + * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses). + * + * This type supports additional properties of type any. Any additional data included in the dialog node output. + */ export interface DialogNodeOutput { /** An array of objects describing the output defined for the dialog node. */ generic?: DialogNodeOutputGeneric[]; @@ -5332,20 +5387,30 @@ namespace AssistantV1 { integrations?: JsonObject; /** Options that modify how specified output is handled. */ modifiers?: DialogNodeOutputModifiers; - /** DialogNodeOutput accepts additional properties. */ + + /** + * DialogNodeOutput accepts additional properties of type any. Any additional data included in the dialog node + * output. + */ [propName: string]: any; } - /** Routing or other contextual information to be used by target service desk systems. */ + /** + * Routing or other contextual information to be used by target service desk systems. + */ export interface DialogNodeOutputConnectToAgentTransferInfo { target?: JsonObject; } - /** DialogNodeOutputGeneric. */ + /** + * DialogNodeOutputGeneric. + */ export interface DialogNodeOutputGeneric { } - /** Options that modify how specified output is handled. */ + /** + * Options that modify how specified output is handled. + */ export interface DialogNodeOutputModifiers { /** Whether values in the output will overwrite output values in an array specified by previously executed * dialog nodes. If this option is set to `false`, new values will be appended to previously specified values. @@ -5353,7 +5418,9 @@ namespace AssistantV1 { overwrite?: boolean; } - /** DialogNodeOutputOptionsElement. */ + /** + * DialogNodeOutputOptionsElement. + */ export interface DialogNodeOutputOptionsElement { /** The user-facing label for the option. */ label: string; @@ -5363,7 +5430,10 @@ namespace AssistantV1 { value: DialogNodeOutputOptionsElementValue; } - /** An object defining the message input to be sent to the Watson Assistant service if the user selects the corresponding option. */ + /** + * An object defining the message input to be sent to the Watson Assistant service if the user selects the + * corresponding option. + */ export interface DialogNodeOutputOptionsElementValue { /** An input object that includes the input text. */ input?: MessageInput; @@ -5381,7 +5451,9 @@ namespace AssistantV1 { entities?: RuntimeEntity[]; } - /** DialogNodeOutputTextValuesElement. */ + /** + * DialogNodeOutputTextValuesElement. + */ export interface DialogNodeOutputTextValuesElement { /** The text of a response. This string can include newline characters (`\n`), Markdown tagging, or other * special characters, if supported by the channel. @@ -5389,7 +5461,9 @@ namespace AssistantV1 { text?: string; } - /** DialogNodeVisitedDetails. */ + /** + * DialogNodeVisitedDetails. + */ export interface DialogNodeVisitedDetails { /** The unique ID of a dialog node that was triggered during processing of the input message. */ dialog_node?: string; @@ -5399,7 +5473,9 @@ namespace AssistantV1 { conditions?: string; } - /** DialogSuggestion. */ + /** + * DialogSuggestion. + */ export interface DialogSuggestion { /** The user-facing label for the disambiguation option. This label is taken from the **title** or * **user_label** property of the corresponding dialog node. @@ -5422,7 +5498,13 @@ namespace AssistantV1 { dialog_node?: string; } - /** An object defining the message input, intents, and entities to be sent to the Watson Assistant service if the user selects the corresponding disambiguation option. **Note:** These properties must be included in the request body of the next message sent to the assistant. Do not modify or remove any of the included properties. */ + /** + * An object defining the message input, intents, and entities to be sent to the Watson Assistant service if the user + * selects the corresponding disambiguation option. + * + * **Note:** These properties must be included in the request body of the next message sent to the assistant. Do not + * modify or remove any of the included properties. + */ export interface DialogSuggestionValue { /** An input object that includes the input text. */ input?: MessageInput; @@ -5432,7 +5514,9 @@ namespace AssistantV1 { entities?: RuntimeEntity[]; } - /** Entity. */ + /** + * Entity. + */ export interface Entity { /** The name of the entity. This string must conform to the following restrictions: * - It can contain only Unicode alphanumeric, underscore, and hyphen characters. @@ -5454,7 +5538,9 @@ namespace AssistantV1 { values?: Value[]; } - /** An array of objects describing the entities for the workspace. */ + /** + * An array of objects describing the entities for the workspace. + */ export interface EntityCollection { /** An array of objects describing the entities defined for the workspace. */ entities: Entity[]; @@ -5464,7 +5550,9 @@ namespace AssistantV1 { pagination: Pagination; } - /** An object describing a contextual entity mention. */ + /** + * An object describing a contextual entity mention. + */ export interface EntityMention { /** The text of the user input example. */ text: string; @@ -5476,7 +5564,9 @@ namespace AssistantV1 { location: number[]; } - /** EntityMentionCollection. */ + /** + * EntityMentionCollection. + */ export interface EntityMentionCollection { /** An array of objects describing the entity mentions defined for an entity. */ examples: EntityMention[]; @@ -5486,7 +5576,9 @@ namespace AssistantV1 { pagination: Pagination; } - /** Example. */ + /** + * Example. + */ export interface Example { /** The text of a user input example. This string must conform to the following restrictions: * - It cannot contain carriage return, newline, or tab characters. @@ -5501,7 +5593,9 @@ namespace AssistantV1 { updated?: string; } - /** ExampleCollection. */ + /** + * ExampleCollection. + */ export interface ExampleCollection { /** An array of objects describing the examples defined for the intent. */ examples: Example[]; @@ -5511,7 +5605,9 @@ namespace AssistantV1 { pagination: Pagination; } - /** Intent. */ + /** + * Intent. + */ export interface Intent { /** The name of the intent. This string must conform to the following restrictions: * - It can contain only Unicode alphanumeric, underscore, hyphen, and dot characters. @@ -5528,7 +5624,9 @@ namespace AssistantV1 { examples?: Example[]; } - /** IntentCollection. */ + /** + * IntentCollection. + */ export interface IntentCollection { /** An array of objects describing the intents defined for the workspace. */ intents: Intent[]; @@ -5538,7 +5636,9 @@ namespace AssistantV1 { pagination: Pagination; } - /** Log. */ + /** + * Log. + */ export interface Log { /** A request sent to the workspace, including the user input and context. */ request: MessageRequest; @@ -5556,7 +5656,9 @@ namespace AssistantV1 { language: string; } - /** LogCollection. */ + /** + * LogCollection. + */ export interface LogCollection { /** An array of objects describing log events. */ logs: Log[]; @@ -5566,7 +5668,9 @@ namespace AssistantV1 { pagination: LogPagination; } - /** Log message details. */ + /** + * Log message details. + */ export interface LogMessage { /** The severity of the log message. */ level: LogMessage.Constants.Level | string; @@ -5588,7 +5692,9 @@ namespace AssistantV1 { } } - /** An object that identifies the dialog element that generated the error message. */ + /** + * An object that identifies the dialog element that generated the error message. + */ export interface LogMessageSource { /** A string that indicates the type of dialog element that generated the error message. */ type?: LogMessageSource.Constants.Type | string; @@ -5604,7 +5710,10 @@ namespace AssistantV1 { } } - /** The pagination data for the returned objects. For more information about using pagination, see [Pagination](#pagination). */ + /** + * The pagination data for the returned objects. For more information about using pagination, see + * [Pagination](#pagination). + */ export interface LogPagination { /** The URL that will return the next page of results, if any. */ next_url?: string; @@ -5614,7 +5723,9 @@ namespace AssistantV1 { next_cursor?: string; } - /** A mention of a contextual entity. */ + /** + * A mention of a contextual entity. + */ export interface Mention { /** The name of the entity. */ entity: string; @@ -5624,7 +5735,9 @@ namespace AssistantV1 { location: number[]; } - /** Metadata related to the message. */ + /** + * Metadata related to the message. + */ export interface MessageContextMetadata { /** A label identifying the deployment environment, used for filtering log data. This string cannot contain * carriage return, newline, or tab characters. @@ -5642,7 +5755,11 @@ namespace AssistantV1 { user_id?: string; } - /** An input object that includes the input text. */ + /** + * An input object that includes the input text. + * + * This type supports additional properties of type any. Any additional data included with the message input. + */ export interface MessageInput { /** The text of the user input. This string cannot contain carriage return, newline, or tab characters. */ text?: string; @@ -5665,11 +5782,16 @@ namespace AssistantV1 { * was corrected. */ original_text?: string; - /** MessageInput accepts additional properties. */ + + /** + * MessageInput accepts additional properties of type any. Any additional data included with the message input. + */ [propName: string]: any; } - /** A request sent to the workspace, including the user input and context. */ + /** + * A request sent to the workspace, including the user input and context. + */ export interface MessageRequest { /** An input object that includes the input text. */ input?: MessageInput; @@ -5703,7 +5825,9 @@ namespace AssistantV1 { user_id?: string; } - /** The response sent by the workspace, including the output text, detected intents and entities, and context. */ + /** + * The response sent by the workspace, including the output text, detected intents and entities, and context. + */ export interface MessageResponse { /** An input object that includes the input text. */ input: MessageInput; @@ -5733,7 +5857,12 @@ namespace AssistantV1 { user_id: string; } - /** An output object that includes the response to the user, the dialog nodes that were triggered, and messages from the log. */ + /** + * An output object that includes the response to the user, the dialog nodes that were triggered, and messages from + * the log. + * + * This type supports additional properties of type any. Any additional data included with the output. + */ export interface OutputData { /** An array of the nodes that were triggered to create the response, in the order in which they were visited. * This information is useful for debugging and for tracing the path taken through the node tree. @@ -5750,11 +5879,17 @@ namespace AssistantV1 { * supported response types. */ generic?: RuntimeResponseGeneric[]; - /** OutputData accepts additional properties. */ + + /** + * OutputData accepts additional properties of type any. Any additional data included with the output. + */ [propName: string]: any; } - /** The pagination data for the returned objects. For more information about using pagination, see [Pagination](#pagination). */ + /** + * The pagination data for the returned objects. For more information about using pagination, see + * [Pagination](#pagination). + */ export interface Pagination { /** The URL that will return the same page of results. */ refresh_url: string; @@ -5772,7 +5907,9 @@ namespace AssistantV1 { next_cursor?: string; } - /** ResponseGenericChannel. */ + /** + * ResponseGenericChannel. + */ export interface ResponseGenericChannel { /** A channel for which the response is intended. * @@ -5795,7 +5932,9 @@ namespace AssistantV1 { } } - /** A term from the request that was identified as an entity. */ + /** + * A term from the request that was identified as an entity. + */ export interface RuntimeEntity { /** An entity detected in the input. */ entity: string; @@ -5829,7 +5968,9 @@ namespace AssistantV1 { role?: RuntimeEntityRole; } - /** An alternative value for the recognized entity. */ + /** + * An alternative value for the recognized entity. + */ export interface RuntimeEntityAlternative { /** The entity value that was recognized in the user input. */ value?: string; @@ -5837,7 +5978,9 @@ namespace AssistantV1 { confidence?: number; } - /** RuntimeEntityInterpretation. */ + /** + * RuntimeEntityInterpretation. + */ export interface RuntimeEntityInterpretation { /** The calendar used to represent a recognized date (for example, `Gregorian`). */ calendar_type?: string; @@ -5943,7 +6086,11 @@ namespace AssistantV1 { } } - /** An object describing the role played by a system entity that is specifies the beginning or end of a range recognized in the user input. This property is included only if the new system entities are enabled for the workspace. */ + /** + * An object describing the role played by a system entity that is specifies the beginning or end of a range + * recognized in the user input. This property is included only if the new system entities are enabled for the + * workspace. + */ export interface RuntimeEntityRole { /** The relationship of the entity to the range. */ type?: RuntimeEntityRole.Constants.Type | string; @@ -5962,7 +6109,9 @@ namespace AssistantV1 { } } - /** An intent identified in the user input. */ + /** + * An intent identified in the user input. + */ export interface RuntimeIntent { /** The name of the recognized intent. */ intent: string; @@ -5972,17 +6121,23 @@ namespace AssistantV1 { confidence?: number; } - /** RuntimeResponseGeneric. */ + /** + * RuntimeResponseGeneric. + */ export interface RuntimeResponseGeneric { } - /** An object describing an error that occurred during processing of an asynchronous operation. */ + /** + * An object describing an error that occurred during processing of an asynchronous operation. + */ export interface StatusError { /** The text of the error message. */ message?: string; } - /** Synonym. */ + /** + * Synonym. + */ export interface Synonym { /** The text of the synonym. This string must conform to the following restrictions: * - It cannot contain carriage return, newline, or tab characters. @@ -5995,7 +6150,9 @@ namespace AssistantV1 { updated?: string; } - /** SynonymCollection. */ + /** + * SynonymCollection. + */ export interface SynonymCollection { /** An array of synonyms. */ synonyms: Synonym[]; @@ -6005,7 +6162,9 @@ namespace AssistantV1 { pagination: Pagination; } - /** Value. */ + /** + * Value. + */ export interface Value { /** The text of the entity value. This string must conform to the following restrictions: * - It cannot contain carriage return, newline, or tab characters. @@ -6043,7 +6202,9 @@ namespace AssistantV1 { } } - /** ValueCollection. */ + /** + * ValueCollection. + */ export interface ValueCollection { /** An array of entity values. */ values: Value[]; @@ -6053,7 +6214,11 @@ namespace AssistantV1 { pagination: Pagination; } - /** A webhook that can be used by dialog nodes to make programmatic calls to an external function. **Note:** Currently, only a single webhook named `main_webhook` is supported. */ + /** + * A webhook that can be used by dialog nodes to make programmatic calls to an external function. + * + * **Note:** Currently, only a single webhook named `main_webhook` is supported. + */ export interface Webhook { /** The URL for the external service or application to which you want to send HTTP POST requests. */ url: string; @@ -6063,7 +6228,9 @@ namespace AssistantV1 { headers?: WebhookHeader[]; } - /** A key/value pair defining an HTTP header and a value. */ + /** + * A key/value pair defining an HTTP header and a value. + */ export interface WebhookHeader { /** The name of an HTTP header (for example, `Authorization`). */ name: string; @@ -6071,7 +6238,9 @@ namespace AssistantV1 { value: string; } - /** Workspace. */ + /** + * Workspace. + */ export interface Workspace { /** The name of the workspace. This string cannot contain carriage return, newline, or tab characters. */ name: string; @@ -6133,7 +6302,9 @@ namespace AssistantV1 { } } - /** WorkspaceCollection. */ + /** + * WorkspaceCollection. + */ export interface WorkspaceCollection { /** An array of objects describing the workspaces associated with the service instance. */ workspaces: Workspace[]; @@ -6143,7 +6314,11 @@ namespace AssistantV1 { pagination: Pagination; } - /** An object containing properties that indicate how many intents, entities, and dialog nodes are defined in the workspace. This property is included only in responses from the **Export workspace asynchronously** method, and only when the **verbose** query parameter is set to `true`. */ + /** + * An object containing properties that indicate how many intents, entities, and dialog nodes are defined in the + * workspace. This property is included only in responses from the **Export workspace asynchronously** method, and + * only when the **verbose** query parameter is set to `true`. + */ export interface WorkspaceCounts { /** The number of intents defined in the workspace. */ intent?: number; @@ -6153,7 +6328,11 @@ namespace AssistantV1 { node?: number; } - /** Global settings for the workspace. */ + /** + * Global settings for the workspace. + * + * This type supports additional properties of type any. For internal use only. + */ export interface WorkspaceSystemSettings { /** Workspace settings related to the Watson Assistant user interface. */ tooling?: WorkspaceSystemSettingsTooling; @@ -6175,11 +6354,16 @@ namespace AssistantV1 { off_topic?: WorkspaceSystemSettingsOffTopic; /** Workspace settings related to the version of the training algorithms currently used by the skill. */ nlp?: WorkspaceSystemSettingsNlp; - /** WorkspaceSystemSettings accepts additional properties. */ + + /** + * WorkspaceSystemSettings accepts additional properties of type any. For internal use only. + */ [propName: string]: any; } - /** Workspace settings related to the disambiguation feature. */ + /** + * Workspace settings related to the disambiguation feature. + */ export interface WorkspaceSystemSettingsDisambiguation { /** The text of the introductory prompt that accompanies disambiguation options presented to the user. */ prompt?: string; @@ -6216,7 +6400,9 @@ namespace AssistantV1 { } } - /** Workspace settings related to the version of the training algorithms currently used by the skill. */ + /** + * Workspace settings related to the version of the training algorithms currently used by the skill. + */ export interface WorkspaceSystemSettingsNlp { /** The policy the skill follows for selecting the algorithm version to use. For more information, see the * [documentation](/docs/watson-assistant?topic=watson-assistant-algorithm-version). @@ -6229,25 +6415,33 @@ namespace AssistantV1 { model?: string; } - /** Workspace settings related to detection of irrelevant input. */ + /** + * Workspace settings related to detection of irrelevant input. + */ export interface WorkspaceSystemSettingsOffTopic { /** Whether enhanced irrelevance detection is enabled for the workspace. */ enabled?: boolean; } - /** Workspace settings related to the behavior of system entities. */ + /** + * Workspace settings related to the behavior of system entities. + */ export interface WorkspaceSystemSettingsSystemEntities { /** Whether the new system entities are enabled for the workspace. */ enabled?: boolean; } - /** Workspace settings related to the Watson Assistant user interface. */ + /** + * Workspace settings related to the Watson Assistant user interface. + */ export interface WorkspaceSystemSettingsTooling { /** Whether the dialog JSON editor displays text responses within the `output.generic` object. */ store_generic_responses?: boolean; } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6271,7 +6465,9 @@ namespace AssistantV1 { alt_text?: string; } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6287,7 +6483,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6309,7 +6507,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6329,7 +6529,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeImage. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeImage. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeImage extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6347,7 +6549,9 @@ namespace AssistantV1 { alt_text?: string; } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeOption. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeOption. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeOption extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6374,7 +6578,9 @@ namespace AssistantV1 { } } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypePause. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypePause. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypePause extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6390,7 +6596,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6426,7 +6634,9 @@ namespace AssistantV1 { } } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeText. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeText. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeText extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6452,7 +6662,9 @@ namespace AssistantV1 { } } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6466,7 +6678,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo. */ + /** + * DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo. + */ export interface DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo extends DialogNodeOutputGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6488,7 +6702,9 @@ namespace AssistantV1 { alt_text?: string; } - /** RuntimeResponseGenericRuntimeResponseTypeAudio. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeAudio. + */ export interface RuntimeResponseGenericRuntimeResponseTypeAudio extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6512,7 +6728,9 @@ namespace AssistantV1 { alt_text?: string; } - /** RuntimeResponseGenericRuntimeResponseTypeChannelTransfer. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeChannelTransfer. + */ export interface RuntimeResponseGenericRuntimeResponseTypeChannelTransfer extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6530,7 +6748,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeConnectToAgent. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeConnectToAgent. + */ export interface RuntimeResponseGenericRuntimeResponseTypeConnectToAgent extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6562,7 +6782,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeIframe. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeIframe. + */ export interface RuntimeResponseGenericRuntimeResponseTypeIframe extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6582,7 +6804,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeImage. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeImage. + */ export interface RuntimeResponseGenericRuntimeResponseTypeImage extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6602,7 +6826,9 @@ namespace AssistantV1 { alt_text?: string; } - /** RuntimeResponseGenericRuntimeResponseTypeOption. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeOption. + */ export interface RuntimeResponseGenericRuntimeResponseTypeOption extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6631,7 +6857,9 @@ namespace AssistantV1 { } } - /** RuntimeResponseGenericRuntimeResponseTypePause. */ + /** + * RuntimeResponseGenericRuntimeResponseTypePause. + */ export interface RuntimeResponseGenericRuntimeResponseTypePause extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6647,7 +6875,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeSuggestion. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeSuggestion. + */ export interface RuntimeResponseGenericRuntimeResponseTypeSuggestion extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6663,7 +6893,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeText. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeText. + */ export interface RuntimeResponseGenericRuntimeResponseTypeText extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6677,7 +6909,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeUserDefined. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeUserDefined. + */ export interface RuntimeResponseGenericRuntimeResponseTypeUserDefined extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -6691,7 +6925,9 @@ namespace AssistantV1 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeVideo. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeVideo. + */ export interface RuntimeResponseGenericRuntimeResponseTypeVideo extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. diff --git a/assistant/v2.ts b/assistant/v2.ts index 7bb076d8ca..928c714d04 100644 --- a/assistant/v2.ts +++ b/assistant/v2.ts @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2018, 2024. + * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ /** - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.1-5136e54a-20241108-203028 */ import * as extend from 'extend'; @@ -88,6 +88,190 @@ class AssistantV2 extends BaseService { this.version = options.version; } + /************************* + * conversationalSkillProviders + ************************/ + + /** + * Create a conversational skill provider. + * + * Create a new conversational skill provider. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.providerId - The unique identifier of the provider. + * @param {ProviderSpecification} params.specification - The specification of the provider. + * @param {ProviderPrivate} params._private - Private information of the provider. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public createProvider( + params: AssistantV2.CreateProviderParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['providerId', 'specification', '_private']; + const _validParams = ['providerId', 'specification', '_private', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const body = { + 'provider_id': _params.providerId, + 'specification': _params.specification, + 'private': _params._private, + }; + + const query = { + 'version': this.version, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'createProvider'); + + const parameters = { + options: { + url: '/v2/providers', + method: 'POST', + body, + qs: query, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * List conversational skill providers. + * + * List the conversational skill providers associated with a Watson Assistant service instance. + * + * @param {Object} [params] - The parameters to send to the service. + * @param {number} [params.pageLimit] - The number of records to return in each page of results. + * @param {boolean} [params.includeCount] - Whether to include information about the number of records that satisfy + * the request, regardless of the page limit. If this parameter is `true`, the `pagination` object in the response + * includes the `total` property. + * @param {string} [params.sort] - The attribute by which returned conversational skill providers will be sorted. To + * reverse the sort order, prefix the value with a minus sign (`-`). + * @param {string} [params.cursor] - A token identifying the page of results to retrieve. + * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` + * timestamps) in the response. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public listProviders( + params?: AssistantV2.ListProvidersParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = []; + const _validParams = ['pageLimit', 'includeCount', 'sort', 'cursor', 'includeAudit', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + 'page_limit': _params.pageLimit, + 'include_count': _params.includeCount, + 'sort': _params.sort, + 'cursor': _params.cursor, + 'include_audit': _params.includeAudit, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'listProviders'); + + const parameters = { + options: { + url: '/v2/providers', + method: 'GET', + qs: query, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * Update a conversational skill provider. + * + * Update a new conversational skill provider. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.providerId - Unique identifier of the conversational skill provider. + * @param {ProviderSpecification} params.specification - The specification of the provider. + * @param {ProviderPrivate} params._private - Private information of the provider. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public updateProvider( + params: AssistantV2.UpdateProviderParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['providerId', 'specification', '_private']; + const _validParams = ['providerId', 'specification', '_private', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const body = { + 'specification': _params.specification, + 'private': _params._private, + }; + + const query = { + 'version': this.version, + }; + + const path = { + 'provider_id': _params.providerId, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'updateProvider'); + + const parameters = { + options: { + url: '/v2/providers/{provider_id}', + method: 'POST', + body, + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } /************************* * assistants ************************/ @@ -440,6 +624,9 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {string} params.environmentId - Unique identifier of the environment. To find the environment ID in the + * watsonx Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the + * API does not support creating environments. * @param {string} params.sessionId - Unique identifier of the session. * @param {MessageInput} [params.input] - An input object that includes the input text. * @param {MessageContext} [params.context] - Context data for the conversation. You can use this property to set or @@ -462,8 +649,8 @@ class AssistantV2 extends BaseService { params: AssistantV2.MessageParams ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId', 'sessionId']; - const _validParams = ['assistantId', 'sessionId', 'input', 'context', 'userId', 'headers']; + const _requiredParams = ['assistantId', 'environmentId', 'sessionId']; + const _validParams = ['assistantId', 'environmentId', 'sessionId', 'input', 'context', 'userId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -481,6 +668,7 @@ class AssistantV2 extends BaseService { const path = { 'assistant_id': _params.assistantId, + 'environment_id': _params.environmentId, 'session_id': _params.sessionId, }; @@ -528,6 +716,9 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {string} params.environmentId - Unique identifier of the environment. To find the environment ID in the + * watsonx Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the + * API does not support creating environments. * @param {StatelessMessageInput} [params.input] - An input object that includes the input text. * @param {StatelessMessageContext} [params.context] - Context data for the conversation. You can use this property to * set or modify context variables, which can also be accessed by dialog nodes. The context is not stored by the @@ -549,8 +740,8 @@ class AssistantV2 extends BaseService { params: AssistantV2.MessageStatelessParams ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId']; - const _validParams = ['assistantId', 'input', 'context', 'userId', 'headers']; + const _requiredParams = ['assistantId', 'environmentId']; + const _validParams = ['assistantId', 'environmentId', 'input', 'context', 'userId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -568,6 +759,7 @@ class AssistantV2 extends BaseService { const path = { 'assistant_id': _params.assistantId, + 'environment_id': _params.environmentId, }; const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'messageStateless'); @@ -596,31 +788,54 @@ class AssistantV2 extends BaseService { return this.createRequest(parameters); } /************************* - * bulkClassify + * messageStream ************************/ /** - * Identify intents and entities in multiple user utterances. - * - * Send multiple user inputs to a dialog skill in a single request and receive information about the intents and - * entities recognized in each input. This method is useful for testing and comparing the performance of different - * skills or skill versions. + * Send user input to assistant (stateful). * - * This method is available only with Enterprise with Data Isolation plans. + * Send user input to an assistant and receive a streamed response, with conversation state (including context data) + * stored by watsonx Assistant for the duration of the session. * * @param {Object} params - The parameters to send to the service. - * @param {string} params.skillId - Unique identifier of the skill. To find the skill ID in the watsonx Assistant user - * interface, open the skill settings and click **API Details**. - * @param {BulkClassifyUtterance[]} params.input - An array of input utterances to classify. + * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant + * is deployed, depending on the type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {string} params.environmentId - Unique identifier of the environment. To find the environment ID in the + * watsonx Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the + * API does not support creating environments. + * @param {string} params.sessionId - Unique identifier of the session. + * @param {MessageInput} [params.input] - An input object that includes the input text. + * @param {MessageContext} [params.context] - Context data for the conversation. You can use this property to set or + * modify context variables, which can also be accessed by dialog nodes. The context is stored by the assistant on a + * per-session basis. + * + * **Note:** The total size of the context data stored for a stateful session cannot exceed 100KB. + * @param {string} [params.userId] - A string value that identifies the user who is interacting with the assistant. + * The client must provide a unique identifier for each individual end user who accesses the application. For + * user-based plans, this user ID is used to identify unique users for billing purposes. This string cannot contain + * carriage return, newline, or tab characters. If no value is specified in the input, **user_id** is automatically + * set to the value of **context.global.session_id**. + * + * **Note:** This property is the same as the **user_id** property in the global system context. If **user_id** is + * specified in both locations, the value specified at the root is used. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public bulkClassify( - params: AssistantV2.BulkClassifyParams - ): Promise> { + public messageStream( + params: AssistantV2.MessageStreamParams + ): Promise> { const _params = { ...params }; - const _requiredParams = ['skillId', 'input']; - const _validParams = ['skillId', 'input', 'headers']; + const _requiredParams = ['assistantId', 'environmentId', 'sessionId']; + const _validParams = ['assistantId', 'environmentId', 'sessionId', 'input', 'context', 'userId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -628,6 +843,8 @@ class AssistantV2 extends BaseService { const body = { 'input': _params.input, + 'context': _params.context, + 'user_id': _params.userId, }; const query = { @@ -635,25 +852,28 @@ class AssistantV2 extends BaseService { }; const path = { - 'skill_id': _params.skillId, + 'assistant_id': _params.assistantId, + 'environment_id': _params.environmentId, + 'session_id': _params.sessionId, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'bulkClassify'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'messageStream'); const parameters = { options: { - url: '/v2/skills/{skill_id}/workspace/bulk_classify', + url: '/v2/assistants/{assistant_id}/environments/{environment_id}/sessions/{session_id}/message_stream', method: 'POST', body, qs: query, path, + responseType: 'stream', }, defaultOptions: extend(true, {}, this.baseOptions, { headers: extend( true, sdkHeaders, { - 'Accept': 'application/json', + 'Accept': 'text/event-stream', 'Content-Type': 'application/json', }, _params.headers @@ -663,20 +883,12 @@ class AssistantV2 extends BaseService { return this.createRequest(parameters); } - /************************* - * logs - ************************/ /** - * List log events for an assistant. - * - * List the events from the log of an assistant. - * - * This method requires Manager access. + * Send user input to assistant (stateless). * - * **Note:** If you use the **cursor** parameter to retrieve results one page at a time, subsequent requests must be - * no more than 5 minutes apart. Any returned value for the **cursor** parameter becomes invalid after 5 minutes. For - * more information about using pagination, see [Pagination](#pagination). + * Send user input to an assistant and receive a response, with conversation state (including context data) managed by + * your application. * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -690,33 +902,200 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. - * @param {string} [params.sort] - How to sort the returned log events. You can sort by **request_timestamp**. To - * reverse the sort order, prefix the parameter value with a minus sign (`-`). - * @param {string} [params.filter] - A cacheable parameter that limits the results to those matching the specified - * filter. For more information, see the - * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference). - * @param {number} [params.pageLimit] - The number of records to return in each page of results. + * @param {string} params.environmentId - Unique identifier of the environment. To find the environment ID in the + * watsonx Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the + * API does not support creating environments. + * @param {MessageInput} [params.input] - An input object that includes the input text. + * @param {MessageContext} [params.context] - Context data for the conversation. You can use this property to set or + * modify context variables, which can also be accessed by dialog nodes. The context is stored by the assistant on a + * per-session basis. * - * **Note:** If the API is not returning your data, try lowering the page_limit value. - * @param {string} [params.cursor] - A token identifying the page of results to retrieve. + * **Note:** The total size of the context data stored for a stateful session cannot exceed 100KB. + * @param {string} [params.userId] - A string value that identifies the user who is interacting with the assistant. + * The client must provide a unique identifier for each individual end user who accesses the application. For + * user-based plans, this user ID is used to identify unique users for billing purposes. This string cannot contain + * carriage return, newline, or tab characters. If no value is specified in the input, **user_id** is automatically + * set to the value of **context.global.session_id**. + * + * **Note:** This property is the same as the **user_id** property in the global system context. If **user_id** is + * specified in both locations, the value specified at the root is used. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public listLogs( - params: AssistantV2.ListLogsParams - ): Promise> { + public messageStreamStateless( + params: AssistantV2.MessageStreamStatelessParams + ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId']; - const _validParams = ['assistantId', 'sort', 'filter', 'pageLimit', 'cursor', 'headers']; + const _requiredParams = ['assistantId', 'environmentId']; + const _validParams = ['assistantId', 'environmentId', 'input', 'context', 'userId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); } - const query = { - 'version': this.version, - 'sort': _params.sort, - 'filter': _params.filter, + const body = { + 'input': _params.input, + 'context': _params.context, + 'user_id': _params.userId, + }; + + const query = { + 'version': this.version, + }; + + const path = { + 'assistant_id': _params.assistantId, + 'environment_id': _params.environmentId, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'messageStreamStateless'); + + const parameters = { + options: { + url: '/v2/assistants/{assistant_id}/environments/{environment_id}/message_stream', + method: 'POST', + body, + qs: query, + path, + responseType: 'stream', + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'text/event-stream', + 'Content-Type': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + /************************* + * bulkClassify + ************************/ + + /** + * Identify intents and entities in multiple user utterances. + * + * Send multiple user inputs to a dialog skill in a single request and receive information about the intents and + * entities recognized in each input. This method is useful for testing and comparing the performance of different + * skills or skill versions. + * + * This method is available only with Enterprise with Data Isolation plans. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.skillId - Unique identifier of the skill. To find the skill ID in the watsonx Assistant user + * interface, open the skill settings and click **API Details**. + * @param {BulkClassifyUtterance[]} params.input - An array of input utterances to classify. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public bulkClassify( + params: AssistantV2.BulkClassifyParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['skillId', 'input']; + const _validParams = ['skillId', 'input', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const body = { + 'input': _params.input, + }; + + const query = { + 'version': this.version, + }; + + const path = { + 'skill_id': _params.skillId, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'bulkClassify'); + + const parameters = { + options: { + url: '/v2/skills/{skill_id}/workspace/bulk_classify', + method: 'POST', + body, + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + /************************* + * logs + ************************/ + + /** + * List log events for an assistant. + * + * List the events from the log of an assistant. + * + * This method requires Manager access. + * + * **Note:** If you use the **cursor** parameter to retrieve results one page at a time, subsequent requests must be + * no more than 5 minutes apart. Any returned value for the **cursor** parameter becomes invalid after 5 minutes. For + * more information about using pagination, see [Pagination](#pagination). + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant + * is deployed, depending on the type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {string} [params.sort] - How to sort the returned log events. You can sort by **request_timestamp**. To + * reverse the sort order, prefix the parameter value with a minus sign (`-`). + * @param {string} [params.filter] - A cacheable parameter that limits the results to those matching the specified + * filter. For more information, see the + * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference). + * @param {number} [params.pageLimit] - The number of records to return in each page of results. + * + * **Note:** If the API is not returning your data, try lowering the page_limit value. + * @param {string} [params.cursor] - A token identifying the page of results to retrieve. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public listLogs( + params: AssistantV2.ListLogsParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['assistantId']; + const _validParams = ['assistantId', 'sort', 'filter', 'pageLimit', 'cursor', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + 'sort': _params.sort, + 'filter': _params.filter, 'page_limit': _params.pageLimit, 'cursor': _params.cursor, }; @@ -788,13 +1167,401 @@ class AssistantV2 extends BaseService { 'customer_id': _params.customerId, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'deleteUserData'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'deleteUserData'); + + const parameters = { + options: { + url: '/v2/user_data', + method: 'DELETE', + qs: query, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + /************************* + * environments + ************************/ + + /** + * List environments. + * + * List the environments associated with an assistant. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant + * is deployed, depending on the type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {number} [params.pageLimit] - The number of records to return in each page of results. + * @param {boolean} [params.includeCount] - Whether to include information about the number of records that satisfy + * the request, regardless of the page limit. If this parameter is `true`, the `pagination` object in the response + * includes the `total` property. + * @param {string} [params.sort] - The attribute by which returned environments will be sorted. To reverse the sort + * order, prefix the value with a minus sign (`-`). + * @param {string} [params.cursor] - A token identifying the page of results to retrieve. + * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` + * timestamps) in the response. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public listEnvironments( + params: AssistantV2.ListEnvironmentsParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['assistantId']; + const _validParams = ['assistantId', 'pageLimit', 'includeCount', 'sort', 'cursor', 'includeAudit', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + 'page_limit': _params.pageLimit, + 'include_count': _params.includeCount, + 'sort': _params.sort, + 'cursor': _params.cursor, + 'include_audit': _params.includeAudit, + }; + + const path = { + 'assistant_id': _params.assistantId, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'listEnvironments'); + + const parameters = { + options: { + url: '/v2/assistants/{assistant_id}/environments', + method: 'GET', + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * Get environment. + * + * Get information about an environment. For more information about environments, see + * [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish-overview#environments). + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant + * is deployed, depending on the type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {string} params.environmentId - Unique identifier of the environment. To find the environment ID in the + * watsonx Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the + * API does not support creating environments. + * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` + * timestamps) in the response. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public getEnvironment( + params: AssistantV2.GetEnvironmentParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['assistantId', 'environmentId']; + const _validParams = ['assistantId', 'environmentId', 'includeAudit', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + 'include_audit': _params.includeAudit, + }; + + const path = { + 'assistant_id': _params.assistantId, + 'environment_id': _params.environmentId, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'getEnvironment'); + + const parameters = { + options: { + url: '/v2/assistants/{assistant_id}/environments/{environment_id}', + method: 'GET', + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * Update environment. + * + * Update an environment with new or modified data. For more information about environments, see + * [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish-overview#environments). + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant + * is deployed, depending on the type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {string} params.environmentId - Unique identifier of the environment. To find the environment ID in the + * watsonx Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the + * API does not support creating environments. + * @param {string} [params.name] - The name of the environment. + * @param {string} [params.description] - The description of the environment. + * @param {UpdateEnvironmentOrchestration} [params.orchestration] - The search skill orchestration settings for the + * environment. + * @param {number} [params.sessionTimeout] - The session inactivity timeout setting for the environment (in seconds). + * @param {EnvironmentSkill[]} [params.skillReferences] - An array of objects identifying the skills (such as action + * and dialog) that exist in the environment. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public updateEnvironment( + params: AssistantV2.UpdateEnvironmentParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['assistantId', 'environmentId']; + const _validParams = ['assistantId', 'environmentId', 'name', 'description', 'orchestration', 'sessionTimeout', 'skillReferences', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const body = { + 'name': _params.name, + 'description': _params.description, + 'orchestration': _params.orchestration, + 'session_timeout': _params.sessionTimeout, + 'skill_references': _params.skillReferences, + }; + + const query = { + 'version': this.version, + }; + + const path = { + 'assistant_id': _params.assistantId, + 'environment_id': _params.environmentId, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'updateEnvironment'); + + const parameters = { + options: { + url: '/v2/assistants/{assistant_id}/environments/{environment_id}', + method: 'POST', + body, + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + /************************* + * releases + ************************/ + + /** + * Create release. + * + * Create a new release using the current content of the dialog and action skills in the draft environment. (In the + * watsonx Assistant user interface, a release is called a *version*.). + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant + * is deployed, depending on the type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {string} [params.description] - The description of the release. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public createRelease( + params: AssistantV2.CreateReleaseParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['assistantId']; + const _validParams = ['assistantId', 'description', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const body = { + 'description': _params.description, + }; + + const query = { + 'version': this.version, + }; + + const path = { + 'assistant_id': _params.assistantId, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'createRelease'); + + const parameters = { + options: { + url: '/v2/assistants/{assistant_id}/releases', + method: 'POST', + body, + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * List releases. + * + * List the releases associated with an assistant. (In the watsonx Assistant user interface, a release is called a + * *version*.). + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant + * is deployed, depending on the type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + * @param {number} [params.pageLimit] - The number of records to return in each page of results. + * @param {boolean} [params.includeCount] - Whether to include information about the number of records that satisfy + * the request, regardless of the page limit. If this parameter is `true`, the `pagination` object in the response + * includes the `total` property. + * @param {string} [params.sort] - The attribute by which returned workspaces will be sorted. To reverse the sort + * order, prefix the value with a minus sign (`-`). + * @param {string} [params.cursor] - A token identifying the page of results to retrieve. + * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` + * timestamps) in the response. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public listReleases( + params: AssistantV2.ListReleasesParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['assistantId']; + const _validParams = ['assistantId', 'pageLimit', 'includeCount', 'sort', 'cursor', 'includeAudit', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + 'page_limit': _params.pageLimit, + 'include_count': _params.includeCount, + 'sort': _params.sort, + 'cursor': _params.cursor, + 'include_audit': _params.includeAudit, + }; + + const path = { + 'assistant_id': _params.assistantId, + }; + + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'listReleases'); const parameters = { options: { - url: '/v2/user_data', - method: 'DELETE', + url: '/v2/assistants/{assistant_id}/releases', + method: 'GET', qs: query, + path, }, defaultOptions: extend(true, {}, this.baseOptions, { headers: extend( @@ -810,14 +1577,15 @@ class AssistantV2 extends BaseService { return this.createRequest(parameters); } - /************************* - * environments - ************************/ /** - * List environments. + * Get release. * - * List the environments associated with an assistant. + * Get information about a release. + * + * Release data is not available until publishing of the release completes. If publishing is still in progress, you + * can continue to poll by calling the same request again and checking the value of the **status** property. When + * processing has completed, the request returns the release data. * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -831,24 +1599,18 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. - * @param {number} [params.pageLimit] - The number of records to return in each page of results. - * @param {boolean} [params.includeCount] - Whether to include information about the number of records that satisfy - * the request, regardless of the page limit. If this parameter is `true`, the `pagination` object in the response - * includes the `total` property. - * @param {string} [params.sort] - The attribute by which returned environments will be sorted. To reverse the sort - * order, prefix the value with a minus sign (`-`). - * @param {string} [params.cursor] - A token identifying the page of results to retrieve. + * @param {string} params.release - Unique identifier of the release. * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` * timestamps) in the response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public listEnvironments( - params: AssistantV2.ListEnvironmentsParams - ): Promise> { + public getRelease( + params: AssistantV2.GetReleaseParams + ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId']; - const _validParams = ['assistantId', 'pageLimit', 'includeCount', 'sort', 'cursor', 'includeAudit', 'headers']; + const _requiredParams = ['assistantId', 'release']; + const _validParams = ['assistantId', 'release', 'includeAudit', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -856,22 +1618,19 @@ class AssistantV2 extends BaseService { const query = { 'version': this.version, - 'page_limit': _params.pageLimit, - 'include_count': _params.includeCount, - 'sort': _params.sort, - 'cursor': _params.cursor, 'include_audit': _params.includeAudit, }; const path = { 'assistant_id': _params.assistantId, + 'release': _params.release, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'listEnvironments'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'getRelease'); const parameters = { options: { - url: '/v2/assistants/{assistant_id}/environments', + url: '/v2/assistants/{assistant_id}/releases/{release}', method: 'GET', qs: query, path, @@ -892,10 +1651,9 @@ class AssistantV2 extends BaseService { } /** - * Get environment. + * Delete release. * - * Get information about an environment. For more information about environments, see - * [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish-overview#environments). + * Delete a release. (In the watsonx Assistant user interface, a release is called a *version*.). * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -909,20 +1667,16 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. - * @param {string} params.environmentId - Unique identifier of the environment. To find the environment ID in the - * watsonx Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the - * API does not support creating environments. - * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` - * timestamps) in the response. + * @param {string} params.release - Unique identifier of the release. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public getEnvironment( - params: AssistantV2.GetEnvironmentParams - ): Promise> { + public deleteRelease( + params: AssistantV2.DeleteReleaseParams + ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId', 'environmentId']; - const _validParams = ['assistantId', 'environmentId', 'includeAudit', 'headers']; + const _requiredParams = ['assistantId', 'release']; + const _validParams = ['assistantId', 'release', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -930,20 +1684,19 @@ class AssistantV2 extends BaseService { const query = { 'version': this.version, - 'include_audit': _params.includeAudit, }; const path = { 'assistant_id': _params.assistantId, - 'environment_id': _params.environmentId, + 'release': _params.release, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'getEnvironment'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'deleteRelease'); const parameters = { options: { - url: '/v2/assistants/{assistant_id}/environments/{environment_id}', - method: 'GET', + url: '/v2/assistants/{assistant_id}/releases/{release}', + method: 'DELETE', qs: query, path, }, @@ -963,10 +1716,10 @@ class AssistantV2 extends BaseService { } /** - * Update environment. + * Deploy release. * - * Update an environment with new or modified data. For more information about environments, see - * [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish-overview#environments). + * Update the environment with the content of the release. All snapshots saved as part of the release become active in + * the environment. * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -980,52 +1733,43 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. - * @param {string} params.environmentId - Unique identifier of the environment. To find the environment ID in the - * watsonx Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the - * API does not support creating environments. - * @param {string} [params.name] - The name of the environment. - * @param {string} [params.description] - The description of the environment. - * @param {BaseEnvironmentOrchestration} [params.orchestration] - The search skill orchestration settings for the - * environment. - * @param {number} [params.sessionTimeout] - The session inactivity timeout setting for the environment (in seconds). - * @param {EnvironmentSkill[]} [params.skillReferences] - An array of objects identifying the skills (such as action - * and dialog) that exist in the environment. + * @param {string} params.release - Unique identifier of the release. + * @param {string} params.environmentId - The environment ID of the environment where the release is to be deployed. + * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` + * timestamps) in the response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise>} */ - public updateEnvironment( - params: AssistantV2.UpdateEnvironmentParams + public deployRelease( + params: AssistantV2.DeployReleaseParams ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId', 'environmentId']; - const _validParams = ['assistantId', 'environmentId', 'name', 'description', 'orchestration', 'sessionTimeout', 'skillReferences', 'headers']; + const _requiredParams = ['assistantId', 'release', 'environmentId']; + const _validParams = ['assistantId', 'release', 'environmentId', 'includeAudit', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); } const body = { - 'name': _params.name, - 'description': _params.description, - 'orchestration': _params.orchestration, - 'session_timeout': _params.sessionTimeout, - 'skill_references': _params.skillReferences, + 'environment_id': _params.environmentId, }; const query = { 'version': this.version, + 'include_audit': _params.includeAudit, }; const path = { 'assistant_id': _params.assistantId, - 'environment_id': _params.environmentId, + 'release': _params.release, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'updateEnvironment'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'deployRelease'); const parameters = { options: { - url: '/v2/assistants/{assistant_id}/environments/{environment_id}', + url: '/v2/assistants/{assistant_id}/releases/{release}/deploy', method: 'POST', body, qs: query, @@ -1046,15 +1790,16 @@ class AssistantV2 extends BaseService { return this.createRequest(parameters); } - /************************* - * releases - ************************/ /** - * Create release. + * Create release export. * - * Create a new release using the current content of the dialog and action skills in the draft environment. (In the - * watsonx Assistant user interface, a release is called a *version*.). + * Initiate an asynchronous process which will create a downloadable Zip file artifact (/package) for an assistant + * release. This artifact will contain Action and/or Dialog skills that are part of the release. The Dialog skill will + * only be included in the event that coexistence is enabled on the assistant. The expected workflow with the use of + * Release Export endpoint is to first initiate the creation of the artifact with the POST endpoint and then poll the + * GET endpoint to retrieve the artifact. Once the artifact has been created, it will last for the duration (/scope) + * of the release. * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -1068,40 +1813,39 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. - * @param {string} [params.description] - The description of the release. + * @param {string} params.release - Unique identifier of the release. + * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` + * timestamps) in the response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public createRelease( - params: AssistantV2.CreateReleaseParams - ): Promise> { + public createReleaseExport( + params: AssistantV2.CreateReleaseExportParams + ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId']; - const _validParams = ['assistantId', 'description', 'headers']; + const _requiredParams = ['assistantId', 'release']; + const _validParams = ['assistantId', 'release', 'includeAudit', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); } - const body = { - 'description': _params.description, - }; - const query = { 'version': this.version, + 'include_audit': _params.includeAudit, }; const path = { 'assistant_id': _params.assistantId, + 'release': _params.release, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'createRelease'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'createReleaseExport'); const parameters = { options: { - url: '/v2/assistants/{assistant_id}/releases', + url: '/v2/assistants/{assistant_id}/releases/{release}/export', method: 'POST', - body, qs: query, path, }, @@ -1111,7 +1855,6 @@ class AssistantV2 extends BaseService { sdkHeaders, { 'Accept': 'application/json', - 'Content-Type': 'application/json', }, _params.headers ), @@ -1122,10 +1865,19 @@ class AssistantV2 extends BaseService { } /** - * List releases. + * Get release export. * - * List the releases associated with an assistant. (In the watsonx Assistant user interface, a release is called a - * *version*.). + * A dual function endpoint to either retrieve the Zip file artifact that is associated with an assistant release or, + * retrieve the status of the artifact's creation. It is assumed that the artifact creation was already initiated + * prior to calling this endpoint. In the event that the artifact is not yet created and ready for download, this + * endpoint can be used to poll the system until the creation is completed or has failed. On the other hand, if the + * artifact is created, this endpoint will return the Zip file artifact as an octet stream. Once the artifact has been + * created, it will last for the duration (/scope) of the release.

When you will have downloaded the Zip + * file artifact, you have one of three ways to import it into an assistant's draft environment. These are as follows. + *
  1. Import the zip package in Tooling via "Assistant Settings" -> "Download/Upload files" -> + * "Upload" -> "Assistant only".
  2. Import the zip package via "Create release import" endpoint using the + * APIs.
  3. Extract the contents of the Zip file artifact and individually import the skill JSONs via skill + * update endpoints.
. * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -1139,24 +1891,18 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. - * @param {number} [params.pageLimit] - The number of records to return in each page of results. - * @param {boolean} [params.includeCount] - Whether to include information about the number of records that satisfy - * the request, regardless of the page limit. If this parameter is `true`, the `pagination` object in the response - * includes the `total` property. - * @param {string} [params.sort] - The attribute by which returned workspaces will be sorted. To reverse the sort - * order, prefix the value with a minus sign (`-`). - * @param {string} [params.cursor] - A token identifying the page of results to retrieve. + * @param {string} params.release - Unique identifier of the release. * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` * timestamps) in the response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public listReleases( - params: AssistantV2.ListReleasesParams - ): Promise> { + public downloadReleaseExport( + params: AssistantV2.DownloadReleaseExportParams + ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId']; - const _validParams = ['assistantId', 'pageLimit', 'includeCount', 'sort', 'cursor', 'includeAudit', 'headers']; + const _requiredParams = ['assistantId', 'release']; + const _validParams = ['assistantId', 'release', 'includeAudit', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1164,22 +1910,19 @@ class AssistantV2 extends BaseService { const query = { 'version': this.version, - 'page_limit': _params.pageLimit, - 'include_count': _params.includeCount, - 'sort': _params.sort, - 'cursor': _params.cursor, 'include_audit': _params.includeAudit, }; const path = { 'assistant_id': _params.assistantId, + 'release': _params.release, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'listReleases'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'downloadReleaseExport'); const parameters = { options: { - url: '/v2/assistants/{assistant_id}/releases', + url: '/v2/assistants/{assistant_id}/releases/{release}/export', method: 'GET', qs: query, path, @@ -1200,13 +1943,19 @@ class AssistantV2 extends BaseService { } /** - * Get release. + * Get release export as stream. * - * Get information about a release. - * - * Release data is not available until publishing of the release completes. If publishing is still in progress, you - * can continue to poll by calling the same request again and checking the value of the **status** property. When - * processing has completed, the request returns the release data. + * A dual function endpoint to either retrieve the Zip file artifact that is associated with an assistant release or, + * retrieve the status of the artifact's creation. It is assumed that the artifact creation was already initiated + * prior to calling this endpoint. In the event that the artifact is not yet created and ready for download, this + * endpoint can be used to poll the system until the creation is completed or has failed. On the other hand, if the + * artifact is created, this endpoint will return the Zip file artifact as an octet stream. Once the artifact has been + * created, it will last for the duration (/scope) of the release.

When you will have downloaded the Zip + * file artifact, you have one of three ways to import it into an assistant's draft environment. These are as follows. + *
  1. Import the zip package in Tooling via "Assistant Settings" -> "Download/Upload files" -> + * "Upload" -> "Assistant only".
  2. Import the zip package via "Create release import" endpoint using the + * APIs.
  3. Extract the contents of the Zip file artifact and individually import the skill JSONs via skill + * update endpoints.
. * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -1224,11 +1973,11 @@ class AssistantV2 extends BaseService { * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` * timestamps) in the response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public getRelease( - params: AssistantV2.GetReleaseParams - ): Promise> { + public downloadReleaseExportAsStream( + params: AssistantV2.DownloadReleaseExportAsStreamParams + ): Promise> { const _params = { ...params }; const _requiredParams = ['assistantId', 'release']; const _validParams = ['assistantId', 'release', 'includeAudit', 'headers']; @@ -1247,21 +1996,22 @@ class AssistantV2 extends BaseService { 'release': _params.release, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'getRelease'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'downloadReleaseExportAsStream'); const parameters = { options: { - url: '/v2/assistants/{assistant_id}/releases/{release}', + url: '/v2/assistants/{assistant_id}/releases/{release}/export', method: 'GET', qs: query, path, + responseType: 'stream', }, defaultOptions: extend(true, {}, this.baseOptions, { headers: extend( true, sdkHeaders, { - 'Accept': 'application/json', + 'Accept': 'application/octet-stream', }, _params.headers ), @@ -1272,9 +2022,20 @@ class AssistantV2 extends BaseService { } /** - * Delete release. + * Create release import. * - * Delete a release. (In the watsonx Assistant user interface, a release is called a *version*.). + * Import a previously exported assistant release Zip file artifact (/package) into an assistant. This endpoint + * creates (/initiates) an asynchronous task (/job) in the background which will import the artifact contents into the + * draft environment of the assistant on which this endpoint is called. Specifically, the asynchronous operation will + * override the action and/or dialog skills in the assistant. It will be worth noting that when the artifact that is + * provided to this endpoint is from an assistant release which has coexistence enabled (i.e., it has both action and + * dialog skills), the import process will automatically enable coexistence, if not already enabled, on the assistant + * into which said artifact is being uploaded to. On the other hand, if the artifact package being imported only has + * action skill in it, the import asynchronous process will only override the draft environment's action skill, + * regardless of whether coexistence is enabled on the assistant into which the package is being imported. Lastly, the + * system will only run one asynchronous import at a time on an assistant. As such, consecutive imports will override + * previous import's updates to the skills in the draft environment. Once created, you may poll the completion of the + * import via the "Get release import Status" endpoint. * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -1288,36 +2049,41 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. - * @param {string} params.release - Unique identifier of the release. + * @param {NodeJS.ReadableStream | Buffer} params.body - Request body is an Octet-stream of the artifact Zip file that + * is being imported. + * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` + * timestamps) in the response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public deleteRelease( - params: AssistantV2.DeleteReleaseParams - ): Promise> { + public createReleaseImport( + params: AssistantV2.CreateReleaseImportParams + ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId', 'release']; - const _validParams = ['assistantId', 'release', 'headers']; + const _requiredParams = ['assistantId', 'body']; + const _validParams = ['assistantId', 'body', 'includeAudit', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); } + const body = _params.body; const query = { 'version': this.version, + 'include_audit': _params.includeAudit, }; const path = { 'assistant_id': _params.assistantId, - 'release': _params.release, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'deleteRelease'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'createReleaseImport'); const parameters = { options: { - url: '/v2/assistants/{assistant_id}/releases/{release}', - method: 'DELETE', + url: '/v2/assistants/{assistant_id}/import', + method: 'POST', + body, qs: query, path, }, @@ -1327,6 +2093,7 @@ class AssistantV2 extends BaseService { sdkHeaders, { 'Accept': 'application/json', + 'Content-Type': 'application/octet-stream', }, _params.headers ), @@ -1337,10 +2104,10 @@ class AssistantV2 extends BaseService { } /** - * Deploy release. + * Get release import Status. * - * Update the environment with the content of the release. All snapshots saved as part of the release become active in - * the environment. + * Monitor the status of an assistant release import. You may poll this endpoint until the status of the import has + * either succeeded or failed. * * @param {Object} params - The parameters to send to the service. * @param {string} params.assistantId - The assistant ID or the environment ID of the environment where the assistant @@ -1354,28 +2121,22 @@ class AssistantV2 extends BaseService { * * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the * assistant ID in the user interface, open the assistant settings and click API Details. - * @param {string} params.release - Unique identifier of the release. - * @param {string} params.environmentId - The environment ID of the environment where the release is to be deployed. * @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated` * timestamps) in the response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} + * @returns {Promise>} */ - public deployRelease( - params: AssistantV2.DeployReleaseParams - ): Promise> { + public getReleaseImportStatus( + params: AssistantV2.GetReleaseImportStatusParams + ): Promise> { const _params = { ...params }; - const _requiredParams = ['assistantId', 'release', 'environmentId']; - const _validParams = ['assistantId', 'release', 'environmentId', 'includeAudit', 'headers']; + const _requiredParams = ['assistantId']; + const _validParams = ['assistantId', 'includeAudit', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); } - const body = { - 'environment_id': _params.environmentId, - }; - const query = { 'version': this.version, 'include_audit': _params.includeAudit, @@ -1383,16 +2144,14 @@ class AssistantV2 extends BaseService { const path = { 'assistant_id': _params.assistantId, - 'release': _params.release, }; - const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'deployRelease'); + const sdkHeaders = getSdkHeaders(AssistantV2.DEFAULT_SERVICE_NAME, 'v2', 'getReleaseImportStatus'); const parameters = { options: { - url: '/v2/assistants/{assistant_id}/releases/{release}/deploy', - method: 'POST', - body, + url: '/v2/assistants/{assistant_id}/import', + method: 'GET', qs: query, path, }, @@ -1402,7 +2161,6 @@ class AssistantV2 extends BaseService { sdkHeaders, { 'Accept': 'application/json', - 'Content-Type': 'application/json', }, _params.headers ), @@ -1833,6 +2591,56 @@ namespace AssistantV2 { * request interfaces ************************/ + /** Parameters for the `createProvider` operation. */ + export interface CreateProviderParams { + /** The unique identifier of the provider. */ + providerId: string; + /** The specification of the provider. */ + specification: ProviderSpecification; + /** Private information of the provider. */ + _private: ProviderPrivate; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `listProviders` operation. */ + export interface ListProvidersParams { + /** The number of records to return in each page of results. */ + pageLimit?: number; + /** Whether to include information about the number of records that satisfy the request, regardless of the page + * limit. If this parameter is `true`, the `pagination` object in the response includes the `total` property. + */ + includeCount?: boolean; + /** The attribute by which returned conversational skill providers will be sorted. To reverse the sort order, + * prefix the value with a minus sign (`-`). + */ + sort?: ListProvidersConstants.Sort | string; + /** A token identifying the page of results to retrieve. */ + cursor?: string; + /** Whether to include the audit properties (`created` and `updated` timestamps) in the response. */ + includeAudit?: boolean; + headers?: OutgoingHttpHeaders; + } + + /** Constants for the `listProviders` operation. */ + export namespace ListProvidersConstants { + /** The attribute by which returned conversational skill providers will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). */ + export enum Sort { + NAME = 'name', + UPDATED = 'updated', + } + } + + /** Parameters for the `updateProvider` operation. */ + export interface UpdateProviderParams { + /** Unique identifier of the conversational skill provider. */ + providerId: string; + /** The specification of the provider. */ + specification: ProviderSpecification; + /** Private information of the provider. */ + _private: ProviderPrivate; + headers?: OutgoingHttpHeaders; + } + /** Parameters for the `createAssistant` operation. */ export interface CreateAssistantParams { /** The language of the assistant. */ @@ -1947,6 +2755,11 @@ namespace AssistantV2 { * assistant ID in the user interface, open the assistant settings and click API Details. */ assistantId: string; + /** Unique identifier of the environment. To find the environment ID in the watsonx Assistant user interface, + * open the environment settings and click **API Details**. **Note:** Currently, the API does not support creating + * environments. + */ + environmentId: string; /** Unique identifier of the session. */ sessionId: string; /** An input object that includes the input text. */ @@ -1985,6 +2798,11 @@ namespace AssistantV2 { * assistant ID in the user interface, open the assistant settings and click API Details. */ assistantId: string; + /** Unique identifier of the environment. To find the environment ID in the watsonx Assistant user interface, + * open the environment settings and click **API Details**. **Note:** Currently, the API does not support creating + * environments. + */ + environmentId: string; /** An input object that includes the input text. */ input?: StatelessMessageInput; /** Context data for the conversation. You can use this property to set or modify context variables, which can @@ -2007,6 +2825,90 @@ namespace AssistantV2 { headers?: OutgoingHttpHeaders; } + /** Parameters for the `messageStream` operation. */ + export interface MessageStreamParams { + /** The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the + * type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + */ + assistantId: string; + /** Unique identifier of the environment. To find the environment ID in the watsonx Assistant user interface, + * open the environment settings and click **API Details**. **Note:** Currently, the API does not support creating + * environments. + */ + environmentId: string; + /** Unique identifier of the session. */ + sessionId: string; + /** An input object that includes the input text. */ + input?: MessageInput; + /** Context data for the conversation. You can use this property to set or modify context variables, which can + * also be accessed by dialog nodes. The context is stored by the assistant on a per-session basis. + * + * **Note:** The total size of the context data stored for a stateful session cannot exceed 100KB. + */ + context?: MessageContext; + /** A string value that identifies the user who is interacting with the assistant. The client must provide a + * unique identifier for each individual end user who accesses the application. For user-based plans, this user ID + * is used to identify unique users for billing purposes. This string cannot contain carriage return, newline, or + * tab characters. If no value is specified in the input, **user_id** is automatically set to the value of + * **context.global.session_id**. + * + * **Note:** This property is the same as the **user_id** property in the global system context. If **user_id** is + * specified in both locations, the value specified at the root is used. + */ + userId?: string; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `messageStreamStateless` operation. */ + export interface MessageStreamStatelessParams { + /** The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the + * type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + */ + assistantId: string; + /** Unique identifier of the environment. To find the environment ID in the watsonx Assistant user interface, + * open the environment settings and click **API Details**. **Note:** Currently, the API does not support creating + * environments. + */ + environmentId: string; + /** An input object that includes the input text. */ + input?: MessageInput; + /** Context data for the conversation. You can use this property to set or modify context variables, which can + * also be accessed by dialog nodes. The context is stored by the assistant on a per-session basis. + * + * **Note:** The total size of the context data stored for a stateful session cannot exceed 100KB. + */ + context?: MessageContext; + /** A string value that identifies the user who is interacting with the assistant. The client must provide a + * unique identifier for each individual end user who accesses the application. For user-based plans, this user ID + * is used to identify unique users for billing purposes. This string cannot contain carriage return, newline, or + * tab characters. If no value is specified in the input, **user_id** is automatically set to the value of + * **context.global.session_id**. + * + * **Note:** This property is the same as the **user_id** property in the global system context. If **user_id** is + * specified in both locations, the value specified at the root is used. + */ + userId?: string; + headers?: OutgoingHttpHeaders; + } + /** Parameters for the `bulkClassify` operation. */ export interface BulkClassifyParams { /** Unique identifier of the skill. To find the skill ID in the watsonx Assistant user interface, open the skill @@ -2149,7 +3051,7 @@ namespace AssistantV2 { /** The description of the environment. */ description?: string; /** The search skill orchestration settings for the environment. */ - orchestration?: BaseEnvironmentOrchestration; + orchestration?: UpdateEnvironmentOrchestration; /** The session inactivity timeout setting for the environment (in seconds). */ sessionTimeout?: number; /** An array of objects identifying the skills (such as action and dialog) that exist in the environment. */ @@ -2284,6 +3186,114 @@ namespace AssistantV2 { headers?: OutgoingHttpHeaders; } + /** Parameters for the `createReleaseExport` operation. */ + export interface CreateReleaseExportParams { + /** The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the + * type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + */ + assistantId: string; + /** Unique identifier of the release. */ + release: string; + /** Whether to include the audit properties (`created` and `updated` timestamps) in the response. */ + includeAudit?: boolean; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `downloadReleaseExport` operation. */ + export interface DownloadReleaseExportParams { + /** The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the + * type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + */ + assistantId: string; + /** Unique identifier of the release. */ + release: string; + /** Whether to include the audit properties (`created` and `updated` timestamps) in the response. */ + includeAudit?: boolean; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `downloadReleaseExportAsStream` operation. */ + export interface DownloadReleaseExportAsStreamParams { + /** The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the + * type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + */ + assistantId: string; + /** Unique identifier of the release. */ + release: string; + /** Whether to include the audit properties (`created` and `updated` timestamps) in the response. */ + includeAudit?: boolean; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `createReleaseImport` operation. */ + export interface CreateReleaseImportParams { + /** The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the + * type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + */ + assistantId: string; + /** Request body is an Octet-stream of the artifact Zip file that is being imported. */ + body: NodeJS.ReadableStream | Buffer; + /** Whether to include the audit properties (`created` and `updated` timestamps) in the response. */ + includeAudit?: boolean; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `getReleaseImportStatus` operation. */ + export interface GetReleaseImportStatusParams { + /** The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the + * type of request: + * - For message, session, and log requests, specify the environment ID of the environment where the assistant is + * deployed. + * - For all other requests, specify the assistant ID of the assistant. + * + * To find the environment ID or assistant ID in the watsonx Assistant user interface, open the assistant settings + * and scroll to the **Environments** section. + * + * **Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the + * assistant ID in the user interface, open the assistant settings and click API Details. + */ + assistantId: string; + /** Whether to include the audit properties (`created` and `updated` timestamps) in the response. */ + includeAudit?: boolean; + headers?: OutgoingHttpHeaders; + } + /** Parameters for the `getSkill` operation. */ export interface GetSkillParams { /** The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the @@ -2410,13 +3420,17 @@ namespace AssistantV2 { * model interfaces ************************/ - /** AgentAvailabilityMessage. */ + /** + * AgentAvailabilityMessage. + */ export interface AgentAvailabilityMessage { /** The text of the message. */ message?: string; } - /** AssistantCollection. */ + /** + * AssistantCollection. + */ export interface AssistantCollection { /** An array of objects describing the assistants associated with the instance. */ assistants: AssistantData[]; @@ -2426,7 +3440,9 @@ namespace AssistantV2 { pagination: Pagination; } - /** AssistantData. */ + /** + * AssistantData. + */ export interface AssistantData { /** The unique identifier of the assistant. */ assistant_id?: string; @@ -2442,7 +3458,9 @@ namespace AssistantV2 { assistant_environments?: EnvironmentReference[]; } - /** AssistantSkill. */ + /** + * AssistantSkill. + */ export interface AssistantSkill { /** The skill ID of the skill. */ skill_id: string; @@ -2460,7 +3478,9 @@ namespace AssistantV2 { } } - /** Status information about the skills for the assistant. Included in responses only if **status**=`Available`. */ + /** + * Status information about the skills for the assistant. Included in responses only if **status**=`Available`. + */ export interface AssistantState { /** Whether the action skill is disabled in the draft environment. */ action_disabled: boolean; @@ -2468,7 +3488,9 @@ namespace AssistantV2 { dialog_disabled: boolean; } - /** The search skill orchestration settings for the environment. */ + /** + * The search skill orchestration settings for the environment. + */ export interface BaseEnvironmentOrchestration { /** Whether to fall back to a search skill when responding to messages that do not match any intent or action * defined in dialog or action skills. (If no search skill is configured for the environment, this property is @@ -2477,13 +3499,17 @@ namespace AssistantV2 { search_skill_fallback?: boolean; } - /** An object describing the release that is currently deployed in the environment. */ + /** + * An object describing the release that is currently deployed in the environment. + */ export interface BaseEnvironmentReleaseReference { /** The name of the deployed release. */ release?: string; } - /** BulkClassifyOutput. */ + /** + * BulkClassifyOutput. + */ export interface BulkClassifyOutput { /** The user input utterance to classify. */ input?: BulkClassifyUtterance; @@ -2493,19 +3519,25 @@ namespace AssistantV2 { intents?: RuntimeIntent[]; } - /** BulkClassifyResponse. */ + /** + * BulkClassifyResponse. + */ export interface BulkClassifyResponse { /** An array of objects that contain classification information for the submitted input utterances. */ output?: BulkClassifyOutput[]; } - /** The user input utterance to classify. */ + /** + * The user input utterance to classify. + */ export interface BulkClassifyUtterance { /** The text of the input utterance. */ text: string; } - /** CaptureGroup. */ + /** + * CaptureGroup. + */ export interface CaptureGroup { /** A recognized capture group for the entity. */ group: string; @@ -2513,7 +3545,9 @@ namespace AssistantV2 { location?: number[]; } - /** Information used by an integration to transfer the conversation to a different channel. */ + /** + * Information used by an integration to transfer the conversation to a different channel. + */ export interface ChannelTransferInfo { /** An object specifying target channels available for the transfer. Each property of this object represents an * available transfer target. Currently, the only supported property is **chat**, representing the web chat @@ -2522,19 +3556,103 @@ namespace AssistantV2 { target: ChannelTransferTarget; } - /** An object specifying target channels available for the transfer. Each property of this object represents an available transfer target. Currently, the only supported property is **chat**, representing the web chat integration. */ + /** + * An object specifying target channels available for the transfer. Each property of this object represents an + * available transfer target. Currently, the only supported property is **chat**, representing the web chat + * integration. + */ export interface ChannelTransferTarget { /** Information for transferring to the web chat integration. */ chat?: ChannelTransferTargetChat; } - - /** Information for transferring to the web chat integration. */ - export interface ChannelTransferTargetChat { - /** The URL of the target web chat. */ - url?: string; + + /** + * Information for transferring to the web chat integration. + */ + export interface ChannelTransferTargetChat { + /** The URL of the target web chat. */ + url?: string; + } + + /** + * CreateAssistantReleaseImportResponse. + */ + export interface CreateAssistantReleaseImportResponse { + /** The current status of the artifact import process: + * - **Failed**: The asynchronous artifact import process has failed. + * - **Processing**: An asynchronous operation to import artifact is underway and not yet completed. + */ + status?: CreateAssistantReleaseImportResponse.Constants.Status | string; + /** A unique identifier for a background asynchronous task that is executing or has executed the operation. */ + task_id?: string; + /** The ID of the assistant to which the release belongs. */ + assistant_id?: string; + /** An array of skill types in the draft environment which will be overridden with skills from the artifact + * being imported. + */ + skill_impact_in_draft?: CreateAssistantReleaseImportResponse.Constants.SkillImpactInDraft[] | string[]; + /** The timestamp for creation of the object. */ + created?: string; + /** The timestamp for the most recent update to the object. */ + updated?: string; + } + export namespace CreateAssistantReleaseImportResponse { + export namespace Constants { + /** The current status of the artifact import process: - **Failed**: The asynchronous artifact import process has failed. - **Processing**: An asynchronous operation to import artifact is underway and not yet completed. */ + export enum Status { + FAILED = 'Failed', + PROCESSING = 'Processing', + } + /** An array of skill types in the draft environment which will be overridden with skills from the artifact being imported. */ + export enum SkillImpactInDraft { + ACTION = 'action', + DIALOG = 'dialog', + } + } + } + + /** + * CreateReleaseExportWithStatusErrors. + */ + export interface CreateReleaseExportWithStatusErrors { + /** The current status of the release export creation process: + * - **Available**: The release export package is available for download. + * - **Failed**: The asynchronous release export package creation process has failed. + * - **Processing**: An asynchronous operation to create the release export package is underway and not yet + * completed. + */ + status?: CreateReleaseExportWithStatusErrors.Constants.Status | string; + /** A unique identifier for a background asynchronous task that is executing or has executed the operation. */ + task_id?: string; + /** The ID of the assistant to which the release belongs. */ + assistant_id?: string; + /** The name of the release. The name is the version number (an integer), returned as a string. */ + release?: string; + /** The timestamp for creation of the object. */ + created?: string; + /** The timestamp for the most recent update to the object. */ + updated?: string; + /** An array of messages about errors that caused an asynchronous operation to fail. Included only if + * **status**=`Failed`. + */ + status_errors?: StatusError[]; + /** The description of the failed asynchronous operation. Included only if **status**=`Failed`. */ + status_description?: string; + } + export namespace CreateReleaseExportWithStatusErrors { + export namespace Constants { + /** The current status of the release export creation process: - **Available**: The release export package is available for download. - **Failed**: The asynchronous release export package creation process has failed. - **Processing**: An asynchronous operation to create the release export package is underway and not yet completed. */ + export enum Status { + AVAILABLE = 'Available', + FAILED = 'Failed', + PROCESSING = 'Processing', + } + } } - /** Dialog log message details. */ + /** + * Dialog log message details. + */ export interface DialogLogMessage { /** The severity of the log message. */ level: DialogLogMessage.Constants.Level | string; @@ -2556,7 +3674,9 @@ namespace AssistantV2 { } } - /** DialogNodeAction. */ + /** + * DialogNodeAction. + */ export interface DialogNodeAction { /** The name of the action. */ name: string; @@ -2581,12 +3701,16 @@ namespace AssistantV2 { } } - /** Routing or other contextual information to be used by target service desk systems. */ + /** + * Routing or other contextual information to be used by target service desk systems. + */ export interface DialogNodeOutputConnectToAgentTransferInfo { target?: JsonObject; } - /** DialogNodeOutputOptionsElement. */ + /** + * DialogNodeOutputOptionsElement. + */ export interface DialogNodeOutputOptionsElement { /** The user-facing label for the option. */ label: string; @@ -2596,13 +3720,18 @@ namespace AssistantV2 { value: DialogNodeOutputOptionsElementValue; } - /** An object defining the message input to be sent to the assistant if the user selects the corresponding option. */ + /** + * An object defining the message input to be sent to the assistant if the user selects the corresponding option. + */ export interface DialogNodeOutputOptionsElementValue { /** An input object that includes the input text. */ input?: MessageInput; } - /** An objects containing detailed diagnostic information about a dialog node that was visited during processing of the input message. */ + /** + * An objects containing detailed diagnostic information about a dialog node that was visited during processing of the + * input message. + */ export interface DialogNodeVisited { /** A dialog node that was visited during processing of the input message. */ dialog_node?: string; @@ -2612,7 +3741,9 @@ namespace AssistantV2 { conditions?: string; } - /** DialogSuggestion. */ + /** + * DialogSuggestion. + */ export interface DialogSuggestion { /** The user-facing label for the suggestion. This label is taken from the **title** or **user_label** property * of the corresponding dialog node, depending on the disambiguation options. @@ -2631,13 +3762,21 @@ namespace AssistantV2 { output?: JsonObject; } - /** An object defining the message input to be sent to the assistant if the user selects the corresponding disambiguation option. **Note:** This entire message input object must be included in the request body of the next message sent to the assistant. Do not modify or remove any of the included properties. */ + /** + * An object defining the message input to be sent to the assistant if the user selects the corresponding + * disambiguation option. + * + * **Note:** This entire message input object must be included in the request body of the next message sent to the + * assistant. Do not modify or remove any of the included properties. + */ export interface DialogSuggestionValue { /** An input object that includes the input text. */ input?: MessageInput; } - /** Environment. */ + /** + * Environment. + */ export interface Environment { /** The name of the environment. */ name?: string; @@ -2667,7 +3806,9 @@ namespace AssistantV2 { updated?: string; } - /** EnvironmentCollection. */ + /** + * EnvironmentCollection. + */ export interface EnvironmentCollection { /** An array of objects describing the environments associated with an assistant. */ environments: Environment[]; @@ -2677,7 +3818,9 @@ namespace AssistantV2 { pagination: Pagination; } - /** EnvironmentReference. */ + /** + * EnvironmentReference. + */ export interface EnvironmentReference { /** The name of the environment. */ name?: string; @@ -2699,7 +3842,9 @@ namespace AssistantV2 { } } - /** EnvironmentSkill. */ + /** + * EnvironmentSkill. + */ export interface EnvironmentSkill { /** The skill ID of the skill. */ skill_id: string; @@ -2727,7 +3872,9 @@ namespace AssistantV2 { } } - /** IntegrationReference. */ + /** + * IntegrationReference. + */ export interface IntegrationReference { /** The integration ID of the integration. */ integration_id?: string; @@ -2735,7 +3882,9 @@ namespace AssistantV2 { type?: string; } - /** Log. */ + /** + * Log. + */ export interface Log { /** A unique identifier for the logged event. */ log_id: string; @@ -2761,7 +3910,9 @@ namespace AssistantV2 { customer_id?: string; } - /** LogCollection. */ + /** + * LogCollection. + */ export interface LogCollection { /** An array of objects describing log events. */ logs: Log[]; @@ -2771,11 +3922,16 @@ namespace AssistantV2 { pagination: LogPagination; } - /** An object that identifies the dialog element that generated the error message. */ + /** + * An object that identifies the dialog element that generated the error message. + */ export interface LogMessageSource { } - /** The pagination data for the returned objects. For more information about using pagination, see [Pagination](#pagination). */ + /** + * The pagination data for the returned objects. For more information about using pagination, see + * [Pagination](#pagination). + */ export interface LogPagination { /** The URL that will return the next page of results, if any. */ next_url?: string; @@ -2785,7 +3941,9 @@ namespace AssistantV2 { next_cursor?: string; } - /** A message request formatted for the watsonx Assistant service. */ + /** + * A message request formatted for the watsonx Assistant service. + */ export interface LogRequest { /** An input object that includes the input text. All private data is masked or removed. */ input?: LogRequestInput; @@ -2807,7 +3965,9 @@ namespace AssistantV2 { user_id?: string; } - /** An input object that includes the input text. All private data is masked or removed. */ + /** + * An input object that includes the input text. All private data is masked or removed. + */ export interface LogRequestInput { /** The type of the message: * @@ -2852,7 +4012,9 @@ namespace AssistantV2 { } } - /** A response from the watsonx Assistant service. */ + /** + * A response from the watsonx Assistant service. + */ export interface LogResponse { /** Assistant output to be rendered or processed by the client. All private data is masked or removed. */ output: LogResponseOutput; @@ -2874,7 +4036,9 @@ namespace AssistantV2 { user_id: string; } - /** Assistant output to be rendered or processed by the client. All private data is masked or removed. */ + /** + * Assistant output to be rendered or processed by the client. All private data is masked or removed. + */ export interface LogResponseOutput { /** Output intended for any channel. It is the responsibility of the client application to implement the * supported response types. @@ -2896,7 +4060,9 @@ namespace AssistantV2 { spelling?: MessageOutputSpelling; } - /** MessageContext. */ + /** + * MessageContext. + */ export interface MessageContext { /** Session context data that is shared by all skills used by the assistant. */ global?: MessageContextGlobal; @@ -2908,7 +4074,9 @@ namespace AssistantV2 { integrations?: JsonObject; } - /** Context variables that are used by the action skill. Private variables are persisted, but not shown. */ + /** + * Context variables that are used by the action skill. Private variables are persisted, but not shown. + */ export interface MessageContextActionSkill { /** An object containing any arbitrary variables that can be read and written by a particular skill. */ user_defined?: JsonObject; @@ -2924,7 +4092,9 @@ namespace AssistantV2 { skill_variables?: JsonObject; } - /** Context variables that are used by the dialog skill. */ + /** + * Context variables that are used by the dialog skill. + */ export interface MessageContextDialogSkill { /** An object containing any arbitrary variables that can be read and written by a particular skill. */ user_defined?: JsonObject; @@ -2932,7 +4102,9 @@ namespace AssistantV2 { system?: MessageContextSkillSystem; } - /** Session context data that is shared by all skills used by the assistant. */ + /** + * Session context data that is shared by all skills used by the assistant. + */ export interface MessageContextGlobal { /** Built-in system properties that apply to all skills used by the assistant. */ system?: MessageContextGlobalSystem; @@ -2940,7 +4112,9 @@ namespace AssistantV2 { session_id?: string; } - /** Built-in system properties that apply to all skills used by the assistant. */ + /** + * Built-in system properties that apply to all skills used by the assistant. + */ export interface MessageContextGlobalSystem { /** The user time zone. The assistant uses the time zone to correctly resolve relative time references. */ timezone?: string; @@ -3018,7 +4192,11 @@ namespace AssistantV2 { } } - /** System context data used by the skill. */ + /** + * System context data used by the skill. + * + * This type supports additional properties of type any. For internal use only. + */ export interface MessageContextSkillSystem { /** An encoded string that represents the current conversation state. By saving this value and then sending it * in the context of a subsequent message request, you can return to an earlier point in the conversation. If you @@ -3026,11 +4204,16 @@ namespace AssistantV2 { * session is expired. */ state?: string; - /** MessageContextSkillSystem accepts additional properties. */ + + /** + * MessageContextSkillSystem accepts additional properties of type any. For internal use only. + */ [propName: string]: any; } - /** Context data specific to particular skills used by the assistant. */ + /** + * Context data specific to particular skills used by the assistant. + */ export interface MessageContextSkills { /** Context variables that are used by the dialog skill. */ 'main skill'?: MessageContextDialogSkill; @@ -3038,7 +4221,9 @@ namespace AssistantV2 { 'actions skill'?: MessageContextActionSkill; } - /** An input object that includes the input text. */ + /** + * An input object that includes the input text. + */ export interface MessageInput { /** The type of the message: * @@ -3083,7 +4268,9 @@ namespace AssistantV2 { } } - /** A reference to a media file to be sent as an attachment with the message. */ + /** + * A reference to a media file to be sent as an attachment with the message. + */ export interface MessageInputAttachment { /** The URL of the media file. */ url: string; @@ -3091,7 +4278,9 @@ namespace AssistantV2 { media_type?: string; } - /** Optional properties that control how the assistant responds. */ + /** + * Optional properties that control how the assistant responds. + */ export interface MessageInputOptions { /** Whether to restart dialog processing at the root of the dialog, regardless of any previously visited nodes. * **Note:** This does not affect `turn_count` or any other context variables. @@ -3128,7 +4317,10 @@ namespace AssistantV2 { export?: boolean; } - /** Spelling correction options for the message. Any options specified on an individual message override the settings configured for the skill. */ + /** + * Spelling correction options for the message. Any options specified on an individual message override the settings + * configured for the skill. + */ export interface MessageInputOptionsSpelling { /** Whether to use spelling correction when processing the input. If spelling correction is used and * **auto_correct** is `true`, any spelling corrections are automatically applied to the user input. If @@ -3146,7 +4338,9 @@ namespace AssistantV2 { auto_correct?: boolean; } - /** Assistant output to be rendered or processed by the client. */ + /** + * Assistant output to be rendered or processed by the client. + */ export interface MessageOutput { /** Output intended for any channel. It is the responsibility of the client application to implement the * supported response types. @@ -3168,7 +4362,9 @@ namespace AssistantV2 { spelling?: MessageOutputSpelling; } - /** Additional detailed information about a message response and how it was generated. */ + /** + * Additional detailed information about a message response and how it was generated. + */ export interface MessageOutputDebug { /** An array of objects containing detailed diagnostic information about dialog nodes that were visited during * processing of the input message. @@ -3199,11 +4395,15 @@ namespace AssistantV2 { } } - /** MessageOutputDebugTurnEvent. */ + /** + * MessageOutputDebugTurnEvent. + */ export interface MessageOutputDebugTurnEvent { } - /** Properties describing any spelling corrections in the user input that was received. */ + /** + * Properties describing any spelling corrections in the user input that was received. + */ export interface MessageOutputSpelling { /** The user input text that was used to generate the response. If spelling autocorrection is enabled, this text * reflects any spelling corrections that were applied. @@ -3219,7 +4419,63 @@ namespace AssistantV2 { suggested_text?: string; } - /** The pagination data for the returned objects. For more information about using pagination, see [Pagination](#pagination). */ + /** + * Contains meta-information about the item(s) being streamed. + */ + export interface Metadata { + /** Identifies the index and sequence of the current streamed response item. */ + id?: number; + } + + /** + * MonitorAssistantReleaseImportArtifactResponse. + */ + export interface MonitorAssistantReleaseImportArtifactResponse { + /** The current status of the release import process: + * - **Completed**: The artifact import has completed. + * - **Failed**: The asynchronous artifact import process has failed. + * - **Processing**: An asynchronous operation to import the artifact is underway and not yet completed. + */ + status?: MonitorAssistantReleaseImportArtifactResponse.Constants.Status | string; + /** A unique identifier for a background asynchronous task that is executing or has executed the operation. */ + task_id?: string; + /** The ID of the assistant to which the release belongs. */ + assistant_id?: string; + /** An array of messages about errors that caused an asynchronous operation to fail. Included only if + * **status**=`Failed`. + */ + status_errors?: StatusError[]; + /** The description of the failed asynchronous operation. Included only if **status**=`Failed`. */ + status_description?: string; + /** An array of skill types in the draft environment which will be overridden with skills from the artifact + * being imported. + */ + skill_impact_in_draft?: MonitorAssistantReleaseImportArtifactResponse.Constants.SkillImpactInDraft[] | string[]; + /** The timestamp for creation of the object. */ + created?: string; + /** The timestamp for the most recent update to the object. */ + updated?: string; + } + export namespace MonitorAssistantReleaseImportArtifactResponse { + export namespace Constants { + /** The current status of the release import process: - **Completed**: The artifact import has completed. - **Failed**: The asynchronous artifact import process has failed. - **Processing**: An asynchronous operation to import the artifact is underway and not yet completed. */ + export enum Status { + COMPLETED = 'Completed', + FAILED = 'Failed', + PROCESSING = 'Processing', + } + /** An array of skill types in the draft environment which will be overridden with skills from the artifact being imported. */ + export enum SkillImpactInDraft { + ACTION = 'action', + DIALOG = 'dialog', + } + } + } + + /** + * The pagination data for the returned objects. For more information about using pagination, see + * [Pagination](#pagination). + */ export interface Pagination { /** The URL that will return the same page of results. */ refresh_url: string; @@ -3237,7 +4493,260 @@ namespace AssistantV2 { next_cursor?: string; } - /** Release. */ + /** + * Non-private settings for oauth2 authentication. + */ + export interface ProviderAuthenticationOAuth2 { + /** The preferred "flow" or "grant type" for the API client to fetch an access token from the authorization + * server. + */ + preferred_flow?: ProviderAuthenticationOAuth2.Constants.PreferredFlow | string; + /** Scenarios performed by the API client to fetch an access token from the authorization server. */ + flows?: ProviderAuthenticationOAuth2Flows; + } + export namespace ProviderAuthenticationOAuth2 { + export namespace Constants { + /** The preferred "flow" or "grant type" for the API client to fetch an access token from the authorization server. */ + export enum PreferredFlow { + PASSWORD = 'password', + CLIENT_CREDENTIALS = 'client_credentials', + AUTHORIZATION_CODE = 'authorization_code', + CUSTOM_FLOW_NAME = '<$custom_flow_name>', + } + } + } + + /** + * Scenarios performed by the API client to fetch an access token from the authorization server. + */ + export interface ProviderAuthenticationOAuth2Flows { + } + + /** + * The username for oauth2 authentication when the preferred flow is "password". + */ + export interface ProviderAuthenticationOAuth2PasswordUsername { + /** The type of property observed in "value". */ + type?: ProviderAuthenticationOAuth2PasswordUsername.Constants.Type | string; + /** The stored information of the value. */ + value?: string; + } + export namespace ProviderAuthenticationOAuth2PasswordUsername { + export namespace Constants { + /** The type of property observed in "value". */ + export enum Type { + VALUE = 'value', + } + } + } + + /** + * ProviderAuthenticationTypeAndValue. + */ + export interface ProviderAuthenticationTypeAndValue { + /** The type of property observed in "value". */ + type?: ProviderAuthenticationTypeAndValue.Constants.Type | string; + /** The stored information of the value. */ + value?: string; + } + export namespace ProviderAuthenticationTypeAndValue { + export namespace Constants { + /** The type of property observed in "value". */ + export enum Type { + VALUE = 'value', + } + } + } + + /** + * ProviderCollection. + */ + export interface ProviderCollection { + /** An array of objects describing the conversational skill providers associated with the instance. */ + conversational_skill_providers: ProviderResponse[]; + /** The pagination data for the returned objects. For more information about using pagination, see + * [Pagination](#pagination). + */ + pagination: Pagination; + } + + /** + * Private information of the provider. + */ + export interface ProviderPrivate { + /** Private authentication information of the provider. */ + authentication: ProviderPrivateAuthentication; + } + + /** + * Private authentication information of the provider. + */ + export interface ProviderPrivateAuthentication { + } + + /** + * Scenarios performed by the API client to fetch an access token from the authorization server. + */ + export interface ProviderPrivateAuthenticationOAuth2FlowFlows { + } + + /** + * The password for oauth2 authentication when the preferred flow is "password". + */ + export interface ProviderPrivateAuthenticationOAuth2PasswordPassword { + /** The type of property observed in "value". */ + type?: ProviderPrivateAuthenticationOAuth2PasswordPassword.Constants.Type | string; + /** The stored information of the value. */ + value?: string; + } + export namespace ProviderPrivateAuthenticationOAuth2PasswordPassword { + export namespace Constants { + /** The type of property observed in "value". */ + export enum Type { + VALUE = 'value', + } + } + } + + /** + * ProviderResponse. + */ + export interface ProviderResponse { + /** The unique identifier of the provider. */ + provider_id?: string; + /** The specification of the provider. */ + specification?: ProviderResponseSpecification; + } + + /** + * The specification of the provider. + */ + export interface ProviderResponseSpecification { + /** An array of objects defining all endpoints of the provider. + * + * **Note:** Multiple array items are reserved for future use. + */ + servers?: ProviderResponseSpecificationServersItem[]; + /** An object defining various reusable definitions of the provider. */ + components?: ProviderResponseSpecificationComponents; + } + + /** + * An object defining various reusable definitions of the provider. + */ + export interface ProviderResponseSpecificationComponents { + /** The definition of the security scheme for the provider. */ + securitySchemes?: ProviderResponseSpecificationComponentsSecuritySchemes; + } + + /** + * The definition of the security scheme for the provider. + */ + export interface ProviderResponseSpecificationComponentsSecuritySchemes { + /** The authentication method required for requests made from watsonx Assistant to the conversational skill + * provider. + */ + authentication_method?: ProviderResponseSpecificationComponentsSecuritySchemes.Constants.AuthenticationMethod | string; + /** Non-private settings for basic access authentication. */ + basic?: ProviderResponseSpecificationComponentsSecuritySchemesBasic; + /** Non-private settings for oauth2 authentication. */ + oauth2?: ProviderAuthenticationOAuth2; + } + export namespace ProviderResponseSpecificationComponentsSecuritySchemes { + export namespace Constants { + /** The authentication method required for requests made from watsonx Assistant to the conversational skill provider. */ + export enum AuthenticationMethod { + BASIC = 'basic', + BEARER = 'bearer', + API_KEY = 'api_key', + OAUTH2 = 'oauth2', + NONE = 'none', + } + } + } + + /** + * Non-private settings for basic access authentication. + */ + export interface ProviderResponseSpecificationComponentsSecuritySchemesBasic { + /** The username for basic access authentication. */ + username?: ProviderAuthenticationTypeAndValue; + } + + /** + * ProviderResponseSpecificationServersItem. + */ + export interface ProviderResponseSpecificationServersItem { + /** The URL of the conversational skill provider. */ + url?: string; + } + + /** + * The specification of the provider. + */ + export interface ProviderSpecification { + /** An array of objects defining all endpoints of the provider. + * + * **Note:** Multiple array items are reserved for future use. + */ + servers: ProviderSpecificationServersItem[]; + /** An object defining various reusable definitions of the provider. */ + components?: ProviderSpecificationComponents; + } + + /** + * An object defining various reusable definitions of the provider. + */ + export interface ProviderSpecificationComponents { + /** The definition of the security scheme for the provider. */ + securitySchemes?: ProviderSpecificationComponentsSecuritySchemes; + } + + /** + * The definition of the security scheme for the provider. + */ + export interface ProviderSpecificationComponentsSecuritySchemes { + /** The authentication method required for requests made from watsonx Assistant to the conversational skill + * provider. + */ + authentication_method?: ProviderSpecificationComponentsSecuritySchemes.Constants.AuthenticationMethod | string; + /** Non-private settings for basic access authentication. */ + basic?: ProviderSpecificationComponentsSecuritySchemesBasic; + /** Non-private settings for oauth2 authentication. */ + oauth2?: ProviderAuthenticationOAuth2; + } + export namespace ProviderSpecificationComponentsSecuritySchemes { + export namespace Constants { + /** The authentication method required for requests made from watsonx Assistant to the conversational skill provider. */ + export enum AuthenticationMethod { + BASIC = 'basic', + BEARER = 'bearer', + API_KEY = 'api_key', + OAUTH2 = 'oauth2', + NONE = 'none', + } + } + } + + /** + * Non-private settings for basic access authentication. + */ + export interface ProviderSpecificationComponentsSecuritySchemesBasic { + /** The username for basic access authentication. */ + username?: ProviderAuthenticationTypeAndValue; + } + + /** + * ProviderSpecificationServersItem. + */ + export interface ProviderSpecificationServersItem { + /** The URL of the conversational skill provider. */ + url?: string; + } + + /** + * Release. + */ export interface Release { /** The name of the release. The name is the version number (an integer), returned as a string. */ release?: string; @@ -3271,7 +4780,9 @@ namespace AssistantV2 { } } - /** ReleaseCollection. */ + /** + * ReleaseCollection. + */ export interface ReleaseCollection { /** An array of objects describing the releases associated with an assistant. */ releases: Release[]; @@ -3281,13 +4792,17 @@ namespace AssistantV2 { pagination: Pagination; } - /** An object identifying the versionable content objects (such as skill snapshots) that are included in the release. */ + /** + * An object identifying the versionable content objects (such as skill snapshots) that are included in the release. + */ export interface ReleaseContent { /** The skill snapshots that are included in the release. */ skills?: ReleaseSkill[]; } - /** ReleaseSkill. */ + /** + * ReleaseSkill. + */ export interface ReleaseSkill { /** The skill ID of the skill. */ skill_id: string; @@ -3307,7 +4822,10 @@ namespace AssistantV2 { } } - /** An optional object containing analytics data. Currently, this data is used only for events sent to the Segment extension. */ + /** + * An optional object containing analytics data. Currently, this data is used only for events sent to the Segment + * extension. + */ export interface RequestAnalytics { /** The browser that was used to send the message that triggered the event. */ browser?: string; @@ -3317,13 +4835,17 @@ namespace AssistantV2 { pageUrl?: string; } - /** ResponseGenericChannel. */ + /** + * ResponseGenericChannel. + */ export interface ResponseGenericChannel { /** A channel for which the response is intended. */ channel?: string; } - /** The entity value that was recognized in the user input. */ + /** + * The entity value that was recognized in the user input. + */ export interface RuntimeEntity { /** An entity detected in the input. */ entity: string; @@ -3364,7 +4886,9 @@ namespace AssistantV2 { skill?: string; } - /** An alternative value for the recognized entity. */ + /** + * An alternative value for the recognized entity. + */ export interface RuntimeEntityAlternative { /** The entity value that was recognized in the user input. */ value?: string; @@ -3372,7 +4896,9 @@ namespace AssistantV2 { confidence?: number; } - /** RuntimeEntityInterpretation. */ + /** + * RuntimeEntityInterpretation. + */ export interface RuntimeEntityInterpretation { /** The calendar used to represent a recognized date (for example, `Gregorian`). */ calendar_type?: string; @@ -3478,7 +5004,10 @@ namespace AssistantV2 { } } - /** An object describing the role played by a system entity that is specifies the beginning or end of a range recognized in the user input. This property is included only if the new system entities are enabled for the skill. */ + /** + * An object describing the role played by a system entity that is specifies the beginning or end of a range + * recognized in the user input. This property is included only if the new system entities are enabled for the skill. + */ export interface RuntimeEntityRole { /** The relationship of the entity to the range. */ type?: RuntimeEntityRole.Constants.Type | string; @@ -3497,7 +5026,9 @@ namespace AssistantV2 { } } - /** An intent identified in the user input. */ + /** + * An intent identified in the user input. + */ export interface RuntimeIntent { /** The name of the recognized intent. */ intent: string; @@ -3513,11 +5044,15 @@ namespace AssistantV2 { skill?: string; } - /** RuntimeResponseGeneric. */ + /** + * RuntimeResponseGeneric. + */ export interface RuntimeResponseGeneric { } - /** SearchResult. */ + /** + * SearchResult. + */ export interface SearchResult { /** The unique identifier of the document in the Discovery service collection. * @@ -3551,7 +5086,9 @@ namespace AssistantV2 { answers?: SearchResultAnswer[]; } - /** An object specifing a segment of text that was identified as a direct answer to the search query. */ + /** + * An object specifing a segment of text that was identified as a direct answer to the search query. + */ export interface SearchResultAnswer { /** The text of the answer. */ text: string; @@ -3559,7 +5096,14 @@ namespace AssistantV2 { confidence: number; } - /** An object containing segments of text from search results with query-matching text highlighted using HTML `` tags. */ + /** + * An object containing segments of text from search results with query-matching text highlighted using HTML `` + * tags. + * + * This type supports additional properties of type string[]. An array of strings containing segments taken from a + * field in the search results that is not mapped to the `body`, `title`, or `url` property, with query-matching + * substrings highlighted. The property name is the name of the field in the Discovery collection. + */ export interface SearchResultHighlight { /** An array of strings containing segments taken from body text in the search results, with query-matching * substrings highlighted. @@ -3573,11 +5117,18 @@ namespace AssistantV2 { * substrings highlighted. */ url?: string[]; - /** SearchResultHighlight accepts additional properties. */ + + /** + * SearchResultHighlight accepts additional properties of type string[]. An array of strings containing segments + * taken from a field in the search results that is not mapped to the `body`, `title`, or `url` property, with + * query-matching substrings highlighted. The property name is the name of the field in the Discovery collection. + */ [propName: string]: any; } - /** An object containing search result metadata from the Discovery service. */ + /** + * An object containing search result metadata from the Discovery service. + */ export interface SearchResultMetadata { /** The confidence score for the given result, as returned by the Discovery service. */ confidence?: number; @@ -3587,7 +5138,12 @@ namespace AssistantV2 { score?: number; } - /** An object describing the search skill configuration. **Note:** Search settings are not supported in **Import skills** requests, and are not included in **Export skills** responses. */ + /** + * An object describing the search skill configuration. + * + * **Note:** Search settings are not supported in **Import skills** requests, and are not included in **Export + * skills** responses. + */ export interface SearchSettings { /** Configuration settings for the Watson Discovery service instance used by the search integration. */ discovery: SearchSettingsDiscovery; @@ -3595,9 +5151,85 @@ namespace AssistantV2 { messages: SearchSettingsMessages; /** The mapping between fields in the Watson Discovery collection and properties in the search response. */ schema_mapping: SearchSettingsSchemaMapping; + /** Configuration settings for the Elasticsearch service used by the search integration. You can provide either + * basic auth or apiKey auth. + */ + elastic_search?: SearchSettingsElasticSearch; + /** Configuration settings for conversational search. */ + conversational_search?: SearchSettingsConversationalSearch; + /** Configuration settings for the server-side search service used by the search integration. You can provide + * either basic auth, apiKey auth or none. + */ + server_side_search?: SearchSettingsServerSideSearch; + /** Configuration settings for the client-side search service or server-side search service used by the search + * integration. + */ + client_side_search?: SearchSettingsClientSideSearch; + } + + /** + * Configuration settings for the client-side search service or server-side search service used by the search + * integration. + */ + export interface SearchSettingsClientSideSearch { + /** The filter string that is applied to the search results. */ + filter?: string; + /** The metadata object. */ + metadata?: JsonObject; + } + + /** + * Configuration settings for conversational search. + */ + export interface SearchSettingsConversationalSearch { + /** Whether to enable conversational search. */ + enabled: boolean; + response_length?: SearchSettingsConversationalSearchResponseLength; + search_confidence?: SearchSettingsConversationalSearchSearchConfidence; + } + + /** + * SearchSettingsConversationalSearchResponseLength. + */ + export interface SearchSettingsConversationalSearchResponseLength { + /** The response length option. It controls the length of the generated response. */ + option?: SearchSettingsConversationalSearchResponseLength.Constants.Option | string; + } + export namespace SearchSettingsConversationalSearchResponseLength { + export namespace Constants { + /** The response length option. It controls the length of the generated response. */ + export enum Option { + CONCISE = 'concise', + MODERATE = 'moderate', + VERBOSE = 'verbose', + } + } } - /** Configuration settings for the Watson Discovery service instance used by the search integration. */ + /** + * SearchSettingsConversationalSearchSearchConfidence. + */ + export interface SearchSettingsConversationalSearchSearchConfidence { + /** The search confidence threshold. + * It controls the tendency for conversational search to produce “I don't know” answers. + */ + threshold?: SearchSettingsConversationalSearchSearchConfidence.Constants.Threshold | string; + } + export namespace SearchSettingsConversationalSearchSearchConfidence { + export namespace Constants { + /** The search confidence threshold. It controls the tendency for conversational search to produce “I don't know” answers. */ + export enum Threshold { + RARELY = 'rarely', + LESS_OFTEN = 'less_often', + MORE_OFTEN = 'more_often', + MOST_OFTEN = 'most_often', + } + } + } + + /** + * Configuration settings for the Watson Discovery service instance used by the search integration. + */ export interface SearchSettingsDiscovery { /** The ID for the Watson Discovery service instance. */ instance_id: string; @@ -3631,7 +5263,12 @@ namespace AssistantV2 { authentication: SearchSettingsDiscoveryAuthentication; } - /** Authentication information for the Watson Discovery service. For more information, see the [Watson Discovery documentation](https://cloud.ibm.com/apidocs/discovery-data#authentication). **Note:** You must specify either **basic** or **bearer**, but not both. */ + /** + * Authentication information for the Watson Discovery service. For more information, see the [Watson Discovery + * documentation](https://cloud.ibm.com/apidocs/discovery-data#authentication). + * + * **Note:** You must specify either **basic** or **bearer**, but not both. + */ export interface SearchSettingsDiscoveryAuthentication { /** The HTTP basic authentication credentials for Watson Discovery. Specify your Watson Discovery API key in the * format `apikey:{apikey}`. @@ -3641,7 +5278,46 @@ namespace AssistantV2 { bearer?: string; } - /** The messages included with responses from the search integration. */ + /** + * Configuration settings for the Elasticsearch service used by the search integration. You can provide either basic + * auth or apiKey auth. + */ + export interface SearchSettingsElasticSearch { + /** The URL for the Elasticsearch service. */ + url: string; + /** The port number for the Elasticsearch service URL. + * + * **Note:** It can be omitted if a port number is appended to the URL. + */ + port: string; + /** The username of the basic authentication method. */ + username?: string; + /** The password of the basic authentication method. The credentials are not returned due to security reasons. */ + password?: string; + /** The Elasticsearch index to use for the search integration. */ + index: string; + /** An array of filters that can be applied to the search results via the `$FILTER` variable in the + * `query_body`.For more information, see [Elasticsearch filter + * documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/filter-search-results.html). + */ + filter?: any[]; + /** The Elasticsearch query object. For more information, see [Elasticsearch search API + * documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html). + */ + query_body?: JsonObject; + /** The Elasticsearch index for uploading documents. It is created automatically when the upload document option + * is selected from the user interface. + */ + managed_index?: string; + /** The API key of the apiKey authentication method. Use either basic auth or apiKey auth. The credentials are + * not returned due to security reasons. + */ + apikey?: string; + } + + /** + * The messages included with responses from the search integration. + */ export interface SearchSettingsMessages { /** The message to include in the response to a successful query. */ success: string; @@ -3651,7 +5327,9 @@ namespace AssistantV2 { no_result: string; } - /** The mapping between fields in the Watson Discovery collection and properties in the search response. */ + /** + * The mapping between fields in the Watson Discovery collection and properties in the search response. + */ export interface SearchSettingsSchemaMapping { /** The field in the collection to map to the **url** property of the response. */ url: string; @@ -3661,7 +5339,44 @@ namespace AssistantV2 { title: string; } - /** A warning describing an error in the search skill configuration. */ + /** + * Configuration settings for the server-side search service used by the search integration. You can provide either + * basic auth, apiKey auth or none. + */ + export interface SearchSettingsServerSideSearch { + /** The URL of the server-side search service. */ + url: string; + /** The port number of the server-side search service. */ + port?: string; + /** The username of the basic authentication method. */ + username?: string; + /** The password of the basic authentication method. The credentials are not returned due to security reasons. */ + password?: string; + /** The filter string that is applied to the search results. */ + filter?: string; + /** The metadata object. */ + metadata?: JsonObject; + /** The API key of the apiKey authentication method. The credentails are not returned due to security reasons. */ + apikey?: string; + /** To clear previous auth, specify `no_auth = true`. */ + no_auth?: boolean; + /** The authorization type that is used. */ + auth_type?: SearchSettingsServerSideSearch.Constants.AuthType | string; + } + export namespace SearchSettingsServerSideSearch { + export namespace Constants { + /** The authorization type that is used. */ + export enum AuthType { + BASIC = 'basic', + APIKEY = 'apikey', + NONE = 'none', + } + } + } + + /** + * A warning describing an error in the search skill configuration. + */ export interface SearchSkillWarning { /** The error code. */ code?: string; @@ -3671,13 +5386,17 @@ namespace AssistantV2 { message?: string; } - /** SessionResponse. */ + /** + * SessionResponse. + */ export interface SessionResponse { /** The session ID. */ session_id: string; } - /** Skill. */ + /** + * Skill. + */ export interface Skill { /** The name of the skill. This string cannot contain carriage return, newline, or tab characters. */ name?: string; @@ -3753,7 +5472,9 @@ namespace AssistantV2 { } } - /** SkillImport. */ + /** + * SkillImport. + */ export interface SkillImport { /** The name of the skill. This string cannot contain carriage return, newline, or tab characters. */ name?: string; @@ -3828,7 +5549,9 @@ namespace AssistantV2 { } } - /** SkillsAsyncRequestStatus. */ + /** + * SkillsAsyncRequestStatus. + */ export interface SkillsAsyncRequestStatus { /** The assistant ID of the assistant. */ assistant_id?: string; @@ -3859,7 +5582,9 @@ namespace AssistantV2 { } } - /** SkillsExport. */ + /** + * SkillsExport. + */ export interface SkillsExport { /** An array of objects describing the skills for the assistant. Included in responses only if * **status**=`Available`. @@ -3869,7 +5594,9 @@ namespace AssistantV2 { assistant_state: AssistantState; } - /** A response from the watsonx Assistant service. */ + /** + * A response from the watsonx Assistant service. + */ export interface StatefulMessageResponse { /** Assistant output to be rendered or processed by the client. */ output: MessageOutput; @@ -3895,7 +5622,9 @@ namespace AssistantV2 { masked_input?: MessageInput; } - /** StatelessMessageContext. */ + /** + * StatelessMessageContext. + */ export interface StatelessMessageContext { /** Session context data that is shared by all skills used by the assistant. */ global?: StatelessMessageContextGlobal; @@ -3907,7 +5636,9 @@ namespace AssistantV2 { integrations?: JsonObject; } - /** Session context data that is shared by all skills used by the assistant. */ + /** + * Session context data that is shared by all skills used by the assistant. + */ export interface StatelessMessageContextGlobal { /** Built-in system properties that apply to all skills used by the assistant. */ system?: MessageContextGlobalSystem; @@ -3915,7 +5646,9 @@ namespace AssistantV2 { session_id?: string; } - /** Context data specific to particular skills used by the assistant. */ + /** + * Context data specific to particular skills used by the assistant. + */ export interface StatelessMessageContextSkills { /** Context variables that are used by the dialog skill. */ 'main skill'?: MessageContextDialogSkill; @@ -3923,7 +5656,9 @@ namespace AssistantV2 { 'actions skill'?: StatelessMessageContextSkillsActionsSkill; } - /** Context variables that are used by the action skill. */ + /** + * Context variables that are used by the action skill. + */ export interface StatelessMessageContextSkillsActionsSkill { /** An object containing any arbitrary variables that can be read and written by a particular skill. */ user_defined?: JsonObject; @@ -3948,7 +5683,9 @@ namespace AssistantV2 { private_skill_variables?: JsonObject; } - /** An input object that includes the input text. */ + /** + * An input object that includes the input text. + */ export interface StatelessMessageInput { /** The type of the message: * @@ -3993,7 +5730,9 @@ namespace AssistantV2 { } } - /** Optional properties that control how the assistant responds. */ + /** + * Optional properties that control how the assistant responds. + */ export interface StatelessMessageInputOptions { /** Whether to restart dialog processing at the root of the dialog, regardless of any previously visited nodes. * **Note:** This does not affect `turn_count` or any other context variables. @@ -4018,7 +5757,9 @@ namespace AssistantV2 { debug?: boolean; } - /** A stateless response from the watsonx Assistant service. */ + /** + * A stateless response from the watsonx Assistant service. + */ export interface StatelessMessageResponse { /** Assistant output to be rendered or processed by the client. */ output: MessageOutput; @@ -4041,13 +5782,17 @@ namespace AssistantV2 { user_id?: string; } - /** An object describing an error that occurred during processing of an asynchronous operation. */ + /** + * An object describing an error that occurred during processing of an asynchronous operation. + */ export interface StatusError { /** The text of the error message. */ message?: string; } - /** TurnEventActionSource. */ + /** + * TurnEventActionSource. + */ export interface TurnEventActionSource { /** The type of turn event. */ type?: TurnEventActionSource.Constants.Type | string; @@ -4067,7 +5812,9 @@ namespace AssistantV2 { } } - /** TurnEventCalloutCallout. */ + /** + * TurnEventCalloutCallout. + */ export interface TurnEventCalloutCallout { /** The type of callout. Currently, the only supported value is `integration_interaction` (for calls to * extensions). @@ -4077,6 +5824,10 @@ namespace AssistantV2 { internal?: JsonObject; /** The name of the variable where the callout result is stored. */ result_variable?: string; + /** The request object executed to the external server specified by the extension. */ + request?: TurnEventCalloutCalloutRequest; + /** The response object received by the external server made by the extension. */ + response?: TurnEventCalloutCalloutResponse; } export namespace TurnEventCalloutCallout { export namespace Constants { @@ -4087,13 +5838,61 @@ namespace AssistantV2 { } } - /** TurnEventCalloutError. */ + /** + * TurnEventCalloutCalloutRequest. + */ + export interface TurnEventCalloutCalloutRequest { + /** The REST method of the request. */ + method?: TurnEventCalloutCalloutRequest.Constants.Method | string; + /** The host URL of the request call. */ + url?: string; + /** The URL path of the request call. */ + path?: string; + /** Any query parameters appended to the URL of the request call. */ + query_parameters?: string; + /** Any headers included in the request call. */ + headers?: JsonObject; + /** Contains the response of the external server or an object. In cases like timeouts or connections errors, it + * will contain details of why the callout to the external server failed. + */ + body?: JsonObject; + } + export namespace TurnEventCalloutCalloutRequest { + export namespace Constants { + /** The REST method of the request. */ + export enum Method { + GET = 'get', + POST = 'post', + PUT = 'put', + DELETE = 'delete', + PATCH = 'patch', + } + } + } + + /** + * TurnEventCalloutCalloutResponse. + */ + export interface TurnEventCalloutCalloutResponse { + /** The final response string. This response is a composition of every partial chunk received from the stream. */ + body?: string; + /** The final status code of the response. */ + status_code?: number; + /** The response from the last chunk received from the response stream. */ + last_event?: JsonObject; + } + + /** + * TurnEventCalloutError. + */ export interface TurnEventCalloutError { /** Any error message returned by a failed call to an external service. */ message?: string; } - /** TurnEventNodeSource. */ + /** + * TurnEventNodeSource. + */ export interface TurnEventNodeSource { /** The type of turn event. */ type?: TurnEventNodeSource.Constants.Type | string; @@ -4113,13 +5912,43 @@ namespace AssistantV2 { } } - /** TurnEventSearchError. */ + /** + * TurnEventSearchError. + */ export interface TurnEventSearchError { /** Any error message returned by a failed call to a search skill. */ message?: string; } - /** An object that identifies the dialog element that generated the error message. */ + /** + * The search skill orchestration settings for the environment. + */ + export interface UpdateEnvironmentOrchestration { + /** Whether to fall back to a search skill when responding to messages that do not match any intent or action + * defined in dialog or action skills. (If no search skill is configured for the environment, this property is + * ignored.). + */ + search_skill_fallback?: boolean; + } + + /** + * An object describing the release that is currently deployed in the environment. + */ + export interface UpdateEnvironmentReleaseReference { + /** The name of the deployed release. */ + release?: string; + } + + /** + * CompleteItem. + */ + export interface CompleteItem extends RuntimeResponseGeneric { + streaming_metadata: Metadata; + } + + /** + * An object that identifies the dialog element that generated the error message. + */ export interface LogMessageSourceAction extends LogMessageSource { /** A string that indicates the type of dialog element that generated the error message. */ type: string; @@ -4127,7 +5956,9 @@ namespace AssistantV2 { action: string; } - /** An object that identifies the dialog element that generated the error message. */ + /** + * An object that identifies the dialog element that generated the error message. + */ export interface LogMessageSourceDialogNode extends LogMessageSource { /** A string that indicates the type of dialog element that generated the error message. */ type: string; @@ -4135,7 +5966,9 @@ namespace AssistantV2 { dialog_node: string; } - /** An object that identifies the dialog element that generated the error message. */ + /** + * An object that identifies the dialog element that generated the error message. + */ export interface LogMessageSourceHandler extends LogMessageSource { /** A string that indicates the type of dialog element that generated the error message. */ type: string; @@ -4147,7 +5980,9 @@ namespace AssistantV2 { handler: string; } - /** An object that identifies the dialog element that generated the error message. */ + /** + * An object that identifies the dialog element that generated the error message. + */ export interface LogMessageSourceStep extends LogMessageSource { /** A string that indicates the type of dialog element that generated the error message. */ type: string; @@ -4157,7 +5992,9 @@ namespace AssistantV2 { step: string; } - /** MessageOutputDebugTurnEventTurnEventActionFinished. */ + /** + * MessageOutputDebugTurnEventTurnEventActionFinished. + */ export interface MessageOutputDebugTurnEventTurnEventActionFinished extends MessageOutputDebugTurnEvent { /** The type of turn event. */ event?: string; @@ -4191,7 +6028,9 @@ namespace AssistantV2 { } } - /** MessageOutputDebugTurnEventTurnEventActionVisited. */ + /** + * MessageOutputDebugTurnEventTurnEventActionVisited. + */ export interface MessageOutputDebugTurnEventTurnEventActionVisited extends MessageOutputDebugTurnEvent { /** The type of turn event. */ event?: string; @@ -4230,7 +6069,9 @@ namespace AssistantV2 { } } - /** MessageOutputDebugTurnEventTurnEventCallout. */ + /** + * MessageOutputDebugTurnEventTurnEventCallout. + */ export interface MessageOutputDebugTurnEventTurnEventCallout extends MessageOutputDebugTurnEvent { /** The type of turn event. */ event?: string; @@ -4239,7 +6080,9 @@ namespace AssistantV2 { error?: TurnEventCalloutError; } - /** MessageOutputDebugTurnEventTurnEventHandlerVisited. */ + /** + * MessageOutputDebugTurnEventTurnEventHandlerVisited. + */ export interface MessageOutputDebugTurnEventTurnEventHandlerVisited extends MessageOutputDebugTurnEvent { /** The type of turn event. */ event?: string; @@ -4248,7 +6091,9 @@ namespace AssistantV2 { action_start_time?: string; } - /** MessageOutputDebugTurnEventTurnEventNodeVisited. */ + /** + * MessageOutputDebugTurnEventTurnEventNodeVisited. + */ export interface MessageOutputDebugTurnEventTurnEventNodeVisited extends MessageOutputDebugTurnEvent { /** The type of turn event. */ event?: string; @@ -4270,7 +6115,9 @@ namespace AssistantV2 { } } - /** MessageOutputDebugTurnEventTurnEventSearch. */ + /** + * MessageOutputDebugTurnEventTurnEventSearch. + */ export interface MessageOutputDebugTurnEventTurnEventSearch extends MessageOutputDebugTurnEvent { /** The type of turn event. */ event?: string; @@ -4278,7 +6125,9 @@ namespace AssistantV2 { error?: TurnEventSearchError; } - /** MessageOutputDebugTurnEventTurnEventStepAnswered. */ + /** + * MessageOutputDebugTurnEventTurnEventStepAnswered. + */ export interface MessageOutputDebugTurnEventTurnEventStepAnswered extends MessageOutputDebugTurnEvent { /** The type of turn event. */ event?: string; @@ -4303,7 +6152,9 @@ namespace AssistantV2 { } } - /** MessageOutputDebugTurnEventTurnEventStepVisited. */ + /** + * MessageOutputDebugTurnEventTurnEventStepVisited. + */ export interface MessageOutputDebugTurnEventTurnEventStepVisited extends MessageOutputDebugTurnEvent { /** The type of turn event. */ event?: string; @@ -4326,7 +6177,160 @@ namespace AssistantV2 { } } - /** RuntimeResponseGenericRuntimeResponseTypeAudio. */ + /** + * Non-private authentication settings for authorization-code flow. + */ + export interface ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode extends ProviderAuthenticationOAuth2Flows { + /** The token URL. */ + token_url?: string; + /** The refresh token URL. */ + refresh_url?: string; + /** The client authorization type. */ + client_auth_type?: ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode.Constants.ClientAuthType | string; + /** The content type. */ + content_type?: string; + /** The prefix fo the header. */ + header_prefix?: string; + /** The authorization URL. */ + authorization_url?: string; + /** The redirect URI. */ + redirect_uri?: string; + } + export namespace ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2AuthorizationCode { + export namespace Constants { + /** The client authorization type. */ + export enum ClientAuthType { + BODY = 'Body', + BASICAUTHHEADER = 'BasicAuthHeader', + } + } + } + + /** + * ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials. + */ + export interface ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials extends ProviderAuthenticationOAuth2Flows { + /** The token URL. */ + token_url?: string; + /** The refresh token URL. */ + refresh_url?: string; + /** The client authorization type. */ + client_auth_type?: ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials.Constants.ClientAuthType | string; + /** The content type. */ + content_type?: string; + /** The prefix fo the header. */ + header_prefix?: string; + } + export namespace ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2ClientCredentials { + export namespace Constants { + /** The client authorization type. */ + export enum ClientAuthType { + BODY = 'Body', + BASICAUTHHEADER = 'BasicAuthHeader', + } + } + } + + /** + * Non-private authentication settings for resource owner password flow. + */ + export interface ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password extends ProviderAuthenticationOAuth2Flows { + /** The token URL. */ + token_url?: string; + /** The refresh token URL. */ + refresh_url?: string; + /** The client authorization type. */ + client_auth_type?: ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password.Constants.ClientAuthType | string; + /** The content type. */ + content_type?: string; + /** The prefix fo the header. */ + header_prefix?: string; + /** The username for oauth2 authentication when the preferred flow is "password". */ + username?: ProviderAuthenticationOAuth2PasswordUsername; + } + export namespace ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password { + export namespace Constants { + /** The client authorization type. */ + export enum ClientAuthType { + BODY = 'Body', + BASICAUTHHEADER = 'BasicAuthHeader', + } + } + } + + /** + * The private data for basic authentication. + */ + export interface ProviderPrivateAuthenticationBasicFlow extends ProviderPrivateAuthentication { + /** The password for bearer authentication. */ + password?: ProviderAuthenticationTypeAndValue; + } + + /** + * The private data for bearer authentication. + */ + export interface ProviderPrivateAuthenticationBearerFlow extends ProviderPrivateAuthentication { + /** The token for bearer authentication. */ + token?: ProviderAuthenticationTypeAndValue; + } + + /** + * The private data for oauth2 authentication. + */ + export interface ProviderPrivateAuthenticationOAuth2Flow extends ProviderPrivateAuthentication { + /** Scenarios performed by the API client to fetch an access token from the authorization server. */ + flows?: ProviderPrivateAuthenticationOAuth2FlowFlows; + } + + /** + * Private authentication settings for client credentials flow. + */ + export interface ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2AuthorizationCode extends ProviderPrivateAuthenticationOAuth2FlowFlows { + /** The client ID. */ + client_id?: string; + /** The client secret. */ + client_secret?: string; + /** The access token. */ + access_token?: string; + /** The refresh token. */ + refresh_token?: string; + /** The authorization code. */ + authorization_code?: string; + } + + /** + * ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials. + */ + export interface ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2ClientCredentials extends ProviderPrivateAuthenticationOAuth2FlowFlows { + /** The client ID. */ + client_id?: string; + /** The client secret. */ + client_secret?: string; + /** The access token. */ + access_token?: string; + /** The refresh token. */ + refresh_token?: string; + } + + /** + * Private authentication settings for resource owner password flow. + */ + export interface ProviderPrivateAuthenticationOAuth2FlowFlowsProviderPrivateAuthenticationOAuth2Password extends ProviderPrivateAuthenticationOAuth2FlowFlows { + /** The client ID. */ + client_id?: string; + /** The client secret. */ + client_secret?: string; + /** The access token. */ + access_token?: string; + /** The refresh token. */ + refresh_token?: string; + /** The password for oauth2 authentication when the preferred flow is "password". */ + password?: ProviderPrivateAuthenticationOAuth2PasswordPassword; + } + + /** + * RuntimeResponseGenericRuntimeResponseTypeAudio. + */ export interface RuntimeResponseGenericRuntimeResponseTypeAudio extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4350,7 +6354,9 @@ namespace AssistantV2 { alt_text?: string; } - /** RuntimeResponseGenericRuntimeResponseTypeChannelTransfer. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeChannelTransfer. + */ export interface RuntimeResponseGenericRuntimeResponseTypeChannelTransfer extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4368,7 +6374,9 @@ namespace AssistantV2 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeConnectToAgent. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeConnectToAgent. + */ export interface RuntimeResponseGenericRuntimeResponseTypeConnectToAgent extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4396,7 +6404,9 @@ namespace AssistantV2 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeDate. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeDate. + */ export interface RuntimeResponseGenericRuntimeResponseTypeDate extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4404,7 +6414,9 @@ namespace AssistantV2 { response_type: string; } - /** RuntimeResponseGenericRuntimeResponseTypeIframe. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeIframe. + */ export interface RuntimeResponseGenericRuntimeResponseTypeIframe extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4424,7 +6436,9 @@ namespace AssistantV2 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeImage. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeImage. + */ export interface RuntimeResponseGenericRuntimeResponseTypeImage extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4444,7 +6458,9 @@ namespace AssistantV2 { alt_text?: string; } - /** RuntimeResponseGenericRuntimeResponseTypeOption. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeOption. + */ export interface RuntimeResponseGenericRuntimeResponseTypeOption extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4473,7 +6489,9 @@ namespace AssistantV2 { } } - /** RuntimeResponseGenericRuntimeResponseTypePause. */ + /** + * RuntimeResponseGenericRuntimeResponseTypePause. + */ export interface RuntimeResponseGenericRuntimeResponseTypePause extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4489,7 +6507,9 @@ namespace AssistantV2 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeSearch. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeSearch. + */ export interface RuntimeResponseGenericRuntimeResponseTypeSearch extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4509,7 +6529,9 @@ namespace AssistantV2 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeSuggestion. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeSuggestion. + */ export interface RuntimeResponseGenericRuntimeResponseTypeSuggestion extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4525,7 +6547,9 @@ namespace AssistantV2 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeText. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeText. + */ export interface RuntimeResponseGenericRuntimeResponseTypeText extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4539,7 +6563,9 @@ namespace AssistantV2 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeUserDefined. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeUserDefined. + */ export interface RuntimeResponseGenericRuntimeResponseTypeUserDefined extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. @@ -4553,7 +6579,9 @@ namespace AssistantV2 { channels?: ResponseGenericChannel[]; } - /** RuntimeResponseGenericRuntimeResponseTypeVideo. */ + /** + * RuntimeResponseGenericRuntimeResponseTypeVideo. + */ export interface RuntimeResponseGenericRuntimeResponseTypeVideo extends RuntimeResponseGeneric { /** The type of response returned by the dialog node. The specified response type must be supported by the * client application or channel. diff --git a/authorization/v1.ts b/authorization/v1.ts deleted file mode 100644 index 9024cf05da..0000000000 --- a/authorization/v1.ts +++ /dev/null @@ -1,128 +0,0 @@ -/** - * (C) Copyright IBM Corp. 2015, 2019. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'; -import { Authenticator, BaseService, TokenRequestBasedAuthenticator, UserOptions } from 'ibm-cloud-sdk-core'; -import url = require('url'); - -class AuthorizationV1 extends BaseService { - static URL: string = 'https://api.us-south.speech-to-text.watson.cloud.ibm.com/authorization/api'; - name: string; // set by prototype to 'authorization' - serviceVersion: string; // set by prototype to 'v1' - // tslint:disable-next-line:variable-name - targetUrl?: string; - - /** - * Authorization Service - * - * Generates temporary auth tokens for use in untrusted environments. - * Tokens expire after one hour. - * - * @param {Object} options - * @constructor - */ - constructor(options: UserOptions) { - super(options); - this.targetUrl = options.url; - // replace the url to always point to /authorization/api - const hostname = url.parse(this.baseOptions.url); - hostname.pathname = '/authorization/api'; - this.baseOptions.url = url.format(hostname); - } - - /** - * If using an RC service, get an IAM access token. If using a CF service, - * get a percent-encoded authorization token based on resource query string param - * - * @param {Object} [options] - * @param {String} [options.url] defaults to url supplied to constructor (if any) - * @param {Function(err, token)} callback - called with a %-encoded token if CF - */ - getToken(params: AuthorizationV1.GetTokenParams | AuthorizationV1.GetTokenCallback, callback?: AuthorizationV1.GetTokenCallback) { - if (typeof params === 'function') { - callback = params; - params = { url: this.targetUrl }; - } - - const authenticator = this.getAuthenticator(); - - // if the authenticator is managing a token, return that token - if (authenticator instanceof TokenRequestBasedAuthenticator) { - const options = { headers: {} }; - return authenticator.authenticate(options).then( - () => { - callback(null, parseTokenFromHeader(options.headers)); - }, - err => { - callback(err); - } - ); - } - - // otherwise, return a CF Watson token - if (!params.url) { - callback(new Error('Missing required parameters: url')); - return; - } - const parameters = { - options: { - method: 'GET', - url: '/v1/token?url=' + params.url - }, - defaultOptions: this.baseOptions - }; - return this.createRequest(parameters).then( - res => { - callback(null, res); - return res; - }, - err => { - callback(err); - } - ); - } -} - -AuthorizationV1.prototype.name = 'authorization'; -AuthorizationV1.prototype.serviceVersion = 'v1'; - -/************************* - * interfaces - ************************/ - -namespace AuthorizationV1 { - export interface GetTokenResponse { - result: string; - status?: number; - statusText?: string; - headers?: IncomingHttpHeaders; - } - - /** The callback for the getToken request. */ - export type GetTokenCallback = (error?: Error, response?: string|GetTokenResponse) => void; - - /** Parameters for the `getToken` operation */ - export interface GetTokenParams { - url?: string; - } -} - -function parseTokenFromHeader(headers) { - // get token from format `basic TOKEN` or `bearer TOKEN` - return headers.Authorization ? headers.Authorization.split(' ')[1] : null; -} - -export = AuthorizationV1; diff --git a/discovery/v1.ts b/discovery/v1.ts deleted file mode 100644 index 6d7dae595e..0000000000 --- a/discovery/v1.ts +++ /dev/null @@ -1,7134 +0,0 @@ -/** - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 - */ - -import * as extend from 'extend'; -import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'; -import { - Authenticator, - BaseService, - UserOptions, - getAuthenticatorFromEnvironment, - validateParams, -} from 'ibm-cloud-sdk-core'; -import { getSdkHeaders } from '../lib/common'; - -/** - * IBM Watson™ Discovery v1 is a cognitive search and content analytics engine that you can add to applications to - * identify patterns, trends and actionable insights to drive better decision-making. Securely unify structured and - * unstructured data with pre-enriched content, and use a simplified query language to eliminate the need for manual - * filtering of results. - * - * API Version: 1.0 - * See: https://cloud.ibm.com/docs/discovery - */ - -class DiscoveryV1 extends BaseService { - static DEFAULT_SERVICE_URL: string = 'https://api.us-south.discovery.watson.cloud.ibm.com'; - - static DEFAULT_SERVICE_NAME: string = 'discovery'; - - /** Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current - * version is `2019-04-30`. - */ - version: string; - - /** - * Construct a DiscoveryV1 object. - * - * @param {Object} options - Options for the service. - * @param {string} options.version - Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2019-04-30`. - * @param {string} [options.serviceUrl] - The base URL for the service - * @param {OutgoingHttpHeaders} [options.headers] - Default headers that shall be included with every request to the service. - * @param {string} [options.serviceName] - The name of the service to configure - * @param {Authenticator} [options.authenticator] - The Authenticator object used to authenticate requests to the service. Defaults to environment if not set - * @constructor - * @returns {DiscoveryV1} - */ - constructor(options: UserOptions) { - options = options || {}; - - const _requiredParams = ['version']; - const _validationErrors = validateParams(options, _requiredParams, null); - if (_validationErrors) { - throw _validationErrors; - } - if (!options.serviceName) { - options.serviceName = DiscoveryV1.DEFAULT_SERVICE_NAME; - } - // If the caller didn't supply an authenticator, construct one from external configuration. - if (!options.authenticator) { - options.authenticator = getAuthenticatorFromEnvironment(options.serviceName); - } - super(options); - this.configureService(options.serviceName); - if (options.serviceUrl) { - this.setServiceUrl(options.serviceUrl); - } - this.version = options.version; - } - - /************************* - * environments - ************************/ - - /** - * Create an environment. - * - * Creates a new environment for private data. An environment must be created before collections can be created. - * - * **Note**: You can create only one environment for private data per service instance. An attempt to create another - * environment results in an error. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.name - Name that identifies the environment. - * @param {string} [params.description] - Description of the environment. - * @param {string} [params.size] - Size of the environment. In the Lite plan the default and only accepted value is - * `LT`, in all other plans the default is `S`. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createEnvironment( - params: DiscoveryV1.CreateEnvironmentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['name']; - const _validParams = ['name', 'description', 'size', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'name': _params.name, - 'description': _params.description, - 'size': _params.size, - }; - - const query = { - 'version': this.version, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createEnvironment'); - - const parameters = { - options: { - url: '/v1/environments', - method: 'POST', - body, - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * List environments. - * - * List existing environments for the service instance. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {string} [params.name] - Show only the environment with the given name. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listEnvironments( - params?: DiscoveryV1.ListEnvironmentsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['name', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'name': _params.name, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listEnvironments'); - - const parameters = { - options: { - url: '/v1/environments', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get environment info. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getEnvironment( - params: DiscoveryV1.GetEnvironmentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getEnvironment'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Update an environment. - * - * Updates an environment. The environment's **name** and **description** parameters can be changed. You must specify - * a **name** for the environment. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} [params.name] - Name that identifies the environment. - * @param {string} [params.description] - Description of the environment. - * @param {string} [params.size] - Size to change the environment to. **Note:** Lite plan users cannot change the - * environment size. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public updateEnvironment( - params: DiscoveryV1.UpdateEnvironmentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'name', 'description', 'size', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'name': _params.name, - 'description': _params.description, - 'size': _params.size, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'updateEnvironment'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}', - method: 'PUT', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete environment. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteEnvironment( - params: DiscoveryV1.DeleteEnvironmentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteEnvironment'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * List fields across collections. - * - * Gets a list of the unique fields (and their types) stored in the indexes of the specified collections. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string[]} params.collectionIds - A comma-separated list of collection IDs to be queried against. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listFields( - params: DiscoveryV1.ListFieldsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionIds']; - const _validParams = ['environmentId', 'collectionIds', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'collection_ids': _params.collectionIds, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listFields'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/fields', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * configurations - ************************/ - - /** - * Add configuration. - * - * Creates a new configuration. - * - * If the input configuration contains the **configuration_id**, **created**, or **updated** properties, then they are - * ignored and overridden by the system, and an error is not returned so that the overridden fields do not need to be - * removed when copying a configuration. - * - * The configuration can contain unrecognized JSON fields. Any such fields are ignored and do not generate an error. - * This makes it easier to use newer configuration files with older versions of the API and the service. It also makes - * it possible for the tooling to add additional metadata and information to the configuration. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.name - The name of the configuration. - * @param {string} [params.description] - The description of the configuration, if available. - * @param {Conversions} [params.conversions] - Document conversion settings. - * @param {Enrichment[]} [params.enrichments] - An array of document enrichment settings for the configuration. - * @param {NormalizationOperation[]} [params.normalizations] - Defines operations that can be used to transform the - * final output JSON into a normalized form. Operations are executed in the order that they appear in the array. - * @param {Source} [params.source] - Object containing source parameters for the configuration. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createConfiguration( - params: DiscoveryV1.CreateConfigurationParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'name']; - const _validParams = ['environmentId', 'name', 'description', 'conversions', 'enrichments', 'normalizations', 'source', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'name': _params.name, - 'description': _params.description, - 'conversions': _params.conversions, - 'enrichments': _params.enrichments, - 'normalizations': _params.normalizations, - 'source': _params.source, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createConfiguration'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/configurations', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * List configurations. - * - * Lists existing configurations for the service instance. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} [params.name] - Find configurations with the given name. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listConfigurations( - params: DiscoveryV1.ListConfigurationsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'name', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'name': _params.name, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listConfigurations'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/configurations', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get configuration details. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.configurationId - The ID of the configuration. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getConfiguration( - params: DiscoveryV1.GetConfigurationParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'configurationId']; - const _validParams = ['environmentId', 'configurationId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'configuration_id': _params.configurationId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfiguration'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/configurations/{configuration_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Update a configuration. - * - * Replaces an existing configuration. - * * Completely replaces the original configuration. - * * The **configuration_id**, **updated**, and **created** fields are accepted in the request, but they are - * ignored, and an error is not generated. It is also acceptable for users to submit an updated configuration with - * none of the three properties. - * * Documents are processed with a snapshot of the configuration as it was at the time the document was submitted - * to be ingested. This means that already submitted documents will not see any updates made to the configuration. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.configurationId - The ID of the configuration. - * @param {string} params.name - The name of the configuration. - * @param {string} [params.description] - The description of the configuration, if available. - * @param {Conversions} [params.conversions] - Document conversion settings. - * @param {Enrichment[]} [params.enrichments] - An array of document enrichment settings for the configuration. - * @param {NormalizationOperation[]} [params.normalizations] - Defines operations that can be used to transform the - * final output JSON into a normalized form. Operations are executed in the order that they appear in the array. - * @param {Source} [params.source] - Object containing source parameters for the configuration. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public updateConfiguration( - params: DiscoveryV1.UpdateConfigurationParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'configurationId', 'name']; - const _validParams = ['environmentId', 'configurationId', 'name', 'description', 'conversions', 'enrichments', 'normalizations', 'source', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'name': _params.name, - 'description': _params.description, - 'conversions': _params.conversions, - 'enrichments': _params.enrichments, - 'normalizations': _params.normalizations, - 'source': _params.source, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'configuration_id': _params.configurationId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'updateConfiguration'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/configurations/{configuration_id}', - method: 'PUT', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete a configuration. - * - * The deletion is performed unconditionally. A configuration deletion request succeeds even if the configuration is - * referenced by a collection or document ingestion. However, documents that have already been submitted for - * processing continue to use the deleted configuration. Documents are always processed with a snapshot of the - * configuration as it existed at the time the document was submitted. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.configurationId - The ID of the configuration. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteConfiguration( - params: DiscoveryV1.DeleteConfigurationParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'configurationId']; - const _validParams = ['environmentId', 'configurationId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'configuration_id': _params.configurationId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteConfiguration'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/configurations/{configuration_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * collections - ************************/ - - /** - * Create a collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.name - The name of the collection to be created. - * @param {string} [params.description] - A description of the collection. - * @param {string} [params.configurationId] - The ID of the configuration in which the collection is to be created. - * @param {string} [params.language] - The language of the documents stored in the collection, in the form of an ISO - * 639-1 language code. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createCollection( - params: DiscoveryV1.CreateCollectionParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'name']; - const _validParams = ['environmentId', 'name', 'description', 'configurationId', 'language', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'name': _params.name, - 'description': _params.description, - 'configuration_id': _params.configurationId, - 'language': _params.language, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createCollection'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * List collections. - * - * Lists existing collections for the service instance. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} [params.name] - Find collections with the given name. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listCollections( - params: DiscoveryV1.ListCollectionsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'name', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'name': _params.name, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listCollections'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get collection details. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getCollection( - params: DiscoveryV1.GetCollectionParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getCollection'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Update a collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.name - The name of the collection. - * @param {string} [params.description] - A description of the collection. - * @param {string} [params.configurationId] - The ID of the configuration in which the collection is to be updated. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public updateCollection( - params: DiscoveryV1.UpdateCollectionParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'name']; - const _validParams = ['environmentId', 'collectionId', 'name', 'description', 'configurationId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'name': _params.name, - 'description': _params.description, - 'configuration_id': _params.configurationId, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'updateCollection'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}', - method: 'PUT', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete a collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteCollection( - params: DiscoveryV1.DeleteCollectionParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteCollection'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * List collection fields. - * - * Gets a list of the unique fields (and their types) stored in the index. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listCollectionFields( - params: DiscoveryV1.ListCollectionFieldsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listCollectionFields'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/fields', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * queryModifications - ************************/ - - /** - * Get the expansion list. - * - * Returns the current expansion list for the specified collection. If an expansion list is not specified, an object - * with empty expansion arrays is returned. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listExpansions( - params: DiscoveryV1.ListExpansionsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listExpansions'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/expansions', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Create or update expansion list. - * - * Create or replace the Expansion list for this collection. The maximum number of expanded terms per collection is - * `500`. The current expansion list is replaced with the uploaded content. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {Expansion[]} params.expansions - An array of query expansion definitions. - * - * Each object in the **expansions** array represents a term or set of terms that will be expanded into other terms. - * Each expansion object can be configured as bidirectional or unidirectional. Bidirectional means that all terms are - * expanded to all other terms in the object. Unidirectional means that a set list of terms can be expanded into a - * second list of terms. - * - * To create a bi-directional expansion specify an **expanded_terms** array. When found in a query, all items in the - * **expanded_terms** array are then expanded to the other items in the same array. - * - * To create a uni-directional expansion, specify both an array of **input_terms** and an array of - * **expanded_terms**. When items in the **input_terms** array are present in a query, they are expanded using the - * items listed in the **expanded_terms** array. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createExpansions( - params: DiscoveryV1.CreateExpansionsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'expansions']; - const _validParams = ['environmentId', 'collectionId', 'expansions', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'expansions': _params.expansions, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createExpansions'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/expansions', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete the expansion list. - * - * Remove the expansion information for this collection. The expansion list must be deleted to disable query expansion - * for a collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteExpansions( - params: DiscoveryV1.DeleteExpansionsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteExpansions'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/expansions', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get tokenization dictionary status. - * - * Returns the current status of the tokenization dictionary for the specified collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getTokenizationDictionaryStatus( - params: DiscoveryV1.GetTokenizationDictionaryStatusParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getTokenizationDictionaryStatus'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Create tokenization dictionary. - * - * Upload a custom tokenization dictionary to use with the specified collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {TokenDictRule[]} [params.tokenizationRules] - An array of tokenization rules. Each rule contains, the - * original `text` string, component `tokens`, any alternate character set `readings`, and which `part_of_speech` the - * text is from. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createTokenizationDictionary( - params: DiscoveryV1.CreateTokenizationDictionaryParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'tokenizationRules', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'tokenization_rules': _params.tokenizationRules, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createTokenizationDictionary'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete tokenization dictionary. - * - * Delete the tokenization dictionary from the collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteTokenizationDictionary( - params: DiscoveryV1.DeleteTokenizationDictionaryParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTokenizationDictionary'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get stopword list status. - * - * Returns the current status of the stopword list for the specified collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getStopwordListStatus( - params: DiscoveryV1.GetStopwordListStatusParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getStopwordListStatus'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Create stopword list. - * - * Upload a custom stopword list to use with the specified collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {NodeJS.ReadableStream | Buffer} params.stopwordFile - The content of the stopword list to ingest. - * @param {string} params.stopwordFilename - The filename for stopwordFile. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createStopwordList( - params: DiscoveryV1.CreateStopwordListParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'stopwordFile', 'stopwordFilename']; - const _validParams = ['environmentId', 'collectionId', 'stopwordFile', 'stopwordFilename', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const formData = { - 'stopword_file': { - data: _params.stopwordFile, - filename: _params.stopwordFilename, - contentType: 'application/octet-stream', - }, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createStopwordList'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords', - method: 'POST', - qs: query, - path, - formData - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'multipart/form-data', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete a custom stopword list. - * - * Delete a custom stopword list from the collection. After a custom stopword list is deleted, the default list is - * used for the collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteStopwordList( - params: DiscoveryV1.DeleteStopwordListParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteStopwordList'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * documents - ************************/ - - /** - * Add a document. - * - * Add a document to a collection with optional metadata. - * - * * The **version** query parameter is still required. - * - * * Returns immediately after the system has accepted the document for processing. - * - * * The user must provide document content, metadata, or both. If the request is missing both document content and - * metadata, it is rejected. - * - * * The user can set the **Content-Type** parameter on the **file** part to indicate the media type of the - * document. If the **Content-Type** parameter is missing or is one of the generic media types (for example, - * `application/octet-stream`), then the service attempts to automatically detect the document's media type. - * - * * The following field names are reserved and will be filtered out if present after normalization: `id`, `score`, - * `highlight`, and any field with the prefix of: `_`, `+`, or `-` - * - * * Fields with empty name values after normalization are filtered out before indexing. - * - * * Fields containing the following characters after normalization are filtered out before indexing: `#` and `,` - * - * **Note:** Documents can be added with a specific **document_id** by using the - * **_/v1/environments/{environment_id}/collections/{collection_id}/documents** method. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {NodeJS.ReadableStream | Buffer} [params.file] - The content of the document to ingest. The maximum - * supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size when - * testing a configuration is 1 megabyte. Files larger than the supported size are rejected. - * @param {string} [params.filename] - The filename for file. - * @param {string} [params.fileContentType] - The content type of file. - * @param {string} [params.metadata] - The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 - * MB are rejected. Example: ``` { - * "Creator": "Johnny Appleseed", - * "Subject": "Apples" - * } ```. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public addDocument( - params: DiscoveryV1.AddDocumentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'file', 'filename', 'fileContentType', 'metadata', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const formData = { - 'file': { - data: _params.file, - filename: _params.filename, - contentType: _params.fileContentType, - }, - 'metadata': _params.metadata, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'addDocument'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/documents', - method: 'POST', - qs: query, - path, - formData - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'multipart/form-data', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get document details. - * - * Fetch status details about a submitted document. **Note:** this operation does not return the document itself. - * Instead, it returns only the document's processing status and any notices (warnings or errors) that were generated - * when the document was ingested. Use the query API to retrieve the actual document content. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.documentId - The ID of the document. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getDocumentStatus( - params: DiscoveryV1.GetDocumentStatusParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'documentId']; - const _validParams = ['environmentId', 'collectionId', 'documentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'document_id': _params.documentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getDocumentStatus'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Update a document. - * - * Replace an existing document or add a document with a specified **document_id**. Starts ingesting a document with - * optional metadata. - * - * **Note:** When uploading a new document with this method it automatically replaces any document stored with the - * same **document_id** if it exists. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.documentId - The ID of the document. - * @param {NodeJS.ReadableStream | Buffer} [params.file] - The content of the document to ingest. The maximum - * supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size when - * testing a configuration is 1 megabyte. Files larger than the supported size are rejected. - * @param {string} [params.filename] - The filename for file. - * @param {string} [params.fileContentType] - The content type of file. - * @param {string} [params.metadata] - The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 - * MB are rejected. Example: ``` { - * "Creator": "Johnny Appleseed", - * "Subject": "Apples" - * } ```. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public updateDocument( - params: DiscoveryV1.UpdateDocumentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'documentId']; - const _validParams = ['environmentId', 'collectionId', 'documentId', 'file', 'filename', 'fileContentType', 'metadata', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const formData = { - 'file': { - data: _params.file, - filename: _params.filename, - contentType: _params.fileContentType, - }, - 'metadata': _params.metadata, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'document_id': _params.documentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDocument'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}', - method: 'POST', - qs: query, - path, - formData - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'multipart/form-data', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete a document. - * - * If the given document ID is invalid, or if the document is not found, then the a success response is returned (HTTP - * status code `200`) with the status set to 'deleted'. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.documentId - The ID of the document. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteDocument( - params: DiscoveryV1.DeleteDocumentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'documentId']; - const _validParams = ['environmentId', 'collectionId', 'documentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'document_id': _params.documentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDocument'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * queries - ************************/ - - /** - * Query a collection. - * - * By using this method, you can construct long queries. For details, see the [Discovery - * documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts). - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} [params.filter] - A cacheable query that excludes documents that don't mention the query content. - * Filter searches are better for metadata-type searches and for assessing the concepts in the data set. - * @param {string} [params.query] - A query search returns all documents in your data set with full enrichments and - * full text, but with the most relevant documents listed first. Use a query search when you want to find the most - * relevant search results. - * @param {string} [params.naturalLanguageQuery] - A natural language query that returns relevant documents by - * utilizing training data and natural language understanding. - * @param {boolean} [params.passages] - A passages query that returns the most relevant passages from the results. - * @param {string} [params.aggregation] - An aggregation search that returns an exact answer by combining query search - * with filters. Useful for applications to build lists, tables, and time series. For a full list of possible - * aggregations, see the Query reference. - * @param {number} [params.count] - Number of results to return. - * @param {string} [params._return] - A comma-separated list of the portion of the document hierarchy to return. - * @param {number} [params.offset] - The number of query results to skip at the beginning. For example, if the total - * number of results that are returned is 10 and the offset is 8, it returns the last two results. - * @param {string} [params.sort] - A comma-separated list of fields in the document to sort on. You can optionally - * specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the - * default sort direction if no prefix is specified. This parameter cannot be used in the same query as the **bias** - * parameter. - * @param {boolean} [params.highlight] - When true, a highlight field is returned for each result which contains the - * fields which match the query with `` tags around the matching query terms. - * @param {string} [params.passagesFields] - A comma-separated list of fields that passages are drawn from. If this - * parameter not specified, then all top-level fields are included. - * @param {number} [params.passagesCount] - The maximum number of passages to return. The search returns fewer - * passages if the requested total is not found. The default is `10`. The maximum is `100`. - * @param {number} [params.passagesCharacters] - The approximate number of characters that any one passage will have. - * @param {boolean} [params.deduplicate] - When `true`, and used with a Watson Discovery News collection, duplicate - * results (based on the contents of the **title** field) are removed. Duplicate comparison is limited to the current - * query only; **offset** is not considered. This parameter is currently Beta functionality. - * @param {string} [params.deduplicateField] - When specified, duplicate results based on the field specified are - * removed from the returned results. Duplicate comparison is limited to the current query only, **offset** is not - * considered. This parameter is currently Beta functionality. - * @param {boolean} [params.similar] - When `true`, results are returned based on their similarity to the document IDs - * specified in the **similar.document_ids** parameter. - * @param {string} [params.similarDocumentIds] - A comma-separated list of document IDs to find similar documents. - * - * **Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search - * with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently applied - * and reduce the scope. - * @param {string} [params.similarFields] - A comma-separated list of field names that are used as a basis for - * comparison to identify similar documents. If not specified, the entire document is used for comparison. - * @param {string} [params.bias] - Field which the returned results will be biased against. The specified field must - * be either a **date** or **number** format. When a **date** type field is specified returned results are biased - * towards field values closer to the current date. When a **number** type field is specified, returned results are - * biased towards higher field values. This parameter cannot be used in the same query as the **sort** parameter. - * @param {boolean} [params.spellingSuggestions] - When `true` and the **natural_language_query** parameter is used, - * the **natural_languge_query** parameter is spell checked. The most likely correction is returned in the - * **suggested_query** field of the response (if one exists). - * - * **Important:** this parameter is only valid when using the Cloud Pak version of Discovery. - * @param {boolean} [params.xWatsonLoggingOptOut] - If `true`, queries are not stored in the Discovery **Logs** - * endpoint. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public query( - params: DiscoveryV1.QueryParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'filter', 'query', 'naturalLanguageQuery', 'passages', 'aggregation', 'count', '_return', 'offset', 'sort', 'highlight', 'passagesFields', 'passagesCount', 'passagesCharacters', 'deduplicate', 'deduplicateField', 'similar', 'similarDocumentIds', 'similarFields', 'bias', 'spellingSuggestions', 'xWatsonLoggingOptOut', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'filter': _params.filter, - 'query': _params.query, - 'natural_language_query': _params.naturalLanguageQuery, - 'passages': _params.passages, - 'aggregation': _params.aggregation, - 'count': _params.count, - 'return': _params._return, - 'offset': _params.offset, - 'sort': _params.sort, - 'highlight': _params.highlight, - 'passages.fields': _params.passagesFields, - 'passages.count': _params.passagesCount, - 'passages.characters': _params.passagesCharacters, - 'deduplicate': _params.deduplicate, - 'deduplicate.field': _params.deduplicateField, - 'similar': _params.similar, - 'similar.document_ids': _params.similarDocumentIds, - 'similar.fields': _params.similarFields, - 'bias': _params.bias, - 'spelling_suggestions': _params.spellingSuggestions, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'query'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/query', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - 'X-Watson-Logging-Opt-Out': _params.xWatsonLoggingOptOut, - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Query system notices. - * - * Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when - * ingesting documents and performing relevance training. See the [Discovery - * documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts) for more details - * on the query language. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} [params.filter] - A cacheable query that excludes documents that don't mention the query content. - * Filter searches are better for metadata-type searches and for assessing the concepts in the data set. - * @param {string} [params.query] - A query search returns all documents in your data set with full enrichments and - * full text, but with the most relevant documents listed first. - * @param {string} [params.naturalLanguageQuery] - A natural language query that returns relevant documents by - * utilizing training data and natural language understanding. - * @param {boolean} [params.passages] - A passages query that returns the most relevant passages from the results. - * @param {string} [params.aggregation] - An aggregation search that returns an exact answer by combining query search - * with filters. Useful for applications to build lists, tables, and time series. For a full list of possible - * aggregations, see the Query reference. - * @param {number} [params.count] - Number of results to return. The maximum for the **count** and **offset** values - * together in any one query is **10000**. - * @param {string[]} [params._return] - A comma-separated list of the portion of the document hierarchy to return. - * @param {number} [params.offset] - The number of query results to skip at the beginning. For example, if the total - * number of results that are returned is 10 and the offset is 8, it returns the last two results. The maximum for the - * **count** and **offset** values together in any one query is **10000**. - * @param {string[]} [params.sort] - A comma-separated list of fields in the document to sort on. You can optionally - * specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the - * default sort direction if no prefix is specified. - * @param {boolean} [params.highlight] - When true, a highlight field is returned for each result which contains the - * fields which match the query with `` tags around the matching query terms. - * @param {string[]} [params.passagesFields] - A comma-separated list of fields that passages are drawn from. If this - * parameter not specified, then all top-level fields are included. - * @param {number} [params.passagesCount] - The maximum number of passages to return. The search returns fewer - * passages if the requested total is not found. - * @param {number} [params.passagesCharacters] - The approximate number of characters that any one passage will have. - * @param {string} [params.deduplicateField] - When specified, duplicate results based on the field specified are - * removed from the returned results. Duplicate comparison is limited to the current query only, **offset** is not - * considered. This parameter is currently Beta functionality. - * @param {boolean} [params.similar] - When `true`, results are returned based on their similarity to the document IDs - * specified in the **similar.document_ids** parameter. - * @param {string[]} [params.similarDocumentIds] - A comma-separated list of document IDs to find similar documents. - * - * **Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search - * with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently applied - * and reduce the scope. - * @param {string[]} [params.similarFields] - A comma-separated list of field names that are used as a basis for - * comparison to identify similar documents. If not specified, the entire document is used for comparison. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public queryNotices( - params: DiscoveryV1.QueryNoticesParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'filter', 'query', 'naturalLanguageQuery', 'passages', 'aggregation', 'count', '_return', 'offset', 'sort', 'highlight', 'passagesFields', 'passagesCount', 'passagesCharacters', 'deduplicateField', 'similar', 'similarDocumentIds', 'similarFields', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'filter': _params.filter, - 'query': _params.query, - 'natural_language_query': _params.naturalLanguageQuery, - 'passages': _params.passages, - 'aggregation': _params.aggregation, - 'count': _params.count, - 'return': _params._return, - 'offset': _params.offset, - 'sort': _params.sort, - 'highlight': _params.highlight, - 'passages.fields': _params.passagesFields, - 'passages.count': _params.passagesCount, - 'passages.characters': _params.passagesCharacters, - 'deduplicate.field': _params.deduplicateField, - 'similar': _params.similar, - 'similar.document_ids': _params.similarDocumentIds, - 'similar.fields': _params.similarFields, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'queryNotices'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/notices', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Query multiple collections. - * - * By using this method, you can construct long queries that search multiple collection. For details, see the - * [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts). - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionIds - A comma-separated list of collection IDs to be queried against. - * @param {string} [params.filter] - A cacheable query that excludes documents that don't mention the query content. - * Filter searches are better for metadata-type searches and for assessing the concepts in the data set. - * @param {string} [params.query] - A query search returns all documents in your data set with full enrichments and - * full text, but with the most relevant documents listed first. Use a query search when you want to find the most - * relevant search results. - * @param {string} [params.naturalLanguageQuery] - A natural language query that returns relevant documents by - * utilizing training data and natural language understanding. - * @param {boolean} [params.passages] - A passages query that returns the most relevant passages from the results. - * @param {string} [params.aggregation] - An aggregation search that returns an exact answer by combining query search - * with filters. Useful for applications to build lists, tables, and time series. For a full list of possible - * aggregations, see the Query reference. - * @param {number} [params.count] - Number of results to return. - * @param {string} [params._return] - A comma-separated list of the portion of the document hierarchy to return. - * @param {number} [params.offset] - The number of query results to skip at the beginning. For example, if the total - * number of results that are returned is 10 and the offset is 8, it returns the last two results. - * @param {string} [params.sort] - A comma-separated list of fields in the document to sort on. You can optionally - * specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the - * default sort direction if no prefix is specified. This parameter cannot be used in the same query as the **bias** - * parameter. - * @param {boolean} [params.highlight] - When true, a highlight field is returned for each result which contains the - * fields which match the query with `` tags around the matching query terms. - * @param {string} [params.passagesFields] - A comma-separated list of fields that passages are drawn from. If this - * parameter not specified, then all top-level fields are included. - * @param {number} [params.passagesCount] - The maximum number of passages to return. The search returns fewer - * passages if the requested total is not found. The default is `10`. The maximum is `100`. - * @param {number} [params.passagesCharacters] - The approximate number of characters that any one passage will have. - * @param {boolean} [params.deduplicate] - When `true`, and used with a Watson Discovery News collection, duplicate - * results (based on the contents of the **title** field) are removed. Duplicate comparison is limited to the current - * query only; **offset** is not considered. This parameter is currently Beta functionality. - * @param {string} [params.deduplicateField] - When specified, duplicate results based on the field specified are - * removed from the returned results. Duplicate comparison is limited to the current query only, **offset** is not - * considered. This parameter is currently Beta functionality. - * @param {boolean} [params.similar] - When `true`, results are returned based on their similarity to the document IDs - * specified in the **similar.document_ids** parameter. - * @param {string} [params.similarDocumentIds] - A comma-separated list of document IDs to find similar documents. - * - * **Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search - * with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently applied - * and reduce the scope. - * @param {string} [params.similarFields] - A comma-separated list of field names that are used as a basis for - * comparison to identify similar documents. If not specified, the entire document is used for comparison. - * @param {string} [params.bias] - Field which the returned results will be biased against. The specified field must - * be either a **date** or **number** format. When a **date** type field is specified returned results are biased - * towards field values closer to the current date. When a **number** type field is specified, returned results are - * biased towards higher field values. This parameter cannot be used in the same query as the **sort** parameter. - * @param {boolean} [params.xWatsonLoggingOptOut] - If `true`, queries are not stored in the Discovery **Logs** - * endpoint. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public federatedQuery( - params: DiscoveryV1.FederatedQueryParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionIds']; - const _validParams = ['environmentId', 'collectionIds', 'filter', 'query', 'naturalLanguageQuery', 'passages', 'aggregation', 'count', '_return', 'offset', 'sort', 'highlight', 'passagesFields', 'passagesCount', 'passagesCharacters', 'deduplicate', 'deduplicateField', 'similar', 'similarDocumentIds', 'similarFields', 'bias', 'xWatsonLoggingOptOut', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'collection_ids': _params.collectionIds, - 'filter': _params.filter, - 'query': _params.query, - 'natural_language_query': _params.naturalLanguageQuery, - 'passages': _params.passages, - 'aggregation': _params.aggregation, - 'count': _params.count, - 'return': _params._return, - 'offset': _params.offset, - 'sort': _params.sort, - 'highlight': _params.highlight, - 'passages.fields': _params.passagesFields, - 'passages.count': _params.passagesCount, - 'passages.characters': _params.passagesCharacters, - 'deduplicate': _params.deduplicate, - 'deduplicate.field': _params.deduplicateField, - 'similar': _params.similar, - 'similar.document_ids': _params.similarDocumentIds, - 'similar.fields': _params.similarFields, - 'bias': _params.bias, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'federatedQuery'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/query', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - 'X-Watson-Logging-Opt-Out': _params.xWatsonLoggingOptOut, - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Query multiple collection system notices. - * - * Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when - * ingesting documents and performing relevance training. See the [Discovery - * documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts) for more details - * on the query language. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string[]} params.collectionIds - A comma-separated list of collection IDs to be queried against. - * @param {string} [params.filter] - A cacheable query that excludes documents that don't mention the query content. - * Filter searches are better for metadata-type searches and for assessing the concepts in the data set. - * @param {string} [params.query] - A query search returns all documents in your data set with full enrichments and - * full text, but with the most relevant documents listed first. - * @param {string} [params.naturalLanguageQuery] - A natural language query that returns relevant documents by - * utilizing training data and natural language understanding. - * @param {string} [params.aggregation] - An aggregation search that returns an exact answer by combining query search - * with filters. Useful for applications to build lists, tables, and time series. For a full list of possible - * aggregations, see the Query reference. - * @param {number} [params.count] - Number of results to return. The maximum for the **count** and **offset** values - * together in any one query is **10000**. - * @param {string[]} [params._return] - A comma-separated list of the portion of the document hierarchy to return. - * @param {number} [params.offset] - The number of query results to skip at the beginning. For example, if the total - * number of results that are returned is 10 and the offset is 8, it returns the last two results. The maximum for the - * **count** and **offset** values together in any one query is **10000**. - * @param {string[]} [params.sort] - A comma-separated list of fields in the document to sort on. You can optionally - * specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the - * default sort direction if no prefix is specified. - * @param {boolean} [params.highlight] - When true, a highlight field is returned for each result which contains the - * fields which match the query with `` tags around the matching query terms. - * @param {string} [params.deduplicateField] - When specified, duplicate results based on the field specified are - * removed from the returned results. Duplicate comparison is limited to the current query only, **offset** is not - * considered. This parameter is currently Beta functionality. - * @param {boolean} [params.similar] - When `true`, results are returned based on their similarity to the document IDs - * specified in the **similar.document_ids** parameter. - * @param {string[]} [params.similarDocumentIds] - A comma-separated list of document IDs to find similar documents. - * - * **Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search - * with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently applied - * and reduce the scope. - * @param {string[]} [params.similarFields] - A comma-separated list of field names that are used as a basis for - * comparison to identify similar documents. If not specified, the entire document is used for comparison. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public federatedQueryNotices( - params: DiscoveryV1.FederatedQueryNoticesParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionIds']; - const _validParams = ['environmentId', 'collectionIds', 'filter', 'query', 'naturalLanguageQuery', 'aggregation', 'count', '_return', 'offset', 'sort', 'highlight', 'deduplicateField', 'similar', 'similarDocumentIds', 'similarFields', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'collection_ids': _params.collectionIds, - 'filter': _params.filter, - 'query': _params.query, - 'natural_language_query': _params.naturalLanguageQuery, - 'aggregation': _params.aggregation, - 'count': _params.count, - 'return': _params._return, - 'offset': _params.offset, - 'sort': _params.sort, - 'highlight': _params.highlight, - 'deduplicate.field': _params.deduplicateField, - 'similar': _params.similar, - 'similar.document_ids': _params.similarDocumentIds, - 'similar.fields': _params.similarFields, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'federatedQueryNotices'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/notices', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get Autocomplete Suggestions. - * - * Returns completion query suggestions for the specified prefix. /n/n **Important:** this method is only valid when - * using the Cloud Pak version of Discovery. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.prefix - The prefix to use for autocompletion. For example, the prefix `Ho` could - * autocomplete to `hot`, `housing`, or `how`. - * @param {string} [params.field] - The field in the result documents that autocompletion suggestions are identified - * from. - * @param {number} [params.count] - The number of autocompletion suggestions to return. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getAutocompletion( - params: DiscoveryV1.GetAutocompletionParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'prefix']; - const _validParams = ['environmentId', 'collectionId', 'prefix', 'field', 'count', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'prefix': _params.prefix, - 'field': _params.field, - 'count': _params.count, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getAutocompletion'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/autocompletion', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * trainingData - ************************/ - - /** - * List training data. - * - * Lists the training data for the specified collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listTrainingData( - params: DiscoveryV1.ListTrainingDataParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listTrainingData'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Add query to training data. - * - * Adds a query to the training data for this collection. The query can contain a filter and natural language query. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} [params.naturalLanguageQuery] - The natural text query for the new training query. - * @param {string} [params.filter] - The filter used on the collection before the **natural_language_query** is - * applied. - * @param {TrainingExample[]} [params.examples] - Array of training examples. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public addTrainingData( - params: DiscoveryV1.AddTrainingDataParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'naturalLanguageQuery', 'filter', 'examples', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'natural_language_query': _params.naturalLanguageQuery, - 'filter': _params.filter, - 'examples': _params.examples, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'addTrainingData'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete all training data. - * - * Deletes all training data from a collection. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteAllTrainingData( - params: DiscoveryV1.DeleteAllTrainingDataParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId']; - const _validParams = ['environmentId', 'collectionId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteAllTrainingData'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get details about a query. - * - * Gets details for a specific training data query, including the query string and all examples. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.queryId - The ID of the query used for training. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getTrainingData( - params: DiscoveryV1.GetTrainingDataParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'queryId']; - const _validParams = ['environmentId', 'collectionId', 'queryId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'query_id': _params.queryId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getTrainingData'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete a training data query. - * - * Removes the training data query and all associated examples from the training data set. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.queryId - The ID of the query used for training. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteTrainingData( - params: DiscoveryV1.DeleteTrainingDataParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'queryId']; - const _validParams = ['environmentId', 'collectionId', 'queryId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'query_id': _params.queryId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTrainingData'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * List examples for a training data query. - * - * List all examples for this training data query. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.queryId - The ID of the query used for training. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listTrainingExamples( - params: DiscoveryV1.ListTrainingExamplesParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'queryId']; - const _validParams = ['environmentId', 'collectionId', 'queryId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'query_id': _params.queryId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listTrainingExamples'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Add example to training data query. - * - * Adds a example to this training data query. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.queryId - The ID of the query used for training. - * @param {string} [params.documentId] - The document ID associated with this training example. - * @param {string} [params.crossReference] - The cross reference associated with this training example. - * @param {number} [params.relevance] - The relevance of the training example. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createTrainingExample( - params: DiscoveryV1.CreateTrainingExampleParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'queryId']; - const _validParams = ['environmentId', 'collectionId', 'queryId', 'documentId', 'crossReference', 'relevance', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'document_id': _params.documentId, - 'cross_reference': _params.crossReference, - 'relevance': _params.relevance, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'query_id': _params.queryId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createTrainingExample'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete example for training data query. - * - * Deletes the example document with the given ID from the training data query. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.queryId - The ID of the query used for training. - * @param {string} params.exampleId - The ID of the document as it is indexed. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteTrainingExample( - params: DiscoveryV1.DeleteTrainingExampleParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'queryId', 'exampleId']; - const _validParams = ['environmentId', 'collectionId', 'queryId', 'exampleId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'query_id': _params.queryId, - 'example_id': _params.exampleId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTrainingExample'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Change label or cross reference for example. - * - * Changes the label or cross reference query for this training data example. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.queryId - The ID of the query used for training. - * @param {string} params.exampleId - The ID of the document as it is indexed. - * @param {string} [params.crossReference] - The example to add. - * @param {number} [params.relevance] - The relevance value for this example. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public updateTrainingExample( - params: DiscoveryV1.UpdateTrainingExampleParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'queryId', 'exampleId']; - const _validParams = ['environmentId', 'collectionId', 'queryId', 'exampleId', 'crossReference', 'relevance', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'cross_reference': _params.crossReference, - 'relevance': _params.relevance, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'query_id': _params.queryId, - 'example_id': _params.exampleId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTrainingExample'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}', - method: 'PUT', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get details for training data example. - * - * Gets the details for this training example. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.collectionId - The ID of the collection. - * @param {string} params.queryId - The ID of the query used for training. - * @param {string} params.exampleId - The ID of the document as it is indexed. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getTrainingExample( - params: DiscoveryV1.GetTrainingExampleParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'collectionId', 'queryId', 'exampleId']; - const _validParams = ['environmentId', 'collectionId', 'queryId', 'exampleId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'collection_id': _params.collectionId, - 'query_id': _params.queryId, - 'example_id': _params.exampleId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getTrainingExample'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * userData - ************************/ - - /** - * Delete labeled data. - * - * Deletes all data associated with a specified customer ID. The method has no effect if no data is associated with - * the customer ID. - * - * You associate a customer ID with data by passing the **X-Watson-Metadata** header with a request that passes data. - * For more information about personal data and customer IDs, see [Information - * security](https://cloud.ibm.com/docs/discovery?topic=discovery-information-security#information-security). - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.customerId - The customer ID for which all data is to be deleted. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteUserData( - params: DiscoveryV1.DeleteUserDataParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['customerId']; - const _validParams = ['customerId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'customer_id': _params.customerId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteUserData'); - - const parameters = { - options: { - url: '/v1/user_data', - method: 'DELETE', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * eventsAndFeedback - ************************/ - - /** - * Create event. - * - * The **Events** API can be used to create log entries that are associated with specific queries. For example, you - * can record which documents in the results set were "clicked" by a user and when that click occurred. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.type - The event type to be created. - * @param {EventData} params.data - Query event data object. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createEvent( - params: DiscoveryV1.CreateEventParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['type', 'data']; - const _validParams = ['type', 'data', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'type': _params.type, - 'data': _params.data, - }; - - const query = { - 'version': this.version, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createEvent'); - - const parameters = { - options: { - url: '/v1/events', - method: 'POST', - body, - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Search the query and event log. - * - * Searches the query and event log to find query sessions that match the specified criteria. Searching the **logs** - * endpoint uses the standard Discovery query syntax for the parameters that are supported. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {string} [params.filter] - A cacheable query that excludes documents that don't mention the query content. - * Filter searches are better for metadata-type searches and for assessing the concepts in the data set. - * @param {string} [params.query] - A query search returns all documents in your data set with full enrichments and - * full text, but with the most relevant documents listed first. - * @param {number} [params.count] - Number of results to return. The maximum for the **count** and **offset** values - * together in any one query is **10000**. - * @param {number} [params.offset] - The number of query results to skip at the beginning. For example, if the total - * number of results that are returned is 10 and the offset is 8, it returns the last two results. The maximum for the - * **count** and **offset** values together in any one query is **10000**. - * @param {string[]} [params.sort] - A comma-separated list of fields in the document to sort on. You can optionally - * specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the - * default sort direction if no prefix is specified. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public queryLog( - params?: DiscoveryV1.QueryLogParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['filter', 'query', 'count', 'offset', 'sort', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'filter': _params.filter, - 'query': _params.query, - 'count': _params.count, - 'offset': _params.offset, - 'sort': _params.sort, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'queryLog'); - - const parameters = { - options: { - url: '/v1/logs', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Number of queries over time. - * - * Total number of queries using the **natural_language_query** parameter over a specific time window. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {string} [params.startTime] - Metric is computed from data recorded after this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * @param {string} [params.endTime] - Metric is computed from data recorded before this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * @param {string} [params.resultType] - The type of result to consider when calculating the metric. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getMetricsQuery( - params?: DiscoveryV1.GetMetricsQueryParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['startTime', 'endTime', 'resultType', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'start_time': _params.startTime, - 'end_time': _params.endTime, - 'result_type': _params.resultType, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getMetricsQuery'); - - const parameters = { - options: { - url: '/v1/metrics/number_of_queries', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Number of queries with an event over time. - * - * Total number of queries using the **natural_language_query** parameter that have a corresponding "click" event over - * a specified time window. This metric requires having integrated event tracking in your application using the - * **Events** API. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {string} [params.startTime] - Metric is computed from data recorded after this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * @param {string} [params.endTime] - Metric is computed from data recorded before this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * @param {string} [params.resultType] - The type of result to consider when calculating the metric. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getMetricsQueryEvent( - params?: DiscoveryV1.GetMetricsQueryEventParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['startTime', 'endTime', 'resultType', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'start_time': _params.startTime, - 'end_time': _params.endTime, - 'result_type': _params.resultType, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getMetricsQueryEvent'); - - const parameters = { - options: { - url: '/v1/metrics/number_of_queries_with_event', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Number of queries with no search results over time. - * - * Total number of queries using the **natural_language_query** parameter that have no results returned over a - * specified time window. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {string} [params.startTime] - Metric is computed from data recorded after this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * @param {string} [params.endTime] - Metric is computed from data recorded before this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * @param {string} [params.resultType] - The type of result to consider when calculating the metric. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getMetricsQueryNoResults( - params?: DiscoveryV1.GetMetricsQueryNoResultsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['startTime', 'endTime', 'resultType', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'start_time': _params.startTime, - 'end_time': _params.endTime, - 'result_type': _params.resultType, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getMetricsQueryNoResults'); - - const parameters = { - options: { - url: '/v1/metrics/number_of_queries_with_no_search_results', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Percentage of queries with an associated event. - * - * The percentage of queries using the **natural_language_query** parameter that have a corresponding "click" event - * over a specified time window. This metric requires having integrated event tracking in your application using the - * **Events** API. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {string} [params.startTime] - Metric is computed from data recorded after this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * @param {string} [params.endTime] - Metric is computed from data recorded before this timestamp; must be in - * `YYYY-MM-DDThh:mm:ssZ` format. - * @param {string} [params.resultType] - The type of result to consider when calculating the metric. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getMetricsEventRate( - params?: DiscoveryV1.GetMetricsEventRateParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['startTime', 'endTime', 'resultType', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'start_time': _params.startTime, - 'end_time': _params.endTime, - 'result_type': _params.resultType, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getMetricsEventRate'); - - const parameters = { - options: { - url: '/v1/metrics/event_rate', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Most frequent query tokens with an event. - * - * The most frequent query tokens parsed from the **natural_language_query** parameter and their corresponding "click" - * event rate within the recording period (queries and events are stored for 30 days). A query token is an individual - * word or unigram within the query string. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {number} [params.count] - Number of results to return. The maximum for the **count** and **offset** values - * together in any one query is **10000**. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getMetricsQueryTokenEvent( - params?: DiscoveryV1.GetMetricsQueryTokenEventParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['count', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'count': _params.count, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getMetricsQueryTokenEvent'); - - const parameters = { - options: { - url: '/v1/metrics/top_query_tokens_with_event_rate', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * credentials - ************************/ - - /** - * List credentials. - * - * List all the source credentials that have been created for this service instance. - * - * **Note:** All credentials are sent over an encrypted connection and encrypted at rest. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listCredentials( - params: DiscoveryV1.ListCredentialsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listCredentials'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/credentials', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Create credentials. - * - * Creates a set of credentials to connect to a remote source. Created credentials are used in a configuration to - * associate a collection with the remote source. - * - * **Note:** All credentials are sent over an encrypted connection and encrypted at rest. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} [params.sourceType] - The source that this credentials object connects to. - * - `box` indicates the credentials are used to connect an instance of Enterprise Box. - * - `salesforce` indicates the credentials are used to connect to Salesforce. - * - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online. - * - `web_crawl` indicates the credentials are used to perform a web crawl. - * = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store. - * @param {CredentialDetails} [params.credentialDetails] - Object containing details of the stored credentials. - * - * Obtain credentials for your source from the administrator of the source. - * @param {StatusDetails} [params.status] - Object that contains details about the status of the authentication - * process. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createCredentials( - params: DiscoveryV1.CreateCredentialsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'sourceType', 'credentialDetails', 'status', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'source_type': _params.sourceType, - 'credential_details': _params.credentialDetails, - 'status': _params.status, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createCredentials'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/credentials', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * View Credentials. - * - * Returns details about the specified credentials. - * - * **Note:** Secure credential information such as a password or SSH key is never returned and must be obtained from - * the source system. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.credentialId - The unique identifier for a set of source credentials. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getCredentials( - params: DiscoveryV1.GetCredentialsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'credentialId']; - const _validParams = ['environmentId', 'credentialId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'credential_id': _params.credentialId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getCredentials'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/credentials/{credential_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Update credentials. - * - * Updates an existing set of source credentials. - * - * **Note:** All credentials are sent over an encrypted connection and encrypted at rest. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.credentialId - The unique identifier for a set of source credentials. - * @param {string} [params.sourceType] - The source that this credentials object connects to. - * - `box` indicates the credentials are used to connect an instance of Enterprise Box. - * - `salesforce` indicates the credentials are used to connect to Salesforce. - * - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online. - * - `web_crawl` indicates the credentials are used to perform a web crawl. - * = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store. - * @param {CredentialDetails} [params.credentialDetails] - Object containing details of the stored credentials. - * - * Obtain credentials for your source from the administrator of the source. - * @param {StatusDetails} [params.status] - Object that contains details about the status of the authentication - * process. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public updateCredentials( - params: DiscoveryV1.UpdateCredentialsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'credentialId']; - const _validParams = ['environmentId', 'credentialId', 'sourceType', 'credentialDetails', 'status', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'source_type': _params.sourceType, - 'credential_details': _params.credentialDetails, - 'status': _params.status, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'credential_id': _params.credentialId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'updateCredentials'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/credentials/{credential_id}', - method: 'PUT', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete credentials. - * - * Deletes a set of stored credentials from your Discovery instance. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.credentialId - The unique identifier for a set of source credentials. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteCredentials( - params: DiscoveryV1.DeleteCredentialsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'credentialId']; - const _validParams = ['environmentId', 'credentialId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'credential_id': _params.credentialId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteCredentials'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/credentials/{credential_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * gatewayConfiguration - ************************/ - - /** - * List Gateways. - * - * List the currently configured gateways. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listGateways( - params: DiscoveryV1.ListGatewaysParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'listGateways'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/gateways', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Create Gateway. - * - * Create a gateway configuration to use with a remotely installed gateway. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} [params.name] - User-defined name. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createGateway( - params: DiscoveryV1.CreateGatewayParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId']; - const _validParams = ['environmentId', 'name', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'name': _params.name, - }; - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'createGateway'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/gateways', - method: 'POST', - body, - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * List Gateway Details. - * - * List information about the specified gateway. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.gatewayId - The requested gateway ID. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getGateway( - params: DiscoveryV1.GetGatewayParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'gatewayId']; - const _validParams = ['environmentId', 'gatewayId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'gateway_id': _params.gatewayId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'getGateway'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/gateways/{gateway_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete Gateway. - * - * Delete the specified gateway configuration. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.environmentId - The ID of the environment. - * @param {string} params.gatewayId - The requested gateway ID. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteGateway( - params: DiscoveryV1.DeleteGatewayParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['environmentId', 'gatewayId']; - const _validParams = ['environmentId', 'gatewayId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'environment_id': _params.environmentId, - 'gateway_id': _params.gatewayId, - }; - - const sdkHeaders = getSdkHeaders(DiscoveryV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteGateway'); - - const parameters = { - options: { - url: '/v1/environments/{environment_id}/gateways/{gateway_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } -} - -/************************* - * interfaces - ************************/ - -namespace DiscoveryV1 { - /** Options for the `DiscoveryV1` constructor. */ - export interface Options extends UserOptions { - /** Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current - * version is `2019-04-30`. - */ - version: string; - } - - /** An operation response. */ - export interface Response { - result: T; - status: number; - statusText: string; - headers: IncomingHttpHeaders; - } - - /** The callback for a service request. */ - export type Callback = (error: any, response?: Response) => void; - - /** The body of a service request that returns no response data. */ - export interface EmptyObject {} - - /** A standard JS object, defined to avoid the limitations of `Object` and `object` */ - export interface JsonObject { - [key: string]: any; - } - - /************************* - * request interfaces - ************************/ - - /** Parameters for the `createEnvironment` operation. */ - export interface CreateEnvironmentParams { - /** Name that identifies the environment. */ - name: string; - /** Description of the environment. */ - description?: string; - /** Size of the environment. In the Lite plan the default and only accepted value is `LT`, in all other plans - * the default is `S`. - */ - size?: CreateEnvironmentConstants.Size | string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `createEnvironment` operation. */ - export namespace CreateEnvironmentConstants { - /** Size of the environment. In the Lite plan the default and only accepted value is `LT`, in all other plans the default is `S`. */ - export enum Size { - LT = 'LT', - XS = 'XS', - S = 'S', - MS = 'MS', - M = 'M', - ML = 'ML', - L = 'L', - XL = 'XL', - XXL = 'XXL', - XXXL = 'XXXL', - } - } - - /** Parameters for the `listEnvironments` operation. */ - export interface ListEnvironmentsParams { - /** Show only the environment with the given name. */ - name?: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getEnvironment` operation. */ - export interface GetEnvironmentParams { - /** The ID of the environment. */ - environmentId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `updateEnvironment` operation. */ - export interface UpdateEnvironmentParams { - /** The ID of the environment. */ - environmentId: string; - /** Name that identifies the environment. */ - name?: string; - /** Description of the environment. */ - description?: string; - /** Size to change the environment to. **Note:** Lite plan users cannot change the environment size. */ - size?: UpdateEnvironmentConstants.Size | string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `updateEnvironment` operation. */ - export namespace UpdateEnvironmentConstants { - /** Size to change the environment to. **Note:** Lite plan users cannot change the environment size. */ - export enum Size { - S = 'S', - MS = 'MS', - M = 'M', - ML = 'ML', - L = 'L', - XL = 'XL', - XXL = 'XXL', - XXXL = 'XXXL', - } - } - - /** Parameters for the `deleteEnvironment` operation. */ - export interface DeleteEnvironmentParams { - /** The ID of the environment. */ - environmentId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listFields` operation. */ - export interface ListFieldsParams { - /** The ID of the environment. */ - environmentId: string; - /** A comma-separated list of collection IDs to be queried against. */ - collectionIds: string[]; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createConfiguration` operation. */ - export interface CreateConfigurationParams { - /** The ID of the environment. */ - environmentId: string; - /** The name of the configuration. */ - name: string; - /** The description of the configuration, if available. */ - description?: string; - /** Document conversion settings. */ - conversions?: Conversions; - /** An array of document enrichment settings for the configuration. */ - enrichments?: Enrichment[]; - /** Defines operations that can be used to transform the final output JSON into a normalized form. Operations - * are executed in the order that they appear in the array. - */ - normalizations?: NormalizationOperation[]; - /** Object containing source parameters for the configuration. */ - source?: Source; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listConfigurations` operation. */ - export interface ListConfigurationsParams { - /** The ID of the environment. */ - environmentId: string; - /** Find configurations with the given name. */ - name?: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getConfiguration` operation. */ - export interface GetConfigurationParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the configuration. */ - configurationId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `updateConfiguration` operation. */ - export interface UpdateConfigurationParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the configuration. */ - configurationId: string; - /** The name of the configuration. */ - name: string; - /** The description of the configuration, if available. */ - description?: string; - /** Document conversion settings. */ - conversions?: Conversions; - /** An array of document enrichment settings for the configuration. */ - enrichments?: Enrichment[]; - /** Defines operations that can be used to transform the final output JSON into a normalized form. Operations - * are executed in the order that they appear in the array. - */ - normalizations?: NormalizationOperation[]; - /** Object containing source parameters for the configuration. */ - source?: Source; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteConfiguration` operation. */ - export interface DeleteConfigurationParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the configuration. */ - configurationId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createCollection` operation. */ - export interface CreateCollectionParams { - /** The ID of the environment. */ - environmentId: string; - /** The name of the collection to be created. */ - name: string; - /** A description of the collection. */ - description?: string; - /** The ID of the configuration in which the collection is to be created. */ - configurationId?: string; - /** The language of the documents stored in the collection, in the form of an ISO 639-1 language code. */ - language?: CreateCollectionConstants.Language | string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `createCollection` operation. */ - export namespace CreateCollectionConstants { - /** The language of the documents stored in the collection, in the form of an ISO 639-1 language code. */ - export enum Language { - EN = 'en', - ES = 'es', - DE = 'de', - AR = 'ar', - FR = 'fr', - IT = 'it', - JA = 'ja', - KO = 'ko', - PT = 'pt', - NL = 'nl', - ZH_CN = 'zh-CN', - } - } - - /** Parameters for the `listCollections` operation. */ - export interface ListCollectionsParams { - /** The ID of the environment. */ - environmentId: string; - /** Find collections with the given name. */ - name?: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getCollection` operation. */ - export interface GetCollectionParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `updateCollection` operation. */ - export interface UpdateCollectionParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The name of the collection. */ - name: string; - /** A description of the collection. */ - description?: string; - /** The ID of the configuration in which the collection is to be updated. */ - configurationId?: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteCollection` operation. */ - export interface DeleteCollectionParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listCollectionFields` operation. */ - export interface ListCollectionFieldsParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listExpansions` operation. */ - export interface ListExpansionsParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createExpansions` operation. */ - export interface CreateExpansionsParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** An array of query expansion definitions. - * - * Each object in the **expansions** array represents a term or set of terms that will be expanded into other - * terms. Each expansion object can be configured as bidirectional or unidirectional. Bidirectional means that all - * terms are expanded to all other terms in the object. Unidirectional means that a set list of terms can be - * expanded into a second list of terms. - * - * To create a bi-directional expansion specify an **expanded_terms** array. When found in a query, all items in - * the **expanded_terms** array are then expanded to the other items in the same array. - * - * To create a uni-directional expansion, specify both an array of **input_terms** and an array of - * **expanded_terms**. When items in the **input_terms** array are present in a query, they are expanded using the - * items listed in the **expanded_terms** array. - */ - expansions: Expansion[]; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteExpansions` operation. */ - export interface DeleteExpansionsParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getTokenizationDictionaryStatus` operation. */ - export interface GetTokenizationDictionaryStatusParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createTokenizationDictionary` operation. */ - export interface CreateTokenizationDictionaryParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** An array of tokenization rules. Each rule contains, the original `text` string, component `tokens`, any - * alternate character set `readings`, and which `part_of_speech` the text is from. - */ - tokenizationRules?: TokenDictRule[]; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteTokenizationDictionary` operation. */ - export interface DeleteTokenizationDictionaryParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getStopwordListStatus` operation. */ - export interface GetStopwordListStatusParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createStopwordList` operation. */ - export interface CreateStopwordListParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The content of the stopword list to ingest. */ - stopwordFile: NodeJS.ReadableStream | Buffer; - /** The filename for stopwordFile. */ - stopwordFilename: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteStopwordList` operation. */ - export interface DeleteStopwordListParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `addDocument` operation. */ - export interface AddDocumentParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The content of the document to ingest. The maximum supported file size when adding a file to a collection is - * 50 megabytes, the maximum supported file size when testing a configuration is 1 megabyte. Files larger than the - * supported size are rejected. - */ - file?: NodeJS.ReadableStream | Buffer; - /** The filename for file. */ - filename?: string; - /** The content type of file. */ - fileContentType?: AddDocumentConstants.FileContentType | string; - /** The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: - * ``` { - * "Creator": "Johnny Appleseed", - * "Subject": "Apples" - * } ```. - */ - metadata?: string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `addDocument` operation. */ - export namespace AddDocumentConstants { - /** The content type of file. */ - export enum FileContentType { - APPLICATION_JSON = 'application/json', - APPLICATION_MSWORD = 'application/msword', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - APPLICATION_PDF = 'application/pdf', - TEXT_HTML = 'text/html', - APPLICATION_XHTML_XML = 'application/xhtml+xml', - } - } - - /** Parameters for the `getDocumentStatus` operation. */ - export interface GetDocumentStatusParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the document. */ - documentId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `updateDocument` operation. */ - export interface UpdateDocumentParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the document. */ - documentId: string; - /** The content of the document to ingest. The maximum supported file size when adding a file to a collection is - * 50 megabytes, the maximum supported file size when testing a configuration is 1 megabyte. Files larger than the - * supported size are rejected. - */ - file?: NodeJS.ReadableStream | Buffer; - /** The filename for file. */ - filename?: string; - /** The content type of file. */ - fileContentType?: UpdateDocumentConstants.FileContentType | string; - /** The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: - * ``` { - * "Creator": "Johnny Appleseed", - * "Subject": "Apples" - * } ```. - */ - metadata?: string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `updateDocument` operation. */ - export namespace UpdateDocumentConstants { - /** The content type of file. */ - export enum FileContentType { - APPLICATION_JSON = 'application/json', - APPLICATION_MSWORD = 'application/msword', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - APPLICATION_PDF = 'application/pdf', - TEXT_HTML = 'text/html', - APPLICATION_XHTML_XML = 'application/xhtml+xml', - } - } - - /** Parameters for the `deleteDocument` operation. */ - export interface DeleteDocumentParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the document. */ - documentId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `query` operation. */ - export interface QueryParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** A cacheable query that excludes documents that don't mention the query content. Filter searches are better - * for metadata-type searches and for assessing the concepts in the data set. - */ - filter?: string; - /** A query search returns all documents in your data set with full enrichments and full text, but with the most - * relevant documents listed first. Use a query search when you want to find the most relevant search results. - */ - query?: string; - /** A natural language query that returns relevant documents by utilizing training data and natural language - * understanding. - */ - naturalLanguageQuery?: string; - /** A passages query that returns the most relevant passages from the results. */ - passages?: boolean; - /** An aggregation search that returns an exact answer by combining query search with filters. Useful for - * applications to build lists, tables, and time series. For a full list of possible aggregations, see the Query - * reference. - */ - aggregation?: string; - /** Number of results to return. */ - count?: number; - /** A comma-separated list of the portion of the document hierarchy to return. */ - _return?: string; - /** The number of query results to skip at the beginning. For example, if the total number of results that are - * returned is 10 and the offset is 8, it returns the last two results. - */ - offset?: number; - /** A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by - * prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no - * prefix is specified. This parameter cannot be used in the same query as the **bias** parameter. - */ - sort?: string; - /** When true, a highlight field is returned for each result which contains the fields which match the query - * with `` tags around the matching query terms. - */ - highlight?: boolean; - /** A comma-separated list of fields that passages are drawn from. If this parameter not specified, then all - * top-level fields are included. - */ - passagesFields?: string; - /** The maximum number of passages to return. The search returns fewer passages if the requested total is not - * found. The default is `10`. The maximum is `100`. - */ - passagesCount?: number; - /** The approximate number of characters that any one passage will have. */ - passagesCharacters?: number; - /** When `true`, and used with a Watson Discovery News collection, duplicate results (based on the contents of - * the **title** field) are removed. Duplicate comparison is limited to the current query only; **offset** is not - * considered. This parameter is currently Beta functionality. - */ - deduplicate?: boolean; - /** When specified, duplicate results based on the field specified are removed from the returned results. - * Duplicate comparison is limited to the current query only, **offset** is not considered. This parameter is - * currently Beta functionality. - */ - deduplicateField?: string; - /** When `true`, results are returned based on their similarity to the document IDs specified in the - * **similar.document_ids** parameter. - */ - similar?: boolean; - /** A comma-separated list of document IDs to find similar documents. - * - * **Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search - * with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently - * applied and reduce the scope. - */ - similarDocumentIds?: string; - /** A comma-separated list of field names that are used as a basis for comparison to identify similar documents. - * If not specified, the entire document is used for comparison. - */ - similarFields?: string; - /** Field which the returned results will be biased against. The specified field must be either a **date** or - * **number** format. When a **date** type field is specified returned results are biased towards field values - * closer to the current date. When a **number** type field is specified, returned results are biased towards - * higher field values. This parameter cannot be used in the same query as the **sort** parameter. - */ - bias?: string; - /** When `true` and the **natural_language_query** parameter is used, the **natural_languge_query** parameter is - * spell checked. The most likely correction is returned in the **suggested_query** field of the response (if one - * exists). - * - * **Important:** this parameter is only valid when using the Cloud Pak version of Discovery. - */ - spellingSuggestions?: boolean; - /** If `true`, queries are not stored in the Discovery **Logs** endpoint. */ - xWatsonLoggingOptOut?: boolean; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `queryNotices` operation. */ - export interface QueryNoticesParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** A cacheable query that excludes documents that don't mention the query content. Filter searches are better - * for metadata-type searches and for assessing the concepts in the data set. - */ - filter?: string; - /** A query search returns all documents in your data set with full enrichments and full text, but with the most - * relevant documents listed first. - */ - query?: string; - /** A natural language query that returns relevant documents by utilizing training data and natural language - * understanding. - */ - naturalLanguageQuery?: string; - /** A passages query that returns the most relevant passages from the results. */ - passages?: boolean; - /** An aggregation search that returns an exact answer by combining query search with filters. Useful for - * applications to build lists, tables, and time series. For a full list of possible aggregations, see the Query - * reference. - */ - aggregation?: string; - /** Number of results to return. The maximum for the **count** and **offset** values together in any one query - * is **10000**. - */ - count?: number; - /** A comma-separated list of the portion of the document hierarchy to return. */ - _return?: string[]; - /** The number of query results to skip at the beginning. For example, if the total number of results that are - * returned is 10 and the offset is 8, it returns the last two results. The maximum for the **count** and - * **offset** values together in any one query is **10000**. - */ - offset?: number; - /** A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by - * prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no - * prefix is specified. - */ - sort?: string[]; - /** When true, a highlight field is returned for each result which contains the fields which match the query - * with `` tags around the matching query terms. - */ - highlight?: boolean; - /** A comma-separated list of fields that passages are drawn from. If this parameter not specified, then all - * top-level fields are included. - */ - passagesFields?: string[]; - /** The maximum number of passages to return. The search returns fewer passages if the requested total is not - * found. - */ - passagesCount?: number; - /** The approximate number of characters that any one passage will have. */ - passagesCharacters?: number; - /** When specified, duplicate results based on the field specified are removed from the returned results. - * Duplicate comparison is limited to the current query only, **offset** is not considered. This parameter is - * currently Beta functionality. - */ - deduplicateField?: string; - /** When `true`, results are returned based on their similarity to the document IDs specified in the - * **similar.document_ids** parameter. - */ - similar?: boolean; - /** A comma-separated list of document IDs to find similar documents. - * - * **Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search - * with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently - * applied and reduce the scope. - */ - similarDocumentIds?: string[]; - /** A comma-separated list of field names that are used as a basis for comparison to identify similar documents. - * If not specified, the entire document is used for comparison. - */ - similarFields?: string[]; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `federatedQuery` operation. */ - export interface FederatedQueryParams { - /** The ID of the environment. */ - environmentId: string; - /** A comma-separated list of collection IDs to be queried against. */ - collectionIds: string; - /** A cacheable query that excludes documents that don't mention the query content. Filter searches are better - * for metadata-type searches and for assessing the concepts in the data set. - */ - filter?: string; - /** A query search returns all documents in your data set with full enrichments and full text, but with the most - * relevant documents listed first. Use a query search when you want to find the most relevant search results. - */ - query?: string; - /** A natural language query that returns relevant documents by utilizing training data and natural language - * understanding. - */ - naturalLanguageQuery?: string; - /** A passages query that returns the most relevant passages from the results. */ - passages?: boolean; - /** An aggregation search that returns an exact answer by combining query search with filters. Useful for - * applications to build lists, tables, and time series. For a full list of possible aggregations, see the Query - * reference. - */ - aggregation?: string; - /** Number of results to return. */ - count?: number; - /** A comma-separated list of the portion of the document hierarchy to return. */ - _return?: string; - /** The number of query results to skip at the beginning. For example, if the total number of results that are - * returned is 10 and the offset is 8, it returns the last two results. - */ - offset?: number; - /** A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by - * prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no - * prefix is specified. This parameter cannot be used in the same query as the **bias** parameter. - */ - sort?: string; - /** When true, a highlight field is returned for each result which contains the fields which match the query - * with `` tags around the matching query terms. - */ - highlight?: boolean; - /** A comma-separated list of fields that passages are drawn from. If this parameter not specified, then all - * top-level fields are included. - */ - passagesFields?: string; - /** The maximum number of passages to return. The search returns fewer passages if the requested total is not - * found. The default is `10`. The maximum is `100`. - */ - passagesCount?: number; - /** The approximate number of characters that any one passage will have. */ - passagesCharacters?: number; - /** When `true`, and used with a Watson Discovery News collection, duplicate results (based on the contents of - * the **title** field) are removed. Duplicate comparison is limited to the current query only; **offset** is not - * considered. This parameter is currently Beta functionality. - */ - deduplicate?: boolean; - /** When specified, duplicate results based on the field specified are removed from the returned results. - * Duplicate comparison is limited to the current query only, **offset** is not considered. This parameter is - * currently Beta functionality. - */ - deduplicateField?: string; - /** When `true`, results are returned based on their similarity to the document IDs specified in the - * **similar.document_ids** parameter. - */ - similar?: boolean; - /** A comma-separated list of document IDs to find similar documents. - * - * **Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search - * with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently - * applied and reduce the scope. - */ - similarDocumentIds?: string; - /** A comma-separated list of field names that are used as a basis for comparison to identify similar documents. - * If not specified, the entire document is used for comparison. - */ - similarFields?: string; - /** Field which the returned results will be biased against. The specified field must be either a **date** or - * **number** format. When a **date** type field is specified returned results are biased towards field values - * closer to the current date. When a **number** type field is specified, returned results are biased towards - * higher field values. This parameter cannot be used in the same query as the **sort** parameter. - */ - bias?: string; - /** If `true`, queries are not stored in the Discovery **Logs** endpoint. */ - xWatsonLoggingOptOut?: boolean; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `federatedQueryNotices` operation. */ - export interface FederatedQueryNoticesParams { - /** The ID of the environment. */ - environmentId: string; - /** A comma-separated list of collection IDs to be queried against. */ - collectionIds: string[]; - /** A cacheable query that excludes documents that don't mention the query content. Filter searches are better - * for metadata-type searches and for assessing the concepts in the data set. - */ - filter?: string; - /** A query search returns all documents in your data set with full enrichments and full text, but with the most - * relevant documents listed first. - */ - query?: string; - /** A natural language query that returns relevant documents by utilizing training data and natural language - * understanding. - */ - naturalLanguageQuery?: string; - /** An aggregation search that returns an exact answer by combining query search with filters. Useful for - * applications to build lists, tables, and time series. For a full list of possible aggregations, see the Query - * reference. - */ - aggregation?: string; - /** Number of results to return. The maximum for the **count** and **offset** values together in any one query - * is **10000**. - */ - count?: number; - /** A comma-separated list of the portion of the document hierarchy to return. */ - _return?: string[]; - /** The number of query results to skip at the beginning. For example, if the total number of results that are - * returned is 10 and the offset is 8, it returns the last two results. The maximum for the **count** and - * **offset** values together in any one query is **10000**. - */ - offset?: number; - /** A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by - * prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no - * prefix is specified. - */ - sort?: string[]; - /** When true, a highlight field is returned for each result which contains the fields which match the query - * with `` tags around the matching query terms. - */ - highlight?: boolean; - /** When specified, duplicate results based on the field specified are removed from the returned results. - * Duplicate comparison is limited to the current query only, **offset** is not considered. This parameter is - * currently Beta functionality. - */ - deduplicateField?: string; - /** When `true`, results are returned based on their similarity to the document IDs specified in the - * **similar.document_ids** parameter. - */ - similar?: boolean; - /** A comma-separated list of document IDs to find similar documents. - * - * **Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search - * with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently - * applied and reduce the scope. - */ - similarDocumentIds?: string[]; - /** A comma-separated list of field names that are used as a basis for comparison to identify similar documents. - * If not specified, the entire document is used for comparison. - */ - similarFields?: string[]; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getAutocompletion` operation. */ - export interface GetAutocompletionParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The prefix to use for autocompletion. For example, the prefix `Ho` could autocomplete to `hot`, `housing`, - * or `how`. - */ - prefix: string; - /** The field in the result documents that autocompletion suggestions are identified from. */ - field?: string; - /** The number of autocompletion suggestions to return. */ - count?: number; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listTrainingData` operation. */ - export interface ListTrainingDataParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `addTrainingData` operation. */ - export interface AddTrainingDataParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The natural text query for the new training query. */ - naturalLanguageQuery?: string; - /** The filter used on the collection before the **natural_language_query** is applied. */ - filter?: string; - /** Array of training examples. */ - examples?: TrainingExample[]; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteAllTrainingData` operation. */ - export interface DeleteAllTrainingDataParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getTrainingData` operation. */ - export interface GetTrainingDataParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the query used for training. */ - queryId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteTrainingData` operation. */ - export interface DeleteTrainingDataParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the query used for training. */ - queryId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listTrainingExamples` operation. */ - export interface ListTrainingExamplesParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the query used for training. */ - queryId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createTrainingExample` operation. */ - export interface CreateTrainingExampleParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the query used for training. */ - queryId: string; - /** The document ID associated with this training example. */ - documentId?: string; - /** The cross reference associated with this training example. */ - crossReference?: string; - /** The relevance of the training example. */ - relevance?: number; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteTrainingExample` operation. */ - export interface DeleteTrainingExampleParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the query used for training. */ - queryId: string; - /** The ID of the document as it is indexed. */ - exampleId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `updateTrainingExample` operation. */ - export interface UpdateTrainingExampleParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the query used for training. */ - queryId: string; - /** The ID of the document as it is indexed. */ - exampleId: string; - /** The example to add. */ - crossReference?: string; - /** The relevance value for this example. */ - relevance?: number; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getTrainingExample` operation. */ - export interface GetTrainingExampleParams { - /** The ID of the environment. */ - environmentId: string; - /** The ID of the collection. */ - collectionId: string; - /** The ID of the query used for training. */ - queryId: string; - /** The ID of the document as it is indexed. */ - exampleId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteUserData` operation. */ - export interface DeleteUserDataParams { - /** The customer ID for which all data is to be deleted. */ - customerId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createEvent` operation. */ - export interface CreateEventParams { - /** The event type to be created. */ - type: CreateEventConstants.Type | string; - /** Query event data object. */ - data: EventData; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `createEvent` operation. */ - export namespace CreateEventConstants { - /** The event type to be created. */ - export enum Type { - CLICK = 'click', - } - } - - /** Parameters for the `queryLog` operation. */ - export interface QueryLogParams { - /** A cacheable query that excludes documents that don't mention the query content. Filter searches are better - * for metadata-type searches and for assessing the concepts in the data set. - */ - filter?: string; - /** A query search returns all documents in your data set with full enrichments and full text, but with the most - * relevant documents listed first. - */ - query?: string; - /** Number of results to return. The maximum for the **count** and **offset** values together in any one query - * is **10000**. - */ - count?: number; - /** The number of query results to skip at the beginning. For example, if the total number of results that are - * returned is 10 and the offset is 8, it returns the last two results. The maximum for the **count** and - * **offset** values together in any one query is **10000**. - */ - offset?: number; - /** A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by - * prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no - * prefix is specified. - */ - sort?: string[]; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getMetricsQuery` operation. */ - export interface GetMetricsQueryParams { - /** Metric is computed from data recorded after this timestamp; must be in `YYYY-MM-DDThh:mm:ssZ` format. */ - startTime?: string; - /** Metric is computed from data recorded before this timestamp; must be in `YYYY-MM-DDThh:mm:ssZ` format. */ - endTime?: string; - /** The type of result to consider when calculating the metric. */ - resultType?: GetMetricsQueryConstants.ResultType | string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `getMetricsQuery` operation. */ - export namespace GetMetricsQueryConstants { - /** The type of result to consider when calculating the metric. */ - export enum ResultType { - DOCUMENT = 'document', - } - } - - /** Parameters for the `getMetricsQueryEvent` operation. */ - export interface GetMetricsQueryEventParams { - /** Metric is computed from data recorded after this timestamp; must be in `YYYY-MM-DDThh:mm:ssZ` format. */ - startTime?: string; - /** Metric is computed from data recorded before this timestamp; must be in `YYYY-MM-DDThh:mm:ssZ` format. */ - endTime?: string; - /** The type of result to consider when calculating the metric. */ - resultType?: GetMetricsQueryEventConstants.ResultType | string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `getMetricsQueryEvent` operation. */ - export namespace GetMetricsQueryEventConstants { - /** The type of result to consider when calculating the metric. */ - export enum ResultType { - DOCUMENT = 'document', - } - } - - /** Parameters for the `getMetricsQueryNoResults` operation. */ - export interface GetMetricsQueryNoResultsParams { - /** Metric is computed from data recorded after this timestamp; must be in `YYYY-MM-DDThh:mm:ssZ` format. */ - startTime?: string; - /** Metric is computed from data recorded before this timestamp; must be in `YYYY-MM-DDThh:mm:ssZ` format. */ - endTime?: string; - /** The type of result to consider when calculating the metric. */ - resultType?: GetMetricsQueryNoResultsConstants.ResultType | string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `getMetricsQueryNoResults` operation. */ - export namespace GetMetricsQueryNoResultsConstants { - /** The type of result to consider when calculating the metric. */ - export enum ResultType { - DOCUMENT = 'document', - } - } - - /** Parameters for the `getMetricsEventRate` operation. */ - export interface GetMetricsEventRateParams { - /** Metric is computed from data recorded after this timestamp; must be in `YYYY-MM-DDThh:mm:ssZ` format. */ - startTime?: string; - /** Metric is computed from data recorded before this timestamp; must be in `YYYY-MM-DDThh:mm:ssZ` format. */ - endTime?: string; - /** The type of result to consider when calculating the metric. */ - resultType?: GetMetricsEventRateConstants.ResultType | string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `getMetricsEventRate` operation. */ - export namespace GetMetricsEventRateConstants { - /** The type of result to consider when calculating the metric. */ - export enum ResultType { - DOCUMENT = 'document', - } - } - - /** Parameters for the `getMetricsQueryTokenEvent` operation. */ - export interface GetMetricsQueryTokenEventParams { - /** Number of results to return. The maximum for the **count** and **offset** values together in any one query - * is **10000**. - */ - count?: number; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listCredentials` operation. */ - export interface ListCredentialsParams { - /** The ID of the environment. */ - environmentId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createCredentials` operation. */ - export interface CreateCredentialsParams { - /** The ID of the environment. */ - environmentId: string; - /** The source that this credentials object connects to. - * - `box` indicates the credentials are used to connect an instance of Enterprise Box. - * - `salesforce` indicates the credentials are used to connect to Salesforce. - * - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online. - * - `web_crawl` indicates the credentials are used to perform a web crawl. - * = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store. - */ - sourceType?: CreateCredentialsConstants.SourceType | string; - /** Object containing details of the stored credentials. - * - * Obtain credentials for your source from the administrator of the source. - */ - credentialDetails?: CredentialDetails; - /** Object that contains details about the status of the authentication process. */ - status?: StatusDetails; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `createCredentials` operation. */ - export namespace CreateCredentialsConstants { - /** The source that this credentials object connects to. - `box` indicates the credentials are used to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are used to connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store. */ - export enum SourceType { - BOX = 'box', - SALESFORCE = 'salesforce', - SHAREPOINT = 'sharepoint', - WEB_CRAWL = 'web_crawl', - CLOUD_OBJECT_STORAGE = 'cloud_object_storage', - } - } - - /** Parameters for the `getCredentials` operation. */ - export interface GetCredentialsParams { - /** The ID of the environment. */ - environmentId: string; - /** The unique identifier for a set of source credentials. */ - credentialId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `updateCredentials` operation. */ - export interface UpdateCredentialsParams { - /** The ID of the environment. */ - environmentId: string; - /** The unique identifier for a set of source credentials. */ - credentialId: string; - /** The source that this credentials object connects to. - * - `box` indicates the credentials are used to connect an instance of Enterprise Box. - * - `salesforce` indicates the credentials are used to connect to Salesforce. - * - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online. - * - `web_crawl` indicates the credentials are used to perform a web crawl. - * = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store. - */ - sourceType?: UpdateCredentialsConstants.SourceType | string; - /** Object containing details of the stored credentials. - * - * Obtain credentials for your source from the administrator of the source. - */ - credentialDetails?: CredentialDetails; - /** Object that contains details about the status of the authentication process. */ - status?: StatusDetails; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `updateCredentials` operation. */ - export namespace UpdateCredentialsConstants { - /** The source that this credentials object connects to. - `box` indicates the credentials are used to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are used to connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store. */ - export enum SourceType { - BOX = 'box', - SALESFORCE = 'salesforce', - SHAREPOINT = 'sharepoint', - WEB_CRAWL = 'web_crawl', - CLOUD_OBJECT_STORAGE = 'cloud_object_storage', - } - } - - /** Parameters for the `deleteCredentials` operation. */ - export interface DeleteCredentialsParams { - /** The ID of the environment. */ - environmentId: string; - /** The unique identifier for a set of source credentials. */ - credentialId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listGateways` operation. */ - export interface ListGatewaysParams { - /** The ID of the environment. */ - environmentId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createGateway` operation. */ - export interface CreateGatewayParams { - /** The ID of the environment. */ - environmentId: string; - /** User-defined name. */ - name?: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getGateway` operation. */ - export interface GetGatewayParams { - /** The ID of the environment. */ - environmentId: string; - /** The requested gateway ID. */ - gatewayId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteGateway` operation. */ - export interface DeleteGatewayParams { - /** The ID of the environment. */ - environmentId: string; - /** The requested gateway ID. */ - gatewayId: string; - headers?: OutgoingHttpHeaders; - } - - /************************* - * model interfaces - ************************/ - - /** A collection for storing documents. */ - export interface Collection { - /** The unique identifier of the collection. */ - collection_id?: string; - /** The name of the collection. */ - name?: string; - /** The description of the collection. */ - description?: string; - /** The creation date of the collection in the format yyyy-MM-dd'T'HH:mmcon:ss.SSS'Z'. */ - created?: string; - /** The timestamp of when the collection was last updated in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. */ - updated?: string; - /** The status of the collection. */ - status?: Collection.Constants.Status | string; - /** The unique identifier of the collection's configuration. */ - configuration_id?: string; - /** The language of the documents stored in the collection. Permitted values include `en` (English), `de` - * (German), and `es` (Spanish). - */ - language?: string; - /** Object containing collection document count information. */ - document_counts?: DocumentCounts; - /** Summary of the disk usage statistics for this collection. */ - disk_usage?: CollectionDiskUsage; - /** Training status details. */ - training_status?: TrainingStatus; - /** Object containing information about the crawl status of this collection. */ - crawl_status?: CollectionCrawlStatus; - /** Object containing smart document understanding information for this collection. */ - smart_document_understanding?: SduStatus; - } - export namespace Collection { - export namespace Constants { - /** The status of the collection. */ - export enum Status { - ACTIVE = 'active', - PENDING = 'pending', - MAINTENANCE = 'maintenance', - } - } - } - - /** Object containing information about the crawl status of this collection. */ - export interface CollectionCrawlStatus { - /** Object containing source crawl status information. */ - source_crawl?: SourceStatus; - } - - /** Summary of the disk usage statistics for this collection. */ - export interface CollectionDiskUsage { - /** Number of bytes used by the collection. */ - used_bytes?: number; - } - - /** Summary of the collection usage in the environment. */ - export interface CollectionUsage { - /** Number of active collections in the environment. */ - available?: number; - /** Total number of collections allowed in the environment. */ - maximum_allowed?: number; - } - - /** An object containing an array of autocompletion suggestions. */ - export interface Completions { - /** Array of autcomplete suggestion based on the provided prefix. */ - completions?: string[]; - } - - /** A custom configuration for the environment. */ - export interface Configuration { - /** The unique identifier of the configuration. */ - configuration_id?: string; - /** The name of the configuration. */ - name: string; - /** The creation date of the configuration in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. */ - created?: string; - /** The timestamp of when the configuration was last updated in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. */ - updated?: string; - /** The description of the configuration, if available. */ - description?: string; - /** Document conversion settings. */ - conversions?: Conversions; - /** An array of document enrichment settings for the configuration. */ - enrichments?: Enrichment[]; - /** Defines operations that can be used to transform the final output JSON into a normalized form. Operations - * are executed in the order that they appear in the array. - */ - normalizations?: NormalizationOperation[]; - /** Object containing source parameters for the configuration. */ - source?: Source; - } - - /** Document conversion settings. */ - export interface Conversions { - /** A list of PDF conversion settings. */ - pdf?: PdfSettings; - /** A list of Word conversion settings. */ - word?: WordSettings; - /** A list of HTML conversion settings. */ - html?: HtmlSettings; - /** A list of Document Segmentation settings. */ - segment?: SegmentSettings; - /** Defines operations that can be used to transform the final output JSON into a normalized form. Operations - * are executed in the order that they appear in the array. - */ - json_normalizations?: NormalizationOperation[]; - /** When `true`, automatic text extraction from images (this includes images embedded in supported document - * formats, for example PDF, and suppported image formats, for example TIFF) is performed on documents uploaded to - * the collection. This field is supported on **Advanced** and higher plans only. **Lite** plans do not support - * image text recognition. - */ - image_text_recognition?: boolean; - } - - /** An object defining the event being created. */ - export interface CreateEventResponse { - /** The event type that was created. */ - type?: CreateEventResponse.Constants.Type | string; - /** Query event data object. */ - data?: EventData; - } - export namespace CreateEventResponse { - export namespace Constants { - /** The event type that was created. */ - export enum Type { - CLICK = 'click', - } - } - } - - /** Object containing details of the stored credentials. Obtain credentials for your source from the administrator of the source. */ - export interface CredentialDetails { - /** The authentication method for this credentials definition. The **credential_type** specified must be - * supported by the **source_type**. The following combinations are possible: - * - * - `"source_type": "box"` - valid `credential_type`s: `oauth2` - * - `"source_type": "salesforce"` - valid `credential_type`s: `username_password` - * - `"source_type": "sharepoint"` - valid `credential_type`s: `saml` with **source_version** of `online`, or - * `ntlm_v1` with **source_version** of `2016` - * - `"source_type": "web_crawl"` - valid `credential_type`s: `noauth` or `basic` - * - "source_type": "cloud_object_storage"` - valid `credential_type`s: `aws4_hmac`. - */ - credential_type?: CredentialDetails.Constants.CredentialType | string; - /** The **client_id** of the source that these credentials connect to. Only valid, and required, with a - * **credential_type** of `oauth2`. - */ - client_id?: string; - /** The **enterprise_id** of the Box site that these credentials connect to. Only valid, and required, with a - * **source_type** of `box`. - */ - enterprise_id?: string; - /** The **url** of the source that these credentials connect to. Only valid, and required, with a - * **credential_type** of `username_password`, `noauth`, and `basic`. - */ - url?: string; - /** The **username** of the source that these credentials connect to. Only valid, and required, with a - * **credential_type** of `saml`, `username_password`, `basic`, or `ntlm_v1`. - */ - username?: string; - /** The **organization_url** of the source that these credentials connect to. Only valid, and required, with a - * **credential_type** of `saml`. - */ - organization_url?: string; - /** The **site_collection.path** of the source that these credentials connect to. Only valid, and required, with - * a **source_type** of `sharepoint`. - */ - 'site_collection.path'?: string; - /** The **client_secret** of the source that these credentials connect to. Only valid, and required, with a - * **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying - * **credentials**. - */ - client_secret?: string; - /** The **public_key_id** of the source that these credentials connect to. Only valid, and required, with a - * **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying - * **credentials**. - */ - public_key_id?: string; - /** The **private_key** of the source that these credentials connect to. Only valid, and required, with a - * **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying - * **credentials**. - */ - private_key?: string; - /** The **passphrase** of the source that these credentials connect to. Only valid, and required, with a - * **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying - * **credentials**. - */ - passphrase?: string; - /** The **password** of the source that these credentials connect to. Only valid, and required, with - * **credential_type**s of `saml`, `username_password`, `basic`, or `ntlm_v1`. - * - * **Note:** When used with a **source_type** of `salesforce`, the password consists of the Salesforce password and - * a valid Salesforce security token concatenated. This value is never returned and is only used when creating or - * modifying **credentials**. - */ - password?: string; - /** The ID of the **gateway** to be connected through (when connecting to intranet sites). Only valid with a - * **credential_type** of `noauth`, `basic`, or `ntlm_v1`. Gateways are created using the - * `/v1/environments/{environment_id}/gateways` methods. - */ - gateway_id?: string; - /** The type of Sharepoint repository to connect to. Only valid, and required, with a **source_type** of - * `sharepoint`. - */ - source_version?: CredentialDetails.Constants.SourceVersion | string; - /** SharePoint OnPrem WebApplication URL. Only valid, and required, with a **source_version** of `2016`. If a - * port is not supplied, the default to port `80` for http and port `443` for https connections are used. - */ - web_application_url?: string; - /** The domain used to log in to your OnPrem SharePoint account. Only valid, and required, with a - * **source_version** of `2016`. - */ - domain?: string; - /** The endpoint associated with the cloud object store that your are connecting to. Only valid, and required, - * with a **credential_type** of `aws4_hmac`. - */ - endpoint?: string; - /** The access key ID associated with the cloud object store. Only valid, and required, with a - * **credential_type** of `aws4_hmac`. This value is never returned and is only used when creating or modifying - * **credentials**. For more infomation, see the [cloud object store - * documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-using-hmac-credentials#using-hmac-credentials). - */ - access_key_id?: string; - /** The secret access key associated with the cloud object store. Only valid, and required, with a - * **credential_type** of `aws4_hmac`. This value is never returned and is only used when creating or modifying - * **credentials**. For more infomation, see the [cloud object store - * documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-using-hmac-credentials#using-hmac-credentials). - */ - secret_access_key?: string; - } - export namespace CredentialDetails { - export namespace Constants { - /** The authentication method for this credentials definition. The **credential_type** specified must be supported by the **source_type**. The following combinations are possible: - `"source_type": "box"` - valid `credential_type`s: `oauth2` - `"source_type": "salesforce"` - valid `credential_type`s: `username_password` - `"source_type": "sharepoint"` - valid `credential_type`s: `saml` with **source_version** of `online`, or `ntlm_v1` with **source_version** of `2016` - `"source_type": "web_crawl"` - valid `credential_type`s: `noauth` or `basic` - "source_type": "cloud_object_storage"` - valid `credential_type`s: `aws4_hmac`. */ - export enum CredentialType { - OAUTH2 = 'oauth2', - SAML = 'saml', - USERNAME_PASSWORD = 'username_password', - NOAUTH = 'noauth', - BASIC = 'basic', - NTLM_V1 = 'ntlm_v1', - AWS4_HMAC = 'aws4_hmac', - } - /** The type of Sharepoint repository to connect to. Only valid, and required, with a **source_type** of `sharepoint`. */ - export enum SourceVersion { - ONLINE = 'online', - } - } - } - - /** Object containing credential information. */ - export interface Credentials { - /** Unique identifier for this set of credentials. */ - credential_id?: string; - /** The source that this credentials object connects to. - * - `box` indicates the credentials are used to connect an instance of Enterprise Box. - * - `salesforce` indicates the credentials are used to connect to Salesforce. - * - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online. - * - `web_crawl` indicates the credentials are used to perform a web crawl. - * = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store. - */ - source_type?: Credentials.Constants.SourceType | string; - /** Object containing details of the stored credentials. - * - * Obtain credentials for your source from the administrator of the source. - */ - credential_details?: CredentialDetails; - /** Object that contains details about the status of the authentication process. */ - status?: StatusDetails; - } - export namespace Credentials { - export namespace Constants { - /** The source that this credentials object connects to. - `box` indicates the credentials are used to connect an instance of Enterprise Box. - `salesforce` indicates the credentials are used to connect to Salesforce. - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online. - `web_crawl` indicates the credentials are used to perform a web crawl. = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store. */ - export enum SourceType { - BOX = 'box', - SALESFORCE = 'salesforce', - SHAREPOINT = 'sharepoint', - WEB_CRAWL = 'web_crawl', - CLOUD_OBJECT_STORAGE = 'cloud_object_storage', - } - } - } - - /** Object containing array of credential definitions. */ - export interface CredentialsList { - /** An array of credential definitions that were created for this instance. */ - credentials?: Credentials[]; - } - - /** Response object returned when deleting a colleciton. */ - export interface DeleteCollectionResponse { - /** The unique identifier of the collection that is being deleted. */ - collection_id: string; - /** The status of the collection. The status of a successful deletion operation is `deleted`. */ - status: DeleteCollectionResponse.Constants.Status | string; - } - export namespace DeleteCollectionResponse { - export namespace Constants { - /** The status of the collection. The status of a successful deletion operation is `deleted`. */ - export enum Status { - DELETED = 'deleted', - } - } - } - - /** Information returned when a configuration is deleted. */ - export interface DeleteConfigurationResponse { - /** The unique identifier for the configuration. */ - configuration_id: string; - /** Status of the configuration. A deleted configuration has the status deleted. */ - status: DeleteConfigurationResponse.Constants.Status | string; - /** An array of notice messages, if any. */ - notices?: Notice[]; - } - export namespace DeleteConfigurationResponse { - export namespace Constants { - /** Status of the configuration. A deleted configuration has the status deleted. */ - export enum Status { - DELETED = 'deleted', - } - } - } - - /** Object returned after credentials are deleted. */ - export interface DeleteCredentials { - /** The unique identifier of the credentials that have been deleted. */ - credential_id?: string; - /** The status of the deletion request. */ - status?: DeleteCredentials.Constants.Status | string; - } - export namespace DeleteCredentials { - export namespace Constants { - /** The status of the deletion request. */ - export enum Status { - DELETED = 'deleted', - } - } - } - - /** Information returned when a document is deleted. */ - export interface DeleteDocumentResponse { - /** The unique identifier of the document. */ - document_id?: string; - /** Status of the document. A deleted document has the status deleted. */ - status?: DeleteDocumentResponse.Constants.Status | string; - } - export namespace DeleteDocumentResponse { - export namespace Constants { - /** Status of the document. A deleted document has the status deleted. */ - export enum Status { - DELETED = 'deleted', - } - } - } - - /** Response object returned when deleting an environment. */ - export interface DeleteEnvironmentResponse { - /** The unique identifier for the environment. */ - environment_id: string; - /** Status of the environment. */ - status: DeleteEnvironmentResponse.Constants.Status | string; - } - export namespace DeleteEnvironmentResponse { - export namespace Constants { - /** Status of the environment. */ - export enum Status { - DELETED = 'deleted', - } - } - } - - /** Summary of the disk usage statistics for the environment. */ - export interface DiskUsage { - /** Number of bytes within the environment's disk capacity that are currently used to store data. */ - used_bytes?: number; - /** Total number of bytes available in the environment's disk capacity. */ - maximum_allowed_bytes?: number; - } - - /** Information returned after an uploaded document is accepted. */ - export interface DocumentAccepted { - /** The unique identifier of the ingested document. */ - document_id?: string; - /** Status of the document in the ingestion process. A status of `processing` is returned for documents that are - * ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others. - */ - status?: DocumentAccepted.Constants.Status | string; - /** Array of notices produced by the document-ingestion process. */ - notices?: Notice[]; - } - export namespace DocumentAccepted { - export namespace Constants { - /** Status of the document in the ingestion process. A status of `processing` is returned for documents that are ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others. */ - export enum Status { - PROCESSING = 'processing', - PENDING = 'pending', - } - } - } - - /** Object containing collection document count information. */ - export interface DocumentCounts { - /** The total number of available documents in the collection. */ - available?: number; - /** The number of documents in the collection that are currently being processed. */ - processing?: number; - /** The number of documents in the collection that failed to be ingested. */ - failed?: number; - /** The number of documents that have been uploaded to the collection, but have not yet started processing. */ - pending?: number; - } - - /** Status information about a submitted document. */ - export interface DocumentStatus { - /** The unique identifier of the document. */ - document_id?: string; - /** The unique identifier for the configuration. */ - configuration_id?: string; - /** Status of the document in the ingestion process. */ - status?: DocumentStatus.Constants.Status | string; - /** Description of the document status. */ - status_description?: string; - /** Name of the original source file (if available). */ - filename?: string; - /** The type of the original source file. */ - file_type?: DocumentStatus.Constants.FileType | string; - /** The SHA-1 hash of the original source file (formatted as a hexadecimal string). */ - sha1?: string; - /** Array of notices produced by the document-ingestion process. */ - notices?: Notice[]; - } - export namespace DocumentStatus { - export namespace Constants { - /** Status of the document in the ingestion process. */ - export enum Status { - AVAILABLE = 'available', - AVAILABLE_WITH_NOTICES = 'available with notices', - FAILED = 'failed', - PROCESSING = 'processing', - PENDING = 'pending', - } - /** The type of the original source file. */ - export enum FileType { - PDF = 'pdf', - HTML = 'html', - WORD = 'word', - JSON = 'json', - } - } - } - - /** Enrichment step to perform on the document. Each enrichment is performed on the specified field in the order that they are listed in the configuration. */ - export interface Enrichment { - /** Describes what the enrichment step does. */ - description?: string; - /** Field where enrichments will be stored. This field must already exist or be at most 1 level deeper than an - * existing field. For example, if `text` is a top-level field with no sub-fields, `text.foo` is a valid - * destination but `text.foo.bar` is not. - */ - destination_field: string; - /** Field to be enriched. - * - * Arrays can be specified as the **source_field** if the **enrichment** service for this enrichment is set to - * `natural_language_undstanding`. - */ - source_field: string; - /** Indicates that the enrichments will overwrite the destination_field field if it already exists. */ - overwrite?: boolean; - /** Name of the enrichment service to call. The only supported option is `natural_language_understanding`. The - * `elements` option is deprecated and support ended on 10 July 2020. - * - * The **options** object must contain Natural Language Understanding options. - */ - enrichment: string; - /** If true, then most errors generated during the enrichment process will be treated as warnings and will not - * cause the document to fail processing. - */ - ignore_downstream_errors?: boolean; - /** Options that are specific to a particular enrichment. - * - * The `elements` enrichment type is deprecated. Use the [Create a - * project](https://cloud.ibm.com/apidocs/discovery-data#createproject) method of the Discovery v2 API to create a - * `content_intelligence` project type instead. - */ - options?: EnrichmentOptions; - } - - /** Options that are specific to a particular enrichment. The `elements` enrichment type is deprecated. Use the [Create a project](https://cloud.ibm.com/apidocs/discovery-data#createproject) method of the Discovery v2 API to create a `content_intelligence` project type instead. */ - export interface EnrichmentOptions { - /** Object containing Natural Language Understanding features to be used. */ - features?: NluEnrichmentFeatures; - /** ISO 639-1 code indicating the language to use for the analysis. This code overrides the automatic language - * detection performed by the service. Valid codes are `ar` (Arabic), `en` (English), `fr` (French), `de` (German), - * `it` (Italian), `pt` (Portuguese), `ru` (Russian), `es` (Spanish), and `sv` (Swedish). **Note:** Not all - * features support all languages, automatic detection is recommended. - */ - language?: EnrichmentOptions.Constants.Language | string; - /** Deprecated: The element extraction model to use, which can be `contract` only. The `elements` enrichment is - * deprecated. - */ - model?: string; - } - export namespace EnrichmentOptions { - export namespace Constants { - /** ISO 639-1 code indicating the language to use for the analysis. This code overrides the automatic language detection performed by the service. Valid codes are `ar` (Arabic), `en` (English), `fr` (French), `de` (German), `it` (Italian), `pt` (Portuguese), `ru` (Russian), `es` (Spanish), and `sv` (Swedish). **Note:** Not all features support all languages, automatic detection is recommended. */ - export enum Language { - AR = 'ar', - EN = 'en', - FR = 'fr', - DE = 'de', - IT = 'it', - PT = 'pt', - RU = 'ru', - ES = 'es', - SV = 'sv', - } - } - } - - /** Details about an environment. */ - export interface Environment { - /** Unique identifier for the environment. */ - environment_id?: string; - /** Name that identifies the environment. */ - name?: string; - /** Description of the environment. */ - description?: string; - /** Creation date of the environment, in the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`. */ - created?: string; - /** Date of most recent environment update, in the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`. */ - updated?: string; - /** Current status of the environment. `resizing` is displayed when a request to increase the environment size - * has been made, but is still in the process of being completed. - */ - status?: Environment.Constants.Status | string; - /** If `true`, the environment contains read-only collections that are maintained by IBM. */ - read_only?: boolean; - /** Current size of the environment. */ - size?: Environment.Constants.Size | string; - /** The new size requested for this environment. Only returned when the environment *status* is `resizing`. - * - * *Note:* Querying and indexing can still be performed during an environment upsize. - */ - requested_size?: string; - /** Details about the resource usage and capacity of the environment. */ - index_capacity?: IndexCapacity; - /** Information about the Continuous Relevancy Training for this environment. */ - search_status?: SearchStatus; - } - export namespace Environment { - export namespace Constants { - /** Current status of the environment. `resizing` is displayed when a request to increase the environment size has been made, but is still in the process of being completed. */ - export enum Status { - ACTIVE = 'active', - PENDING = 'pending', - MAINTENANCE = 'maintenance', - RESIZING = 'resizing', - } - /** Current size of the environment. */ - export enum Size { - LT = 'LT', - XS = 'XS', - S = 'S', - MS = 'MS', - M = 'M', - ML = 'ML', - L = 'L', - XL = 'XL', - XXL = 'XXL', - XXXL = 'XXXL', - } - } - } - - /** Summary of the document usage statistics for the environment. */ - export interface EnvironmentDocuments { - /** Number of documents indexed for the environment. */ - available?: number; - /** Total number of documents allowed in the environment's capacity. */ - maximum_allowed?: number; - } - - /** Query event data object. */ - export interface EventData { - /** The **environment_id** associated with the query that the event is associated with. */ - environment_id: string; - /** The session token that was returned as part of the query results that this event is associated with. */ - session_token: string; - /** The optional timestamp for the event that was created. If not provided, the time that the event was created - * in the log was used. - */ - client_timestamp?: string; - /** The rank of the result item which the event is associated with. */ - display_rank?: number; - /** The **collection_id** of the document that this event is associated with. */ - collection_id: string; - /** The **document_id** of the document that this event is associated with. */ - document_id: string; - /** The query identifier stored in the log. The query and any events associated with that query are stored with - * the same **query_id**. - */ - query_id?: string; - } - - /** An expansion definition. Each object respresents one set of expandable strings. For example, you could have expansions for the word `hot` in one object, and expansions for the word `cold` in another. */ - export interface Expansion { - /** A list of terms that will be expanded for this expansion. If specified, only the items in this list are - * expanded. - */ - input_terms?: string[]; - /** A list of terms that this expansion will be expanded to. If specified without **input_terms**, it also - * functions as the input term list. - */ - expanded_terms: string[]; - } - - /** The query expansion definitions for the specified collection. */ - export interface Expansions { - /** An array of query expansion definitions. - * - * Each object in the **expansions** array represents a term or set of terms that will be expanded into other - * terms. Each expansion object can be configured as bidirectional or unidirectional. Bidirectional means that all - * terms are expanded to all other terms in the object. Unidirectional means that a set list of terms can be - * expanded into a second list of terms. - * - * To create a bi-directional expansion specify an **expanded_terms** array. When found in a query, all items in - * the **expanded_terms** array are then expanded to the other items in the same array. - * - * To create a uni-directional expansion, specify both an array of **input_terms** and an array of - * **expanded_terms**. When items in the **input_terms** array are present in a query, they are expanded using the - * items listed in the **expanded_terms** array. - */ - expansions: Expansion[]; - } - - /** Object containing field details. */ - export interface Field { - /** The name of the field. */ - field?: string; - /** The type of the field. */ - type?: Field.Constants.Type | string; - } - export namespace Field { - export namespace Constants { - /** The type of the field. */ - export enum Type { - NESTED = 'nested', - STRING = 'string', - DATE = 'date', - LONG = 'long', - INTEGER = 'integer', - SHORT = 'short', - BYTE = 'byte', - DOUBLE = 'double', - FLOAT = 'float', - BOOLEAN = 'boolean', - BINARY = 'binary', - } - } - } - - /** Font matching configuration. */ - export interface FontSetting { - /** The HTML heading level that any content with the matching font is converted to. */ - level?: number; - /** The minimum size of the font to match. */ - min_size?: number; - /** The maximum size of the font to match. */ - max_size?: number; - /** When `true`, the font is matched if it is bold. */ - bold?: boolean; - /** When `true`, the font is matched if it is italic. */ - italic?: boolean; - /** The name of the font. */ - name?: string; - } - - /** Object describing a specific gateway. */ - export interface Gateway { - /** The gateway ID of the gateway. */ - gateway_id?: string; - /** The user defined name of the gateway. */ - name?: string; - /** The current status of the gateway. `connected` means the gateway is connected to the remotly installed - * gateway. `idle` means this gateway is not currently in use. - */ - status?: Gateway.Constants.Status | string; - /** The generated **token** for this gateway. The value of this field is used when configuring the remotly - * installed gateway. - */ - token?: string; - /** The generated **token_id** for this gateway. The value of this field is used when configuring the remotly - * installed gateway. - */ - token_id?: string; - } - export namespace Gateway { - export namespace Constants { - /** The current status of the gateway. `connected` means the gateway is connected to the remotly installed gateway. `idle` means this gateway is not currently in use. */ - export enum Status { - CONNECTED = 'connected', - IDLE = 'idle', - } - } - } - - /** Gatway deletion confirmation. */ - export interface GatewayDelete { - /** The gateway ID of the deleted gateway. */ - gateway_id?: string; - /** The status of the request. */ - status?: string; - } - - /** Object containing gateways array. */ - export interface GatewayList { - /** Array of configured gateway connections. */ - gateways?: Gateway[]; - } - - /** A list of HTML conversion settings. */ - export interface HtmlSettings { - /** Array of HTML tags that are excluded completely. */ - exclude_tags_completely?: string[]; - /** Array of HTML tags which are excluded but still retain content. */ - exclude_tags_keep_content?: string[]; - /** Object containing an array of XPaths. */ - keep_content?: XPathPatterns; - /** Object containing an array of XPaths. */ - exclude_content?: XPathPatterns; - /** An array of HTML tag attributes to keep in the converted document. */ - keep_tag_attributes?: string[]; - /** Array of HTML tag attributes to exclude. */ - exclude_tag_attributes?: string[]; - } - - /** Details about the resource usage and capacity of the environment. */ - export interface IndexCapacity { - /** Summary of the document usage statistics for the environment. */ - documents?: EnvironmentDocuments; - /** Summary of the disk usage statistics for the environment. */ - disk_usage?: DiskUsage; - /** Summary of the collection usage in the environment. */ - collections?: CollectionUsage; - } - - /** The list of fetched fields. The fields are returned using a fully qualified name format, however, the format differs slightly from that used by the query operations. * Fields which contain nested JSON objects are assigned a type of "nested". * Fields which belong to a nested object are prefixed with `.properties` (for example, `warnings.properties.severity` means that the `warnings` object has a property called `severity`). * Fields returned from the News collection are prefixed with `v{N}-fullnews-t3-{YEAR}.mappings` (for example, `v5-fullnews-t3-2016.mappings.text.properties.author`). */ - export interface ListCollectionFieldsResponse { - /** An array containing information about each field in the collections. */ - fields?: Field[]; - } - - /** Response object containing an array of collection details. */ - export interface ListCollectionsResponse { - /** An array containing information about each collection in the environment. */ - collections?: Collection[]; - } - - /** Object containing an array of available configurations. */ - export interface ListConfigurationsResponse { - /** An array of configurations that are available for the service instance. */ - configurations?: Configuration[]; - } - - /** Response object containing an array of configured environments. */ - export interface ListEnvironmentsResponse { - /** An array of [environments] that are available for the service instance. */ - environments?: Environment[]; - } - - /** Object containing results that match the requested **logs** query. */ - export interface LogQueryResponse { - /** Number of matching results. */ - matching_results?: number; - /** Array of log query response results. */ - results?: LogQueryResponseResult[]; - } - - /** Individual result object for a **logs** query. Each object represents either a query to a Discovery collection or an event that is associated with a query. */ - export interface LogQueryResponseResult { - /** The environment ID that is associated with this log entry. */ - environment_id?: string; - /** The **customer_id** label that was specified in the header of the query or event API call that corresponds - * to this log entry. - */ - customer_id?: string; - /** The type of log entry returned. - * - * **query** indicates that the log represents the results of a call to the single collection **query** method. - * - * **event** indicates that the log represents a call to the **events** API. - */ - document_type?: LogQueryResponseResult.Constants.DocumentType | string; - /** The value of the **natural_language_query** query parameter that was used to create these results. Only - * returned with logs of type **query**. - * - * **Note:** Other query parameters (such as **filter** or **deduplicate**) might have been used with this query, - * but are not recorded. - */ - natural_language_query?: string; - /** Object containing result information that was returned by the query used to create this log entry. Only - * returned with logs of type `query`. - */ - document_results?: LogQueryResponseResultDocuments; - /** Date that the log result was created. Returned in `YYYY-MM-DDThh:mm:ssZ` format. */ - created_timestamp?: string; - /** Date specified by the user when recording an event. Returned in `YYYY-MM-DDThh:mm:ssZ` format. Only returned - * with logs of type **event**. - */ - client_timestamp?: string; - /** Identifier that corresponds to the **natural_language_query** string used in the original or associated - * query. All **event** and **query** log entries that have the same original **natural_language_query** string - * also have them same **query_id**. This field can be used to recall all **event** and **query** log results that - * have the same original query (**event** logs do not contain the original **natural_language_query** field). - */ - query_id?: string; - /** Unique identifier (within a 24-hour period) that identifies a single `query` log and any `event` logs that - * were created for it. - * - * **Note:** If the exact same query is run at the exact same time on different days, the **session_token** for - * those queries might be identical. However, the **created_timestamp** differs. - * - * **Note:** Session tokens are case sensitive. To avoid matching on session tokens that are identical except for - * case, use the exact match operator (`::`) when you query for a specific session token. - */ - session_token?: string; - /** The collection ID of the document associated with this event. Only returned with logs of type `event`. */ - collection_id?: string; - /** The original display rank of the document associated with this event. Only returned with logs of type - * `event`. - */ - display_rank?: number; - /** The document ID of the document associated with this event. Only returned with logs of type `event`. */ - document_id?: string; - /** The type of event that this object respresents. Possible values are - * - * - `query` the log of a query to a collection - * - * - `click` the result of a call to the **events** endpoint. - */ - event_type?: LogQueryResponseResult.Constants.EventType | string; - /** The type of result that this **event** is associated with. Only returned with logs of type `event`. */ - result_type?: LogQueryResponseResult.Constants.ResultType | string; - } - export namespace LogQueryResponseResult { - export namespace Constants { - /** The type of log entry returned. **query** indicates that the log represents the results of a call to the single collection **query** method. **event** indicates that the log represents a call to the **events** API. */ - export enum DocumentType { - QUERY = 'query', - EVENT = 'event', - } - /** The type of event that this object respresents. Possible values are - `query` the log of a query to a collection - `click` the result of a call to the **events** endpoint. */ - export enum EventType { - CLICK = 'click', - QUERY = 'query', - } - /** The type of result that this **event** is associated with. Only returned with logs of type `event`. */ - export enum ResultType { - DOCUMENT = 'document', - } - } - } - - /** Object containing result information that was returned by the query used to create this log entry. Only returned with logs of type `query`. */ - export interface LogQueryResponseResultDocuments { - /** Array of log query response results. */ - results?: LogQueryResponseResultDocumentsResult[]; - /** The number of results returned in the query associate with this log. */ - count?: number; - } - - /** Each object in the **results** array corresponds to an individual document returned by the original query. */ - export interface LogQueryResponseResultDocumentsResult { - /** The result rank of this document. A position of `1` indicates that it was the first returned result. */ - position?: number; - /** The **document_id** of the document that this result represents. */ - document_id?: string; - /** The raw score of this result. A higher score indicates a greater match to the query parameters. */ - score?: number; - /** The confidence score of the result's analysis. A higher score indicating greater confidence. */ - confidence?: number; - /** The **collection_id** of the document represented by this result. */ - collection_id?: string; - } - - /** An aggregation analyzing log information for queries and events. */ - export interface MetricAggregation { - /** The measurement interval for this metric. Metric intervals are always 1 day (`1d`). */ - interval?: string; - /** The event type associated with this metric result. This field, when present, will always be `click`. */ - event_type?: string; - /** Array of metric aggregation query results. */ - results?: MetricAggregationResult[]; - } - - /** Aggregation result data for the requested metric. */ - export interface MetricAggregationResult { - /** Date in string form representing the start of this interval. */ - key_as_string?: string; - /** Unix epoch time equivalent of the **key_as_string**, that represents the start of this interval. */ - key?: number; - /** Number of matching results. */ - matching_results?: number; - /** The number of queries with associated events divided by the total number of queries for the interval. Only - * returned with **event_rate** metrics. - */ - event_rate?: number; - } - - /** The response generated from a call to a **metrics** method. */ - export interface MetricResponse { - /** Array of metric aggregations. */ - aggregations?: MetricAggregation[]; - } - - /** An aggregation analyzing log information for queries and events. */ - export interface MetricTokenAggregation { - /** The event type associated with this metric result. This field, when present, will always be `click`. */ - event_type?: string; - /** Array of results for the metric token aggregation. */ - results?: MetricTokenAggregationResult[]; - } - - /** Aggregation result data for the requested metric. */ - export interface MetricTokenAggregationResult { - /** The content of the **natural_language_query** parameter used in the query that this result represents. */ - key?: string; - /** Number of matching results. */ - matching_results?: number; - /** The number of queries with associated events divided by the total number of queries currently stored - * (queries and events are stored in the log for 30 days). - */ - event_rate?: number; - } - - /** The response generated from a call to a **metrics** method that evaluates tokens. */ - export interface MetricTokenResponse { - /** Array of metric token aggregations. */ - aggregations?: MetricTokenAggregation[]; - } - - /** An object specifiying the concepts enrichment and related parameters. */ - export interface NluEnrichmentConcepts { - /** The maximum number of concepts enrichments to extact from each instance of the specified field. */ - limit?: number; - } - - /** An object specifying the emotion detection enrichment and related parameters. */ - export interface NluEnrichmentEmotion { - /** When `true`, emotion detection is performed on the entire field. */ - document?: boolean; - /** A comma-separated list of target strings that will have any associated emotions detected. */ - targets?: string[]; - } - - /** An object speficying the Entities enrichment and related parameters. */ - export interface NluEnrichmentEntities { - /** When `true`, sentiment analysis of entities will be performed on the specified field. */ - sentiment?: boolean; - /** When `true`, emotion detection of entities will be performed on the specified field. */ - emotion?: boolean; - /** The maximum number of entities to extract for each instance of the specified field. */ - limit?: number; - /** When `true`, the number of mentions of each identified entity is recorded. The default is `false`. */ - mentions?: boolean; - /** When `true`, the types of mentions for each idetifieid entity is recorded. The default is `false`. */ - mention_types?: boolean; - /** When `true`, a list of sentence locations for each instance of each identified entity is recorded. The - * default is `false`. - */ - sentence_locations?: boolean; - /** The enrichement model to use with entity extraction. May be a custom model provided by Watson Knowledge - * Studio, or the default public model `alchemy`. - */ - model?: string; - } - - /** Object containing Natural Language Understanding features to be used. */ - export interface NluEnrichmentFeatures { - /** An object specifying the Keyword enrichment and related parameters. */ - keywords?: NluEnrichmentKeywords; - /** An object speficying the Entities enrichment and related parameters. */ - entities?: NluEnrichmentEntities; - /** An object specifying the sentiment extraction enrichment and related parameters. */ - sentiment?: NluEnrichmentSentiment; - /** An object specifying the emotion detection enrichment and related parameters. */ - emotion?: NluEnrichmentEmotion; - /** An object that indicates the Categories enrichment will be applied to the specified field. */ - categories?: JsonObject; - /** An object specifiying the semantic roles enrichment and related parameters. */ - semantic_roles?: NluEnrichmentSemanticRoles; - /** An object specifying the relations enrichment and related parameters. */ - relations?: NluEnrichmentRelations; - /** An object specifiying the concepts enrichment and related parameters. */ - concepts?: NluEnrichmentConcepts; - } - - /** An object specifying the Keyword enrichment and related parameters. */ - export interface NluEnrichmentKeywords { - /** When `true`, sentiment analysis of keywords will be performed on the specified field. */ - sentiment?: boolean; - /** When `true`, emotion detection of keywords will be performed on the specified field. */ - emotion?: boolean; - /** The maximum number of keywords to extract for each instance of the specified field. */ - limit?: number; - } - - /** An object specifying the relations enrichment and related parameters. */ - export interface NluEnrichmentRelations { - /** *For use with `natural_language_understanding` enrichments only.* The enrichement model to use with - * relationship extraction. May be a custom model provided by Watson Knowledge Studio, the default public model - * is`en-news`. - */ - model?: string; - } - - /** An object specifiying the semantic roles enrichment and related parameters. */ - export interface NluEnrichmentSemanticRoles { - /** When `true`, entities are extracted from the identified sentence parts. */ - entities?: boolean; - /** When `true`, keywords are extracted from the identified sentence parts. */ - keywords?: boolean; - /** The maximum number of semantic roles enrichments to extact from each instance of the specified field. */ - limit?: number; - } - - /** An object specifying the sentiment extraction enrichment and related parameters. */ - export interface NluEnrichmentSentiment { - /** When `true`, sentiment analysis is performed on the entire field. */ - document?: boolean; - /** A comma-separated list of target strings that will have any associated sentiment analyzed. */ - targets?: string[]; - } - - /** Object containing normalization operations. */ - export interface NormalizationOperation { - /** Identifies what type of operation to perform. - * - * **copy** - Copies the value of the **source_field** to the **destination_field** field. If the - * **destination_field** already exists, then the value of the **source_field** overwrites the original value of - * the **destination_field**. - * - * **move** - Renames (moves) the **source_field** to the **destination_field**. If the **destination_field** - * already exists, then the value of the **source_field** overwrites the original value of the - * **destination_field**. Rename is identical to copy, except that the **source_field** is removed after the value - * has been copied to the **destination_field** (it is the same as a _copy_ followed by a _remove_). - * - * **merge** - Merges the value of the **source_field** with the value of the **destination_field**. The - * **destination_field** is converted into an array if it is not already an array, and the value of the - * **source_field** is appended to the array. This operation removes the **source_field** after the merge. If the - * **source_field** does not exist in the current document, then the **destination_field** is still converted into - * an array (if it is not an array already). This conversion ensures the type for **destination_field** is - * consistent across all documents. - * - * **remove** - Deletes the **source_field** field. The **destination_field** is ignored for this operation. - * - * **remove_nulls** - Removes all nested null (blank) field values from the ingested document. **source_field** and - * **destination_field** are ignored by this operation because _remove_nulls_ operates on the entire ingested - * document. Typically, **remove_nulls** is invoked as the last normalization operation (if it is invoked at all, - * it can be time-expensive). - */ - operation?: NormalizationOperation.Constants.Operation | string; - /** The source field for the operation. */ - source_field?: string; - /** The destination field for the operation. */ - destination_field?: string; - } - export namespace NormalizationOperation { - export namespace Constants { - /** Identifies what type of operation to perform. **copy** - Copies the value of the **source_field** to the **destination_field** field. If the **destination_field** already exists, then the value of the **source_field** overwrites the original value of the **destination_field**. **move** - Renames (moves) the **source_field** to the **destination_field**. If the **destination_field** already exists, then the value of the **source_field** overwrites the original value of the **destination_field**. Rename is identical to copy, except that the **source_field** is removed after the value has been copied to the **destination_field** (it is the same as a _copy_ followed by a _remove_). **merge** - Merges the value of the **source_field** with the value of the **destination_field**. The **destination_field** is converted into an array if it is not already an array, and the value of the **source_field** is appended to the array. This operation removes the **source_field** after the merge. If the **source_field** does not exist in the current document, then the **destination_field** is still converted into an array (if it is not an array already). This conversion ensures the type for **destination_field** is consistent across all documents. **remove** - Deletes the **source_field** field. The **destination_field** is ignored for this operation. **remove_nulls** - Removes all nested null (blank) field values from the ingested document. **source_field** and **destination_field** are ignored by this operation because _remove_nulls_ operates on the entire ingested document. Typically, **remove_nulls** is invoked as the last normalization operation (if it is invoked at all, it can be time-expensive). */ - export enum Operation { - COPY = 'copy', - MOVE = 'move', - MERGE = 'merge', - REMOVE = 'remove', - REMOVE_NULLS = 'remove_nulls', - } - } - } - - /** A notice produced for the collection. */ - export interface Notice { - /** Identifies the notice. Many notices might have the same ID. This field exists so that user applications can - * programmatically identify a notice and take automatic corrective action. Typical notice IDs include: - * `index_failed`, `index_failed_too_many_requests`, `index_failed_incompatible_field`, - * `index_failed_cluster_unavailable`, `ingestion_timeout`, `ingestion_error`, `bad_request`, `internal_error`, - * `missing_model`, `unsupported_model`, `smart_document_understanding_failed_incompatible_field`, - * `smart_document_understanding_failed_internal_error`, `smart_document_understanding_failed_internal_error`, - * `smart_document_understanding_failed_warning`, `smart_document_understanding_page_error`, - * `smart_document_understanding_page_warning`. **Note:** This is not a complete list; other values might be - * returned. - */ - notice_id?: string; - /** The creation date of the collection in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. */ - created?: string; - /** Unique identifier of the document. */ - document_id?: string; - /** Unique identifier of the query used for relevance training. */ - query_id?: string; - /** Severity level of the notice. */ - severity?: Notice.Constants.Severity | string; - /** Ingestion or training step in which the notice occurred. Typical step values include: - * `smartDocumentUnderstanding`, `ingestion`, `indexing`, `convert`. **Note:** This is not a complete list; other - * values might be returned. - */ - step?: string; - /** The description of the notice. */ - description?: string; - } - export namespace Notice { - export namespace Constants { - /** Severity level of the notice. */ - export enum Severity { - WARNING = 'warning', - ERROR = 'error', - } - } - } - - /** Object containing heading detection conversion settings for PDF documents. */ - export interface PdfHeadingDetection { - /** Array of font matching configurations. */ - fonts?: FontSetting[]; - } - - /** A list of PDF conversion settings. */ - export interface PdfSettings { - /** Object containing heading detection conversion settings for PDF documents. */ - heading?: PdfHeadingDetection; - } - - /** An aggregation produced by Discovery to analyze the input provided. */ - export interface QueryAggregation { - /** The type of aggregation command used. For example: term, filter, max, min, etc. */ - type: string; - } - - /** Histogram numeric interval result. */ - export interface QueryHistogramAggregationResult { - /** The value of the upper bound for the numeric segment. */ - key: number; - /** Number of documents with the specified key as the upper bound. */ - matching_results: number; - /** An array of sub-aggregations. */ - aggregations?: QueryAggregation[]; - } - - /** Object containing notice query results. */ - export interface QueryNoticesResponse { - /** The number of matching results. */ - matching_results?: number; - /** Array of document results that match the query. */ - results?: QueryNoticesResult[]; - /** Array of aggregation results that match the query. */ - aggregations?: QueryAggregation[]; - /** Array of passage results that match the query. */ - passages?: QueryPassages[]; - /** The number of duplicates removed from this notices query. */ - duplicates_removed?: number; - } - - /** Query result object. */ - export interface QueryNoticesResult { - /** The unique identifier of the document. */ - id?: string; - /** Metadata of the document. */ - metadata?: JsonObject; - /** The collection ID of the collection containing the document for this result. */ - collection_id?: string; - /** Metadata of a query result. */ - result_metadata?: QueryResultMetadata; - /** The internal status code returned by the ingestion subsystem indicating the overall result of ingesting the - * source document. - */ - code?: number; - /** Name of the original source file (if available). */ - filename?: string; - /** The type of the original source file. */ - file_type?: QueryNoticesResult.Constants.FileType | string; - /** The SHA-1 hash of the original source file (formatted as a hexadecimal string). */ - sha1?: string; - /** Array of notices for the document. */ - notices?: Notice[]; - /** QueryNoticesResult accepts additional properties. */ - [propName: string]: any; - } - export namespace QueryNoticesResult { - export namespace Constants { - /** The type of the original source file. */ - export enum FileType { - PDF = 'pdf', - HTML = 'html', - WORD = 'word', - JSON = 'json', - } - } - } - - /** A passage query result. */ - export interface QueryPassages { - /** The unique identifier of the document from which the passage has been extracted. */ - document_id?: string; - /** The confidence score of the passages's analysis. A higher score indicates greater confidence. */ - passage_score?: number; - /** The content of the extracted passage. */ - passage_text?: string; - /** The position of the first character of the extracted passage in the originating field. */ - start_offset?: number; - /** The position of the last character of the extracted passage in the originating field. */ - end_offset?: number; - /** The label of the field from which the passage has been extracted. */ - field?: string; - } - - /** A response containing the documents and aggregations for the query. */ - export interface QueryResponse { - /** The number of matching results for the query. */ - matching_results?: number; - /** Array of document results for the query. */ - results?: QueryResult[]; - /** Array of aggregation results for the query. */ - aggregations?: QueryAggregation[]; - /** Array of passage results for the query. */ - passages?: QueryPassages[]; - /** The number of duplicate results removed. */ - duplicates_removed?: number; - /** The session token for this query. The session token can be used to add events associated with this query to - * the query and event log. - * - * **Important:** Session tokens are case sensitive. - */ - session_token?: string; - /** An object contain retrieval type information. */ - retrieval_details?: RetrievalDetails; - /** The suggestions for a misspelled natural language query. */ - suggested_query?: string; - } - - /** Query result object. */ - export interface QueryResult { - /** The unique identifier of the document. */ - id?: string; - /** Metadata of the document. */ - metadata?: JsonObject; - /** The collection ID of the collection containing the document for this result. */ - collection_id?: string; - /** Metadata of a query result. */ - result_metadata?: QueryResultMetadata; - /** QueryResult accepts additional properties. */ - [propName: string]: any; - } - - /** Metadata of a query result. */ - export interface QueryResultMetadata { - /** An unbounded measure of the relevance of a particular result, dependent on the query and matching document. - * A higher score indicates a greater match to the query parameters. - */ - score: number; - /** The confidence score for the given result. Calculated based on how relevant the result is estimated to be. - * confidence can range from `0.0` to `1.0`. The higher the number, the more relevant the document. The - * `confidence` value for a result was calculated using the model specified in the `document_retrieval_strategy` - * field of the result set. - */ - confidence?: number; - } - - /** Top value result for the term aggregation. */ - export interface QueryTermAggregationResult { - /** Value of the field with a non-zero frequency in the document set. */ - key: string; - /** Number of documents that contain the 'key'. */ - matching_results: number; - /** The relevancy for this term. */ - relevancy?: number; - /** The number of documents which have the term as the value of specified field in the whole set of documents in - * this collection. Returned only when the `relevancy` parameter is set to `true`. - */ - total_matching_documents?: number; - /** The estimated number of documents which would match the query and also meet the condition. Returned only - * when the `relevancy` parameter is set to `true`. - */ - estimated_matching_documents?: number; - /** An array of sub-aggregations. */ - aggregations?: QueryAggregation[]; - } - - /** A timeslice interval segment. */ - export interface QueryTimesliceAggregationResult { - /** String date value of the upper bound for the timeslice interval in ISO-8601 format. */ - key_as_string: string; - /** Numeric date value of the upper bound for the timeslice interval in UNIX milliseconds since epoch. */ - key: number; - /** Number of documents with the specified key as the upper bound. */ - matching_results: number; - /** An array of sub-aggregations. */ - aggregations?: QueryAggregation[]; - } - - /** A query response that contains the matching documents for the preceding aggregations. */ - export interface QueryTopHitsAggregationResult { - /** Number of matching results. */ - matching_results: number; - /** An array of the document results. */ - hits?: JsonObject[]; - } - - /** An object contain retrieval type information. */ - export interface RetrievalDetails { - /** Indentifies the document retrieval strategy used for this query. `relevancy_training` indicates that the - * results were returned using a relevancy trained model. `continuous_relevancy_training` indicates that the - * results were returned using the continuous relevancy training model created by result feedback analysis. - * `untrained` means the results were returned using the standard untrained model. - * - * **Note**: In the event of trained collections being queried, but the trained model is not used to return - * results, the **document_retrieval_strategy** will be listed as `untrained`. - */ - document_retrieval_strategy?: RetrievalDetails.Constants.DocumentRetrievalStrategy | string; - } - export namespace RetrievalDetails { - export namespace Constants { - /** Indentifies the document retrieval strategy used for this query. `relevancy_training` indicates that the results were returned using a relevancy trained model. `continuous_relevancy_training` indicates that the results were returned using the continuous relevancy training model created by result feedback analysis. `untrained` means the results were returned using the standard untrained model. **Note**: In the event of trained collections being queried, but the trained model is not used to return results, the **document_retrieval_strategy** will be listed as `untrained`. */ - export enum DocumentRetrievalStrategy { - UNTRAINED = 'untrained', - RELEVANCY_TRAINING = 'relevancy_training', - CONTINUOUS_RELEVANCY_TRAINING = 'continuous_relevancy_training', - } - } - } - - /** Object containing smart document understanding information for this collection. */ - export interface SduStatus { - /** When `true`, smart document understanding conversion is enabled for this collection. All collections created - * with a version date after `2019-04-30` have smart document understanding enabled. If `false`, documents added to - * the collection are converted using the **conversion** settings specified in the configuration associated with - * the collection. - */ - enabled?: boolean; - /** The total number of pages annotated using smart document understanding in this collection. */ - total_annotated_pages?: number; - /** The current number of pages that can be used for training smart document understanding. The `total_pages` - * number is calculated as the total number of pages identified from the documents listed in the - * **total_documents** field. - */ - total_pages?: number; - /** The total number of documents in this collection that can be used to train smart document understanding. For - * **lite** plan collections, the maximum is the first 20 uploaded documents (not including HTML or JSON - * documents). For other plans, the maximum is the first 40 uploaded documents (not including HTML or JSON - * documents). When the maximum is reached, additional documents uploaded to the collection are not considered for - * training smart document understanding. - */ - total_documents?: number; - /** Information about custom smart document understanding fields that exist in this collection. */ - custom_fields?: SduStatusCustomFields; - } - - /** Information about custom smart document understanding fields that exist in this collection. */ - export interface SduStatusCustomFields { - /** The number of custom fields defined for this collection. */ - defined?: number; - /** The maximum number of custom fields that are allowed in this collection. */ - maximum_allowed?: number; - } - - /** Information about the Continuous Relevancy Training for this environment. */ - export interface SearchStatus { - /** Current scope of the training. Always returned as `environment`. */ - scope?: string; - /** The current status of Continuous Relevancy Training for this environment. */ - status?: SearchStatus.Constants.Status | string; - /** Long description of the current Continuous Relevancy Training status. */ - status_description?: string; - /** The date stamp of the most recent completed training for this environment. */ - last_trained?: string; - } - export namespace SearchStatus { - export namespace Constants { - /** The current status of Continuous Relevancy Training for this environment. */ - export enum Status { - NO_DATA = 'NO_DATA', - INSUFFICENT_DATA = 'INSUFFICENT_DATA', - TRAINING = 'TRAINING', - TRAINED = 'TRAINED', - NOT_APPLICABLE = 'NOT_APPLICABLE', - } - } - } - - /** A list of Document Segmentation settings. */ - export interface SegmentSettings { - /** Enables/disables the Document Segmentation feature. */ - enabled?: boolean; - /** Defines the heading level that splits into document segments. Valid values are h1, h2, h3, h4, h5, h6. The - * content of the header field that the segmentation splits at is used as the **title** field for that segmented - * result. Only valid if used with a collection that has **enabled** set to `false` in the - * **smart_document_understanding** object. - */ - selector_tags?: string[]; - /** Defines the annotated smart document understanding fields that the document is split on. The content of the - * annotated field that the segmentation splits at is used as the **title** field for that segmented result. For - * example, if the field `sub-title` is specified, when a document is uploaded each time the smart document - * understanding conversion encounters a field of type `sub-title` the document is split at that point and the - * content of the field used as the title of the remaining content. This split is performed for all instances of - * the listed fields in the uploaded document. Only valid if used with a collection that has **enabled** set to - * `true` in the **smart_document_understanding** object. - */ - annotated_fields?: string[]; - } - - /** Object containing source parameters for the configuration. */ - export interface Source { - /** The type of source to connect to. - * - `box` indicates the configuration is to connect an instance of Enterprise Box. - * - `salesforce` indicates the configuration is to connect to Salesforce. - * - `sharepoint` indicates the configuration is to connect to Microsoft SharePoint Online. - * - `web_crawl` indicates the configuration is to perform a web page crawl. - * - `cloud_object_storage` indicates the configuration is to connect to a cloud object store. - */ - type?: Source.Constants.Type | string; - /** The **credential_id** of the credentials to use to connect to the source. Credentials are defined using the - * **credentials** method. The **source_type** of the credentials used must match the **type** field specified in - * this object. - */ - credential_id?: string; - /** Object containing the schedule information for the source. */ - schedule?: SourceSchedule; - /** The **options** object defines which items to crawl from the source system. */ - options?: SourceOptions; - } - export namespace Source { - export namespace Constants { - /** The type of source to connect to. - `box` indicates the configuration is to connect an instance of Enterprise Box. - `salesforce` indicates the configuration is to connect to Salesforce. - `sharepoint` indicates the configuration is to connect to Microsoft SharePoint Online. - `web_crawl` indicates the configuration is to perform a web page crawl. - `cloud_object_storage` indicates the configuration is to connect to a cloud object store. */ - export enum Type { - BOX = 'box', - SALESFORCE = 'salesforce', - SHAREPOINT = 'sharepoint', - WEB_CRAWL = 'web_crawl', - CLOUD_OBJECT_STORAGE = 'cloud_object_storage', - } - } - } - - /** The **options** object defines which items to crawl from the source system. */ - export interface SourceOptions { - /** Array of folders to crawl from the Box source. Only valid, and required, when the **type** field of the - * **source** object is set to `box`. - */ - folders?: SourceOptionsFolder[]; - /** Array of Salesforce document object types to crawl from the Salesforce source. Only valid, and required, - * when the **type** field of the **source** object is set to `salesforce`. - */ - objects?: SourceOptionsObject[]; - /** Array of Microsoft SharePointoint Online site collections to crawl from the SharePoint source. Only valid - * and required when the **type** field of the **source** object is set to `sharepoint`. - */ - site_collections?: SourceOptionsSiteColl[]; - /** Array of Web page URLs to begin crawling the web from. Only valid and required when the **type** field of - * the **source** object is set to `web_crawl`. - */ - urls?: SourceOptionsWebCrawl[]; - /** Array of cloud object store buckets to begin crawling. Only valid and required when the **type** field of - * the **source** object is set to `cloud_object_store`, and the **crawl_all_buckets** field is `false` or not - * specified. - */ - buckets?: SourceOptionsBuckets[]; - /** When `true`, all buckets in the specified cloud object store are crawled. If set to `true`, the **buckets** - * array must not be specified. - */ - crawl_all_buckets?: boolean; - } - - /** Object defining a cloud object store bucket to crawl. */ - export interface SourceOptionsBuckets { - /** The name of the cloud object store bucket to crawl. */ - name: string; - /** The number of documents to crawl from this cloud object store bucket. If not specified, all documents in the - * bucket are crawled. - */ - limit?: number; - } - - /** Object that defines a box folder to crawl with this configuration. */ - export interface SourceOptionsFolder { - /** The Box user ID of the user who owns the folder to crawl. */ - owner_user_id: string; - /** The Box folder ID of the folder to crawl. */ - folder_id: string; - /** The maximum number of documents to crawl for this folder. By default, all documents in the folder are - * crawled. - */ - limit?: number; - } - - /** Object that defines a Salesforce document object type crawl with this configuration. */ - export interface SourceOptionsObject { - /** The name of the Salesforce document object to crawl. For example, `case`. */ - name: string; - /** The maximum number of documents to crawl for this document object. By default, all documents in the document - * object are crawled. - */ - limit?: number; - } - - /** Object that defines a Microsoft SharePoint site collection to crawl with this configuration. */ - export interface SourceOptionsSiteColl { - /** The Microsoft SharePoint Online site collection path to crawl. The path must be be relative to the - * **organization_url** that was specified in the credentials associated with this source configuration. - */ - site_collection_path: string; - /** The maximum number of documents to crawl for this site collection. By default, all documents in the site - * collection are crawled. - */ - limit?: number; - } - - /** Object defining which URL to crawl and how to crawl it. */ - export interface SourceOptionsWebCrawl { - /** The starting URL to crawl. */ - url: string; - /** When `true`, crawls of the specified URL are limited to the host part of the **url** field. */ - limit_to_starting_hosts?: boolean; - /** The number of concurrent URLs to fetch. `gentle` means one URL is fetched at a time with a delay between - * each call. `normal` means as many as two URLs are fectched concurrently with a short delay between fetch calls. - * `aggressive` means that up to ten URLs are fetched concurrently with a short delay between fetch calls. - */ - crawl_speed?: SourceOptionsWebCrawl.Constants.CrawlSpeed | string; - /** When `true`, allows the crawl to interact with HTTPS sites with SSL certificates with untrusted signers. */ - allow_untrusted_certificate?: boolean; - /** The maximum number of hops to make from the initial URL. When a page is crawled each link on that page will - * also be crawled if it is within the **maximum_hops** from the initial URL. The first page crawled is 0 hops, - * each link crawled from the first page is 1 hop, each link crawled from those pages is 2 hops, and so on. - */ - maximum_hops?: number; - /** The maximum milliseconds to wait for a response from the web server. */ - request_timeout?: number; - /** When `true`, the crawler will ignore any `robots.txt` encountered by the crawler. This should only ever be - * done when crawling a web site the user owns. This must be be set to `true` when a **gateway_id** is specied in - * the **credentials**. - */ - override_robots_txt?: boolean; - /** Array of URL's to be excluded while crawling. The crawler will not follow links which contains this string. - * For example, listing `https://ibm.com/watson` also excludes `https://ibm.com/watson/discovery`. - */ - blacklist?: string[]; - } - export namespace SourceOptionsWebCrawl { - export namespace Constants { - /** The number of concurrent URLs to fetch. `gentle` means one URL is fetched at a time with a delay between each call. `normal` means as many as two URLs are fectched concurrently with a short delay between fetch calls. `aggressive` means that up to ten URLs are fetched concurrently with a short delay between fetch calls. */ - export enum CrawlSpeed { - GENTLE = 'gentle', - NORMAL = 'normal', - AGGRESSIVE = 'aggressive', - } - } - } - - /** Object containing the schedule information for the source. */ - export interface SourceSchedule { - /** When `true`, the source is re-crawled based on the **frequency** field in this object. When `false` the - * source is not re-crawled; When `false` and connecting to Salesforce the source is crawled annually. - */ - enabled?: boolean; - /** The time zone to base source crawl times on. Possible values correspond to the IANA (Internet Assigned - * Numbers Authority) time zones list. - */ - time_zone?: string; - /** The crawl schedule in the specified **time_zone**. - * - * - `five_minutes`: Runs every five minutes. - * - `hourly`: Runs every hour. - * - `daily`: Runs every day between 00:00 and 06:00. - * - `weekly`: Runs every week on Sunday between 00:00 and 06:00. - * - `monthly`: Runs the on the first Sunday of every month between 00:00 and 06:00. - */ - frequency?: SourceSchedule.Constants.Frequency | string; - } - export namespace SourceSchedule { - export namespace Constants { - /** The crawl schedule in the specified **time_zone**. - `five_minutes`: Runs every five minutes. - `hourly`: Runs every hour. - `daily`: Runs every day between 00:00 and 06:00. - `weekly`: Runs every week on Sunday between 00:00 and 06:00. - `monthly`: Runs the on the first Sunday of every month between 00:00 and 06:00. */ - export enum Frequency { - DAILY = 'daily', - WEEKLY = 'weekly', - MONTHLY = 'monthly', - FIVE_MINUTES = 'five_minutes', - HOURLY = 'hourly', - } - } - } - - /** Object containing source crawl status information. */ - export interface SourceStatus { - /** The current status of the source crawl for this collection. This field returns `not_configured` if the - * default configuration for this source does not have a **source** object defined. - * - * - `running` indicates that a crawl to fetch more documents is in progress. - * - `complete` indicates that the crawl has completed with no errors. - * - `queued` indicates that the crawl has been paused by the system and will automatically restart when possible. - * - `unknown` indicates that an unidentified error has occured in the service. - */ - status?: SourceStatus.Constants.Status | string; - /** Date in `RFC 3339` format indicating the time of the next crawl attempt. */ - next_crawl?: string; - } - export namespace SourceStatus { - export namespace Constants { - /** The current status of the source crawl for this collection. This field returns `not_configured` if the default configuration for this source does not have a **source** object defined. - `running` indicates that a crawl to fetch more documents is in progress. - `complete` indicates that the crawl has completed with no errors. - `queued` indicates that the crawl has been paused by the system and will automatically restart when possible. - `unknown` indicates that an unidentified error has occured in the service. */ - export enum Status { - RUNNING = 'running', - COMPLETE = 'complete', - NOT_CONFIGURED = 'not_configured', - QUEUED = 'queued', - UNKNOWN = 'unknown', - } - } - } - - /** Object that contains details about the status of the authentication process. */ - export interface StatusDetails { - /** Indicates whether the credential is accepted by the target data source. */ - authenticated?: boolean; - /** If `authenticated` is `false`, a message describes why authentication is unsuccessful. */ - error_message?: string; - } - - /** An object defining a single tokenizaion rule. */ - export interface TokenDictRule { - /** The string to tokenize. */ - text: string; - /** Array of tokens that the `text` field is split into when found. */ - tokens: string[]; - /** Array of tokens that represent the content of the `text` field in an alternate character set. */ - readings?: string[]; - /** The part of speech that the `text` string belongs to. For example `noun`. Custom parts of speech can be - * specified. - */ - part_of_speech: string; - } - - /** Object describing the current status of the wordlist. */ - export interface TokenDictStatusResponse { - /** Current wordlist status for the specified collection. */ - status?: TokenDictStatusResponse.Constants.Status | string; - /** The type for this wordlist. Can be `tokenization_dictionary` or `stopwords`. */ - type?: string; - } - export namespace TokenDictStatusResponse { - export namespace Constants { - /** Current wordlist status for the specified collection. */ - export enum Status { - ACTIVE = 'active', - PENDING = 'pending', - NOT_FOUND = 'not found', - } - } - } - - /** Training information for a specific collection. */ - export interface TrainingDataSet { - /** The environment id associated with this training data set. */ - environment_id?: string; - /** The collection id associated with this training data set. */ - collection_id?: string; - /** Array of training queries. At least 50 queries are required for training to begin. A maximum of 10,000 - * queries are returned. - */ - queries?: TrainingQuery[]; - } - - /** Training example details. */ - export interface TrainingExample { - /** The document ID associated with this training example. */ - document_id?: string; - /** The cross reference associated with this training example. */ - cross_reference?: string; - /** The relevance of the training example. */ - relevance?: number; - } - - /** Object containing an array of training examples. */ - export interface TrainingExampleList { - /** Array of training examples. */ - examples?: TrainingExample[]; - } - - /** Training query details. */ - export interface TrainingQuery { - /** The query ID associated with the training query. */ - query_id?: string; - /** The natural text query for the training query. */ - natural_language_query?: string; - /** The filter used on the collection before the **natural_language_query** is applied. */ - filter?: string; - /** Array of training examples. */ - examples?: TrainingExample[]; - } - - /** Training status details. */ - export interface TrainingStatus { - /** The total number of training examples uploaded to this collection. */ - total_examples?: number; - /** When `true`, the collection has been successfully trained. */ - available?: boolean; - /** When `true`, the collection is currently processing training. */ - processing?: boolean; - /** When `true`, the collection has a sufficent amount of queries added for training to occur. */ - minimum_queries_added?: boolean; - /** When `true`, the collection has a sufficent amount of examples added for training to occur. */ - minimum_examples_added?: boolean; - /** When `true`, the collection has a sufficent amount of diversity in labeled results for training to occur. */ - sufficient_label_diversity?: boolean; - /** The number of notices associated with this data set. */ - notices?: number; - /** The timestamp of when the collection was successfully trained. */ - successfully_trained?: string; - /** The timestamp of when the data was uploaded. */ - data_updated?: string; - } - - /** Object containing heading detection conversion settings for Microsoft Word documents. */ - export interface WordHeadingDetection { - /** Array of font matching configurations. */ - fonts?: FontSetting[]; - /** Array of Microsoft Word styles to convert. */ - styles?: WordStyle[]; - } - - /** A list of Word conversion settings. */ - export interface WordSettings { - /** Object containing heading detection conversion settings for Microsoft Word documents. */ - heading?: WordHeadingDetection; - } - - /** Microsoft Word styles to convert into a specified HTML head level. */ - export interface WordStyle { - /** HTML head level that content matching this style is tagged with. */ - level?: number; - /** Array of word style names to convert. */ - names?: string[]; - } - - /** Object containing an array of XPaths. */ - export interface XPathPatterns { - /** An array to XPaths. */ - xpaths?: string[]; - } - - /** Returns a scalar calculation across all documents for the field specified. Possible calculations include min, max, sum, average, and unique_count. */ - export interface QueryCalculationAggregation extends QueryAggregation { - /** The field to perform the calculation on. */ - field: string; - /** The value of the calculation. */ - value?: number; - } - - /** A modifier that narrows the document set of the sub-aggregations it precedes. */ - export interface QueryFilterAggregation extends QueryAggregation { - /** The filter that is written in Discovery Query Language syntax and is applied to the documents before - * sub-aggregations are run. - */ - match: string; - /** Number of documents that match the filter. */ - matching_results: number; - /** An array of sub-aggregations. */ - aggregations?: QueryAggregation[]; - } - - /** Numeric interval segments to categorize documents by using field values from a single numeric field to describe the category. */ - export interface QueryHistogramAggregation extends QueryAggregation { - /** The numeric field name used to create the histogram. */ - field: string; - /** The size of the sections that the results are split into. */ - interval: number; - /** Identifier specified in the query request of this aggregation. */ - name?: string; - /** Array of numeric intervals. */ - results?: QueryHistogramAggregationResult[]; - } - - /** A restriction that alters the document set that is used for sub-aggregations it precedes to nested documents found in the field specified. */ - export interface QueryNestedAggregation extends QueryAggregation { - /** The path to the document field to scope sub-aggregations to. */ - path: string; - /** Number of nested documents found in the specified field. */ - matching_results: number; - /** An array of sub-aggregations. */ - aggregations?: QueryAggregation[]; - } - - /** Returns the top values for the field specified. */ - export interface QueryTermAggregation extends QueryAggregation { - /** The field in the document used to generate top values from. */ - field: string; - /** The number of top values returned. */ - count?: number; - /** Identifier specified in the query request of this aggregation. */ - name?: string; - /** Array of top values for the field. */ - results?: QueryTermAggregationResult[]; - } - - /** A specialized histogram aggregation that uses dates to create interval segments. */ - export interface QueryTimesliceAggregation extends QueryAggregation { - /** The date field name used to create the timeslice. */ - field: string; - /** The date interval value. Valid values are seconds, minutes, hours, days, weeks, and years. */ - interval: string; - /** Identifier specified in the query request of this aggregation. */ - name?: string; - /** Array of aggregation results. */ - results?: QueryTimesliceAggregationResult[]; - } - - /** Returns the top documents ranked by the score of the query. */ - export interface QueryTopHitsAggregation extends QueryAggregation { - /** The number of documents to return. */ - size: number; - /** Identifier specified in the query request of this aggregation. */ - name?: string; - hits?: QueryTopHitsAggregationResult; - } -} - -export = DiscoveryV1; diff --git a/discovery/v2.ts b/discovery/v2.ts index 80ae21ce02..926f458389 100644 --- a/discovery/v2.ts +++ b/discovery/v2.ts @@ -15,7 +15,7 @@ */ /** - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.1-5136e54a-20241108-203028 */ import * as extend from 'extend'; @@ -1248,8 +1248,15 @@ class DiscoveryV2 extends BaseService { * @param {string[]} [params._return] - A list of the fields in the document hierarchy to return. You can specify both * root-level (`text`) and nested (`extracted_metadata.filename`) fields. If this parameter is an empty list, then all * fields are returned. - * @param {number} [params.offset] - The number of query results to skip at the beginning. For example, if the total - * number of results that are returned is 10 and the offset is 8, it returns the last two results. + * @param {number} [params.offset] - The number of query results to skip at the beginning. Consider that the `count` + * is set to 10 (the default value) and the total number of results that are returned is 100. In this case, the + * following examples show the returned results for different `offset` values: + * + * * If `offset` is set to 95, it returns the last 5 results. + * + * * If `offset` is set to 10, it returns the second batch of 10 results. + * + * * If `offset` is set to 100 or more, it returns empty results. * @param {string} [params.sort] - A comma-separated list of fields in the document to sort on. You can optionally * specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the * default sort direction if no prefix is specified. @@ -2663,6 +2670,215 @@ class DiscoveryV2 extends BaseService { return this.createRequest(parameters); } + /************************* + * batches + ************************/ + + /** + * List batches. + * + * A batch is a set of documents that are ready for enrichment by an external application. After you apply a webhook + * enrichment to a collection, and then process or upload documents to the collection, Discovery creates a batch with + * a unique **batch_id**. + * + * To start, you must register your external application as a **webhook** type by using the [Create enrichment + * API](/apidocs/discovery-data#createenrichment) method. + * + * Use the List batches API to get the following: + * + * * Notified batches that are not yet pulled by the external enrichment application. + * + * * Batches that are pulled, but not yet pushed to Discovery by the external enrichment application. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.projectId - The Universally Unique Identifier (UUID) of the project. This information can be + * found from the *Integrate and Deploy* page in Discovery. + * @param {string} params.collectionId - The Universally Unique Identifier (UUID) of the collection. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public listBatches( + params: DiscoveryV2.ListBatchesParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['projectId', 'collectionId']; + const _validParams = ['projectId', 'collectionId', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + }; + + const path = { + 'project_id': _params.projectId, + 'collection_id': _params.collectionId, + }; + + const sdkHeaders = getSdkHeaders(DiscoveryV2.DEFAULT_SERVICE_NAME, 'v2', 'listBatches'); + + const parameters = { + options: { + url: '/v2/projects/{project_id}/collections/{collection_id}/batches', + method: 'GET', + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * Pull batches. + * + * Pull a batch of documents from Discovery for enrichment by an external application. Ensure to include the + * `Accept-Encoding: gzip` header in this method to get the file. You can also implement retry logic when calling this + * method to avoid any network errors. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.projectId - The Universally Unique Identifier (UUID) of the project. This information can be + * found from the *Integrate and Deploy* page in Discovery. + * @param {string} params.collectionId - The Universally Unique Identifier (UUID) of the collection. + * @param {string} params.batchId - The Universally Unique Identifier (UUID) of the document batch that is being + * requested from Discovery. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public pullBatches( + params: DiscoveryV2.PullBatchesParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['projectId', 'collectionId', 'batchId']; + const _validParams = ['projectId', 'collectionId', 'batchId', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + }; + + const path = { + 'project_id': _params.projectId, + 'collection_id': _params.collectionId, + 'batch_id': _params.batchId, + }; + + const sdkHeaders = getSdkHeaders(DiscoveryV2.DEFAULT_SERVICE_NAME, 'v2', 'pullBatches'); + + const parameters = { + options: { + url: '/v2/projects/{project_id}/collections/{collection_id}/batches/{batch_id}', + method: 'GET', + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * Push batches. + * + * Push a batch of documents to Discovery after annotation by an external application. You can implement retry logic + * when calling this method to avoid any network errors. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.projectId - The Universally Unique Identifier (UUID) of the project. This information can be + * found from the *Integrate and Deploy* page in Discovery. + * @param {string} params.collectionId - The Universally Unique Identifier (UUID) of the collection. + * @param {string} params.batchId - The Universally Unique Identifier (UUID) of the document batch that is being + * requested from Discovery. + * @param {NodeJS.ReadableStream | Buffer} [params.file] - A compressed newline-delimited JSON (NDJSON), which is a + * JSON file with one row of data per line. For example, `{batch_id}.ndjson.gz`. For more information, see [Binary + * attachment in the push batches + * method](/docs/discovery-data?topic=discovery-data-external-enrichment#binary-attachment-push-batches). + * + * There is no limitation on the name of the file because Discovery does not use the name for processing. The list of + * features in the document is specified in the `features` object. + * @param {string} [params.filename] - The filename for file. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public pushBatches( + params: DiscoveryV2.PushBatchesParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['projectId', 'collectionId', 'batchId']; + const _validParams = ['projectId', 'collectionId', 'batchId', 'file', 'filename', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const formData = { + 'file': { + data: _params.file, + filename: _params.filename, + contentType: 'application/octet-stream', + }, + }; + + const query = { + 'version': this.version, + }; + + const path = { + 'project_id': _params.projectId, + 'collection_id': _params.collectionId, + 'batch_id': _params.batchId, + }; + + const sdkHeaders = getSdkHeaders(DiscoveryV2.DEFAULT_SERVICE_NAME, 'v2', 'pushBatches'); + + const parameters = { + options: { + url: '/v2/projects/{project_id}/collections/{collection_id}/batches/{batch_id}', + method: 'POST', + qs: query, + path, + formData + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + 'Content-Type': 'multipart/form-data', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } /************************* * documentClassifiers ************************/ @@ -3914,8 +4130,15 @@ namespace DiscoveryV2 { * nested (`extracted_metadata.filename`) fields. If this parameter is an empty list, then all fields are returned. */ _return?: string[]; - /** The number of query results to skip at the beginning. For example, if the total number of results that are - * returned is 10 and the offset is 8, it returns the last two results. + /** The number of query results to skip at the beginning. Consider that the `count` is set to 10 (the default + * value) and the total number of results that are returned is 100. In this case, the following examples show the + * returned results for different `offset` values: + * + * * If `offset` is set to 95, it returns the last 5 results. + * + * * If `offset` is set to 10, it returns the second batch of 10 results. + * + * * If `offset` is set to 100 or more, it returns empty results. */ offset?: number; /** A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by @@ -4279,6 +4502,53 @@ namespace DiscoveryV2 { headers?: OutgoingHttpHeaders; } + /** Parameters for the `listBatches` operation. */ + export interface ListBatchesParams { + /** The Universally Unique Identifier (UUID) of the project. This information can be found from the *Integrate + * and Deploy* page in Discovery. + */ + projectId: string; + /** The Universally Unique Identifier (UUID) of the collection. */ + collectionId: string; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `pullBatches` operation. */ + export interface PullBatchesParams { + /** The Universally Unique Identifier (UUID) of the project. This information can be found from the *Integrate + * and Deploy* page in Discovery. + */ + projectId: string; + /** The Universally Unique Identifier (UUID) of the collection. */ + collectionId: string; + /** The Universally Unique Identifier (UUID) of the document batch that is being requested from Discovery. */ + batchId: string; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `pushBatches` operation. */ + export interface PushBatchesParams { + /** The Universally Unique Identifier (UUID) of the project. This information can be found from the *Integrate + * and Deploy* page in Discovery. + */ + projectId: string; + /** The Universally Unique Identifier (UUID) of the collection. */ + collectionId: string; + /** The Universally Unique Identifier (UUID) of the document batch that is being requested from Discovery. */ + batchId: string; + /** A compressed newline-delimited JSON (NDJSON), which is a JSON file with one row of data per line. For + * example, `{batch_id}.ndjson.gz`. For more information, see [Binary attachment in the push batches + * method](/docs/discovery-data?topic=discovery-data-external-enrichment#binary-attachment-push-batches). + * + * There is no limitation on the name of the file because Discovery does not use the name for processing. The list + * of features in the document is specified in the `features` object. + */ + file?: NodeJS.ReadableStream | Buffer; + /** The filename for file. */ + filename?: string; + headers?: OutgoingHttpHeaders; + } + /** Parameters for the `listDocumentClassifiers` operation. */ export interface ListDocumentClassifiersParams { /** The Universally Unique Identifier (UUID) of the project. This information can be found from the *Integrate @@ -4513,7 +4783,10 @@ namespace DiscoveryV2 { * model interfaces ************************/ - /** An object that contains the converted document and any identified enrichments. Root-level fields from the original file are returned also. */ + /** + * An object that contains the converted document and any identified enrichments. Root-level fields from the original + * file are returned also. + */ export interface AnalyzedDocument { /** Array of notices that are triggered when the files are processed. */ notices?: Notice[]; @@ -4521,15 +4794,38 @@ namespace DiscoveryV2 { result?: AnalyzedResult; } - /** Result of the document analysis. */ + /** + * Result of the document analysis. + * + * This type supports additional properties of type any. The remaining key-value pairs. + */ export interface AnalyzedResult { /** Metadata that was specified with the request. */ metadata?: JsonObject; - /** AnalyzedResult accepts additional properties. */ + + /** + * AnalyzedResult accepts additional properties of type any. The remaining key-value pairs. + */ [propName: string]: any; } - /** An object with details for creating federated document classifier models. */ + /** + * A batch is a set of documents that are ready for enrichment by an external application. After you apply a webhook + * enrichment to a collection, and then process or upload documents to the collection, Discovery creates a batch with + * a unique **batch_id**. + */ + export interface BatchDetails { + /** The Universally Unique Identifier (UUID) for a batch of documents. */ + batch_id?: string; + /** The date and time (RFC3339) that the batch was created. */ + created?: string; + /** The Universally Unique Identifier (UUID) for the external enrichment. */ + enrichment_id?: string; + } + + /** + * An object with details for creating federated document classifier models. + */ export interface ClassifierFederatedModel { /** Name of the field that contains the values from which multiple classifier models are defined. For example, * you can specify a field that lists product lines to create a separate model per product line. @@ -4537,7 +4833,9 @@ namespace DiscoveryV2 { field: string; } - /** An object that contains information about a trained document classifier model. */ + /** + * An object that contains information about a trained document classifier model. + */ export interface ClassifierModelEvaluation { /** A micro-average aggregates the contributions of all classes to compute the average metric. Classes refers to * the classification labels that are specified in the **answer_field**. @@ -4553,7 +4851,9 @@ namespace DiscoveryV2 { per_class: PerClassModelEvaluation[]; } - /** A collection for storing documents. */ + /** + * A collection for storing documents. + */ export interface Collection { /** The Universally Unique Identifier (UUID) of the collection. */ collection_id?: string; @@ -4561,7 +4861,9 @@ namespace DiscoveryV2 { name?: string; } - /** A collection for storing documents. */ + /** + * A collection for storing documents. + */ export interface CollectionDetails { /** The Universally Unique Identifier (UUID) of the collection. */ collection_id?: string; @@ -4591,7 +4893,9 @@ namespace DiscoveryV2 { smart_document_understanding?: CollectionDetailsSmartDocumentUnderstanding; } - /** An object that describes the Smart Document Understanding model for a collection. */ + /** + * An object that describes the Smart Document Understanding model for a collection. + */ export interface CollectionDetailsSmartDocumentUnderstanding { /** When `true`, smart document understanding conversion is enabled for the collection. */ enabled?: boolean; @@ -4624,7 +4928,9 @@ namespace DiscoveryV2 { } } - /** An object describing an enrichment for a collection. */ + /** + * An object describing an enrichment for a collection. + */ export interface CollectionEnrichment { /** The unique identifier of this enrichment. For more information about how to determine the ID of an * enrichment, see [the product @@ -4639,13 +4945,17 @@ namespace DiscoveryV2 { fields?: string[]; } - /** An object that contains an array of autocompletion suggestions. */ + /** + * An object that contains an array of autocompletion suggestions. + */ export interface Completions { /** Array of autocomplete suggestion based on the provided prefix. */ completions?: string[]; } - /** Display settings for aggregations. */ + /** + * Display settings for aggregations. + */ export interface ComponentSettingsAggregation { /** Identifier used to map aggregation settings to aggregation configuration. */ name?: string; @@ -4668,7 +4978,9 @@ namespace DiscoveryV2 { } } - /** Fields shown in the results section of the UI. */ + /** + * Fields shown in the results section of the UI. + */ export interface ComponentSettingsFieldsShown { /** Body label. */ body?: ComponentSettingsFieldsShownBody; @@ -4676,7 +4988,9 @@ namespace DiscoveryV2 { title?: ComponentSettingsFieldsShownTitle; } - /** Body label. */ + /** + * Body label. + */ export interface ComponentSettingsFieldsShownBody { /** Use the whole passage as the body. */ use_passage?: boolean; @@ -4684,13 +4998,17 @@ namespace DiscoveryV2 { field?: string; } - /** Title label. */ + /** + * Title label. + */ export interface ComponentSettingsFieldsShownTitle { /** Use a specific field as the title. */ field?: string; } - /** The default component settings for this project. */ + /** + * The default component settings for this project. + */ export interface ComponentSettingsResponse { /** Fields shown in the results section of the UI. */ fields_shown?: ComponentSettingsFieldsShown; @@ -4704,7 +5022,9 @@ namespace DiscoveryV2 { aggregations?: ComponentSettingsAggregation[]; } - /** An object that manages the settings and data that is required to train a document classification model. */ + /** + * An object that manages the settings and data that is required to train a document classification model. + */ export interface CreateDocumentClassifier { /** A human-readable name of the document classifier. */ name: string; @@ -4725,7 +5045,9 @@ namespace DiscoveryV2 { federated_classification?: ClassifierFederatedModel; } - /** Information about a specific enrichment. */ + /** + * Information about a specific enrichment. + */ export interface CreateEnrichment { /** The human readable name for this enrichment. */ name?: string; @@ -4755,9 +5077,7 @@ namespace DiscoveryV2 { * * `watson_knowledge_studio_model`: Creates an enrichment from a Watson Knowledge Studio machine learning model * that is defined in a ZIP file. * - * * `webhook`: Connects to an external enrichment application by using a webhook. The feature is available from - * IBM Cloud-managed instances only. The external enrichment feature is beta functionality. Beta features are not - * supported by the SDKs. + * * `webhook`: Connects to an external enrichment application by using a webhook. * * * `sentence_classifier`: Use sentence classifier to classify sentences in your documents. This feature is * available in IBM Cloud-managed instances only. The sentence classifier feature is beta functionality. Beta @@ -4771,7 +5091,7 @@ namespace DiscoveryV2 { } export namespace CreateEnrichment { export namespace Constants { - /** The type of this enrichment. The following types are supported: * `classifier`: Creates a document classifier enrichment from a document classifier model that you create by using the [Document classifier API](/apidocs/discovery-data#createdocumentclassifier). **Note**: A text classifier enrichment can be created only from the product user interface. * `dictionary`: Creates a custom dictionary enrichment that you define in a CSV file. * `regular_expression`: Creates a custom regular expression enrichment from regex syntax that you specify in the request. * `rule_based`: Creates an enrichment from an advanced rules model that is created and exported as a ZIP file from Watson Knowledge Studio. * `uima_annotator`: Creates an enrichment from a custom UIMA text analysis model that is defined in a PEAR file created in one of the following ways: * Watson Explorer Content Analytics Studio. **Note**: Supported in IBM Cloud Pak for Data instances only. * Rule-based model that is created in Watson Knowledge Studio. * `watson_knowledge_studio_model`: Creates an enrichment from a Watson Knowledge Studio machine learning model that is defined in a ZIP file. * `webhook`: Connects to an external enrichment application by using a webhook. The feature is available from IBM Cloud-managed instances only. The external enrichment feature is beta functionality. Beta features are not supported by the SDKs. * `sentence_classifier`: Use sentence classifier to classify sentences in your documents. This feature is available in IBM Cloud-managed instances only. The sentence classifier feature is beta functionality. Beta features are not supported by the SDKs. */ + /** The type of this enrichment. The following types are supported: * `classifier`: Creates a document classifier enrichment from a document classifier model that you create by using the [Document classifier API](/apidocs/discovery-data#createdocumentclassifier). **Note**: A text classifier enrichment can be created only from the product user interface. * `dictionary`: Creates a custom dictionary enrichment that you define in a CSV file. * `regular_expression`: Creates a custom regular expression enrichment from regex syntax that you specify in the request. * `rule_based`: Creates an enrichment from an advanced rules model that is created and exported as a ZIP file from Watson Knowledge Studio. * `uima_annotator`: Creates an enrichment from a custom UIMA text analysis model that is defined in a PEAR file created in one of the following ways: * Watson Explorer Content Analytics Studio. **Note**: Supported in IBM Cloud Pak for Data instances only. * Rule-based model that is created in Watson Knowledge Studio. * `watson_knowledge_studio_model`: Creates an enrichment from a Watson Knowledge Studio machine learning model that is defined in a ZIP file. * `webhook`: Connects to an external enrichment application by using a webhook. * `sentence_classifier`: Use sentence classifier to classify sentences in your documents. This feature is available in IBM Cloud-managed instances only. The sentence classifier feature is beta functionality. Beta features are not supported by the SDKs. */ export enum Type { CLASSIFIER = 'classifier', DICTIONARY = 'dictionary', @@ -4785,7 +5105,9 @@ namespace DiscoveryV2 { } } - /** Default query parameters for this project. */ + /** + * Default query parameters for this project. + */ export interface DefaultQueryParams { /** An array of collection identifiers to query. If empty or omitted all collections in the project are queried. */ collection_ids?: string[]; @@ -4812,7 +5134,9 @@ namespace DiscoveryV2 { return?: string[]; } - /** Default settings configuration for passage search options. */ + /** + * Default settings configuration for passage search options. + */ export interface DefaultQueryParamsPassages { /** When `true`, a passage search is performed by default. */ enabled?: boolean; @@ -4832,7 +5156,11 @@ namespace DiscoveryV2 { max_per_document?: number; } - /** Object that contains suggested refinement settings. **Note**: The `suggested_refinements` parameter that identified dynamic facets from the data is deprecated. */ + /** + * Object that contains suggested refinement settings. + * + * **Note**: The `suggested_refinements` parameter that identified dynamic facets from the data is deprecated. + */ export interface DefaultQueryParamsSuggestedRefinements { /** When `true`, suggested refinements for the query are returned by default. */ enabled?: boolean; @@ -4840,7 +5168,9 @@ namespace DiscoveryV2 { count?: number; } - /** Default project query settings for table results. */ + /** + * Default project query settings for table results. + */ export interface DefaultQueryParamsTableResults { /** When `true`, a table results for the query are returned by default. */ enabled?: boolean; @@ -4850,7 +5180,9 @@ namespace DiscoveryV2 { per_document?: number; } - /** Information returned when a document is deleted. */ + /** + * Information returned when a document is deleted. + */ export interface DeleteDocumentResponse { /** The unique identifier of the document. */ document_id?: string; @@ -4866,7 +5198,9 @@ namespace DiscoveryV2 { } } - /** Information returned after an uploaded document is accepted. */ + /** + * Information returned after an uploaded document is accepted. + */ export interface DocumentAccepted { /** The unique identifier of the ingested document. */ document_id?: string; @@ -4885,7 +5219,9 @@ namespace DiscoveryV2 { } } - /** List of document attributes. */ + /** + * List of document attributes. + */ export interface DocumentAttribute { /** The type of attribute. */ type?: string; @@ -4897,7 +5233,9 @@ namespace DiscoveryV2 { location?: TableElementLocation; } - /** Information about a document classifier. */ + /** + * Information about a document classifier. + */ export interface DocumentClassifier { /** The Universally Unique Identifier (UUID) of the document classifier. */ classifier_id?: string; @@ -4933,7 +5271,10 @@ namespace DiscoveryV2 { federated_classification?: ClassifierFederatedModel; } - /** An object that describes enrichments that are applied to the training and test data that is used by the document classifier. */ + /** + * An object that describes enrichments that are applied to the training and test data that is used by the document + * classifier. + */ export interface DocumentClassifierEnrichment { /** The Universally Unique Identifier (UUID) of the enrichment. */ enrichment_id: string; @@ -4941,7 +5282,9 @@ namespace DiscoveryV2 { fields: string[]; } - /** Information about a document classifier model. */ + /** + * Information about a document classifier model. + */ export interface DocumentClassifierModel { /** The Universally Unique Identifier (UUID) of the document classifier model. */ model_id?: string; @@ -4981,19 +5324,25 @@ namespace DiscoveryV2 { } } - /** An object that contains a list of document classifier model definitions. */ + /** + * An object that contains a list of document classifier model definitions. + */ export interface DocumentClassifierModels { /** An array of document classifier model definitions. */ models?: DocumentClassifierModel[]; } - /** An object that contains a list of document classifier definitions. */ + /** + * An object that contains a list of document classifier definitions. + */ export interface DocumentClassifiers { /** An array of document classifier definitions. */ classifiers?: DocumentClassifier[]; } - /** Information about a document. */ + /** + * Information about a document. + */ export interface DocumentDetails { /** The unique identifier of the document. */ document_id?: string; @@ -5047,7 +5396,10 @@ namespace DiscoveryV2 { } } - /** Information about the child documents that are generated from a single document during ingestion or other processing. */ + /** + * Information about the child documents that are generated from a single document during ingestion or other + * processing. + */ export interface DocumentDetailsChildren { /** Indicates whether the child documents have any notices. The value is `false` if the document does not have * child documents. @@ -5059,7 +5411,9 @@ namespace DiscoveryV2 { count?: number; } - /** Information about a specific enrichment. */ + /** + * Information about a specific enrichment. + */ export interface Enrichment { /** The Universally Unique Identifier (UUID) of this enrichment. */ enrichment_id?: string; @@ -5093,7 +5447,10 @@ namespace DiscoveryV2 { } } - /** An object that contains options for the current enrichment. Starting with version `2020-08-30`, the enrichment options are not included in responses from the List Enrichments method. */ + /** + * An object that contains options for the current enrichment. Starting with version `2020-08-30`, the enrichment + * options are not included in responses from the List Enrichments method. + */ export interface EnrichmentOptions { /** An array of supported languages for this enrichment. When creating an enrichment, only specify a language * that is used by the model or in the dictionary. Required when **type** is `dictionary`. Optional when **type** @@ -5156,13 +5513,25 @@ namespace DiscoveryV2 { location_encoding?: string; } - /** An object that contains an array of enrichment definitions. */ + /** + * An object that contains an array of enrichment definitions. + */ export interface Enrichments { /** An array of enrichment definitions. */ enrichments?: Enrichment[]; } - /** An expansion definition. Each object respresents one set of expandable strings. For example, you could have expansions for the word `hot` in one object, and expansions for the word `cold` in another. Follow these guidelines when you add terms: * Specify the terms in lowercase. Lowercase terms expand to uppercase. * Multiword terms are supported only in bidirectional expansions. * Do not specify a term that is specified in the stop words list for the collection. */ + /** + * An expansion definition. Each object respresents one set of expandable strings. For example, you could have + * expansions for the word `hot` in one object, and expansions for the word `cold` in another. Follow these guidelines + * when you add terms: + * + * * Specify the terms in lowercase. Lowercase terms expand to uppercase. + * + * * Multiword terms are supported only in bidirectional expansions. + * + * * Do not specify a term that is specified in the stop words list for the collection. + */ export interface Expansion { /** A list of terms that will be expanded for this expansion. If specified, only the items in this list are * expanded. @@ -5174,7 +5543,9 @@ namespace DiscoveryV2 { expanded_terms: string[]; } - /** The query expansion definitions for the specified collection. */ + /** + * The query expansion definitions for the specified collection. + */ export interface Expansions { /** An array of query expansion definitions. * @@ -5192,7 +5563,9 @@ namespace DiscoveryV2 { expansions: Expansion[]; } - /** Object that contains field details. */ + /** + * Object that contains field details. + */ export interface Field { /** The name of the field. */ field?: string; @@ -5220,13 +5593,25 @@ namespace DiscoveryV2 { } } - /** Response object that contains an array of collection details. */ + /** + * An object that contains a list of batches that are ready for enrichment by the external application. + */ + export interface ListBatchesResponse { + /** An array that lists the batches in a collection. */ + batches?: BatchDetails[]; + } + + /** + * Response object that contains an array of collection details. + */ export interface ListCollectionsResponse { /** An array that contains information about each collection in the project. */ collections?: Collection[]; } - /** Response object that contains an array of documents. */ + /** + * Response object that contains an array of documents. + */ export interface ListDocumentsResponse { /** The number of matching results for the document query. */ matching_results?: number; @@ -5236,19 +5621,34 @@ namespace DiscoveryV2 { documents?: DocumentDetails[]; } - /** The list of fetched fields. The fields are returned using a fully qualified name format, however, the format differs slightly from that used by the query operations. * Fields which contain nested objects are assigned a type of "nested". * Fields which belong to a nested object are prefixed with `.properties` (for example, `warnings.properties.severity` means that the `warnings` object has a property called `severity`). */ + /** + * The list of fetched fields. + * + * The fields are returned using a fully qualified name format, however, the format differs slightly from that used by + * the query operations. + * + * * Fields which contain nested objects are assigned a type of "nested". + * + * * Fields which belong to a nested object are prefixed with `.properties` (for example, + * `warnings.properties.severity` means that the `warnings` object has a property called `severity`). + */ export interface ListFieldsResponse { /** An array that contains information about each field in the collections. */ fields?: Field[]; } - /** A list of projects in this instance. */ + /** + * A list of projects in this instance. + */ export interface ListProjectsResponse { /** An array of project details. */ projects?: ProjectListDetails[]; } - /** A macro-average computes metric independently for each class and then takes the average. Class refers to the classification label that is specified in the **answer_field**. */ + /** + * A macro-average computes metric independently for each class and then takes the average. Class refers to the + * classification label that is specified in the **answer_field**. + */ export interface ModelEvaluationMacroAverage { /** A metric that measures how many of the overall documents are classified correctly. */ precision: number; @@ -5263,7 +5663,10 @@ namespace DiscoveryV2 { f1: number; } - /** A micro-average aggregates the contributions of all classes to compute the average metric. Classes refers to the classification labels that are specified in the **answer_field**. */ + /** + * A micro-average aggregates the contributions of all classes to compute the average metric. Classes refers to the + * classification labels that are specified in the **answer_field**. + */ export interface ModelEvaluationMicroAverage { /** A metric that measures how many of the overall documents are classified correctly. */ precision: number; @@ -5278,7 +5681,9 @@ namespace DiscoveryV2 { f1: number; } - /** A notice produced for the collection. */ + /** + * A notice produced for the collection. + */ export interface Notice { /** Identifies the notice. Many notices might have the same ID. This field exists so that user applications can * programmatically identify a notice and take automatic corrective action. Typical notice IDs include: @@ -5317,7 +5722,9 @@ namespace DiscoveryV2 { } } - /** An object that measures the metrics from a training run for each classification label separately. */ + /** + * An object that measures the metrics from a training run for each classification label separately. + */ export interface PerClassModelEvaluation { /** Class name. Each class name is derived from a value in the **answer_field**. */ name: string; @@ -5334,7 +5741,9 @@ namespace DiscoveryV2 { f1: number; } - /** Detailed information about the specified project. */ + /** + * Detailed information about the specified project. + */ export interface ProjectDetails { /** The Universally Unique Identifier (UUID) of this project. */ project_id?: string; @@ -5372,7 +5781,9 @@ namespace DiscoveryV2 { } } - /** Details about a specific project. */ + /** + * Details about a specific project. + */ export interface ProjectListDetails { /** The Universally Unique Identifier (UUID) of this project. */ project_id?: string; @@ -5408,7 +5819,9 @@ namespace DiscoveryV2 { } } - /** Relevancy training status information for this project. */ + /** + * Relevancy training status information for this project. + */ export interface ProjectListDetailsRelevancyTrainingStatus { /** When the training data was updated. */ data_updated?: string; @@ -5430,11 +5843,15 @@ namespace DiscoveryV2 { minimum_queries_added?: boolean; } - /** An object that defines how to aggregate query results. */ + /** + * An object that defines how to aggregate query results. + */ export interface QueryAggregation { } - /** Result group for the `group_by` aggregation. */ + /** + * Result group for the `group_by` aggregation. + */ export interface QueryGroupByAggregationResult { /** The condition that is met by the documents in this group. For example, `YEARTXT<2000`. */ key: string; @@ -5454,7 +5871,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** Histogram numeric interval result. */ + /** + * Histogram numeric interval result. + */ export interface QueryHistogramAggregationResult { /** The value of the upper bound for the numeric segment. */ key: number; @@ -5464,7 +5883,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** Configuration for passage retrieval. */ + /** + * Configuration for passage retrieval. + */ export interface QueryLargePassages { /** A passages query that returns the most relevant passages from the results. */ enabled?: boolean; @@ -5511,7 +5932,11 @@ namespace DiscoveryV2 { max_answers_per_passage?: number; } - /** Finds results from documents that are similar to documents of interest. Use this parameter to add a *More like these* function to your search. You can include this parameter with or without a **query**, **filter** or **natural_language_query** parameter. */ + /** + * Finds results from documents that are similar to documents of interest. Use this parameter to add a *More like + * these* function to your search. You can include this parameter with or without a **query**, **filter** or + * **natural_language_query** parameter. + */ export interface QueryLargeSimilar { /** When `true`, includes documents in the query results that are similar to documents you specify. */ enabled?: boolean; @@ -5523,7 +5948,11 @@ namespace DiscoveryV2 { fields?: string[]; } - /** Configuration for suggested refinements. **Note**: The **suggested_refinements** parameter that identified dynamic facets from the data is deprecated. */ + /** + * Configuration for suggested refinements. + * + * **Note**: The **suggested_refinements** parameter that identified dynamic facets from the data is deprecated. + */ export interface QueryLargeSuggestedRefinements { /** Whether to perform suggested refinements. */ enabled?: boolean; @@ -5531,7 +5960,9 @@ namespace DiscoveryV2 { count?: number; } - /** Configuration for table retrieval. */ + /** + * Configuration for table retrieval. + */ export interface QueryLargeTableResults { /** Whether to enable table retrieval. */ enabled?: boolean; @@ -5539,7 +5970,9 @@ namespace DiscoveryV2 { count?: number; } - /** Object that contains notice query results. */ + /** + * Object that contains notice query results. + */ export interface QueryNoticesResponse { /** The number of matching results. */ matching_results?: number; @@ -5547,7 +5980,9 @@ namespace DiscoveryV2 { notices?: Notice[]; } - /** Result for the `pair` aggregation. */ + /** + * Result for the `pair` aggregation. + */ export interface QueryPairAggregationResult { /** Array of subaggregations of type `term`, `group_by`, `histogram`, or `timeslice`. Each element of the matrix * that is returned contains a **relevancy** value that is calculated from the combination of each value from the @@ -5556,7 +5991,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** A response that contains the documents and aggregations for the query. */ + /** + * A response that contains the documents and aggregations for the query. + */ export interface QueryResponse { /** The number of matching results for the query. Results that match due to a curation only are not counted in * the total. @@ -5582,7 +6019,9 @@ namespace DiscoveryV2 { passages?: QueryResponsePassage[]; } - /** A passage query response. */ + /** + * A passage query response. + */ export interface QueryResponsePassage { /** The content of the extracted passage. */ passage_text?: string; @@ -5606,7 +6045,11 @@ namespace DiscoveryV2 { answers?: ResultPassageAnswer[]; } - /** Result document for the specified query. */ + /** + * Result document for the specified query. + * + * This type supports additional properties of type any. The remaining key-value pairs. + */ export interface QueryResult { /** The unique identifier of the document. */ document_id: string; @@ -5616,11 +6059,16 @@ namespace DiscoveryV2 { result_metadata: QueryResultMetadata; /** Passages from the document that best matches the query. Returned if **passages.per_document** is `true`. */ document_passages?: QueryResultPassage[]; - /** QueryResult accepts additional properties. */ + + /** + * QueryResult accepts additional properties of type any. The remaining key-value pairs. + */ [propName: string]: any; } - /** Metadata of a query result. */ + /** + * Metadata of a query result. + */ export interface QueryResultMetadata { /** The document retrieval source that produced this search result. */ document_retrieval_source?: QueryResultMetadata.Constants.DocumentRetrievalSource | string; @@ -5643,7 +6091,9 @@ namespace DiscoveryV2 { } } - /** A passage query result. */ + /** + * A passage query result. + */ export interface QueryResultPassage { /** The content of the extracted passage. */ passage_text?: string; @@ -5659,13 +6109,18 @@ namespace DiscoveryV2 { answers?: ResultPassageAnswer[]; } - /** A suggested additional query term or terms user to filter results. **Note**: The `suggested_refinements` parameter is deprecated. */ + /** + * A suggested additional query term or terms user to filter results. **Note**: The `suggested_refinements` parameter + * is deprecated. + */ export interface QuerySuggestedRefinement { /** The text used to filter. */ text?: string; } - /** A tables whose content or context match a search query. */ + /** + * A tables whose content or context match a search query. + */ export interface QueryTableResult { /** The identifier for the retrieved table. */ table_id?: string; @@ -5681,7 +6136,9 @@ namespace DiscoveryV2 { table?: TableResultTable; } - /** Top value result for the `term` aggregation. */ + /** + * Top value result for the `term` aggregation. + */ export interface QueryTermAggregationResult { /** Value of the field with a nonzero frequency in the document set. */ key: string; @@ -5703,7 +6160,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** A timeslice interval segment. */ + /** + * A timeslice interval segment. + */ export interface QueryTimesliceAggregationResult { /** String date value of the upper bound for the timeslice interval in ISO-8601 format. */ key_as_string: string; @@ -5715,7 +6174,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** A query response that contains the matching documents for the preceding aggregations. */ + /** + * A query response that contains the matching documents for the preceding aggregations. + */ export interface QueryTopHitsAggregationResult { /** Number of matching results. */ matching_results: number; @@ -5723,7 +6184,9 @@ namespace DiscoveryV2 { hits?: JsonObject[]; } - /** Result for the `topic` aggregation. */ + /** + * Result for the `topic` aggregation. + */ export interface QueryTopicAggregationResult { /** Array of subaggregations of type `term` or `group_by` and `timeslice`. Each element of the matrix that is * returned contains a **topic_indicator** that is calculated from the combination of each aggregation value and @@ -5732,7 +6195,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** Result for the `trend` aggregation. */ + /** + * Result for the `trend` aggregation. + */ export interface QueryTrendAggregationResult { /** Array of subaggregations of type `term` or `group_by` and `timeslice`. Each element of the matrix that is * returned contains a **trend_indicator** that is calculated from the combination of each aggregation value and @@ -5741,7 +6206,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** Object that contains a potential answer to the specified query. */ + /** + * Object that contains a potential answer to the specified query. + */ export interface ResultPassageAnswer { /** Answer text for the specified query as identified by Discovery. */ answer_text?: string; @@ -5753,7 +6220,9 @@ namespace DiscoveryV2 { confidence?: number; } - /** An object contain retrieval type information. */ + /** + * An object contain retrieval type information. + */ export interface RetrievalDetails { /** Identifies the document retrieval strategy used for this query. `relevancy_training` indicates that the * results were returned using a relevancy trained model. @@ -5773,13 +6242,17 @@ namespace DiscoveryV2 { } } - /** List of words to filter out of text that is submitted in queries. */ + /** + * List of words to filter out of text that is submitted in queries. + */ export interface StopWordList { /** List of stop words. */ stopwords: string[]; } - /** Cells that are not table header, column header, or row header cells. */ + /** + * Cells that are not table header, column header, or row header cells. + */ export interface TableBodyCells { /** The unique ID of the cell in the current table. */ cell_id?: string; @@ -5813,7 +6286,9 @@ namespace DiscoveryV2 { attributes?: DocumentAttribute[]; } - /** A key in a key-value pair. */ + /** + * A key in a key-value pair. + */ export interface TableCellKey { /** The unique ID of the key in the table. */ cell_id?: string; @@ -5825,7 +6300,9 @@ namespace DiscoveryV2 { text?: string; } - /** A value in a key-value pair. */ + /** + * A value in a key-value pair. + */ export interface TableCellValues { /** The unique ID of the value in the table. */ cell_id?: string; @@ -5837,7 +6314,9 @@ namespace DiscoveryV2 { text?: string; } - /** Column-level cells, each applicable as a header to other cells in the same column as itself, of the current table. */ + /** + * Column-level cells, each applicable as a header to other cells in the same column as itself, of the current table. + */ export interface TableColumnHeaders { /** The unique ID of the cell in the current table. */ cell_id?: string; @@ -5859,7 +6338,10 @@ namespace DiscoveryV2 { column_index_end?: number; } - /** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */ + /** + * The numeric location of the identified element in the document, represented with two integers labeled `begin` and + * `end`. + */ export interface TableElementLocation { /** The element's `begin` index. */ begin: number; @@ -5867,7 +6349,9 @@ namespace DiscoveryV2 { end: number; } - /** The contents of the current table's header. */ + /** + * The contents of the current table's header. + */ export interface TableHeaders { /** The unique ID of the cell in the current table. */ cell_id?: string; @@ -5887,7 +6371,9 @@ namespace DiscoveryV2 { column_index_end?: number; } - /** Key-value pairs detected across cell boundaries. */ + /** + * Key-value pairs detected across cell boundaries. + */ export interface TableKeyValuePairs { /** A key in a key-value pair. */ key?: TableCellKey; @@ -5895,7 +6381,9 @@ namespace DiscoveryV2 { value?: TableCellValues[]; } - /** Full table object retrieved from Table Understanding Enrichment. */ + /** + * Full table object retrieved from Table Understanding Enrichment. + */ export interface TableResultTable { /** The numeric location of the identified element in the document, represented with two integers labeled * `begin` and `end`. @@ -5927,7 +6415,9 @@ namespace DiscoveryV2 { contexts?: TableTextLocation[]; } - /** Row-level cells, each applicable as a header to other cells in the same row as itself, of the current table. */ + /** + * Row-level cells, each applicable as a header to other cells in the same row as itself, of the current table. + */ export interface TableRowHeaders { /** The unique ID of the cell in the current table. */ cell_id?: string; @@ -5949,7 +6439,9 @@ namespace DiscoveryV2 { column_index_end?: number; } - /** Text and associated location within a table. */ + /** + * Text and associated location within a table. + */ export interface TableTextLocation { /** The text retrieved. */ text?: string; @@ -5959,7 +6451,9 @@ namespace DiscoveryV2 { location?: TableElementLocation; } - /** Object that contains example response details for a training query. */ + /** + * Object that contains example response details for a training query. + */ export interface TrainingExample { /** The document ID associated with this training example. */ document_id: string; @@ -5975,7 +6469,9 @@ namespace DiscoveryV2 { updated?: string; } - /** Object that contains training query details. */ + /** + * Object that contains training query details. + */ export interface TrainingQuery { /** The query ID associated with the training query. */ query_id?: string; @@ -5995,7 +6491,9 @@ namespace DiscoveryV2 { examples: TrainingExample[]; } - /** Object specifying the training queries contained in the identified training set. */ + /** + * Object specifying the training queries contained in the identified training set. + */ export interface TrainingQuerySet { /** Array of training queries. At least 50 queries are required for training to begin. A maximum of 10,000 * queries are returned. @@ -6003,7 +6501,10 @@ namespace DiscoveryV2 { queries?: TrainingQuery[]; } - /** An object that contains a new name or description for a document classifier, updated training data, or new or updated test data. */ + /** + * An object that contains a new name or description for a document classifier, updated training data, or new or + * updated test data. + */ export interface UpdateDocumentClassifier { /** A new name for the classifier. */ name?: string; @@ -6011,7 +6512,10 @@ namespace DiscoveryV2 { description?: string; } - /** An array of headers to pass with the HTTP request. Optional when `type` is `webhook`. Not valid when creating any other type of enrichment. */ + /** + * An array of headers to pass with the HTTP request. Optional when `type` is `webhook`. Not valid when creating any + * other type of enrichment. + */ export interface WebhookHeader { /** The name of an HTTP header. */ name: string; @@ -6019,7 +6523,21 @@ namespace DiscoveryV2 { value: string; } - /** Returns a scalar calculation across all documents for the field specified. Possible calculations include min, max, sum, average, and unique_count. */ + /** + * A compressed newline delimited JSON (NDJSON) file containing the document. The NDJSON format is used to describe + * structured data. The file name format is `{batch_id}.ndjson.gz`. For more information, see [Binary attachment from + * the pull batches + * method](/docs/discovery-data?topic=discovery-data-external-enrichment#binary-attachment-pull-batches). + */ + export interface PullBatchesResponse { + /** A compressed NDJSON file containing the document. */ + file?: string; + } + + /** + * Returns a scalar calculation across all documents for the field specified. Possible calculations include min, max, + * sum, average, and unique_count. + */ export interface QueryAggregationQueryCalculationAggregation extends QueryAggregation { /** Specifies the calculation type, such as 'average`, `max`, `min`, `sum`, or `unique_count`. */ type?: string; @@ -6029,7 +6547,9 @@ namespace DiscoveryV2 { value?: number; } - /** A modifier that narrows the document set of the subaggregations it precedes. */ + /** + * A modifier that narrows the document set of the subaggregations it precedes. + */ export interface QueryAggregationQueryFilterAggregation extends QueryAggregation { /** Specifies that the aggregation type is `filter`. */ type?: string; @@ -6043,7 +6563,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** Separates document results into groups that meet the conditions you specify. */ + /** + * Separates document results into groups that meet the conditions you specify. + */ export interface QueryAggregationQueryGroupByAggregation extends QueryAggregation { /** Specifies that the aggregation type is `group_by`. */ type?: string; @@ -6051,7 +6573,10 @@ namespace DiscoveryV2 { results?: QueryGroupByAggregationResult[]; } - /** Numeric interval segments to categorize documents by using field values from a single numeric field to describe the category. */ + /** + * Numeric interval segments to categorize documents by using field values from a single numeric field to describe the + * category. + */ export interface QueryAggregationQueryHistogramAggregation extends QueryAggregation { /** Specifies that the aggregation type is `histogram`. */ type?: string; @@ -6065,7 +6590,10 @@ namespace DiscoveryV2 { results?: QueryHistogramAggregationResult[]; } - /** A restriction that alters the document set that is used by the aggregations that it precedes. Subsequent aggregations are applied to nested documents from the specified field. */ + /** + * A restriction that alters the document set that is used by the aggregations that it precedes. Subsequent + * aggregations are applied to nested documents from the specified field. + */ export interface QueryAggregationQueryNestedAggregation extends QueryAggregation { /** Specifies that the aggregation type is `nested`. */ type?: string; @@ -6077,7 +6605,9 @@ namespace DiscoveryV2 { aggregations?: JsonObject[]; } - /** Calculates relevancy values using combinations of document sets from results of the specified pair of aggregations. */ + /** + * Calculates relevancy values using combinations of document sets from results of the specified pair of aggregations. + */ export interface QueryAggregationQueryPairAggregation extends QueryAggregation { /** Specifies that the aggregation type is `pair`. */ type?: string; @@ -6097,7 +6627,9 @@ namespace DiscoveryV2 { results?: QueryPairAggregationResult[]; } - /** Returns results from the field that is specified. */ + /** + * Returns results from the field that is specified. + */ export interface QueryAggregationQueryTermAggregation extends QueryAggregation { /** Specifies that the aggregation type is `term`. */ type?: string; @@ -6113,7 +6645,9 @@ namespace DiscoveryV2 { results?: QueryTermAggregationResult[]; } - /** A specialized histogram aggregation that uses dates to create interval segments. */ + /** + * A specialized histogram aggregation that uses dates to create interval segments. + */ export interface QueryAggregationQueryTimesliceAggregation extends QueryAggregation { /** Specifies that the aggregation type is `timeslice`. */ type?: string; @@ -6127,7 +6661,9 @@ namespace DiscoveryV2 { results?: QueryTimesliceAggregationResult[]; } - /** Returns the top documents ranked by the score of the query. */ + /** + * Returns the top documents ranked by the score of the query. + */ export interface QueryAggregationQueryTopHitsAggregation extends QueryAggregation { /** Specifies that the aggregation type is `top_hits`. */ type?: string; @@ -6139,7 +6675,11 @@ namespace DiscoveryV2 { hits?: QueryTopHitsAggregationResult; } - /** Detects how much the frequency of a given facet value deviates from the expected average for the given time period. This aggregation type does not use data from previous time periods. It calculates an index by using the averages of frequency counts of other facet values for the given time period. */ + /** + * Detects how much the frequency of a given facet value deviates from the expected average for the given time period. + * This aggregation type does not use data from previous time periods. It calculates an index by using the averages of + * frequency counts of other facet values for the given time period. + */ export interface QueryAggregationQueryTopicAggregation extends QueryAggregation { /** Specifies that the aggregation type is `topic`. */ type?: string; @@ -6155,7 +6695,10 @@ namespace DiscoveryV2 { results?: QueryTopicAggregationResult[]; } - /** Detects sharp and unexpected changes in the frequency of a facet or facet value over time based on the past history of frequency changes of the facet value. */ + /** + * Detects sharp and unexpected changes in the frequency of a facet or facet value over time based on the past history + * of frequency changes of the facet value. + */ export interface QueryAggregationQueryTrendAggregation extends QueryAggregation { /** Specifies that the aggregation type is `trend`. */ type?: string; diff --git a/examples/browserify/README.md b/examples/browserify/README.md index 01d71aae0d..90b3c52f4c 100644 --- a/examples/browserify/README.md +++ b/examples/browserify/README.md @@ -14,16 +14,9 @@ and in some cases, certain methods work while others do not. Below is a partial The following services support CORS -- Tone Analyzer - Speech to Text\* - Text to Speech\* -- Personality Insights -- Visual Recognition - Natural Language Understanding - Watson Assistant \* Speech to Text and Text to Speech should be usable via the Node.js SDK, but we also have a [Speech JavaScript SDK](https://www.npmjs.com/package/watson-speech) that was specifically written for browser support. - -The following services do not support CORS - -- Language Translator diff --git a/examples/browserify/public/client.js b/examples/browserify/public/client.js index 2a8c594d5f..d99f3c6e64 100644 --- a/examples/browserify/public/client.js +++ b/examples/browserify/public/client.js @@ -11,12 +11,11 @@ // // * fetch() is a modern version of XMLHttpRequest. A pollyfill is available for older browsers: https://github.com/github/fetch -const ToneAnalyzerV3 = require('ibm-watson/tone-analyzer/v3'); +const TextToSpeechV1 = require('ibm-watson/text-to-speech/v1'); const { BearerTokenAuthenticator } = require('ibm-watson/auth'); +const fs = require('fs'); const btn = document.getElementById('analyze-btn'); -const input = document.getElementById('input'); -const output = document.getElementById('output'); /** * @return {Promise} returns a promise that resolves to a string token @@ -26,23 +25,28 @@ function getToken() { } function analyze(credentials) { - const toneAnalyzer = new ToneAnalyzerV3({ + const textToSpeech = new TextToSpeechV1({ authenticator: new BearerTokenAuthenticator({ bearerToken: credentials.accessToken, }), url: credentials.url, - version: '2016-05-19', + version: '2023-03-31', }); - toneAnalyzer - .tone({ - toneInput: { text: input.value }, - contentType: 'application/json', - }) - .then(({ result }) => { - output.innerHTML = JSON.stringify(result, null, 2); + + const synthesizeParams = { + text: 'Hello from IBM Watson', + accept: 'audio/mp3', + voice: 'en-US_AllisonVoice', + }; + + textToSpeech + .synthesize(synthesizeParams) + .then(response => { + const audio = response.result; + audio.pipe(fs.createWriteStream('hello_world.mp3')); }) - .catch(error => { - output.innerHTML = error; + .catch(err => { + console.log('error:', err); }); } diff --git a/examples/discovery.v1.js b/examples/discovery.v1.js deleted file mode 100644 index ada3d86d3f..0000000000 --- a/examples/discovery.v1.js +++ /dev/null @@ -1,27 +0,0 @@ -const DiscoveryV1 = require('ibm-watson/discovery/v1'); -const fs = require('fs'); - -const discovery = new DiscoveryV1({ - // See: https://github.com/watson-developer-cloud/node-sdk#authentication - version: '2019-04-30', -}); - -discovery - .listEnvironments() - .then(response => { - console.log(JSON.stringify(response.result, null, 2)); - }) - .catch(error => console.error(error)); - -const file = fs.createReadStream('./resources/sample-docx.docx'); - -discovery - .addDocument({ - environmentId: 'YOUR ENVIRONMENT ID', - collectionId: 'YOUR COLLECTION ID', - file, - }) - .then(response => { - console.log(JSON.stringify(response.result, null, 2)); - }) - .catch(error => console.error(error)); diff --git a/examples/language_translator.v3.js b/examples/language_translator.v3.js deleted file mode 100644 index 5b2196f0f2..0000000000 --- a/examples/language_translator.v3.js +++ /dev/null @@ -1,20 +0,0 @@ -const LanguageTranslatorV3 = require('ibm-watson/language-translator/v3'); - -/** - * Instantiate the Watson Language Translator Service - */ -const languageTranslator = new LanguageTranslatorV3({ - // See: https://github.com/watson-developer-cloud/node-sdk#authentication - version: '2018-05-01', -}); - -languageTranslator - .translate({ - text: 'Hello, this is a example of translating language with Watson.', - source: 'en', - target: 'es', - }) - .then(response => { - console.log(JSON.stringify(response.result, null, 2)); - }) - .catch(error => console.error(error)); diff --git a/language-translator/v3.ts b/language-translator/v3.ts deleted file mode 100644 index e36c847da4..0000000000 --- a/language-translator/v3.ts +++ /dev/null @@ -1,1475 +0,0 @@ -/** - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 - */ - -import * as extend from 'extend'; -import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'; -import { - Authenticator, - BaseService, - UserOptions, - getAuthenticatorFromEnvironment, - validateParams, -} from 'ibm-cloud-sdk-core'; -import { getSdkHeaders } from '../lib/common'; - -/** - * IBM® is announcing the deprecation of the Watson® Language Translator service for IBM Cloud® in all - * regions. As of 10 June 2023, the Language Translator tile will be removed from the IBM Cloud Platform for new - * customers; only existing customers will be able to access the product. As of 10 June 2024, the service will reach its - * End of Support date. As of 10 December 2024, the service will be withdrawn entirely and will no longer be available - * to any customers.{: deprecated} - * - * IBM Watson™ Language Translator translates text from one language to another. The service offers multiple - * IBM-provided translation models that you can customize based on your unique terminology and language. Use Language - * Translator to take news from across the globe and present it in your language, communicate with your customers in - * their own language, and more. - * - * API Version: 3.0.0 - * See: https://cloud.ibm.com/docs/language-translator - */ - -class LanguageTranslatorV3 extends BaseService { - static DEFAULT_SERVICE_URL: string = 'https://api.us-south.language-translator.watson.cloud.ibm.com'; - - static DEFAULT_SERVICE_NAME: string = 'language_translator'; - - /** Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current - * version is `2018-05-01`. - */ - version: string; - - /** - * Construct a LanguageTranslatorV3 object. - * - * @param {Object} options - Options for the service. - * @param {string} options.version - Release date of the version of the API you want to use. Specify dates in - * YYYY-MM-DD format. The current version is `2018-05-01`. - * @param {string} [options.serviceUrl] - The base URL for the service - * @param {OutgoingHttpHeaders} [options.headers] - Default headers that shall be included with every request to the service. - * @param {string} [options.serviceName] - The name of the service to configure - * @param {Authenticator} [options.authenticator] - The Authenticator object used to authenticate requests to the service. Defaults to environment if not set - * @constructor - * @returns {LanguageTranslatorV3} - */ - constructor(options: UserOptions) { - options = options || {}; - - const _requiredParams = ['version']; - const _validationErrors = validateParams(options, _requiredParams, null); - if (_validationErrors) { - throw _validationErrors; - } - if (!options.serviceName) { - options.serviceName = LanguageTranslatorV3.DEFAULT_SERVICE_NAME; - } - // If the caller didn't supply an authenticator, construct one from external configuration. - if (!options.authenticator) { - options.authenticator = getAuthenticatorFromEnvironment(options.serviceName); - } - super(options); - this.configureService(options.serviceName); - if (options.serviceUrl) { - this.setServiceUrl(options.serviceUrl); - } - this.version = options.version; - } - - /************************* - * languages - ************************/ - - /** - * List supported languages. - * - * Lists all supported languages for translation. The method returns an array of supported languages with information - * about each language. Languages are listed in alphabetical order by language code (for example, `af`, `ar`). In - * addition to basic information about each language, the response indicates whether the language is - * `supported_as_source` for translation and `supported_as_target` for translation. It also lists whether the language - * is `identifiable`. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listLanguages( - params?: LanguageTranslatorV3.ListLanguagesParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'listLanguages'); - - const parameters = { - options: { - url: '/v3/languages', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * translation - ************************/ - - /** - * Translate. - * - * Translates the input text from the source language to the target language. Specify a model ID that indicates the - * source and target languages, or specify the source and target languages individually. You can omit the source - * language to have the service attempt to detect the language from the input text. If you omit the source language, - * the request must contain sufficient input text for the service to identify the source language. - * - * You can translate a maximum of 50 KB (51,200 bytes) of text with a single request. All input text must be encoded - * in UTF-8 format. - * - * @param {Object} params - The parameters to send to the service. - * @param {string[]} params.text - Input text in UTF-8 encoding. Submit a maximum of 50 KB (51,200 bytes) of text with - * a single request. Multiple elements result in multiple translations in the response. - * @param {string} [params.modelId] - The model to use for translation. For example, `en-de` selects the IBM-provided - * base model for English-to-German translation. A model ID overrides the `source` and `target` parameters and is - * required if you use a custom model. If no model ID is specified, you must specify at least a target language. - * @param {string} [params.source] - Language code that specifies the language of the input text. If omitted, the - * service derives the source language from the input text. The input must contain sufficient text for the service to - * identify the language reliably. - * @param {string} [params.target] - Language code that specifies the target language for translation. Required if - * model ID is not specified. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public translate( - params: LanguageTranslatorV3.TranslateParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['text']; - const _validParams = ['text', 'modelId', 'source', 'target', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = { - 'text': _params.text, - 'model_id': _params.modelId, - 'source': _params.source, - 'target': _params.target, - }; - - const query = { - 'version': this.version, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'translate'); - - const parameters = { - options: { - url: '/v3/translate', - method: 'POST', - body, - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * identification - ************************/ - - /** - * List identifiable languages. - * - * Lists the languages that the service can identify. Returns the language code (for example, `en` for English or `es` - * for Spanish) and name of each language. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listIdentifiableLanguages( - params?: LanguageTranslatorV3.ListIdentifiableLanguagesParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'listIdentifiableLanguages'); - - const parameters = { - options: { - url: '/v3/identifiable_languages', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Identify language. - * - * Identifies the language of the input text. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.text - Input text in UTF-8 format. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public identify( - params: LanguageTranslatorV3.IdentifyParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['text']; - const _validParams = ['text', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const body = _params.text; - const query = { - 'version': this.version, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'identify'); - - const parameters = { - options: { - url: '/v3/identify', - method: 'POST', - body, - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'text/plain', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * models - ************************/ - - /** - * List models. - * - * Lists available translation models. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {string} [params.source] - Specify a language code to filter results by source language. - * @param {string} [params.target] - Specify a language code to filter results by target language. - * @param {boolean} [params._default] - If the `default` parameter isn't specified, the service returns all models - * (default and non-default) for each language pair. To return only default models, set this parameter to `true`. To - * return only non-default models, set this parameter to `false`. There is exactly one default model, the IBM-provided - * base model, per language pair. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listModels( - params?: LanguageTranslatorV3.ListModelsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['source', 'target', '_default', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - 'source': _params.source, - 'target': _params.target, - 'default': _params._default, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'listModels'); - - const parameters = { - options: { - url: '/v3/models', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Create model. - * - * Uploads training files to customize a translation model. You can customize a model with a forced glossary or with a - * parallel corpus: - * * Use a *forced glossary* to force certain terms and phrases to be translated in a specific way. You can upload - * only a single forced glossary file for a model. The size of a forced glossary file for a custom model is limited to - * 10 MB. - * * Use a *parallel corpus* when you want your custom model to learn from general translation patterns in parallel - * sentences in your samples. What your model learns from a parallel corpus can improve translation results for input - * text that the model has not been trained on. You can upload multiple parallel corpora files with a request. To - * successfully train with parallel corpora, the corpora files must contain a cumulative total of at least 5000 - * parallel sentences. The cumulative size of all uploaded corpus files for a custom model is limited to 250 MB. - * - * Depending on the type of customization and the size of the uploaded files, training time can range from minutes for - * a glossary to several hours for a large parallel corpus. To create a model that is customized with a parallel - * corpus and a forced glossary, customize the model with a parallel corpus first and then customize the resulting - * model with a forced glossary. - * - * You can create a maximum of 10 custom models per language pair. For more information about customizing a - * translation model, including the formatting and character restrictions for data files, see [Customizing your - * model](https://cloud.ibm.com/docs/language-translator?topic=language-translator-customizing). - * - * #### Supported file formats - * - * You can provide your training data for customization in the following document formats: - * * **TMX** (`.tmx`) - Translation Memory eXchange (TMX) is an XML specification for the exchange of translation - * memories. - * * **XLIFF** (`.xliff`) - XML Localization Interchange File Format (XLIFF) is an XML specification for the exchange - * of translation memories. - * * **CSV** (`.csv`) - Comma-separated values (CSV) file with two columns for aligned sentences and phrases. The - * first row must have two language codes. The first column is for the source language code, and the second column is - * for the target language code. - * * **TSV** (`.tsv` or `.tab`) - Tab-separated values (TSV) file with two columns for aligned sentences and phrases. - * The first row must have two language codes. The first column is for the source language code, and the second column - * is for the target language code. - * * **JSON** (`.json`) - Custom JSON format for specifying aligned sentences and phrases. - * * **Microsoft Excel** (`.xls` or `.xlsx`) - Excel file with the first two columns for aligned sentences and - * phrases. The first row contains the language code. - * - * You must encode all text data in UTF-8 format. For more information, see [Supported document formats for training - * data](https://cloud.ibm.com/docs/language-translator?topic=language-translator-customizing#supported-document-formats-for-training-data). - * - * - * #### Specifying file formats - * - * You can indicate the format of a file by including the file extension with the file name. Use the file extensions - * shown in **Supported file formats**. - * - * Alternatively, you can omit the file extension and specify one of the following `content-type` specifications for - * the file: - * * **TMX** - `application/x-tmx+xml` - * * **XLIFF** - `application/xliff+xml` - * * **CSV** - `text/csv` - * * **TSV** - `text/tab-separated-values` - * * **JSON** - `application/json` - * * **Microsoft Excel** - `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` - * - * For example, with `curl`, use the following `content-type` specification to indicate the format of a CSV file named - * **glossary**: - * - * `--form "forced_glossary=@glossary;type=text/csv"`. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.baseModelId - The ID of the translation model to use as the base for customization. To see - * available models and IDs, use the `List models` method. Most models that are provided with the service are - * customizable. In addition, all models that you create with parallel corpora customization can be further customized - * with a forced glossary. - * @param {NodeJS.ReadableStream | Buffer} [params.forcedGlossary] - A file with forced glossary terms for the source - * and target languages. The customizations in the file completely overwrite the domain translation data, including - * high frequency or high confidence phrase translations. - * - * You can upload only one glossary file for a custom model, and the glossary can have a maximum size of 10 MB. A - * forced glossary must contain single words or short phrases. For more information, see **Supported file formats** in - * the method description. - * - * *With `curl`, use `--form forced_glossary=@{filename}`.*. - * @param {string} [params.forcedGlossaryContentType] - The content type of forcedGlossary. - * @param {NodeJS.ReadableStream | Buffer} [params.parallelCorpus] - A file with parallel sentences for the source and - * target languages. You can upload multiple parallel corpus files in one request by repeating the parameter. All - * uploaded parallel corpus files combined must contain at least 5000 parallel sentences to train successfully. You - * can provide a maximum of 500,000 parallel sentences across all corpora. - * - * A single entry in a corpus file can contain a maximum of 80 words. All corpora files for a custom model can have a - * cumulative maximum size of 250 MB. For more information, see **Supported file formats** in the method description. - * - * *With `curl`, use `--form parallel_corpus=@{filename}`.*. - * @param {string} [params.parallelCorpusContentType] - The content type of parallelCorpus. - * @param {string} [params.name] - An optional model name that you can use to identify the model. Valid characters are - * letters, numbers, dashes, underscores, spaces, and apostrophes. The maximum length of the name is 32 characters. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public createModel( - params: LanguageTranslatorV3.CreateModelParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['baseModelId']; - const _validParams = ['baseModelId', 'forcedGlossary', 'forcedGlossaryContentType', 'parallelCorpus', 'parallelCorpusContentType', 'name', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const formData = { - 'forced_glossary': { - data: _params.forcedGlossary, - contentType: _params.forcedGlossaryContentType, - }, - 'parallel_corpus': { - data: _params.parallelCorpus, - contentType: _params.parallelCorpusContentType, - }, - }; - - const query = { - 'version': this.version, - 'base_model_id': _params.baseModelId, - 'name': _params.name, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'createModel'); - - const parameters = { - options: { - url: '/v3/models', - method: 'POST', - qs: query, - formData - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'multipart/form-data', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete model. - * - * Deletes a custom translation model. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.modelId - Model ID of the model to delete. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteModel( - params: LanguageTranslatorV3.DeleteModelParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['modelId']; - const _validParams = ['modelId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'model_id': _params.modelId, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'deleteModel'); - - const parameters = { - options: { - url: '/v3/models/{model_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get model details. - * - * Gets information about a translation model, including training status for custom models. Use this method to poll - * the status of your customization request. A successfully completed training request has a status of `available`. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.modelId - Model ID of the model to get. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getModel( - params: LanguageTranslatorV3.GetModelParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['modelId']; - const _validParams = ['modelId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'model_id': _params.modelId, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'getModel'); - - const parameters = { - options: { - url: '/v3/models/{model_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - /************************* - * documentTranslation - ************************/ - - /** - * List documents. - * - * Lists documents that have been submitted for translation. - * - * @param {Object} [params] - The parameters to send to the service. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public listDocuments( - params?: LanguageTranslatorV3.ListDocumentsParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = []; - const _validParams = ['headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'listDocuments'); - - const parameters = { - options: { - url: '/v3/documents', - method: 'GET', - qs: query, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Translate document. - * - * Submit a document for translation. You can submit the document contents in the `file` parameter, or you can specify - * a previously submitted document by document ID. The maximum file size for document translation is - * * **2 MB** for service instances on the Lite plan - * * **20 MB** for service instances on the Standard plan - * * **50 MB** for service instances on the Advanced plan - * * **150 MB** for service instances on the Premium plan - * - * You can specify the format of the file to be translated in one of two ways: - * * By specifying the appropriate file extension for the format. - * * By specifying the content type (MIME type) of the format as the `type` of the `file` parameter. - * - * In some cases, especially for subtitle file formats, you must use either the file extension or the content type. - * For more information about all supported file formats, their file extensions and content types, and how and when to - * specify the file extension or content type, see [Supported file - * formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats). - * - * - * **Note:** When translating a previously submitted document, the target language must be different from the target - * language of the original request when the document was initially submitted. - * - * @param {Object} params - The parameters to send to the service. - * @param {NodeJS.ReadableStream | Buffer} params.file - The contents of the source file to translate. The maximum - * file size for document translation is - * * **2 MB** for service instances on the Lite plan - * * **20 MB** for service instances on the Standard plan - * * **50 MB** for service instances on the Advanced plan - * * **150 MB** for service instances on the Premium plan - * - * You can specify the format of the file to be translated in one of two ways: - * * By specifying the appropriate file extension for the format. - * * By specifying the content type (MIME type) of the format as the `type` of the `file` parameter. - * - * In some cases, especially for subtitle file formats, you must use either the file extension or the content type. - * - * For more information about all supported file formats, their file extensions and content types, and how and when to - * specify the file extension or content type, see [Supported file - * formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats). - * @param {string} params.filename - The filename for file. - * @param {string} [params.fileContentType] - The content type of file. - * @param {string} [params.modelId] - The model to use for translation. For example, `en-de` selects the IBM-provided - * base model for English-to-German translation. A model ID overrides the `source` and `target` parameters and is - * required if you use a custom model. If no model ID is specified, you must specify at least a target language. - * @param {string} [params.source] - Language code that specifies the language of the source document. If omitted, the - * service derives the source language from the input text. The input must contain sufficient text for the service to - * identify the language reliably. - * @param {string} [params.target] - Language code that specifies the target language for translation. Required if - * model ID is not specified. - * @param {string} [params.documentId] - To use a previously submitted document as the source for a new translation, - * enter the `document_id` of the document. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public translateDocument( - params: LanguageTranslatorV3.TranslateDocumentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['file', 'filename']; - const _validParams = ['file', 'filename', 'fileContentType', 'modelId', 'source', 'target', 'documentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const formData = { - 'file': { - data: _params.file, - filename: _params.filename, - contentType: _params.fileContentType, - }, - 'model_id': _params.modelId, - 'source': _params.source, - 'target': _params.target, - 'document_id': _params.documentId, - }; - - const query = { - 'version': this.version, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'translateDocument'); - - const parameters = { - options: { - url: '/v3/documents', - method: 'POST', - qs: query, - formData - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - 'Content-Type': 'multipart/form-data', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get document status. - * - * Gets the translation status of a document. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.documentId - The document ID of the document. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getDocumentStatus( - params: LanguageTranslatorV3.GetDocumentStatusParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['documentId']; - const _validParams = ['documentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'document_id': _params.documentId, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'getDocumentStatus'); - - const parameters = { - options: { - url: '/v3/documents/{document_id}', - method: 'GET', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': 'application/json', - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Delete document. - * - * Deletes a document. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.documentId - Document ID of the document to delete. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public deleteDocument( - params: LanguageTranslatorV3.DeleteDocumentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['documentId']; - const _validParams = ['documentId', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'document_id': _params.documentId, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'deleteDocument'); - - const parameters = { - options: { - url: '/v3/documents/{document_id}', - method: 'DELETE', - qs: query, - path, - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } - - /** - * Get translated document. - * - * Gets the translated document associated with the given document ID. - * - * @param {Object} params - The parameters to send to the service. - * @param {string} params.documentId - The document ID of the document that was submitted for translation. - * @param {string} [params.accept] - The type of the response: application/powerpoint, application/mspowerpoint, - * application/x-rtf, application/json, application/xml, application/vnd.ms-excel, - * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, - * application/vnd.openxmlformats-officedocument.presentationml.presentation, application/msword, - * application/vnd.openxmlformats-officedocument.wordprocessingml.document, - * application/vnd.oasis.opendocument.spreadsheet, application/vnd.oasis.opendocument.presentation, - * application/vnd.oasis.opendocument.text, application/pdf, application/rtf, text/html, text/json, text/plain, - * text/richtext, text/rtf, or text/xml. A character encoding can be specified by including a `charset` parameter. For - * example, 'text/html;charset=utf-8'. - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers - * @returns {Promise>} - */ - public getTranslatedDocument( - params: LanguageTranslatorV3.GetTranslatedDocumentParams - ): Promise> { - const _params = { ...params }; - const _requiredParams = ['documentId']; - const _validParams = ['documentId', 'accept', 'headers']; - const _validationErrors = validateParams(_params, _requiredParams, _validParams); - if (_validationErrors) { - return Promise.reject(_validationErrors); - } - - const query = { - 'version': this.version, - }; - - const path = { - 'document_id': _params.documentId, - }; - - const sdkHeaders = getSdkHeaders(LanguageTranslatorV3.DEFAULT_SERVICE_NAME, 'v3', 'getTranslatedDocument'); - - const parameters = { - options: { - url: '/v3/documents/{document_id}/translated_document', - method: 'GET', - qs: query, - path, - responseType: 'stream', - }, - defaultOptions: extend(true, {}, this.baseOptions, { - headers: extend( - true, - sdkHeaders, - { - 'Accept': _params.accept, - }, - _params.headers - ), - }), - }; - - return this.createRequest(parameters); - } -} - -/************************* - * interfaces - ************************/ - -namespace LanguageTranslatorV3 { - /** Options for the `LanguageTranslatorV3` constructor. */ - export interface Options extends UserOptions { - /** Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current - * version is `2018-05-01`. - */ - version: string; - } - - /** An operation response. */ - export interface Response { - result: T; - status: number; - statusText: string; - headers: IncomingHttpHeaders; - } - - /** The callback for a service request. */ - export type Callback = (error: any, response?: Response) => void; - - /** The body of a service request that returns no response data. */ - export interface EmptyObject {} - - /** A standard JS object, defined to avoid the limitations of `Object` and `object` */ - export interface JsonObject { - [key: string]: any; - } - - /************************* - * request interfaces - ************************/ - - /** Parameters for the `listLanguages` operation. */ - export interface ListLanguagesParams { - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `translate` operation. */ - export interface TranslateParams { - /** Input text in UTF-8 encoding. Submit a maximum of 50 KB (51,200 bytes) of text with a single request. - * Multiple elements result in multiple translations in the response. - */ - text: string[]; - /** The model to use for translation. For example, `en-de` selects the IBM-provided base model for - * English-to-German translation. A model ID overrides the `source` and `target` parameters and is required if you - * use a custom model. If no model ID is specified, you must specify at least a target language. - */ - modelId?: string; - /** Language code that specifies the language of the input text. If omitted, the service derives the source - * language from the input text. The input must contain sufficient text for the service to identify the language - * reliably. - */ - source?: string; - /** Language code that specifies the target language for translation. Required if model ID is not specified. */ - target?: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listIdentifiableLanguages` operation. */ - export interface ListIdentifiableLanguagesParams { - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `identify` operation. */ - export interface IdentifyParams { - /** Input text in UTF-8 format. */ - text: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listModels` operation. */ - export interface ListModelsParams { - /** Specify a language code to filter results by source language. */ - source?: string; - /** Specify a language code to filter results by target language. */ - target?: string; - /** If the `default` parameter isn't specified, the service returns all models (default and non-default) for - * each language pair. To return only default models, set this parameter to `true`. To return only non-default - * models, set this parameter to `false`. There is exactly one default model, the IBM-provided base model, per - * language pair. - */ - _default?: boolean; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `createModel` operation. */ - export interface CreateModelParams { - /** The ID of the translation model to use as the base for customization. To see available models and IDs, use - * the `List models` method. Most models that are provided with the service are customizable. In addition, all - * models that you create with parallel corpora customization can be further customized with a forced glossary. - */ - baseModelId: string; - /** A file with forced glossary terms for the source and target languages. The customizations in the file - * completely overwrite the domain translation data, including high frequency or high confidence phrase - * translations. - * - * You can upload only one glossary file for a custom model, and the glossary can have a maximum size of 10 MB. A - * forced glossary must contain single words or short phrases. For more information, see **Supported file formats** - * in the method description. - * - * *With `curl`, use `--form forced_glossary=@{filename}`.*. - */ - forcedGlossary?: NodeJS.ReadableStream | Buffer; - /** The content type of forcedGlossary. */ - forcedGlossaryContentType?: CreateModelConstants.ForcedGlossaryContentType | string; - /** A file with parallel sentences for the source and target languages. You can upload multiple parallel corpus - * files in one request by repeating the parameter. All uploaded parallel corpus files combined must contain at - * least 5000 parallel sentences to train successfully. You can provide a maximum of 500,000 parallel sentences - * across all corpora. - * - * A single entry in a corpus file can contain a maximum of 80 words. All corpora files for a custom model can have - * a cumulative maximum size of 250 MB. For more information, see **Supported file formats** in the method - * description. - * - * *With `curl`, use `--form parallel_corpus=@{filename}`.*. - */ - parallelCorpus?: NodeJS.ReadableStream | Buffer; - /** The content type of parallelCorpus. */ - parallelCorpusContentType?: CreateModelConstants.ParallelCorpusContentType | string; - /** An optional model name that you can use to identify the model. Valid characters are letters, numbers, - * dashes, underscores, spaces, and apostrophes. The maximum length of the name is 32 characters. - */ - name?: string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `createModel` operation. */ - export namespace CreateModelConstants { - /** The content type of forcedGlossary. */ - export enum ForcedGlossaryContentType { - APPLICATION_X_TMX_XML = 'application/x-tmx+xml', - APPLICATION_XLIFF_XML = 'application/xliff+xml', - TEXT_CSV = 'text/csv', - TEXT_TAB_SEPARATED_VALUES = 'text/tab-separated-values', - APPLICATION_JSON = 'application/json', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - } - /** The content type of parallelCorpus. */ - export enum ParallelCorpusContentType { - APPLICATION_X_TMX_XML = 'application/x-tmx+xml', - APPLICATION_XLIFF_XML = 'application/xliff+xml', - TEXT_CSV = 'text/csv', - TEXT_TAB_SEPARATED_VALUES = 'text/tab-separated-values', - APPLICATION_JSON = 'application/json', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - } - } - - /** Parameters for the `deleteModel` operation. */ - export interface DeleteModelParams { - /** Model ID of the model to delete. */ - modelId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getModel` operation. */ - export interface GetModelParams { - /** Model ID of the model to get. */ - modelId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `listDocuments` operation. */ - export interface ListDocumentsParams { - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `translateDocument` operation. */ - export interface TranslateDocumentParams { - /** The contents of the source file to translate. The maximum file size for document translation is - * * **2 MB** for service instances on the Lite plan - * * **20 MB** for service instances on the Standard plan - * * **50 MB** for service instances on the Advanced plan - * * **150 MB** for service instances on the Premium plan - * - * You can specify the format of the file to be translated in one of two ways: - * * By specifying the appropriate file extension for the format. - * * By specifying the content type (MIME type) of the format as the `type` of the `file` parameter. - * - * In some cases, especially for subtitle file formats, you must use either the file extension or the content type. - * - * - * For more information about all supported file formats, their file extensions and content types, and how and when - * to specify the file extension or content type, see [Supported file - * formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats). - */ - file: NodeJS.ReadableStream | Buffer; - /** The filename for file. */ - filename: string; - /** The content type of file. */ - fileContentType?: TranslateDocumentConstants.FileContentType | string; - /** The model to use for translation. For example, `en-de` selects the IBM-provided base model for - * English-to-German translation. A model ID overrides the `source` and `target` parameters and is required if you - * use a custom model. If no model ID is specified, you must specify at least a target language. - */ - modelId?: string; - /** Language code that specifies the language of the source document. If omitted, the service derives the source - * language from the input text. The input must contain sufficient text for the service to identify the language - * reliably. - */ - source?: string; - /** Language code that specifies the target language for translation. Required if model ID is not specified. */ - target?: string; - /** To use a previously submitted document as the source for a new translation, enter the `document_id` of the - * document. - */ - documentId?: string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `translateDocument` operation. */ - export namespace TranslateDocumentConstants { - /** The content type of file. */ - export enum FileContentType { - APPLICATION_MSPOWERPOINT = 'application/mspowerpoint', - APPLICATION_MSWORD = 'application/msword', - APPLICATION_OCTET_STREAM = 'application/octet-stream', - APPLICATION_PDF = 'application/pdf', - APPLICATION_POWERPOINT = 'application/powerpoint', - APPLICATION_RTF = 'application/rtf', - APPLICATION_TTAF_XML = 'application/ttaf+xml', - APPLICATION_TTML_XML = 'application/ttml+xml', - APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION = 'application/vnd.oasis.opendocument.presentation', - APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET = 'application/vnd.oasis.opendocument.spreadsheet', - APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT = 'application/vnd.oasis.opendocument.text', - APPLICATION_VND_MS_EXCEL = 'application/vnd.ms-excel', - APPLICATION_VND_MS_POWERPOINT = 'application/vnd.ms-powerpoint', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION = 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - APPLICATION_X_RTF = 'application/x-rtf', - APPLICATION_XHTML_XML = 'application/xhtml+xml', - APPLICATION_XML = 'application/xml', - TEXT_HTML = 'text/html', - TEXT_JSON = 'text/json', - TEXT_PLAIN = 'text/plain', - TEXT_RICHTEXT = 'text/richtext', - TEXT_RTF = 'text/rtf', - TEXT_SBV = 'text/sbv', - TEXT_SRT = 'text/srt', - TEXT_XML = 'text/xml', - } - } - - /** Parameters for the `getDocumentStatus` operation. */ - export interface GetDocumentStatusParams { - /** The document ID of the document. */ - documentId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `deleteDocument` operation. */ - export interface DeleteDocumentParams { - /** Document ID of the document to delete. */ - documentId: string; - headers?: OutgoingHttpHeaders; - } - - /** Parameters for the `getTranslatedDocument` operation. */ - export interface GetTranslatedDocumentParams { - /** The document ID of the document that was submitted for translation. */ - documentId: string; - /** The type of the response: application/powerpoint, application/mspowerpoint, application/x-rtf, - * application/json, application/xml, application/vnd.ms-excel, - * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, - * application/vnd.openxmlformats-officedocument.presentationml.presentation, application/msword, - * application/vnd.openxmlformats-officedocument.wordprocessingml.document, - * application/vnd.oasis.opendocument.spreadsheet, application/vnd.oasis.opendocument.presentation, - * application/vnd.oasis.opendocument.text, application/pdf, application/rtf, text/html, text/json, text/plain, - * text/richtext, text/rtf, or text/xml. A character encoding can be specified by including a `charset` parameter. - * For example, 'text/html;charset=utf-8'. - */ - accept?: GetTranslatedDocumentConstants.Accept | string; - headers?: OutgoingHttpHeaders; - } - - /** Constants for the `getTranslatedDocument` operation. */ - export namespace GetTranslatedDocumentConstants { - /** The type of the response: application/powerpoint, application/mspowerpoint, application/x-rtf, application/json, application/xml, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.oasis.opendocument.spreadsheet, application/vnd.oasis.opendocument.presentation, application/vnd.oasis.opendocument.text, application/pdf, application/rtf, text/html, text/json, text/plain, text/richtext, text/rtf, or text/xml. A character encoding can be specified by including a `charset` parameter. For example, 'text/html;charset=utf-8'. */ - export enum Accept { - APPLICATION_POWERPOINT = 'application/powerpoint', - APPLICATION_MSPOWERPOINT = 'application/mspowerpoint', - APPLICATION_X_RTF = 'application/x-rtf', - APPLICATION_JSON = 'application/json', - APPLICATION_XML = 'application/xml', - APPLICATION_VND_MS_EXCEL = 'application/vnd.ms-excel', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - APPLICATION_VND_MS_POWERPOINT = 'application/vnd.ms-powerpoint', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION = 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - APPLICATION_MSWORD = 'application/msword', - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET = 'application/vnd.oasis.opendocument.spreadsheet', - APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION = 'application/vnd.oasis.opendocument.presentation', - APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT = 'application/vnd.oasis.opendocument.text', - APPLICATION_PDF = 'application/pdf', - APPLICATION_RTF = 'application/rtf', - TEXT_HTML = 'text/html', - TEXT_JSON = 'text/json', - TEXT_PLAIN = 'text/plain', - TEXT_RICHTEXT = 'text/richtext', - TEXT_RTF = 'text/rtf', - TEXT_XML = 'text/xml', - } - } - - /************************* - * model interfaces - ************************/ - - /** DeleteModelResult. */ - export interface DeleteModelResult { - /** "OK" indicates that the model was successfully deleted. */ - status: string; - } - - /** DocumentList. */ - export interface DocumentList { - /** An array of all previously submitted documents. */ - documents: DocumentStatus[]; - } - - /** Document information, including translation status. */ - export interface DocumentStatus { - /** System generated ID identifying a document being translated using one specific translation model. */ - document_id: string; - /** filename from the submission (if it was missing in the multipart-form, 'noname.' - * is used. - */ - filename: string; - /** The status of the translation job associated with a submitted document. */ - status: DocumentStatus.Constants.Status | string; - /** A globally unique string that identifies the underlying model that is used for translation. */ - model_id: string; - /** Model ID of the base model that was used to customize the model. If the model is not a custom model, this - * will be absent or an empty string. - */ - base_model_id?: string; - /** Translation source language code. */ - source: string; - /** A score between 0 and 1 indicating the confidence of source language detection. A higher value indicates - * greater confidence. This is returned only when the service automatically detects the source language. - */ - detected_language_confidence?: number; - /** Translation target language code. */ - target: string; - /** The time when the document was submitted. */ - created: string; - /** The time when the translation completed. */ - completed?: string; - /** An estimate of the number of words in the source document. Returned only if `status` is `available`. */ - word_count?: number; - /** The number of characters in the source document, present only if status=available. */ - character_count?: number; - } - export namespace DocumentStatus { - export namespace Constants { - /** The status of the translation job associated with a submitted document. */ - export enum Status { - PROCESSING = 'processing', - AVAILABLE = 'available', - FAILED = 'failed', - } - } - } - - /** IdentifiableLanguage. */ - export interface IdentifiableLanguage { - /** The language code for an identifiable language. */ - language: string; - /** The name of the identifiable language. */ - name: string; - } - - /** IdentifiableLanguages. */ - export interface IdentifiableLanguages { - /** A list of all languages that the service can identify. */ - languages: IdentifiableLanguage[]; - } - - /** IdentifiedLanguage. */ - export interface IdentifiedLanguage { - /** The language code for an identified language. */ - language: string; - /** The confidence score for the identified language. */ - confidence: number; - } - - /** IdentifiedLanguages. */ - export interface IdentifiedLanguages { - /** A ranking of identified languages with confidence scores. */ - languages: IdentifiedLanguage[]; - } - - /** Response payload for languages. */ - export interface Language { - /** The language code for the language (for example, `af`). */ - language?: string; - /** The name of the language in English (for example, `Afrikaans`). */ - language_name?: string; - /** The native name of the language (for example, `Afrikaans`). */ - native_language_name?: string; - /** The country code for the language (for example, `ZA` for South Africa). */ - country_code?: string; - /** Indicates whether words of the language are separated by whitespace: `true` if the words are separated; - * `false` otherwise. - */ - words_separated?: boolean; - /** Indicates the direction of the language: `right_to_left` or `left_to_right`. */ - direction?: string; - /** Indicates whether the language can be used as the source for translation: `true` if the language can be used - * as the source; `false` otherwise. - */ - supported_as_source?: boolean; - /** Indicates whether the language can be used as the target for translation: `true` if the language can be used - * as the target; `false` otherwise. - */ - supported_as_target?: boolean; - /** Indicates whether the language supports automatic detection: `true` if the language can be detected - * automatically; `false` otherwise. - */ - identifiable?: boolean; - } - - /** The response type for listing supported languages. */ - export interface Languages { - /** An array of supported languages with information about each language. */ - languages: Language[]; - } - - /** Translation. */ - export interface Translation { - /** Translation output in UTF-8. */ - translation: string; - } - - /** Response payload for models. */ - export interface TranslationModel { - /** A globally unique string that identifies the underlying model that is used for translation. */ - model_id: string; - /** Optional name that can be specified when the model is created. */ - name?: string; - /** Translation source language code. */ - source?: string; - /** Translation target language code. */ - target?: string; - /** Model ID of the base model that was used to customize the model. If the model is not a custom model, this - * will be an empty string. - */ - base_model_id?: string; - /** The domain of the translation model. */ - domain?: string; - /** Whether this model can be used as a base for customization. Customized models are not further customizable, - * and some base models are not customizable. - */ - customizable?: boolean; - /** Whether or not the model is a default model. A default model is the model for a given language pair that - * will be used when that language pair is specified in the source and target parameters. - */ - default_model?: boolean; - /** Either an empty string, indicating the model is not a custom model, or the ID of the service instance that - * created the model. - */ - owner?: string; - /** Availability of a model. */ - status?: TranslationModel.Constants.Status | string; - } - export namespace TranslationModel { - export namespace Constants { - /** Availability of a model. */ - export enum Status { - UPLOADING = 'uploading', - UPLOADED = 'uploaded', - DISPATCHING = 'dispatching', - QUEUED = 'queued', - TRAINING = 'training', - TRAINED = 'trained', - PUBLISHING = 'publishing', - AVAILABLE = 'available', - DELETED = 'deleted', - ERROR = 'error', - } - } - } - - /** The response type for listing existing translation models. */ - export interface TranslationModels { - /** An array of available models. */ - models: TranslationModel[]; - } - - /** TranslationResult. */ - export interface TranslationResult { - /** An estimate of the number of words in the input text. */ - word_count: number; - /** Number of characters in the input text. */ - character_count: number; - /** The language code of the source text if the source language was automatically detected. */ - detected_language?: string; - /** A score between 0 and 1 indicating the confidence of source language detection. A higher value indicates - * greater confidence. This is returned only when the service automatically detects the source language. - */ - detected_language_confidence?: number; - /** List of translation output in UTF-8, corresponding to the input text entries. */ - translations: Translation[]; - } -} - -export = LanguageTranslatorV3; diff --git a/lib/recognize-stream.ts b/lib/recognize-stream.ts index e8a71e5517..091f91e50b 100644 --- a/lib/recognize-stream.ts +++ b/lib/recognize-stream.ts @@ -86,6 +86,7 @@ class RecognizeStream extends Duplex { * @param {string} [options.contentType] - The format (MIME type) of the audio * @param {number} [options.customizationWeight] - Tell the service how much weight to give to words from the custom language model compared to those from the base model for the current request * @param {number} [options.inactivityTimeout] - The time in seconds after which, if only silence (no speech) is detected in the audio, the connection is closed (default=30) + * @param {boolean} [options.interimResults] - If true, the service returns interim results as a stream of JSON SpeechRecognitionResults objects (default=false) * @param {string[]} [options.keywords] - An array of keyword strings to spot in the audio * @param {number} [options.keywordsThreshold] - A confidence value that is the lower bound for spotting a keyword * @param {number} [options.maxAlternatives] - The maximum number of alternative transcripts that the service is to return (default=1) @@ -104,6 +105,7 @@ class RecognizeStream extends Duplex { * @param {boolean} [options.splitTranscriptAtPhraseEnd] - If `true`, directs the service to split the transcript into multiple final results based on semantic features of the input * @param {number} [options.speechDetectorSensitivity] - The sensitivity of speech activity detection that the service is to perform * @param {number} [options.backgroundAudioSuppression] - The level to which the service is to suppress background audio based on its volume to prevent it from being transcribed as speech + * @param {boolean} [params.lowLatency] - If `true` for next-generation `Multimedia` and `Telephony` models that support low latency, directs the service to produce results even more quickly than it usually does * @constructor */ constructor(options: RecognizeStream.Options) { @@ -166,6 +168,7 @@ class RecognizeStream extends Duplex { 'timestamps', 'word_confidence', 'content-type', + 'interim_results', 'keywords', 'keywords_threshold', 'max_alternatives', @@ -179,6 +182,7 @@ class RecognizeStream extends Duplex { 'split_transcript_at_phrase_end', 'speech_detector_sensitivity', 'background_audio_suppression', + 'low_latency' ]; const openingMessage = processUserParameters(options, openingMessageParamsAllowed); openingMessage.action = 'start'; diff --git a/natural-language-understanding/v1.ts b/natural-language-understanding/v1.ts index 45b87cfb2b..6d7155180c 100644 --- a/natural-language-understanding/v1.ts +++ b/natural-language-understanding/v1.ts @@ -15,7 +15,7 @@ */ /** - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.1-5136e54a-20241108-203028 */ import * as extend from 'extend'; @@ -38,15 +38,6 @@ import { getSdkHeaders } from '../lib/common'; * models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) * with Watson Knowledge Studio to detect custom entities and relations in Natural Language Understanding. * - * IBM is sunsetting Watson Natural Language Understanding Custom Sentiment (BETA). From **June 3, 2023** onward, you - * will no longer be able to use the Custom Sentiment feature.

To ensure we continue providing our clients - * with robust and powerful text classification capabilities, IBM recently announced the general availability of a new - * [single-label text classification - * capability](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-classifications). - * This new feature includes extended language support and training data customizations suited for building a custom - * sentiment classifier.

If you would like more information or further guidance, please contact IBM Cloud - * Support.{: deprecated} - * * API Version: 1.0 * See: https://cloud.ibm.com/docs/natural-language-understanding */ @@ -116,7 +107,6 @@ class NaturalLanguageUnderstandingV1 extends BaseService { * - Semantic roles * - Sentiment * - Syntax - * - Summarization (Experimental) * * If a language for the input text is not specified with the `language` parameter, the service [automatically detects * the @@ -1211,7 +1201,9 @@ namespace NaturalLanguageUnderstandingV1 { * model interfaces ************************/ - /** Results of the analysis, organized by feature. */ + /** + * Results of the analysis, organized by feature. + */ export interface AnalysisResults { /** Language used to analyze the text. */ language?: string; @@ -1245,7 +1237,9 @@ namespace NaturalLanguageUnderstandingV1 { syntax?: SyntaxResult; } - /** API usage information for the request. */ + /** + * API usage information for the request. + */ export interface AnalysisResultsUsage { /** Number of features used in the API call. */ features?: number; @@ -1255,13 +1249,17 @@ namespace NaturalLanguageUnderstandingV1 { text_units?: number; } - /** The author of the analyzed content. */ + /** + * The author of the analyzed content. + */ export interface Author { /** Name of the author. */ name?: string; } - /** Categories model. */ + /** + * Categories model. + */ export interface CategoriesModel { /** An optional name for the model. */ name?: string; @@ -1305,13 +1303,19 @@ namespace NaturalLanguageUnderstandingV1 { } } - /** List of categories models. */ + /** + * List of categories models. + */ export interface CategoriesModelList { /** The categories models. */ models?: CategoriesModel[]; } - /** Returns a hierarchical taxonomy of the content. The top three categories are returned by default. Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. */ + /** + * Returns a hierarchical taxonomy of the content. The top three categories are returned by default. + * + * Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. + */ export interface CategoriesOptions { /** Set this to `true` to return explanations for each categorization. **This is available only for English * categories.**. @@ -1326,13 +1330,17 @@ namespace NaturalLanguageUnderstandingV1 { model?: string; } - /** Relevant text that contributed to the categorization. */ + /** + * Relevant text that contributed to the categorization. + */ export interface CategoriesRelevantText { /** Text from the analyzed source that supports the categorization. */ text?: string; } - /** A categorization of the analyzed text. */ + /** + * A categorization of the analyzed text. + */ export interface CategoriesResult { /** The path to the category through the multi-level taxonomy hierarchy. For more information about the * categories, see [Categories @@ -1345,7 +1353,9 @@ namespace NaturalLanguageUnderstandingV1 { explanation?: CategoriesResultExplanation; } - /** Information that helps to explain what contributed to the categories result. */ + /** + * Information that helps to explain what contributed to the categories result. + */ export interface CategoriesResultExplanation { /** An array of relevant text from the source that contributed to the categorization. The sorted array begins * with the phrase that contributed most significantly to the result, followed by phrases that were less and less @@ -1354,7 +1364,9 @@ namespace NaturalLanguageUnderstandingV1 { relevant_text?: CategoriesRelevantText[]; } - /** Classifications model. */ + /** + * Classifications model. + */ export interface ClassificationsModel { /** An optional name for the model. */ name?: string; @@ -1398,13 +1410,17 @@ namespace NaturalLanguageUnderstandingV1 { } } - /** List of classifications models. */ + /** + * List of classifications models. + */ export interface ClassificationsModelList { /** The classifications models. */ models?: ClassificationsModel[]; } - /** Returns text classifications for the content. */ + /** + * Returns text classifications for the content. + */ export interface ClassificationsOptions { /** Enter a [custom * model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) @@ -1417,7 +1433,9 @@ namespace NaturalLanguageUnderstandingV1 { model?: string; } - /** A classification of the analyzed text. */ + /** + * A classification of the analyzed text. + */ export interface ClassificationsResult { /** Classification assigned to the text. */ class_name?: string; @@ -1425,7 +1443,9 @@ namespace NaturalLanguageUnderstandingV1 { confidence?: number; } - /** Optional classifications training parameters along with model train requests. */ + /** + * Optional classifications training parameters along with model train requests. + */ export interface ClassificationsTrainingParameters { /** Model type selector to train either a single_label or a multi_label classifier. */ model_type?: ClassificationsTrainingParameters.Constants.ModelType | string; @@ -1440,13 +1460,20 @@ namespace NaturalLanguageUnderstandingV1 { } } - /** Returns high-level concepts in the content. For example, a research paper about deep learning might return the concept, "Artificial Intelligence" although the term is not mentioned. Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. */ + /** + * Returns high-level concepts in the content. For example, a research paper about deep learning might return the + * concept, "Artificial Intelligence" although the term is not mentioned. + * + * Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. + */ export interface ConceptsOptions { /** Maximum number of concepts to return. */ limit?: number; } - /** The general concepts referenced or alluded to in the analyzed text. */ + /** + * The general concepts referenced or alluded to in the analyzed text. + */ export interface ConceptsResult { /** Name of the concept. */ text?: string; @@ -1456,13 +1483,17 @@ namespace NaturalLanguageUnderstandingV1 { dbpedia_resource?: string; } - /** Delete model results. */ + /** + * Delete model results. + */ export interface DeleteModelResults { /** model_id of the deleted model. */ deleted?: string; } - /** Disambiguation information for the entity. */ + /** + * Disambiguation information for the entity. + */ export interface DisambiguationResult { /** Common entity name. */ name?: string; @@ -1472,13 +1503,17 @@ namespace NaturalLanguageUnderstandingV1 { subtype?: string[]; } - /** Emotion results for the document as a whole. */ + /** + * Emotion results for the document as a whole. + */ export interface DocumentEmotionResults { /** Emotion results for the document as a whole. */ emotion?: EmotionScores; } - /** DocumentSentimentResults. */ + /** + * DocumentSentimentResults. + */ export interface DocumentSentimentResults { /** Indicates whether the sentiment is positive, neutral, or negative. */ label?: string; @@ -1486,7 +1521,13 @@ namespace NaturalLanguageUnderstandingV1 { score?: number; } - /** Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target phrases specified in the targets parameter. You can analyze emotion for detected entities with `entities.emotion` and for keywords with `keywords.emotion`. Supported languages: English. */ + /** + * Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target + * phrases specified in the targets parameter. You can analyze emotion for detected entities with `entities.emotion` + * and for keywords with `keywords.emotion`. + * + * Supported languages: English. + */ export interface EmotionOptions { /** Set this to `false` to hide document-level emotion results. */ document?: boolean; @@ -1494,7 +1535,10 @@ namespace NaturalLanguageUnderstandingV1 { targets?: string[]; } - /** The detected anger, disgust, fear, joy, or sadness that is conveyed by the content. Emotion information can be returned for detected entities, keywords, or user-specified target phrases found in the text. */ + /** + * The detected anger, disgust, fear, joy, or sadness that is conveyed by the content. Emotion information can be + * returned for detected entities, keywords, or user-specified target phrases found in the text. + */ export interface EmotionResult { /** Emotion results for the document as a whole. */ document?: DocumentEmotionResults; @@ -1502,7 +1546,9 @@ namespace NaturalLanguageUnderstandingV1 { targets?: TargetedEmotionResults[]; } - /** EmotionScores. */ + /** + * EmotionScores. + */ export interface EmotionScores { /** Anger score from 0 to 1. A higher score means that the text is more likely to convey anger. */ anger?: number; @@ -1516,7 +1562,14 @@ namespace NaturalLanguageUnderstandingV1 { sadness?: number; } - /** Identifies people, cities, organizations, and other entities in the content. For more information, see [Entity types and subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-type-systems). Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported only through custom models. */ + /** + * Identifies people, cities, organizations, and other entities in the content. For more information, see [Entity + * types and + * subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-type-systems). + * + * Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. + * Arabic, Chinese, and Dutch are supported only through custom models. + */ export interface EntitiesOptions { /** Maximum number of entities to return. */ limit?: number; @@ -1533,7 +1586,9 @@ namespace NaturalLanguageUnderstandingV1 { emotion?: boolean; } - /** The important people, places, geopolitical entities and other types of entities in your content. */ + /** + * The important people, places, geopolitical entities and other types of entities in your content. + */ export interface EntitiesResult { /** Entity type. */ type?: string; @@ -1558,7 +1613,9 @@ namespace NaturalLanguageUnderstandingV1 { disambiguation?: DisambiguationResult; } - /** EntityMention. */ + /** + * EntityMention. + */ export interface EntityMention { /** Entity mention text. */ text?: string; @@ -1571,13 +1628,17 @@ namespace NaturalLanguageUnderstandingV1 { confidence?: number; } - /** FeatureSentimentResults. */ + /** + * FeatureSentimentResults. + */ export interface FeatureSentimentResults { /** Sentiment score from -1 (negative) to 1 (positive). */ score?: number; } - /** Analysis features and options. */ + /** + * Analysis features and options. + */ export interface Features { /** Returns text classifications for the content. */ classifications?: ClassificationsOptions; @@ -1630,13 +1691,6 @@ namespace NaturalLanguageUnderstandingV1 { * Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish. */ sentiment?: SentimentOptions; - /** (Experimental) Returns a summary of content. - * - * Supported languages: English only. - * - * Supported regions: Dallas region only. - */ - summarization?: SummarizationOptions; /** Returns a hierarchical taxonomy of the content. The top three categories are returned by default. * * Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. @@ -1646,7 +1700,9 @@ namespace NaturalLanguageUnderstandingV1 { syntax?: SyntaxOptions; } - /** Webpage metadata, such as the author and the title of the page. */ + /** + * Webpage metadata, such as the author and the title of the page. + */ export interface FeaturesResultsMetadata { /** The authors of the document. */ authors?: Author[]; @@ -1660,13 +1716,19 @@ namespace NaturalLanguageUnderstandingV1 { feeds?: Feed[]; } - /** RSS or ATOM feed found on the webpage. */ + /** + * RSS or ATOM feed found on the webpage. + */ export interface Feed { /** URL of the RSS or ATOM feed. */ link?: string; } - /** Returns important keywords in the content. Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. */ + /** + * Returns important keywords in the content. + * + * Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. + */ export interface KeywordsOptions { /** Maximum number of keywords to return. */ limit?: number; @@ -1676,7 +1738,9 @@ namespace NaturalLanguageUnderstandingV1 { emotion?: boolean; } - /** The important keywords in the content, organized by relevance. */ + /** + * The important keywords in the content, organized by relevance. + */ export interface KeywordsResult { /** Number of times the keyword appears in the analyzed text. */ count?: number; @@ -1690,13 +1754,17 @@ namespace NaturalLanguageUnderstandingV1 { sentiment?: FeatureSentimentResults; } - /** Custom models that are available for entities and relations. */ + /** + * Custom models that are available for entities and relations. + */ export interface ListModelsResults { /** An array of available models. */ models?: Model[]; } - /** Model. */ + /** + * Model. + */ export interface Model { /** When the status is `available`, the model is ready to use. */ status?: Model.Constants.Status | string; @@ -1731,13 +1799,17 @@ namespace NaturalLanguageUnderstandingV1 { } } - /** A list of messages describing model training issues when model status is `error`. */ + /** + * A list of messages describing model training issues when model status is `error`. + */ export interface Notice { /** Describes deficiencies or inconsistencies in training data. */ message?: string; } - /** RelationArgument. */ + /** + * RelationArgument. + */ export interface RelationArgument { /** An array of extracted entities. */ entities?: RelationEntity[]; @@ -1747,7 +1819,9 @@ namespace NaturalLanguageUnderstandingV1 { text?: string; } - /** An entity that corresponds with an argument in a relation. */ + /** + * An entity that corresponds with an argument in a relation. + */ export interface RelationEntity { /** Text that corresponds to the entity. */ text?: string; @@ -1755,7 +1829,14 @@ namespace NaturalLanguageUnderstandingV1 { type?: string; } - /** Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo` relation might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations). Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and Portuguese custom models are also supported. */ + /** + * Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo` relation + * might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation + * types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations). + * + * Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and + * Portuguese custom models are also supported. + */ export interface RelationsOptions { /** Enter a [custom * model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) @@ -1764,7 +1845,9 @@ namespace NaturalLanguageUnderstandingV1 { model?: string; } - /** The relations between entities found in the content. */ + /** + * The relations between entities found in the content. + */ export interface RelationsResult { /** Confidence score for the relation. Higher values indicate greater confidence. */ score?: number; @@ -1776,7 +1859,9 @@ namespace NaturalLanguageUnderstandingV1 { arguments?: RelationArgument[]; } - /** SemanticRolesEntity. */ + /** + * SemanticRolesEntity. + */ export interface SemanticRolesEntity { /** Entity type. */ type?: string; @@ -1784,13 +1869,19 @@ namespace NaturalLanguageUnderstandingV1 { text?: string; } - /** SemanticRolesKeyword. */ + /** + * SemanticRolesKeyword. + */ export interface SemanticRolesKeyword { /** The keyword text. */ text?: string; } - /** Parses sentences into subject, action, and object form. Supported languages: English, German, Japanese, Korean, Spanish. */ + /** + * Parses sentences into subject, action, and object form. + * + * Supported languages: English, German, Japanese, Korean, Spanish. + */ export interface SemanticRolesOptions { /** Maximum number of semantic_roles results to return. */ limit?: number; @@ -1800,7 +1891,9 @@ namespace NaturalLanguageUnderstandingV1 { entities?: boolean; } - /** The object containing the actions and the objects the actions act upon. */ + /** + * The object containing the actions and the objects the actions act upon. + */ export interface SemanticRolesResult { /** Sentence from the source that contains the subject, action, and object. */ sentence?: string; @@ -1812,7 +1905,9 @@ namespace NaturalLanguageUnderstandingV1 { object?: SemanticRolesResultObject; } - /** The extracted action from the sentence. */ + /** + * The extracted action from the sentence. + */ export interface SemanticRolesResultAction { /** Analyzed text that corresponds to the action. */ text?: string; @@ -1821,7 +1916,9 @@ namespace NaturalLanguageUnderstandingV1 { verb?: SemanticRolesVerb; } - /** The extracted object from the sentence. */ + /** + * The extracted object from the sentence. + */ export interface SemanticRolesResultObject { /** Object text. */ text?: string; @@ -1829,7 +1926,9 @@ namespace NaturalLanguageUnderstandingV1 { keywords?: SemanticRolesKeyword[]; } - /** The extracted subject from the sentence. */ + /** + * The extracted subject from the sentence. + */ export interface SemanticRolesResultSubject { /** Text that corresponds to the subject role. */ text?: string; @@ -1839,7 +1938,9 @@ namespace NaturalLanguageUnderstandingV1 { keywords?: SemanticRolesKeyword[]; } - /** SemanticRolesVerb. */ + /** + * SemanticRolesVerb. + */ export interface SemanticRolesVerb { /** The keyword text. */ text?: string; @@ -1847,7 +1948,9 @@ namespace NaturalLanguageUnderstandingV1 { tense?: string; } - /** SentenceResult. */ + /** + * SentenceResult. + */ export interface SentenceResult { /** The sentence. */ text?: string; @@ -1855,7 +1958,12 @@ namespace NaturalLanguageUnderstandingV1 { location?: number[]; } - /** Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze sentiment for detected entities with `entities.sentiment` and for keywords with `keywords.sentiment`. Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish. */ + /** + * Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze + * sentiment for detected entities with `entities.sentiment` and for keywords with `keywords.sentiment`. + * + * Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish. + */ export interface SentimentOptions { /** Set this to `false` to hide document-level sentiment results. */ document?: boolean; @@ -1863,7 +1971,9 @@ namespace NaturalLanguageUnderstandingV1 { targets?: string[]; } - /** The sentiment of the content. */ + /** + * The sentiment of the content. + */ export interface SentimentResult { /** The document level sentiment. */ document?: DocumentSentimentResults; @@ -1871,13 +1981,9 @@ namespace NaturalLanguageUnderstandingV1 { targets?: TargetedSentimentResults[]; } - /** (Experimental) Returns a summary of content. Supported languages: English only. Supported regions: Dallas region only. */ - export interface SummarizationOptions { - /** Maximum number of summary sentences to return. */ - limit?: number; - } - - /** Returns tokens and sentences from the input text. */ + /** + * Returns tokens and sentences from the input text. + */ export interface SyntaxOptions { /** Tokenization options. */ tokens?: SyntaxOptionsTokens; @@ -1885,7 +1991,9 @@ namespace NaturalLanguageUnderstandingV1 { sentences?: boolean; } - /** Tokenization options. */ + /** + * Tokenization options. + */ export interface SyntaxOptionsTokens { /** Set this to `true` to return the lemma for each token. */ lemma?: boolean; @@ -1893,13 +2001,17 @@ namespace NaturalLanguageUnderstandingV1 { part_of_speech?: boolean; } - /** Tokens and sentences returned from syntax analysis. */ + /** + * Tokens and sentences returned from syntax analysis. + */ export interface SyntaxResult { tokens?: TokenResult[]; sentences?: SentenceResult[]; } - /** Emotion results for a specified target. */ + /** + * Emotion results for a specified target. + */ export interface TargetedEmotionResults { /** Targeted text. */ text?: string; @@ -1907,7 +2019,9 @@ namespace NaturalLanguageUnderstandingV1 { emotion?: EmotionScores; } - /** TargetedSentimentResults. */ + /** + * TargetedSentimentResults. + */ export interface TargetedSentimentResults { /** Targeted text. */ text?: string; @@ -1915,7 +2029,9 @@ namespace NaturalLanguageUnderstandingV1 { score?: number; } - /** TokenResult. */ + /** + * TokenResult. + */ export interface TokenResult { /** The token as it appears in the analyzed text. */ text?: string; diff --git a/package-lock.json b/package-lock.json index 1357de5414..1100502439 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,14 +17,15 @@ "async": "^3.2.0", "camelcase": "^6.2.0", "extend": "~3.0.2", - "ibm-cloud-sdk-core": "^4.2.3", + "ibm-cloud-sdk-core": "^5.1.0", "isstream": "~0.1.2", "websocket": "^1.0.33" }, "devDependencies": { + "@ibm-cloud/sdk-test-utilities": "^1.0.0", "@semantic-release/changelog": "^5.0.1", "@semantic-release/git": "^9.0.0", - "axios": "^0.21.4", + "axios": "^1.7.7", "codecov": "^3.8.1", "concat-stream": "^2.0.0", "cz-conventional-changelog": "^3.3.0", @@ -34,7 +35,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "installed-check": "^3.0.0", - "jest": "^28.1.3", + "jest": "^29.7.0", "jsdoc": "^3.6.6", "lint-staged": "^10.5.3", "prettier": "^2.2.1", @@ -48,115 +49,61 @@ "wav": "~1.0.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=20.0.0" } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz", - "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.9", - "@babel/parser": "^7.23.9", - "@babel/template": "^7.23.9", - "@babel/traverse": "^7.23.9", - "@babel/types": "^7.23.9", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -171,12 +118,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -187,29 +128,30 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", "dev": true, "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -241,63 +183,28 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -307,152 +214,62 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.9.tgz", - "integrity": "sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", "dev": true, "dependencies": { - "@babel/template": "^7.23.9", - "@babel/traverse": "^7.23.9", - "@babel/types": "^7.23.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", - "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, + "dependencies": { + "@babel/types": "^7.26.0" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -496,6 +313,36 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -520,6 +367,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -592,6 +454,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -608,12 +485,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", - "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -623,33 +500,30 @@ } }, "node_modules/@babel/template": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz", - "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.23.9", - "@babel/types": "^7.23.9" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.9.tgz", - "integrity": "sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.9", - "@babel/types": "^7.23.9", + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -667,14 +541,13 @@ } }, "node_modules/@babel/types": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", - "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -774,6 +647,18 @@ "node": ">=v18" } }, + "node_modules/@ibm-cloud/sdk-test-utilities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@ibm-cloud/sdk-test-utilities/-/sdk-test-utilities-1.0.0.tgz", + "integrity": "sha512-/WxEqZvjIEucasGqrY70kHBbqV7O47Ygnf+XoGxPy/H/NqS6xBMZblkVq0vsmQM73a+vbA9oKhn+4uM09bKlxA==", + "dev": true, + "dependencies": { + "expect": "^29.7.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -809,139 +694,174 @@ } }, "node_modules/@jest/console": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", - "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/@jest/console/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "jest-get-type": "^29.6.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/@jest/core": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", - "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "dependencies": { - "@jest/console": "^28.1.3", - "@jest/reporters": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", "chalk": "^4.0.0", - "ci-info": "^3.2.0", + "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.1.3", - "jest-config": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-resolve-dependencies": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "jest-watcher": "^28.1.3", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "rimraf": "^3.0.0", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -952,3468 +872,2032 @@ } } }, - "node_modules/@jest/core/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", + "pirates": "^4.0.4", "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "write-file-atomic": "^4.0.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/@jest/types/node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@sinclair/typebox": "^0.27.8" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "node_modules/@jest/types/node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, - "node_modules/@jest/core/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": ">=6.0.0" } }, - "node_modules/@jest/environment": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", - "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "dependencies": { - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "jest-mock": "^28.1.3" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/environment/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/environment/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true }, - "node_modules/@jest/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "expect": "^28.1.3", - "jest-snapshot": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jest/expect-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", - "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { - "jest-get-type": "^28.0.2" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 8" } }, - "node_modules/@jest/expect-utils/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 8" } }, - "node_modules/@jest/expect/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 8" } }, - "node_modules/@jest/expect/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/@octokit/auth-token": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "@octokit/types": "^6.0.3" } }, - "node_modules/@jest/expect/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@octokit/core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" } }, - "node_modules/@jest/expect/node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "node_modules/@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "dependencies": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" } }, - "node_modules/@jest/expect/node_modules/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", + "node_modules/@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", "dev": true, "dependencies": { - "@jest/expect-utils": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" } }, - "node_modules/@jest/expect/node_modules/jest-diff": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", - "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "node_modules/@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", + "dev": true + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "@octokit/types": "^6.40.0" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "peerDependencies": { + "@octokit/core": ">=2" } }, - "node_modules/@jest/expect/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "node_modules/@octokit/plugin-request-log": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", + "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "peerDependencies": { + "@octokit/core": ">=3" } }, - "node_modules/@jest/expect/node_modules/jest-matcher-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", - "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "peerDependencies": { + "@octokit/core": ">=3" } }, - "node_modules/@jest/expect/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/@octokit/request": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" } }, - "node_modules/@jest/expect/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" } }, - "node_modules/@jest/expect/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/@jest/fake-timers": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", - "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", + "node_modules/@octokit/rest": { + "version": "18.12.0", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz", + "integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/fake-timers/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "@octokit/core": "^3.5.1", + "@octokit/plugin-paginate-rest": "^2.16.8", + "@octokit/plugin-request-log": "^1.0.4", + "@octokit/plugin-rest-endpoint-methods": "^5.12.0" } }, - "node_modules/@jest/fake-timers/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "@octokit/openapi-types": "^12.11.0" } }, - "node_modules/@jest/fake-timers/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@semantic-release/changelog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/changelog/-/changelog-5.0.1.tgz", + "integrity": "sha512-unvqHo5jk4dvAf2nZ3aw4imrlwQ2I50eVVvq9D47Qc3R+keNqepx1vDYwkjF8guFXnOYaYcR28yrZWno1hFbiw==", "dev": true, + "dependencies": { + "@semantic-release/error": "^2.1.0", + "aggregate-error": "^3.0.0", + "fs-extra": "^9.0.0", + "lodash": "^4.17.4" + }, "engines": { - "node": ">=10" + "node": ">=10.18" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "semantic-release": ">=15.8.0 <18.0.0" } }, - "node_modules/@jest/fake-timers/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/@semantic-release/commit-analyzer": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-8.0.1.tgz", + "integrity": "sha512-5bJma/oB7B4MtwUkZC2Bf7O1MHfi4gWe4mA+MIQ3lsEV0b422Bvl1z5HRpplDnMLHH3EXMoRdEng6Ds5wUqA3A==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "conventional-changelog-angular": "^5.0.0", + "conventional-commits-filter": "^2.0.0", + "conventional-commits-parser": "^3.0.7", + "debug": "^4.0.0", + "import-from": "^3.0.0", + "lodash": "^4.17.4", + "micromatch": "^4.0.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10.18" + }, + "peerDependencies": { + "semantic-release": ">=16.0.0 <18.0.0" } }, - "node_modules/@jest/fake-timers/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/@semantic-release/error": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-2.2.0.tgz", + "integrity": "sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg==", + "dev": true + }, + "node_modules/@semantic-release/git": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/git/-/git-9.0.1.tgz", + "integrity": "sha512-75P03s9v0xfrH9ffhDVWRIX0fgWBvJMmXhUU0rMTKYz47oMXU5O95M/ocgIKnVJlWZYoC+LpIe4Ye6ev8CrlUQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@semantic-release/error": "^2.1.0", + "aggregate-error": "^3.0.0", + "debug": "^4.0.0", + "dir-glob": "^3.0.0", + "execa": "^5.0.0", + "lodash": "^4.17.4", + "micromatch": "^4.0.0", + "p-reduce": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10.18" + }, + "peerDependencies": { + "semantic-release": ">=16.0.0 <18.0.0" } }, - "node_modules/@jest/fake-timers/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/@jest/globals": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", - "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", + "node_modules/@semantic-release/github": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-7.2.3.tgz", + "integrity": "sha512-lWjIVDLal+EQBzy697ayUNN8MoBpp+jYIyW2luOdqn5XBH4d9bQGfTnjuLyzARZBHejqh932HVjiH/j4+R7VHw==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/types": "^28.1.3" + "@octokit/rest": "^18.0.0", + "@semantic-release/error": "^2.2.0", + "aggregate-error": "^3.0.0", + "bottleneck": "^2.18.1", + "debug": "^4.0.0", + "dir-glob": "^3.0.0", + "fs-extra": "^10.0.0", + "globby": "^11.0.0", + "http-proxy-agent": "^4.0.0", + "https-proxy-agent": "^5.0.0", + "issue-parser": "^6.0.0", + "lodash": "^4.17.4", + "mime": "^2.4.3", + "p-filter": "^2.0.0", + "p-retry": "^4.0.0", + "url-join": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10.18" + }, + "peerDependencies": { + "semantic-release": ">=16.0.0 <18.0.0" } }, - "node_modules/@jest/globals/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/@semantic-release/github/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=12" } }, - "node_modules/@jest/globals/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/@semantic-release/github/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, - "dependencies": { - "@types/yargs-parser": "*" + "engines": { + "node": ">= 10.0.0" } }, - "node_modules/@jest/reporters": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", - "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", + "node_modules/@semantic-release/npm": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-7.1.3.tgz", + "integrity": "sha512-x52kQ/jR09WjuWdaTEHgQCvZYMOTx68WnS+TZ4fya5ZAJw4oRtJETtrvUw10FdfM28d/keInQdc66R1Gw5+OEQ==", "dev": true, "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.1" + "@semantic-release/error": "^2.2.0", + "aggregate-error": "^3.0.0", + "execa": "^5.0.0", + "fs-extra": "^10.0.0", + "lodash": "^4.17.15", + "nerf-dart": "^1.0.0", + "normalize-url": "^6.0.0", + "npm": "^7.0.0", + "rc": "^1.2.8", + "read-pkg": "^5.0.0", + "registry-auth-token": "^4.0.0", + "semver": "^7.1.2", + "tempy": "^1.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10.19" }, "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "semantic-release": ">=16.0.0 <18.0.0" } }, - "node_modules/@jest/reporters/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/@semantic-release/npm/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=12" } }, - "node_modules/@jest/reporters/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/@semantic-release/npm/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, - "dependencies": { - "@types/yargs-parser": "*" + "engines": { + "node": ">= 10.0.0" } }, - "node_modules/@jest/reporters/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@semantic-release/release-notes-generator": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-9.0.3.tgz", + "integrity": "sha512-hMZyddr0u99OvM2SxVOIelHzly+PP3sYtJ8XOLHdMp8mrluN5/lpeTnIO27oeCYdupY/ndoGfvrqDjHqkSyhVg==", "dev": true, + "dependencies": { + "conventional-changelog-angular": "^5.0.0", + "conventional-changelog-writer": "^4.0.0", + "conventional-commits-filter": "^2.0.0", + "conventional-commits-parser": "^3.0.0", + "debug": "^4.0.0", + "get-stream": "^6.0.0", + "import-from": "^3.0.0", + "into-stream": "^6.0.0", + "lodash": "^4.17.4", + "read-pkg-up": "^7.0.0" + }, "engines": { - "node": ">=10" + "node": ">=10.18" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "semantic-release": ">=15.8.0 <18.0.0" } }, - "node_modules/@jest/reporters/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/@sentry-internal/tracing": { + "version": "7.102.1", + "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.102.1.tgz", + "integrity": "sha512-RkFlFyAC0fQOvBbBqnq0CLmFW5m3JJz9pKbZd5vXPraWAlniKSb1bC/4DF9SlNx0FN1LWG+IU3ISdpzwwTeAGg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "@sentry/core": "7.102.1", + "@sentry/types": "7.102.1", + "@sentry/utils": "7.102.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/@jest/reporters/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/@sentry/core": { + "version": "7.102.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.102.1.tgz", + "integrity": "sha512-QjY+LSP3du3J/C8x/FfEbRxgZgsWd0jfTJ4P7s9f219I1csK4OeBMC3UA1HwEa0pY/9OF6H/egW2CjOcMM5Pdg==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@sentry/types": "7.102.1", + "@sentry/utils": "7.102.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/@jest/reporters/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/@jest/schemas": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", - "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "node_modules/@sentry/node": { + "version": "7.102.1", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.102.1.tgz", + "integrity": "sha512-mb3vmM3SGuCruckPiv/Vafeh89UQavTfpPFoU6Jwe6dSpQ39BO8fO8k8Zev+/nP6r/FKLtX17mJobErHECXsYw==", "dev": true, "dependencies": { - "@sinclair/typebox": "^0.24.1" + "@sentry-internal/tracing": "7.102.1", + "@sentry/core": "7.102.1", + "@sentry/types": "7.102.1", + "@sentry/utils": "7.102.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/@jest/source-map": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", - "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.13", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", - "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", + "node_modules/@sentry/types": { + "version": "7.102.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.102.1.tgz", + "integrity": "sha512-htKorf3t/D0XYtM7foTcmG+rM47rDP6XdbvCcX5gBCuCYlzpM1vqCt2rl3FLktZC6TaIpFRJw1TLfx6m+x5jdA==", "dev": true, - "dependencies": { - "@jest/console": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/@jest/test-result/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/@sentry/utils": { + "version": "7.102.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.102.1.tgz", + "integrity": "sha512-+8WcFjHVV/HROXSAwMuUzveElBFC43EiTG7SNEBNgOUeQzQVTmbUZXyTVgLrUmtoWqvnIxCacoLxtZo1o67kdg==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@sentry/types": "7.102.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/@jest/test-result/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "type-detect": "4.0.8" } }, - "node_modules/@jest/test-sequencer": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", - "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "dependencies": { - "@jest/test-result": "^28.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@jest/transform": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", - "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" }, - "node_modules/@jest/transform/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 6" } }, - "node_modules/@jest/transform/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } + "node_modules/@types/async": { + "version": "3.2.24", + "resolved": "https://registry.npmjs.org/@types/async/-/async-3.2.24.tgz", + "integrity": "sha512-8iHVLHsCCOBKjCF2KwFe0p9Z3rfM9mL+sSP8btyR5vTjJRAqpBYD28/ZLgXPf0pjG1VxOvtCV/BgXkQbpSe8Hw==" }, - "node_modules/@jest/transform/node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": ">= 10.14.2" + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.4.tgz", - "integrity": "sha512-Oud2QPM5dHviZNn4y/WhhYKSXksv+1xLEIsNrAbGcFzUN3ubqWRFT5gwPchNc5NuzILOU4tPBDTZ4VwhL8Y7cw==", + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" + "@babel/types": "^7.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, - "engines": { - "node": ">=6.0.0" + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.23.tgz", - "integrity": "sha512-9/4foRoUKp8s96tSkh8DlAAc5A0Ty8vLXld+l9gjKKY6ckwI8G15f0hskGmuLZu78ZlGa1vtsfOa+lnB4vG6Jg==", + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@babel/types": "^7.20.7" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" + "@types/ms": "*" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } + "node_modules/@types/extend": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/extend/-/extend-3.0.4.tgz", + "integrity": "sha512-ArMouDUTJEz1SQRpFsT2rIw7DeqICFv5aaVzLSIYMYQSLcwcGOfT3VyglQs/p7K3F7fT4zxr0NWxYZIdifD6dA==" }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" + "@types/node": "*" } }, - "node_modules/@octokit/auth-token": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", - "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "node_modules/@types/ignore-walk": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/ignore-walk/-/ignore-walk-3.0.2.tgz", + "integrity": "sha512-piannjEnKe/Ka68B2kz6lhs/Yv7T7aKgMGaqfZ4IZUK18KUk4VS1cpke+8s76JjNigFWcOydfG/KKnAuxmWTFA==", "dev": true, "dependencies": { - "@octokit/types": "^6.0.3" + "@types/node": "*" } }, - "node_modules/@octokit/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", - "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", - "dev": true, - "dependencies": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.3", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - } + "node_modules/@types/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@types/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-EE11Sn7gzHEF9FGkYHTkFpPuDEamLudLvaGnBciNgH55fTYboWZHINR6MP8+CfCOjPJX08l4teRrjCY11gz1CA==" }, - "node_modules/@octokit/endpoint": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", - "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "dependencies": { - "@octokit/types": "^6.0.3", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" + "@types/istanbul-lib-coverage": "*" } }, - "node_modules/@octokit/graphql": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", - "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "dependencies": { - "@octokit/request": "^5.6.0", - "@octokit/types": "^6.0.3", - "universal-user-agent": "^6.0.0" + "@types/istanbul-lib-report": "*" } }, - "node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", + "node_modules/@types/linkify-it": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", + "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", "dev": true }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "2.21.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", - "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "node_modules/@types/markdown-it": { + "version": "12.2.3", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", + "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", "dev": true, "dependencies": { - "@octokit/types": "^6.40.0" - }, - "peerDependencies": { - "@octokit/core": ">=2" + "@types/linkify-it": "*", + "@types/mdurl": "*" } }, - "node_modules/@octokit/plugin-request-log": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", - "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", - "dev": true, - "peerDependencies": { - "@octokit/core": ">=3" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", - "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", - "dev": true, - "dependencies": { - "@octokit/types": "^6.39.0", - "deprecation": "^2.3.1" - }, - "peerDependencies": { - "@octokit/core": ">=3" - } - }, - "node_modules/@octokit/request": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", - "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", - "dev": true, - "dependencies": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", - "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", - "universal-user-agent": "^6.0.0" - } - }, - "node_modules/@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", - "dev": true, - "dependencies": { - "@octokit/types": "^6.0.3", - "deprecation": "^2.0.0", - "once": "^1.4.0" - } - }, - "node_modules/@octokit/rest": { - "version": "18.12.0", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz", - "integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==", - "dev": true, - "dependencies": { - "@octokit/core": "^3.5.1", - "@octokit/plugin-paginate-rest": "^2.16.8", - "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^5.12.0" - } - }, - "node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", - "dev": true, - "dependencies": { - "@octokit/openapi-types": "^12.11.0" - } - }, - "node_modules/@semantic-release/changelog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@semantic-release/changelog/-/changelog-5.0.1.tgz", - "integrity": "sha512-unvqHo5jk4dvAf2nZ3aw4imrlwQ2I50eVVvq9D47Qc3R+keNqepx1vDYwkjF8guFXnOYaYcR28yrZWno1hFbiw==", - "dev": true, - "dependencies": { - "@semantic-release/error": "^2.1.0", - "aggregate-error": "^3.0.0", - "fs-extra": "^9.0.0", - "lodash": "^4.17.4" - }, - "engines": { - "node": ">=10.18" - }, - "peerDependencies": { - "semantic-release": ">=15.8.0 <18.0.0" - } - }, - "node_modules/@semantic-release/commit-analyzer": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-8.0.1.tgz", - "integrity": "sha512-5bJma/oB7B4MtwUkZC2Bf7O1MHfi4gWe4mA+MIQ3lsEV0b422Bvl1z5HRpplDnMLHH3EXMoRdEng6Ds5wUqA3A==", - "dev": true, - "dependencies": { - "conventional-changelog-angular": "^5.0.0", - "conventional-commits-filter": "^2.0.0", - "conventional-commits-parser": "^3.0.7", - "debug": "^4.0.0", - "import-from": "^3.0.0", - "lodash": "^4.17.4", - "micromatch": "^4.0.2" - }, - "engines": { - "node": ">=10.18" - }, - "peerDependencies": { - "semantic-release": ">=16.0.0 <18.0.0" - } - }, - "node_modules/@semantic-release/error": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-2.2.0.tgz", - "integrity": "sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg==", - "dev": true - }, - "node_modules/@semantic-release/git": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@semantic-release/git/-/git-9.0.1.tgz", - "integrity": "sha512-75P03s9v0xfrH9ffhDVWRIX0fgWBvJMmXhUU0rMTKYz47oMXU5O95M/ocgIKnVJlWZYoC+LpIe4Ye6ev8CrlUQ==", - "dev": true, - "dependencies": { - "@semantic-release/error": "^2.1.0", - "aggregate-error": "^3.0.0", - "debug": "^4.0.0", - "dir-glob": "^3.0.0", - "execa": "^5.0.0", - "lodash": "^4.17.4", - "micromatch": "^4.0.0", - "p-reduce": "^2.0.0" - }, - "engines": { - "node": ">=10.18" - }, - "peerDependencies": { - "semantic-release": ">=16.0.0 <18.0.0" - } - }, - "node_modules/@semantic-release/github": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-7.2.3.tgz", - "integrity": "sha512-lWjIVDLal+EQBzy697ayUNN8MoBpp+jYIyW2luOdqn5XBH4d9bQGfTnjuLyzARZBHejqh932HVjiH/j4+R7VHw==", - "dev": true, - "dependencies": { - "@octokit/rest": "^18.0.0", - "@semantic-release/error": "^2.2.0", - "aggregate-error": "^3.0.0", - "bottleneck": "^2.18.1", - "debug": "^4.0.0", - "dir-glob": "^3.0.0", - "fs-extra": "^10.0.0", - "globby": "^11.0.0", - "http-proxy-agent": "^4.0.0", - "https-proxy-agent": "^5.0.0", - "issue-parser": "^6.0.0", - "lodash": "^4.17.4", - "mime": "^2.4.3", - "p-filter": "^2.0.0", - "p-retry": "^4.0.0", - "url-join": "^4.0.0" - }, - "engines": { - "node": ">=10.18" - }, - "peerDependencies": { - "semantic-release": ">=16.0.0 <18.0.0" - } - }, - "node_modules/@semantic-release/github/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@semantic-release/github/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@semantic-release/npm": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-7.1.3.tgz", - "integrity": "sha512-x52kQ/jR09WjuWdaTEHgQCvZYMOTx68WnS+TZ4fya5ZAJw4oRtJETtrvUw10FdfM28d/keInQdc66R1Gw5+OEQ==", - "dev": true, - "dependencies": { - "@semantic-release/error": "^2.2.0", - "aggregate-error": "^3.0.0", - "execa": "^5.0.0", - "fs-extra": "^10.0.0", - "lodash": "^4.17.15", - "nerf-dart": "^1.0.0", - "normalize-url": "^6.0.0", - "npm": "^7.0.0", - "rc": "^1.2.8", - "read-pkg": "^5.0.0", - "registry-auth-token": "^4.0.0", - "semver": "^7.1.2", - "tempy": "^1.0.0" - }, - "engines": { - "node": ">=10.19" - }, - "peerDependencies": { - "semantic-release": ">=16.0.0 <18.0.0" - } - }, - "node_modules/@semantic-release/npm/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@semantic-release/npm/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@semantic-release/release-notes-generator": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-9.0.3.tgz", - "integrity": "sha512-hMZyddr0u99OvM2SxVOIelHzly+PP3sYtJ8XOLHdMp8mrluN5/lpeTnIO27oeCYdupY/ndoGfvrqDjHqkSyhVg==", - "dev": true, - "dependencies": { - "conventional-changelog-angular": "^5.0.0", - "conventional-changelog-writer": "^4.0.0", - "conventional-commits-filter": "^2.0.0", - "conventional-commits-parser": "^3.0.0", - "debug": "^4.0.0", - "get-stream": "^6.0.0", - "import-from": "^3.0.0", - "into-stream": "^6.0.0", - "lodash": "^4.17.4", - "read-pkg-up": "^7.0.0" - }, - "engines": { - "node": ">=10.18" - }, - "peerDependencies": { - "semantic-release": ">=15.8.0 <18.0.0" - } - }, - "node_modules/@sentry-internal/tracing": { - "version": "7.102.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.102.1.tgz", - "integrity": "sha512-RkFlFyAC0fQOvBbBqnq0CLmFW5m3JJz9pKbZd5vXPraWAlniKSb1bC/4DF9SlNx0FN1LWG+IU3ISdpzwwTeAGg==", - "dev": true, - "dependencies": { - "@sentry/core": "7.102.1", - "@sentry/types": "7.102.1", - "@sentry/utils": "7.102.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/core": { - "version": "7.102.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.102.1.tgz", - "integrity": "sha512-QjY+LSP3du3J/C8x/FfEbRxgZgsWd0jfTJ4P7s9f219I1csK4OeBMC3UA1HwEa0pY/9OF6H/egW2CjOcMM5Pdg==", - "dev": true, - "dependencies": { - "@sentry/types": "7.102.1", - "@sentry/utils": "7.102.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/node": { - "version": "7.102.1", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.102.1.tgz", - "integrity": "sha512-mb3vmM3SGuCruckPiv/Vafeh89UQavTfpPFoU6Jwe6dSpQ39BO8fO8k8Zev+/nP6r/FKLtX17mJobErHECXsYw==", - "dev": true, - "dependencies": { - "@sentry-internal/tracing": "7.102.1", - "@sentry/core": "7.102.1", - "@sentry/types": "7.102.1", - "@sentry/utils": "7.102.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/types": { - "version": "7.102.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.102.1.tgz", - "integrity": "sha512-htKorf3t/D0XYtM7foTcmG+rM47rDP6XdbvCcX5gBCuCYlzpM1vqCt2rl3FLktZC6TaIpFRJw1TLfx6m+x5jdA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/utils": { - "version": "7.102.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.102.1.tgz", - "integrity": "sha512-+8WcFjHVV/HROXSAwMuUzveElBFC43EiTG7SNEBNgOUeQzQVTmbUZXyTVgLrUmtoWqvnIxCacoLxtZo1o67kdg==", - "dev": true, - "dependencies": { - "@sentry/types": "7.102.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.24.51", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", - "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" - }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/async": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@types/async/-/async-3.2.24.tgz", - "integrity": "sha512-8iHVLHsCCOBKjCF2KwFe0p9Z3rfM9mL+sSP8btyR5vTjJRAqpBYD28/ZLgXPf0pjG1VxOvtCV/BgXkQbpSe8Hw==" - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", - "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/extend": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/extend/-/extend-3.0.4.tgz", - "integrity": "sha512-ArMouDUTJEz1SQRpFsT2rIw7DeqICFv5aaVzLSIYMYQSLcwcGOfT3VyglQs/p7K3F7fT4zxr0NWxYZIdifD6dA==" - }, - "node_modules/@types/file-type": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@types/file-type/-/file-type-5.2.2.tgz", - "integrity": "sha512-GWtM4fyqfb+bec4ocpo51/y4x0b83Je+iA6eV131LT9wL0//G+1UgwbkMg7w61ceOwR+KkZXK00z44jrrNljWg==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/ignore-walk": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/ignore-walk/-/ignore-walk-3.0.2.tgz", - "integrity": "sha512-piannjEnKe/Ka68B2kz6lhs/Yv7T7aKgMGaqfZ4IZUK18KUk4VS1cpke+8s76JjNigFWcOydfG/KKnAuxmWTFA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@types/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-EE11Sn7gzHEF9FGkYHTkFpPuDEamLudLvaGnBciNgH55fTYboWZHINR6MP8+CfCOjPJX08l4teRrjCY11gz1CA==" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/linkify-it": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", - "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", - "dev": true - }, - "node_modules/@types/markdown-it": { - "version": "12.2.3", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", - "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", - "dev": true, - "dependencies": { - "@types/linkify-it": "*", - "@types/mdurl": "*" - } - }, - "node_modules/@types/mdurl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", - "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", - "dev": true - }, - "node_modules/@types/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", - "dev": true - }, - "node_modules/@types/ms": { - "version": "0.7.34", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", - "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" - }, - "node_modules/@types/node": { - "version": "13.13.52", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz", - "integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==" - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true - }, - "node_modules/@types/parse-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", - "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", - "dev": true - }, - "node_modules/@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true - }, - "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "dev": true - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==" - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==" - }, - "node_modules/@types/websocket": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.10.tgz", - "integrity": "sha512-svjGZvPB7EzuYS94cI7a+qhwgGU1y89wUgjT6E2wVUfmAGIvRfT7obBvRtnhXCSsoMdlG4gBFGE7MfkIXZLoww==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yargs": { - "version": "15.0.19", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", - "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" - }, - "node_modules/@voxpelli/semver-set": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@voxpelli/semver-set/-/semver-set-1.0.1.tgz", - "integrity": "sha512-iX4U4cSYjaI3rQtVbgQa020HOBLAJ/52osBg5y2UTk1FqrYy9Jc+IrQXmgq2/rsewqLOLMrmIyKLjycth/8ZGg==", - "dev": true, - "dependencies": { - "cartesian-product": "^2.1.2", - "invariant": "^2.1.0", - "semver": "^5.4.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/@voxpelli/semver-set/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "optional": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ansicolors": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", - "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==", - "dev": true - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/argv": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", - "integrity": "sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dev": true, - "engines": { - "node": ">=0.6.10" - } - }, - "node_modules/argv-formatter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/argv-formatter/-/argv-formatter-1.0.0.tgz", - "integrity": "sha512-F2+Hkm9xFaRg+GkaNnbwXNDV5O6pnCFEmqyhvfC/Ic5LbgOWjJh3L+mN/s91rxVL3znE7DYVpW0GJFT+4YBgWw==", - "dev": true - }, - "node_modules/array-ify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", - "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/babel-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", - "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", - "dev": true, - "dependencies": { - "@jest/transform": "^28.1.3", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.1.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", - "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", - "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^28.1.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", - "dev": true - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "node_modules/boolean": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", - "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", - "dev": true - }, - "node_modules/bottleneck": { - "version": "2.19.5", - "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", - "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "dependencies": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "node_modules/buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" - }, - "node_modules/buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", - "dev": true - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/bufferutil": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", - "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cachedir": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", - "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase-keys/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001589", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001589.tgz", - "integrity": "sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/cardinal": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", - "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", - "dev": true, - "dependencies": { - "ansicolors": "~0.3.2", - "redeyed": "~2.1.0" - }, - "bin": { - "cdl": "bin/cdl.js" - } - }, - "node_modules/cartesian-product": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cartesian-product/-/cartesian-product-2.1.2.tgz", - "integrity": "sha512-Jsrlfq3wdqW+bL21On+aBV678QKGuo+lr79IkXdfYfqKYoJWWemm8g6YC3bBSzyG2AWiGsHqv5i8vCttKHUZlA==", + "node_modules/@types/mdurl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", + "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", "dev": true }, - "node_modules/catharsis": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", - "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", - "dev": true, - "dependencies": { - "lodash": "^4.17.15" - }, - "engines": { - "node": ">= 10" - } + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } + "node_modules/@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "engines": { - "node": ">=10" - } + "node_modules/@types/node": { + "version": "13.13.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz", + "integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==" }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", "dev": true }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } + "node_modules/@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", + "dev": true }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==" }, - "node_modules/cli-table3": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", - "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", - "dev": true, + "node_modules/@types/websocket": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.10.tgz", + "integrity": "sha512-svjGZvPB7EzuYS94cI7a+qhwgGU1y89wUgjT6E2wVUfmAGIvRfT7obBvRtnhXCSsoMdlG4gBFGE7MfkIXZLoww==", "dependencies": { - "string-width": "^4.2.0" - }, - "engines": { - "node": "10.* || >= 12.*" - }, - "optionalDependencies": { - "@colors/colors": "1.5.0" + "@types/node": "*" } }, - "node_modules/cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@types/yargs-parser": "*" } }, - "node_modules/cli-truncate/node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true }, - "node_modules/cli-truncate/node_modules/slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "node_modules/@voxpelli/semver-set": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@voxpelli/semver-set/-/semver-set-1.0.1.tgz", + "integrity": "sha512-iX4U4cSYjaI3rQtVbgQa020HOBLAJ/52osBg5y2UTk1FqrYy9Jc+IrQXmgq2/rsewqLOLMrmIyKLjycth/8ZGg==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "cartesian-product": "^2.1.2", + "invariant": "^2.1.0", + "semver": "^5.4.1" }, "engines": { - "node": ">=8" + "node": ">=4.0.0" } }, - "node_modules/cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "node_modules/@voxpelli/semver-set/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "engines": { - "node": ">= 10" + "bin": { + "semver": "bin/semver" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=12" + "node": ">=0.4.0" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "engines": { - "node": ">=0.8" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, + "dependencies": { + "debug": "4" + }, "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" + "node": ">= 6.0.0" } }, - "node_modules/codecov": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz", - "integrity": "sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==", - "deprecated": "https://about.codecov.io/blog/codecov-uploader-deprecation-plan/", + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "dependencies": { - "argv": "0.0.2", - "ignore-walk": "3.0.4", - "js-yaml": "3.14.1", - "teeny-request": "7.1.1", - "urlgrey": "1.0.0" - }, - "bin": { - "codecov": "bin/codecov" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" }, "engines": { - "node": ">=4.0" + "node": ">=8" } }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "optional": true, "dependencies": { - "color-name": "~1.1.4" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=7.0.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, "dependencies": { - "delayed-stream": "~1.0.0" + "type-fest": "^0.21.3" }, "engines": { - "node": ">= 0.8" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/commitizen": { + "node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz", - "integrity": "sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "cachedir": "2.3.0", - "cz-conventional-changelog": "3.3.0", - "dedent": "0.7.0", - "detect-indent": "6.1.0", - "find-node-modules": "^2.1.2", - "find-root": "1.1.0", - "fs-extra": "9.1.0", - "glob": "7.2.3", - "inquirer": "8.2.5", - "is-utf8": "^0.2.1", - "lodash": "4.17.21", - "minimist": "1.2.7", - "strip-bom": "4.0.0", - "strip-json-comments": "3.1.1" - }, - "bin": { - "commitizen": "bin/commitizen", - "cz": "bin/git-cz", - "git-cz": "bin/git-cz" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 12" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/compare-func": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", - "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "node_modules/ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { - "array-ify": "^1.0.0", - "dot-prop": "^5.1.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/concat-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "engines": [ - "node >= 6.0" - ], "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" + "sprintf-js": "~1.0.2" } }, - "node_modules/conventional-changelog-angular": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", - "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "node_modules/argv": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", + "integrity": "sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", "dev": true, - "dependencies": { - "compare-func": "^2.0.0", - "q": "^1.5.1" - }, "engines": { - "node": ">=10" + "node": ">=0.6.10" } }, - "node_modules/conventional-changelog-writer": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz", - "integrity": "sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw==", + "node_modules/argv-formatter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/argv-formatter/-/argv-formatter-1.0.0.tgz", + "integrity": "sha512-F2+Hkm9xFaRg+GkaNnbwXNDV5O6pnCFEmqyhvfC/Ic5LbgOWjJh3L+mN/s91rxVL3znE7DYVpW0GJFT+4YBgWw==", + "dev": true + }, + "node_modules/array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "dependencies": { - "compare-func": "^2.0.0", - "conventional-commits-filter": "^2.0.7", - "dateformat": "^3.0.0", - "handlebars": "^4.7.6", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "semver": "^6.0.0", - "split": "^1.0.0", - "through2": "^4.0.0" - }, - "bin": { - "conventional-changelog-writer": "cli.js" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/conventional-changelog-writer/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/conventional-commit-types": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz", - "integrity": "sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==", + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, - "node_modules/conventional-commits-filter": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", - "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, - "dependencies": { - "lodash.ismatch": "^4.4.0", - "modify-values": "^1.0.0" - }, "engines": { - "node": ">=10" + "node": ">=0.8" } }, - "node_modules/conventional-commits-parser": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", - "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", + "node_modules/astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true, - "dependencies": { - "is-text-path": "^1.0.1", - "JSONStream": "^1.0.4", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "split2": "^3.0.0", - "through2": "^4.0.0" - }, - "bin": { - "conventional-commits-parser": "cli.js" - }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, - "node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, - "optional": true, - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">= 4.0.0" } }, - "node_modules/cosmiconfig-typescript-loader": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz", - "integrity": "sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==", + "node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, - "optional": true, "dependencies": { - "jiti": "^1.19.1" + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" }, "engines": { - "node": ">=v16" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { - "@types/node": "*", - "cosmiconfig": ">=8.2", - "typescript": ">=4" + "@babel/core": "^7.8.0" } }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "optional": true - }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, - "optional": true, "dependencies": { - "argparse": "^2.0.1" + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=8" } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" }, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "engines": { - "node": ">=8" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/cz-conventional-changelog": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", - "integrity": "sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==", + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { - "chalk": "^2.4.1", - "commitizen": "^4.0.3", - "conventional-commit-types": "^3.0.0", - "lodash.map": "^4.5.1", - "longest": "^2.0.1", - "word-wrap": "^1.0.3" + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@commitlint/load": ">6.1.1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/cz-conventional-changelog/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/babel-preset-current-node-syntax": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, - "engines": { - "node": ">=4" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/cz-conventional-changelog/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { - "node": ">=4" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/cz-conventional-changelog/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", + "dev": true + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, "dependencies": { - "color-name": "1.1.3" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" } }, - "node_modules/cz-conventional-changelog/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, - "node_modules/cz-conventional-changelog/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/boolean": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", + "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", + "dev": true + }, + "node_modules/bottleneck": { + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/cz-conventional-changelog/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "fill-range": "^7.0.1" }, "engines": { - "node": ">=4" - } - }, - "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "node": ">=8" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "node_modules/browserslist": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "assert-plus": "^1.0.0" + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" }, "engines": { - "node": ">=0.10" + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node-int64": "^0.4.0" } }, - "node_modules/debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, - "engines": { - "node": "*" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, - "node_modules/decamelize": { + "node_modules/buffer-alloc": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" } }, - "node_modules/decamelize-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", - "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", - "dev": true, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", + "dev": true + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" + "node-gyp-build": "^4.3.0" }, "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6.14.2" } }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "node_modules/cachedir": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true, "engines": { - "node": ">=4.0.0" + "node": ">=6" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, - "dependencies": { - "clone": "^1.0.2" + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "node_modules/camelcase-keys/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/del": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", - "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", + "node_modules/caniuse-lite": { + "version": "1.0.30001678", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001678.tgz", + "integrity": "sha512-RR+4U/05gNtps58PEBDZcPWTgEO2MBeoPZ96aQcjmfkBWRIDfN451fW2qyDA9/+HohLLIL5GqiMwA+IB1pWarw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", "dev": true, "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + }, + "bin": { + "cdl": "bin/cdl.js" + } + }, + "node_modules/cartesian-product": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cartesian-product/-/cartesian-product-2.1.2.tgz", + "integrity": "sha512-Jsrlfq3wdqW+bL21On+aBV678QKGuo+lr79IkXdfYfqKYoJWWemm8g6YC3bBSzyG2AWiGsHqv5i8vCttKHUZlA==", + "dev": true + }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "dependencies": { + "lodash": "^4.17.15" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 10" } }, - "node_modules/del/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, "engines": { - "node": ">=0.4.0" + "node": ">=10" } }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, - "node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/detect-indent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", - "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "node_modules/cjs-module-lexer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", + "dev": true + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/detect-newline": { + "node_modules/cli-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, "engines": { "node": ">=8" } }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true - }, - "node_modules/dezalgo": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", - "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", - "dev": true, - "dependencies": { - "asap": "^2.0.0", - "wrappy": "1" - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diff-sequences": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", - "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" + "node": ">=6" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, "dependencies": { - "esutils": "^2.0.2" + "string-width": "^4.2.0" }, "engines": { - "node": ">=6.0.0" + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" } }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, "dependencies": { - "is-obj": "^2.0.0" + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/dot-prop/node_modules/is-obj": { + "node_modules/cli-truncate/node_modules/astral-regex": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/dotenv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", - "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", - "engines": { - "node": ">=6" - } - }, - "node_modules/duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "node_modules/cli-truncate/node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, "dependencies": { - "readable-stream": "^2.0.2" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/duplexer2/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "engines": { + "node": ">= 10" } }, - "node_modules/duplexer2/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/duplexer2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.681", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.681.tgz", - "integrity": "sha512-1PpuqJUFWoXZ1E54m8bsLPVYwIVCRzvaL+n5cjigGga4z854abDnFRc+cTa2th4S79kyGqya/1xoR7h+Y5G5lg==", - "dev": true - }, - "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", - "dev": true, + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" } }, - "node_modules/enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, "engines": { - "node": ">=8.6" + "node": ">=0.8" } }, - "node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" } }, - "node_modules/env-ci": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-5.5.0.tgz", - "integrity": "sha512-o0JdWIbOLP+WJKIUt36hz1ImQQFuN92nhsfTkHHap+J8CiI8WgGpH/a9jEGHh4/TU5BUUGjlnKXNoDb57+ne+A==", + "node_modules/codecov": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz", + "integrity": "sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==", + "deprecated": "https://about.codecov.io/blog/codecov-uploader-deprecation-plan/", "dev": true, "dependencies": { - "execa": "^5.0.0", - "fromentries": "^1.3.2", - "java-properties": "^1.0.0" + "argv": "0.0.2", + "ignore-walk": "3.0.4", + "js-yaml": "3.14.1", + "teeny-request": "7.1.1", + "urlgrey": "1.0.0" + }, + "bin": { + "codecov": "bin/codecov" }, "engines": { - "node": ">=10.17" + "node": ">=4.0" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "is-arrayish": "^0.2.1" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dependencies": { - "get-intrinsic": "^1.2.4" + "delayed-stream": "~1.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8" } }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true, "engines": { - "node": ">= 0.4" + "node": ">= 6" } }, - "node_modules/es5-ext": { - "version": "0.10.63", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.63.tgz", - "integrity": "sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ==", - "hasInstallScript": true, + "node_modules/commitizen": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz", + "integrity": "sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==", + "dev": true, "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" + "cachedir": "2.3.0", + "cz-conventional-changelog": "3.3.0", + "dedent": "0.7.0", + "detect-indent": "6.1.0", + "find-node-modules": "^2.1.2", + "find-root": "1.1.0", + "fs-extra": "9.1.0", + "glob": "7.2.3", + "inquirer": "8.2.5", + "is-utf8": "^0.2.1", + "lodash": "4.17.21", + "minimist": "1.2.7", + "strip-bom": "4.0.0", + "strip-json-comments": "3.1.1" + }, + "bin": { + "commitizen": "bin/commitizen", + "cz": "bin/git-cz", + "git-cz": "bin/git-cz" }, "engines": { - "node": ">=0.10" + "node": ">= 12" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "node_modules/compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "dev": true, "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" } }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", "dev": true, - "engines": { - "node": ">=6" + "engines": [ + "node >= 6.0" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/conventional-changelog-angular": { + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", + "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "dev": true, + "dependencies": { + "compare-func": "^2.0.0", + "q": "^1.5.1" + }, "engines": { - "node": ">=0.8.0" + "node": ">=10" } }, - "node_modules/eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "node_modules/conventional-changelog-writer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz", + "integrity": "sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.3", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "compare-func": "^2.0.0", + "conventional-commits-filter": "^2.0.7", + "dateformat": "^3.0.0", + "handlebars": "^4.7.6", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "semver": "^6.0.0", + "split": "^1.0.0", + "through2": "^4.0.0" }, "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "conventional-changelog-writer": "cli.js" }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-google": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.14.0.tgz", - "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==", - "dev": true, "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "eslint": ">=5.16.0" + "node": ">=10" } }, - "node_modules/eslint-config-prettier": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", - "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", + "node_modules/conventional-changelog-writer/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "dependencies": { - "get-stdin": "^6.0.0" - }, "bin": { - "eslint-config-prettier-check": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=3.14.1" + "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "node_modules/conventional-commit-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz", + "integrity": "sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==", + "dev": true + }, + "node_modules/conventional-commits-filter": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", + "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", "dev": true, "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.0" }, "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" + "node": ">=10" } }, - "node_modules/eslint-plugin-es/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/conventional-commits-parser": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", + "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "is-text-path": "^1.0.1", + "JSONStream": "^1.0.4", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" }, - "engines": { - "node": ">=6" + "bin": { + "conventional-commits-parser": "cli.js" }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-plugin-es/node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "node": ">=10" } }, - "node_modules/eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, + "optional": true, "dependencies": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" }, "engines": { - "node": ">=8.10.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" }, "peerDependencies": { - "eslint": ">=5.16.0" + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/eslint-plugin-node/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/cosmiconfig-typescript-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz", + "integrity": "sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==", "dev": true, + "optional": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "jiti": "^1.19.1" }, "engines": { - "node": ">=6" + "node": ">=v16" }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-plugin-node/node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" + "peerDependencies": { + "@types/node": "*", + "cosmiconfig": ">=8.2", + "typescript": ">=4" } }, - "node_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/cosmiconfig/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, - "bin": { - "semver": "bin/semver.js" - } + "optional": true }, - "node_modules/eslint-plugin-prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", - "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", + "node_modules/cosmiconfig/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "optional": true, "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "eslint": ">=5.0.0", - "prettier": ">=1.13.0" + "argparse": "^2.0.1" }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" }, "engines": { - "node": ">=8.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=6" + "node": ">= 8" } }, - "node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/cz-conventional-changelog": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", + "integrity": "sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "chalk": "^2.4.1", + "commitizen": "^4.0.3", + "conventional-commit-types": "^3.0.0", + "lodash.map": "^4.5.1", + "longest": "^2.0.1", + "word-wrap": "^1.0.3" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@commitlint/load": ">6.1.1" } }, - "node_modules/eslint/node_modules/ansi-styles": { + "node_modules/cz-conventional-changelog/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", @@ -4425,7 +2909,7 @@ "node": ">=4" } }, - "node_modules/eslint/node_modules/chalk": { + "node_modules/cz-conventional-changelog/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", @@ -4439,7 +2923,7 @@ "node": ">=4" } }, - "node_modules/eslint/node_modules/color-convert": { + "node_modules/cz-conventional-changelog/node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", @@ -4448,1361 +2932,1548 @@ "color-name": "1.1.3" } }, - "node_modules/eslint/node_modules/color-name": { + "node_modules/cz-conventional-changelog/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, - "node_modules/eslint/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "node_modules/cz-conventional-changelog/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/cz-conventional-changelog/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=4.8" + "node": ">=4" } }, - "node_modules/eslint/node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/eslint/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true, "engines": { - "node": ">=4" + "node": "*" } }, - "node_modules/eslint/node_modules/inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/inquirer/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { - "node": ">=8" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint/node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/del": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", + "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", + "dev": true, + "dependencies": { + "globby": "^11.0.1", + "graceful-fs": "^4.2.4", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.2", + "p-map": "^4.0.0", + "rimraf": "^3.0.2", + "slash": "^3.0.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/inquirer/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/del/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "glob": "^7.1.3" }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "engines": { - "node": ">=7.0.0" + "node": ">=0.4.0" } }, - "node_modules/eslint/node_modules/inquirer/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "node_modules/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", "dev": true }, - "node_modules/eslint/node_modules/inquirer/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { "node": ">=8" } }, - "node_modules/eslint/node_modules/inquirer/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "dev": true }, - "node_modules/eslint/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "node_modules/dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" } }, - "node_modules/eslint/node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "dependencies": { - "tslib": "^1.9.0" - }, "engines": { - "npm": ">=2.0.0" + "node": ">=0.3.1" } }, - "node_modules/eslint/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/eslint/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "dependencies": { - "shebang-regex": "^1.0.0" + "path-type": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/eslint/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, "dependencies": { - "ansi-regex": "^4.1.0" + "is-obj": "^2.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "node_modules/dot-prop/node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/eslint/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, - "node_modules/eslint/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/eslint/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", "dev": true, "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" + "readable-stream": "^2.0.2" } }, - "node_modules/esniff": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", - "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "node_modules/duplexer2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.10" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/esniff/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + "node_modules/duplexer2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, - "node_modules/espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "node_modules/duplexer2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6.0.0" + "safe-buffer": "~5.1.0" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" } }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "node_modules/electron-to-chromium": { + "version": "1.5.52", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.52.tgz", + "integrity": "sha512-xtoijJTZ+qeucLBDNztDOuQBE1ksqjvNjvqFoST3nGC7fSpqJ+X6BdTBaY5BHG+IhWWmpc6b/KfpeuEDupEPOQ==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, "engines": { - "node": ">=0.10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, - "engines": { - "node": ">=4.0" + "dependencies": { + "once": "^1.4.0" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, "dependencies": { - "estraverse": "^5.2.0" + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=4.0" + "node": ">=8.6" } }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", "dev": true, - "engines": { - "node": ">=4.0" + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "node_modules/env-ci": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-5.5.0.tgz", + "integrity": "sha512-o0JdWIbOLP+WJKIUt36hz1ImQQFuN92nhsfTkHHap+J8CiI8WgGpH/a9jEGHh4/TU5BUUGjlnKXNoDb57+ne+A==", "dev": true, + "dependencies": { + "execa": "^5.0.0", + "fromentries": "^1.3.2", + "java-properties": "^1.0.0" + }, "engines": { - "node": ">=4.0" + "node": ">=10.17" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" + "is-arrayish": "^0.2.1" } }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "get-intrinsic": "^1.2.4" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": ">= 0.4" } }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">= 0.4" } }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, + "node_modules/es5-ext": { + "version": "0.10.63", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.63.tgz", + "integrity": "sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ==", + "hasInstallScript": true, "dependencies": { - "homedir-polyfill": "^1.0.1" + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.10" } }, - "node_modules/expect": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", - "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", "dependencies": { - "@jest/types": "^26.6.2", - "ansi-styles": "^4.0.0", - "jest-get-type": "^26.3.0", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-regex-util": "^26.0.0" - }, - "engines": { - "node": ">= 10.14.2" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", "dependencies": { - "type": "^2.7.2" + "d": "^1.0.1", + "ext": "^1.1.2" } }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "node_modules/eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", "dev": true, "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-google": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.14.0.tgz", + "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==", + "dev": true, "engines": { - "node": ">=8.6.0" + "node": ">=0.10.0" + }, + "peerDependencies": { + "eslint": ">=5.16.0" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "node_modules/eslint-config-prettier": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", + "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", "dev": true, "dependencies": { - "punycode": "^1.3.2" + "get-stdin": "^6.0.0" + }, + "bin": { + "eslint-config-prettier-check": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=3.14.1" } }, - "node_modules/fast-url-parser/node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "node_modules/eslint-plugin-es": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", "dev": true, "dependencies": { - "reusify": "^1.0.4" + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" } }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "dependencies": { - "bser": "2.1.1" + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/figures": { + "node_modules/eslint-plugin-es/node_modules/regexpp": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, "engines": { "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "node_modules/eslint-plugin-node": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", "dev": true, "dependencies": { - "flat-cache": "^2.0.1" + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" }, "engines": { - "node": ">=4" + "node": ">=8.10.0" + }, + "peerDependencies": { + "eslint": ">=5.16.0" } }, - "node_modules/file-type": { - "version": "16.5.4", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz", - "integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==", + "node_modules/eslint-plugin-node/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, "dependencies": { - "readable-web-to-node-stream": "^3.0.0", - "strtok3": "^6.2.4", - "token-types": "^4.1.1" + "eslint-visitor-keys": "^1.1.0" }, "engines": { - "node": ">=10" + "node": ">=6" }, "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, + "node_modules/eslint-plugin-node/node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, "engines": { - "node": ">=8" + "node": ">= 4" } }, - "node_modules/find-node-modules": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz", - "integrity": "sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==", + "node_modules/eslint-plugin-node/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "dependencies": { - "findup-sync": "^4.0.0", - "merge": "^2.1.1" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/eslint-plugin-prettier": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", + "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "prettier-linter-helpers": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=5.0.0", + "prettier": ">=1.13.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } } }, - "node_modules/find-versions": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", - "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==", + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "dependencies": { - "semver-regex": "^3.1.2" + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8.0.0" } }, - "node_modules/findup-sync": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", + "node_modules/eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", "dev": true, "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" + "eslint-visitor-keys": "^1.1.0" }, "engines": { - "node": ">= 8" + "node": ">=6" } }, - "node_modules/flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true, - "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, "engines": { "node": ">=4" } }, - "node_modules/flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", - "dev": true + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } }, - "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" + "node_modules/eslint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "engines": { + "node": ">=4" } }, - "node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "node_modules/eslint/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">= 0.12" + "node": ">=4" } }, - "node_modules/from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "node_modules/eslint/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "color-name": "1.1.3" } }, - "node_modules/from2/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/eslint/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" } }, - "node_modules/from2/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "node_modules/eslint/node_modules/cross-spawn/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } }, - "node_modules/from2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/eslint/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.0" + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "node_modules/eslint/node_modules/inquirer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "node_modules/eslint/node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/fs-extra/node_modules/universalify": { + "node_modules/eslint/node_modules/inquirer/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, "engines": { - "node": ">= 10.0.0" + "node": ">=7.0.0" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "node_modules/eslint/node_modules/inquirer/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "node_modules/eslint/node_modules/inquirer/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=8" } }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "node_modules/eslint/node_modules/inquirer/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/eslint/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "dev": true, "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": ">=4" } }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "node_modules/eslint/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", "dev": true, "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "tslib": "^1.9.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "npm": ">=2.0.0" } }, - "node_modules/get-own-enumerable-property-symbols": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", - "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", - "dev": true + "node_modules/eslint/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "node_modules/eslint/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "node_modules/eslint/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "node_modules/eslint/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "ansi-regex": "^4.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=6" } }, - "node_modules/git-log-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.0.tgz", - "integrity": "sha512-rnCVNfkTL8tdNryFuaY0fYiBWEBcgF748O6ZI61rslBvr2o7U65c2/6npCRqH40vuAhtgtDiqLTJjBVdrejCzA==", + "node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, - "dependencies": { - "argv-formatter": "~1.0.0", - "spawn-error-forwarder": "~1.0.0", - "split2": "~1.0.0", - "stream-combiner2": "~1.1.1", - "through2": "~2.0.0", - "traverse": "~0.6.6" + "engines": { + "node": ">=6" } }, - "node_modules/git-log-parser/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "node_modules/eslint/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/git-log-parser/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "node_modules/eslint/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "node_modules/git-log-parser/node_modules/split2": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-1.0.0.tgz", - "integrity": "sha512-NKywug4u4pX/AZBB1FCPzZ6/7O+Xhz1qMVbzTvvKvikjO99oPN87SkK08mEY9P63/5lWjK+wgOOgApnTg5r6qg==", + "node_modules/eslint/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "through2": "~2.0.0" + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "node_modules/git-log-parser/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", "dependencies": { - "safe-buffer": "~5.1.0" + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/git-log-parser/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "node_modules/esniff/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, + "node_modules/espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", "dev": true, "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6.0.0" } }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=4" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "estraverse": "^5.1.0" }, "engines": { - "node": ">= 6" + "node": ">=0.10" } }, - "node_modules/global-agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", - "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "dependencies": { - "boolean": "^3.0.1", - "es6-error": "^4.1.1", - "matcher": "^3.0.0", - "roarr": "^2.15.3", - "semver": "^7.3.2", - "serialize-error": "^7.0.1" - }, "engines": { - "node": ">=10.0" + "node": ">=4.0" } }, - "node_modules/global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "optional": true, "dependencies": { - "ini": "^1.3.4" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=4" + "node": ">=4.0" } }, - "node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=4.0" } }, - "node_modules/global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" + "d": "1", + "es5-ext": "~0.10.14" } }, - "node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.8.0" } }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, "dependencies": { - "define-properties": "^1.1.3" + "homedir-polyfill": "^1.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/globby/node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, - "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "node": ">=8.6.0" } }, - "node_modules/hard-rejection": { + "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", "dev": true, - "engines": { - "node": ">=6" + "dependencies": { + "punycode": "^1.3.2" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } + "node_modules/fast-url-parser/node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "reusify": "^1.0.4" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "dependencies": { + "bser": "2.1.1" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "node_modules/file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "dev": true, "dependencies": { - "function-bind": "^1.1.2" + "flat-cache": "^2.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=4" } }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true, + "node_modules/file-type": { + "version": "16.5.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz", + "integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==", + "dependencies": { + "readable-web-to-node-stream": "^3.0.0", + "strtok3": "^6.2.4", + "token-types": "^4.1.1" + }, "engines": { - "node": "*" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { - "parse-passwd": "^1.0.0" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/hook-std": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-2.0.0.tgz", - "integrity": "sha512-zZ6T5WcuBMIUVh49iPQS9t977t7C0l7OtHrpeMb5uk48JdflRX0NSFvCekfYNmGQETnLq9W/isMyHl69kxGi8g==", + "node_modules/find-node-modules": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz", + "integrity": "sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "findup-sync": "^4.0.0", + "merge": "^2.1.1" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", "dev": true }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "node_modules/find-versions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", + "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==", "dev": true, "dependencies": { - "agent-base": "6", - "debug": "4" + "semver-regex": "^3.1.2" }, "engines": { - "node": ">= 6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "node_modules/findup-sync": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", + "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", "dev": true, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^4.0.2", + "resolve-dir": "^1.0.1" + }, "engines": { - "node": ">=10.17.0" + "node": ">= 8" } }, - "node_modules/ibm-cloud-sdk-core": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/ibm-cloud-sdk-core/-/ibm-cloud-sdk-core-4.2.3.tgz", - "integrity": "sha512-OGg/XhIcBfZ7neqtx2gPl2w/ImAinK/qCYWfm5HEJVOtL7PVRXVfe1f9TY1gyvNEJdGEmjej8reiG5IK1ipkjQ==", + "node_modules/flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, "dependencies": { - "@types/debug": "^4.1.12", - "@types/file-type": "~5.2.1", - "@types/isstream": "^0.1.0", - "@types/node": "~10.14.19", - "@types/tough-cookie": "^4.0.0", - "axios": "1.6.4", - "camelcase": "^5.3.1", - "debug": "^4.3.4", - "dotenv": "^6.2.0", - "expect": "^26.1.0", - "extend": "^3.0.2", - "file-type": "16.5.4", - "form-data": "^2.3.3", - "isstream": "~0.1.2", - "jsonwebtoken": "^9.0.0", - "lodash.isempty": "^4.4.0", - "mime-types": "^2.1.35", - "retry-axios": "^2.6.0", - "tough-cookie": "^4.1.3" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" }, "engines": { - "node": ">=14" + "node": ">=4" } }, - "node_modules/ibm-cloud-sdk-core/node_modules/@types/node": { - "version": "10.14.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.22.tgz", - "integrity": "sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw==" + "node_modules/flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true }, - "node_modules/ibm-cloud-sdk-core/node_modules/axios": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.4.tgz", - "integrity": "sha512-heJnIs6N4aa1eSthhN9M5ioILu8Wi8vmQW9iHQ9NUvfkJb0lEEDUiIdQNAuBtfUt3FxReaKdpQA5DbmMOqzF/A==", - "dependencies": { - "follow-redirects": "^1.15.4", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } } }, - "node_modules/ibm-cloud-sdk-core/node_modules/axios/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -5812,30 +4483,51 @@ "node": ">= 6" } }, - "node_modules/ibm-cloud-sdk-core/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "engines": { - "node": ">=6" + "node_modules/from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/from2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "node_modules/from2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/from2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true, "funding": [ { "type": "github", @@ -5851,1437 +4543,1310 @@ } ] }, - "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs-extra/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, "engines": { - "node": ">= 4" + "node": ">=6.9.0" } }, - "node_modules/ignore-walk": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", - "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "dependencies": { - "minimatch": "^3.0.4" + "engines": { + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "engines": { - "node": ">=6" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "node_modules/get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "dev": true + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8.0.0" } }, - "node_modules/import-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", - "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", + "node_modules/get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "node_modules/git-log-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.0.tgz", + "integrity": "sha512-rnCVNfkTL8tdNryFuaY0fYiBWEBcgF748O6ZI61rslBvr2o7U65c2/6npCRqH40vuAhtgtDiqLTJjBVdrejCzA==", "dev": true, - "engines": { - "node": ">=0.8.19" + "dependencies": { + "argv-formatter": "~1.0.0", + "spawn-error-forwarder": "~1.0.0", + "split2": "~1.0.0", + "stream-combiner2": "~1.1.1", + "through2": "~2.0.0", + "traverse": "~0.6.6" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "node_modules/git-log-parser/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/git-log-parser/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/git-log-parser/node_modules/split2": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-1.0.0.tgz", + "integrity": "sha512-NKywug4u4pX/AZBB1FCPzZ6/7O+Xhz1qMVbzTvvKvikjO99oPN87SkK08mEY9P63/5lWjK+wgOOgApnTg5r6qg==", "dev": true, "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "through2": "~2.0.0" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/inquirer": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", - "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", + "node_modules/git-log-parser/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12.0.0" + "safe-buffer": "~5.1.0" } }, - "node_modules/installed-check": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/installed-check/-/installed-check-3.0.0.tgz", - "integrity": "sha512-4fq+TR/1mS2c4tm2YNo5XDDUxP1YJKKfrPoqJcrpRUNGl8cD0iPjBAjNkRZfGJbvdpm8fcpISn6Fr2q+aUoWYQ==", + "node_modules/git-log-parser/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "dependencies": { - "chalk": "^2.3.0", - "dashdash": "^1.14.0", - "installed-check-core": "^3.0.0" - }, - "bin": { - "installed-check": "cli.js" - }, - "engines": { - "node": ">=10.0.0" + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "node_modules/installed-check-core": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/installed-check-core/-/installed-check-core-3.0.0.tgz", - "integrity": "sha512-gYgMo1JKNryqdi/OArY4xyfIWKwvqJSn7bD1wIZkp00Tg4lSVMnhw85vMFqb/qGqhF4jBwA739HpWh/Dq1UcvA==", + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "@voxpelli/semver-set": "^1.0.1", - "read-installed": "^4.0.3", - "read-package-json": "^2.0.3", - "semver": "^5.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=10.0.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/installed-check-core/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, - "node_modules/installed-check/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/global-agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", + "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "boolean": "^3.0.1", + "es6-error": "^4.1.1", + "matcher": "^3.0.0", + "roarr": "^2.15.3", + "semver": "^7.3.2", + "serialize-error": "^7.0.1" }, "engines": { - "node": ">=4" + "node": ">=10.0" } }, - "node_modules/installed-check/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", "dev": true, + "optional": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ini": "^1.3.4" }, "engines": { "node": ">=4" } }, - "node_modules/installed-check/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/installed-check/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/installed-check/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/installed-check/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "engines": { - "node": ">= 0.10" + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "node_modules/into-stream": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", - "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", + "node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, "dependencies": { - "from2": "^2.3.0", - "p-is-promise": "^3.0.0" + "type-fest": "^0.8.1" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "node_modules/globals/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, - "dependencies": { - "loose-envify": "^1.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, "dependencies": { - "hasown": "^2.0.0" + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "node_modules/globby/node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { - "node": ">=6" + "node": ">= 4" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, "dependencies": { - "is-extglob": "^2.1.1" + "get-intrinsic": "^1.1.3" }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true }, - "node_modules/is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, "engines": { - "node": ">=0.10.0" + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" } }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true, "engines": { "node": ">=6" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==", + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-text-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", "dev": true, "dependencies": { - "text-extensions": "^1.0.0" + "function-bind": "^1.1.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "*" } }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, + "dependencies": { + "parse-passwd": "^1.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/isexe": { + "node_modules/hook-std": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-2.0.0.tgz", + "integrity": "sha512-zZ6T5WcuBMIUVh49iPQS9t977t7C0l7OtHrpeMb5uk48JdflRX0NSFvCekfYNmGQETnLq9W/isMyHl69kxGi8g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, - "node_modules/issue-parser": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/issue-parser/-/issue-parser-6.0.0.tgz", - "integrity": "sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA==", + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, "dependencies": { - "lodash.capitalize": "^4.2.1", - "lodash.escaperegexp": "^4.1.2", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.uniqby": "^4.7.0" + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" }, "engines": { - "node": ">=10.13" - } - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" + "agent-base": "6", + "debug": "4" }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=10.17.0" } }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, + "node_modules/ibm-cloud-sdk-core": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ibm-cloud-sdk-core/-/ibm-cloud-sdk-core-5.1.0.tgz", + "integrity": "sha512-KJCbPz3tiXB1NGAD7cL4JtwpWV8yd/C7jsaHsxvedMo2ZblNG8emMyvSpGhiKAQVZmi3c0ujz6eJdy22NHuUWQ==", "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" + "@types/debug": "^4.1.12", + "@types/node": "~10.14.19", + "@types/tough-cookie": "^4.0.0", + "axios": "1.7.4", + "camelcase": "^6.3.0", + "debug": "^4.3.4", + "dotenv": "^16.4.5", + "extend": "3.0.2", + "file-type": "16.5.4", + "form-data": "4.0.0", + "isstream": "0.1.2", + "jsonwebtoken": "^9.0.2", + "mime-types": "2.1.35", + "retry-axios": "^2.6.0", + "tough-cookie": "^4.1.3" }, "engines": { - "node": ">=10" + "node": ">=18" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, + "node_modules/ibm-cloud-sdk-core/node_modules/@types/node": { + "version": "10.14.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.22.tgz", + "integrity": "sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw==" + }, + "node_modules/ibm-cloud-sdk-core/node_modules/axios": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, + "node_modules/ibm-cloud-sdk-core/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/java-properties": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/java-properties/-/java-properties-1.0.2.tgz", - "integrity": "sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, "engines": { - "node": ">= 0.6.0" + "node": ">=0.10.0" } }, - "node_modules/jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", - "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, - "dependencies": { - "@jest/core": "^28.1.3", - "@jest/types": "^28.1.3", - "import-local": "^3.0.2", - "jest-cli": "^28.1.3" - }, - "bin": { - "jest": "bin/jest.js" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node": ">= 4" } }, - "node_modules/jest-changed-files": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", - "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", + "node_modules/ignore-walk": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", + "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", "dev": true, "dependencies": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "minimatch": "^3.0.4" } }, - "node_modules/jest-changed-files/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-circus": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", - "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "p-limit": "^3.1.0", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=4" } }, - "node_modules/jest-circus/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/import-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", + "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "resolve-from": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/jest-circus/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-circus/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-circus/node_modules/jest-diff": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", - "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=0.8.19" } }, - "node_modules/jest-circus/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/jest-circus/node_modules/jest-matcher-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", - "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/jest-circus/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/inquirer": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=12.0.0" } }, - "node_modules/jest-circus/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/installed-check": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/installed-check/-/installed-check-3.0.0.tgz", + "integrity": "sha512-4fq+TR/1mS2c4tm2YNo5XDDUxP1YJKKfrPoqJcrpRUNGl8cD0iPjBAjNkRZfGJbvdpm8fcpISn6Fr2q+aUoWYQ==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "chalk": "^2.3.0", + "dashdash": "^1.14.0", + "installed-check-core": "^3.0.0" }, - "engines": { - "node": ">=10" + "bin": { + "installed-check": "cli.js" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=10.0.0" } }, - "node_modules/jest-circus/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/installed-check-core": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/installed-check-core/-/installed-check-core-3.0.0.tgz", + "integrity": "sha512-gYgMo1JKNryqdi/OArY4xyfIWKwvqJSn7bD1wIZkp00Tg4lSVMnhw85vMFqb/qGqhF4jBwA739HpWh/Dq1UcvA==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@voxpelli/semver-set": "^1.0.1", + "read-installed": "^4.0.3", + "read-package-json": "^2.0.3", + "semver": "^5.1.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10.0.0" } }, - "node_modules/jest-circus/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/jest-config": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", - "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", + "node_modules/installed-check-core/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.3", - "@jest/types": "^28.1.3", - "babel-jest": "^28.1.3", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.3", - "jest-environment-node": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } + "bin": { + "semver": "bin/semver" } }, - "node_modules/jest-config/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/installed-check/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "color-convert": "^1.9.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=4" } }, - "node_modules/jest-config/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/installed-check/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-config/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-config/node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=4" } }, - "node_modules/jest-config/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/installed-check/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "color-name": "1.1.3" } }, - "node_modules/jest-config/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "node_modules/installed-check/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, - "node_modules/jest-diff": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", - "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" - }, + "node_modules/installed-check/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, "engines": { - "node": ">= 10.14.2" + "node": ">=4" } }, - "node_modules/jest-docblock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", - "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", + "node_modules/installed-check/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "detect-newline": "^3.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=4" } }, - "node_modules/jest-each": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", - "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.3", - "pretty-format": "^28.1.3" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 0.10" } }, - "node_modules/jest-each/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/into-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", + "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "from2": "^2.3.0", + "p-is-promise": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-each/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "loose-envify": "^1.0.0" } }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "hasown": "^2.0.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-each/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=0.10.0" } }, - "node_modules/jest-each/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/jest-each/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/jest-environment-node": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", - "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" + "is-extglob": "^2.1.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=0.10.0" } }, - "node_modules/jest-environment-node/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/jest-environment-node/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "dependencies": { - "@types/yargs-parser": "*" + "engines": { + "node": ">=0.12.0" } }, - "node_modules/jest-get-type": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", - "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "node_modules/is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", + "dev": true, "engines": { - "node": ">= 10.14.2" + "node": ">=0.10.0" } }, - "node_modules/jest-haste-map": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", - "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", + "node_modules/is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "node": ">=6" } }, - "node_modules/jest-haste-map/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/jest-haste-map/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "dev": true, - "dependencies": { - "@types/yargs-parser": "*" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jest-haste-map/node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=0.10.0" } }, - "node_modules/jest-leak-detector": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", - "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", + "node_modules/is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==", "dev": true, - "dependencies": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=0.10.0" } }, - "node_modules/jest-leak-detector/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-leak-detector/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "node_modules/is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", "dev": true, + "dependencies": { + "text-extensions": "^1.0.0" + }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=0.10.0" } }, - "node_modules/jest-leak-detector/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-leak-detector/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", "dev": true }, - "node_modules/jest-matcher-utils": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", - "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" - }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, "engines": { - "node": ">= 10.14.2" + "node": ">=0.10.0" } }, - "node_modules/jest-message-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", - "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/issue-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/issue-parser/-/issue-parser-6.0.0.tgz", + "integrity": "sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA==", + "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.2" + "lodash.capitalize": "^4.2.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.uniqby": "^4.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": ">=10.13" } }, - "node_modules/jest-mock": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", - "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/node": "*" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/jest-mock/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10" } }, - "node_modules/jest-mock/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", - "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", "engines": { - "node": ">= 10.14.2" + "node": ">=10" } }, - "node_modules/jest-resolve": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", - "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10" } }, - "node_modules/jest-resolve-dependencies": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", - "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.3" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "node_modules/java-properties": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/java-properties/-/java-properties-1.0.2.tgz", + "integrity": "sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 0.6.0" } }, - "node_modules/jest-runner": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", - "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "dependencies": { - "@jest/console": "^28.1.3", - "@jest/environment": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.1.1", - "jest-environment-node": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-leak-detector": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-resolve": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-util": "^28.1.3", - "jest-watcher": "^28.1.3", - "jest-worker": "^28.1.3", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/jest-runner/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/jest-changed-files/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-runner/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, + "yocto-queue": "^0.1.0" + }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-runner/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/p-limit": { + "node_modules/jest-circus/node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/jest-circus/node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", @@ -7296,510 +5861,476 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-runner/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-runner/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/jest-runtime": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", - "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", - "dev": true, - "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/globals": "^28.1.3", - "@jest/source-map": "^28.1.2", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-runtime/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "bin": { + "jest": "bin/jest.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-runtime/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-runtime/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/jest-runtime/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-runtime/node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } } }, - "node_modules/jest-runtime/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/jest-snapshot": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", - "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.3", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.3", - "semver": "^7.3.5" + "detect-newline": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-snapshot/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "dependencies": { - "@jest/expect-utils": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/jest-diff": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", - "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/jest-snapshot/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/jest-matcher-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", - "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/jest-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", - "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } } }, - "node_modules/jest-util/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", - "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "leven": "^3.1.0", - "pretty-format": "^28.1.3" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/jest-runner/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-validate/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, + "yocto-queue": "^0.1.0" + }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-validate/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/jest-watcher": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", - "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/types": "^29.6.3", "@types/node": "*", - "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.1.3", - "string-length": "^4.0.1" + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker/node_modules/supports-color": { @@ -7817,66 +6348,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest/node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest/node_modules/jest-cli": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", - "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", - "dev": true, - "dependencies": { - "@jest/core": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, "node_modules/jiti": { "version": "1.21.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", @@ -7890,7 +6361,8 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "3.14.1", @@ -7977,15 +6449,15 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "dev": true, "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-parse-better-errors": { @@ -8377,11 +6849,6 @@ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" }, - "node_modules/lodash.isempty": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", - "integrity": "sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg==" - }, "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", @@ -8783,6 +7250,7 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -8982,9 +7450,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/normalize-package-data": { @@ -12246,15 +10714,16 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, "engines": { "node": ">=8.6" }, @@ -12418,17 +10887,47 @@ } }, "node_modules/pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">= 10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/process-nextick-args": { @@ -12487,6 +10986,22 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -12556,9 +11071,10 @@ } }, "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true }, "node_modules/read-installed": { "version": "4.0.3", @@ -12842,9 +11358,9 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz", - "integrity": "sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, "engines": { "node": ">=10" @@ -13330,6 +11846,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, "engines": { "node": ">=8" } @@ -13498,6 +12015,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -13509,6 +12027,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, "engines": { "node": ">=8" } @@ -13724,6 +12243,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -13905,22 +12425,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -13983,19 +12487,11 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -14440,9 +12936,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "funding": [ { @@ -14459,8 +12955,8 @@ } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -14541,9 +13037,9 @@ "dev": true }, "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -14554,12 +13050,6 @@ "node": ">=10.12.0" } }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", diff --git a/package.json b/package.json index e840e5b512..c1d0f34a60 100644 --- a/package.json +++ b/package.json @@ -8,17 +8,11 @@ }, "keywords": [ "assistant", - "compare comply", "discovery", "ibm", - "natural language classifier", "natural language understanding", - "personality insights", "speech to text", "text to speech", - "tone analyzer", - "tone_analyzer", - "visual recognition", "watson developer cloud", "watson", "wdc" @@ -51,9 +45,10 @@ "url": "https://github.com/watson-developer-cloud/node-sdk/issues" }, "devDependencies": { + "@ibm-cloud/sdk-test-utilities": "^1.0.0", "@semantic-release/changelog": "^5.0.1", "@semantic-release/git": "^9.0.0", - "axios": "^0.21.4", + "axios": "^1.7.7", "codecov": "^3.8.1", "concat-stream": "^2.0.0", "cz-conventional-changelog": "^3.3.0", @@ -63,7 +58,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "installed-check": "^3.0.0", - "jest": "^28.1.3", + "jest": "^29.7.0", "jsdoc": "^3.6.6", "lint-staged": "^10.5.3", "prettier": "^2.2.1", @@ -85,12 +80,12 @@ "async": "^3.2.0", "camelcase": "^6.2.0", "extend": "~3.0.2", - "ibm-cloud-sdk-core": "^4.2.3", + "ibm-cloud-sdk-core": "^5.1.0", "isstream": "~0.1.2", "websocket": "^1.0.33" }, "engines": { - "node": ">=16.0.0" + "node": ">=20.0.0" }, "scripts": { "tslint:config": "tslint-config-prettier-check ./tslint.json", diff --git a/scripts/typedoc/generate_typedoc.sh b/scripts/typedoc/generate_typedoc.sh index 092f820627..5e7fecbe9a 100755 --- a/scripts/typedoc/generate_typedoc.sh +++ b/scripts/typedoc/generate_typedoc.sh @@ -1,9 +1,5 @@ ./node_modules/.bin/typedoc --mode file --theme ./scripts/typedoc/theme --excludeExternals --excludePrivate --excludeProtected \ - --out ./doc ./authorization/v1.ts \ - ./discovery/v1.ts ./language-translator/v3.ts \ - ./natural-language-classifier/v1.ts ./natural-language-understanding/v1.ts \ - ./personality-insights/v3.ts \ + --out ./doc ./natural-language-understanding/v1.ts \ ./speech-to-text/v1-generated.ts ./text-to-speech/v1-generated.ts \ - ./tone-analyzer/v3.ts ./visual-recognition/v3.ts \ - ./lib/recognize-stream.ts ./assistant/v1.ts ./assistant/v2.ts ./compare-comply/v1.ts --target "ES5" + ./lib/recognize-stream.ts ./assistant/v1.ts ./assistant/v2.ts ./discovery/v2.ts --target "ES5" \ No newline at end of file diff --git a/sdk.ts b/sdk.ts index 908fab1112..c3faa2a853 100644 --- a/sdk.ts +++ b/sdk.ts @@ -19,16 +19,10 @@ * Provide the entire sdk in one module in order to be browserified */ -export import AuthorizationV1 = require('./authorization/v1'); - export import AssistantV1 = require('./assistant/v1'); export import AssistantV2 = require('./assistant/v2'); -export import DiscoveryV1 = require('./discovery/v1'); - -export import LanguageTranslatorV3 = require('./language-translator/v3'); - export import NaturalLanguageUnderstandingV1 = require('./natural-language-understanding/v1'); export import SpeechToTextV1 = require('./speech-to-text/v1'); diff --git a/speech-to-text/v1-generated.ts b/speech-to-text/v1-generated.ts index b8d6cf9474..bba5da64f2 100644 --- a/speech-to-text/v1-generated.ts +++ b/speech-to-text/v1-generated.ts @@ -15,7 +15,7 @@ */ /** - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.1-5136e54a-20241108-203028 */ import * as extend from 'extend'; @@ -4079,19 +4079,25 @@ namespace SpeechToTextV1 { EN_US_SHORTFORM_NARROWBANDMODEL = 'en-US_ShortForm_NarrowbandModel', EN_US_TELEPHONY = 'en-US_Telephony', EN_WW_MEDICAL_TELEPHONY = 'en-WW_Medical_Telephony', + ES_AR = 'es-AR', ES_AR_BROADBANDMODEL = 'es-AR_BroadbandModel', ES_AR_NARROWBANDMODEL = 'es-AR_NarrowbandModel', + ES_CL = 'es-CL', ES_CL_BROADBANDMODEL = 'es-CL_BroadbandModel', ES_CL_NARROWBANDMODEL = 'es-CL_NarrowbandModel', + ES_CO = 'es-CO', ES_CO_BROADBANDMODEL = 'es-CO_BroadbandModel', ES_CO_NARROWBANDMODEL = 'es-CO_NarrowbandModel', + ES_ES = 'es-ES', ES_ES_BROADBANDMODEL = 'es-ES_BroadbandModel', ES_ES_NARROWBANDMODEL = 'es-ES_NarrowbandModel', ES_ES_MULTIMEDIA = 'es-ES_Multimedia', ES_ES_TELEPHONY = 'es-ES_Telephony', ES_LA_TELEPHONY = 'es-LA_Telephony', + ES_MX = 'es-MX', ES_MX_BROADBANDMODEL = 'es-MX_BroadbandModel', ES_MX_NARROWBANDMODEL = 'es-MX_NarrowbandModel', + ES_PE = 'es-PE', ES_PE_BROADBANDMODEL = 'es-PE_BroadbandModel', ES_PE_NARROWBANDMODEL = 'es-PE_NarrowbandModel', FR_CA = 'fr-CA', @@ -4123,6 +4129,7 @@ namespace SpeechToTextV1 { NL_NL_MULTIMEDIA = 'nl-NL_Multimedia', NL_NL_NARROWBANDMODEL = 'nl-NL_NarrowbandModel', NL_NL_TELEPHONY = 'nl-NL_Telephony', + PT_BR = 'pt-BR', PT_BR_BROADBANDMODEL = 'pt-BR_BroadbandModel', PT_BR_MULTIMEDIA = 'pt-BR_Multimedia', PT_BR_NARROWBANDMODEL = 'pt-BR_NarrowbandModel', @@ -4467,19 +4474,25 @@ namespace SpeechToTextV1 { EN_US_SHORTFORM_NARROWBANDMODEL = 'en-US_ShortForm_NarrowbandModel', EN_US_TELEPHONY = 'en-US_Telephony', EN_WW_MEDICAL_TELEPHONY = 'en-WW_Medical_Telephony', + ES_AR = 'es-AR', ES_AR_BROADBANDMODEL = 'es-AR_BroadbandModel', ES_AR_NARROWBANDMODEL = 'es-AR_NarrowbandModel', + ES_CL = 'es-CL', ES_CL_BROADBANDMODEL = 'es-CL_BroadbandModel', ES_CL_NARROWBANDMODEL = 'es-CL_NarrowbandModel', + ES_CO = 'es-CO', ES_CO_BROADBANDMODEL = 'es-CO_BroadbandModel', ES_CO_NARROWBANDMODEL = 'es-CO_NarrowbandModel', + ES_ES = 'es-ES', ES_ES_BROADBANDMODEL = 'es-ES_BroadbandModel', ES_ES_NARROWBANDMODEL = 'es-ES_NarrowbandModel', ES_ES_MULTIMEDIA = 'es-ES_Multimedia', ES_ES_TELEPHONY = 'es-ES_Telephony', ES_LA_TELEPHONY = 'es-LA_Telephony', + ES_MX = 'es-MX', ES_MX_BROADBANDMODEL = 'es-MX_BroadbandModel', ES_MX_NARROWBANDMODEL = 'es-MX_NarrowbandModel', + ES_PE = 'es-PE', ES_PE_BROADBANDMODEL = 'es-PE_BroadbandModel', ES_PE_NARROWBANDMODEL = 'es-PE_NarrowbandModel', FR_CA = 'fr-CA', @@ -4511,6 +4524,7 @@ namespace SpeechToTextV1 { NL_NL_MULTIMEDIA = 'nl-NL_Multimedia', NL_NL_NARROWBANDMODEL = 'nl-NL_NarrowbandModel', NL_NL_TELEPHONY = 'nl-NL_Telephony', + PT_BR = 'pt-BR', PT_BR_BROADBANDMODEL = 'pt-BR_BroadbandModel', PT_BR_MULTIMEDIA = 'pt-BR_Multimedia', PT_BR_NARROWBANDMODEL = 'pt-BR_NarrowbandModel', @@ -4930,19 +4944,25 @@ namespace SpeechToTextV1 { EN_US_SHORTFORM_NARROWBANDMODEL = 'en-US_ShortForm_NarrowbandModel', EN_US_TELEPHONY = 'en-US_Telephony', EN_WW_MEDICAL_TELEPHONY = 'en-WW_Medical_Telephony', + ES_AR = 'es-AR', ES_AR_BROADBANDMODEL = 'es-AR_BroadbandModel', ES_AR_NARROWBANDMODEL = 'es-AR_NarrowbandModel', + ES_CL = 'es-CL', ES_CL_BROADBANDMODEL = 'es-CL_BroadbandModel', ES_CL_NARROWBANDMODEL = 'es-CL_NarrowbandModel', + ES_CO = 'es-CO', ES_CO_BROADBANDMODEL = 'es-CO_BroadbandModel', ES_CO_NARROWBANDMODEL = 'es-CO_NarrowbandModel', + ES_ES = 'es-ES', ES_ES_BROADBANDMODEL = 'es-ES_BroadbandModel', ES_ES_NARROWBANDMODEL = 'es-ES_NarrowbandModel', ES_ES_MULTIMEDIA = 'es-ES_Multimedia', ES_ES_TELEPHONY = 'es-ES_Telephony', ES_LA_TELEPHONY = 'es-LA_Telephony', + ES_MX = 'es-MX', ES_MX_BROADBANDMODEL = 'es-MX_BroadbandModel', ES_MX_NARROWBANDMODEL = 'es-MX_NarrowbandModel', + ES_PE = 'es-PE', ES_PE_BROADBANDMODEL = 'es-PE_BroadbandModel', ES_PE_NARROWBANDMODEL = 'es-PE_NarrowbandModel', FR_CA = 'fr-CA', @@ -4974,6 +4994,7 @@ namespace SpeechToTextV1 { NL_NL_MULTIMEDIA = 'nl-NL_Multimedia', NL_NL_NARROWBANDMODEL = 'nl-NL_NarrowbandModel', NL_NL_TELEPHONY = 'nl-NL_Telephony', + PT_BR = 'pt-BR', PT_BR_BROADBANDMODEL = 'pt-BR_BroadbandModel', PT_BR_MULTIMEDIA = 'pt-BR_Multimedia', PT_BR_NARROWBANDMODEL = 'pt-BR_NarrowbandModel', @@ -5084,19 +5105,25 @@ namespace SpeechToTextV1 { EN_US_SHORTFORM_NARROWBANDMODEL = 'en-US_ShortForm_NarrowbandModel', EN_US_TELEPHONY = 'en-US_Telephony', EN_WW_MEDICAL_TELEPHONY = 'en-WW_Medical_Telephony', + ES_AR = 'es-AR', ES_AR_BROADBANDMODEL = 'es-AR_BroadbandModel', ES_AR_NARROWBANDMODEL = 'es-AR_NarrowbandModel', + ES_CL = 'es-CL', ES_CL_BROADBANDMODEL = 'es-CL_BroadbandModel', ES_CL_NARROWBANDMODEL = 'es-CL_NarrowbandModel', + ES_CO = 'es-CO', ES_CO_BROADBANDMODEL = 'es-CO_BroadbandModel', ES_CO_NARROWBANDMODEL = 'es-CO_NarrowbandModel', + ES_ES = 'es-ES', ES_ES_BROADBANDMODEL = 'es-ES_BroadbandModel', ES_ES_NARROWBANDMODEL = 'es-ES_NarrowbandModel', ES_ES_MULTIMEDIA = 'es-ES_Multimedia', ES_ES_TELEPHONY = 'es-ES_Telephony', ES_LA_TELEPHONY = 'es-LA_Telephony', + ES_MX = 'es-MX', ES_MX_BROADBANDMODEL = 'es-MX_BroadbandModel', ES_MX_NARROWBANDMODEL = 'es-MX_NarrowbandModel', + ES_PE = 'es-PE', ES_PE_BROADBANDMODEL = 'es-PE_BroadbandModel', ES_PE_NARROWBANDMODEL = 'es-PE_NarrowbandModel', FR_CA = 'fr-CA', @@ -5128,6 +5155,7 @@ namespace SpeechToTextV1 { NL_NL_MULTIMEDIA = 'nl-NL_Multimedia', NL_NL_NARROWBANDMODEL = 'nl-NL_NarrowbandModel', NL_NL_TELEPHONY = 'nl-NL_Telephony', + PT_BR = 'pt-BR', PT_BR_BROADBANDMODEL = 'pt-BR_BroadbandModel', PT_BR_MULTIMEDIA = 'pt-BR_Multimedia', PT_BR_NARROWBANDMODEL = 'pt-BR_NarrowbandModel', @@ -5610,16 +5638,22 @@ namespace SpeechToTextV1 { EN_US_BROADBANDMODEL = 'en-US_BroadbandModel', EN_US_NARROWBANDMODEL = 'en-US_NarrowbandModel', EN_US_SHORTFORM_NARROWBANDMODEL = 'en-US_ShortForm_NarrowbandModel', + ES_AR = 'es-AR', ES_AR_BROADBANDMODEL = 'es-AR_BroadbandModel', ES_AR_NARROWBANDMODEL = 'es-AR_NarrowbandModel', + ES_CL = 'es-CL', ES_CL_BROADBANDMODEL = 'es-CL_BroadbandModel', ES_CL_NARROWBANDMODEL = 'es-CL_NarrowbandModel', + ES_CO = 'es-CO', ES_CO_BROADBANDMODEL = 'es-CO_BroadbandModel', ES_CO_NARROWBANDMODEL = 'es-CO_NarrowbandModel', + ES_ES = 'es-ES', ES_ES_BROADBANDMODEL = 'es-ES_BroadbandModel', ES_ES_NARROWBANDMODEL = 'es-ES_NarrowbandModel', + ES_MX = 'es-MX', ES_MX_BROADBANDMODEL = 'es-MX_BroadbandModel', ES_MX_NARROWBANDMODEL = 'es-MX_NarrowbandModel', + ES_PE = 'es-PE', ES_PE_BROADBANDMODEL = 'es-PE_BroadbandModel', ES_PE_NARROWBANDMODEL = 'es-PE_NarrowbandModel', FR_CA_BROADBANDMODEL = 'fr-CA_BroadbandModel', @@ -5634,6 +5668,7 @@ namespace SpeechToTextV1 { KO_KR_NARROWBANDMODEL = 'ko-KR_NarrowbandModel', NL_NL_BROADBANDMODEL = 'nl-NL_BroadbandModel', NL_NL_NARROWBANDMODEL = 'nl-NL_NarrowbandModel', + PT_BR = 'pt-BR', PT_BR_BROADBANDMODEL = 'pt-BR_BroadbandModel', PT_BR_NARROWBANDMODEL = 'pt-BR_NarrowbandModel', ZH_CN_BROADBANDMODEL = 'zh-CN_BroadbandModel', @@ -5895,7 +5930,9 @@ namespace SpeechToTextV1 { * model interfaces ************************/ - /** Information about an existing custom acoustic model. */ + /** + * Information about an existing custom acoustic model. + */ export interface AcousticModel { /** The customization ID (GUID) of the custom acoustic model. The [Create a custom acoustic * model](#createacousticmodel) method returns only this field of the object; it does not return the other fields. @@ -5960,7 +5997,9 @@ namespace SpeechToTextV1 { } } - /** Information about existing custom acoustic models. */ + /** + * Information about existing custom acoustic models. + */ export interface AcousticModels { /** An array of `AcousticModel` objects that provides information about each available custom acoustic model. * The array is empty if the requesting credentials own no custom acoustic models (if no language is specified) or @@ -5969,7 +6008,9 @@ namespace SpeechToTextV1 { customizations: AcousticModel[]; } - /** Information about an audio resource from a custom acoustic model. */ + /** + * Information about an audio resource from a custom acoustic model. + */ export interface AudioDetails { /** The type of the audio resource: * * `audio` for an individual audio file @@ -6008,7 +6049,9 @@ namespace SpeechToTextV1 { } } - /** Information about an audio resource from a custom acoustic model. */ + /** + * Information about an audio resource from a custom acoustic model. + */ export interface AudioListing { /** _For an audio-type resource_, the total seconds of audio in the resource. Omitted for an archive-type * resource. @@ -6051,7 +6094,9 @@ namespace SpeechToTextV1 { } } - /** If audio metrics are requested, information about the signal characteristics of the input audio. */ + /** + * If audio metrics are requested, information about the signal characteristics of the input audio. + */ export interface AudioMetrics { /** The interval in seconds (typically 0.1 seconds) at which the service calculated the audio metrics. In other * words, how often the service calculated the metrics. A single unit in each histogram (see the @@ -6062,7 +6107,9 @@ namespace SpeechToTextV1 { accumulated: AudioMetricsDetails; } - /** Detailed information about the signal characteristics of the input audio. */ + /** + * Detailed information about the signal characteristics of the input audio. + */ export interface AudioMetricsDetails { /** If `true`, indicates the end of the audio stream, meaning that transcription is complete. Currently, the * field is always `true`. The service returns metrics just once per audio stream. The results provide aggregated @@ -6108,7 +6155,11 @@ namespace SpeechToTextV1 { non_speech_level: AudioMetricsHistogramBin[]; } - /** A bin with defined boundaries that indicates the number of values in a range of signal characteristics for a histogram. The first and last bins of a histogram are the boundary bins. They cover the intervals between negative infinity and the first boundary, and between the last boundary and positive infinity, respectively. */ + /** + * A bin with defined boundaries that indicates the number of values in a range of signal characteristics for a + * histogram. The first and last bins of a histogram are the boundary bins. They cover the intervals between negative + * infinity and the first boundary, and between the last boundary and positive infinity, respectively. + */ export interface AudioMetricsHistogramBin { /** The lower boundary of the bin in the histogram. */ begin: number; @@ -6118,7 +6169,9 @@ namespace SpeechToTextV1 { count: number; } - /** Information about an audio resource from a custom acoustic model. */ + /** + * Information about an audio resource from a custom acoustic model. + */ export interface AudioResource { /** The total seconds of audio in the audio resource. */ duration: number; @@ -6153,7 +6206,9 @@ namespace SpeechToTextV1 { } } - /** Information about the audio resources from a custom acoustic model. */ + /** + * Information about the audio resources from a custom acoustic model. + */ export interface AudioResources { /** The total minutes of accumulated audio summed over all of the valid audio resources for the custom acoustic * model. You can use this value to determine whether the custom model has too little or too much audio to begin @@ -6166,7 +6221,9 @@ namespace SpeechToTextV1 { audio: AudioResource[]; } - /** Information about the corpora from a custom language model. */ + /** + * Information about the corpora from a custom language model. + */ export interface Corpora { /** An array of `Corpus` objects that provides information about the corpora for the custom model. The array is * empty if the custom model has no corpora. @@ -6174,7 +6231,9 @@ namespace SpeechToTextV1 { corpora: Corpus[]; } - /** Information about a corpus from a custom language model. */ + /** + * Information about a corpus from a custom language model. + */ export interface Corpus { /** The name of the corpus. */ name: string; @@ -6212,7 +6271,9 @@ namespace SpeechToTextV1 { } } - /** Information about a word that is to be added to a custom language model. */ + /** + * Information about a word that is to be added to a custom language model. + */ export interface CustomWord { /** For the [Add custom words](#addwords) method, you must specify the custom word that is to be added to or * updated in the custom model. Do not use characters that need to be URL-encoded, for example, spaces, slashes, @@ -6254,7 +6315,9 @@ namespace SpeechToTextV1 { display_as?: string; } - /** Information about a grammar from a custom language model. */ + /** + * Information about a grammar from a custom language model. + */ export interface Grammar { /** The name of the grammar. */ name: string; @@ -6291,7 +6354,9 @@ namespace SpeechToTextV1 { } } - /** Information about the grammars from a custom language model. */ + /** + * Information about the grammars from a custom language model. + */ export interface Grammars { /** An array of `Grammar` objects that provides information about the grammars for the custom model. The array * is empty if the custom model has no grammars. @@ -6299,7 +6364,9 @@ namespace SpeechToTextV1 { grammars: Grammar[]; } - /** Information about a match for a keyword from speech recognition results. */ + /** + * Information about a match for a keyword from speech recognition results. + */ export interface KeywordResult { /** A specified keyword normalized to the spoken phrase that matched in the audio input. */ normalized_text: string; @@ -6311,7 +6378,9 @@ namespace SpeechToTextV1 { confidence: number; } - /** Information about an existing custom language model. */ + /** + * Information about an existing custom language model. + */ export interface LanguageModel { /** The customization ID (GUID) of the custom language model. The [Create a custom language * model](#createlanguagemodel) method returns only this field of the object; it does not return the other fields. @@ -6396,7 +6465,9 @@ namespace SpeechToTextV1 { } } - /** Information about existing custom language models. */ + /** + * Information about existing custom language models. + */ export interface LanguageModels { /** An array of `LanguageModel` objects that provides information about each available custom language model. * The array is empty if the requesting credentials own no custom language models (if no language is specified) or @@ -6405,7 +6476,9 @@ namespace SpeechToTextV1 { customizations: LanguageModel[]; } - /** Detailed timing information about the service's processing of the input audio. */ + /** + * Detailed timing information about the service's processing of the input audio. + */ export interface ProcessedAudio { /** The seconds of audio that the service has received as of this response. The value of the field is greater * than the values of the `transcription` and `speaker_labels` fields during speech recognition processing, since @@ -6430,7 +6503,10 @@ namespace SpeechToTextV1 { speaker_labels?: number; } - /** If processing metrics are requested, information about the service's processing of the input audio. Processing metrics are not available with the synchronous [Recognize audio](#recognize) method. */ + /** + * If processing metrics are requested, information about the service's processing of the input audio. Processing + * metrics are not available with the synchronous [Recognize audio](#recognize) method. + */ export interface ProcessingMetrics { /** Detailed timing information about the service's processing of the input audio. */ processed_audio: ProcessedAudio; @@ -6453,7 +6529,9 @@ namespace SpeechToTextV1 { periodic: boolean; } - /** Information about a current asynchronous speech recognition job. */ + /** + * Information about a current asynchronous speech recognition job. + */ export interface RecognitionJob { /** The ID of the asynchronous job. */ id: string; @@ -6511,7 +6589,9 @@ namespace SpeechToTextV1 { } } - /** Information about current asynchronous speech recognition jobs. */ + /** + * Information about current asynchronous speech recognition jobs. + */ export interface RecognitionJobs { /** An array of `RecognitionJob` objects that provides the status for each of the user's current jobs. The array * is empty if the user has no current jobs. @@ -6519,7 +6599,9 @@ namespace SpeechToTextV1 { recognitions: RecognitionJob[]; } - /** Information about a request to register a callback for asynchronous speech recognition. */ + /** + * Information about a request to register a callback for asynchronous speech recognition. + */ export interface RegisterStatus { /** The current status of the job: * * `created`: The service successfully allowlisted the callback URL as a result of the call. @@ -6539,7 +6621,9 @@ namespace SpeechToTextV1 { } } - /** Information about the speakers from speech recognition results. */ + /** + * Information about the speakers from speech recognition results. + */ export interface SpeakerLabelsResult { /** The start time of a word from the transcript. The value matches the start time of a word from the * `timestamps` array. @@ -6566,7 +6650,9 @@ namespace SpeechToTextV1 { final: boolean; } - /** Information about an available language model. */ + /** + * Information about an available language model. + */ export interface SpeechModel { /** The name of the model for use as an identifier in calls to the service (for example, * `en-US_BroadbandModel`). @@ -6584,13 +6670,17 @@ namespace SpeechToTextV1 { description: string; } - /** Information about the available language models. */ + /** + * Information about the available language models. + */ export interface SpeechModels { /** An array of `SpeechModel` objects that provides information about each available model. */ models: SpeechModel[]; } - /** An alternative transcript from speech recognition results. */ + /** + * An alternative transcript from speech recognition results. + */ export interface SpeechRecognitionAlternative { /** A transcription of the audio. */ transcript: string; @@ -6602,16 +6692,18 @@ namespace SpeechToTextV1 { * elements: the word followed by its start and end time in seconds, for example: * `[["hello",0.0,1.2],["world",1.2,2.5]]`. Timestamps are returned only for the best alternative. */ - timestamps?: [string, number, number][]; + timestamps?: string[]; /** A confidence score for each word of the transcript as a list of lists. Each inner list consists of two * elements: the word and its confidence score in the range of 0.0 to 1.0, for example: * `[["hello",0.95],["world",0.86]]`. Confidence scores are returned only for the best alternative and only with * results marked as final. */ - word_confidence?: [string, number][]; + word_confidence?: string[]; } - /** Component results for a speech recognition request. */ + /** + * Component results for a speech recognition request. + */ export interface SpeechRecognitionResult { /** An indication of whether the transcription results are final: * * If `true`, the results for this utterance are final. They are guaranteed not to be updated further. @@ -6659,7 +6751,9 @@ namespace SpeechToTextV1 { } } - /** The complete results for a speech recognition request. */ + /** + * The complete results for a speech recognition request. + */ export interface SpeechRecognitionResults { /** An array of `SpeechRecognitionResult` objects that can include interim and final results (interim results * are returned only if supported by the method). Final results are guaranteed not to change; interim results might @@ -6707,7 +6801,9 @@ namespace SpeechToTextV1 { warnings?: string[]; } - /** Indicates whether select service features are supported with the model. */ + /** + * Indicates whether select service features are supported with the model. + */ export interface SupportedFeatures { /** Indicates whether the customization interface can be used to create a custom language model based on the * language model. @@ -6737,7 +6833,9 @@ namespace SpeechToTextV1 { low_latency?: boolean; } - /** The response from training of a custom language or custom acoustic model. */ + /** + * The response from training of a custom language or custom acoustic model. + */ export interface TrainingResponse { /** An array of `TrainingWarning` objects that lists any invalid resources contained in the custom model. For * custom language models, invalid resources are grouped and identified by type of resource. The method can return @@ -6746,7 +6844,9 @@ namespace SpeechToTextV1 { warnings?: TrainingWarning[]; } - /** A warning from training of a custom language or custom acoustic model. */ + /** + * A warning from training of a custom language or custom acoustic model. + */ export interface TrainingWarning { /** An identifier for the type of invalid resources listed in the `description` field. */ code: TrainingWarning.Constants.Code | string; @@ -6768,7 +6868,9 @@ namespace SpeechToTextV1 { } } - /** Information about a word from a custom language model. */ + /** + * Information about a word from a custom language model. + */ export interface Word { /** A word from the custom model's words resource. The spelling of the word is used to train the model. */ word: string; @@ -6820,7 +6922,9 @@ namespace SpeechToTextV1 { error?: WordError[]; } - /** An alternative hypothesis for a word from speech recognition results. */ + /** + * An alternative hypothesis for a word from speech recognition results. + */ export interface WordAlternativeResult { /** A confidence score for the word alternative hypothesis in the range of 0.0 to 1.0. */ confidence: number; @@ -6828,7 +6932,9 @@ namespace SpeechToTextV1 { word: string; } - /** Information about alternative hypotheses for words from speech recognition results. */ + /** + * Information about alternative hypotheses for words from speech recognition results. + */ export interface WordAlternativeResults { /** The start time in seconds of the word from the input audio that corresponds to the word alternatives. */ start_time: number; @@ -6838,7 +6944,9 @@ namespace SpeechToTextV1 { alternatives: WordAlternativeResult[]; } - /** An error associated with a word from a custom language model. */ + /** + * An error associated with a word from a custom language model. + */ export interface WordError { /** A key-value pair that describes an error associated with the definition of a word in the words resource. The * pair has the format `"element": "message"`, where `element` is the aspect of the definition that caused the @@ -6849,7 +6957,9 @@ namespace SpeechToTextV1 { element: string; } - /** Information about the words from a custom language model. */ + /** + * Information about the words from a custom language model. + */ export interface Words { /** An array of `Word` objects that provides information about each word in the custom model's words resource. * The array is empty if the custom model has no words. diff --git a/test/integration/discovery.v1.test.js b/test/integration/discovery.v1.test.js deleted file mode 100644 index 7e1e0d3631..0000000000 --- a/test/integration/discovery.v1.test.js +++ /dev/null @@ -1,588 +0,0 @@ -'use strict'; - -const { IamAuthenticator } = require('../../dist/auth'); -const DiscoveryV1 = require('../../dist/discovery/v1'); -const authHelper = require('../resources/auth_helper.js'); -const describe = authHelper.describe; // this runs describe.skip if there is no auth.js file :) -const fs = require('fs'); -const path = require('path'); - -const THIRTY_SECONDS = 30000; - -describe('discovery v1 integration', () => { - jest.setTimeout(THIRTY_SECONDS); - - const options = authHelper.auth.discovery; - options.authenticator = new IamAuthenticator({ apikey: options.apikey }); - - const environmentId = options.environmentId; - const configurationId = options.configurationId; - const collectionId = options.collectionId; - const collectionId2 = options.collectionId_2; - const japaneseCollectionId = options.japaneseCollectionId; - - const discovery = new DiscoveryV1( - Object.assign({}, options, { - version: '2019-03-27', - }) - ); - - it('should listEnvironments()', async () => { - const res = await discovery.listEnvironments(); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(Array.isArray(result.environments)).toBe(true); - const environmentIds = result.environments.map(e => e.environment_id); - expect(environmentIds.indexOf(environmentId) > -1).toBe(true); - }); - - it('should getEnvironment()', async () => { - const params = { - environmentId, - }; - - const res = await discovery.getEnvironment(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.environment_id).toBe(environmentId); - }); - - it('should listConfigurations()', async () => { - const params = { - environmentId, - }; - - const res = await discovery.listConfigurations(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(Array.isArray(result.configurations)).toBeDefined(); - expect(result.configurations[0]).toBeDefined(); - }); - - it('should getConfiguration()', async () => { - const params = { - environmentId, - configurationId: configurationId, - }; - - const res = await discovery.getConfiguration(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.configuration_id).toBe(configurationId); - }); - - // todo: delete the collection after the testing is complete - it.skip('should createCollection()', async () => { - const params = { - environmentId, - name: 'node-sdk-test-' + Date.now(), - description: - 'Test collection created by the Node.js SDK integration tests on ' + - new Date() + - '. Should be deleted shortly', - configurationId: configurationId, - languageCode: 'en_us', - }; - - const res = await discovery.createCollection(params); - const { result } = res || {}; - expect(result).toBeDefined(); // Error: This operation is invalid for read-only environments. (?) - // todo: extract collectionId, use it in subsequent tests, delete it - }); - - it('should listCollections()', async () => { - const params = { - environmentId, - }; - - const res = await discovery.listCollections(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(Array.isArray(result.collections)).toBeDefined(); - }); - - it('should perform a federated query for notices', async () => { - const params = { - environmentId, - collectionIds: [collectionId, collectionId2], - filter: 'yesplease', - count: 10, - sort: ['+field_1', '-field_2'], - }; - - const res = await discovery.federatedQueryNotices(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(Array.isArray(result.results)).toBeDefined(); - }); - - describe('add-query-delete', () => { - let documentId; - - it('should addDocument()', async () => { - const params = { - environmentId, - collectionId, - file: fs.createReadStream(path.join(__dirname, '../resources/sampleWord.docx')), - filename: 'sampleWord.docx', - }; - - const res = await discovery.addDocument(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.document_id).toBeDefined(); - documentId = result.document_id; - }); - - it('should addDocument()', async () => { - const jsonFile = { - foo: 'bar', - from: 'node-sdk integration test', - test_date: new Date().toString(), - }; - - const params = { - environmentId, - collectionId, - file: { - value: JSON.stringify(jsonFile), - options: { - filename: '_.json', - }, - }, - }; - - const res = await discovery.addDocument(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.document_id).toBeDefined(); - }); - - it('should getDocumentStatus()', async () => { - const params = { - environmentId, - collectionId, - documentId, - }; - - const res = await discovery.getDocumentStatus(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.document_id).toBeDefined(); - }); - - it('should query()', async () => { - const params = { - environmentId, - collectionId, - query: '', - }; - - const res = await discovery.query(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(typeof result.matching_results).toBe('number'); - expect(Array.isArray(result.results)).toBe(true); - }); - - it('should delete all documents', async () => { - const params = { - environmentId, - collectionId, - query: '', - }; - const res = await discovery.query(params); - const { result } = res || {}; - expect(result).toBeDefined(); - - for (const document of result.results) { - const params = { - environmentId, - collectionId, - documentId: document.id, - }; - - await discovery.deleteDocument(params); - } - }); - }); - - describe('credentials tests @slow', () => { - let credentialId; - const sourceType = 'sharepoint'; - - it('should createCredentials', async () => { - const params = { - environmentId, - sourceType, - credentialDetails: { - credential_type: 'saml', - username: 'myUserName', - password: 'pass1234', - organization_url: 'www.sharepoint-org.com/organization', - }, - }; - - const res = await discovery.createCredentials(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.credential_id).toBeDefined(); - expect(result.source_type).toBe(sourceType); - // save the credential id for later tests - credentialId = result.credential_id; - }); - - it('should listCredentials', async () => { - const params = { - environmentId, - }; - - const res = await discovery.listCredentials(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(Array.isArray(result.credentials)).toBe(true); - }); - - it('should updateCredentials', async () => { - const params = { - environmentId, - credentialId, - sourceType, - credentialDetails: { - credential_type: 'saml', - username: 'myUserName', - password: 'new!longer!password!123', - organization_url: 'www.sharepoint-org.com/organization', - }, - }; - - const res = await discovery.updateCredentials(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.credential_id).toBe(credentialId); - expect(result.source_type).toBe(sourceType); - }); - - it('should getCredentials', async () => { - const params = { - environmentId, - credentialId, - }; - - const res = await discovery.getCredentials(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.credential_id).toBe(credentialId); - expect(result.source_type).toBe(sourceType); - }); - - it('should deleteCredentials', async () => { - const params = { - environmentId, - credentialId, - }; - - const res = await discovery.deleteCredentials(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.credential_id).toBe(credentialId); - expect(result.status).toBe('deleted'); - }); - }); - - describe('events tests', () => { - let documentId; - let sessionToken; - - beforeAll(async () => { - const params = { - environmentId, - collectionId, - file: fs.createReadStream(path.join(__dirname, '../resources/sampleWord.docx')), - }; - - let queryParams; - try { - const res = await discovery.addDocument(params); - const { result } = res || {}; - expect(result).toBeDefined(); - - documentId = result.document_id; - - queryParams = { - environmentId, - collectionId, - naturalLanguageQuery: 'jeopardy', - }; - } catch (err) { - expect(err).toBeNull(); // Will halt rest of test unlike fail() - } - - try { - const res = await discovery.query(queryParams); - const result2 = res.result; - expect(result2).toBeDefined(); - sessionToken = result2.session_token; - } catch (err) { - expect(err).toBeNull(); // Will halt rest of test unlike fail() - } - }); - - it('should create event', async () => { - const type = 'click'; - const params = { - type, - data: { - environment_id: environmentId, - session_token: sessionToken, - collection_id: collectionId, - document_id: documentId, - }, - }; - - const res = await discovery.createEvent(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.type).toBe(type); - expect(result.data.environment_id).toBe(environmentId); - expect(result.data.collection_id).toBe(collectionId); - expect(result.data.document_id).toBe(documentId); - expect(result.data.session_token).toBe(sessionToken); - expect(result.data.result_type).toBeDefined(); - expect(result.data.query_id).toBeDefined(); - }); - - afterAll(async () => { - const params = { - environmentId, - collectionId, - documentId, - }; - - try { - const res = await discovery.deleteDocument(params); - } catch (err) { - expect(err).toBeNull(); // Will halt rest of test unlike fail() - } - }); - }); - - describe('metrics tests', () => { - it('should get metrics event rate', async () => { - const res = await discovery.getMetricsEventRate(); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.aggregations).toBeDefined(); - expect(Array.isArray(result.aggregations)).toBe(true); - expect(result.aggregations[0].results).toBeDefined(); - expect(Array.isArray(result.aggregations[0].results)).toBe(true); - expect(result.aggregations[0].results[0].event_rate).toBeDefined(); - }); - it('should get metrics query', async () => { - const res = await discovery.getMetricsQuery(); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.aggregations).toBeDefined(); - expect(Array.isArray(result.aggregations)).toBe(true); - expect(result.aggregations[0].results).toBeDefined(); - expect(Array.isArray(result.aggregations[0].results)).toBe(true); - expect(result.aggregations[0].results[0].matching_results).toBeDefined(); - }); - it('should get metrics query event', async () => { - const res = await discovery.getMetricsQueryEvent(); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.aggregations).toBeDefined(); - }); - it('should get metrics query no results', async () => { - const res = await discovery.getMetricsQueryNoResults(); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.aggregations).toBeDefined(); - expect(Array.isArray(result.aggregations)).toBe(true); - expect(result.aggregations[0].results).toBeDefined(); - expect(Array.isArray(result.aggregations[0].results)).toBe(true); - }); - it('should get metrics query token event', async () => { - const count = 2; - const params = { count }; - - const res = await discovery.getMetricsQueryTokenEvent(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.aggregations).toBeDefined(); - expect(Array.isArray(result.aggregations)).toBe(true); - expect(result.aggregations[0].results).toBeDefined(); - expect(Array.isArray(result.aggregations[0].results)).toBe(true); - }, 40000); - }); - - describe('logs tests', () => { - it('should query log', async () => { - const count = 2; - const filter = 'stuff'; - const params = { - count, - offset: 1, - filter, - sort: ['created_timestamp'], - }; - - const res = await discovery.queryLog(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.matching_results).toBeDefined(); - expect(result.results).toBeDefined(); - }); - }); - - describe('tokenization dictionary tests @slow', () => { - it('should createTokenizationDictionary', async () => { - const params = { - environmentId, - collectionId: japaneseCollectionId, - tokenizationRules: [ - { - text: 'すしネコ', - tokens: ['すし', 'ネコ'], - readings: ['寿司', 'ネコ'], - part_of_speech: 'カスタム名詞', - }, - ], - }; - - const res = await discovery.createTokenizationDictionary(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.status).toBeDefined(); - expect(result.type).toBeDefined(); - }); - - it('should getTokenizationDictionaryStatus', async () => { - const params = { - environmentId, - collectionId: japaneseCollectionId, - }; - - const res = await discovery.getTokenizationDictionaryStatus(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.status).toBeDefined(); - expect(result.type).toBeDefined(); - }); - - it('should deleteTokenizationDictionary', async () => { - const params = { - environmentId, - collectionId: japaneseCollectionId, - }; - - const res = await discovery.deleteTokenizationDictionary(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result).toBe(''); - }); - }); - describe('stopwords tests @slow', () => { - it('should createStopwordList', async () => { - const params = { - environmentId, - collectionId, - stopwordFile: fs.createReadStream(path.join(__dirname, '../resources/stopwords.txt')), - stopwordFilename: 'stopwords.txt', - }; - - const res = await discovery.createStopwordList(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.type).toBeDefined(); - expect(result.status).toBeDefined(); - }); - it('should getStopwordListStatus', async () => { - const params = { - environmentId, - collectionId, - }; - - const res = await discovery.getStopwordListStatus(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.type).toBeDefined(); - expect(result.status).toBeDefined(); - }); - it('should deleteStopwordList', async () => { - const params = { - environmentId, - collectionId, - }; - - const res = await discovery.deleteStopwordList(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result).toBe(''); - }); - }); - describe('gateways tests', () => { - let gatewayId; - it('should createGateway', async () => { - const params = { - environmentId, - name: 'node-sdk-test', - }; - - const res = await discovery.createGateway(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.name).toBeDefined(); - expect(result.status).toBeDefined(); - expect(result.token_id).toBeDefined(); - expect(result.token).toBeDefined(); - expect(result.gateway_id).toBeDefined(); - gatewayId = result.gateway_id; - }); - it('should getGateway', async () => { - // We cannot run this test when gateway creation failed. - expect(gatewayId).toBeTruthy(); - - const params = { - environmentId, - gatewayId, - }; - - const res = await discovery.getGateway(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.name).toBeDefined(); - expect(result.status).toBeDefined(); - expect(result.token_id).toBeDefined(); - expect(result.token).toBeDefined(); - expect(result.gateway_id).toBeDefined(); - }); - it('should listGateways', async () => { - const params = { - environmentId, - }; - - const res = await discovery.listGateways(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.gateways).toBeDefined(); - expect(result.gateways.length).toBeTruthy(); - }, 60000); - it('should deleteGateway', async () => { - // We cannot run this test when gateway creation failed. - expect(gatewayId).toBeTruthy(); - const params = { - environmentId, - gatewayId, - }; - - const res = await discovery.deleteGateway(params); - const { result } = res || {}; - expect(result).toBeDefined(); - expect(result.gateway_id).toBeDefined(); - expect(result.status).toBeDefined(); - expect(result.status).toBe('deleted'); - }); - }); -}); diff --git a/test/integration/language-translator.v3.test.js b/test/integration/language-translator.v3.test.js deleted file mode 100644 index aa9ef919ba..0000000000 --- a/test/integration/language-translator.v3.test.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const { IamAuthenticator } = require('../../dist/auth'); -const LanguageTranslatorV3 = require('../../dist/language-translator/v3'); -const authHelper = require('../resources/auth_helper.js'); -const describe = authHelper.describe; // this runs describe.skip if there is no auth.js file :) -const TWENTY_SECONDS = 20000; - -// todo: figure out why these started all failing with Not Authorized -describe('language translator integration', () => { - jest.setTimeout(TWENTY_SECONDS * 2); - - const options = authHelper.auth.languageTranslator; - options.authenticator = new IamAuthenticator({ apikey: options.apikey }); - options.version = '2019-03-27'; - const languageTranslator = new LanguageTranslatorV3(options); - - it('should listModels()', async () => { - const res = await languageTranslator.listModels(); - expect(res).toBeDefined(); - }); - - it('should translate()', async () => { - const params = { - text: 'this is a test', - source: 'en', - target: 'es', - }; - const res = await languageTranslator.translate(params); - expect(res).toBeDefined(); - }); - - it('should listLanguages()', async () => { - const res = await languageTranslator.listLanguages(); - expect(res).toBeDefined(); - const { result } = res || {}; - expect(result).toBeDefined(); - }); - - it('should listIdentifiableLanguages()', async () => { - const res = await languageTranslator.listIdentifiableLanguages(); - expect(res).toBeDefined(); - }); - - it('should identify()', async () => { - const params = { - text: 'this is an important test that needs to work', - }; - const res = await languageTranslator.identify(params); - expect(res).toBeDefined(); - }); - - describe('models', () => { - let modelId; - it('should list all the models', async () => { - const res = await languageTranslator.listModels(); - const { result } = res || {}; - expect(result).toBeDefined(); - }); - - it('should create a model', async () => { - const params = { - name: 'node-test-custom-en-fr', - baseModelId: 'en-fr', - forcedGlossary: fs.createReadStream('./test/resources/glossary.tmx'), - }; - - const res = await languageTranslator.createModel(params); - const { result } = res || {}; - expect(result).toBeDefined(); - modelId = result.model_id; - }); - - it('should get the details of the model', async () => { - // We cannot run this test when model creation failed. - expect(modelId).toBeTruthy(); - const params = { - modelId, - }; - - const res = await languageTranslator.getModel(params); - expect(res).toBeDefined(); - }); - - it('should delete the model', async () => { - // We cannot run this test when model creation failed. - expect(modelId).toBeTruthy(); - const params = { - modelId, - }; - - const res = await languageTranslator.deleteModel(params); - expect(res).toBeDefined(); - }); - }); - - describe('documentTranslation @slow', () => { - let documentId; - // The service was down, could not test the test. - it('should translate document', async () => { - const params = { - file: fs.createReadStream('./test/resources/alchemy-text.txt'), - filename: 'alchemy-text.txt', - modelId: 'en-es', - }; - const res = await languageTranslator.translateDocument(params); - const { result } = res || {}; - expect(result).toBeDefined(); - documentId = result.document_id; - console.log(documentId); - }); - - it('should list translated documents', async () => { - const res = await languageTranslator.listDocuments(); - expect(res).toBeDefined(); - }); - - it('should get translated document status', async () => { - // We cannot run this test when document upload failed. - expect(documentId).toBeTruthy(); - const params = { - documentId, - }; - - const res = await languageTranslator.getDocumentStatus(params); - expect(res).toBeDefined(); - }); - - it('should get translated document', async () => { - // We cannot run this test when document upload failed. - expect(documentId).toBeTruthy(); - const params = { - documentId, - }; - - const res = await languageTranslator.getTranslatedDocument(params); - expect(res).toBeDefined(); - }); - - it('should delete document', async () => { - // We cannot run this test when document upload failed. - expect(documentId).toBeTruthy(); - const params = { - documentId, - }; - - const res = await languageTranslator.deleteDocument(params); - expect(res).toBeDefined(); - }); - }); -}); diff --git a/test/resources/auth.gha.js b/test/resources/auth.gha.js index f7ce56a846..7677900c9e 100644 --- a/test/resources/auth.gha.js +++ b/test/resources/auth.gha.js @@ -85,16 +85,6 @@ module.exports = { headers: testingHeaders, version: 'v3', }, - discovery: { - apikey: process.env.DISCOVERY_APIKEY, - environmentId: process.env.DISCOVERY_ENVIRONMENT_ID, - configurationId: process.env.DISCOVERY_CONFIGURATION_ID, - collectionId: process.env.DISCOVERY_COLLECTION_ID1, - collectionId2: process.env.DISCOVERY_COLLECTION_ID2, - japaneseCollectionId: process.env.DISCOVERY_COLLECTION_ID3, // This collection is no longer valid - version_date: '2018-10-24', - headers: testingHeaders, - }, discoveryV2: { url: process.env.DISCOVERY_V2_URL, apikey: process.env.DISCOVERY_V2_APIKEY, diff --git a/test/resources/visual_recognition.prepop/beach.txt b/test/resources/visual_recognition.prepop/beach.txt deleted file mode 100644 index 3d8259b073..0000000000 --- a/test/resources/visual_recognition.prepop/beach.txt +++ /dev/null @@ -1,11 +0,0 @@ -http://www.publicdomainpictures.net/pictures/140000/velka/tropical-beach-painting-3.jpg -http://www.publicdomainpictures.net/pictures/140000/velka/tropical-beach-painting-1.jpg -http://www.publicdomainpictures.net/pictures/80000/velka/beach-painting.jpg -http://www.publicdomainpictures.net/pictures/50000/velka/cebeach-ocean-painting.jpg -https://static.pexels.com/photos/68493/pexels-photo-68493.jpeg -https://upload.wikimedia.org/wikipedia/commons/b/ba/Bierstadt_Albert_Beach_at_Nassau.jpg -https://c1.staticflickr.com/9/8301/7964599392_16749d601e_b.jpg -https://upload.wikimedia.org/wikipedia/commons/1/19/%27Beach_with_Blue_Mountain_%28Haleiwa%29%27%2C_watercolor_painting_by_D._Howard_Hitchcock%2C_Cedar_Street_Galleries.jpg -http://www.publicdomainpictures.net/pictures/140000/velka/tropical-beach-painting.jpg -https://upload.wikimedia.org/wikipedia/commons/2/2e/P.S._Kr%C3%B8yer_-_Summer_evening_on_Skagen%27s_Beach._Anna_Ancher_and_Marie_Kr%C3%B8yer_walking_together._-_Google_Art_Project.jpg -https://www.publicdomainpictures.net/pictures/150000/velka/tropical-beach-1454007190ZAK.jpg \ No newline at end of file diff --git a/test/resources/visual_recognition.prepop/beach.zip b/test/resources/visual_recognition.prepop/beach.zip deleted file mode 100644 index 0cefb735c5..0000000000 Binary files a/test/resources/visual_recognition.prepop/beach.zip and /dev/null differ diff --git a/test/resources/visual_recognition.prepop/classify.sh b/test/resources/visual_recognition.prepop/classify.sh deleted file mode 100644 index 68c2b61105..0000000000 --- a/test/resources/visual_recognition.prepop/classify.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# -# A script to help with testing the test... This script creates the test visual -# recognition classifier used by the the 'visual_recognition.prepop' test suite. -# It shouldn't be needed in day-to-day test operation, but is included here -# in case the test stops behaving and manual creation becomes necessary. - -api_key=$(node < { }); }); + describe('createProvider', () => { + describe('positive tests', () => { + // Request models needed by this operation. + + // ProviderSpecificationServersItem + const providerSpecificationServersItemModel = { + url: 'testString', + }; + + // ProviderAuthenticationTypeAndValue + const providerAuthenticationTypeAndValueModel = { + type: 'value', + value: 'testString', + }; + + // ProviderSpecificationComponentsSecuritySchemesBasic + const providerSpecificationComponentsSecuritySchemesBasicModel = { + username: providerAuthenticationTypeAndValueModel, + }; + + // ProviderAuthenticationOAuth2PasswordUsername + const providerAuthenticationOAuth2PasswordUsernameModel = { + type: 'value', + value: 'testString', + }; + + // ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + const providerAuthenticationOAuth2FlowsModel = { + token_url: 'testString', + refresh_url: 'testString', + client_auth_type: 'Body', + content_type: 'testString', + header_prefix: 'testString', + username: providerAuthenticationOAuth2PasswordUsernameModel, + }; + + // ProviderAuthenticationOAuth2 + const providerAuthenticationOAuth2Model = { + preferred_flow: 'password', + flows: providerAuthenticationOAuth2FlowsModel, + }; + + // ProviderSpecificationComponentsSecuritySchemes + const providerSpecificationComponentsSecuritySchemesModel = { + authentication_method: 'basic', + basic: providerSpecificationComponentsSecuritySchemesBasicModel, + oauth2: providerAuthenticationOAuth2Model, + }; + + // ProviderSpecificationComponents + const providerSpecificationComponentsModel = { + securitySchemes: providerSpecificationComponentsSecuritySchemesModel, + }; + + // ProviderSpecification + const providerSpecificationModel = { + servers: [providerSpecificationServersItemModel], + components: providerSpecificationComponentsModel, + }; + + // ProviderPrivateAuthenticationBearerFlow + const providerPrivateAuthenticationModel = { + token: providerAuthenticationTypeAndValueModel, + }; + + // ProviderPrivate + const providerPrivateModel = { + authentication: providerPrivateAuthenticationModel, + }; + + function __createProviderTest() { + // Construct the params object for operation createProvider + const providerId = 'testString'; + const specification = providerSpecificationModel; + const _private = providerPrivateModel; + const createProviderParams = { + providerId, + specification, + _private, + }; + + const createProviderResult = assistantService.createProvider(createProviderParams); + + // all methods should return a Promise + expectToBePromise(createProviderResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/providers', 'POST'); + const expectedAccept = 'application/json'; + const expectedContentType = 'application/json'; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body.provider_id).toEqual(providerId); + expect(mockRequestOptions.body.specification).toEqual(specification); + expect(mockRequestOptions.body.private).toEqual(_private); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __createProviderTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __createProviderTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __createProviderTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const providerId = 'testString'; + const specification = providerSpecificationModel; + const _private = providerPrivateModel; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const createProviderParams = { + providerId, + specification, + _private, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.createProvider(createProviderParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.createProvider({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.createProvider(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('listProviders', () => { + describe('positive tests', () => { + function __listProvidersTest() { + // Construct the params object for operation listProviders + const pageLimit = 100; + const includeCount = false; + const sort = 'name'; + const cursor = 'testString'; + const includeAudit = false; + const listProvidersParams = { + pageLimit, + includeCount, + sort, + cursor, + includeAudit, + }; + + const listProvidersResult = assistantService.listProviders(listProvidersParams); + + // all methods should return a Promise + expectToBePromise(listProvidersResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/providers', 'GET'); + const expectedAccept = 'application/json'; + const expectedContentType = undefined; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.qs.page_limit).toEqual(pageLimit); + expect(mockRequestOptions.qs.include_count).toEqual(includeCount); + expect(mockRequestOptions.qs.sort).toEqual(sort); + expect(mockRequestOptions.qs.cursor).toEqual(cursor); + expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __listProvidersTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __listProvidersTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __listProvidersTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const listProvidersParams = { + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.listProviders(listProvidersParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + + test('should not have any problems when no parameters are passed in', () => { + // invoke the method with no parameters + assistantService.listProviders({}); + checkForSuccessfulExecution(createRequestMock); + }); + }); + }); + + describe('updateProvider', () => { + describe('positive tests', () => { + // Request models needed by this operation. + + // ProviderSpecificationServersItem + const providerSpecificationServersItemModel = { + url: 'testString', + }; + + // ProviderAuthenticationTypeAndValue + const providerAuthenticationTypeAndValueModel = { + type: 'value', + value: 'testString', + }; + + // ProviderSpecificationComponentsSecuritySchemesBasic + const providerSpecificationComponentsSecuritySchemesBasicModel = { + username: providerAuthenticationTypeAndValueModel, + }; + + // ProviderAuthenticationOAuth2PasswordUsername + const providerAuthenticationOAuth2PasswordUsernameModel = { + type: 'value', + value: 'testString', + }; + + // ProviderAuthenticationOAuth2FlowsProviderAuthenticationOAuth2Password + const providerAuthenticationOAuth2FlowsModel = { + token_url: 'testString', + refresh_url: 'testString', + client_auth_type: 'Body', + content_type: 'testString', + header_prefix: 'testString', + username: providerAuthenticationOAuth2PasswordUsernameModel, + }; + + // ProviderAuthenticationOAuth2 + const providerAuthenticationOAuth2Model = { + preferred_flow: 'password', + flows: providerAuthenticationOAuth2FlowsModel, + }; + + // ProviderSpecificationComponentsSecuritySchemes + const providerSpecificationComponentsSecuritySchemesModel = { + authentication_method: 'basic', + basic: providerSpecificationComponentsSecuritySchemesBasicModel, + oauth2: providerAuthenticationOAuth2Model, + }; + + // ProviderSpecificationComponents + const providerSpecificationComponentsModel = { + securitySchemes: providerSpecificationComponentsSecuritySchemesModel, + }; + + // ProviderSpecification + const providerSpecificationModel = { + servers: [providerSpecificationServersItemModel], + components: providerSpecificationComponentsModel, + }; + + // ProviderPrivateAuthenticationBearerFlow + const providerPrivateAuthenticationModel = { + token: providerAuthenticationTypeAndValueModel, + }; + + // ProviderPrivate + const providerPrivateModel = { + authentication: providerPrivateAuthenticationModel, + }; + + function __updateProviderTest() { + // Construct the params object for operation updateProvider + const providerId = 'testString'; + const specification = providerSpecificationModel; + const _private = providerPrivateModel; + const updateProviderParams = { + providerId, + specification, + _private, + }; + + const updateProviderResult = assistantService.updateProvider(updateProviderParams); + + // all methods should return a Promise + expectToBePromise(updateProviderResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/providers/{provider_id}', 'POST'); + const expectedAccept = 'application/json'; + const expectedContentType = 'application/json'; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body.specification).toEqual(specification); + expect(mockRequestOptions.body.private).toEqual(_private); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.path.provider_id).toEqual(providerId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __updateProviderTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __updateProviderTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __updateProviderTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const providerId = 'testString'; + const specification = providerSpecificationModel; + const _private = providerPrivateModel; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const updateProviderParams = { + providerId, + specification, + _private, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.updateProvider(updateProviderParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.updateProvider({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.updateProvider(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + describe('createAssistant', () => { describe('positive tests', () => { function __createAssistantTest() { @@ -735,12 +1138,14 @@ describe('AssistantV2', () => { function __messageTest() { // Construct the params object for operation message const assistantId = 'testString'; + const environmentId = 'testString'; const sessionId = 'testString'; const input = messageInputModel; const context = messageContextModel; const userId = 'testString'; const messageParams = { assistantId, + environmentId, sessionId, input, context, @@ -766,6 +1171,7 @@ describe('AssistantV2', () => { expect(mockRequestOptions.body.user_id).toEqual(userId); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.environment_id).toEqual(environmentId); expect(mockRequestOptions.path.session_id).toEqual(sessionId); } @@ -787,11 +1193,13 @@ describe('AssistantV2', () => { test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; + const environmentId = 'testString'; const sessionId = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; const messageParams = { assistantId, + environmentId, sessionId, headers: { Accept: userAccept, @@ -996,66 +1404,1070 @@ describe('AssistantV2', () => { function __messageStatelessTest() { // Construct the params object for operation messageStateless const assistantId = 'testString'; + const environmentId = 'testString'; const input = statelessMessageInputModel; const context = statelessMessageContextModel; const userId = 'testString'; const messageStatelessParams = { assistantId, + environmentId, input, context, userId, }; - const messageStatelessResult = assistantService.messageStateless(messageStatelessParams); + const messageStatelessResult = assistantService.messageStateless(messageStatelessParams); + + // all methods should return a Promise + expectToBePromise(messageStatelessResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/message', 'POST'); + const expectedAccept = 'application/json'; + const expectedContentType = 'application/json'; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body.input).toEqual(input); + expect(mockRequestOptions.body.context).toEqual(context); + expect(mockRequestOptions.body.user_id).toEqual(userId); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.environment_id).toEqual(environmentId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __messageStatelessTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __messageStatelessTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __messageStatelessTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const assistantId = 'testString'; + const environmentId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const messageStatelessParams = { + assistantId, + environmentId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.messageStateless(messageStatelessParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.messageStateless({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.messageStateless(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('messageStream', () => { + describe('positive tests', () => { + // Request models needed by this operation. + + // RuntimeIntent + const runtimeIntentModel = { + intent: 'testString', + confidence: 72.5, + skill: 'testString', + }; + + // CaptureGroup + const captureGroupModel = { + group: 'testString', + location: [38], + }; + + // RuntimeEntityInterpretation + const runtimeEntityInterpretationModel = { + calendar_type: 'testString', + datetime_link: 'testString', + festival: 'testString', + granularity: 'day', + range_link: 'testString', + range_modifier: 'testString', + relative_day: 72.5, + relative_month: 72.5, + relative_week: 72.5, + relative_weekend: 72.5, + relative_year: 72.5, + specific_day: 72.5, + specific_day_of_week: 'testString', + specific_month: 72.5, + specific_quarter: 72.5, + specific_year: 72.5, + numeric_value: 72.5, + subtype: 'testString', + part_of_day: 'testString', + relative_hour: 72.5, + relative_minute: 72.5, + relative_second: 72.5, + specific_hour: 72.5, + specific_minute: 72.5, + specific_second: 72.5, + timezone: 'testString', + }; + + // RuntimeEntityAlternative + const runtimeEntityAlternativeModel = { + value: 'testString', + confidence: 72.5, + }; + + // RuntimeEntityRole + const runtimeEntityRoleModel = { + type: 'date_from', + }; + + // RuntimeEntity + const runtimeEntityModel = { + entity: 'testString', + location: [38], + value: 'testString', + confidence: 72.5, + groups: [captureGroupModel], + interpretation: runtimeEntityInterpretationModel, + alternatives: [runtimeEntityAlternativeModel], + role: runtimeEntityRoleModel, + skill: 'testString', + }; + + // MessageInputAttachment + const messageInputAttachmentModel = { + url: 'testString', + media_type: 'testString', + }; + + // RequestAnalytics + const requestAnalyticsModel = { + browser: 'testString', + device: 'testString', + pageUrl: 'testString', + }; + + // MessageInputOptionsSpelling + const messageInputOptionsSpellingModel = { + suggestions: true, + auto_correct: true, + }; + + // MessageInputOptions + const messageInputOptionsModel = { + restart: false, + alternate_intents: false, + async_callout: false, + spelling: messageInputOptionsSpellingModel, + debug: false, + return_context: false, + export: false, + }; + + // MessageInput + const messageInputModel = { + message_type: 'text', + text: 'testString', + intents: [runtimeIntentModel], + entities: [runtimeEntityModel], + suggestion_id: 'testString', + attachments: [messageInputAttachmentModel], + analytics: requestAnalyticsModel, + options: messageInputOptionsModel, + }; + + // MessageContextGlobalSystem + const messageContextGlobalSystemModel = { + timezone: 'testString', + user_id: 'testString', + turn_count: 38, + locale: 'en-us', + reference_time: 'testString', + session_start_time: 'testString', + state: 'testString', + skip_user_input: true, + }; + + // MessageContextGlobal + const messageContextGlobalModel = { + system: messageContextGlobalSystemModel, + }; + + // MessageContextSkillSystem + const messageContextSkillSystemModel = { + state: 'testString', + foo: 'testString', + }; + + // MessageContextDialogSkill + const messageContextDialogSkillModel = { + user_defined: { anyKey: 'anyValue' }, + system: messageContextSkillSystemModel, + }; + + // MessageContextActionSkill + const messageContextActionSkillModel = { + user_defined: { anyKey: 'anyValue' }, + system: messageContextSkillSystemModel, + action_variables: { anyKey: 'anyValue' }, + skill_variables: { anyKey: 'anyValue' }, + }; + + // MessageContextSkills + const messageContextSkillsModel = { + 'main skill': messageContextDialogSkillModel, + 'actions skill': messageContextActionSkillModel, + }; + + // MessageContext + const messageContextModel = { + global: messageContextGlobalModel, + skills: messageContextSkillsModel, + integrations: { anyKey: 'anyValue' }, + }; + + function __messageStreamTest() { + // Construct the params object for operation messageStream + const assistantId = 'testString'; + const environmentId = 'testString'; + const sessionId = 'testString'; + const input = messageInputModel; + const context = messageContextModel; + const userId = 'testString'; + const messageStreamParams = { + assistantId, + environmentId, + sessionId, + input, + context, + userId, + }; + + const messageStreamResult = assistantService.messageStream(messageStreamParams); + + // all methods should return a Promise + expectToBePromise(messageStreamResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/environments/{environment_id}/sessions/{session_id}/message_stream', 'POST'); + const expectedAccept = 'text/event-stream'; + const expectedContentType = 'application/json'; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body.input).toEqual(input); + expect(mockRequestOptions.body.context).toEqual(context); + expect(mockRequestOptions.body.user_id).toEqual(userId); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.environment_id).toEqual(environmentId); + expect(mockRequestOptions.path.session_id).toEqual(sessionId); + expect(mockRequestOptions.responseType).toBe('stream'); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __messageStreamTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __messageStreamTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __messageStreamTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const assistantId = 'testString'; + const environmentId = 'testString'; + const sessionId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const messageStreamParams = { + assistantId, + environmentId, + sessionId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.messageStream(messageStreamParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.messageStream({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.messageStream(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('messageStreamStateless', () => { + describe('positive tests', () => { + // Request models needed by this operation. + + // RuntimeIntent + const runtimeIntentModel = { + intent: 'testString', + confidence: 72.5, + skill: 'testString', + }; + + // CaptureGroup + const captureGroupModel = { + group: 'testString', + location: [38], + }; + + // RuntimeEntityInterpretation + const runtimeEntityInterpretationModel = { + calendar_type: 'testString', + datetime_link: 'testString', + festival: 'testString', + granularity: 'day', + range_link: 'testString', + range_modifier: 'testString', + relative_day: 72.5, + relative_month: 72.5, + relative_week: 72.5, + relative_weekend: 72.5, + relative_year: 72.5, + specific_day: 72.5, + specific_day_of_week: 'testString', + specific_month: 72.5, + specific_quarter: 72.5, + specific_year: 72.5, + numeric_value: 72.5, + subtype: 'testString', + part_of_day: 'testString', + relative_hour: 72.5, + relative_minute: 72.5, + relative_second: 72.5, + specific_hour: 72.5, + specific_minute: 72.5, + specific_second: 72.5, + timezone: 'testString', + }; + + // RuntimeEntityAlternative + const runtimeEntityAlternativeModel = { + value: 'testString', + confidence: 72.5, + }; + + // RuntimeEntityRole + const runtimeEntityRoleModel = { + type: 'date_from', + }; + + // RuntimeEntity + const runtimeEntityModel = { + entity: 'testString', + location: [38], + value: 'testString', + confidence: 72.5, + groups: [captureGroupModel], + interpretation: runtimeEntityInterpretationModel, + alternatives: [runtimeEntityAlternativeModel], + role: runtimeEntityRoleModel, + skill: 'testString', + }; + + // MessageInputAttachment + const messageInputAttachmentModel = { + url: 'testString', + media_type: 'testString', + }; + + // RequestAnalytics + const requestAnalyticsModel = { + browser: 'testString', + device: 'testString', + pageUrl: 'testString', + }; + + // MessageInputOptionsSpelling + const messageInputOptionsSpellingModel = { + suggestions: true, + auto_correct: true, + }; + + // MessageInputOptions + const messageInputOptionsModel = { + restart: false, + alternate_intents: false, + async_callout: false, + spelling: messageInputOptionsSpellingModel, + debug: false, + return_context: false, + export: false, + }; + + // MessageInput + const messageInputModel = { + message_type: 'text', + text: 'testString', + intents: [runtimeIntentModel], + entities: [runtimeEntityModel], + suggestion_id: 'testString', + attachments: [messageInputAttachmentModel], + analytics: requestAnalyticsModel, + options: messageInputOptionsModel, + }; + + // MessageContextGlobalSystem + const messageContextGlobalSystemModel = { + timezone: 'testString', + user_id: 'testString', + turn_count: 38, + locale: 'en-us', + reference_time: 'testString', + session_start_time: 'testString', + state: 'testString', + skip_user_input: true, + }; + + // MessageContextGlobal + const messageContextGlobalModel = { + system: messageContextGlobalSystemModel, + }; + + // MessageContextSkillSystem + const messageContextSkillSystemModel = { + state: 'testString', + foo: 'testString', + }; + + // MessageContextDialogSkill + const messageContextDialogSkillModel = { + user_defined: { anyKey: 'anyValue' }, + system: messageContextSkillSystemModel, + }; + + // MessageContextActionSkill + const messageContextActionSkillModel = { + user_defined: { anyKey: 'anyValue' }, + system: messageContextSkillSystemModel, + action_variables: { anyKey: 'anyValue' }, + skill_variables: { anyKey: 'anyValue' }, + }; + + // MessageContextSkills + const messageContextSkillsModel = { + 'main skill': messageContextDialogSkillModel, + 'actions skill': messageContextActionSkillModel, + }; + + // MessageContext + const messageContextModel = { + global: messageContextGlobalModel, + skills: messageContextSkillsModel, + integrations: { anyKey: 'anyValue' }, + }; + + function __messageStreamStatelessTest() { + // Construct the params object for operation messageStreamStateless + const assistantId = 'testString'; + const environmentId = 'testString'; + const input = messageInputModel; + const context = messageContextModel; + const userId = 'testString'; + const messageStreamStatelessParams = { + assistantId, + environmentId, + input, + context, + userId, + }; + + const messageStreamStatelessResult = assistantService.messageStreamStateless(messageStreamStatelessParams); + + // all methods should return a Promise + expectToBePromise(messageStreamStatelessResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/environments/{environment_id}/message_stream', 'POST'); + const expectedAccept = 'text/event-stream'; + const expectedContentType = 'application/json'; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body.input).toEqual(input); + expect(mockRequestOptions.body.context).toEqual(context); + expect(mockRequestOptions.body.user_id).toEqual(userId); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.environment_id).toEqual(environmentId); + expect(mockRequestOptions.responseType).toBe('stream'); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __messageStreamStatelessTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __messageStreamStatelessTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __messageStreamStatelessTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const assistantId = 'testString'; + const environmentId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const messageStreamStatelessParams = { + assistantId, + environmentId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.messageStreamStateless(messageStreamStatelessParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.messageStreamStateless({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.messageStreamStateless(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('bulkClassify', () => { + describe('positive tests', () => { + // Request models needed by this operation. + + // BulkClassifyUtterance + const bulkClassifyUtteranceModel = { + text: 'testString', + }; + + function __bulkClassifyTest() { + // Construct the params object for operation bulkClassify + const skillId = 'testString'; + const input = [bulkClassifyUtteranceModel]; + const bulkClassifyParams = { + skillId, + input, + }; + + const bulkClassifyResult = assistantService.bulkClassify(bulkClassifyParams); + + // all methods should return a Promise + expectToBePromise(bulkClassifyResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/skills/{skill_id}/workspace/bulk_classify', 'POST'); + const expectedAccept = 'application/json'; + const expectedContentType = 'application/json'; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body.input).toEqual(input); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.path.skill_id).toEqual(skillId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __bulkClassifyTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __bulkClassifyTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __bulkClassifyTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const skillId = 'testString'; + const input = [bulkClassifyUtteranceModel]; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const bulkClassifyParams = { + skillId, + input, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.bulkClassify(bulkClassifyParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.bulkClassify({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.bulkClassify(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('listLogs', () => { + describe('positive tests', () => { + function __listLogsTest() { + // Construct the params object for operation listLogs + const assistantId = 'testString'; + const sort = 'testString'; + const filter = 'testString'; + const pageLimit = 100; + const cursor = 'testString'; + const listLogsParams = { + assistantId, + sort, + filter, + pageLimit, + cursor, + }; + + const listLogsResult = assistantService.listLogs(listLogsParams); + + // all methods should return a Promise + expectToBePromise(listLogsResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/logs', 'GET'); + const expectedAccept = 'application/json'; + const expectedContentType = undefined; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.qs.sort).toEqual(sort); + expect(mockRequestOptions.qs.filter).toEqual(filter); + expect(mockRequestOptions.qs.page_limit).toEqual(pageLimit); + expect(mockRequestOptions.qs.cursor).toEqual(cursor); + expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __listLogsTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __listLogsTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __listLogsTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const assistantId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const listLogsParams = { + assistantId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.listLogs(listLogsParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.listLogs({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.listLogs(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('deleteUserData', () => { + describe('positive tests', () => { + function __deleteUserDataTest() { + // Construct the params object for operation deleteUserData + const customerId = 'testString'; + const deleteUserDataParams = { + customerId, + }; + + const deleteUserDataResult = assistantService.deleteUserData(deleteUserDataParams); + + // all methods should return a Promise + expectToBePromise(deleteUserDataResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/user_data', 'DELETE'); + const expectedAccept = 'application/json'; + const expectedContentType = undefined; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.qs.customer_id).toEqual(customerId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __deleteUserDataTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __deleteUserDataTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __deleteUserDataTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const customerId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const deleteUserDataParams = { + customerId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.deleteUserData(deleteUserDataParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.deleteUserData({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.deleteUserData(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('listEnvironments', () => { + describe('positive tests', () => { + function __listEnvironmentsTest() { + // Construct the params object for operation listEnvironments + const assistantId = 'testString'; + const pageLimit = 100; + const includeCount = false; + const sort = 'name'; + const cursor = 'testString'; + const includeAudit = false; + const listEnvironmentsParams = { + assistantId, + pageLimit, + includeCount, + sort, + cursor, + includeAudit, + }; + + const listEnvironmentsResult = assistantService.listEnvironments(listEnvironmentsParams); + + // all methods should return a Promise + expectToBePromise(listEnvironmentsResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/environments', 'GET'); + const expectedAccept = 'application/json'; + const expectedContentType = undefined; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.qs.page_limit).toEqual(pageLimit); + expect(mockRequestOptions.qs.include_count).toEqual(includeCount); + expect(mockRequestOptions.qs.sort).toEqual(sort); + expect(mockRequestOptions.qs.cursor).toEqual(cursor); + expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); + expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __listEnvironmentsTest(); + + // enable retries and test again + createRequestMock.mockClear(); + assistantService.enableRetries(); + __listEnvironmentsTest(); + + // disable retries and test again + createRequestMock.mockClear(); + assistantService.disableRetries(); + __listEnvironmentsTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const assistantId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const listEnvironmentsParams = { + assistantId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + assistantService.listEnvironments(listEnvironmentsParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await assistantService.listEnvironments({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await assistantService.listEnvironments(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('getEnvironment', () => { + describe('positive tests', () => { + function __getEnvironmentTest() { + // Construct the params object for operation getEnvironment + const assistantId = 'testString'; + const environmentId = 'testString'; + const includeAudit = false; + const getEnvironmentParams = { + assistantId, + environmentId, + includeAudit, + }; + + const getEnvironmentResult = assistantService.getEnvironment(getEnvironmentParams); // all methods should return a Promise - expectToBePromise(messageStatelessResult); + expectToBePromise(getEnvironmentResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/message', 'POST'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/environments/{environment_id}', 'GET'); const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; + const expectedContentType = undefined; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.input).toEqual(input); - expect(mockRequestOptions.body.context).toEqual(context); - expect(mockRequestOptions.body.user_id).toEqual(userId); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.environment_id).toEqual(environmentId); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __messageStatelessTest(); + __getEnvironmentTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __messageStatelessTest(); + __getEnvironmentTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __messageStatelessTest(); + __getEnvironmentTest(); }); test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; + const environmentId = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const messageStatelessParams = { + const getEnvironmentParams = { assistantId, + environmentId, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.messageStateless(messageStatelessParams); + assistantService.getEnvironment(getEnvironmentParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1064,7 +2476,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.messageStateless({}); + await assistantService.getEnvironment({}); } catch (e) { err = e; } @@ -1075,7 +2487,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.messageStateless(); + await assistantService.getEnvironment(); } catch (e) { err = e; } @@ -1085,74 +2497,98 @@ describe('AssistantV2', () => { }); }); - describe('bulkClassify', () => { + describe('updateEnvironment', () => { describe('positive tests', () => { // Request models needed by this operation. - // BulkClassifyUtterance - const bulkClassifyUtteranceModel = { - text: 'testString', + // UpdateEnvironmentOrchestration + const updateEnvironmentOrchestrationModel = { + search_skill_fallback: true, }; - function __bulkClassifyTest() { - // Construct the params object for operation bulkClassify - const skillId = 'testString'; - const input = [bulkClassifyUtteranceModel]; - const bulkClassifyParams = { - skillId, - input, + // EnvironmentSkill + const environmentSkillModel = { + skill_id: 'testString', + type: 'dialog', + disabled: true, + snapshot: 'testString', + skill_reference: 'testString', + }; + + function __updateEnvironmentTest() { + // Construct the params object for operation updateEnvironment + const assistantId = 'testString'; + const environmentId = 'testString'; + const name = 'testString'; + const description = 'testString'; + const orchestration = updateEnvironmentOrchestrationModel; + const sessionTimeout = 10; + const skillReferences = [environmentSkillModel]; + const updateEnvironmentParams = { + assistantId, + environmentId, + name, + description, + orchestration, + sessionTimeout, + skillReferences, }; - const bulkClassifyResult = assistantService.bulkClassify(bulkClassifyParams); + const updateEnvironmentResult = assistantService.updateEnvironment(updateEnvironmentParams); // all methods should return a Promise - expectToBePromise(bulkClassifyResult); + expectToBePromise(updateEnvironmentResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/skills/{skill_id}/workspace/bulk_classify', 'POST'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/environments/{environment_id}', 'POST'); const expectedAccept = 'application/json'; const expectedContentType = 'application/json'; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.input).toEqual(input); + expect(mockRequestOptions.body.name).toEqual(name); + expect(mockRequestOptions.body.description).toEqual(description); + expect(mockRequestOptions.body.orchestration).toEqual(orchestration); + expect(mockRequestOptions.body.session_timeout).toEqual(sessionTimeout); + expect(mockRequestOptions.body.skill_references).toEqual(skillReferences); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); - expect(mockRequestOptions.path.skill_id).toEqual(skillId); + expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.environment_id).toEqual(environmentId); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __bulkClassifyTest(); + __updateEnvironmentTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __bulkClassifyTest(); + __updateEnvironmentTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __bulkClassifyTest(); + __updateEnvironmentTest(); }); test('should prioritize user-given headers', () => { // parameters - const skillId = 'testString'; - const input = [bulkClassifyUtteranceModel]; + const assistantId = 'testString'; + const environmentId = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const bulkClassifyParams = { - skillId, - input, + const updateEnvironmentParams = { + assistantId, + environmentId, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.bulkClassify(bulkClassifyParams); + assistantService.updateEnvironment(updateEnvironmentParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1161,7 +2597,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.bulkClassify({}); + await assistantService.updateEnvironment({}); } catch (e) { err = e; } @@ -1172,7 +2608,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.bulkClassify(); + await assistantService.updateEnvironment(); } catch (e) { err = e; } @@ -1182,58 +2618,49 @@ describe('AssistantV2', () => { }); }); - describe('listLogs', () => { + describe('createRelease', () => { describe('positive tests', () => { - function __listLogsTest() { - // Construct the params object for operation listLogs + function __createReleaseTest() { + // Construct the params object for operation createRelease const assistantId = 'testString'; - const sort = 'testString'; - const filter = 'testString'; - const pageLimit = 100; - const cursor = 'testString'; - const listLogsParams = { + const description = 'testString'; + const createReleaseParams = { assistantId, - sort, - filter, - pageLimit, - cursor, + description, }; - const listLogsResult = assistantService.listLogs(listLogsParams); + const createReleaseResult = assistantService.createRelease(createReleaseParams); // all methods should return a Promise - expectToBePromise(listLogsResult); + expectToBePromise(createReleaseResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/logs', 'GET'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases', 'POST'); const expectedAccept = 'application/json'; - const expectedContentType = undefined; + const expectedContentType = 'application/json'; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body.description).toEqual(description); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); - expect(mockRequestOptions.qs.sort).toEqual(sort); - expect(mockRequestOptions.qs.filter).toEqual(filter); - expect(mockRequestOptions.qs.page_limit).toEqual(pageLimit); - expect(mockRequestOptions.qs.cursor).toEqual(cursor); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __listLogsTest(); + __createReleaseTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __listLogsTest(); + __createReleaseTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __listLogsTest(); + __createReleaseTest(); }); test('should prioritize user-given headers', () => { @@ -1241,7 +2668,7 @@ describe('AssistantV2', () => { const assistantId = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const listLogsParams = { + const createReleaseParams = { assistantId, headers: { Accept: userAccept, @@ -1249,7 +2676,7 @@ describe('AssistantV2', () => { }, }; - assistantService.listLogs(listLogsParams); + assistantService.createRelease(createReleaseParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1258,7 +2685,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.listLogs({}); + await assistantService.createRelease({}); } catch (e) { err = e; } @@ -1269,7 +2696,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.listLogs(); + await assistantService.createRelease(); } catch (e) { err = e; } @@ -1279,62 +2706,77 @@ describe('AssistantV2', () => { }); }); - describe('deleteUserData', () => { + describe('listReleases', () => { describe('positive tests', () => { - function __deleteUserDataTest() { - // Construct the params object for operation deleteUserData - const customerId = 'testString'; - const deleteUserDataParams = { - customerId, + function __listReleasesTest() { + // Construct the params object for operation listReleases + const assistantId = 'testString'; + const pageLimit = 100; + const includeCount = false; + const sort = 'name'; + const cursor = 'testString'; + const includeAudit = false; + const listReleasesParams = { + assistantId, + pageLimit, + includeCount, + sort, + cursor, + includeAudit, }; - const deleteUserDataResult = assistantService.deleteUserData(deleteUserDataParams); + const listReleasesResult = assistantService.listReleases(listReleasesParams); // all methods should return a Promise - expectToBePromise(deleteUserDataResult); + expectToBePromise(listReleasesResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/user_data', 'DELETE'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases', 'GET'); const expectedAccept = 'application/json'; const expectedContentType = undefined; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); - expect(mockRequestOptions.qs.customer_id).toEqual(customerId); + expect(mockRequestOptions.qs.page_limit).toEqual(pageLimit); + expect(mockRequestOptions.qs.include_count).toEqual(includeCount); + expect(mockRequestOptions.qs.sort).toEqual(sort); + expect(mockRequestOptions.qs.cursor).toEqual(cursor); + expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); + expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __deleteUserDataTest(); + __listReleasesTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __deleteUserDataTest(); + __listReleasesTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __deleteUserDataTest(); + __listReleasesTest(); }); test('should prioritize user-given headers', () => { // parameters - const customerId = 'testString'; + const assistantId = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const deleteUserDataParams = { - customerId, + const listReleasesParams = { + assistantId, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.deleteUserData(deleteUserDataParams); + assistantService.listReleases(listReleasesParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1343,7 +2785,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.deleteUserData({}); + await assistantService.listReleases({}); } catch (e) { err = e; } @@ -1354,7 +2796,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.deleteUserData(); + await assistantService.listReleases(); } catch (e) { err = e; } @@ -1364,77 +2806,70 @@ describe('AssistantV2', () => { }); }); - describe('listEnvironments', () => { + describe('getRelease', () => { describe('positive tests', () => { - function __listEnvironmentsTest() { - // Construct the params object for operation listEnvironments + function __getReleaseTest() { + // Construct the params object for operation getRelease const assistantId = 'testString'; - const pageLimit = 100; - const includeCount = false; - const sort = 'name'; - const cursor = 'testString'; + const release = 'testString'; const includeAudit = false; - const listEnvironmentsParams = { + const getReleaseParams = { assistantId, - pageLimit, - includeCount, - sort, - cursor, + release, includeAudit, }; - const listEnvironmentsResult = assistantService.listEnvironments(listEnvironmentsParams); + const getReleaseResult = assistantService.getRelease(getReleaseParams); // all methods should return a Promise - expectToBePromise(listEnvironmentsResult); + expectToBePromise(getReleaseResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/environments', 'GET'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}', 'GET'); const expectedAccept = 'application/json'; const expectedContentType = undefined; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); - expect(mockRequestOptions.qs.page_limit).toEqual(pageLimit); - expect(mockRequestOptions.qs.include_count).toEqual(includeCount); - expect(mockRequestOptions.qs.sort).toEqual(sort); - expect(mockRequestOptions.qs.cursor).toEqual(cursor); expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.release).toEqual(release); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __listEnvironmentsTest(); + __getReleaseTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __listEnvironmentsTest(); + __getReleaseTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __listEnvironmentsTest(); + __getReleaseTest(); }); test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; + const release = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const listEnvironmentsParams = { + const getReleaseParams = { assistantId, + release, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.listEnvironments(listEnvironmentsParams); + assistantService.getRelease(getReleaseParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1443,7 +2878,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.listEnvironments({}); + await assistantService.getRelease({}); } catch (e) { err = e; } @@ -1454,7 +2889,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.listEnvironments(); + await assistantService.getRelease(); } catch (e) { err = e; } @@ -1464,70 +2899,67 @@ describe('AssistantV2', () => { }); }); - describe('getEnvironment', () => { + describe('deleteRelease', () => { describe('positive tests', () => { - function __getEnvironmentTest() { - // Construct the params object for operation getEnvironment + function __deleteReleaseTest() { + // Construct the params object for operation deleteRelease const assistantId = 'testString'; - const environmentId = 'testString'; - const includeAudit = false; - const getEnvironmentParams = { + const release = 'testString'; + const deleteReleaseParams = { assistantId, - environmentId, - includeAudit, + release, }; - const getEnvironmentResult = assistantService.getEnvironment(getEnvironmentParams); + const deleteReleaseResult = assistantService.deleteRelease(deleteReleaseParams); // all methods should return a Promise - expectToBePromise(getEnvironmentResult); + expectToBePromise(deleteReleaseResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/environments/{environment_id}', 'GET'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}', 'DELETE'); const expectedAccept = 'application/json'; const expectedContentType = undefined; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); - expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); + expect(mockRequestOptions.path.release).toEqual(release); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __getEnvironmentTest(); + __deleteReleaseTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __getEnvironmentTest(); + __deleteReleaseTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __getEnvironmentTest(); + __deleteReleaseTest(); }); test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; - const environmentId = 'testString'; + const release = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const getEnvironmentParams = { + const deleteReleaseParams = { assistantId, - environmentId, + release, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.getEnvironment(getEnvironmentParams); + assistantService.deleteRelease(deleteReleaseParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1536,7 +2968,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.getEnvironment({}); + await assistantService.deleteRelease({}); } catch (e) { err = e; } @@ -1547,7 +2979,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.getEnvironment(); + await assistantService.deleteRelease(); } catch (e) { err = e; } @@ -1557,90 +2989,67 @@ describe('AssistantV2', () => { }); }); - describe('updateEnvironment', () => { + describe('deployRelease', () => { describe('positive tests', () => { - // Request models needed by this operation. - - // BaseEnvironmentOrchestration - const baseEnvironmentOrchestrationModel = { - search_skill_fallback: true, - }; - - // EnvironmentSkill - const environmentSkillModel = { - skill_id: 'testString', - type: 'dialog', - disabled: true, - snapshot: 'testString', - skill_reference: 'testString', - }; - - function __updateEnvironmentTest() { - // Construct the params object for operation updateEnvironment + function __deployReleaseTest() { + // Construct the params object for operation deployRelease const assistantId = 'testString'; + const release = 'testString'; const environmentId = 'testString'; - const name = 'testString'; - const description = 'testString'; - const orchestration = baseEnvironmentOrchestrationModel; - const sessionTimeout = 10; - const skillReferences = [environmentSkillModel]; - const updateEnvironmentParams = { + const includeAudit = false; + const deployReleaseParams = { assistantId, + release, environmentId, - name, - description, - orchestration, - sessionTimeout, - skillReferences, + includeAudit, }; - const updateEnvironmentResult = assistantService.updateEnvironment(updateEnvironmentParams); + const deployReleaseResult = assistantService.deployRelease(deployReleaseParams); // all methods should return a Promise - expectToBePromise(updateEnvironmentResult); + expectToBePromise(deployReleaseResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/environments/{environment_id}', 'POST'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}/deploy', 'POST'); const expectedAccept = 'application/json'; const expectedContentType = 'application/json'; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.name).toEqual(name); - expect(mockRequestOptions.body.description).toEqual(description); - expect(mockRequestOptions.body.orchestration).toEqual(orchestration); - expect(mockRequestOptions.body.session_timeout).toEqual(sessionTimeout); - expect(mockRequestOptions.body.skill_references).toEqual(skillReferences); + expect(mockRequestOptions.body.environment_id).toEqual(environmentId); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); + expect(mockRequestOptions.path.release).toEqual(release); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __updateEnvironmentTest(); + __deployReleaseTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __updateEnvironmentTest(); + __deployReleaseTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __updateEnvironmentTest(); + __deployReleaseTest(); }); test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; + const release = 'testString'; const environmentId = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const updateEnvironmentParams = { + const deployReleaseParams = { assistantId, + release, environmentId, headers: { Accept: userAccept, @@ -1648,7 +3057,7 @@ describe('AssistantV2', () => { }, }; - assistantService.updateEnvironment(updateEnvironmentParams); + assistantService.deployRelease(deployReleaseParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1657,7 +3066,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.updateEnvironment({}); + await assistantService.deployRelease({}); } catch (e) { err = e; } @@ -1668,7 +3077,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.updateEnvironment(); + await assistantService.deployRelease(); } catch (e) { err = e; } @@ -1678,65 +3087,70 @@ describe('AssistantV2', () => { }); }); - describe('createRelease', () => { + describe('createReleaseExport', () => { describe('positive tests', () => { - function __createReleaseTest() { - // Construct the params object for operation createRelease + function __createReleaseExportTest() { + // Construct the params object for operation createReleaseExport const assistantId = 'testString'; - const description = 'testString'; - const createReleaseParams = { + const release = 'testString'; + const includeAudit = false; + const createReleaseExportParams = { assistantId, - description, + release, + includeAudit, }; - const createReleaseResult = assistantService.createRelease(createReleaseParams); + const createReleaseExportResult = assistantService.createReleaseExport(createReleaseExportParams); // all methods should return a Promise - expectToBePromise(createReleaseResult); + expectToBePromise(createReleaseExportResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases', 'POST'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}/export', 'POST'); const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; + const expectedContentType = undefined; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.description).toEqual(description); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.release).toEqual(release); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __createReleaseTest(); + __createReleaseExportTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __createReleaseTest(); + __createReleaseExportTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __createReleaseTest(); + __createReleaseExportTest(); }); test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; + const release = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const createReleaseParams = { + const createReleaseExportParams = { assistantId, + release, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.createRelease(createReleaseParams); + assistantService.createReleaseExport(createReleaseExportParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1745,7 +3159,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.createRelease({}); + await assistantService.createReleaseExport({}); } catch (e) { err = e; } @@ -1756,7 +3170,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.createRelease(); + await assistantService.createReleaseExport(); } catch (e) { err = e; } @@ -1766,77 +3180,70 @@ describe('AssistantV2', () => { }); }); - describe('listReleases', () => { + describe('downloadReleaseExport', () => { describe('positive tests', () => { - function __listReleasesTest() { - // Construct the params object for operation listReleases + function __downloadReleaseExportTest() { + // Construct the params object for operation downloadReleaseExport const assistantId = 'testString'; - const pageLimit = 100; - const includeCount = false; - const sort = 'name'; - const cursor = 'testString'; + const release = 'testString'; const includeAudit = false; - const listReleasesParams = { + const downloadReleaseExportParams = { assistantId, - pageLimit, - includeCount, - sort, - cursor, + release, includeAudit, }; - const listReleasesResult = assistantService.listReleases(listReleasesParams); + const downloadReleaseExportResult = assistantService.downloadReleaseExport(downloadReleaseExportParams); // all methods should return a Promise - expectToBePromise(listReleasesResult); + expectToBePromise(downloadReleaseExportResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases', 'GET'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}/export', 'GET'); const expectedAccept = 'application/json'; const expectedContentType = undefined; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); - expect(mockRequestOptions.qs.page_limit).toEqual(pageLimit); - expect(mockRequestOptions.qs.include_count).toEqual(includeCount); - expect(mockRequestOptions.qs.sort).toEqual(sort); - expect(mockRequestOptions.qs.cursor).toEqual(cursor); expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); + expect(mockRequestOptions.path.release).toEqual(release); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __listReleasesTest(); + __downloadReleaseExportTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __listReleasesTest(); + __downloadReleaseExportTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __listReleasesTest(); + __downloadReleaseExportTest(); }); test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; + const release = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const listReleasesParams = { + const downloadReleaseExportParams = { assistantId, + release, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.listReleases(listReleasesParams); + assistantService.downloadReleaseExport(downloadReleaseExportParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1845,7 +3252,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.listReleases({}); + await assistantService.downloadReleaseExport({}); } catch (e) { err = e; } @@ -1856,7 +3263,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.listReleases(); + await assistantService.downloadReleaseExport(); } catch (e) { err = e; } @@ -1866,52 +3273,53 @@ describe('AssistantV2', () => { }); }); - describe('getRelease', () => { + describe('downloadReleaseExportAsStream', () => { describe('positive tests', () => { - function __getReleaseTest() { - // Construct the params object for operation getRelease + function __downloadReleaseExportAsStreamTest() { + // Construct the params object for operation downloadReleaseExportAsStream const assistantId = 'testString'; const release = 'testString'; const includeAudit = false; - const getReleaseParams = { + const downloadReleaseExportAsStreamParams = { assistantId, release, includeAudit, }; - const getReleaseResult = assistantService.getRelease(getReleaseParams); + const downloadReleaseExportAsStreamResult = assistantService.downloadReleaseExportAsStream(downloadReleaseExportAsStreamParams); // all methods should return a Promise - expectToBePromise(getReleaseResult); + expectToBePromise(downloadReleaseExportAsStreamResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}', 'GET'); - const expectedAccept = 'application/json'; + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}/export', 'GET'); + const expectedAccept = 'application/octet-stream'; const expectedContentType = undefined; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); expect(mockRequestOptions.path.release).toEqual(release); + expect(mockRequestOptions.responseType).toBe('stream'); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __getReleaseTest(); + __downloadReleaseExportAsStreamTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __getReleaseTest(); + __downloadReleaseExportAsStreamTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __getReleaseTest(); + __downloadReleaseExportAsStreamTest(); }); test('should prioritize user-given headers', () => { @@ -1920,7 +3328,7 @@ describe('AssistantV2', () => { const release = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const getReleaseParams = { + const downloadReleaseExportAsStreamParams = { assistantId, release, headers: { @@ -1929,7 +3337,7 @@ describe('AssistantV2', () => { }, }; - assistantService.getRelease(getReleaseParams); + assistantService.downloadReleaseExportAsStream(downloadReleaseExportAsStreamParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -1938,7 +3346,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.getRelease({}); + await assistantService.downloadReleaseExportAsStream({}); } catch (e) { err = e; } @@ -1949,7 +3357,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.getRelease(); + await assistantService.downloadReleaseExportAsStream(); } catch (e) { err = e; } @@ -1959,67 +3367,70 @@ describe('AssistantV2', () => { }); }); - describe('deleteRelease', () => { + describe('createReleaseImport', () => { describe('positive tests', () => { - function __deleteReleaseTest() { - // Construct the params object for operation deleteRelease + function __createReleaseImportTest() { + // Construct the params object for operation createReleaseImport const assistantId = 'testString'; - const release = 'testString'; - const deleteReleaseParams = { + const body = Buffer.from('This is a mock file.'); + const includeAudit = false; + const createReleaseImportParams = { assistantId, - release, + body, + includeAudit, }; - const deleteReleaseResult = assistantService.deleteRelease(deleteReleaseParams); + const createReleaseImportResult = assistantService.createReleaseImport(createReleaseImportParams); // all methods should return a Promise - expectToBePromise(deleteReleaseResult); + expectToBePromise(createReleaseImportResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}', 'DELETE'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/import', 'POST'); const expectedAccept = 'application/json'; - const expectedContentType = undefined; + const expectedContentType = 'application/octet-stream'; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body).toEqual(body); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); + expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); - expect(mockRequestOptions.path.release).toEqual(release); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __deleteReleaseTest(); + __createReleaseImportTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __deleteReleaseTest(); + __createReleaseImportTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __deleteReleaseTest(); + __createReleaseImportTest(); }); test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; - const release = 'testString'; + const body = Buffer.from('This is a mock file.'); const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const deleteReleaseParams = { + const createReleaseImportParams = { assistantId, - release, + body, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.deleteRelease(deleteReleaseParams); + assistantService.createReleaseImport(createReleaseImportParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -2028,7 +3439,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.deleteRelease({}); + await assistantService.createReleaseImport({}); } catch (e) { err = e; } @@ -2039,7 +3450,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.deleteRelease(); + await assistantService.createReleaseImport(); } catch (e) { err = e; } @@ -2049,75 +3460,65 @@ describe('AssistantV2', () => { }); }); - describe('deployRelease', () => { + describe('getReleaseImportStatus', () => { describe('positive tests', () => { - function __deployReleaseTest() { - // Construct the params object for operation deployRelease + function __getReleaseImportStatusTest() { + // Construct the params object for operation getReleaseImportStatus const assistantId = 'testString'; - const release = 'testString'; - const environmentId = 'testString'; const includeAudit = false; - const deployReleaseParams = { + const getReleaseImportStatusParams = { assistantId, - release, - environmentId, includeAudit, }; - const deployReleaseResult = assistantService.deployRelease(deployReleaseParams); + const getReleaseImportStatusResult = assistantService.getReleaseImportStatus(getReleaseImportStatusParams); // all methods should return a Promise - expectToBePromise(deployReleaseResult); + expectToBePromise(getReleaseImportStatusResult); // assert that create request was called expect(createRequestMock).toHaveBeenCalledTimes(1); const mockRequestOptions = getOptions(createRequestMock); - checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/releases/{release}/deploy', 'POST'); + checkUrlAndMethod(mockRequestOptions, '/v2/assistants/{assistant_id}/import', 'GET'); const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; + const expectedContentType = undefined; checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.environment_id).toEqual(environmentId); expect(mockRequestOptions.qs.version).toEqual(assistantServiceOptions.version); expect(mockRequestOptions.qs.include_audit).toEqual(includeAudit); expect(mockRequestOptions.path.assistant_id).toEqual(assistantId); - expect(mockRequestOptions.path.release).toEqual(release); } test('should pass the right params to createRequest with enable and disable retries', () => { // baseline test - __deployReleaseTest(); + __getReleaseImportStatusTest(); // enable retries and test again createRequestMock.mockClear(); assistantService.enableRetries(); - __deployReleaseTest(); + __getReleaseImportStatusTest(); // disable retries and test again createRequestMock.mockClear(); assistantService.disableRetries(); - __deployReleaseTest(); + __getReleaseImportStatusTest(); }); test('should prioritize user-given headers', () => { // parameters const assistantId = 'testString'; - const release = 'testString'; - const environmentId = 'testString'; const userAccept = 'fake/accept'; const userContentType = 'fake/contentType'; - const deployReleaseParams = { + const getReleaseImportStatusParams = { assistantId, - release, - environmentId, headers: { Accept: userAccept, 'Content-Type': userContentType, }, }; - assistantService.deployRelease(deployReleaseParams); + assistantService.getReleaseImportStatus(getReleaseImportStatusParams); checkMediaHeaders(createRequestMock, userAccept, userContentType); }); }); @@ -2126,7 +3527,7 @@ describe('AssistantV2', () => { test('should enforce required parameters', async () => { let err; try { - await assistantService.deployRelease({}); + await assistantService.getReleaseImportStatus({}); } catch (e) { err = e; } @@ -2137,7 +3538,7 @@ describe('AssistantV2', () => { test('should reject promise when required params are not given', async () => { let err; try { - await assistantService.deployRelease(); + await assistantService.getReleaseImportStatus(); } catch (e) { err = e; } @@ -2274,11 +3675,64 @@ describe('AssistantV2', () => { title: 'testString', }; + // SearchSettingsElasticSearch + const searchSettingsElasticSearchModel = { + url: 'testString', + port: 'testString', + username: 'testString', + password: 'testString', + index: 'testString', + filter: ['testString'], + query_body: { anyKey: 'anyValue' }, + managed_index: 'testString', + apikey: 'testString', + }; + + // SearchSettingsConversationalSearchResponseLength + const searchSettingsConversationalSearchResponseLengthModel = { + option: 'moderate', + }; + + // SearchSettingsConversationalSearchSearchConfidence + const searchSettingsConversationalSearchSearchConfidenceModel = { + threshold: 'less_often', + }; + + // SearchSettingsConversationalSearch + const searchSettingsConversationalSearchModel = { + enabled: true, + response_length: searchSettingsConversationalSearchResponseLengthModel, + search_confidence: searchSettingsConversationalSearchSearchConfidenceModel, + }; + + // SearchSettingsServerSideSearch + const searchSettingsServerSideSearchModel = { + url: 'testString', + port: 'testString', + username: 'testString', + password: 'testString', + filter: 'testString', + metadata: { anyKey: 'anyValue' }, + apikey: 'testString', + no_auth: true, + auth_type: 'basic', + }; + + // SearchSettingsClientSideSearch + const searchSettingsClientSideSearchModel = { + filter: 'testString', + metadata: { anyKey: 'anyValue' }, + }; + // SearchSettings const searchSettingsModel = { discovery: searchSettingsDiscoveryModel, messages: searchSettingsMessagesModel, schema_mapping: searchSettingsSchemaMappingModel, + elastic_search: searchSettingsElasticSearchModel, + conversational_search: searchSettingsConversationalSearchModel, + server_side_search: searchSettingsServerSideSearchModel, + client_side_search: searchSettingsClientSideSearchModel, }; function __updateSkillTest() { @@ -2509,11 +3963,64 @@ describe('AssistantV2', () => { title: 'testString', }; + // SearchSettingsElasticSearch + const searchSettingsElasticSearchModel = { + url: 'testString', + port: 'testString', + username: 'testString', + password: 'testString', + index: 'testString', + filter: ['testString'], + query_body: { anyKey: 'anyValue' }, + managed_index: 'testString', + apikey: 'testString', + }; + + // SearchSettingsConversationalSearchResponseLength + const searchSettingsConversationalSearchResponseLengthModel = { + option: 'moderate', + }; + + // SearchSettingsConversationalSearchSearchConfidence + const searchSettingsConversationalSearchSearchConfidenceModel = { + threshold: 'less_often', + }; + + // SearchSettingsConversationalSearch + const searchSettingsConversationalSearchModel = { + enabled: true, + response_length: searchSettingsConversationalSearchResponseLengthModel, + search_confidence: searchSettingsConversationalSearchSearchConfidenceModel, + }; + + // SearchSettingsServerSideSearch + const searchSettingsServerSideSearchModel = { + url: 'testString', + port: 'testString', + username: 'testString', + password: 'testString', + filter: 'testString', + metadata: { anyKey: 'anyValue' }, + apikey: 'testString', + no_auth: true, + auth_type: 'basic', + }; + + // SearchSettingsClientSideSearch + const searchSettingsClientSideSearchModel = { + filter: 'testString', + metadata: { anyKey: 'anyValue' }, + }; + // SearchSettings const searchSettingsModel = { discovery: searchSettingsDiscoveryModel, messages: searchSettingsMessagesModel, schema_mapping: searchSettingsSchemaMappingModel, + elastic_search: searchSettingsElasticSearchModel, + conversational_search: searchSettingsConversationalSearchModel, + server_side_search: searchSettingsServerSideSearchModel, + client_side_search: searchSettingsClientSideSearchModel, }; // SkillImport diff --git a/test/unit/authorization.test.js b/test/unit/authorization.test.js deleted file mode 100644 index 0b1aaf7088..0000000000 --- a/test/unit/authorization.test.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -const Authorization = require('../../dist/authorization/v1'); -const { BasicAuthenticator, IamAuthenticator } = require('ibm-cloud-sdk-core'); - -describe('authorization', function () { - const url = 'http://ibm.com:80/text-to-speech-beta/api/foo/bar'; - const service = { - url, - authenticator: new BasicAuthenticator({ - username: 'batman', - password: 'bruce-wayne', - }), - }; - - const serviceManagedToken = { - url, - authenticator: new IamAuthenticator({ - apikey: 'abc123', - }), - }; - - // tokens are URL-encoded when recieved from the service - const mockToken = 'token'; - - const authorization = new Authorization(service); - const authorizationIam = new Authorization(serviceManagedToken); - - const createRequestMock = jest.spyOn(authorization, 'createRequest'); - createRequestMock.mockImplementation(params => Promise.resolve(mockToken)); - - function missingParameter(done) { - return function (err) { - expect(err).toBeInstanceOf(Error); - expect(/required parameters/.test(err)).toBe(true); - done(); - }; - } - - function checkToken(done) { - return function (err, res) { - expect(err).toBeNull(); - expect(res).toBe(mockToken); - done(); - }; - } - - describe('getToken()', function () { - it('should check for missing url param', function (done) { - const params = { - noturl: url, - }; - authorization.getToken(params, missingParameter(done)); - }); - - it('should generate a valid token payload', function (done) { - authorization.getToken({ url: 'http://ibm.com/myservice/myresource' }, checkToken(done)); - }); - - it('should default to url from credentials', function (done) { - authorization.getToken(checkToken(done)); - }); - - it('should return an iam access token if given iam_api_key', function (done) { - expect(authorizationIam.tokenManager).not.toBeNull(); - - // mock the token manager request method - const requestMock = jest.spyOn(authorizationIam.authenticator.tokenManager, 'getToken'); - requestMock.mockImplementation(() => Promise.resolve(mockToken)); - - authorizationIam.getToken(checkToken(done)); - }); - }); -}); diff --git a/test/unit/discovery.v1.test.js b/test/unit/discovery.v1.test.js deleted file mode 100644 index 785c7092d7..0000000000 --- a/test/unit/discovery.v1.test.js +++ /dev/null @@ -1,6526 +0,0 @@ -/** - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// need to import the whole package to mock getAuthenticatorFromEnvironment -const sdkCorePackage = require('ibm-cloud-sdk-core'); - -const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage; -const DiscoveryV1 = require('../../dist/discovery/v1'); - -const { - getOptions, - checkUrlAndMethod, - checkMediaHeaders, - expectToBePromise, - checkUserHeader, - checkForSuccessfulExecution, -} = unitTestUtils; - -const discoveryServiceOptions = { - authenticator: new NoAuthAuthenticator(), - url: 'https://api.us-south.discovery.watson.cloud.ibm.com', - version: 'testString', -}; - -const discoveryService = new DiscoveryV1(discoveryServiceOptions); - -let createRequestMock = null; -function mock_createRequest() { - if (!createRequestMock) { - createRequestMock = jest.spyOn(discoveryService, 'createRequest'); - createRequestMock.mockImplementation(() => Promise.resolve()); - } -} - -// dont actually construct an authenticator -const getAuthenticatorMock = jest.spyOn(sdkCorePackage, 'getAuthenticatorFromEnvironment'); -getAuthenticatorMock.mockImplementation(() => new NoAuthAuthenticator()); - -// used for the service construction tests -let requiredGlobals; - -describe('DiscoveryV1', () => { - beforeEach(() => { - mock_createRequest(); - // these are changed when passed into the factory/constructor, so re-init - requiredGlobals = { - version: 'testString', - }; - }); - - afterEach(() => { - if (createRequestMock) { - createRequestMock.mockClear(); - } - getAuthenticatorMock.mockClear(); - }); - - describe('the constructor', () => { - test('use user-given service url', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - serviceUrl: 'custom.com', - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new DiscoveryV1(options); - - expect(testInstance.baseOptions.serviceUrl).toBe('custom.com'); - }); - - test('use default service url', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new DiscoveryV1(options); - - expect(testInstance.baseOptions.serviceUrl).toBe(DiscoveryV1.DEFAULT_SERVICE_URL); - }); - - test('use user-given service name', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - serviceName: 'my-service', - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new DiscoveryV1(options); - - expect(testInstance.baseOptions.serviceName).toBe('my-service'); - }); - - test('use default service name', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new DiscoveryV1(options); - - expect(testInstance.baseOptions.serviceName).toBe(DiscoveryV1.DEFAULT_SERVICE_NAME); - }); - - test('use user-given service authenticator', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new DiscoveryV1(options); - - expect(testInstance.baseOptions.authenticator).toBeInstanceOf(NoAuthAuthenticator); - expect(getAuthenticatorMock).not.toHaveBeenCalled(); - }); - - test('use environment authenticator', () => { - const testInstance = new DiscoveryV1(requiredGlobals); - - expect(testInstance.baseOptions.authenticator).toBeInstanceOf(NoAuthAuthenticator); - expect(getAuthenticatorMock).toHaveBeenCalled(); - }); - }); - - describe('service-level tests', () => { - describe('positive tests', () => { - test('construct service with global params', () => { - const serviceObj = new DiscoveryV1(discoveryServiceOptions); - expect(serviceObj).not.toBeNull(); - expect(serviceObj.version).toEqual(discoveryServiceOptions.version); - }); - }); - }); - - describe('createEnvironment', () => { - describe('positive tests', () => { - function __createEnvironmentTest() { - // Construct the params object for operation createEnvironment - const name = 'testString'; - const description = 'testString'; - const size = 'LT'; - const createEnvironmentParams = { - name, - description, - size, - }; - - const createEnvironmentResult = discoveryService.createEnvironment(createEnvironmentParams); - - // all methods should return a Promise - expectToBePromise(createEnvironmentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.name).toEqual(name); - expect(mockRequestOptions.body.description).toEqual(description); - expect(mockRequestOptions.body.size).toEqual(size); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createEnvironmentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createEnvironmentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createEnvironmentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const name = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createEnvironmentParams = { - name, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createEnvironment(createEnvironmentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createEnvironment({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createEnvironment(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listEnvironments', () => { - describe('positive tests', () => { - function __listEnvironmentsTest() { - // Construct the params object for operation listEnvironments - const name = 'testString'; - const listEnvironmentsParams = { - name, - }; - - const listEnvironmentsResult = discoveryService.listEnvironments(listEnvironmentsParams); - - // all methods should return a Promise - expectToBePromise(listEnvironmentsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.name).toEqual(name); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listEnvironmentsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listEnvironmentsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listEnvironmentsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listEnvironmentsParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listEnvironments(listEnvironmentsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - discoveryService.listEnvironments({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('getEnvironment', () => { - describe('positive tests', () => { - function __getEnvironmentTest() { - // Construct the params object for operation getEnvironment - const environmentId = 'testString'; - const getEnvironmentParams = { - environmentId, - }; - - const getEnvironmentResult = discoveryService.getEnvironment(getEnvironmentParams); - - // all methods should return a Promise - expectToBePromise(getEnvironmentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getEnvironmentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getEnvironmentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getEnvironmentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getEnvironmentParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getEnvironment(getEnvironmentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getEnvironment({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getEnvironment(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('updateEnvironment', () => { - describe('positive tests', () => { - function __updateEnvironmentTest() { - // Construct the params object for operation updateEnvironment - const environmentId = 'testString'; - const name = 'testString'; - const description = 'testString'; - const size = 'S'; - const updateEnvironmentParams = { - environmentId, - name, - description, - size, - }; - - const updateEnvironmentResult = discoveryService.updateEnvironment(updateEnvironmentParams); - - // all methods should return a Promise - expectToBePromise(updateEnvironmentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}', 'PUT'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.name).toEqual(name); - expect(mockRequestOptions.body.description).toEqual(description); - expect(mockRequestOptions.body.size).toEqual(size); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __updateEnvironmentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __updateEnvironmentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __updateEnvironmentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const updateEnvironmentParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.updateEnvironment(updateEnvironmentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.updateEnvironment({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.updateEnvironment(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteEnvironment', () => { - describe('positive tests', () => { - function __deleteEnvironmentTest() { - // Construct the params object for operation deleteEnvironment - const environmentId = 'testString'; - const deleteEnvironmentParams = { - environmentId, - }; - - const deleteEnvironmentResult = discoveryService.deleteEnvironment(deleteEnvironmentParams); - - // all methods should return a Promise - expectToBePromise(deleteEnvironmentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}', 'DELETE'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteEnvironmentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteEnvironmentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteEnvironmentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteEnvironmentParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteEnvironment(deleteEnvironmentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteEnvironment({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteEnvironment(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listFields', () => { - describe('positive tests', () => { - function __listFieldsTest() { - // Construct the params object for operation listFields - const environmentId = 'testString'; - const collectionIds = ['testString']; - const listFieldsParams = { - environmentId, - collectionIds, - }; - - const listFieldsResult = discoveryService.listFields(listFieldsParams); - - // all methods should return a Promise - expectToBePromise(listFieldsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/fields', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.collection_ids).toEqual(collectionIds); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listFieldsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listFieldsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listFieldsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionIds = ['testString']; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listFieldsParams = { - environmentId, - collectionIds, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listFields(listFieldsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listFields({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listFields(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createConfiguration', () => { - describe('positive tests', () => { - // Request models needed by this operation. - - // FontSetting - const fontSettingModel = { - level: 38, - min_size: 38, - max_size: 38, - bold: true, - italic: true, - name: 'testString', - }; - - // PdfHeadingDetection - const pdfHeadingDetectionModel = { - fonts: [fontSettingModel], - }; - - // PdfSettings - const pdfSettingsModel = { - heading: pdfHeadingDetectionModel, - }; - - // WordStyle - const wordStyleModel = { - level: 38, - names: ['testString'], - }; - - // WordHeadingDetection - const wordHeadingDetectionModel = { - fonts: [fontSettingModel], - styles: [wordStyleModel], - }; - - // WordSettings - const wordSettingsModel = { - heading: wordHeadingDetectionModel, - }; - - // XPathPatterns - const xPathPatternsModel = { - xpaths: ['testString'], - }; - - // HtmlSettings - const htmlSettingsModel = { - exclude_tags_completely: ['testString'], - exclude_tags_keep_content: ['testString'], - keep_content: xPathPatternsModel, - exclude_content: xPathPatternsModel, - keep_tag_attributes: ['testString'], - exclude_tag_attributes: ['testString'], - }; - - // SegmentSettings - const segmentSettingsModel = { - enabled: false, - selector_tags: ['h1', 'h2'], - annotated_fields: ['testString'], - }; - - // NormalizationOperation - const normalizationOperationModel = { - operation: 'copy', - source_field: 'testString', - destination_field: 'testString', - }; - - // Conversions - const conversionsModel = { - pdf: pdfSettingsModel, - word: wordSettingsModel, - html: htmlSettingsModel, - segment: segmentSettingsModel, - json_normalizations: [normalizationOperationModel], - image_text_recognition: true, - }; - - // NluEnrichmentKeywords - const nluEnrichmentKeywordsModel = { - sentiment: true, - emotion: true, - limit: 38, - }; - - // NluEnrichmentEntities - const nluEnrichmentEntitiesModel = { - sentiment: true, - emotion: true, - limit: 38, - mentions: true, - mention_types: true, - sentence_locations: true, - model: 'testString', - }; - - // NluEnrichmentSentiment - const nluEnrichmentSentimentModel = { - document: true, - targets: ['testString'], - }; - - // NluEnrichmentEmotion - const nluEnrichmentEmotionModel = { - document: true, - targets: ['testString'], - }; - - // NluEnrichmentSemanticRoles - const nluEnrichmentSemanticRolesModel = { - entities: true, - keywords: true, - limit: 38, - }; - - // NluEnrichmentRelations - const nluEnrichmentRelationsModel = { - model: 'testString', - }; - - // NluEnrichmentConcepts - const nluEnrichmentConceptsModel = { - limit: 38, - }; - - // NluEnrichmentFeatures - const nluEnrichmentFeaturesModel = { - keywords: nluEnrichmentKeywordsModel, - entities: nluEnrichmentEntitiesModel, - sentiment: nluEnrichmentSentimentModel, - emotion: nluEnrichmentEmotionModel, - categories: { anyKey: 'anyValue' }, - semantic_roles: nluEnrichmentSemanticRolesModel, - relations: nluEnrichmentRelationsModel, - concepts: nluEnrichmentConceptsModel, - }; - - // EnrichmentOptions - const enrichmentOptionsModel = { - features: nluEnrichmentFeaturesModel, - language: 'ar', - model: 'testString', - }; - - // Enrichment - const enrichmentModel = { - description: 'testString', - destination_field: 'testString', - source_field: 'testString', - overwrite: false, - enrichment: 'testString', - ignore_downstream_errors: false, - options: enrichmentOptionsModel, - }; - - // SourceSchedule - const sourceScheduleModel = { - enabled: true, - time_zone: 'America/New_York', - frequency: 'daily', - }; - - // SourceOptionsFolder - const sourceOptionsFolderModel = { - owner_user_id: 'testString', - folder_id: 'testString', - limit: 38, - }; - - // SourceOptionsObject - const sourceOptionsObjectModel = { - name: 'testString', - limit: 38, - }; - - // SourceOptionsSiteColl - const sourceOptionsSiteCollModel = { - site_collection_path: 'testString', - limit: 38, - }; - - // SourceOptionsWebCrawl - const sourceOptionsWebCrawlModel = { - url: 'testString', - limit_to_starting_hosts: true, - crawl_speed: 'normal', - allow_untrusted_certificate: false, - maximum_hops: 2, - request_timeout: 30000, - override_robots_txt: false, - blacklist: ['testString'], - }; - - // SourceOptionsBuckets - const sourceOptionsBucketsModel = { - name: 'testString', - limit: 38, - }; - - // SourceOptions - const sourceOptionsModel = { - folders: [sourceOptionsFolderModel], - objects: [sourceOptionsObjectModel], - site_collections: [sourceOptionsSiteCollModel], - urls: [sourceOptionsWebCrawlModel], - buckets: [sourceOptionsBucketsModel], - crawl_all_buckets: true, - }; - - // Source - const sourceModel = { - type: 'box', - credential_id: 'testString', - schedule: sourceScheduleModel, - options: sourceOptionsModel, - }; - - function __createConfigurationTest() { - // Construct the params object for operation createConfiguration - const environmentId = 'testString'; - const name = 'testString'; - const description = 'testString'; - const conversions = conversionsModel; - const enrichments = [enrichmentModel]; - const normalizations = [normalizationOperationModel]; - const source = sourceModel; - const createConfigurationParams = { - environmentId, - name, - description, - conversions, - enrichments, - normalizations, - source, - }; - - const createConfigurationResult = discoveryService.createConfiguration(createConfigurationParams); - - // all methods should return a Promise - expectToBePromise(createConfigurationResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/configurations', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.name).toEqual(name); - expect(mockRequestOptions.body.description).toEqual(description); - expect(mockRequestOptions.body.conversions).toEqual(conversions); - expect(mockRequestOptions.body.enrichments).toEqual(enrichments); - expect(mockRequestOptions.body.normalizations).toEqual(normalizations); - expect(mockRequestOptions.body.source).toEqual(source); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createConfigurationTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createConfigurationTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createConfigurationTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const name = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createConfigurationParams = { - environmentId, - name, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createConfiguration(createConfigurationParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createConfiguration({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createConfiguration(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listConfigurations', () => { - describe('positive tests', () => { - function __listConfigurationsTest() { - // Construct the params object for operation listConfigurations - const environmentId = 'testString'; - const name = 'testString'; - const listConfigurationsParams = { - environmentId, - name, - }; - - const listConfigurationsResult = discoveryService.listConfigurations(listConfigurationsParams); - - // all methods should return a Promise - expectToBePromise(listConfigurationsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/configurations', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.name).toEqual(name); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listConfigurationsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listConfigurationsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listConfigurationsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listConfigurationsParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listConfigurations(listConfigurationsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listConfigurations({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listConfigurations(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getConfiguration', () => { - describe('positive tests', () => { - function __getConfigurationTest() { - // Construct the params object for operation getConfiguration - const environmentId = 'testString'; - const configurationId = 'testString'; - const getConfigurationParams = { - environmentId, - configurationId, - }; - - const getConfigurationResult = discoveryService.getConfiguration(getConfigurationParams); - - // all methods should return a Promise - expectToBePromise(getConfigurationResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/configurations/{configuration_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.configuration_id).toEqual(configurationId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getConfigurationTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getConfigurationTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getConfigurationTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const configurationId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getConfigurationParams = { - environmentId, - configurationId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getConfiguration(getConfigurationParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getConfiguration({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getConfiguration(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('updateConfiguration', () => { - describe('positive tests', () => { - // Request models needed by this operation. - - // FontSetting - const fontSettingModel = { - level: 38, - min_size: 38, - max_size: 38, - bold: true, - italic: true, - name: 'testString', - }; - - // PdfHeadingDetection - const pdfHeadingDetectionModel = { - fonts: [fontSettingModel], - }; - - // PdfSettings - const pdfSettingsModel = { - heading: pdfHeadingDetectionModel, - }; - - // WordStyle - const wordStyleModel = { - level: 38, - names: ['testString'], - }; - - // WordHeadingDetection - const wordHeadingDetectionModel = { - fonts: [fontSettingModel], - styles: [wordStyleModel], - }; - - // WordSettings - const wordSettingsModel = { - heading: wordHeadingDetectionModel, - }; - - // XPathPatterns - const xPathPatternsModel = { - xpaths: ['testString'], - }; - - // HtmlSettings - const htmlSettingsModel = { - exclude_tags_completely: ['testString'], - exclude_tags_keep_content: ['testString'], - keep_content: xPathPatternsModel, - exclude_content: xPathPatternsModel, - keep_tag_attributes: ['testString'], - exclude_tag_attributes: ['testString'], - }; - - // SegmentSettings - const segmentSettingsModel = { - enabled: false, - selector_tags: ['h1', 'h2'], - annotated_fields: ['testString'], - }; - - // NormalizationOperation - const normalizationOperationModel = { - operation: 'copy', - source_field: 'testString', - destination_field: 'testString', - }; - - // Conversions - const conversionsModel = { - pdf: pdfSettingsModel, - word: wordSettingsModel, - html: htmlSettingsModel, - segment: segmentSettingsModel, - json_normalizations: [normalizationOperationModel], - image_text_recognition: true, - }; - - // NluEnrichmentKeywords - const nluEnrichmentKeywordsModel = { - sentiment: true, - emotion: true, - limit: 38, - }; - - // NluEnrichmentEntities - const nluEnrichmentEntitiesModel = { - sentiment: true, - emotion: true, - limit: 38, - mentions: true, - mention_types: true, - sentence_locations: true, - model: 'testString', - }; - - // NluEnrichmentSentiment - const nluEnrichmentSentimentModel = { - document: true, - targets: ['testString'], - }; - - // NluEnrichmentEmotion - const nluEnrichmentEmotionModel = { - document: true, - targets: ['testString'], - }; - - // NluEnrichmentSemanticRoles - const nluEnrichmentSemanticRolesModel = { - entities: true, - keywords: true, - limit: 38, - }; - - // NluEnrichmentRelations - const nluEnrichmentRelationsModel = { - model: 'testString', - }; - - // NluEnrichmentConcepts - const nluEnrichmentConceptsModel = { - limit: 38, - }; - - // NluEnrichmentFeatures - const nluEnrichmentFeaturesModel = { - keywords: nluEnrichmentKeywordsModel, - entities: nluEnrichmentEntitiesModel, - sentiment: nluEnrichmentSentimentModel, - emotion: nluEnrichmentEmotionModel, - categories: { anyKey: 'anyValue' }, - semantic_roles: nluEnrichmentSemanticRolesModel, - relations: nluEnrichmentRelationsModel, - concepts: nluEnrichmentConceptsModel, - }; - - // EnrichmentOptions - const enrichmentOptionsModel = { - features: nluEnrichmentFeaturesModel, - language: 'ar', - model: 'testString', - }; - - // Enrichment - const enrichmentModel = { - description: 'testString', - destination_field: 'testString', - source_field: 'testString', - overwrite: false, - enrichment: 'testString', - ignore_downstream_errors: false, - options: enrichmentOptionsModel, - }; - - // SourceSchedule - const sourceScheduleModel = { - enabled: true, - time_zone: 'America/New_York', - frequency: 'daily', - }; - - // SourceOptionsFolder - const sourceOptionsFolderModel = { - owner_user_id: 'testString', - folder_id: 'testString', - limit: 38, - }; - - // SourceOptionsObject - const sourceOptionsObjectModel = { - name: 'testString', - limit: 38, - }; - - // SourceOptionsSiteColl - const sourceOptionsSiteCollModel = { - site_collection_path: 'testString', - limit: 38, - }; - - // SourceOptionsWebCrawl - const sourceOptionsWebCrawlModel = { - url: 'testString', - limit_to_starting_hosts: true, - crawl_speed: 'normal', - allow_untrusted_certificate: false, - maximum_hops: 2, - request_timeout: 30000, - override_robots_txt: false, - blacklist: ['testString'], - }; - - // SourceOptionsBuckets - const sourceOptionsBucketsModel = { - name: 'testString', - limit: 38, - }; - - // SourceOptions - const sourceOptionsModel = { - folders: [sourceOptionsFolderModel], - objects: [sourceOptionsObjectModel], - site_collections: [sourceOptionsSiteCollModel], - urls: [sourceOptionsWebCrawlModel], - buckets: [sourceOptionsBucketsModel], - crawl_all_buckets: true, - }; - - // Source - const sourceModel = { - type: 'box', - credential_id: 'testString', - schedule: sourceScheduleModel, - options: sourceOptionsModel, - }; - - function __updateConfigurationTest() { - // Construct the params object for operation updateConfiguration - const environmentId = 'testString'; - const configurationId = 'testString'; - const name = 'testString'; - const description = 'testString'; - const conversions = conversionsModel; - const enrichments = [enrichmentModel]; - const normalizations = [normalizationOperationModel]; - const source = sourceModel; - const updateConfigurationParams = { - environmentId, - configurationId, - name, - description, - conversions, - enrichments, - normalizations, - source, - }; - - const updateConfigurationResult = discoveryService.updateConfiguration(updateConfigurationParams); - - // all methods should return a Promise - expectToBePromise(updateConfigurationResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/configurations/{configuration_id}', 'PUT'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.name).toEqual(name); - expect(mockRequestOptions.body.description).toEqual(description); - expect(mockRequestOptions.body.conversions).toEqual(conversions); - expect(mockRequestOptions.body.enrichments).toEqual(enrichments); - expect(mockRequestOptions.body.normalizations).toEqual(normalizations); - expect(mockRequestOptions.body.source).toEqual(source); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.configuration_id).toEqual(configurationId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __updateConfigurationTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __updateConfigurationTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __updateConfigurationTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const configurationId = 'testString'; - const name = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const updateConfigurationParams = { - environmentId, - configurationId, - name, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.updateConfiguration(updateConfigurationParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.updateConfiguration({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.updateConfiguration(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteConfiguration', () => { - describe('positive tests', () => { - function __deleteConfigurationTest() { - // Construct the params object for operation deleteConfiguration - const environmentId = 'testString'; - const configurationId = 'testString'; - const deleteConfigurationParams = { - environmentId, - configurationId, - }; - - const deleteConfigurationResult = discoveryService.deleteConfiguration(deleteConfigurationParams); - - // all methods should return a Promise - expectToBePromise(deleteConfigurationResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/configurations/{configuration_id}', 'DELETE'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.configuration_id).toEqual(configurationId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteConfigurationTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteConfigurationTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteConfigurationTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const configurationId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteConfigurationParams = { - environmentId, - configurationId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteConfiguration(deleteConfigurationParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteConfiguration({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteConfiguration(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createCollection', () => { - describe('positive tests', () => { - function __createCollectionTest() { - // Construct the params object for operation createCollection - const environmentId = 'testString'; - const name = 'testString'; - const description = 'testString'; - const configurationId = 'testString'; - const language = 'en'; - const createCollectionParams = { - environmentId, - name, - description, - configurationId, - language, - }; - - const createCollectionResult = discoveryService.createCollection(createCollectionParams); - - // all methods should return a Promise - expectToBePromise(createCollectionResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.name).toEqual(name); - expect(mockRequestOptions.body.description).toEqual(description); - expect(mockRequestOptions.body.configuration_id).toEqual(configurationId); - expect(mockRequestOptions.body.language).toEqual(language); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createCollectionTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createCollectionTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createCollectionTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const name = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createCollectionParams = { - environmentId, - name, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createCollection(createCollectionParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createCollection({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createCollection(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listCollections', () => { - describe('positive tests', () => { - function __listCollectionsTest() { - // Construct the params object for operation listCollections - const environmentId = 'testString'; - const name = 'testString'; - const listCollectionsParams = { - environmentId, - name, - }; - - const listCollectionsResult = discoveryService.listCollections(listCollectionsParams); - - // all methods should return a Promise - expectToBePromise(listCollectionsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.name).toEqual(name); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listCollectionsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listCollectionsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listCollectionsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listCollectionsParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listCollections(listCollectionsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listCollections({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listCollections(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getCollection', () => { - describe('positive tests', () => { - function __getCollectionTest() { - // Construct the params object for operation getCollection - const environmentId = 'testString'; - const collectionId = 'testString'; - const getCollectionParams = { - environmentId, - collectionId, - }; - - const getCollectionResult = discoveryService.getCollection(getCollectionParams); - - // all methods should return a Promise - expectToBePromise(getCollectionResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getCollectionTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getCollectionTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getCollectionTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getCollectionParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getCollection(getCollectionParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getCollection({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getCollection(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('updateCollection', () => { - describe('positive tests', () => { - function __updateCollectionTest() { - // Construct the params object for operation updateCollection - const environmentId = 'testString'; - const collectionId = 'testString'; - const name = 'testString'; - const description = 'testString'; - const configurationId = 'testString'; - const updateCollectionParams = { - environmentId, - collectionId, - name, - description, - configurationId, - }; - - const updateCollectionResult = discoveryService.updateCollection(updateCollectionParams); - - // all methods should return a Promise - expectToBePromise(updateCollectionResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}', 'PUT'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.name).toEqual(name); - expect(mockRequestOptions.body.description).toEqual(description); - expect(mockRequestOptions.body.configuration_id).toEqual(configurationId); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __updateCollectionTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __updateCollectionTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __updateCollectionTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const name = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const updateCollectionParams = { - environmentId, - collectionId, - name, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.updateCollection(updateCollectionParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.updateCollection({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.updateCollection(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteCollection', () => { - describe('positive tests', () => { - function __deleteCollectionTest() { - // Construct the params object for operation deleteCollection - const environmentId = 'testString'; - const collectionId = 'testString'; - const deleteCollectionParams = { - environmentId, - collectionId, - }; - - const deleteCollectionResult = discoveryService.deleteCollection(deleteCollectionParams); - - // all methods should return a Promise - expectToBePromise(deleteCollectionResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}', 'DELETE'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteCollectionTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteCollectionTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteCollectionTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteCollectionParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteCollection(deleteCollectionParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteCollection({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteCollection(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listCollectionFields', () => { - describe('positive tests', () => { - function __listCollectionFieldsTest() { - // Construct the params object for operation listCollectionFields - const environmentId = 'testString'; - const collectionId = 'testString'; - const listCollectionFieldsParams = { - environmentId, - collectionId, - }; - - const listCollectionFieldsResult = discoveryService.listCollectionFields(listCollectionFieldsParams); - - // all methods should return a Promise - expectToBePromise(listCollectionFieldsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/fields', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listCollectionFieldsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listCollectionFieldsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listCollectionFieldsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listCollectionFieldsParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listCollectionFields(listCollectionFieldsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listCollectionFields({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listCollectionFields(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listExpansions', () => { - describe('positive tests', () => { - function __listExpansionsTest() { - // Construct the params object for operation listExpansions - const environmentId = 'testString'; - const collectionId = 'testString'; - const listExpansionsParams = { - environmentId, - collectionId, - }; - - const listExpansionsResult = discoveryService.listExpansions(listExpansionsParams); - - // all methods should return a Promise - expectToBePromise(listExpansionsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/expansions', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listExpansionsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listExpansionsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listExpansionsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listExpansionsParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listExpansions(listExpansionsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listExpansions({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listExpansions(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createExpansions', () => { - describe('positive tests', () => { - // Request models needed by this operation. - - // Expansion - const expansionModel = { - input_terms: ['testString'], - expanded_terms: ['testString'], - }; - - function __createExpansionsTest() { - // Construct the params object for operation createExpansions - const environmentId = 'testString'; - const collectionId = 'testString'; - const expansions = [expansionModel]; - const createExpansionsParams = { - environmentId, - collectionId, - expansions, - }; - - const createExpansionsResult = discoveryService.createExpansions(createExpansionsParams); - - // all methods should return a Promise - expectToBePromise(createExpansionsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/expansions', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.expansions).toEqual(expansions); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createExpansionsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createExpansionsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createExpansionsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const expansions = [expansionModel]; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createExpansionsParams = { - environmentId, - collectionId, - expansions, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createExpansions(createExpansionsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createExpansions({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createExpansions(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteExpansions', () => { - describe('positive tests', () => { - function __deleteExpansionsTest() { - // Construct the params object for operation deleteExpansions - const environmentId = 'testString'; - const collectionId = 'testString'; - const deleteExpansionsParams = { - environmentId, - collectionId, - }; - - const deleteExpansionsResult = discoveryService.deleteExpansions(deleteExpansionsParams); - - // all methods should return a Promise - expectToBePromise(deleteExpansionsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/expansions', 'DELETE'); - const expectedAccept = undefined; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteExpansionsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteExpansionsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteExpansionsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteExpansionsParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteExpansions(deleteExpansionsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteExpansions({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteExpansions(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getTokenizationDictionaryStatus', () => { - describe('positive tests', () => { - function __getTokenizationDictionaryStatusTest() { - // Construct the params object for operation getTokenizationDictionaryStatus - const environmentId = 'testString'; - const collectionId = 'testString'; - const getTokenizationDictionaryStatusParams = { - environmentId, - collectionId, - }; - - const getTokenizationDictionaryStatusResult = discoveryService.getTokenizationDictionaryStatus(getTokenizationDictionaryStatusParams); - - // all methods should return a Promise - expectToBePromise(getTokenizationDictionaryStatusResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getTokenizationDictionaryStatusTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getTokenizationDictionaryStatusTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getTokenizationDictionaryStatusTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getTokenizationDictionaryStatusParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getTokenizationDictionaryStatus(getTokenizationDictionaryStatusParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getTokenizationDictionaryStatus({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getTokenizationDictionaryStatus(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createTokenizationDictionary', () => { - describe('positive tests', () => { - // Request models needed by this operation. - - // TokenDictRule - const tokenDictRuleModel = { - text: 'testString', - tokens: ['testString'], - readings: ['testString'], - part_of_speech: 'testString', - }; - - function __createTokenizationDictionaryTest() { - // Construct the params object for operation createTokenizationDictionary - const environmentId = 'testString'; - const collectionId = 'testString'; - const tokenizationRules = [tokenDictRuleModel]; - const createTokenizationDictionaryParams = { - environmentId, - collectionId, - tokenizationRules, - }; - - const createTokenizationDictionaryResult = discoveryService.createTokenizationDictionary(createTokenizationDictionaryParams); - - // all methods should return a Promise - expectToBePromise(createTokenizationDictionaryResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.tokenization_rules).toEqual(tokenizationRules); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createTokenizationDictionaryTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createTokenizationDictionaryTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createTokenizationDictionaryTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createTokenizationDictionaryParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createTokenizationDictionary(createTokenizationDictionaryParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createTokenizationDictionary({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createTokenizationDictionary(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteTokenizationDictionary', () => { - describe('positive tests', () => { - function __deleteTokenizationDictionaryTest() { - // Construct the params object for operation deleteTokenizationDictionary - const environmentId = 'testString'; - const collectionId = 'testString'; - const deleteTokenizationDictionaryParams = { - environmentId, - collectionId, - }; - - const deleteTokenizationDictionaryResult = discoveryService.deleteTokenizationDictionary(deleteTokenizationDictionaryParams); - - // all methods should return a Promise - expectToBePromise(deleteTokenizationDictionaryResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary', 'DELETE'); - const expectedAccept = undefined; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteTokenizationDictionaryTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteTokenizationDictionaryTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteTokenizationDictionaryTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteTokenizationDictionaryParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteTokenizationDictionary(deleteTokenizationDictionaryParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteTokenizationDictionary({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteTokenizationDictionary(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getStopwordListStatus', () => { - describe('positive tests', () => { - function __getStopwordListStatusTest() { - // Construct the params object for operation getStopwordListStatus - const environmentId = 'testString'; - const collectionId = 'testString'; - const getStopwordListStatusParams = { - environmentId, - collectionId, - }; - - const getStopwordListStatusResult = discoveryService.getStopwordListStatus(getStopwordListStatusParams); - - // all methods should return a Promise - expectToBePromise(getStopwordListStatusResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getStopwordListStatusTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getStopwordListStatusTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getStopwordListStatusTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getStopwordListStatusParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getStopwordListStatus(getStopwordListStatusParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getStopwordListStatus({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getStopwordListStatus(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createStopwordList', () => { - describe('positive tests', () => { - function __createStopwordListTest() { - // Construct the params object for operation createStopwordList - const environmentId = 'testString'; - const collectionId = 'testString'; - const stopwordFile = Buffer.from('This is a mock file.'); - const stopwordFilename = 'testString'; - const createStopwordListParams = { - environmentId, - collectionId, - stopwordFile, - stopwordFilename, - }; - - const createStopwordListResult = discoveryService.createStopwordList(createStopwordListParams); - - // all methods should return a Promise - expectToBePromise(createStopwordListResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'multipart/form-data'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.formData.stopword_file.data).toEqual(stopwordFile); - expect(mockRequestOptions.formData.stopword_file.filename).toEqual(stopwordFilename); - expect(mockRequestOptions.formData.stopword_file.contentType).toEqual('application/octet-stream'); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createStopwordListTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createStopwordListTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createStopwordListTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const stopwordFile = Buffer.from('This is a mock file.'); - const stopwordFilename = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createStopwordListParams = { - environmentId, - collectionId, - stopwordFile, - stopwordFilename, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createStopwordList(createStopwordListParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createStopwordList({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createStopwordList(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteStopwordList', () => { - describe('positive tests', () => { - function __deleteStopwordListTest() { - // Construct the params object for operation deleteStopwordList - const environmentId = 'testString'; - const collectionId = 'testString'; - const deleteStopwordListParams = { - environmentId, - collectionId, - }; - - const deleteStopwordListResult = discoveryService.deleteStopwordList(deleteStopwordListParams); - - // all methods should return a Promise - expectToBePromise(deleteStopwordListResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords', 'DELETE'); - const expectedAccept = undefined; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteStopwordListTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteStopwordListTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteStopwordListTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteStopwordListParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteStopwordList(deleteStopwordListParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteStopwordList({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteStopwordList(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('addDocument', () => { - describe('positive tests', () => { - function __addDocumentTest() { - // Construct the params object for operation addDocument - const environmentId = 'testString'; - const collectionId = 'testString'; - const file = Buffer.from('This is a mock file.'); - const filename = 'testString'; - const fileContentType = 'application/json'; - const metadata = 'testString'; - const addDocumentParams = { - environmentId, - collectionId, - file, - filename, - fileContentType, - metadata, - }; - - const addDocumentResult = discoveryService.addDocument(addDocumentParams); - - // all methods should return a Promise - expectToBePromise(addDocumentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/documents', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'multipart/form-data'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.formData.file.data).toEqual(file); - expect(mockRequestOptions.formData.file.filename).toEqual(filename); - expect(mockRequestOptions.formData.file.contentType).toEqual(fileContentType); - expect(mockRequestOptions.formData.metadata).toEqual(metadata); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __addDocumentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __addDocumentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __addDocumentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const addDocumentParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.addDocument(addDocumentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.addDocument({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.addDocument(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getDocumentStatus', () => { - describe('positive tests', () => { - function __getDocumentStatusTest() { - // Construct the params object for operation getDocumentStatus - const environmentId = 'testString'; - const collectionId = 'testString'; - const documentId = 'testString'; - const getDocumentStatusParams = { - environmentId, - collectionId, - documentId, - }; - - const getDocumentStatusResult = discoveryService.getDocumentStatus(getDocumentStatusParams); - - // all methods should return a Promise - expectToBePromise(getDocumentStatusResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.document_id).toEqual(documentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getDocumentStatusTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getDocumentStatusTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getDocumentStatusTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const documentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getDocumentStatusParams = { - environmentId, - collectionId, - documentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getDocumentStatus(getDocumentStatusParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getDocumentStatus({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getDocumentStatus(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('updateDocument', () => { - describe('positive tests', () => { - function __updateDocumentTest() { - // Construct the params object for operation updateDocument - const environmentId = 'testString'; - const collectionId = 'testString'; - const documentId = 'testString'; - const file = Buffer.from('This is a mock file.'); - const filename = 'testString'; - const fileContentType = 'application/json'; - const metadata = 'testString'; - const updateDocumentParams = { - environmentId, - collectionId, - documentId, - file, - filename, - fileContentType, - metadata, - }; - - const updateDocumentResult = discoveryService.updateDocument(updateDocumentParams); - - // all methods should return a Promise - expectToBePromise(updateDocumentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'multipart/form-data'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.formData.file.data).toEqual(file); - expect(mockRequestOptions.formData.file.filename).toEqual(filename); - expect(mockRequestOptions.formData.file.contentType).toEqual(fileContentType); - expect(mockRequestOptions.formData.metadata).toEqual(metadata); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.document_id).toEqual(documentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __updateDocumentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __updateDocumentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __updateDocumentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const documentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const updateDocumentParams = { - environmentId, - collectionId, - documentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.updateDocument(updateDocumentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.updateDocument({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.updateDocument(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteDocument', () => { - describe('positive tests', () => { - function __deleteDocumentTest() { - // Construct the params object for operation deleteDocument - const environmentId = 'testString'; - const collectionId = 'testString'; - const documentId = 'testString'; - const deleteDocumentParams = { - environmentId, - collectionId, - documentId, - }; - - const deleteDocumentResult = discoveryService.deleteDocument(deleteDocumentParams); - - // all methods should return a Promise - expectToBePromise(deleteDocumentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}', 'DELETE'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.document_id).toEqual(documentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteDocumentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteDocumentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteDocumentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const documentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteDocumentParams = { - environmentId, - collectionId, - documentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteDocument(deleteDocumentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteDocument({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteDocument(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('query', () => { - describe('positive tests', () => { - function __queryTest() { - // Construct the params object for operation query - const environmentId = 'testString'; - const collectionId = 'testString'; - const filter = 'testString'; - const query = 'testString'; - const naturalLanguageQuery = 'testString'; - const passages = true; - const aggregation = 'testString'; - const count = 10; - const _return = 'testString'; - const offset = 38; - const sort = 'testString'; - const highlight = false; - const passagesFields = 'testString'; - const passagesCount = 10; - const passagesCharacters = 400; - const deduplicate = false; - const deduplicateField = 'testString'; - const similar = false; - const similarDocumentIds = 'testString'; - const similarFields = 'testString'; - const bias = 'testString'; - const spellingSuggestions = false; - const xWatsonLoggingOptOut = false; - const queryParams = { - environmentId, - collectionId, - filter, - query, - naturalLanguageQuery, - passages, - aggregation, - count, - _return, - offset, - sort, - highlight, - passagesFields, - passagesCount, - passagesCharacters, - deduplicate, - deduplicateField, - similar, - similarDocumentIds, - similarFields, - bias, - spellingSuggestions, - xWatsonLoggingOptOut, - }; - - const queryResult = discoveryService.query(queryParams); - - // all methods should return a Promise - expectToBePromise(queryResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/query', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - checkUserHeader(createRequestMock, 'X-Watson-Logging-Opt-Out', xWatsonLoggingOptOut); - expect(mockRequestOptions.body.filter).toEqual(filter); - expect(mockRequestOptions.body.query).toEqual(query); - expect(mockRequestOptions.body.natural_language_query).toEqual(naturalLanguageQuery); - expect(mockRequestOptions.body.passages).toEqual(passages); - expect(mockRequestOptions.body.aggregation).toEqual(aggregation); - expect(mockRequestOptions.body.count).toEqual(count); - expect(mockRequestOptions.body.return).toEqual(_return); - expect(mockRequestOptions.body.offset).toEqual(offset); - expect(mockRequestOptions.body.sort).toEqual(sort); - expect(mockRequestOptions.body.highlight).toEqual(highlight); - expect(mockRequestOptions.body['passages.fields']).toEqual(passagesFields); - expect(mockRequestOptions.body['passages.count']).toEqual(passagesCount); - expect(mockRequestOptions.body['passages.characters']).toEqual(passagesCharacters); - expect(mockRequestOptions.body.deduplicate).toEqual(deduplicate); - expect(mockRequestOptions.body['deduplicate.field']).toEqual(deduplicateField); - expect(mockRequestOptions.body.similar).toEqual(similar); - expect(mockRequestOptions.body['similar.document_ids']).toEqual(similarDocumentIds); - expect(mockRequestOptions.body['similar.fields']).toEqual(similarFields); - expect(mockRequestOptions.body.bias).toEqual(bias); - expect(mockRequestOptions.body.spelling_suggestions).toEqual(spellingSuggestions); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __queryTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __queryTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __queryTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const queryParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.query(queryParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.query({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.query(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('queryNotices', () => { - describe('positive tests', () => { - function __queryNoticesTest() { - // Construct the params object for operation queryNotices - const environmentId = 'testString'; - const collectionId = 'testString'; - const filter = 'testString'; - const query = 'testString'; - const naturalLanguageQuery = 'testString'; - const passages = true; - const aggregation = 'testString'; - const count = 10; - const _return = ['testString']; - const offset = 38; - const sort = ['testString']; - const highlight = false; - const passagesFields = ['testString']; - const passagesCount = 10; - const passagesCharacters = 400; - const deduplicateField = 'testString'; - const similar = false; - const similarDocumentIds = ['testString']; - const similarFields = ['testString']; - const queryNoticesParams = { - environmentId, - collectionId, - filter, - query, - naturalLanguageQuery, - passages, - aggregation, - count, - _return, - offset, - sort, - highlight, - passagesFields, - passagesCount, - passagesCharacters, - deduplicateField, - similar, - similarDocumentIds, - similarFields, - }; - - const queryNoticesResult = discoveryService.queryNotices(queryNoticesParams); - - // all methods should return a Promise - expectToBePromise(queryNoticesResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/notices', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.filter).toEqual(filter); - expect(mockRequestOptions.qs.query).toEqual(query); - expect(mockRequestOptions.qs.natural_language_query).toEqual(naturalLanguageQuery); - expect(mockRequestOptions.qs.passages).toEqual(passages); - expect(mockRequestOptions.qs.aggregation).toEqual(aggregation); - expect(mockRequestOptions.qs.count).toEqual(count); - expect(mockRequestOptions.qs.return).toEqual(_return); - expect(mockRequestOptions.qs.offset).toEqual(offset); - expect(mockRequestOptions.qs.sort).toEqual(sort); - expect(mockRequestOptions.qs.highlight).toEqual(highlight); - expect(mockRequestOptions.qs['passages.fields']).toEqual(passagesFields); - expect(mockRequestOptions.qs['passages.count']).toEqual(passagesCount); - expect(mockRequestOptions.qs['passages.characters']).toEqual(passagesCharacters); - expect(mockRequestOptions.qs['deduplicate.field']).toEqual(deduplicateField); - expect(mockRequestOptions.qs.similar).toEqual(similar); - expect(mockRequestOptions.qs['similar.document_ids']).toEqual(similarDocumentIds); - expect(mockRequestOptions.qs['similar.fields']).toEqual(similarFields); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __queryNoticesTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __queryNoticesTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __queryNoticesTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const queryNoticesParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.queryNotices(queryNoticesParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.queryNotices({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.queryNotices(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('federatedQuery', () => { - describe('positive tests', () => { - function __federatedQueryTest() { - // Construct the params object for operation federatedQuery - const environmentId = 'testString'; - const collectionIds = 'testString'; - const filter = 'testString'; - const query = 'testString'; - const naturalLanguageQuery = 'testString'; - const passages = true; - const aggregation = 'testString'; - const count = 10; - const _return = 'testString'; - const offset = 38; - const sort = 'testString'; - const highlight = false; - const passagesFields = 'testString'; - const passagesCount = 10; - const passagesCharacters = 400; - const deduplicate = false; - const deduplicateField = 'testString'; - const similar = false; - const similarDocumentIds = 'testString'; - const similarFields = 'testString'; - const bias = 'testString'; - const xWatsonLoggingOptOut = false; - const federatedQueryParams = { - environmentId, - collectionIds, - filter, - query, - naturalLanguageQuery, - passages, - aggregation, - count, - _return, - offset, - sort, - highlight, - passagesFields, - passagesCount, - passagesCharacters, - deduplicate, - deduplicateField, - similar, - similarDocumentIds, - similarFields, - bias, - xWatsonLoggingOptOut, - }; - - const federatedQueryResult = discoveryService.federatedQuery(federatedQueryParams); - - // all methods should return a Promise - expectToBePromise(federatedQueryResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/query', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - checkUserHeader(createRequestMock, 'X-Watson-Logging-Opt-Out', xWatsonLoggingOptOut); - expect(mockRequestOptions.body.collection_ids).toEqual(collectionIds); - expect(mockRequestOptions.body.filter).toEqual(filter); - expect(mockRequestOptions.body.query).toEqual(query); - expect(mockRequestOptions.body.natural_language_query).toEqual(naturalLanguageQuery); - expect(mockRequestOptions.body.passages).toEqual(passages); - expect(mockRequestOptions.body.aggregation).toEqual(aggregation); - expect(mockRequestOptions.body.count).toEqual(count); - expect(mockRequestOptions.body.return).toEqual(_return); - expect(mockRequestOptions.body.offset).toEqual(offset); - expect(mockRequestOptions.body.sort).toEqual(sort); - expect(mockRequestOptions.body.highlight).toEqual(highlight); - expect(mockRequestOptions.body['passages.fields']).toEqual(passagesFields); - expect(mockRequestOptions.body['passages.count']).toEqual(passagesCount); - expect(mockRequestOptions.body['passages.characters']).toEqual(passagesCharacters); - expect(mockRequestOptions.body.deduplicate).toEqual(deduplicate); - expect(mockRequestOptions.body['deduplicate.field']).toEqual(deduplicateField); - expect(mockRequestOptions.body.similar).toEqual(similar); - expect(mockRequestOptions.body['similar.document_ids']).toEqual(similarDocumentIds); - expect(mockRequestOptions.body['similar.fields']).toEqual(similarFields); - expect(mockRequestOptions.body.bias).toEqual(bias); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __federatedQueryTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __federatedQueryTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __federatedQueryTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionIds = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const federatedQueryParams = { - environmentId, - collectionIds, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.federatedQuery(federatedQueryParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.federatedQuery({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.federatedQuery(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('federatedQueryNotices', () => { - describe('positive tests', () => { - function __federatedQueryNoticesTest() { - // Construct the params object for operation federatedQueryNotices - const environmentId = 'testString'; - const collectionIds = ['testString']; - const filter = 'testString'; - const query = 'testString'; - const naturalLanguageQuery = 'testString'; - const aggregation = 'testString'; - const count = 10; - const _return = ['testString']; - const offset = 38; - const sort = ['testString']; - const highlight = false; - const deduplicateField = 'testString'; - const similar = false; - const similarDocumentIds = ['testString']; - const similarFields = ['testString']; - const federatedQueryNoticesParams = { - environmentId, - collectionIds, - filter, - query, - naturalLanguageQuery, - aggregation, - count, - _return, - offset, - sort, - highlight, - deduplicateField, - similar, - similarDocumentIds, - similarFields, - }; - - const federatedQueryNoticesResult = discoveryService.federatedQueryNotices(federatedQueryNoticesParams); - - // all methods should return a Promise - expectToBePromise(federatedQueryNoticesResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/notices', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.collection_ids).toEqual(collectionIds); - expect(mockRequestOptions.qs.filter).toEqual(filter); - expect(mockRequestOptions.qs.query).toEqual(query); - expect(mockRequestOptions.qs.natural_language_query).toEqual(naturalLanguageQuery); - expect(mockRequestOptions.qs.aggregation).toEqual(aggregation); - expect(mockRequestOptions.qs.count).toEqual(count); - expect(mockRequestOptions.qs.return).toEqual(_return); - expect(mockRequestOptions.qs.offset).toEqual(offset); - expect(mockRequestOptions.qs.sort).toEqual(sort); - expect(mockRequestOptions.qs.highlight).toEqual(highlight); - expect(mockRequestOptions.qs['deduplicate.field']).toEqual(deduplicateField); - expect(mockRequestOptions.qs.similar).toEqual(similar); - expect(mockRequestOptions.qs['similar.document_ids']).toEqual(similarDocumentIds); - expect(mockRequestOptions.qs['similar.fields']).toEqual(similarFields); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __federatedQueryNoticesTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __federatedQueryNoticesTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __federatedQueryNoticesTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionIds = ['testString']; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const federatedQueryNoticesParams = { - environmentId, - collectionIds, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.federatedQueryNotices(federatedQueryNoticesParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.federatedQueryNotices({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.federatedQueryNotices(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getAutocompletion', () => { - describe('positive tests', () => { - function __getAutocompletionTest() { - // Construct the params object for operation getAutocompletion - const environmentId = 'testString'; - const collectionId = 'testString'; - const prefix = 'testString'; - const field = 'testString'; - const count = 5; - const getAutocompletionParams = { - environmentId, - collectionId, - prefix, - field, - count, - }; - - const getAutocompletionResult = discoveryService.getAutocompletion(getAutocompletionParams); - - // all methods should return a Promise - expectToBePromise(getAutocompletionResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/autocompletion', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.prefix).toEqual(prefix); - expect(mockRequestOptions.qs.field).toEqual(field); - expect(mockRequestOptions.qs.count).toEqual(count); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getAutocompletionTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getAutocompletionTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getAutocompletionTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const prefix = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getAutocompletionParams = { - environmentId, - collectionId, - prefix, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getAutocompletion(getAutocompletionParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getAutocompletion({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getAutocompletion(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listTrainingData', () => { - describe('positive tests', () => { - function __listTrainingDataTest() { - // Construct the params object for operation listTrainingData - const environmentId = 'testString'; - const collectionId = 'testString'; - const listTrainingDataParams = { - environmentId, - collectionId, - }; - - const listTrainingDataResult = discoveryService.listTrainingData(listTrainingDataParams); - - // all methods should return a Promise - expectToBePromise(listTrainingDataResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listTrainingDataTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listTrainingDataTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listTrainingDataTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listTrainingDataParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listTrainingData(listTrainingDataParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listTrainingData({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listTrainingData(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('addTrainingData', () => { - describe('positive tests', () => { - // Request models needed by this operation. - - // TrainingExample - const trainingExampleModel = { - document_id: 'testString', - cross_reference: 'testString', - relevance: 38, - }; - - function __addTrainingDataTest() { - // Construct the params object for operation addTrainingData - const environmentId = 'testString'; - const collectionId = 'testString'; - const naturalLanguageQuery = 'testString'; - const filter = 'testString'; - const examples = [trainingExampleModel]; - const addTrainingDataParams = { - environmentId, - collectionId, - naturalLanguageQuery, - filter, - examples, - }; - - const addTrainingDataResult = discoveryService.addTrainingData(addTrainingDataParams); - - // all methods should return a Promise - expectToBePromise(addTrainingDataResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.natural_language_query).toEqual(naturalLanguageQuery); - expect(mockRequestOptions.body.filter).toEqual(filter); - expect(mockRequestOptions.body.examples).toEqual(examples); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __addTrainingDataTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __addTrainingDataTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __addTrainingDataTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const addTrainingDataParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.addTrainingData(addTrainingDataParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.addTrainingData({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.addTrainingData(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteAllTrainingData', () => { - describe('positive tests', () => { - function __deleteAllTrainingDataTest() { - // Construct the params object for operation deleteAllTrainingData - const environmentId = 'testString'; - const collectionId = 'testString'; - const deleteAllTrainingDataParams = { - environmentId, - collectionId, - }; - - const deleteAllTrainingDataResult = discoveryService.deleteAllTrainingData(deleteAllTrainingDataParams); - - // all methods should return a Promise - expectToBePromise(deleteAllTrainingDataResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data', 'DELETE'); - const expectedAccept = undefined; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteAllTrainingDataTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteAllTrainingDataTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteAllTrainingDataTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteAllTrainingDataParams = { - environmentId, - collectionId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteAllTrainingData(deleteAllTrainingDataParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteAllTrainingData({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteAllTrainingData(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getTrainingData', () => { - describe('positive tests', () => { - function __getTrainingDataTest() { - // Construct the params object for operation getTrainingData - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const getTrainingDataParams = { - environmentId, - collectionId, - queryId, - }; - - const getTrainingDataResult = discoveryService.getTrainingData(getTrainingDataParams); - - // all methods should return a Promise - expectToBePromise(getTrainingDataResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.query_id).toEqual(queryId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getTrainingDataTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getTrainingDataTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getTrainingDataTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getTrainingDataParams = { - environmentId, - collectionId, - queryId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getTrainingData(getTrainingDataParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getTrainingData({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getTrainingData(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteTrainingData', () => { - describe('positive tests', () => { - function __deleteTrainingDataTest() { - // Construct the params object for operation deleteTrainingData - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const deleteTrainingDataParams = { - environmentId, - collectionId, - queryId, - }; - - const deleteTrainingDataResult = discoveryService.deleteTrainingData(deleteTrainingDataParams); - - // all methods should return a Promise - expectToBePromise(deleteTrainingDataResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}', 'DELETE'); - const expectedAccept = undefined; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.query_id).toEqual(queryId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteTrainingDataTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteTrainingDataTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteTrainingDataTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteTrainingDataParams = { - environmentId, - collectionId, - queryId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteTrainingData(deleteTrainingDataParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteTrainingData({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteTrainingData(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listTrainingExamples', () => { - describe('positive tests', () => { - function __listTrainingExamplesTest() { - // Construct the params object for operation listTrainingExamples - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const listTrainingExamplesParams = { - environmentId, - collectionId, - queryId, - }; - - const listTrainingExamplesResult = discoveryService.listTrainingExamples(listTrainingExamplesParams); - - // all methods should return a Promise - expectToBePromise(listTrainingExamplesResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.query_id).toEqual(queryId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listTrainingExamplesTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listTrainingExamplesTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listTrainingExamplesTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listTrainingExamplesParams = { - environmentId, - collectionId, - queryId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listTrainingExamples(listTrainingExamplesParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listTrainingExamples({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listTrainingExamples(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createTrainingExample', () => { - describe('positive tests', () => { - function __createTrainingExampleTest() { - // Construct the params object for operation createTrainingExample - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const documentId = 'testString'; - const crossReference = 'testString'; - const relevance = 38; - const createTrainingExampleParams = { - environmentId, - collectionId, - queryId, - documentId, - crossReference, - relevance, - }; - - const createTrainingExampleResult = discoveryService.createTrainingExample(createTrainingExampleParams); - - // all methods should return a Promise - expectToBePromise(createTrainingExampleResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.document_id).toEqual(documentId); - expect(mockRequestOptions.body.cross_reference).toEqual(crossReference); - expect(mockRequestOptions.body.relevance).toEqual(relevance); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.query_id).toEqual(queryId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createTrainingExampleTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createTrainingExampleTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createTrainingExampleTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createTrainingExampleParams = { - environmentId, - collectionId, - queryId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createTrainingExample(createTrainingExampleParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createTrainingExample({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createTrainingExample(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteTrainingExample', () => { - describe('positive tests', () => { - function __deleteTrainingExampleTest() { - // Construct the params object for operation deleteTrainingExample - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const exampleId = 'testString'; - const deleteTrainingExampleParams = { - environmentId, - collectionId, - queryId, - exampleId, - }; - - const deleteTrainingExampleResult = discoveryService.deleteTrainingExample(deleteTrainingExampleParams); - - // all methods should return a Promise - expectToBePromise(deleteTrainingExampleResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}', 'DELETE'); - const expectedAccept = undefined; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.query_id).toEqual(queryId); - expect(mockRequestOptions.path.example_id).toEqual(exampleId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteTrainingExampleTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteTrainingExampleTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteTrainingExampleTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const exampleId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteTrainingExampleParams = { - environmentId, - collectionId, - queryId, - exampleId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteTrainingExample(deleteTrainingExampleParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteTrainingExample({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteTrainingExample(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('updateTrainingExample', () => { - describe('positive tests', () => { - function __updateTrainingExampleTest() { - // Construct the params object for operation updateTrainingExample - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const exampleId = 'testString'; - const crossReference = 'testString'; - const relevance = 38; - const updateTrainingExampleParams = { - environmentId, - collectionId, - queryId, - exampleId, - crossReference, - relevance, - }; - - const updateTrainingExampleResult = discoveryService.updateTrainingExample(updateTrainingExampleParams); - - // all methods should return a Promise - expectToBePromise(updateTrainingExampleResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}', 'PUT'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.cross_reference).toEqual(crossReference); - expect(mockRequestOptions.body.relevance).toEqual(relevance); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.query_id).toEqual(queryId); - expect(mockRequestOptions.path.example_id).toEqual(exampleId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __updateTrainingExampleTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __updateTrainingExampleTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __updateTrainingExampleTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const exampleId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const updateTrainingExampleParams = { - environmentId, - collectionId, - queryId, - exampleId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.updateTrainingExample(updateTrainingExampleParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.updateTrainingExample({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.updateTrainingExample(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getTrainingExample', () => { - describe('positive tests', () => { - function __getTrainingExampleTest() { - // Construct the params object for operation getTrainingExample - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const exampleId = 'testString'; - const getTrainingExampleParams = { - environmentId, - collectionId, - queryId, - exampleId, - }; - - const getTrainingExampleResult = discoveryService.getTrainingExample(getTrainingExampleParams); - - // all methods should return a Promise - expectToBePromise(getTrainingExampleResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.collection_id).toEqual(collectionId); - expect(mockRequestOptions.path.query_id).toEqual(queryId); - expect(mockRequestOptions.path.example_id).toEqual(exampleId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getTrainingExampleTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getTrainingExampleTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getTrainingExampleTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const collectionId = 'testString'; - const queryId = 'testString'; - const exampleId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getTrainingExampleParams = { - environmentId, - collectionId, - queryId, - exampleId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getTrainingExample(getTrainingExampleParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getTrainingExample({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getTrainingExample(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteUserData', () => { - describe('positive tests', () => { - function __deleteUserDataTest() { - // Construct the params object for operation deleteUserData - const customerId = 'testString'; - const deleteUserDataParams = { - customerId, - }; - - const deleteUserDataResult = discoveryService.deleteUserData(deleteUserDataParams); - - // all methods should return a Promise - expectToBePromise(deleteUserDataResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/user_data', 'DELETE'); - const expectedAccept = undefined; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.customer_id).toEqual(customerId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteUserDataTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteUserDataTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteUserDataTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const customerId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteUserDataParams = { - customerId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteUserData(deleteUserDataParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteUserData({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteUserData(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createEvent', () => { - describe('positive tests', () => { - // Request models needed by this operation. - - // EventData - const eventDataModel = { - environment_id: 'testString', - session_token: 'testString', - client_timestamp: '2019-01-01T12:00:00.000Z', - display_rank: 38, - collection_id: 'testString', - document_id: 'testString', - }; - - function __createEventTest() { - // Construct the params object for operation createEvent - const type = 'click'; - const data = eventDataModel; - const createEventParams = { - type, - data, - }; - - const createEventResult = discoveryService.createEvent(createEventParams); - - // all methods should return a Promise - expectToBePromise(createEventResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/events', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.type).toEqual(type); - expect(mockRequestOptions.body.data).toEqual(data); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createEventTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createEventTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createEventTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const type = 'click'; - const data = eventDataModel; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createEventParams = { - type, - data, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createEvent(createEventParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createEvent({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createEvent(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('queryLog', () => { - describe('positive tests', () => { - function __queryLogTest() { - // Construct the params object for operation queryLog - const filter = 'testString'; - const query = 'testString'; - const count = 10; - const offset = 38; - const sort = ['testString']; - const queryLogParams = { - filter, - query, - count, - offset, - sort, - }; - - const queryLogResult = discoveryService.queryLog(queryLogParams); - - // all methods should return a Promise - expectToBePromise(queryLogResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/logs', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.filter).toEqual(filter); - expect(mockRequestOptions.qs.query).toEqual(query); - expect(mockRequestOptions.qs.count).toEqual(count); - expect(mockRequestOptions.qs.offset).toEqual(offset); - expect(mockRequestOptions.qs.sort).toEqual(sort); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __queryLogTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __queryLogTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __queryLogTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const queryLogParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.queryLog(queryLogParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - discoveryService.queryLog({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('getMetricsQuery', () => { - describe('positive tests', () => { - function __getMetricsQueryTest() { - // Construct the params object for operation getMetricsQuery - const startTime = '2019-01-01T12:00:00.000Z'; - const endTime = '2019-01-01T12:00:00.000Z'; - const resultType = 'document'; - const getMetricsQueryParams = { - startTime, - endTime, - resultType, - }; - - const getMetricsQueryResult = discoveryService.getMetricsQuery(getMetricsQueryParams); - - // all methods should return a Promise - expectToBePromise(getMetricsQueryResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/metrics/number_of_queries', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.start_time).toEqual(startTime); - expect(mockRequestOptions.qs.end_time).toEqual(endTime); - expect(mockRequestOptions.qs.result_type).toEqual(resultType); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getMetricsQueryTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getMetricsQueryTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getMetricsQueryTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getMetricsQueryParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getMetricsQuery(getMetricsQueryParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - discoveryService.getMetricsQuery({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('getMetricsQueryEvent', () => { - describe('positive tests', () => { - function __getMetricsQueryEventTest() { - // Construct the params object for operation getMetricsQueryEvent - const startTime = '2019-01-01T12:00:00.000Z'; - const endTime = '2019-01-01T12:00:00.000Z'; - const resultType = 'document'; - const getMetricsQueryEventParams = { - startTime, - endTime, - resultType, - }; - - const getMetricsQueryEventResult = discoveryService.getMetricsQueryEvent(getMetricsQueryEventParams); - - // all methods should return a Promise - expectToBePromise(getMetricsQueryEventResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/metrics/number_of_queries_with_event', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.start_time).toEqual(startTime); - expect(mockRequestOptions.qs.end_time).toEqual(endTime); - expect(mockRequestOptions.qs.result_type).toEqual(resultType); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getMetricsQueryEventTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getMetricsQueryEventTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getMetricsQueryEventTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getMetricsQueryEventParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getMetricsQueryEvent(getMetricsQueryEventParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - discoveryService.getMetricsQueryEvent({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('getMetricsQueryNoResults', () => { - describe('positive tests', () => { - function __getMetricsQueryNoResultsTest() { - // Construct the params object for operation getMetricsQueryNoResults - const startTime = '2019-01-01T12:00:00.000Z'; - const endTime = '2019-01-01T12:00:00.000Z'; - const resultType = 'document'; - const getMetricsQueryNoResultsParams = { - startTime, - endTime, - resultType, - }; - - const getMetricsQueryNoResultsResult = discoveryService.getMetricsQueryNoResults(getMetricsQueryNoResultsParams); - - // all methods should return a Promise - expectToBePromise(getMetricsQueryNoResultsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/metrics/number_of_queries_with_no_search_results', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.start_time).toEqual(startTime); - expect(mockRequestOptions.qs.end_time).toEqual(endTime); - expect(mockRequestOptions.qs.result_type).toEqual(resultType); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getMetricsQueryNoResultsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getMetricsQueryNoResultsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getMetricsQueryNoResultsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getMetricsQueryNoResultsParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getMetricsQueryNoResults(getMetricsQueryNoResultsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - discoveryService.getMetricsQueryNoResults({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('getMetricsEventRate', () => { - describe('positive tests', () => { - function __getMetricsEventRateTest() { - // Construct the params object for operation getMetricsEventRate - const startTime = '2019-01-01T12:00:00.000Z'; - const endTime = '2019-01-01T12:00:00.000Z'; - const resultType = 'document'; - const getMetricsEventRateParams = { - startTime, - endTime, - resultType, - }; - - const getMetricsEventRateResult = discoveryService.getMetricsEventRate(getMetricsEventRateParams); - - // all methods should return a Promise - expectToBePromise(getMetricsEventRateResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/metrics/event_rate', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.start_time).toEqual(startTime); - expect(mockRequestOptions.qs.end_time).toEqual(endTime); - expect(mockRequestOptions.qs.result_type).toEqual(resultType); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getMetricsEventRateTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getMetricsEventRateTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getMetricsEventRateTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getMetricsEventRateParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getMetricsEventRate(getMetricsEventRateParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - discoveryService.getMetricsEventRate({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('getMetricsQueryTokenEvent', () => { - describe('positive tests', () => { - function __getMetricsQueryTokenEventTest() { - // Construct the params object for operation getMetricsQueryTokenEvent - const count = 10; - const getMetricsQueryTokenEventParams = { - count, - }; - - const getMetricsQueryTokenEventResult = discoveryService.getMetricsQueryTokenEvent(getMetricsQueryTokenEventParams); - - // all methods should return a Promise - expectToBePromise(getMetricsQueryTokenEventResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/metrics/top_query_tokens_with_event_rate', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.qs.count).toEqual(count); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getMetricsQueryTokenEventTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getMetricsQueryTokenEventTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getMetricsQueryTokenEventTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getMetricsQueryTokenEventParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getMetricsQueryTokenEvent(getMetricsQueryTokenEventParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - discoveryService.getMetricsQueryTokenEvent({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('listCredentials', () => { - describe('positive tests', () => { - function __listCredentialsTest() { - // Construct the params object for operation listCredentials - const environmentId = 'testString'; - const listCredentialsParams = { - environmentId, - }; - - const listCredentialsResult = discoveryService.listCredentials(listCredentialsParams); - - // all methods should return a Promise - expectToBePromise(listCredentialsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/credentials', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listCredentialsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listCredentialsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listCredentialsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listCredentialsParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listCredentials(listCredentialsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listCredentials({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listCredentials(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createCredentials', () => { - describe('positive tests', () => { - // Request models needed by this operation. - - // CredentialDetails - const credentialDetailsModel = { - credential_type: 'oauth2', - client_id: 'testString', - enterprise_id: 'testString', - url: 'testString', - username: 'testString', - organization_url: 'testString', - 'site_collection.path': 'testString', - client_secret: 'testString', - public_key_id: 'testString', - private_key: 'testString', - passphrase: 'testString', - password: 'testString', - gateway_id: 'testString', - source_version: 'online', - web_application_url: 'testString', - domain: 'testString', - endpoint: 'testString', - access_key_id: 'testString', - secret_access_key: 'testString', - }; - - // StatusDetails - const statusDetailsModel = { - authenticated: true, - error_message: 'testString', - }; - - function __createCredentialsTest() { - // Construct the params object for operation createCredentials - const environmentId = 'testString'; - const sourceType = 'box'; - const credentialDetails = credentialDetailsModel; - const status = statusDetailsModel; - const createCredentialsParams = { - environmentId, - sourceType, - credentialDetails, - status, - }; - - const createCredentialsResult = discoveryService.createCredentials(createCredentialsParams); - - // all methods should return a Promise - expectToBePromise(createCredentialsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/credentials', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.source_type).toEqual(sourceType); - expect(mockRequestOptions.body.credential_details).toEqual(credentialDetails); - expect(mockRequestOptions.body.status).toEqual(status); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createCredentialsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createCredentialsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createCredentialsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createCredentialsParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createCredentials(createCredentialsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createCredentials({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createCredentials(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getCredentials', () => { - describe('positive tests', () => { - function __getCredentialsTest() { - // Construct the params object for operation getCredentials - const environmentId = 'testString'; - const credentialId = 'testString'; - const getCredentialsParams = { - environmentId, - credentialId, - }; - - const getCredentialsResult = discoveryService.getCredentials(getCredentialsParams); - - // all methods should return a Promise - expectToBePromise(getCredentialsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/credentials/{credential_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.credential_id).toEqual(credentialId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getCredentialsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getCredentialsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getCredentialsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const credentialId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getCredentialsParams = { - environmentId, - credentialId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getCredentials(getCredentialsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getCredentials({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getCredentials(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('updateCredentials', () => { - describe('positive tests', () => { - // Request models needed by this operation. - - // CredentialDetails - const credentialDetailsModel = { - credential_type: 'oauth2', - client_id: 'testString', - enterprise_id: 'testString', - url: 'testString', - username: 'testString', - organization_url: 'testString', - 'site_collection.path': 'testString', - client_secret: 'testString', - public_key_id: 'testString', - private_key: 'testString', - passphrase: 'testString', - password: 'testString', - gateway_id: 'testString', - source_version: 'online', - web_application_url: 'testString', - domain: 'testString', - endpoint: 'testString', - access_key_id: 'testString', - secret_access_key: 'testString', - }; - - // StatusDetails - const statusDetailsModel = { - authenticated: true, - error_message: 'testString', - }; - - function __updateCredentialsTest() { - // Construct the params object for operation updateCredentials - const environmentId = 'testString'; - const credentialId = 'testString'; - const sourceType = 'box'; - const credentialDetails = credentialDetailsModel; - const status = statusDetailsModel; - const updateCredentialsParams = { - environmentId, - credentialId, - sourceType, - credentialDetails, - status, - }; - - const updateCredentialsResult = discoveryService.updateCredentials(updateCredentialsParams); - - // all methods should return a Promise - expectToBePromise(updateCredentialsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/credentials/{credential_id}', 'PUT'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.source_type).toEqual(sourceType); - expect(mockRequestOptions.body.credential_details).toEqual(credentialDetails); - expect(mockRequestOptions.body.status).toEqual(status); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.credential_id).toEqual(credentialId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __updateCredentialsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __updateCredentialsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __updateCredentialsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const credentialId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const updateCredentialsParams = { - environmentId, - credentialId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.updateCredentials(updateCredentialsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.updateCredentials({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.updateCredentials(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteCredentials', () => { - describe('positive tests', () => { - function __deleteCredentialsTest() { - // Construct the params object for operation deleteCredentials - const environmentId = 'testString'; - const credentialId = 'testString'; - const deleteCredentialsParams = { - environmentId, - credentialId, - }; - - const deleteCredentialsResult = discoveryService.deleteCredentials(deleteCredentialsParams); - - // all methods should return a Promise - expectToBePromise(deleteCredentialsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/credentials/{credential_id}', 'DELETE'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.credential_id).toEqual(credentialId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteCredentialsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteCredentialsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteCredentialsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const credentialId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteCredentialsParams = { - environmentId, - credentialId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteCredentials(deleteCredentialsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteCredentials({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteCredentials(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listGateways', () => { - describe('positive tests', () => { - function __listGatewaysTest() { - // Construct the params object for operation listGateways - const environmentId = 'testString'; - const listGatewaysParams = { - environmentId, - }; - - const listGatewaysResult = discoveryService.listGateways(listGatewaysParams); - - // all methods should return a Promise - expectToBePromise(listGatewaysResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/gateways', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listGatewaysTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __listGatewaysTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __listGatewaysTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listGatewaysParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.listGateways(listGatewaysParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.listGateways({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.listGateways(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('createGateway', () => { - describe('positive tests', () => { - function __createGatewayTest() { - // Construct the params object for operation createGateway - const environmentId = 'testString'; - const name = 'testString'; - const createGatewayParams = { - environmentId, - name, - }; - - const createGatewayResult = discoveryService.createGateway(createGatewayParams); - - // all methods should return a Promise - expectToBePromise(createGatewayResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/gateways', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.name).toEqual(name); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createGatewayTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __createGatewayTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __createGatewayTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createGatewayParams = { - environmentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.createGateway(createGatewayParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.createGateway({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.createGateway(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getGateway', () => { - describe('positive tests', () => { - function __getGatewayTest() { - // Construct the params object for operation getGateway - const environmentId = 'testString'; - const gatewayId = 'testString'; - const getGatewayParams = { - environmentId, - gatewayId, - }; - - const getGatewayResult = discoveryService.getGateway(getGatewayParams); - - // all methods should return a Promise - expectToBePromise(getGatewayResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/gateways/{gateway_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.gateway_id).toEqual(gatewayId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getGatewayTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __getGatewayTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __getGatewayTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const gatewayId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getGatewayParams = { - environmentId, - gatewayId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.getGateway(getGatewayParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.getGateway({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.getGateway(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteGateway', () => { - describe('positive tests', () => { - function __deleteGatewayTest() { - // Construct the params object for operation deleteGateway - const environmentId = 'testString'; - const gatewayId = 'testString'; - const deleteGatewayParams = { - environmentId, - gatewayId, - }; - - const deleteGatewayResult = discoveryService.deleteGateway(deleteGatewayParams); - - // all methods should return a Promise - expectToBePromise(deleteGatewayResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v1/environments/{environment_id}/gateways/{gateway_id}', 'DELETE'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); - expect(mockRequestOptions.path.environment_id).toEqual(environmentId); - expect(mockRequestOptions.path.gateway_id).toEqual(gatewayId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteGatewayTest(); - - // enable retries and test again - createRequestMock.mockClear(); - discoveryService.enableRetries(); - __deleteGatewayTest(); - - // disable retries and test again - createRequestMock.mockClear(); - discoveryService.disableRetries(); - __deleteGatewayTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const environmentId = 'testString'; - const gatewayId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteGatewayParams = { - environmentId, - gatewayId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - discoveryService.deleteGateway(deleteGatewayParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await discoveryService.deleteGateway({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await discoveryService.deleteGateway(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); -}); diff --git a/test/unit/discovery.v2.test.js b/test/unit/discovery.v2.test.js index fce0aa4f45..c85482692f 100644 --- a/test/unit/discovery.v2.test.js +++ b/test/unit/discovery.v2.test.js @@ -17,7 +17,7 @@ // need to import the whole package to mock getAuthenticatorFromEnvironment const sdkCorePackage = require('ibm-cloud-sdk-core'); -const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage; +const { NoAuthAuthenticator } = sdkCorePackage; const DiscoveryV2 = require('../../dist/discovery/v2'); const { @@ -27,7 +27,7 @@ const { expectToBePromise, checkUserHeader, checkForSuccessfulExecution, -} = unitTestUtils; +} = require('@ibm-cloud/sdk-test-utilities'); const discoveryServiceOptions = { authenticator: new NoAuthAuthenticator(), @@ -3857,6 +3857,293 @@ describe('DiscoveryV2', () => { }); }); + describe('listBatches', () => { + describe('positive tests', () => { + function __listBatchesTest() { + // Construct the params object for operation listBatches + const projectId = 'testString'; + const collectionId = 'testString'; + const listBatchesParams = { + projectId, + collectionId, + }; + + const listBatchesResult = discoveryService.listBatches(listBatchesParams); + + // all methods should return a Promise + expectToBePromise(listBatchesResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/projects/{project_id}/collections/{collection_id}/batches', 'GET'); + const expectedAccept = 'application/json'; + const expectedContentType = undefined; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); + expect(mockRequestOptions.path.project_id).toEqual(projectId); + expect(mockRequestOptions.path.collection_id).toEqual(collectionId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __listBatchesTest(); + + // enable retries and test again + createRequestMock.mockClear(); + discoveryService.enableRetries(); + __listBatchesTest(); + + // disable retries and test again + createRequestMock.mockClear(); + discoveryService.disableRetries(); + __listBatchesTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const projectId = 'testString'; + const collectionId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const listBatchesParams = { + projectId, + collectionId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + discoveryService.listBatches(listBatchesParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await discoveryService.listBatches({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await discoveryService.listBatches(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('pullBatches', () => { + describe('positive tests', () => { + function __pullBatchesTest() { + // Construct the params object for operation pullBatches + const projectId = 'testString'; + const collectionId = 'testString'; + const batchId = 'testString'; + const pullBatchesParams = { + projectId, + collectionId, + batchId, + }; + + const pullBatchesResult = discoveryService.pullBatches(pullBatchesParams); + + // all methods should return a Promise + expectToBePromise(pullBatchesResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/projects/{project_id}/collections/{collection_id}/batches/{batch_id}', 'GET'); + const expectedAccept = 'application/json'; + const expectedContentType = undefined; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); + expect(mockRequestOptions.path.project_id).toEqual(projectId); + expect(mockRequestOptions.path.collection_id).toEqual(collectionId); + expect(mockRequestOptions.path.batch_id).toEqual(batchId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __pullBatchesTest(); + + // enable retries and test again + createRequestMock.mockClear(); + discoveryService.enableRetries(); + __pullBatchesTest(); + + // disable retries and test again + createRequestMock.mockClear(); + discoveryService.disableRetries(); + __pullBatchesTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const projectId = 'testString'; + const collectionId = 'testString'; + const batchId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const pullBatchesParams = { + projectId, + collectionId, + batchId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + discoveryService.pullBatches(pullBatchesParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await discoveryService.pullBatches({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await discoveryService.pullBatches(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('pushBatches', () => { + describe('positive tests', () => { + function __pushBatchesTest() { + // Construct the params object for operation pushBatches + const projectId = 'testString'; + const collectionId = 'testString'; + const batchId = 'testString'; + const file = Buffer.from('This is a mock file.'); + const filename = 'testString'; + const pushBatchesParams = { + projectId, + collectionId, + batchId, + file, + filename, + }; + + const pushBatchesResult = discoveryService.pushBatches(pushBatchesParams); + + // all methods should return a Promise + expectToBePromise(pushBatchesResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/v2/projects/{project_id}/collections/{collection_id}/batches/{batch_id}', 'POST'); + const expectedAccept = 'application/json'; + const expectedContentType = 'multipart/form-data'; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.formData.file.data).toEqual(file); + expect(mockRequestOptions.formData.file.filename).toEqual(filename); + expect(mockRequestOptions.formData.file.contentType).toEqual('application/octet-stream'); + expect(mockRequestOptions.qs.version).toEqual(discoveryServiceOptions.version); + expect(mockRequestOptions.path.project_id).toEqual(projectId); + expect(mockRequestOptions.path.collection_id).toEqual(collectionId); + expect(mockRequestOptions.path.batch_id).toEqual(batchId); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __pushBatchesTest(); + + // enable retries and test again + createRequestMock.mockClear(); + discoveryService.enableRetries(); + __pushBatchesTest(); + + // disable retries and test again + createRequestMock.mockClear(); + discoveryService.disableRetries(); + __pushBatchesTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const projectId = 'testString'; + const collectionId = 'testString'; + const batchId = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const pushBatchesParams = { + projectId, + collectionId, + batchId, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + discoveryService.pushBatches(pushBatchesParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await discoveryService.pushBatches({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await discoveryService.pushBatches(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + describe('listDocumentClassifiers', () => { describe('positive tests', () => { function __listDocumentClassifiersTest() { diff --git a/test/unit/language-translator.v3.test.js b/test/unit/language-translator.v3.test.js deleted file mode 100644 index f360154d39..0000000000 --- a/test/unit/language-translator.v3.test.js +++ /dev/null @@ -1,1219 +0,0 @@ -/** - * (C) Copyright IBM Corp. 2018, 2024. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// need to import the whole package to mock getAuthenticatorFromEnvironment -const sdkCorePackage = require('ibm-cloud-sdk-core'); - -const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage; -const LanguageTranslatorV3 = require('../../dist/language-translator/v3'); - -const { - getOptions, - checkUrlAndMethod, - checkMediaHeaders, - expectToBePromise, - checkUserHeader, - checkForSuccessfulExecution, -} = unitTestUtils; - -const languageTranslatorServiceOptions = { - authenticator: new NoAuthAuthenticator(), - url: 'https://api.us-south.language-translator.watson.cloud.ibm.com', - version: '2018-05-01', -}; - -const languageTranslatorService = new LanguageTranslatorV3(languageTranslatorServiceOptions); - -let createRequestMock = null; -function mock_createRequest() { - if (!createRequestMock) { - createRequestMock = jest.spyOn(languageTranslatorService, 'createRequest'); - createRequestMock.mockImplementation(() => Promise.resolve()); - } -} - -// dont actually construct an authenticator -const getAuthenticatorMock = jest.spyOn(sdkCorePackage, 'getAuthenticatorFromEnvironment'); -getAuthenticatorMock.mockImplementation(() => new NoAuthAuthenticator()); - -// used for the service construction tests -let requiredGlobals; - -describe('LanguageTranslatorV3', () => { - beforeEach(() => { - mock_createRequest(); - // these are changed when passed into the factory/constructor, so re-init - requiredGlobals = { - version: '2018-05-01', - }; - }); - - afterEach(() => { - if (createRequestMock) { - createRequestMock.mockClear(); - } - getAuthenticatorMock.mockClear(); - }); - - describe('the constructor', () => { - test('use user-given service url', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - serviceUrl: 'custom.com', - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new LanguageTranslatorV3(options); - - expect(testInstance.baseOptions.serviceUrl).toBe('custom.com'); - }); - - test('use default service url', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new LanguageTranslatorV3(options); - - expect(testInstance.baseOptions.serviceUrl).toBe(LanguageTranslatorV3.DEFAULT_SERVICE_URL); - }); - - test('use user-given service name', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - serviceName: 'my-service', - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new LanguageTranslatorV3(options); - - expect(testInstance.baseOptions.serviceName).toBe('my-service'); - }); - - test('use default service name', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new LanguageTranslatorV3(options); - - expect(testInstance.baseOptions.serviceName).toBe(LanguageTranslatorV3.DEFAULT_SERVICE_NAME); - }); - - test('use user-given service authenticator', () => { - let options = { - authenticator: new NoAuthAuthenticator(), - }; - - options = Object.assign(options, requiredGlobals); - - const testInstance = new LanguageTranslatorV3(options); - - expect(testInstance.baseOptions.authenticator).toBeInstanceOf(NoAuthAuthenticator); - expect(getAuthenticatorMock).not.toHaveBeenCalled(); - }); - - test('use environment authenticator', () => { - const testInstance = new LanguageTranslatorV3(requiredGlobals); - - expect(testInstance.baseOptions.authenticator).toBeInstanceOf(NoAuthAuthenticator); - expect(getAuthenticatorMock).toHaveBeenCalled(); - }); - }); - - describe('service-level tests', () => { - describe('positive tests', () => { - test('construct service with global params', () => { - const serviceObj = new LanguageTranslatorV3(languageTranslatorServiceOptions); - expect(serviceObj).not.toBeNull(); - expect(serviceObj.version).toEqual(languageTranslatorServiceOptions.version); - }); - }); - }); - - describe('listLanguages', () => { - describe('positive tests', () => { - function __listLanguagesTest() { - // Construct the params object for operation listLanguages - const listLanguagesParams = {}; - - const listLanguagesResult = languageTranslatorService.listLanguages(listLanguagesParams); - - // all methods should return a Promise - expectToBePromise(listLanguagesResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/languages', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listLanguagesTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __listLanguagesTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __listLanguagesTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listLanguagesParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.listLanguages(listLanguagesParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - languageTranslatorService.listLanguages({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('translate', () => { - describe('positive tests', () => { - function __translateTest() { - // Construct the params object for operation translate - const text = ['testString']; - const modelId = 'testString'; - const source = 'testString'; - const target = 'testString'; - const translateParams = { - text, - modelId, - source, - target, - }; - - const translateResult = languageTranslatorService.translate(translateParams); - - // all methods should return a Promise - expectToBePromise(translateResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/translate', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'application/json'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body.text).toEqual(text); - expect(mockRequestOptions.body.model_id).toEqual(modelId); - expect(mockRequestOptions.body.source).toEqual(source); - expect(mockRequestOptions.body.target).toEqual(target); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __translateTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __translateTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __translateTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const text = ['testString']; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const translateParams = { - text, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.translate(translateParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.translate({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.translate(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listIdentifiableLanguages', () => { - describe('positive tests', () => { - function __listIdentifiableLanguagesTest() { - // Construct the params object for operation listIdentifiableLanguages - const listIdentifiableLanguagesParams = {}; - - const listIdentifiableLanguagesResult = languageTranslatorService.listIdentifiableLanguages(listIdentifiableLanguagesParams); - - // all methods should return a Promise - expectToBePromise(listIdentifiableLanguagesResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/identifiable_languages', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listIdentifiableLanguagesTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __listIdentifiableLanguagesTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __listIdentifiableLanguagesTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listIdentifiableLanguagesParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.listIdentifiableLanguages(listIdentifiableLanguagesParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - languageTranslatorService.listIdentifiableLanguages({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('identify', () => { - describe('positive tests', () => { - function __identifyTest() { - // Construct the params object for operation identify - const text = 'testString'; - const identifyParams = { - text, - }; - - const identifyResult = languageTranslatorService.identify(identifyParams); - - // all methods should return a Promise - expectToBePromise(identifyResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/identify', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'text/plain'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.body).toEqual(text); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __identifyTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __identifyTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __identifyTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const text = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const identifyParams = { - text, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.identify(identifyParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.identify({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.identify(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listModels', () => { - describe('positive tests', () => { - function __listModelsTest() { - // Construct the params object for operation listModels - const source = 'testString'; - const target = 'testString'; - const _default = true; - const listModelsParams = { - source, - target, - _default, - }; - - const listModelsResult = languageTranslatorService.listModels(listModelsParams); - - // all methods should return a Promise - expectToBePromise(listModelsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/models', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - expect(mockRequestOptions.qs.source).toEqual(source); - expect(mockRequestOptions.qs.target).toEqual(target); - expect(mockRequestOptions.qs.default).toEqual(_default); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listModelsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __listModelsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __listModelsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listModelsParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.listModels(listModelsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - languageTranslatorService.listModels({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('createModel', () => { - describe('positive tests', () => { - function __createModelTest() { - // Construct the params object for operation createModel - const baseModelId = 'testString'; - const forcedGlossary = Buffer.from('This is a mock file.'); - const forcedGlossaryContentType = 'application/x-tmx+xml'; - const parallelCorpus = Buffer.from('This is a mock file.'); - const parallelCorpusContentType = 'application/x-tmx+xml'; - const name = 'testString'; - const createModelParams = { - baseModelId, - forcedGlossary, - forcedGlossaryContentType, - parallelCorpus, - parallelCorpusContentType, - name, - }; - - const createModelResult = languageTranslatorService.createModel(createModelParams); - - // all methods should return a Promise - expectToBePromise(createModelResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/models', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'multipart/form-data'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.formData.forced_glossary.data).toEqual(forcedGlossary); - expect(mockRequestOptions.formData.forced_glossary.contentType).toEqual(forcedGlossaryContentType); - expect(mockRequestOptions.formData.parallel_corpus.data).toEqual(parallelCorpus); - expect(mockRequestOptions.formData.parallel_corpus.contentType).toEqual(parallelCorpusContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - expect(mockRequestOptions.qs.base_model_id).toEqual(baseModelId); - expect(mockRequestOptions.qs.name).toEqual(name); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __createModelTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __createModelTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __createModelTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const baseModelId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const createModelParams = { - baseModelId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.createModel(createModelParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.createModel({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.createModel(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteModel', () => { - describe('positive tests', () => { - function __deleteModelTest() { - // Construct the params object for operation deleteModel - const modelId = 'testString'; - const deleteModelParams = { - modelId, - }; - - const deleteModelResult = languageTranslatorService.deleteModel(deleteModelParams); - - // all methods should return a Promise - expectToBePromise(deleteModelResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/models/{model_id}', 'DELETE'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - expect(mockRequestOptions.path.model_id).toEqual(modelId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteModelTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __deleteModelTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __deleteModelTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const modelId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteModelParams = { - modelId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.deleteModel(deleteModelParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.deleteModel({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.deleteModel(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getModel', () => { - describe('positive tests', () => { - function __getModelTest() { - // Construct the params object for operation getModel - const modelId = 'testString'; - const getModelParams = { - modelId, - }; - - const getModelResult = languageTranslatorService.getModel(getModelParams); - - // all methods should return a Promise - expectToBePromise(getModelResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/models/{model_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - expect(mockRequestOptions.path.model_id).toEqual(modelId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getModelTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __getModelTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __getModelTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const modelId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getModelParams = { - modelId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.getModel(getModelParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.getModel({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.getModel(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('listDocuments', () => { - describe('positive tests', () => { - function __listDocumentsTest() { - // Construct the params object for operation listDocuments - const listDocumentsParams = {}; - - const listDocumentsResult = languageTranslatorService.listDocuments(listDocumentsParams); - - // all methods should return a Promise - expectToBePromise(listDocumentsResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/documents', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __listDocumentsTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __listDocumentsTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __listDocumentsTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const listDocumentsParams = { - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.listDocuments(listDocumentsParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - - test('should not have any problems when no parameters are passed in', () => { - // invoke the method with no parameters - languageTranslatorService.listDocuments({}); - checkForSuccessfulExecution(createRequestMock); - }); - }); - }); - - describe('translateDocument', () => { - describe('positive tests', () => { - function __translateDocumentTest() { - // Construct the params object for operation translateDocument - const file = Buffer.from('This is a mock file.'); - const filename = 'testString'; - const fileContentType = 'application/mspowerpoint'; - const modelId = 'testString'; - const source = 'testString'; - const target = 'testString'; - const documentId = 'testString'; - const translateDocumentParams = { - file, - filename, - fileContentType, - modelId, - source, - target, - documentId, - }; - - const translateDocumentResult = languageTranslatorService.translateDocument(translateDocumentParams); - - // all methods should return a Promise - expectToBePromise(translateDocumentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/documents', 'POST'); - const expectedAccept = 'application/json'; - const expectedContentType = 'multipart/form-data'; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.formData.file.data).toEqual(file); - expect(mockRequestOptions.formData.file.filename).toEqual(filename); - expect(mockRequestOptions.formData.file.contentType).toEqual(fileContentType); - expect(mockRequestOptions.formData.model_id).toEqual(modelId); - expect(mockRequestOptions.formData.source).toEqual(source); - expect(mockRequestOptions.formData.target).toEqual(target); - expect(mockRequestOptions.formData.document_id).toEqual(documentId); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __translateDocumentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __translateDocumentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __translateDocumentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const file = Buffer.from('This is a mock file.'); - const filename = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const translateDocumentParams = { - file, - filename, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.translateDocument(translateDocumentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.translateDocument({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.translateDocument(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getDocumentStatus', () => { - describe('positive tests', () => { - function __getDocumentStatusTest() { - // Construct the params object for operation getDocumentStatus - const documentId = 'testString'; - const getDocumentStatusParams = { - documentId, - }; - - const getDocumentStatusResult = languageTranslatorService.getDocumentStatus(getDocumentStatusParams); - - // all methods should return a Promise - expectToBePromise(getDocumentStatusResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/documents/{document_id}', 'GET'); - const expectedAccept = 'application/json'; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - expect(mockRequestOptions.path.document_id).toEqual(documentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getDocumentStatusTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __getDocumentStatusTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __getDocumentStatusTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const documentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getDocumentStatusParams = { - documentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.getDocumentStatus(getDocumentStatusParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.getDocumentStatus({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.getDocumentStatus(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('deleteDocument', () => { - describe('positive tests', () => { - function __deleteDocumentTest() { - // Construct the params object for operation deleteDocument - const documentId = 'testString'; - const deleteDocumentParams = { - documentId, - }; - - const deleteDocumentResult = languageTranslatorService.deleteDocument(deleteDocumentParams); - - // all methods should return a Promise - expectToBePromise(deleteDocumentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/documents/{document_id}', 'DELETE'); - const expectedAccept = undefined; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - expect(mockRequestOptions.path.document_id).toEqual(documentId); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __deleteDocumentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __deleteDocumentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __deleteDocumentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const documentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const deleteDocumentParams = { - documentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.deleteDocument(deleteDocumentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.deleteDocument({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.deleteDocument(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); - - describe('getTranslatedDocument', () => { - describe('positive tests', () => { - function __getTranslatedDocumentTest() { - // Construct the params object for operation getTranslatedDocument - const documentId = 'testString'; - const accept = 'application/powerpoint'; - const getTranslatedDocumentParams = { - documentId, - accept, - }; - - const getTranslatedDocumentResult = languageTranslatorService.getTranslatedDocument(getTranslatedDocumentParams); - - // all methods should return a Promise - expectToBePromise(getTranslatedDocumentResult); - - // assert that create request was called - expect(createRequestMock).toHaveBeenCalledTimes(1); - - const mockRequestOptions = getOptions(createRequestMock); - - checkUrlAndMethod(mockRequestOptions, '/v3/documents/{document_id}/translated_document', 'GET'); - const expectedAccept = accept; - const expectedContentType = undefined; - checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); - checkUserHeader(createRequestMock, 'Accept', accept); - expect(mockRequestOptions.qs.version).toEqual(languageTranslatorServiceOptions.version); - expect(mockRequestOptions.path.document_id).toEqual(documentId); - expect(mockRequestOptions.responseType).toBe('stream'); - } - - test('should pass the right params to createRequest with enable and disable retries', () => { - // baseline test - __getTranslatedDocumentTest(); - - // enable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.enableRetries(); - __getTranslatedDocumentTest(); - - // disable retries and test again - createRequestMock.mockClear(); - languageTranslatorService.disableRetries(); - __getTranslatedDocumentTest(); - }); - - test('should prioritize user-given headers', () => { - // parameters - const documentId = 'testString'; - const userAccept = 'fake/accept'; - const userContentType = 'fake/contentType'; - const getTranslatedDocumentParams = { - documentId, - headers: { - Accept: userAccept, - 'Content-Type': userContentType, - }, - }; - - languageTranslatorService.getTranslatedDocument(getTranslatedDocumentParams); - checkMediaHeaders(createRequestMock, userAccept, userContentType); - }); - }); - - describe('negative tests', () => { - test('should enforce required parameters', async () => { - let err; - try { - await languageTranslatorService.getTranslatedDocument({}); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - - test('should reject promise when required params are not given', async () => { - let err; - try { - await languageTranslatorService.getTranslatedDocument(); - } catch (e) { - err = e; - } - - expect(err.message).toMatch(/Missing required parameters/); - }); - }); - }); -}); diff --git a/test/unit/natural-language-understanding.v1.test.js b/test/unit/natural-language-understanding.v1.test.js index 39cc920f95..c8c0c5cbfb 100644 --- a/test/unit/natural-language-understanding.v1.test.js +++ b/test/unit/natural-language-understanding.v1.test.js @@ -17,7 +17,7 @@ // need to import the whole package to mock getAuthenticatorFromEnvironment const sdkCorePackage = require('ibm-cloud-sdk-core'); -const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage; +const { NoAuthAuthenticator } = sdkCorePackage; const NaturalLanguageUnderstandingV1 = require('../../dist/natural-language-understanding/v1'); const { @@ -26,7 +26,7 @@ const { checkMediaHeaders, expectToBePromise, checkForSuccessfulExecution, -} = unitTestUtils; +} = require('@ibm-cloud/sdk-test-utilities'); const naturalLanguageUnderstandingServiceOptions = { authenticator: new NoAuthAuthenticator(), @@ -203,11 +203,6 @@ describe('NaturalLanguageUnderstandingV1', () => { targets: ['testString'], }; - // SummarizationOptions - const summarizationOptionsModel = { - limit: 3, - }; - // CategoriesOptions const categoriesOptionsModel = { explanation: false, @@ -238,7 +233,6 @@ describe('NaturalLanguageUnderstandingV1', () => { relations: relationsOptionsModel, semantic_roles: semanticRolesOptionsModel, sentiment: sentimentOptionsModel, - summarization: summarizationOptionsModel, categories: categoriesOptionsModel, syntax: syntaxOptionsModel, }; diff --git a/test/unit/speech-to-text.v1.test.js b/test/unit/speech-to-text.v1.test.js index bacfa2cbd3..30eb469b9b 100644 --- a/test/unit/speech-to-text.v1.test.js +++ b/test/unit/speech-to-text.v1.test.js @@ -17,7 +17,7 @@ // need to import the whole package to mock getAuthenticatorFromEnvironment const sdkCorePackage = require('ibm-cloud-sdk-core'); -const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage; +const { NoAuthAuthenticator } = sdkCorePackage; const SpeechToTextV1 = require('../../dist/speech-to-text/v1'); const { @@ -27,7 +27,7 @@ const { expectToBePromise, checkUserHeader, checkForSuccessfulExecution, -} = unitTestUtils; +} = require('@ibm-cloud/sdk-test-utilities'); const speechToTextServiceOptions = { authenticator: new NoAuthAuthenticator(), diff --git a/test/unit/text-to-speech.v1.test.js b/test/unit/text-to-speech.v1.test.js index cea8ef7b57..546fbbd94f 100644 --- a/test/unit/text-to-speech.v1.test.js +++ b/test/unit/text-to-speech.v1.test.js @@ -17,7 +17,7 @@ // need to import the whole package to mock getAuthenticatorFromEnvironment const sdkCorePackage = require('ibm-cloud-sdk-core'); -const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage; +const { NoAuthAuthenticator } = sdkCorePackage; const TextToSpeechV1 = require('../../dist/text-to-speech/v1'); const { @@ -27,7 +27,7 @@ const { expectToBePromise, checkUserHeader, checkForSuccessfulExecution, -} = unitTestUtils; +} = require('@ibm-cloud/sdk-test-utilities'); const textToSpeechServiceOptions = { authenticator: new NoAuthAuthenticator(), diff --git a/text-to-speech/v1-generated.ts b/text-to-speech/v1-generated.ts index 8e319e7536..ef319bf723 100644 --- a/text-to-speech/v1-generated.ts +++ b/text-to-speech/v1-generated.ts @@ -15,7 +15,7 @@ */ /** - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.96.1-5136e54a-20241108-203028 */ import * as extend from 'extend'; @@ -2346,7 +2346,9 @@ namespace TextToSpeechV1 { * model interfaces ************************/ - /** Information about an existing custom model. */ + /** + * Information about an existing custom model. + */ export interface CustomModel { /** The customization ID (GUID) of the custom model. The [Create a custom model](#createcustommodel) method * returns only this field. It does not not return the other fields of this object. @@ -2382,7 +2384,9 @@ namespace TextToSpeechV1 { prompts?: Prompt[]; } - /** Information about existing custom models. */ + /** + * Information about existing custom models. + */ export interface CustomModels { /** An array of `CustomModel` objects that provides information about each available custom model. The array is * empty if the requesting credentials own no custom models (if no language is specified) or own no custom models @@ -2391,7 +2395,9 @@ namespace TextToSpeechV1 { customizations: CustomModel[]; } - /** Information about a custom prompt. */ + /** + * Information about a custom prompt. + */ export interface Prompt { /** The user-specified text of the prompt. */ prompt: string; @@ -2415,7 +2421,12 @@ namespace TextToSpeechV1 { speaker_id?: string; } - /** Information about the prompt that is to be added to a custom model. The following example of a `PromptMetadata` object includes both the required prompt text and an optional speaker model ID: `{ "prompt_text": "Thank you and good-bye!", "speaker_id": "823068b2-ed4e-11ea-b6e0-7b6456aa95cc" }`. */ + /** + * Information about the prompt that is to be added to a custom model. The following example of a `PromptMetadata` + * object includes both the required prompt text and an optional speaker model ID: + * + * `{ "prompt_text": "Thank you and good-bye!", "speaker_id": "823068b2-ed4e-11ea-b6e0-7b6456aa95cc" }`. + */ export interface PromptMetadata { /** The required written text of the spoken prompt. The length of a prompt's text is limited to a few sentences. * Speaking one or two sentences of text is the recommended limit. A prompt cannot contain more than 1000 @@ -2429,7 +2440,9 @@ namespace TextToSpeechV1 { speaker_id?: string; } - /** Information about the custom prompts that are defined for a custom model. */ + /** + * Information about the custom prompts that are defined for a custom model. + */ export interface Prompts { /** An array of `Prompt` objects that provides information about the prompts that are defined for the specified * custom model. The array is empty if no prompts are defined for the custom model. @@ -2437,7 +2450,9 @@ namespace TextToSpeechV1 { prompts: Prompt[]; } - /** The pronunciation of the specified text. */ + /** + * The pronunciation of the specified text. + */ export interface Pronunciation { /** The pronunciation of the specified text in the requested voice and format. If a custom model is specified, * the pronunciation also reflects that custom model. @@ -2445,7 +2460,9 @@ namespace TextToSpeechV1 { pronunciation: string; } - /** Information about a speaker model. */ + /** + * Information about a speaker model. + */ export interface Speaker { /** The speaker ID (GUID) of the speaker. */ speaker_id: string; @@ -2453,7 +2470,9 @@ namespace TextToSpeechV1 { name: string; } - /** A custom models for which the speaker has defined prompts. */ + /** + * A custom models for which the speaker has defined prompts. + */ export interface SpeakerCustomModel { /** The customization ID (GUID) of a custom model for which the speaker has defined one or more prompts. */ customization_id: string; @@ -2463,7 +2482,9 @@ namespace TextToSpeechV1 { prompts: SpeakerPrompt[]; } - /** Custom models for which the speaker has defined prompts. */ + /** + * Custom models for which the speaker has defined prompts. + */ export interface SpeakerCustomModels { /** An array of `SpeakerCustomModel` objects. Each object provides information about the prompts that are * defined for a specified speaker in the custom models that are owned by a specified service instance. The array @@ -2472,13 +2493,17 @@ namespace TextToSpeechV1 { customizations: SpeakerCustomModel[]; } - /** The speaker ID of the speaker model. */ + /** + * The speaker ID of the speaker model. + */ export interface SpeakerModel { /** The speaker ID (GUID) of the speaker model. */ speaker_id: string; } - /** A prompt that a speaker has defined for a custom model. */ + /** + * A prompt that a speaker has defined for a custom model. + */ export interface SpeakerPrompt { /** The user-specified text of the prompt. */ prompt: string; @@ -2498,7 +2523,9 @@ namespace TextToSpeechV1 { error?: string; } - /** Information about all speaker models for the service instance. */ + /** + * Information about all speaker models for the service instance. + */ export interface Speakers { /** An array of `Speaker` objects that provides information about the speakers for the service instance. The * array is empty if the service instance has no speakers. @@ -2506,7 +2533,9 @@ namespace TextToSpeechV1 { speakers: Speaker[]; } - /** Additional service features that are supported with the voice. */ + /** + * Additional service features that are supported with the voice. + */ export interface SupportedFeatures { /** If `true`, the voice can be customized; if `false`, the voice cannot be customized. (Same as * `customizable`.). @@ -2519,7 +2548,9 @@ namespace TextToSpeechV1 { voice_transformation: boolean; } - /** Information about the translation for the specified text. */ + /** + * Information about the translation for the specified text. + */ export interface Translation { /** The phonetic or sounds-like translation for the word. A phonetic translation is based on the SSML format for * representing the phonetic string of a word either as an IPA translation or as an IBM SPR translation. A @@ -2559,7 +2590,9 @@ namespace TextToSpeechV1 { } } - /** Information about an available voice. */ + /** + * Information about an available voice. + */ export interface Voice { /** The URI of the voice. */ url: string; @@ -2583,13 +2616,17 @@ namespace TextToSpeechV1 { customization?: CustomModel; } - /** Information about all available voices. */ + /** + * Information about all available voices. + */ export interface Voices { /** A list of available voices. */ voices: Voice[]; } - /** Information about a word for the custom model. */ + /** + * Information about a word for the custom model. + */ export interface Word { /** The word for the custom model. The maximum length of a word is 49 characters. */ word: string; @@ -2632,7 +2669,12 @@ namespace TextToSpeechV1 { } } - /** For the [Add custom words](#addwords) method, one or more words that are to be added or updated for the custom model and the translation for each specified word. For the [List custom words](#listwords) method, the words and their translations from the custom model. */ + /** + * For the [Add custom words](#addwords) method, one or more words that are to be added or updated for the custom + * model and the translation for each specified word. + * + * For the [List custom words](#listwords) method, the words and their translations from the custom model. + */ export interface Words { /** The [Add custom words](#addwords) method accepts an array of `Word` objects. Each object provides a word * that is to be added or updated for the custom model and the word's translation. diff --git a/tsconfig.json b/tsconfig.json index 85c5f6b400..9595ae005e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -59,18 +59,12 @@ "./auth/*.ts", "./lib/*.ts", "./assistant/*.ts", - "./natural-language-classifier/*.ts", - "./language-translator/*.ts", "./discovery/*.ts", "./natural-language-understanding/*.ts", - "./visual-recognition/*.ts", - "./personality-insights/*.ts", - "./tone-analyzer/*.ts", "./text-to-speech/*.ts", "./speech-to-text/*.ts", "./authorization/*.ts", "./iam-token-manager/*.ts", - "./compare-comply/*.ts", "./iam-token-manager/*.ts", "sdk.ts" ]