diff --git a/.npmignore b/.npmignore index 8811e61..b12ba7f 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,16 @@ node_modules src -test \ No newline at end of file +test +coverage +samples +scripts +.github +babel.config.js +.babelrc +CHANGELOG.md +codecov.yml +jest.config.js +LICENSE +README.md +SECURITY.md +typedoc.json \ No newline at end of file diff --git a/README.md b/README.md index 1a4c369..134bea4 100644 --- a/README.md +++ b/README.md @@ -18,19 +18,17 @@ SDK for the Skyflow Data Privacy Vault. - [Require](#require) - [All imports](#all-imports) - [Vault APIs](#vault-apis) - - [Insert: vault.insert()](#insert-vaultinsert) + - [Insert: vault().insert()](#insert-vaultinsert) - [Example: Insert Records](#example-insert-records) - [Example: Upsert Records (update or insert)](#example-upsert-records-update-or-insert) - [Example: Insert with partial success support](#example-insert-with-partial-success-support) - [Detokenize: vault.detokenize()](#detokenize-vaultdetokenize) - [Detokenize example](#detokenize-example) - - [Get By IDs: vault.getById()](#get-by-ids-vaultgetbyid) - - [Example: Get Records by IDs](#example-get-records-by-ids) - [Get records by unique values: vault.get()](#get-records-by-unique-values-vaultget) - - [Example: Get records by ID(s)](#example-get-records-by-ids-1) - - [Example: Get records by unique field values](#example-get-records-by-unique-field-values) - - [Update records by IDs](#update-records-by-ids) - - [Example: Update records by IDs](#example-update-records-by-ids) + - [Example: Get records by ID(s)](#example-get-records-by-ids) + - [Example: Get records by unique column values](#example-get-records-by-unique-column-values) + - [Update records by ID](#update-records-by-id) + - [Example: Update records by ID](#example-update-records-by-id) - [Delete](#delete) - [Invoke Connection](#invoke-connection) - [Example: Invoke Connection](#example-invoke-connection) @@ -59,22 +57,23 @@ Depending on your project setup, you may use either the `require` method (common ##### Require -```javascript +```typescript const { Skyflow } = require('skyflow-node'); ``` **ES modules** -```javascript +```typescript import { Skyflow } from 'skyflow-node'; ``` ##### All imports -```javascript -import { Skyflow, // Vault client - generateBearerToken, isExpired, // JWT auth helpers - LogLevel, setLogLevel // logging options +```typescript +import { + Skyflow, // Vault client + isExpired, // JWT auth helpers + LogLevel, // logging options } from 'skyflow-node' ``` @@ -84,139 +83,140 @@ The [Vault](https://github.com/skyflowapi/skyflow-node/tree/main/src/vault-api) To use this module, the Skyflow client must first be initialized as follows: -```javascript +```typescript import { Skyflow } from 'skyflow-node'; // Initialize the Skyflow Vault client -const vault = Skyflow.init({ - // Id of the vault that the client should connect to. - vaultID: 'string', - // URL of the vault that the client should connect to. - vaultURL: 'string', - // Helper function generates a Skyflow bearer token. - getBearerToken: auth, +const client : Skyflow = Skyflow({ + vaultConfigs: [ + { + // Id of the vault that the client should connect to. + vaultId: 'string', + // Id of the cluster that the client should connect to. + clusterId: 'string', + // environment to which the vault ID belongs + env: Env.PROD, + // vault level credentials + credentials: { + roles: ['string', 'string'], // optional, IDs for roles + context: 'string', // optional, Id of the context + credentialsString: 'string', // credentials JSON as a stringified version + }, + } + ], + connectionConfigs: [ + { + // Id of the connection that the client should connect to. + connectionId: 'string', + // URL of the connection that the client should connect to. + connectionUrl: 'string', + // connection level credentials + credentials: { + apiKey: 'string', // API key + }, + }, + ], + // environment to which the vault ID belongs + skyflowCredentials: { + path: 'string', // optional, path to credentials json file + }, + // optional, if not specified default is ERROR + logLevel: LogLevel.ERROR, }); - -// sample function to retrieve a bearer token from an environment variable -// customize this according to your environment and security posture -const auth = function () { - return new Promise((resolve, reject) => { - resolve(process.env.VAULT_BEARER_TOKEN); - }); -}, ``` -For the `getBearerToken` parameter, pass in a helper function that retrieves a Skyflow bearer token from your backend. This function will be invoked when the SDK needs to insert or retrieve data from the vault. +Pass the `SKYFLOW_CREDENTIALS` parameter as an environment variable. This variable will be used when the SDK needs to insert or retrieve data from the vault. All Vault APIs must be invoked using a vault client instance. -### Insert: vault.insert() +### Insert: vault().insert() -To insert data into your vault, use the `insert(data, options?)` method. +To insert data into your vault, use the `insert(request, options?)` method. ```js -vault.insert(data, options?); +vault('VAULT_ID').insert(request, options?); ``` -- **Records:** The first parameter records is a JSONObject that must have a records key and takes an array of records to be inserted into the vault as a value. -- **Options:** The second parameter options is an optional object that provides further options for your insert call, more details below. +- **Request:** The first parameter request is an object of insert request that must have a table name key and takes an array of rows to be inserted into the vault as a value. +- **Options:** The second parameter options is an optional class object that provides further options for your insert call, more details below. #### Example: Insert Records -An [example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/Insert.ts) of a simple insert call is given below: - -```javascript -const result = await vault.insert( - { - // records to be inserted - records: [ - { - fields: { - // fields by name - expiry_date: '12/2026', - card_number: '411111111111111', - }, - // table name - table: 'cards', - }, - ], - }, - // options - { - // return tokens instead of real values - tokens: true, - } +An [example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/insert-records.ts) of a simple insert call is given below: + +```typescript +const insertData: Array = [ + { card_number: '4111111111111112', card_cvv: '123' } // Example sensitive data +]; + +// Create Insert Request +const insertReq: InsertRequest = new InsertRequest( + 'sensitive_data_table', // Replace with your actual table name + insertData ); +// Configure Insertion Options +const insertOptions: InsertOptions = new InsertOptions(); +insertOptions.setReturnTokens(true); // Optional: Get tokens for inserted data +// insertOptions.setContinueOnError(true); // Optional: Continue on partial errors + +// Perform Secure Insertion +const response: InsertResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .insert(insertReq, insertOptions); ``` **Sample response:** ```json { - "records": [ + "insertedFields": [ { - "table": "cards", - "fields": { - "card_number": "f37186-e7e2-466f-91e5-48e2bcbc1", - "expiry_date": "1989cb56-63a-4482-adf-1f74cd1a5", - }, + "card_number": "f37186-e7e2-466f-91e5-48e2bcbc1", + "card_cvv": "1989cb56-63a-4482-adf-1f74cd1a5", }, ], + "errors": [], } ``` #### Example: Upsert Records (update or insert) -Insert call [example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/UpsertSupport.ts) with upsert support: +Insert call [example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/upsert.ts) with upsert support: -```javascript -const response = vault.insert({ - // records to be inserted - records: [{ - fields: { - expiry_date: '12/2026', - card_number: '411111111111111', - }, - table: 'cards', - }], -}, { - // optional options - tokens: true, - // To conditionally insert OR update based on a field - upsert: [ - { - table: 'cards', // Name of the table in the vault. - column: 'card_number', // Name of the column in the vault. Must be defined as `unique`. - } - ] -}); +```typescript +const insertData: Array = [ + { card_number: '4111111111111112' } // Example sensitive data +]; + +// Create Insert Request +const insertReq: InsertRequest = new InsertRequest( + 'sensitive_data_table', // Replace with your actual table name + insertData +); + +// Configure Insertion Options +const insertOptions: InsertOptions = new InsertOptions(); +insertOptions.setReturnTokens(true); // Optional: Get tokens for inserted data +insertOptions.setUpsertColumn('card_number'); // Optional: Set Unique column name + +// Perform Secure Insertion +const response: InsertResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .insert(insertReq, insertOptions); -response.then( - (res) => { - console.log(JSON.stringify(res)); - }, - (err) => { - console.log(JSON.stringify(err)); - } -).catch((err) => { - console.log(JSON.stringify(err)); -}); ``` Samples Response: ```json { - "records": [ + "insertedFields": [ { - "table": "cards", - "fields": { - "skyflow_id": "16419435-aa63-4823-aae7-19c6a2d6a19f", - "card_number": "f3907186-e7e2-466f-91e5-48e12c2bcbc1", - "cvv": "1989cb56-63da-4482-a2df-1f74cd0dd1a5", - }, - } - ] + "skyflowId": "16419435-aa63-4823-aae7-19c6a2d6a19f", + "card_number": "f3907186-e7e2-466f-91e5-48e12c2bcbc1", + }, + ], + "errors" : [], } ``` @@ -224,514 +224,413 @@ Samples Response: Insert with partial success support -Insert call [example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/InsertWithContinueOnError.ts) with contiueOnError support: +Insert call [example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/insert-continue-on-error.ts) with contiueOnError support: -```javascript -const response = vault.insert({ - records: [ - { - fields: { - expiry_date: '12/2026', - card_number: '411111111111111', - namee: 'john doe', - }, - table: 'cards', - }, - { - fields: { - expiry_date: '12/2027', - card_number: '411111111111111', - name: 'jane doe', - }, - table: 'cards', - } - ], -}, -{ - // return tokens instead of real values - tokens: true, - // Ignore failures and keep going. Response will include errors with index value. - continueOnError: true, -}); +```typescript +const insertData: Array = [ + { card_number: '4111111111111112', card_cvv: '123' }, // Example sensitive data + { card_umber: '4111111111111112' } +]; + +// Create Insert Request +const insertReq: InsertRequest = new InsertRequest( + 'sensitive_data_table', // Replace with your actual table name + insertData +); + +// Configure Insertion Options +const insertOptions: InsertOptions = new InsertOptions(); +insertOptions.setReturnTokens(true); // Optional: Get tokens for inserted data +insertOptions.setContinueOnError(true); // Optional: Continue on partial errors + +// Perform Secure Insertion +const response: InsertResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .insert(insertReq, insertOptions); -response.then( - (res) => { - console.log(JSON.stringify(res)); - }, - (err) => { - console.log(JSON.stringify(err)); - } -).catch((err) => { - console.log(JSON.stringify(err)); -}); ``` **Sample Response:** ```json { - "records": [ + "insertedFields": [ { - "table": "cards", - "fields": { - "skyflow_id": "16419435-aa63-4823-aae7-19c6a2d6a19f", - "card_number": "f3907186-e7e2-466f-91e5-48e12c2bcbc1", - "expiry_date": "1989cb56-63da-4482-a2df-1f74cd0dd1a5", - "name": "245d3a0f-a2d3-443b-8a20-8c17de86e186", - }, - "request_index": 1, + "skyflowId": "16419435-aa63-4823-aae7-19c6a2d6a19f", + "card_number": "f3907186-e7e2-466f-91e5-48e12c2bcbc1", + "card_cvv": "1989cb56-63da-4482-a2df-1f74cd0dd1a5", + "request_index": 0, } ], "errors": [ { - "error": { - "code":400, - "description":"Invalid field present in JSON namee - requestId: 87fb2e32-6287-4e61-8304-9268df12bfe8", - "request_index": 0, - } + "code":400, + "description":"Invalid field present in JSON card_umber.", + "request_index": 1, } ] } ``` -### Detokenize: vault.detokenize() +### Detokenize: vault().detokenize() Returns values for provided tokens. -In order to retrieve data from your vault using tokens that you have previously generated for that data, you can use the `detokenize(data)` method. The first parameter must have a records key that takes an array of tokens to be fetched from the vault, as shown below. +In order to retrieve data from your vault using tokens that you have previously generated for that data, you can use the `detokenize(request)` method. The first parameter must have a request key that takes an array of tokens to be fetched from the vault and the redaction type, as shown below. -```javascript -data = { - records: [{ - token: 'string', // Required, token for the record to be fetched. - redaction: Skyflow.RedactionType // Optional, redaction type to be applied ex: Skyflow.RedactionType.PLAIN_TEXT - }] -} -``` +```typescript +/// Prepare Detokenization Data +const detokenizeData: Array = ['token1', 'token2', 'token3']; // Tokens to be detokenized +const redactionType: RedactionType = RedactionType.REDACTED; // Redaction type -`Skyflow.RedactionType` accepts one of four values: +// Create Detokenize Request +const detokenizeRequest: DetokenizeRequest = new DetokenizeRequest( + detokenizeData, + redactionType +); + +// Configure Detokenize Options +const detokenizeOptions: DetokenizeOptions = new DetokenizeOptions(); +detokenizeOptions.setContinueOnError(true); // Continue processing on errors +detokenizeOptions.setDownloadURL(false); // Disable download URL generation +``` +`RedactionType` accepts one of four values: * `PLAIN_TEXT` * `MASKED` * `REDACTED` * `DEFAULT` Note: -- `redaction` defaults to Skyflow.RedactionType.PLAIN_TEXT. +- `redaction` defaults to RedactionType.PLAIN_TEXT. #### Detokenize example -An [example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/Detokenize.ts) of a detokenize call: +An [example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/detokenize-records.ts) of a detokenize call: -```javascript -const result = await vault.detokenize({ - records: [ - { - token: '4017-f72b-4f5c-9b-8e719', - redaction: Skyflow.RedactionType.PLAIN_TEXT - }, - ], -}); +```typescript +// Prepare Detokenization Data +const detokenizeData: Array = ['token1']; // Tokens to be detokenized +const redactionType: RedactionType = RedactionType.REDACTED; // Redaction type + +// Create Detokenize Request +const detokenizeRequest: DetokenizeRequest = new DetokenizeRequest( + detokenizeData, + redactionType +); + +// Configure Detokenize Options +const detokenizeOptions: DetokenizeOptions = new DetokenizeOptions(); +detokenizeOptions.setContinueOnError(true); // Continue processing on errors +detokenizeOptions.setDownloadURL(false); // Disable download URL generation + +// Perform Detokenization +const response: DetokenizeResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .detokenize(detokenizeRequest, detokenizeOptions); ``` Sample response: ```json { - "records": [ + "detokenizedFields": [ { "token": "110dc-6f76-19-bd3-9051051", "value": "1990-01-01", }, ], + "errors": [], } ``` -### Get By IDs: vault.getById() +### Tokenize: vault().tokenize() -In order to retrieve data from your vault using SkyflowIDs, use the `getById(records)` method. The records parameter takes a JSON Object that should contain an array of SkyflowIDs to be fetched, as shown below: +In order to tokenize data, you can use the `tokenize(request)` method. The first parameter is a request object that takes an array of `TokenizeRequestType`, as shown below. -```javascript -data = { - records: [{ - // List of skyflow_ids for the records to be fetched - ids: ['id1', 'id2'], - // Name of table holding the above skyflow_ids - table: 'NAME_OF_SKYFLOW_TABLE', - // Redaction to be applied to retrieved data - redaction: Skyflow.RedactionType.PLAIN_TEXT, - }] -}; -``` - -`Skyflow.RedactionType` accepts one of four values: -* `PLAIN_TEXT` -* `MASKED` -* `REDACTED` -* `DEFAULT` +```js +// Prepare Tokenization Data +const tokenizeValues: Array = [ + { value: '4111111111111111', columnGroup: 'card_number_cg' }, + { value: '4242424242424242', columnGroup: 'card_number_cg' } +]; -You must apply a redaction type to retrieve data. +const tokenReq: TokenizeRequest = new TokenizeRequest(tokenizeValues); +``` -#### Example: Get Records by IDs +Sample usage -An [example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/GetById.ts) of `getById` call: +An [example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault_api/tokenize-records.ts) of a tokenize call: -```javascript -let skyflowIds = [ - 'f8622-b557-4c6b-a12c-c0b0bfd9', - 'da26de53-95d5-4db-99db-8d35ff9' +```typescript +// Prepare Tokenization Data +const tokenizeValues: Array = [ + { value: '4111111111111111', columnGroup: 'card_number_cg' }, + { value: '4242424242424242', columnGroup: 'card_number_cg' } ]; -let record = { - ids: skyflowIds, - table: 'cards', - redaction: RedactionType.PLAIN_TEXT -}; - -let invalidIds = ['invalid Skyflow ID']; -let badRecord = { - ids: invalidIds, - table: 'cards', - 'redaction': RedactionType.PLAIN_TEXT -}; +const tokenReq: TokenizeRequest = new TokenizeRequest(tokenizeValues); -let records = { - records: [record, badRecord] -}; +// Execute Tokenization +const response: TokenizeResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .tokenize(tokenReq); -const result = client.getById(records); -result.then( - (res) => { - console.log(JSON.stringify(res)); - }).catch((err) => { - console.log(JSON.stringify(err)); -}); ``` Sample response: -```json +```typescript { - "records": [ - { - "fields": { - "card_number": "4111111111111111", - "expiry_date": "11/35", - "fullname": "myname", - "skyflow_id": "f8d2-b557-4c6b-a12c-c5ebfd9" - }, - "table": "cards" - }, - { - "fields": { - "card_number": "4111111111111111", - "expiry_date": "10/23", - "fullname": "sam", - "skyflow_id": "da53-95d5-4bdb-99db-8d8c5ff9" - }, - "table": "cards" - } + tokens: [ + '5479-4229-4622-1393', + '8989-7867-7887-0987', ], - "errors": [ - { - "error": { - "code": "404", - "description": "No Records Found" - }, - "skyflow_ids": [ - "invalid Skyflow ID" - ] - } - ] + errors: [], } ``` -### Get records by unique values: vault.get() - -To retrieve data from your vault using SkyflowIDs or unique column values, use the `get(records)` method. The `records` parameter takes a JSONObject that should contain either an array of SkyflowIDs or a unique column name and values to fetch the records, as shown below: -```javascript -data = { - records: [ - { - // List of skyflow_ids for the records to fetch. - ids: ['SKYFLOW_ID_1', 'SKYFLOW_ID_2'], // Optional - // Name of table holding the records in the vault. - table: 'NAME_OF_SKYFLOW_TABLE', - // Redaction type to apply to retrieved data. - redaction: Skyflow.RedactionType, - // Unique column name in the vault. - columnName: 'UNIQUE_COLUMN_NAME', // Optional - // List of given unique column values. - columnValues: ['', '', ''], // Required if column name is provided - }, - ], -}; -``` +### Get records by unique values: vault().get() -Note: You cannot pass an array of skyflow_ids and unique column details together. Using column name and column value with `skyflow_ids` will return an error message. +To retrieve data from your vault using SkyflowIDs or unique column values, use the `get(request)` method. The `request` parameter takes a column value or get request object that should contain either an array of a unique column name and column values or skyflowIds to fetch the records, as shown below: #### Example: Get records by ID(s) - -[Example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/Get.ts) to get records using skyflowIds: -```javascript -let skyflowIds = [ - 'f8622-b557-4c6b-a12c-c0b0bfd9', - 'da26de53-95d5-4db-99db-8d35ff9', +[Example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/get-records.ts) to get records using skyflowIds: +```typescript +// Prepare Retrieval Data +const getIds: Array = [ + 'skyflow-id1', + 'skyflow-id2', ]; -let record = { - ids: skyflowIds, - table: 'cards', - redaction: RedactionType.PLAIN_TEXT, -}; +// Create Get Request +const getRequest: GetRequest = new GetRequest( + 'sensitive_data_table', // Replace with your actual table name + getIds +); -let records = { - records: [record], -}; +// Configure Get Options +const getOptions: GetOptions = new GetOptions(); +getOptions.setReturnTokens(true); // Optional: Get tokens for retrieved data -const result = vault.get(records); -result - .then((res) => { - console.log(JSON.stringify(res)); - }) - .catch((err) => { - console.log(JSON.stringify(err)); - }); +// Perform Secure Retrieval +const response: GetResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .get(getRequest, getOptions); ``` Response: ```json { - "records":[ + "data":[ { - "fields":{ - "card_number":"4111111111111111", - "expiry_date":"11/35", - "fullname":"myname", - "id":"f8d2-b557-4c6b-a12c-c5ebfd9" - }, - "table":"cards" + "card_number":"4111111111111111", + "expiry_date":"11/35", + "fullname":"myname", + "id":"f8d2-b557-4c6b-a12c-c5ebfd9" }, { - "fields":{ - "card_number":"4111111111111111", - "expiry_date":"10/23", - "fullname":"sam", - "id":"da53-95d5-4bdb-99db-8d8c5ff9" - }, - "table":"cards" + "card_number":"4111111111111111", + "expiry_date":"10/23", + "fullname":"sam", + "id":"da53-95d5-4bdb-99db-8d8c5ff9" } - ] + ], + "errors": [], } ``` -#### Example: Get records by unique field values +Note: You cannot pass an array of skyflow_ids and unique column details together. Using column name and column value with `skyflow_ids` will return an error message. -[Example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/Get.ts) to get records using unique column names and values: +#### Example: Get records by unique column values -```javascript -let record = { - table: 'cards', - redaction: RedactionType.PLAIN_TEXT, - columnName: 'card_id', - columnValues: ['123', '456'], -}; +[Example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/get-column-values.ts) to get records using unique column values: +```typescript +// Prepare Column-Based Retrieval Data +const columnValues: Array = [ + 'value1', // Example Unique Column value 1 + 'value2', // Example Unique Column value 2 +]; +const tableName: string = 'table-name'; // Replace with your actual table name +const columnName: string = 'column-name'; // Column name configured as unique in the schema + +// Create Get Column Request +const getRequest: GetColumnRequest = new GetColumnRequest( + tableName, + columnName, + columnValues // Column values of the records to return +); -let records = { - records: [record], -}; +// Configure Get Options +const getOptions: GetOptions = new GetOptions(); +getOptions.setReturnTokens(true); // Optional: Get tokens for retrieved data -const result = vault.get(records); -result - .then((res) => { - console.log(JSON.stringify(res)); - }) - .catch((err) => { - console.log(JSON.stringify(err)); - }); +// Perform Secure Retrieval +const response: GetResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .get(getRequest, getOptions); ``` Response: + ```json { - "records":[ + "data":[ { - "fields":{ - "card_id":"123", - "expiry_date":"11/35", - "fullname":"myname", - "id":"f8d2-b557-4c6b-a12c-c5ebfd9" - }, - "table":"cards" + "card_number":"4111111111111111", + "expiry_date":"11/35", + "fullname":"myname", + "id":"f8d2-b557-4c6b-a12c-c5ebfd9" }, { - "fields":{ - "card_id":"456", - "expiry_date":"10/23", - "fullname":"sam", - "id":"da53-95d5-4bdb-99db-8d8c5ff9" - }, - "table":"cards" + "card_number":"4111111111111111", + "expiry_date":"10/23", + "fullname":"sam", + "id":"da53-95d5-4bdb-99db-8d8c5ff9" } - ] + ], + "errors": [], } ``` -### Update records by IDs +### Update records by ID -To update records in your vault by skyflow_id, use the `update(records, options)` method. The first parameter, `records`, is a JSONObject that must have a records key and takes an array of records to update as a value in the vault. The options parameter takes an object of optional parameters for the update and includes an option to return tokenized data for the updated fields. +To update records in your vault by skyflow_id, use the `update(request, options)` method. The first parameter, `request`, is a update request that must have the table name and takes an object which contains `skyflowId` key to update as a value in the vault. The options parameter takes an object of optional parameters for the update and includes an update options object to return tokenized data for the updated fields. Call schema: ```js -const updateInput = { - records: [ // Array of records to update. - { - id: '', // Skyflow_id of record to update. - table: '', // Table name of given Skyflow_id. - fields: { // Fields to update. - '': '', - '': '', - }, - }, - ] +// Prepare Update Data +const updateData: object = { + skyflowId: 'your-skyflow-id', // Skyflow ID of the record to update + card_number: '1234567890123456' // Updated sensitive data }; -const options = { // Optional - // Option to return updated field tokens in response. - // Defaults to 'true'. - tokens: true, -} +// Create Update Request +const updateReq: UpdateRequest = new UpdateRequest( + 'sensitive_data_table', // Replace with your actual table name + updateData +); + +// Configure Update Options +const updateOptions: UpdateOptions = new UpdateOptions(); +updateOptions.setReturnTokens(true); // Optional: Get tokens for updated data ``` -#### Example: Update records by IDs +#### Example: Update records by ID -[Example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/Update.ts) to update by ID using `skyflow_ids`: +[Example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/Update.ts) to update by ID using `skyflowId`: ```js -const updateInput = { - records: [ - { - id: '29ebda8d-5272-4063-af58-15cc674e332b', // Valid record id. - table: 'cards', - fields: { - card_number: '5105105105105100', - cardholder_name: 'Thomas', - expiration_date: '07/2032', - ssn: '123-45-6722', - }, - }, - ], +// Prepare Update Data +const updateData: object = { + skyflowId: 'your-skyflow-id', // Skyflow ID of the record to update + card_number: '1234567890123456' // Updated sensitive data }; -const options = { tokens: true }; +// Create Update Request +const updateReq: UpdateRequest = new UpdateRequest( + 'sensitive_data_table', // Replace with your actual table name + updateData +); + +// Configure Update Options +const updateOptions: UpdateOptions = new UpdateOptions(); +updateOptions.setReturnTokens(true); // Optional: Get tokens for updated data + +// Perform Secure Update +const response: UpdateResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .update(updateReq, updateOptions); -const response = vault.update(updateInput, options); -console.log(response); ``` Response: ```json { - "records":[ - { - "id": "29ebda8d-5272-4063-af58-15cc674e332b", - "fields":{ - "card_number": "93f28226-51b0-4f24-8151-78b5a61f028b", - "cardholder_name": "0838fd08-9b51-4db2-893c-48542f3b121e", - "expiration_date": "91d7ee77-262f-4d5d-8286-062b694c81fd", - "ssn": "e28bf55d-f3d8-49a6-aad9-71a13db54b82", - }, - "table": "cards", - } - ] + "skyflowId": "29ebda8d-5272-4063-af58-15cc674e332b", + "card_number": "93f28226-51b0-4f24-8151-78b5a61f028b", } ``` ### Delete -To delete data from the vault, use the `delete(records, options?)` method of the Skyflow client. The `records` parameter takes an array of records with `id` and `table` to delete in the following format. The `options` parameter is optional and takes an object of deletion parameters. Currently, there are no supported deletion parameters. +To delete data from the vault, use the `delete(request)` method of the Skyflow client. The `request` parameter takes an delete request object with list of `skyflowIds` and `table` to delete in the following format. Call schema: -```js -const deleteInput = { - records: [ - { - id: "", // skyflow id of the record to delete - table: "" // Table from which the record is to be deleted - }, - { - // ...additional records here - }, - ] -}; +```typescript +// Prepare Delete Data +const deleteIds: Array = ['skyflow_id1', 'skyflow_id2', 'skyflow_id3']; // Record IDs to delete +const tableName: string = 'sensitive_data_table'; // Table name in the vault schema -const options = { - // Optional -} +// Create Delete Request +const deleteRequest: DeleteRequest = new DeleteRequest( + tableName, + deleteIds +); ``` -[Example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/Delete.ts) to delete by ID using `skyflow_ids` +[Example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/Delete.ts) to delete by ID using `skyflowIds` -```js -const deleteInput = { - records: [ - { - id: "29ebda8d-5272-4063-af58-15cc674e332b", - table: "cards", - }, - { - id: "d5f4b926-7b1a-41df-8fac-7950d2cbd923", - table: "cards", - } - ], -}; +```typescript +// Prepare Delete Data +const deleteIds: Array = ['skyflow_id1', 'skyflow_id2']; // Record IDs to delete +const tableName: string = 'sensitive_data_table'; // Table name in the vault schema -const options = {}; +// Create Delete Request +const deleteRequest: DeleteRequest = new DeleteRequest( + tableName, + deleteIds +); -const response = skyflowClient.delete(deleteInput, options); -console.log(response); +// Perform Deletion +const response: DeleteResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .delete(deleteRequest); ``` Response: ```json { - "records": [ - { - "skyflow_id": "29ebda8d-5272-4063-af58-15cc674e332b", - "deleted": true, - }, - { - "skyflow_id": "29ebda8d-5272-4063-af58-15cc674e332b", - "deleted": true, - } - ] + "deletedIds": [ + "29ebda8d-5272-4063-af58-15cc674e332b", + "d5f4b926-7b1a-41df-8fac-7950d2cbd923", + ], + "errors": [], } ``` ### Invoke Connection -Using Connection, you can integrate your server-side application with third party APIs and services without directly handling sensitive data. Prior to using a connection, you have to create a connection and have a connectionURL already generated. Once you have the connectionURL, you can invoke a connection by using the `invokeConnection(config)` method. The config object must include a connectionURL and methodName. The other fields are optional. +Using Connection, you can integrate your server-side application with third party APIs and services without directly handling sensitive data. Prior to using a connection, you have to create a connection and have a connectionURL already generated. Once you have the connectionURL, you can invoke a connection by using the `invoke(request)` method. The config object must include a methodName. The other fields are optional. -```javascript -data = { - connectionURL: '', - methodName: Skyflow.RequestMethod.POST, - requestHeader: { - Authorization: '', - }, - pathParams: { - card_number: '', - }, - requestBody: { - expirationDate: { - mm: '01', - yy: '46', - }, - }, +```typescript +// Prepare Connection Request +const requestBody: StringKeyValueMapType = { + key1: 'value1', // Replace with actual key-value pairs + key2: 'value2' +}; + +const requestHeaders: StringKeyValueMapType = { + 'content-type': 'application/json' }; + +const requestMethod: RequestMethod = RequestMethod.POST; + +// Create Invoke Connection Request +const invokeReq: InvokeConnectionRequest = new InvokeConnectionRequest( + requestMethod, + requestBody, + requestHeaders +); + +// Invoke Connection +const response: InvokeConnectionResponse = await skyflowClient + .connection() + .invoke(invokeReq); + ``` Supported content-types for the response: @@ -740,45 +639,30 @@ Supported content-types for the response: Supported method names: -* GET: `Skyflow.RequestMethod.GET` -* POST: `Skyflow.RequestMethod.POST` -* PUT: `Skyflow.RequestMethod.PUT` -* PATCH: `Skyflow.RequestMethod.PATCH` -* DELETE: `Skyflow.RequestMethod.DELETE` +* GET: `RequestMethod.GET` +* POST: `RequestMethod.POST` +* PUT: `RequestMethod.PUT` +* PATCH: `RequestMethod.PATCH` +* DELETE: `RequestMethod.DELETE` -**pathParams, queryParams, requestHeader, requestBody** are the JSON objects that will be sent through the gateway integration URL. +**pathParams, queryParams, headers, body** are the JSON objects that will be sent through the gateway integration URL. #### Example: Invoke Connection -An [example](https://github.com/skyflowapi/skyflow-node/blob/main/samples/vault-api/InvokeConnection.ts) of `invokeConnection`: +An [example](https://github.com/skyflowapi/skyflow-node/blob/release/24.10.1/samples/vault-api/InvokeConnection.ts) of `invokeConnection`: -```javascript -const result = client.invokeConnection({ - connectionURL: '', - methodName: Skyflow.RequestMethod.POST, - requestHeader: { - 'Content-Type': 'application/json', - Authorization: '', - }, - pathParams: { - card_number: '', - }, - requestBody: { - expirationDate: { - mm: '01', - yy: '46', - }, - }, -}); +```typescript +// Create Invoke Connection Request +const invokeReq: InvokeConnectionRequest = new InvokeConnectionRequest( + requestMethod, + requestBody, + requestHeaders +); -result - .then(response => { - console.log(JSON.stringify(response)); - }) - .catch(error => { - // Note: only text/plain and application/json errors are supported - console.log(JSON.stringify(error)); - }); +// Invoke Connection +const response: InvokeConnectionResponse = await skyflowClient + .connection() + .invoke(invokeReq); ``` Sample response: @@ -803,7 +687,7 @@ The `generateBearerToken(filepath)` function takes the service account credentia Example using a service account credentials file path: -```javascript +```typescript import {generateBearerToken, isExpired} from 'skyflow-node'; const filepath = 'CREDENTIALS_FILE_PATH'; @@ -1190,15 +1074,37 @@ tokens(); ### Logging -The Skyflow Node.js SDK provides useful logging. By default the logging level of the SDK is set to `LogLevel.ERROR`. This can be changed by using `setLogLevel(logLevel)` as shown below: +The Skyflow Node.js SDK provides useful logging. By default the logging level of the SDK is set to `LogLevel.ERROR`. This can be changed by setting logLevel as shown below: -```javascript -import { setLogLevel, LogLevel } from 'skyflow-node'; +```typescript +import { LogLevel } from 'skyflow-node'; ``` -```javascript -// Sets the Skyflow SDK log level to INFO -setLogLevel(LogLevel.INFO); +```typescript +const client : Skyflow = Skyflow({ + vaultConfigs: [ + { + // Id of the vault that the client should connect to. + vaultId: 'string', + // Id of the cluster that the client should connect to. + clusterId: 'string', + // environment to which the vault ID belongs + env: Env.PROD, + // vault level credentials + credentials: { + roles: ['string', 'string'], // optional, IDs for roles + context: 'string', // optional, Id of the context + credentialsString: 'string', // credentials JSON as a stringified version + }, + } + ], + // environment to which the vault ID belongs + skyflowCredentials: { + path: 'string', // optional, path to credentials json file + }, + // Sets the Skyflow SDK log level to INFO + logLevel: LogLevel.INFO, +}); ``` Current the following 5 log levels are supported: diff --git a/babel.config.js b/babel.config.js index 35a03d2..7bcee91 100644 --- a/babel.config.js +++ b/babel.config.js @@ -22,7 +22,7 @@ module.exports = function (api) { ]; const plugins = [ ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], - ['@babel/plugin-proposal-class-properties'], + ['@babel/plugin-transform-class-properties'], ['@babel/transform-runtime'], ]; return { diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..3dd7929 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,20 @@ +module.exports = { + transform: { + '^.+\\.(ts|tsx)?$': 'ts-jest', + '^.+\\.(js|jsx)$': 'babel-jest', + }, + verbose: true, + collectCoverage: true, + coveragePathIgnorePatterns: [ + "/node_modules/", + "src/ _generated_", + "src/.*/model/request", + "src/.*/model/response", + "src/.*/model/options", + "src/utils/validations", + ], + testEnvironmentOptions: { + "url": "https://skyflow-test.com" + }, + testEnvironment: "node", + }; \ No newline at end of file diff --git a/jest.config.json b/jest.config.json deleted file mode 100644 index 4be640c..0000000 --- a/jest.config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "verbose": true, - "collectCoverage": true, - "testEnvironment": "jsdom", - "testTimeout": 3000, - "testEnvironmentOptions": { - "url": "https://skyflow-test.com" - }, - "moduleNameMapper":{ - "^.+\\.svg$": "/tests/__mocks__/fileMock.js" - } -} diff --git a/package-lock.json b/package-lock.json index 20b2df2..dcb0a8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1486 +1,1828 @@ { "name": "skyflow-node", "version": "1.14.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true - }, - "@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "packages": { + "": { + "name": "skyflow-node", + "version": "1.14.0", + "license": "MIT", + "dependencies": { + "axios": "^1.6.1", + "dotenv": "^16.4.5", + "jsonwebtoken": "^9.0.2", + "jwt-decode": "^2.2.0" + }, + "devDependencies": { + "@babel/plugin-proposal-decorators": "^7.25.7", + "@babel/plugin-transform-object-assign": "^7.25.7", + "@babel/plugin-transform-runtime": "^7.25.7", + "@babel/preset-env": "^7.25.8", + "@babel/preset-typescript": "^7.25.7", + "@types/jsonwebtoken": "^9.0.6", + "@types/node": "12.11.5 - 12.20.42", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "typescript": "^4.0 || ^5.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" } }, - "@babel/cli": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.23.4.tgz", - "integrity": "sha512-j3luA9xGKCXVyCa5R7lJvOMM+Kc2JEnAEIgz2ggtjQ/j5YUVgfsg/WsG95bbsgq7YLHuiCOzMnoSasuY16qiCw==", + "node_modules/@babel/code-frame": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.9.tgz", + "integrity": "sha512-z88xeGxnzehn2sqZ8UdGQEvYErF1odv2CftxInpSYJt6uHuPe9YjahKZITGs3l5LeI9d2ROG+obuDAoSlqbNfQ==", "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.17", - "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", - "chokidar": "^3.4.0", - "commander": "^4.0.1", - "convert-source-map": "^2.0.0", - "fs-readdir-recursive": "^1.1.0", - "glob": "^7.2.0", - "make-dir": "^2.1.0", - "slash": "^2.0.0" + "dependencies": { + "@babel/highlight": "^7.25.9", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "node_modules/@babel/compat-data": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.9.tgz", + "integrity": "sha512-yD+hEuJ/+wAJ4Ox2/rpNv5HIuPG82x3ZlQvYVn8iYCprdxzE7P1udpGF1jyjQVBU4dgznN+k2h103vxZ7NdPyw==", "dev": true, - "requires": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "engines": { + "node": ">=6.9.0" } }, - "@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==", - "dev": true - }, - "@babel/core": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz", - "integrity": "sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==", + "node_modules/@babel/core": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.9.tgz", + "integrity": "sha512-WYvQviPw+Qyib0v92AwNIrdLISTp7RfDkM7bPqBvpbnhY4wq8HvHBZREVdYDXk98C8BkOIVnHAY3yvj7AVISxQ==", "dev": true, - "requires": { + "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.5", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.5", - "@babel/parser": "^7.23.5", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.5", - "@babel/types": "^7.23.5", + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helpers": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" } }, - "@babel/generator": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", - "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", - "requires": { - "@babel/types": "^7.23.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "node_modules/@babel/generator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.9.tgz", + "integrity": "sha512-omlUGkr5EaoIJrhLf9CJ0TvjBRpd9+AXRG//0GEQ9THSo8wPiTlbpy1/Ow8ZTrbXpjd9FHXfbFQx32I04ht0FA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.9", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", "dev": true, - "requires": { - "@babel/types": "^7.22.5" + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", - "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==", + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.9.tgz", + "integrity": "sha512-C47lC7LIDCnz0h4vai/tpNOI95tCd5ZT3iBt/DBH5lXKHZsyNQv18yf1wIIg2ntiQNgmAvA+DgZ82iW8Qdym8g==", "dev": true, - "requires": { - "@babel/types": "^7.22.15" + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "node_modules/@babel/helper-compilation-targets": { + "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, - "requires": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "dependencies": { + "@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" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-create-class-features-plugin": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.5.tgz", - "integrity": "sha512-QELlRWxSpgdwdJzSJn4WAhKC+hvw/AtHbbrIoncKHkhKKR/luAlKkgBDcri1EzWAo8f8VvYVryEHN4tax/V67A==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.9.tgz", + "integrity": "sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/traverse": "^7.25.9", "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", - "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==", + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.9.tgz", + "integrity": "sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "regexpu-core": "^5.3.1", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "regexpu-core": "^6.1.1", "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/helper-define-polyfill-provider": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz", - "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==", + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", + "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", "@babel/helper-plugin-utils": "^7.22.5", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "@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 - }, - "@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==", + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", + "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@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==", + "node_modules/@babel/helper-module-imports": { + "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, - "requires": { - "@babel/types": "^7.22.5" + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-member-expression-to-functions": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", - "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "node_modules/@babel/helper-module-transforms": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.9.tgz", + "integrity": "sha512-TvLZY/F3+GvdRYFZFyxMvnsKi+4oJdgZzU3BoGN9Uc2d9C6zfNwJcKKhjqLAhK8i46mv93jsO74fDh3ih6rpHA==", "dev": true, - "requires": { - "@babel/types": "^7.23.0" + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-simple-access": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@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==", + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", + "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", "dev": true, - "requires": { - "@babel/types": "^7.22.15" + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@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==", + "node_modules/@babel/helper-plugin-utils": { + "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, - "requires": { - "@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" + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz", + "integrity": "sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==", "dev": true, - "requires": { - "@babel/types": "^7.22.5" + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-wrap-function": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@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 - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", - "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", + "node_modules/@babel/helper-replace-supers": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.9.tgz", + "integrity": "sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-wrap-function": "^7.22.20" + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/helper-replace-supers": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", - "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", + "node_modules/@babel/helper-simple-access": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.9.tgz", + "integrity": "sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==", "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.22.15", - "@babel/helper-optimise-call-expression": "^7.22.5" + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@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==", + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", + "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", "dev": true, - "requires": { - "@babel/types": "^7.22.5" + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", + "node_modules/@babel/helper-string-parser": { + "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, - "requires": { - "@babel/types": "^7.22.5" + "engines": { + "node": ">=6.9.0" } }, - "@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==", + "node_modules/@babel/helper-validator-identifier": { + "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, - "requires": { - "@babel/types": "^7.22.5" + "engines": { + "node": ">=6.9.0" } }, - "@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==" - }, - "@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==" - }, - "@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==", - "dev": true + "node_modules/@babel/helper-validator-option": { + "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" + } }, - "@babel/helper-wrap-function": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", - "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", + "node_modules/@babel/helper-wrap-function": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz", + "integrity": "sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==", "dev": true, - "requires": { - "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.15", - "@babel/types": "^7.22.19" + "dependencies": { + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helpers": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", - "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", + "node_modules/@babel/helpers": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.9.tgz", + "integrity": "sha512-oKWp3+usOJSzDZOucZUAMayhPz/xVjzymyDzUN8dk0Wd3RWMlGLXi07UCQ/CgQVb8LvXx3XBajJH4XGgkt7H7g==", "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.5", - "@babel/types": "^7.23.5" + "dependencies": { + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@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==", + "node_modules/@babel/highlight": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz", + "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==", "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/parser": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", - "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==" + "node_modules/@babel/parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.9.tgz", + "integrity": "sha512-aI3jjAAO1fh7vY/pBGsn1i9LDbRP43+asrRlkPuTXW5yHXtd1NgTEMudbBoDDxrf1daEEfPJqR+JBMakzrR4Dg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.9" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } }, - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz", - "integrity": "sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ==", + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz", + "integrity": "sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz", - "integrity": "sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ==", + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz", + "integrity": "sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.23.3" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz", - "integrity": "sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w==", + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz", + "integrity": "sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==", "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==", "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" } }, - "@babel/plugin-proposal-decorators": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.5.tgz", - "integrity": "sha512-6IsY8jOeWibsengGlWIezp7cuZEFzNlAghFpzh9wiZwhQ42/hRcPnY/QV9HJoKTlujupinSlnQPiEy/u2C1ZfQ==", + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz", + "integrity": "sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==", "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.23.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/plugin-syntax-decorators": "^7.23.3" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", - "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", + "node_modules/@babel/plugin-proposal-decorators": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.25.9.tgz", + "integrity": "sha512-smkNLL/O1ezy9Nhy4CNosc4Va+1wo5w4gzSZeLe6y6dM4mmHfYOCPolXQPHQxonZCF+ZyebxN9vqOolkYrSn5g==", "dev": true, - "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-decorators": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-private-property-in-object": { + "node_modules/@babel/plugin-proposal-private-property-in-object": { "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } }, - "@babel/plugin-syntax-async-generators": { + "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-bigint": { + "node_modules/@babel/plugin-syntax-bigint": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-class-properties": { + "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-class-static-block": { + "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, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-decorators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.23.3.tgz", - "integrity": "sha512-cf7Niq4/+/juY67E0PbgH0TDhLQ5J7zS8C/Q5FFx+DWyrRa9sUQdTXkjqKu8zGvuqr7vw1muKiukseihU+PJDA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "node_modules/@babel/plugin-syntax-decorators": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.25.9.tgz", + "integrity": "sha512-ryzI0McXUPJnRCvMo4lumIKZUzhYUO/ScI+Mz4YVaTLt04DHNSjEUjKVvbzQjZFLuod/cYEc07mJWhzl6v4DPg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-import-assertions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz", - "integrity": "sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw==", + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.9.tgz", + "integrity": "sha512-4GHX5uzr5QMOOuzV0an9MFju4hKlm0OyePl/lHhcsTVae5t/IKVHnb8W67Vr6FuLlk5lPqLB7n7O+K5R46emYg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-import-attributes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz", - "integrity": "sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA==", + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.9.tgz", + "integrity": "sha512-u3EN9ub8LyYvgTnrgp8gboElouayiwPdnM7x5tcnW3iSt09/lQYPwMNK40I9IUxo7QOZhAsPHCmmuO7EPdruqg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-import-meta": { + "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", "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-json-strings": { + "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-jsx": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", - "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "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, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-logical-assignment-operators": { + "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", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-nullish-coalescing-operator": { + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-numeric-separator": { + "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-object-rest-spread": { + "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-optional-catch-binding": { + "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-optional-chaining": { + "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-private-property-in-object": { + "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, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-top-level-await": { + "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", "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@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==", + "node_modules/@babel/plugin-syntax-typescript": { + "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, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-unicode-sets-regex": { + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz", - "integrity": "sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==", + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz", + "integrity": "sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-async-generator-functions": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.4.tgz", - "integrity": "sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw==", + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.9.tgz", + "integrity": "sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw==", "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.20", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-remap-async-to-generator": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz", - "integrity": "sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==", + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz", + "integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==", "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.20" + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-remap-async-to-generator": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz", - "integrity": "sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==", + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.9.tgz", + "integrity": "sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-block-scoping": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz", - "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==", + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz", + "integrity": "sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-class-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz", - "integrity": "sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg==", + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz", + "integrity": "sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==", "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-class-static-block": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz", - "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==", + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.9.tgz", + "integrity": "sha512-UIf+72C7YJ+PJ685/PpATbCz00XqiFEzHX5iysRwfvNT0Ko+FaXSvRgLytFSp8xUItrG9pFM/KoBBZDrY/cYyg==", "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" } }, - "@babel/plugin-transform-classes": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz", - "integrity": "sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg==", + "node_modules/@babel/plugin-transform-classes": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz", + "integrity": "sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-split-export-declaration": "^7.22.6", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/traverse": "^7.25.9", "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-computed-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz", - "integrity": "sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==", + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz", + "integrity": "sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/template": "^7.22.15" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/template": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-destructuring": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz", - "integrity": "sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==", + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz", + "integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz", - "integrity": "sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ==", + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz", + "integrity": "sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz", - "integrity": "sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA==", + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz", + "integrity": "sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-dynamic-import": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz", - "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==", + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz", - "integrity": "sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ==", + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz", + "integrity": "sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==", "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-export-namespace-from": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz", - "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==", + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.9.tgz", + "integrity": "sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-for-of": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.3.tgz", - "integrity": "sha512-X8jSm8X1CMwxmK878qsUGJRmbysKNbdpTv/O1/v0LuY/ZkZrng5WYiekYSdg9m09OTmDDUWeEDsTE+17WYbAZw==", + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz", + "integrity": "sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-function-name": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz", - "integrity": "sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==", + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.9.tgz", + "integrity": "sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==", "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-json-strings": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz", - "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==", + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz", + "integrity": "sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "dependencies": { + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz", - "integrity": "sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==", + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz", + "integrity": "sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-logical-assignment-operators": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz", - "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==", + "node_modules/@babel/plugin-transform-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz", + "integrity": "sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz", - "integrity": "sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==", + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz", + "integrity": "sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-modules-amd": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz", - "integrity": "sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw==", + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz", + "integrity": "sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz", - "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==", + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz", + "integrity": "sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5" + "dependencies": { + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz", - "integrity": "sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ==", + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.9.tgz", + "integrity": "sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg==", "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20" + "dependencies": { + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-simple-access": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-modules-umd": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz", - "integrity": "sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg==", + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz", + "integrity": "sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", - "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz", + "integrity": "sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-new-target": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz", - "integrity": "sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ==", + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz", - "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==", + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz", + "integrity": "sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-numeric-separator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz", - "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==", + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.9.tgz", + "integrity": "sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-object-assign": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.23.3.tgz", - "integrity": "sha512-TPJ6O7gVC2rlQH2hvQGRH273G1xdoloCj9Pc07Q7JbIZYDi+Sv5gaE2fu+r5E7qK4zyt6vj0FbZaZTRU5C3OMA==", + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz", + "integrity": "sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-object-rest-spread": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz", - "integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==", + "node_modules/@babel/plugin-transform-object-assign": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.25.9.tgz", + "integrity": "sha512-I/Vl1aQnPsrrn837oLbo+VQtkNcjuuiATqwmuweg4fTauwHHQoxyjmjjOVKyO8OaTxgqYTKW3LuQsykXjDf5Ag==", "dev": true, - "requires": { - "@babel/compat-data": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.23.3" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-object-super": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz", - "integrity": "sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==", + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz", + "integrity": "sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20" + "dependencies": { + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-optional-catch-binding": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz", - "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==", + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz", + "integrity": "sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-optional-chaining": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz", - "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==", + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz", + "integrity": "sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-parameters": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz", - "integrity": "sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==", + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-private-methods": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz", - "integrity": "sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==", + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz", + "integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==", "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-private-property-in-object": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz", - "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==", + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz", + "integrity": "sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-property-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz", - "integrity": "sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==", + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz", + "integrity": "sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-regenerator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz", - "integrity": "sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ==", + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz", + "integrity": "sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz", + "integrity": "sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", "regenerator-transform": "^0.15.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-reserved-words": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz", - "integrity": "sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg==", + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz", + "integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-runtime": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.4.tgz", - "integrity": "sha512-ITwqpb6V4btwUG0YJR82o2QvmWrLgDnx/p2A3CTPYGaRgULkDiC0DRA2C4jlRB9uXGUEfaSS/IGHfVW+ohzYDw==", + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.25.9.tgz", + "integrity": "sha512-nZp7GlEl+yULJrClz0SwHPqir3lc0zsPrDHQUcxGspSL7AKrexNSEfTbfqnDNJUO13bgKyfuOLMF8Xqtu8j3YQ==", "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "babel-plugin-polyfill-corejs2": "^0.4.6", - "babel-plugin-polyfill-corejs3": "^0.8.5", - "babel-plugin-polyfill-regenerator": "^0.5.3", + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.6", + "babel-plugin-polyfill-regenerator": "^0.6.1", "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz", - "integrity": "sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==", + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", + "integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-spread": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz", - "integrity": "sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==", + "node_modules/@babel/plugin-transform-spread": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz", + "integrity": "sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz", - "integrity": "sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg==", + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz", + "integrity": "sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-template-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz", - "integrity": "sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==", + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.9.tgz", + "integrity": "sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz", - "integrity": "sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ==", + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.9.tgz", + "integrity": "sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-typescript": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.5.tgz", - "integrity": "sha512-2fMkXEJkrmwgu2Bsv1Saxgj30IXZdJ+84lQcKKI7sm719oXs0BBw2ZENKdJdR1PjWndgLCEBNXJOri0fk7RYQA==", + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.9.tgz", + "integrity": "sha512-7PbZQZP50tzv2KGGnhh82GSyMB01yKY9scIjf1a+GfZCtInOWqUH5+1EBU4t9fyR5Oykkkc9vFTs4OHrhHXljQ==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.23.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-typescript": "^7.23.3" + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-syntax-typescript": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-unicode-escapes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz", - "integrity": "sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q==", + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz", + "integrity": "sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-unicode-property-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz", - "integrity": "sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA==", + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz", + "integrity": "sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz", - "integrity": "sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw==", + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz", + "integrity": "sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-unicode-sets-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz", - "integrity": "sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw==", + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz", + "integrity": "sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/preset-env": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.5.tgz", - "integrity": "sha512-0d/uxVD6tFGWXGDSfyMD1p2otoaKmu6+GD+NfAx0tMaH+dxORnp7T9TaVQ6mKyya7iBtCIVxHjWT7MuzzM9z+A==", + "node_modules/@babel/preset-env": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.9.tgz", + "integrity": "sha512-XqDEt+hfsQukahSX9JOBDHhpUHDhj2zGSxoqWQFCMajOSBnbhBdgON/bU/5PkBA1yX5tqW6tTzuIPVsZTQ7h5Q==", "dev": true, - "requires": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.23.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.3", + "dependencies": { + "@babel/compat-data": "^7.25.9", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.9", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.9", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.9", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.9", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.9", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.23.3", - "@babel/plugin-syntax-import-attributes": "^7.23.3", - "@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", + "@babel/plugin-syntax-import-assertions": "^7.25.9", + "@babel/plugin-syntax-import-attributes": "^7.25.9", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.23.3", - "@babel/plugin-transform-async-generator-functions": "^7.23.4", - "@babel/plugin-transform-async-to-generator": "^7.23.3", - "@babel/plugin-transform-block-scoped-functions": "^7.23.3", - "@babel/plugin-transform-block-scoping": "^7.23.4", - "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/plugin-transform-class-static-block": "^7.23.4", - "@babel/plugin-transform-classes": "^7.23.5", - "@babel/plugin-transform-computed-properties": "^7.23.3", - "@babel/plugin-transform-destructuring": "^7.23.3", - "@babel/plugin-transform-dotall-regex": "^7.23.3", - "@babel/plugin-transform-duplicate-keys": "^7.23.3", - "@babel/plugin-transform-dynamic-import": "^7.23.4", - "@babel/plugin-transform-exponentiation-operator": "^7.23.3", - "@babel/plugin-transform-export-namespace-from": "^7.23.4", - "@babel/plugin-transform-for-of": "^7.23.3", - "@babel/plugin-transform-function-name": "^7.23.3", - "@babel/plugin-transform-json-strings": "^7.23.4", - "@babel/plugin-transform-literals": "^7.23.3", - "@babel/plugin-transform-logical-assignment-operators": "^7.23.4", - "@babel/plugin-transform-member-expression-literals": "^7.23.3", - "@babel/plugin-transform-modules-amd": "^7.23.3", - "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-modules-systemjs": "^7.23.3", - "@babel/plugin-transform-modules-umd": "^7.23.3", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", - "@babel/plugin-transform-new-target": "^7.23.3", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", - "@babel/plugin-transform-numeric-separator": "^7.23.4", - "@babel/plugin-transform-object-rest-spread": "^7.23.4", - "@babel/plugin-transform-object-super": "^7.23.3", - "@babel/plugin-transform-optional-catch-binding": "^7.23.4", - "@babel/plugin-transform-optional-chaining": "^7.23.4", - "@babel/plugin-transform-parameters": "^7.23.3", - "@babel/plugin-transform-private-methods": "^7.23.3", - "@babel/plugin-transform-private-property-in-object": "^7.23.4", - "@babel/plugin-transform-property-literals": "^7.23.3", - "@babel/plugin-transform-regenerator": "^7.23.3", - "@babel/plugin-transform-reserved-words": "^7.23.3", - "@babel/plugin-transform-shorthand-properties": "^7.23.3", - "@babel/plugin-transform-spread": "^7.23.3", - "@babel/plugin-transform-sticky-regex": "^7.23.3", - "@babel/plugin-transform-template-literals": "^7.23.3", - "@babel/plugin-transform-typeof-symbol": "^7.23.3", - "@babel/plugin-transform-unicode-escapes": "^7.23.3", - "@babel/plugin-transform-unicode-property-regex": "^7.23.3", - "@babel/plugin-transform-unicode-regex": "^7.23.3", - "@babel/plugin-transform-unicode-sets-regex": "^7.23.3", + "@babel/plugin-transform-arrow-functions": "^7.25.9", + "@babel/plugin-transform-async-generator-functions": "^7.25.9", + "@babel/plugin-transform-async-to-generator": "^7.25.9", + "@babel/plugin-transform-block-scoped-functions": "^7.25.9", + "@babel/plugin-transform-block-scoping": "^7.25.9", + "@babel/plugin-transform-class-properties": "^7.25.9", + "@babel/plugin-transform-class-static-block": "^7.25.9", + "@babel/plugin-transform-classes": "^7.25.9", + "@babel/plugin-transform-computed-properties": "^7.25.9", + "@babel/plugin-transform-destructuring": "^7.25.9", + "@babel/plugin-transform-dotall-regex": "^7.25.9", + "@babel/plugin-transform-duplicate-keys": "^7.25.9", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-dynamic-import": "^7.25.9", + "@babel/plugin-transform-exponentiation-operator": "^7.25.9", + "@babel/plugin-transform-export-namespace-from": "^7.25.9", + "@babel/plugin-transform-for-of": "^7.25.9", + "@babel/plugin-transform-function-name": "^7.25.9", + "@babel/plugin-transform-json-strings": "^7.25.9", + "@babel/plugin-transform-literals": "^7.25.9", + "@babel/plugin-transform-logical-assignment-operators": "^7.25.9", + "@babel/plugin-transform-member-expression-literals": "^7.25.9", + "@babel/plugin-transform-modules-amd": "^7.25.9", + "@babel/plugin-transform-modules-commonjs": "^7.25.9", + "@babel/plugin-transform-modules-systemjs": "^7.25.9", + "@babel/plugin-transform-modules-umd": "^7.25.9", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-new-target": "^7.25.9", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.9", + "@babel/plugin-transform-numeric-separator": "^7.25.9", + "@babel/plugin-transform-object-rest-spread": "^7.25.9", + "@babel/plugin-transform-object-super": "^7.25.9", + "@babel/plugin-transform-optional-catch-binding": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9", + "@babel/plugin-transform-private-methods": "^7.25.9", + "@babel/plugin-transform-private-property-in-object": "^7.25.9", + "@babel/plugin-transform-property-literals": "^7.25.9", + "@babel/plugin-transform-regenerator": "^7.25.9", + "@babel/plugin-transform-reserved-words": "^7.25.9", + "@babel/plugin-transform-shorthand-properties": "^7.25.9", + "@babel/plugin-transform-spread": "^7.25.9", + "@babel/plugin-transform-sticky-regex": "^7.25.9", + "@babel/plugin-transform-template-literals": "^7.25.9", + "@babel/plugin-transform-typeof-symbol": "^7.25.9", + "@babel/plugin-transform-unicode-escapes": "^7.25.9", + "@babel/plugin-transform-unicode-property-regex": "^7.25.9", + "@babel/plugin-transform-unicode-regex": "^7.25.9", + "@babel/plugin-transform-unicode-sets-regex": "^7.25.9", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.6", - "babel-plugin-polyfill-corejs3": "^0.8.5", - "babel-plugin-polyfill-regenerator": "^0.5.3", - "core-js-compat": "^3.31.0", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.6", + "babel-plugin-polyfill-regenerator": "^0.6.1", + "core-js-compat": "^3.38.1", "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/preset-modules": { + "node_modules/@babel/preset-modules": { "version": "0.1.6-no-external-plugins", "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/types": "^7.4.4", "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" } }, - "@babel/preset-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz", - "integrity": "sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", - "@babel/plugin-syntax-jsx": "^7.23.3", - "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-typescript": "^7.23.3" - } - }, - "@babel/register": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.22.15.tgz", - "integrity": "sha512-V3Q3EqoQdn65RCgTLwauZaTfd1ShhwPmbBv+1dkZV/HpCGMKVyn6oFcRlI7RaKqiDQjX2Qd3AuoEguBgdjIKlg==", + "node_modules/@babel/preset-typescript": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.25.9.tgz", + "integrity": "sha512-XWxw1AcKk36kgxf4C//fl0ikjLeqGUWn062/Fd8GtpTfDJOX6Ud95FK+4JlDA36BX4bNGndXi3a6Vr4Jo5/61A==", "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "find-cache-dir": "^2.0.0", - "make-dir": "^2.1.0", - "pirates": "^4.0.5", - "source-map-support": "^0.5.16" + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.25.9", + "@babel/plugin-transform-modules-commonjs": "^7.25.9", + "@babel/plugin-transform-typescript": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", - "dev": true - }, - "@babel/runtime": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz", - "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==", + "node_modules/@babel/runtime": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.9.tgz", + "integrity": "sha512-4zpTHZ9Cm6L9L+uIqghQX8ZXg8HKFcjYO3qHoO8zTmRm6HQUJ8SSJ+KRvbMBZn0EGVlT4DRYeQ/6hjlyXBh+Kg==", "dev": true, - "requires": { + "dependencies": { "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "node_modules/@babel/template": { + "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, - "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/traverse": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", - "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", + "node_modules/@babel/traverse": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", "dev": true, - "requires": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.5", - "@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.5", - "@babel/types": "^7.23.5", - "debug": "^4.1.0", + "dependencies": { + "@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" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/types": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", - "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", - "requires": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "node_modules/@babel/types": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.9.tgz", + "integrity": "sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "@bcoe/v8-coverage": { + "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^3.3.0" - } - }, - "@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - } - } - }, - "@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", - "dev": true - }, - "@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { + "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", "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", "get-package-type": "^0.1.0", "js-yaml": "^3.13.1", "resolve-from": "^5.0.0" }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "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 - }, - "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, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } + "engines": { + "node": ">=8" } }, - "@istanbuljs/schema": { + "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "@jest/console": { + "node_modules/@jest/console": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, - "requires": { + "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", @@ -1488,70 +1830,86 @@ "jest-util": "^29.7.0", "slash": "^3.0.0" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/console/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/console/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/console/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/console/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/@jest/console/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/@jest/console/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": ">=8" } }, - "@jest/core": { + "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, - "requires": { + "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -1581,133 +1939,166 @@ "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, - "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } + "engines": { + "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 } } }, - "@jest/environment": { + "node_modules/@jest/core/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/core/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/core/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/core/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/@jest/core/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/@jest/core/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": ">=8" + } + }, + "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, - "requires": { + "dependencies": { "@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" } }, - "@jest/expect": { + "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, - "requires": { + "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "@jest/expect-utils": { + "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, - "requires": { + "dependencies": { "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "@jest/fake-timers": { + "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, - "requires": { + "dependencies": { "@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": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "@jest/globals": { + "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, - "requires": { + "dependencies": { "@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" } }, - "@jest/reporters": { + "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, - "requires": { + "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -1733,122 +2124,150 @@ "strip-ansi": "^6.0.0", "v8-to-istanbul": "^9.0.1" }, - "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } + "engines": { + "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 } } }, - "@jest/schemas": { + "node_modules/@jest/reporters/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/reporters/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/reporters/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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": ">=8" + } + }, + "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, - "requires": { + "dependencies": { "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "@jest/source-map": { + "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, - "requires": { + "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "@jest/test-result": { + "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, - "requires": { + "dependencies": { "@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" } }, - "@jest/test-sequencer": { + "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, - "requires": { + "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "slash": "^3.0.0" }, - "dependencies": { - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - } + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "@jest/transform": { + "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, - "requires": { + "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", @@ -1865,70 +2284,86 @@ "slash": "^3.0.0", "write-file-atomic": "^4.0.2" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/transform/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/transform/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "@jest/types": { + "node_modules/@jest/transform/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/@jest/transform/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/@jest/transform/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": ">=8" + } + }, + "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, - "requires": { + "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", @@ -1936,179 +2371,158 @@ "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/types/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": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "node_modules/@jest/types/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==" + "node_modules/@jest/types/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 }, - "@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==" - }, - "@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==" - }, - "@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "node_modules/@jest/types/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/@jest/types/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": ">=8" } }, - "@jsdoc/salty": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.7.tgz", - "integrity": "sha512-mh8LbS9d4Jq84KLw8pzho7XC2q2/IJGiJss3xwRoLD1A+EE16SjN4PfaG4jRCzKegTFLlN0Zd8SdUPE6XdoPFg==", + "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, - "requires": { - "lodash": "^4.17.21" + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" } }, - "@nicolo-ribaudo/chokidar-2": { - "version": "2.1.8-no-fsevents.3", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", - "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", + "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, - "optional": true + "engines": { + "node": ">=6.0.0" + } }, - "@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==", + "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, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "engines": { + "node": ">=6.0.0" } }, - "@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==", + "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 }, - "@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/@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, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "@sinclair/typebox": { + "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 }, - "@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "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, - "requires": { + "dependencies": { "type-detect": "4.0.8" } }, - "@sinonjs/fake-timers": { + "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, - "requires": { + "dependencies": { "@sinonjs/commons": "^3.0.0" } }, - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true - }, - "@types/axios": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@types/axios/-/axios-0.14.0.tgz", - "integrity": "sha512-KqQnQbdYE54D7oa/UmYVMZKq7CO4l8DEENzOKc4aBRwxCXSlJXGz83flFx5L7AWrOQnmuN3kVsRdt+GZPPjiVQ==", - "dev": true, - "requires": { - "axios": "*" - } - }, - "@types/babel__core": { + "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, - "requires": { + "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", @@ -2116,421 +2530,188 @@ "@types/babel__traverse": "*" } }, - "@types/babel__generator": { - "version": "7.6.7", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.7.tgz", - "integrity": "sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==", + "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, - "requires": { + "dependencies": { "@babel/types": "^7.0.0" } }, - "@types/babel__template": { + "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, - "requires": { + "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, - "@types/babel__traverse": { - "version": "7.20.4", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz", - "integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==", + "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, - "requires": { + "dependencies": { "@babel/types": "^7.20.7" } }, - "@types/form-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.5.0.tgz", - "integrity": "sha512-23/wYiuckYYtFpL+4RPWiWmRQH2BjFuqCUi2+N3amB1a1Drv+i/byTrGvlLwRVLFNAZbwpbQ7JvTK+VCAPMbcg==", - "dev": true, - "requires": { - "form-data": "*" - } - }, - "@types/graceful-fs": { + "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, - "requires": { + "dependencies": { "@types/node": "*" } }, - "@types/istanbul-lib-coverage": { + "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 }, - "@types/istanbul-lib-report": { + "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, - "requires": { + "dependencies": { "@types/istanbul-lib-coverage": "*" } }, - "@types/istanbul-reports": { + "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, - "requires": { + "dependencies": { "@types/istanbul-lib-report": "*" } }, - "@types/jsdom": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", - "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", - "dev": true, - "requires": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, - "@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "@types/jsonwebtoken": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.5.tgz", - "integrity": "sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==", + "node_modules/@types/jsonwebtoken": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.7.tgz", + "integrity": "sha512-ugo316mmTYBl2g81zDFnZ7cfxlut3o+/EQdaP7J8QN2kY6lJ22hmQYCK5EHcJHbrW+dkCGSCPgbG8JtYj6qSrg==", "dev": true, - "requires": { + "dependencies": { "@types/node": "*" } }, - "@types/jwt-decode": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/jwt-decode/-/jwt-decode-3.1.0.tgz", - "integrity": "sha512-tthwik7TKkou3mVnBnvVuHnHElbjtdbM63pdBCbZTirCt3WAdM73Y79mOri7+ljsS99ZVwUFZHLMxJuJnv/z1w==", - "dev": true, - "requires": { - "jwt-decode": "*" - } - }, - "@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 - }, - "@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, - "requires": { - "@types/linkify-it": "*", - "@types/mdurl": "*" - } - }, - "@types/mdurl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", - "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", - "dev": true - }, - "@types/node": { - "version": "16.18.67", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.67.tgz", - "integrity": "sha512-gUa0tDO9oxyAYO9V9tqxDJguVMDpqUwH5I5Q9ASYBCso+8CUdJlKPKDYS1YSS9kyZWIduDafZvucGM0zGNKFjg==", - "dev": true - }, - "@types/qs": { - "version": "6.9.10", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.10.tgz", - "integrity": "sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==", + "node_modules/@types/node": { + "version": "12.20.42", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.42.tgz", + "integrity": "sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw==", "dev": true }, - "@types/stack-utils": { + "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 }, - "@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==", - "dev": true - }, - "@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/@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, - "requires": { + "dependencies": { "@types/yargs-parser": "*" } }, - "@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==", "dev": true }, - "@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "Base64": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-1.3.0.tgz", - "integrity": "sha512-7BjEEmnnW5pm6mBXKQ8CfQFeVjSoFnB507R86mKaJqa2i8CvosDy/dj+9RpbD0A22XQ+hGb0FHO+226C0QXRGw==" - }, - "abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", - "dev": true - }, - "acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "dev": true - }, - "acorn-globals": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", - "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", - "dev": true, - "requires": { - "acorn": "^8.1.0", - "acorn-walk": "^8.0.2" - } - }, - "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 - }, - "acorn-walk": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", - "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", - "dev": true - }, - "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, - "requires": { - "debug": "4" - } - }, - "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, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "optional": true - }, - "ansi-escapes": { + "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, - "requires": { + "dependencies": { "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "ansi-regex": { + "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 - }, - "ansi-sequence-parser": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", - "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "ansi-styles": { + "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, - "requires": { + "dependencies": { "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" } }, - "anymatch": { + "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, - "requires": { + "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "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, - "requires": { - "default-require-extensions": "^3.0.0" - } - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", - "dev": true - }, - "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 - }, - "array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "requires": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - } - }, - "array.prototype.map": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.6.tgz", - "integrity": "sha512-nK1psgF2cXqP3wSyCSq0Hc7zwNq3sfljQqaG27r/7a7ooNUnn5nGq6yYWyks9jMO5EoFQ0ax80hSg6oXSRNXaw==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - } - }, - "arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", - "requires": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", - "is-shared-array-buffer": "^1.0.2" - } - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } + "dependencies": { + "sprintf-js": "~1.0.2" } }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", "dev": true }, - "asynckit": { + "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" - }, - "axios": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", - "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", - "requires": { + "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" } }, - "babel-jest": { + "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, - "requires": { + "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", @@ -2539,785 +2720,472 @@ "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, - "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" } }, - "babel-loader": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", - "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", - "dev": true, - "requires": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" - }, - "dependencies": { - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "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, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - } + "node_modules/babel-jest/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/babel-jest/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/babel-jest/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/babel-jest/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/babel-jest/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/babel-jest/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": ">=8" } }, - "babel-plugin-istanbul": { + "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, - "requires": { + "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-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": { - "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, - "requires": { - "@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" - } - } + "@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" } }, - "babel-plugin-jest-hoist": { + "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, - "requires": { + "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": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "babel-plugin-polyfill-corejs2": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", - "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==", + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", + "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", "dev": true, - "requires": { + "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.4.3", + "@babel/helper-define-polyfill-provider": "^0.6.2", "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "babel-plugin-polyfill-corejs3": { - "version": "0.8.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz", - "integrity": "sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==", + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", + "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==", "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.4.3", - "core-js-compat": "^3.33.1" + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.2", + "core-js-compat": "^3.38.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "babel-plugin-polyfill-regenerator": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", - "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==", + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", + "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.4.3" + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "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==", + "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, - "requires": { + "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-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.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.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-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "babel-preset-jest": { + "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, - "requires": { + "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "balanced-match": { + "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 }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "brace-expansion": { + "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, - "requires": { + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" } }, - "browserify-sign": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz", - "integrity": "sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==", + "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, - "requires": { - "bn.js": "^5.2.1", - "browserify-rsa": "^4.1.0", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.4", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.6", - "readable-stream": "^3.6.2", - "safe-buffer": "^5.2.1" + "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.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" } }, - "bser": { + "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, - "requires": { + "dependencies": { "node-int64": "^0.4.0" } }, - "buffer-equal-constant-time": { + "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==" }, - "buffer-from": { + "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 }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true - }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "dependencies": { - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - } - } - }, - "call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", - "requires": { - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", - "dev": true, - "requires": { - "callsites": "^2.0.0" - }, - "dependencies": { - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", - "dev": true - } - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { + "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 + "dev": true, + "engines": { + "node": ">=6" + } }, - "camelcase": { + "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 - }, - "caniuse-lite": { - "version": "1.0.30001566", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz", - "integrity": "sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==", - "dev": true - }, - "catharsis": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", - "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", "dev": true, - "requires": { - "lodash": "^4.17.15" + "engines": { + "node": ">=6" } }, - "chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "node_modules/caniuse-lite": { + "version": "1.0.30001669", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", + "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.0.8" - } + "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" + } + ] }, - "chalk": { + "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, - "requires": { + "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" } }, - "char-regex": { + "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 - }, - "check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, - "requires": { - "get-func-name": "^2.0.2" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "engines": { + "node": ">=10" } }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "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, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" } }, - "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==", - "dev": true - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "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 }, - "cliui": { + "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, - "requires": { + "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, - "co": { + "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 + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } }, - "collect-v8-coverage": { + "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 }, - "color-convert": { + "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, - "requires": { + "dependencies": { "color-name": "1.1.3" } }, - "color-name": { + "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 }, - "combined-stream": { + "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==", - "requires": { + "dependencies": { "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" } }, - "commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "concat-map": { + "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 }, - "convert-source-map": { + "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 }, - "core-js": { - "version": "3.33.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.3.tgz", - "integrity": "sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw==" - }, - "core-js-compat": { - "version": "3.33.3", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.3.tgz", - "integrity": "sha512-cNzGqFsh3Ot+529GIXacjTJ7kegdt5fPXxCBVS1G0iaZpuo/tBz399ymceLJveQhFFZ8qThHiP3fzuoQjKN2ow==", - "dev": true, - "requires": { - "browserslist": "^4.22.1" - } - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "node_modules/core-js-compat": { + "version": "3.38.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", + "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "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 - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", - "dev": true - } - } - }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" + "browserslist": "^4.23.3" }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" } }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "create-jest": { + "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, - "requires": { + "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", "exit": "^0.1.2", @@ -3326,2040 +3194,904 @@ "jest-util": "^29.7.0", "prompts": "^2.0.1" }, - "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "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, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "cssom": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", - "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", - "dev": true - }, - "cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "node_modules/create-jest/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, - "requires": { - "cssom": "~0.3.6" - }, "dependencies": { - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "data-urls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", - "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", + "node_modules/create-jest/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, - "requires": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0" + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/create-jest/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, - "requires": { - "ms": "2.1.2" + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "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 - }, - "decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true - }, - "dedent": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "node_modules/create-jest/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 }, - "deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "node_modules/create-jest/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, - "requires": { - "type-detect": "^4.0.0" + "engines": { + "node": ">=8" } }, - "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/create-jest/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": ">=8" + } }, - "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 + "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": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } }, - "default-require-extensions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", - "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, - "requires": { - "strip-bom": "^4.0.0" + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", - "requires": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "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 + } } }, - "define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "requires": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "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" } }, - "delayed-stream": { + "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" } }, - "detect-newline": { + "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 + "dev": true, + "engines": { + "node": ">=8" + } }, - "diff-sequences": { + "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 - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "requires": { - "esutils": "^2.0.2" + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "dev": true, - "requires": { - "webidl-conversions": "^7.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": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, - "ecdsa-sig-formatter": { + "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==", - "requires": { + "dependencies": { "safe-buffer": "^5.0.1" } }, - "electron-to-chromium": { - "version": "1.4.601", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.601.tgz", - "integrity": "sha512-SpwUMDWe9tQu8JX5QCO1+p/hChAi9AE9UpoC3rcHVc+gdCGlbT3SGb5I1klgb952HRIyvt9wZhSz9bNBYz9swA==", - "dev": true - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" } }, - "emittery": { + "node_modules/electron-to-chromium": { + "version": "1.5.43", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.43.tgz", + "integrity": "sha512-NxnmFBHDl5Sachd2P46O7UJiMaMHMLSofoIWVJq3mj8NJgG0umiSeljAVP9lGzjI0UDLJJ5jjoGjcrB8RSbjLQ==", + "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 + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } }, - "emoji-regex": { + "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 }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, - "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, - "requires": { - "once": "^1.4.0" - } - }, - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true - }, - "error-ex": { + "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, - "requires": { + "dependencies": { "is-arrayish": "^0.2.1" } }, - "es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "requires": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" - } - }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" - }, - "es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - } - }, - "es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", - "requires": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "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, + "engines": { + "node": ">=6" } }, - "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 - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { + "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 - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.55.0", - "@humanwhocodes/config-array": "^0.11.13", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - } - } - }, - "eslint-plugin-sonarjs": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.13.0.tgz", - "integrity": "sha512-t3m7ta0EspzDxSOZh3cEOJIJVZgN/TlJYaBGnQlK6W/PZNbWep8q4RQskkJkA7/zwNpX0BaoEOSUUrqaADVoqA==", - "dev": true - }, - "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "engines": { + "node": ">=0.8.0" } }, - "eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true - }, - "esm": { - "version": "3.2.25", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", - "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" - }, - "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "requires": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "dev": true - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "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/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, - "requires": { - "estraverse": "^5.2.0" + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" } }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "esutils": { + "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 - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "engines": { + "node": ">=0.10.0" } }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "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, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "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 - }, - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - }, - "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, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "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 - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } + "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": { + "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": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "exit": { + "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 + "dev": true, + "engines": { + "node": ">= 0.8.0" + } }, - "expect": { + "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, - "requires": { + "dependencies": { "@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": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "expect.js": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/expect.js/-/expect.js-0.3.1.tgz", - "integrity": "sha512-okDF/FAPEul1ZFLae4hrgpIqAeapoo5TRdcg/lD0iN9S3GWrBFIJwNezGH1DMtIz+RxU4RrFmMq7WUUvDg3J6A==", - "dev": true - }, - "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 - }, - "fast-json-stable-stringify": { + "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 }, - "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 - }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fb-watchman": { + "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, - "requires": { + "dependencies": { "bser": "2.1.1" } }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", "dev": true, - "requires": { - "flat-cache": "^3.0.4" + "dependencies": { + "minimatch": "^5.0.1" } }, - "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==", + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "requires": { - "to-regex-range": "^5.0.1" + "dependencies": { + "balanced-match": "^1.0.0" } }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "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, - "requires": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true - }, - "follow-redirects": { + "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==" - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "requires": { - "is-callable": "^1.1.3" - } - }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } } }, - "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==", - "requires": { + "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", "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" } }, - "fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true - }, - "fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true - }, - "fs.realpath": { + "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 }, - "fsevents": { + "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, - "optional": true + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, - "function-bind": { + "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==" - }, - "function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" - }, - "gensync": { + "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 + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "get-caller-file": { + "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 - }, - "get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true - }, - "get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", - "requires": { - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" } }, - "get-package-type": { + "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 - }, - "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 - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, - "requires": { - "pump": "^3.0.0" + "engines": { + "node": ">=8.0.0" } }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "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, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "glob": { + "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "requires": { + "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" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "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, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { + "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "requires": { - "define-properties": "^1.1.3" - } - }, - "gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "requires": { - "get-intrinsic": "^1.1.3" - } - }, - "graceful-fs": { + "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 }, - "graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" - }, - "has-flag": { + "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 - }, - "has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", - "requires": { - "get-intrinsic": "^1.2.2" - } - }, - "has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "requires": { - "has-symbols": "^1.0.2" - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "engines": { + "node": ">=4" } }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, "dependencies": { - "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 - }, - "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 - } - } - }, - "hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "requires": { "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" } }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "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 - }, - "html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "dev": true, - "requires": { - "whatwg-encoding": "^2.0.0" - } - }, - "html-escaper": { + "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 }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, - "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, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "human-signals": { + "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 - }, - "husky": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-1.3.1.tgz", - "integrity": "sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg==", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.7", - "execa": "^1.0.0", - "find-up": "^3.0.0", - "get-stdin": "^6.0.0", - "is-ci": "^2.0.0", - "pkg-dir": "^3.0.0", - "please-upgrade-node": "^3.1.1", - "read-pkg": "^4.0.1", - "run-node": "^1.0.0", - "slash": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - } - } - }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", - "dev": true - }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, - "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, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "engines": { + "node": ">=10.17.0" } }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "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, - "requires": { + "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" }, - "dependencies": { - "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, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - } + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "imurmurhash": { + "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "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 + "dev": true, + "engines": { + "node": ">=0.8.19" + } }, - "inflight": { + "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==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "requires": { + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", - "requires": { - "get-intrinsic": "^1.2.2", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - } - }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - } - }, - "is-arrayish": { + "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 }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" - }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "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/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, - "requires": { - "hasown": "^2.0.0" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "requires": { - "has-tostringtag": "^1.0.0" + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-fullwidth-code-point": { + "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 + "dev": true, + "engines": { + "node": ">=8" + } }, - "is-generator-fn": { + "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 - }, - "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, - "requires": { - "is-extglob": "^2.1.1" + "engines": { + "node": ">=6" } }, - "is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==" - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==" - }, - "is-number": { + "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 - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "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 - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==" - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "requires": { - "has-symbols": "^1.0.2" + "engines": { + "node": ">=0.12.0" } }, - "is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", - "requires": { - "which-typed-array": "^1.1.11" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "requires": { - "call-bind": "^1.0.2" + "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": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "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 - }, - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - }, - "isexe": { + "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha512-nMtdn4hvK0HjUlzr1DrKSUY8ychprt8dzHOgY2KXsIhHu5PuQQEOTM27gV9Xblyon7aUH/TSFIjRHEODF/FRPg==", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "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 - } - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "istanbul-lib-coverage": { + "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 - }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, - "requires": { - "append-transform": "^2.0.0" + "engines": { + "node": ">=8" } }, - "istanbul-lib-instrument": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", - "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", + "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, - "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", + "dependencies": { + "@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" }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } + "engines": { + "node": ">=10" } }, - "istanbul-lib-processinfo": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", - "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "istanbul-lib-report": { + "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, - "requires": { + "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/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/istanbul-lib-report/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": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "requires": { - "semver": "^7.5.3" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "istanbul-lib-source-maps": { + "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, - "requires": { + "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "engines": { + "node": ">=10" } }, - "istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "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, - "requires": { + "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "iterate-iterator": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.2.tgz", - "integrity": "sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw==" + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } }, - "iterate-value": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", - "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", - "requires": { - "es-get-iterator": "^1.0.2", - "iterate-iterator": "^1.0.1" + "node_modules/jake/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jake/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jake/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jake/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/jake/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/jake/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": ">=8" } }, - "jest": { + "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, - "requires": { + "dependencies": { "@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": "^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 + } } }, - "jest-changed-files": { + "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, - "requires": { + "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", "p-limit": "^3.1.0" }, - "dependencies": { - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "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-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 - }, - "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 - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - } + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "jest-circus": { + "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, - "requires": { + "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -5381,70 +4113,86 @@ "slash": "^3.0.0", "stack-utils": "^2.0.3" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-circus/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-circus/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-circus/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/jest-circus/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" } }, - "jest-cli": { + "node_modules/jest-circus/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": ">=8" + } + }, + "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, - "requires": { + "dependencies": { "@jest/core": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", @@ -5457,64 +4205,97 @@ "jest-validate": "^29.7.0", "yargs": "^17.3.1" }, - "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "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 } } }, - "jest-config": { + "node_modules/jest-cli/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-cli/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-cli/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-cli/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/jest-cli/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/jest-cli/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": ">=8" + } + }, + "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, - "requires": { + "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", "@jest/types": "^29.6.3", @@ -5538,353 +4319,430 @@ "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, + "engines": { + "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-config/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-config/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-config/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": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-config/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/jest-config/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/jest-config/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": ">=8" } }, - "jest-diff": { + "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, - "requires": { + "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-diff/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-diff/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-diff/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-diff/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/jest-diff/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/jest-diff/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": ">=8" } }, - "jest-docblock": { + "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, - "requires": { + "dependencies": { "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "jest-each": { + "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, - "requires": { + "dependencies": { "@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": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "jest-environment-jsdom": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", - "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", + "node_modules/jest-each/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, - "requires": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/jsdom": "^20.0.0", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0", - "jsdom": "^20.0.0" + "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/jest-each/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-each/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/jest-each/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" } }, - "jest-environment-node": { + "node_modules/jest-each/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": ">=8" + } + }, + "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, - "requires": { + "dependencies": { "@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" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "jest-get-type": { + "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 + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } }, - "jest-haste-map": { + "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, - "requires": { + "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", "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": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "jest-leak-detector": { + "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, - "requires": { + "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "jest-matcher-utils": { + "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, - "requires": { + "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-matcher-utils/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-matcher-utils/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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": ">=8" } }, - "jest-message-util": { + "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, - "requires": { + "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", @@ -5895,93 +4753,126 @@ "slash": "^3.0.0", "stack-utils": "^2.0.3" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-message-util/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-message-util/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-message-util/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/jest-message-util/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/jest-message-util/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": ">=8" } }, - "jest-mock": { + "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, - "requires": { + "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "jest-pnp-resolver": { + "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 + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } }, - "jest-regex-util": { + "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 + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } }, - "jest-resolve": { + "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, - "requires": { + "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", @@ -5992,80 +4883,99 @@ "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "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-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-resolve/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-resolve/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "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==", + "node_modules/jest-resolve/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/jest-resolve/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, - "requires": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-resolve/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": ">=8" } }, - "jest-runner": { + "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, - "requires": { + "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -6088,80 +4998,86 @@ "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-runner/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-runner/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-runner/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/jest-runner/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/jest-runner/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": ">=8" } }, - "jest-runtime": { + "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, - "requires": { + "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", "@jest/globals": "^29.7.0", @@ -6185,70 +5101,86 @@ "slash": "^3.0.0", "strip-bom": "^4.0.0" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-runtime/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-runtime/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-runtime/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/jest-runtime/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/jest-runtime/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": ">=8" } }, - "jest-snapshot": { + "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, - "requires": { + "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", @@ -6270,88 +5202,98 @@ "pretty-format": "^29.7.0", "semver": "^7.5.3" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-snapshot/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-snapshot/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-snapshot/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/jest-snapshot/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/jest-snapshot/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "jest-util": { + "node_modules/jest-snapshot/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": ">=8" + } + }, + "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, - "requires": { + "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", @@ -6359,70 +5301,86 @@ "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-util/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": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.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/jest-util/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-util/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/jest-util/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" } }, - "jest-validate": { + "node_modules/jest-util/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": ">=8" + } + }, + "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, - "requires": { + "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", @@ -6430,70 +5388,98 @@ "leven": "^3.1.0", "pretty-format": "^29.7.0" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-validate/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-validate/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-validate/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/jest-validate/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/jest-validate/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": ">=8" } }, - "jest-watcher": { + "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, - "requires": { + "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", @@ -6503,267 +5489,173 @@ "jest-util": "^29.7.0", "string-length": "^4.0.1" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-watcher/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-watcher/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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-watcher/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-watcher/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/jest-watcher/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/jest-watcher/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": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - } + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "jest-worker": { + "node_modules/jest-worker": { "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, - "requires": { + "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/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/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, "dependencies": { - "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 - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "js-tokens": { + "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==", "dev": true }, - "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/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "requires": { - "argparse": "^2.0.1" + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "js2xmlparser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", - "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "node_modules/jsesc": { + "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, - "requires": { - "xmlcreate": "^2.0.4" - } - }, - "jsdoc": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", - "integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==", - "dev": true, - "requires": { - "@babel/parser": "^7.20.15", - "@jsdoc/salty": "^0.2.1", - "@types/markdown-it": "^12.2.3", - "bluebird": "^3.7.2", - "catharsis": "^0.9.0", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.2", - "klaw": "^3.0.0", - "markdown-it": "^12.3.2", - "markdown-it-anchor": "^8.4.1", - "marked": "^4.0.10", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "underscore": "~1.13.2" - }, - "dependencies": { - "escape-string-regexp": { - "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 - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - } - } - }, - "jsdom": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", - "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", - "dev": true, - "requires": { - "abab": "^2.0.6", - "acorn": "^8.8.1", - "acorn-globals": "^7.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.2", - "decimal.js": "^10.4.2", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.2", - "parse5": "^7.1.1", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0", - "ws": "^8.11.0", - "xml-name-validator": "^4.0.0" - }, - "dependencies": { - "escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "requires": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "source-map": "~0.6.1" - } - }, - "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 - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" } }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "json-loader": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", - "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-parse-even-better-errors": { + "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "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 - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "json5": { + "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } }, - "jsonwebtoken": { + "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", - "requires": { + "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", @@ -6775,2381 +5667,1171 @@ "ms": "^2.1.1", "semver": "^7.5.4" }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "jwa": { + "node_modules/jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "requires": { + "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, - "jws": { + "node_modules/jws": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "requires": { + "dependencies": { "jwa": "^1.4.1", "safe-buffer": "^5.0.1" } }, - "jwt-decode": { + "node_modules/jwt-decode": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", "integrity": "sha512-86GgN2vzfUu7m9Wcj63iUkuDzFNYFVmjeDm2GzWpUk+opB0pEpMsw6ePCMrhYkumz2C1ihqtZzOMAg7FiXcNoQ==" }, - "keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "requires": { - "json-buffer": "3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "kleur": { + "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "leven": { + "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" + "engines": { + "node": ">=6" } }, - "lines-and-columns": { + "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, - "linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dev": true, - "requires": { - "uc.micro": "^1.0.1" - } - }, - "loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "requires": { - "p-locate": "^5.0.0" + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.debounce": { + "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true - }, - "lodash.includes": { + "node_modules/lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" }, - "lodash.isboolean": { + "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" }, - "lodash.isinteger": { + "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" }, - "lodash.isnumber": { + "node_modules/lodash.isnumber": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" }, - "lodash.isplainobject": { + "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" }, - "lodash.isstring": { + "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, - "lodash.once": { + "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, - "loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "dev": true, - "requires": { - "get-func-name": "^2.0.1" - } - }, - "lru-cache": { + "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "requires": { + "dependencies": { "yallist": "^3.0.2" } }, - "lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, "dependencies": { - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - } - } - }, - "makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "requires": { - "tmpl": "1.0.5" + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "node_modules/make-dir/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "requires": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "markdown-it-anchor": { - "version": "8.6.7", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", - "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", - "dev": true - }, - "marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "dependencies": { + "tmpl": "1.0.5" } }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "merge-stream": { + "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "requires": { - "braces": "^3.0.2", + "dependencies": { + "braces": "^3.0.3", "picomatch": "^2.3.1" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } + "engines": { + "node": ">=8.6" } }, - "mime-db": { + "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } }, - "mime-types": { + "node_modules/mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { + "dependencies": { "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" } }, - "mimic-fn": { + "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "minimatch": { + "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "requires": { + "dependencies": { "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true - }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, - "natural-compare": { + "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-int64": { + "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "requires": { - "process-on-spawn": "^1.0.0" - } - }, - "node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "node_modules/node-releases": { + "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 }, - "nodemon": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.2.tgz", - "integrity": "sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA==", - "dev": true, - "requires": { - "chokidar": "^3.5.2", - "debug": "^4", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^7.5.3", - "simple-update-notifier": "^2.0.0", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - } - } - }, - "normalize-path": { + "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", "dev": true, - "requires": { - "path-key": "^2.0.0" - }, - "dependencies": { - "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": ">=0.10.0" } }, - "null-loader": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/null-loader/-/null-loader-0.1.1.tgz", - "integrity": "sha512-F3qrYC3mFAUEx3TxX/y6xbRmt3S7EVuVqOV00xPBB/oIJNjtTMZUN5Z9pxY10oL5dhuyHuOY96A5JoxPdY3Myg==", - "dev": true - }, - "nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", - "dev": true - }, - "nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "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 - }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "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, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "requires": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "requires": { + "dependencies": { "wrappy": "1" } }, - "onetime": { + "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, - "requires": { + "dependencies": { "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "requires": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "dev": true - }, - "p-limit": { + "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, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "requires": { - "callsites": "^3.0.0" + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" } }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "engines": { + "node": ">=6" } }, - "parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "requires": { - "entities": "^4.4.0" - }, "dependencies": { - "entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true - } + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "path-exists": { + "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "path-key": { + "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "path-parse": { + "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "pathval": { + "node_modules/picocolors": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, - "picomatch": { + "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "pirates": { + "node_modules/pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, - "requires": { - "find-up": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - } + "engines": { + "node": ">= 6" } }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "requires": { - "semver-compare": "^1.0.0" + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "dev": true - }, - "pretty-format": { + "node_modules/pretty-format": { "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, - "requires": { + "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, - "dependencies": { - "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": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "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, - "requires": { - "fromentries": "^1.2.0" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "promise.allsettled": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.7.tgz", - "integrity": "sha512-hezvKvQQmsFkOdrZfYxUxkyxl8mgFQeT259Ajj9PXdbg9VzBCWrItOev72JyWxkCD5VSSqAeHmlN3tWx4DlmsA==", - "requires": { - "array.prototype.map": "^1.0.5", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "iterate-value": "^1.0.2" - } - }, - "prompts": { + "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, - "requires": { + "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" } }, - "proxy-from-env": { + "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true - }, - "pure-rand": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz", - "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==", - "dev": true - }, - "qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", - "requires": { - "side-channel": "^1.0.4" - } - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "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 - }, - "read-pkg": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", - "integrity": "sha512-+UBirHHDm5J+3WDmLBZYSklRYg82nMlz+enn+GMZ22nSR2f4bzxmhso6rzQW/3mT2PVzpzDTiYIZahk8UmZ44w==", + "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, - "requires": { - "normalize-package-data": "^2.3.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" } - } - }, - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } + ] }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } + "node_modules/react-is": { + "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 }, - "regenerate": { + "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, - "regenerate-unicode-properties": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", - "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", + "node_modules/regenerate-unicode-properties": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", + "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", "dev": true, - "requires": { + "dependencies": { "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" } }, - "regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", "dev": true }, - "regenerator-transform": { + "node_modules/regenerator-transform": { "version": "0.15.2", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", "dev": true, - "requires": { + "dependencies": { "@babel/runtime": "^7.8.4" } }, - "regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" - } - }, - "regexpu-core": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", - "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", + "node_modules/regexpu-core": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.1.1.tgz", + "integrity": "sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==", "dev": true, - "requires": { - "@babel/regjsgen": "^0.8.0", + "dependencies": { "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", + "regenerate-unicode-properties": "^10.2.0", + "regjsgen": "^0.8.0", + "regjsparser": "^0.11.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" - } - }, - "regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true - } + "engines": { + "node": ">=4" } }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.1.tgz", + "integrity": "sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==", "dev": true, - "requires": { - "es6-error": "^4.0.1" + "dependencies": { + "jsesc": "~3.0.2" + }, + "bin": { + "regjsparser": "bin/parser" } }, - "require-directory": { + "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "requizzle": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", - "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", "dev": true, - "requires": { - "lodash": "^4.17.21" + "engines": { + "node": ">=0.10.0" } }, - "resolve": { + "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, - "requires": { + "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "resolve-cwd": { + "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "requires": { + "dependencies": { "resolve-from": "^5.0.0" }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } + "engines": { + "node": ">=8" } }, - "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 - }, - "resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "requires": { - "glob": "^7.1.3" + "engines": { + "node": ">=8" } }, - "ripemd160": { + "node_modules/resolve.exports": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", - "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", - "dev": true - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" + "engines": { + "node": ">=10" } }, - "safe-buffer": { + "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "saxes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "dev": true, - "requires": { - "xmlchars": "^2.2.0" - } - }, - "schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - } + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "semver": { + "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 - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", - "requires": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" - } - }, - "set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", - "requires": { - "define-data-property": "^1.0.1", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" - } - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "dev": true, - "requires": { - "kind-of": "^6.0.2" + "bin": { + "semver": "bin/semver.js" } }, - "shebang-command": { + "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "shiki": { - "version": "0.14.7", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", - "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", - "dev": true, - "requires": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" - } - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "simple-update-notifier": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", - "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", - "dev": true, - "requires": { - "semver": "^7.5.3" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, "dependencies": { - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - } + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "engines": { + "node": ">=8" } }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "engines": { + "node": ">=8" } }, - "spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", - "dev": true + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } }, - "sprintf-js": { + "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "stack-utils": { + "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, - "requires": { + "dependencies": { "escape-string-regexp": "^2.0.0" }, - "dependencies": { - "escape-string-regexp": { - "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": ">=10" } }, - "stop-iteration-iterator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", - "requires": { - "internal-slot": "^1.0.4" + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "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" } }, - "string-length": { + "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, - "requires": { + "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" } }, - "string-width": { + "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "requires": { + "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - } - }, - "string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "strip-ansi": { + "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, - "requires": { + "dependencies": { "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "strip-bom": { + "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "strip-final-newline": { + "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "supports-color": { + "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, - "requires": { + "dependencies": { "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "supports-preserve-symlinks-flag": { + "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "test-exclude": { + "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "requires": { + "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" } }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "tmpl": { + "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "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==" - }, - "to-regex-range": { + "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, - "requires": { + "dependencies": { "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "node_modules/ts-jest": { + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", "dev": true, - "requires": { - "nopt": "~1.0.10" - }, "dependencies": { - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, - "requires": { - "abbrev": "1" - } + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true } } }, - "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - } - }, - "tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "requires": { - "punycode": "^2.1.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "node_modules/ts-jest/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "requires": { - "prelude-ls": "^1.2.1" + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "type-detect": { + "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "type-fest": { + "node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - }, - "typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" - } - }, - "typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", - "requires": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" - } - }, - "typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" - } - }, - "typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "requires": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - } - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typedoc": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz", - "integrity": "sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==", - "dev": true, - "requires": { - "lunr": "^2.3.9", - "marked": "^4.3.0", - "minimatch": "^9.0.0", - "shiki": "^0.14.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "typedoc-plugin-markdown": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.1.tgz", - "integrity": "sha512-QzdU3fj0Kzw2XSdoL15ExLASt2WPqD7FbLeaqwT70+XjKyTshBnUlQA5nNREO1C2P8Uen0CDjsBLMsCQ+zd0lw==", + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, - "requires": { - "handlebars": "^4.7.7" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" } }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true - }, - "uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", "dev": true, - "optional": true - }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "engines": { + "node": ">=4" } }, - "undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, - "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { + "node_modules/unicode-match-property-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, - "requires": { + "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, - "unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", - "dev": true + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", + "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", + "dev": true, + "engines": { + "node": ">=4" + } }, - "unicode-property-aliases-ecmascript": { + "node_modules/unicode-property-aliases-ecmascript": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", - "dev": true - }, - "universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "requires": { - "punycode": "^2.1.0" + "engines": { + "node": ">=4" } }, - "url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "node_modules/update-browserslist-db": { + "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, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" + "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": { + "escalade": "^3.2.0", + "picocolors": "^1.1.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true - }, - "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==", + "node_modules/v8-to-istanbul": { + "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, - "requires": { + "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" } }, - "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", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "dev": true - }, - "vscode-textmate": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", - "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", - "dev": true - }, - "w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", - "dev": true, - "requires": { - "xml-name-validator": "^4.0.0" - } - }, - "walker": { + "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, - "requires": { + "dependencies": { "makeerror": "1.0.12" } }, - "webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true - }, - "whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "dev": true, - "requires": { - "iconv-lite": "0.6.3" - } - }, - "whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "dev": true - }, - "whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "requires": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - } - }, - "which": { + "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "requires": { + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, - "which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - } - }, - "word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/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, "dependencies": { - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "wrappy": { + "node_modules/wrap-ansi/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/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "write-file-atomic": { + "node_modules/write-file-atomic": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, - "requires": { + "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "ws": { - "version": "8.14.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", - "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", - "dev": true - }, - "xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "dev": true - }, - "xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, - "xmlcreate": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", - "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", - "dev": true - }, - "y18n": { + "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + } }, - "yallist": { + "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "yargs": { + "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "requires": { + "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", @@ -9157,19 +6839,31 @@ "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" } }, - "yargs-parser": { + "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true + "dev": true, + "engines": { + "node": ">=12" + } }, - "yocto-queue": { + "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 4af33ba..87a6549 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skyflow-node", - "version": "1.14.1", + "version": "1.14.1-dev.19d7544", "description": "Skyflow SDK for Node.js", "main": "./lib/index.js", "module": "./lib/index.js", @@ -32,54 +32,21 @@ "tokenization" ], "dependencies": { - "@babel/generator": "^7.17.9", - "@babel/parser": "^7.17.9", - "axios": "1.7.4", - "Base64": "^1.0.1", - "core-js": "^3.19.0", - "esm": "^3.2.25", - "form-data": "^4.0.0", - "jsonwebtoken": "^9.0.0", - "jwt-decode": "^2.2.0", - "promise.allsettled": "^1.0.5", - "qs": "^6.10.3" + "axios": "^1.6.1", + "dotenv": "^16.4.5", + "jsonwebtoken": "^9.0.2", + "jwt-decode": "^2.2.0" }, "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.23.2", - "@babel/plugin-proposal-class-properties": "^7.10.1", - "@babel/plugin-proposal-decorators": "^7.10.1", - "@babel/plugin-proposal-object-rest-spread": "^7.10.1", - "@babel/plugin-transform-object-assign": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.10.1", - "@babel/preset-env": "^7.9.6", - "@babel/preset-typescript": "^7.10.1", - "@babel/register": "^7.0.0", - "@babel/runtime": "^7.10.2", - "@types/axios": "^0.14.0", - "@types/form-data": "^2.5.0", - "@types/jsonwebtoken": "^9.0.0", - "@types/jwt-decode": "^3.1.0", - "@types/node": "^16.11.7", - "@types/qs": "^6.9.7", - "babel-loader": "^8.0.0", - "chai": "^4.1.2", - "crypto-browserify": "^3.12.0", - "eslint": "^8.12.0", - "eslint-plugin-sonarjs": "^0.13.0", - "expect.js": "^0.3.1", - "husky": "^1.3.1", - "istanbul": "^0.4.5", + "@babel/plugin-proposal-decorators": "^7.25.7", + "@babel/plugin-transform-object-assign": "^7.25.7", + "@babel/plugin-transform-runtime": "^7.25.7", + "@babel/preset-env": "^7.25.8", + "@babel/preset-typescript": "^7.25.7", + "@types/jsonwebtoken": "^9.0.6", + "@types/node": "12.11.5 - 12.20.42", "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "jsdoc": "^4.0.2", - "json-loader": "~0.5.4", - "nodemon": "^3.0.1", - "null-loader": "^0.1.1", - "nyc": "^15.1.0", - "prettier": "^1.13.7", - "typescript": "^4.4.4", - "typedoc": "^0.24.4", - "typedoc-plugin-markdown": "^3.15.1" + "ts-jest": "^29.2.5", + "typescript": "^4.0 || ^5.0" } } diff --git a/samples/package.json b/samples/package.json index f796ac2..794ce7e 100644 --- a/samples/package.json +++ b/samples/package.json @@ -9,6 +9,6 @@ "author": "", "license": "ISC", "dependencies": { - "skyflow-node": "^1.13.0" + "skyflow-node": "1.14.0" } } diff --git a/samples/service-account/ScopedTokenGenerationExample.ts b/samples/service-account/scoped-token-generation-example.ts similarity index 100% rename from samples/service-account/ScopedTokenGenerationExample.ts rename to samples/service-account/scoped-token-generation-example.ts diff --git a/samples/service-account/SignedTokenGenerationExample.ts b/samples/service-account/signed-token-generation-example.ts similarity index 100% rename from samples/service-account/SignedTokenGenerationExample.ts rename to samples/service-account/signed-token-generation-example.ts diff --git a/samples/service-account/TokenGenerationExample.ts b/samples/service-account/token-generation-example.ts similarity index 100% rename from samples/service-account/TokenGenerationExample.ts rename to samples/service-account/token-generation-example.ts diff --git a/samples/service-account/TokenGenerationWithContextExample.ts b/samples/service-account/token-generation-with-context-example.ts similarity index 100% rename from samples/service-account/TokenGenerationWithContextExample.ts rename to samples/service-account/token-generation-with-context-example.ts diff --git a/samples/vault-api/.env b/samples/vault-api/.env new file mode 100644 index 0000000..43d37b4 --- /dev/null +++ b/samples/vault-api/.env @@ -0,0 +1 @@ +SKYFLOW_CREDENTIALS={ clientID: '', clientName: '', keyID: '', tokenURI: '', privateKey: '' } \ No newline at end of file diff --git a/samples/vault-api/Delete.ts b/samples/vault-api/Delete.ts deleted file mode 100644 index 2d6068f..0000000 --- a/samples/vault-api/Delete.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (c) 2023 Skyflow, Inc. -*/ -import { - Skyflow, - generateBearerToken, - isExpired, - setLogLevel, - LogLevel, -} from "skyflow-node"; - -const filePath = ""; -setLogLevel(LogLevel.INFO); -let bearerToken = ""; - -const skyflow = Skyflow.init({ - vaultID: "", - vaultURL: "", - getBearerToken: () => { - return new Promise((resolve, reject) => { - if (!isExpired(bearerToken)) { - resolve(bearerToken); - } else { - generateBearerToken(filePath) - .then((response) => { - bearerToken = response.accessToken; - resolve(bearerToken); - }) - .catch((err) => { - reject(err); - }); - } - }); - }, -}); - -const result = skyflow.delete({ - records: [ - { - id: "", - table: "", - table: " { - console.log("delete result:"); - console.log(JSON.stringify(response)); - }) - .catch((error) => { - console.log("delete error: "); - console.log(JSON.stringify(error)); - }); diff --git a/samples/vault-api/Detokenize.ts b/samples/vault-api/Detokenize.ts deleted file mode 100644 index b9328b5..0000000 --- a/samples/vault-api/Detokenize.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { - Skyflow, - generateBearerToken, - isExpired, - setLogLevel, - LogLevel, -} from 'skyflow-node'; - -const filePath = ''; -setLogLevel(LogLevel.INFO); -let bearerToken = ''; - -const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: '', - getBearerToken: () => { - return new Promise((resolve, reject) => { - if (!isExpired(bearerToken)) { - resolve(bearerToken); - } else { - generateBearerToken(filePath) - .then(response => { - bearerToken = response.accessToken; - resolve(bearerToken); - }) - .catch(error => { - reject(error); - }); - } - }); - }, -}); - -const result = skyflow.detokenize({ - records: [ - { - token: '', - redaction: Skyflow.RedactionType.DEFAULT // optional - }, - { - token: '', - redaction: Skyflow.RedactionType.MASKED // optional - }, - { - token: '', - redaction: Skyflow.RedactionType.REDACTED // optional - }, - { - token: '', - }, - ], -}); - -result - .then(response => { - console.log('detokenize result: '); - console.log(JSON.stringify(response)); - }) - .catch(error => { - console.log('detokenize error:'); - console.log(JSON.stringify(error)); - }); - \ No newline at end of file diff --git a/samples/vault-api/Get.ts b/samples/vault-api/Get.ts deleted file mode 100644 index c3cb346..0000000 --- a/samples/vault-api/Get.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { - Skyflow, - generateBearerToken, - isExpired, - setLogLevel, - LogLevel, -} from 'skyflow-node'; - -const filePath = ''; -setLogLevel(LogLevel.INFO); -let bearerToken = ''; - -const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: '', - getBearerToken: () => { - return new Promise((resolve, reject) => { - if (!isExpired(bearerToken)) { - resolve(bearerToken); - } else { - generateBearerToken(filePath) - .then(response => { - bearerToken = response.accessToken; - resolve(bearerToken); - }) - .catch(err => { - reject(err); - }); - } - }); - }, -}); - -const result = skyflow.get({ - records: [ - // To to get records using skyflow_ids. - { - ids: ['', ''], - redaction: Skyflow.RedactionType.PLAIN_TEXT, - table: 'cards', - }, - // To get records using unique column name and values. - { - redaction : Skyflow.RedactionType.PLAIN_TEXT, - table: 'persons', - columnName: 'card_id', - columnValues: ['123', '456'], - } - ], -}); - -result - .then(response => { - console.log('get result:'); - console.log(JSON.stringify(response)); - }) - .catch(error => { - console.log('get error: '); - console.log(JSON.stringify(error)); - }); diff --git a/samples/vault-api/GetById.ts b/samples/vault-api/GetById.ts deleted file mode 100644 index 1fd97d4..0000000 --- a/samples/vault-api/GetById.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { - Skyflow, - generateBearerToken, - isExpired, - setLogLevel, - LogLevel, -} from 'skyflow-node'; - -const filePath = ''; -setLogLevel(LogLevel.INFO); -let bearerToken = ''; - -const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: '', - getBearerToken: () => { - return new Promise((resolve, reject) => { - if (!isExpired(bearerToken)) { - resolve(bearerToken); - } else { - generateBearerToken(filePath) - .then(response => { - bearerToken = response.accessToken; - resolve(bearerToken); - }) - .catch(err => { - reject(err); - }); - } - }); - }, -}); - -const result = skyflow.getById({ - records: [ - // To to get records using skyflow_ids. - { - ids: ['', ''], - redaction: Skyflow.RedactionType.PLAIN_TEXT, - table: 'cards', - }, - ], -}); - -result - .then(response => { - console.log('getByID result:'); - console.log(JSON.stringify(response)); - }) - .catch(error => { - console.log('getByID error: '); - console.log(JSON.stringify(error)); - }); \ No newline at end of file diff --git a/samples/vault-api/Insert.ts b/samples/vault-api/Insert.ts deleted file mode 100644 index 0d4c84c..0000000 --- a/samples/vault-api/Insert.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { - Skyflow, - generateBearerToken, - isExpired, - setLogLevel, - LogLevel, -} from 'skyflow-node'; - -const filePath = ''; -setLogLevel(LogLevel.INFO); -let bearerToken = ''; - -const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: '', - getBearerToken: () => { - return new Promise((resolve, reject) => { - if (!isExpired(bearerToken)) { - resolve(bearerToken); - } else { - generateBearerToken(filePath) - .then(response => { - bearerToken = response.accessToken; - resolve(bearerToken); - }) - .catch(error => { - reject(error); - }); - } - }); - }, -}); - -const result = skyflow.insert( - { - records: [ - { - fields: { - card_number: '411111111111111', - expiry_date: '11/22', - fullname: 'firstNameTest', - }, - table: 'cards', - }, - ], - }, - {tokens: true} -); - -result - .then(response => { - console.log('insert result:'); - console.log(JSON.stringify(response)); - }) - .catch(error => { - console.log('insert error:'); - console.log(JSON.stringify(error)); - }); diff --git a/samples/vault-api/InsertWithContinueOnError.ts b/samples/vault-api/InsertWithContinueOnError.ts deleted file mode 100644 index 0dc2ac3..0000000 --- a/samples/vault-api/InsertWithContinueOnError.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (c) 2024 Skyflow, Inc. -*/ -import { - Skyflow, - generateBearerToken, - isExpired, - setLogLevel, - LogLevel, -} from "skyflow-node"; - -setLogLevel(LogLevel.DEBUG); -let bearerToken = ""; -const filePath = ""; - -const skyflow = Skyflow.init({ - vaultID: "", - vaultURL: "", - getBearerToken: () => { - return new Promise((resolve, reject) => { - if (!isExpired(bearerToken)) { - resolve(bearerToken); - } else { - generateBearerToken(filePath) - .then((response) => { - bearerToken = response.accessToken; - resolve(bearerToken); - }) - .catch((error) => { - reject(error); - }); - } - }); - }, -}); - -const result = skyflow.insert( - { - records: [ - { - fields: { - expiry_date: "12/2026", - card_number: "411111111111111", - namee: "john doe", - }, - table: "cards", - }, - { - fields: { - expiry_date: "12/2027", - card_number: "411111111111111", - name: "jane doe", - }, - table: "cards", - }, - ], - }, - { - tokens: true, - continueOnError: true, - } -); - -result - .then((response) => { - console.log("insert result:"); - console.log(JSON.stringify(response)); - }) - .catch((error) => { - console.log("insert error:"); - console.log(JSON.stringify(error)); - }); diff --git a/samples/vault-api/InvokeConnection.ts b/samples/vault-api/InvokeConnection.ts deleted file mode 100644 index 53097c1..0000000 --- a/samples/vault-api/InvokeConnection.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { - Skyflow, - generateBearerToken, - isExpired, - setLogLevel, - LogLevel, -} from 'skyflow-node'; - -const filePath = ''; -setLogLevel(LogLevel.INFO); -let bearerToken = ''; - -const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: '', - getBearerToken: () => { - return new Promise((resolve, reject) => { - if (!isExpired(bearerToken)) { - resolve(bearerToken); - } else { - generateBearerToken(filePath) - .then(response => { - bearerToken = response.accessToken; - resolve(bearerToken); - }) - .catch(err => { - reject(err); - }); - } - }); - }, -}); - -const result = skyflow.invokeConnection({ - connectionURL: '', - methodName: Skyflow.RequestMethod.POST, - requestHeader: { - Authorization: '', - }, - requestBody: { - expirationDate: { - mm: '01', - yy: '46', - }, - }, -}); - -result - .then(response => { - console.log(JSON.stringify(response)); - }) - .catch(error => { - console.log(JSON.stringify(error)); - }); diff --git a/samples/vault-api/Update.ts b/samples/vault-api/Update.ts deleted file mode 100644 index 26ebb6b..0000000 --- a/samples/vault-api/Update.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import {Skyflow, generateBearerToken, isExpired, setLogLevel, LogLevel} from 'skyflow-node'; -var filePath = ''; -setLogLevel(LogLevel.INFO) -var bearerToken = '' - -const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: '', - getBearerToken: () => { - return new Promise((resolve, reject) => { - if(!isExpired(bearerToken)) { - resolve(bearerToken) - } - else { - generateBearerToken(filePath) - .then((res) => { - bearerToken = res.accessToken - resolve(bearerToken); - }) - .catch((err) => { - reject(err); - }); - } - }) - } -}); - - -const result = skyflow.update( - { - records: [ - { - id : '', - table: '', - 'fields': { - '': '' - } - } - ], - }, - { - tokens: true, - } -); - -result.then((response)=>{ - console.log('Update result:'); - console.log(JSON.stringify(response)); -}).catch((error)=>{ - console.log('Update error:'); - console.log(JSON.stringify(error)); -}) \ No newline at end of file diff --git a/samples/vault-api/UpsertSupport.ts b/samples/vault-api/UpsertSupport.ts deleted file mode 100644 index f40bc1e..0000000 --- a/samples/vault-api/UpsertSupport.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { - Skyflow, - generateBearerToken, - isExpired, - setLogLevel, - LogLevel, -} from 'skyflow-node'; - -const filePath = ''; -setLogLevel(LogLevel.INFO); -let bearerToken = ''; - -const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: '', - getBearerToken: () => { - return new Promise((resolve, reject) => { - if (!isExpired(bearerToken)) { - resolve(bearerToken); - } else { - generateBearerToken(filePath) - .then(response => { - bearerToken = response.accessToken; - resolve(bearerToken); - }) - .catch(err => { - reject(err); - }); - } - }); - }, -}); - -const result = skyflow.insert( - { - records: [ - { - fields: { - card_number: '411111111111111', - expiry_date: '11/22', - fullname: 'firstNameTest', - }, - table: 'cards', - }, - ], - }, - { - tokens: true, - upsert: [ - { - table: 'cards', // Table. - column: 'card_number', // Unique column in the table. - }, - ], - } -); - -result - .then(response => { - console.log('insert result:'); - console.log(JSON.stringify(response)); - }) - .catch(error => { - console.log('insert error:'); - console.log(JSON.stringify(error)); - }); diff --git a/samples/vault-api/client-operations.ts b/samples/vault-api/client-operations.ts new file mode 100644 index 0000000..52a0bb7 --- /dev/null +++ b/samples/vault-api/client-operations.ts @@ -0,0 +1,106 @@ +import { + Credentials, + DeleteRequest, + Env, + LogLevel, + Skyflow, + VaultConfig, + SkyflowConfig, + SkyflowError, + DeleteResponse +} from 'skyflow-node'; + +/** + * Skyflow Secure Data Deletion Example + * + * This example demonstrates how to: + * 1. Configure Bearer Token credentials + * 2. Set up vault configuration + * 3. Create a delete request + * 4. Handle response and errors + */ +async function performSecureDataDeletion() { + try { + // Step 1: Configure Bearer Token Credentials + const credentials: Credentials = { + token: '', // Bearer token + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: '', // Primary vault + clusterId: '', // Cluster ID from your vault URL + env: Env.PROD, // Deployment environment (PROD by default) + credentials: credentials, // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient : Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Add Secondary Vault Configuration + const secondaryVaultConfig: VaultConfig = { + vaultId: '', // Secondary vault + clusterId: '', // Cluster ID from your vault URL + env: Env.PROD, // Deployment environment + // If credentials aren't specified, Skyflow credentials will be used + }; + + // Add secondary vault config on the fly + skyflowClient.addVaultConfig(secondaryVaultConfig); + + // Step 5: Update Vault Configuration + const updatedVaultConfig: VaultConfig = { + vaultId: '', // Vault ID and cluster ID are unique + clusterId: '', // Cluster ID from your vault URL + credentials: credentials, // Update credentials + }; + + // Update vault config on the fly + skyflowClient.updateVaultConfig(updatedVaultConfig); + + // Step 6: Prepare Delete Request + const deleteIds: Array = [ + 'skyflow_id1', + 'skyflow_id2', + ]; + + const tableName: string = ''; // Replace with actual table name + + const deleteRequest: DeleteRequest = new DeleteRequest( + tableName, + deleteIds, + ); + + // Step 7: Perform Secure Deletion on Secondary Vault + const response: DeleteResponse = await skyflowClient + .vault('') // Specify vault ID + .delete(deleteRequest); + + // Handle Successful Response + console.log('Deletion successful:', response); + + // Step 8: Remove Secondary Vault Configuration + skyflowClient.removeVaultConfig(''); // Remove vault configuration + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the secure data deletion function +performSecureDataDeletion(); diff --git a/samples/vault-api/credentials-options.ts b/samples/vault-api/credentials-options.ts new file mode 100644 index 0000000..4095cf2 --- /dev/null +++ b/samples/vault-api/credentials-options.ts @@ -0,0 +1,127 @@ +import { + Credentials, + DeleteRequest, + Env, + LogLevel, + Skyflow, + VaultConfig, + SkyflowConfig, + SkyflowError, + DeleteResponse +} from 'skyflow-node'; + +/** + * Skyflow Secure Data Deletion Example + * + * This example demonstrates how to: + * 1. Configure Skyflow client credentials + * 2. Set up vault configurations + * 3. Create and perform delete requests + * 4. Handle response and errors + */ +async function performSecureDataDeletion() { + try { + // Step 1: Configure Skyflow client Credentials + const cred: object = { + clientID: '', // Client identifier + clientName: '', // Client name + keyID: '', // Key identifier + tokenURI: '', // Token URI + privateKey: '' // Private key for authentication + }; + + const skyflowCredentials: Credentials = { + credentialsString: JSON.stringify(cred), // Token credentials + }; + + const credentials: Credentials = { + token: '', // Bearer token + // apiKey: '', // Uncomment to use API key + // path: 'path_to_credentials_json', // Path to credentials file + // credentialsString: 'your_credentials_string', // Credentials as string + }; + + // Step 2: Configure Vaults + const primaryVaultConfig: VaultConfig = { + vaultId: '', // Primary vault + clusterId: '', // Cluster ID from your vault URL + env: Env.PROD, // Deployment environment (PROD by default) + }; + + const secondaryVaultConfig: VaultConfig = { + vaultId: '', // Secondary vault + clusterId: '', // Cluster ID from your vault URL + env: Env.PROD, // Deployment environment + credentials: credentials, // Use credentials if specified + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig, secondaryVaultConfig], // Vault configurations + skyflowCredentials: skyflowCredentials, // Used if no individual credentials are passed + logLevel: LogLevel.ERROR, // Set log level (ERROR in this case) + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Delete Request for Primary Vault + const primaryDeleteIds: Array = [ + 'skyflow_id1', + 'skyflow_id2', + 'skyflow_id3', + ]; + + const primaryTableName: string = ''; // Replace with actual table name + + const primaryDeleteRequest: DeleteRequest = new DeleteRequest( + primaryTableName, + primaryDeleteIds, + ); + + // Perform Delete Operation for Primary Vault + const primaryDeleteResponse: DeleteResponse = await skyflowClient + .vault('') // Specify the primary vault ID + .delete(primaryDeleteRequest); + + // Handle Successful Response + console.log('Primary Vault Deletion Successful:', primaryDeleteResponse); + + // Step 5: Prepare Delete Request for Secondary Vault + const secondaryDeleteIds: Array = [ + 'skyflow_id4', + 'skyflow_id5', + 'skyflow_id6', + ]; + + const secondaryTableName: string = ''; // Replace with actual table name + + const secondaryDeleteRequest: DeleteRequest = new DeleteRequest( + secondaryTableName, + secondaryDeleteIds, + ); + + // Perform Delete Operation for Secondary Vault + const secondaryDeleteResponse: DeleteResponse = await skyflowClient + .vault('') // Specify the secondary vault ID + .delete(secondaryDeleteRequest); + + // Handle Successful Response + console.log('Secondary Vault Deletion Successful:', secondaryDeleteResponse); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the secure data deletion function +performSecureDataDeletion(); diff --git a/samples/vault-api/data-residency.ts b/samples/vault-api/data-residency.ts new file mode 100644 index 0000000..5eb62fb --- /dev/null +++ b/samples/vault-api/data-residency.ts @@ -0,0 +1,113 @@ +import { + Credentials, + Env, + GetRequest, + GetResponse, + InsertRequest, + LogLevel, + Skyflow, + VaultConfig, + SkyflowConfig, + InsertResponse, + SkyflowError +} from 'skyflow-node'; + +/** + * Skyflow Vault Data Transfer Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up primary and secondary vault configurations + * 3. Retrieve data from one vault + * 4. Insert data into another vault + * 5. Handle responses and errors + */ +async function transferDataBetweenVaults() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + token: 'BEARER_TOKEN', // Bearer token for authentication + }; + + // Step 2: Configure Primary Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'vault-id-1', // Primary vault ID + clusterId: 'cluster-id-1', // Cluster ID from your vault URL + env: Env.PROD, // Environment (default: PROD) + credentials: credentials, // Authentication method for this vault + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR, // Set log level to ERROR + }; + + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Configure Secondary Vault + const secondaryVaultConfig: VaultConfig = { + vaultId: 'vault-id-2', // Secondary vault ID + clusterId: 'cluster-id-2', // Cluster ID from the secondary vault URL + env: Env.PROD, // Environment (default: PROD) + // If no individual credentials are provided, Skyflow credentials will be used + }; + + // Add Secondary Vault to Skyflow Client + skyflowClient.addVaultConfig(secondaryVaultConfig); + + // Step 5: Get Data from Primary Vault + const getIds: Array = [ + 'skyflow-id-1', + 'skyflow-id-2', + ]; + + const tableName: string = 'your-table-name'; // Replace with your table name + + const getRequest: GetRequest = new GetRequest(tableName, getIds); + + // Perform Get request on Primary Vault + const getResponse: GetResponse = await skyflowClient + .vault('vault-id-1') // Specify the vault ID or it defaults to the first valid vault + .get(getRequest); + + // Step 6: Handle Get Response and Insert Data into Secondary Vault + const getResponseData: GetResponse = getResponse as GetResponse; + + const insertData: Array = getResponseData.data!; + + // Remove skyflow_id from the data (if needed for re-insertion) + const sanitizedData = insertData.map(item => { + const { skyflow_id, ...rest } = item as any; // Exclude the skyflow_id field + return rest; + }); + + // Step 7: Insert Data into Secondary Vault + const insertRequest: InsertRequest = new InsertRequest( + tableName, // Same table name or different as needed + sanitizedData, + ); + + // Perform Insert request on Secondary Vault + const insertResponse: InsertResponse = await skyflowClient + .vault('vault-id-2') // Specify the secondary vault ID + .insert(insertRequest); + + console.log('Data successfully inserted into secondary vault:', insertResponse); + + } catch (error) { + // Comprehensive error handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details, + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the data transfer function +transferDataBetweenVaults(); diff --git a/samples/vault-api/delete-records.ts b/samples/vault-api/delete-records.ts new file mode 100644 index 0000000..85d384b --- /dev/null +++ b/samples/vault-api/delete-records.ts @@ -0,0 +1,79 @@ +import { + Credentials, + DeleteRequest, + DeleteResponse, + Env, + LogLevel, + Skyflow, + SkyflowConfig, + VaultConfig, + SkyflowError +} from 'skyflow-node'; + +/** + * Skyflow Delete Records Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Create a delete request + * 4. Handle response and errors + */ +async function performDeletion() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + apiKey: 'your-skyflow-api-key', // API key for authentication + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR, // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Delete Data + const deleteIds: Array = ['skyflow_id1', 'skyflow_id2', 'skyflow_id3']; // Record IDs to delete + const tableName: string = 'sensitive_data_table'; // Table name in the vault schema + + // Create Delete Request + const deleteRequest: DeleteRequest = new DeleteRequest( + tableName, + deleteIds + ); + + // Step 5: Perform Deletion + const response: DeleteResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .delete(deleteRequest); + + // Handle Successful Response + console.log('Deletion successful:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details, + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the deletion function +performDeletion(); diff --git a/samples/vault-api/detokenzie-records.ts b/samples/vault-api/detokenzie-records.ts new file mode 100644 index 0000000..298f257 --- /dev/null +++ b/samples/vault-api/detokenzie-records.ts @@ -0,0 +1,86 @@ +import { + Credentials, + DetokenizeOptions, + DetokenizeRequest, + DetokenizeResponse, + Env, + LogLevel, + RedactionType, + Skyflow, + SkyflowError, + VaultConfig, + SkyflowConfig +} from 'skyflow-node'; + +/** + * Skyflow Detokenization Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Create a detokenization request + * 4. Handle response and errors + */ +async function performDetokenization() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + token: 'token', // Bearer token for authentication + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR, // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Detokenization Data + const detokenizeData: Array = ['token1', 'token2', 'token3']; // Tokens to be detokenized + const redactionType: RedactionType = RedactionType.REDACTED; // Redaction type + + // Create Detokenize Request + const detokenizeRequest: DetokenizeRequest = new DetokenizeRequest( + detokenizeData, + redactionType + ); + + // Configure Detokenize Options + const detokenizeOptions: DetokenizeOptions = new DetokenizeOptions(); + detokenizeOptions.setContinueOnError(true); // Continue processing on errors + detokenizeOptions.setDownloadURL(false); // Disable download URL generation + + // Step 5: Perform Detokenization + const response: DetokenizeResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .detokenize(detokenizeRequest, detokenizeOptions); + + // Handle Successful Response + console.log('Detokenization successful:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details, + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the detokenization function +performDetokenization(); diff --git a/samples/vault-api/file-upload.ts b/samples/vault-api/file-upload.ts new file mode 100644 index 0000000..8931062 --- /dev/null +++ b/samples/vault-api/file-upload.ts @@ -0,0 +1,84 @@ +// Please use Node.js version 18 & above to run file upload +import { + Credentials, + Env, + FileUploadRequest, + LogLevel, + Skyflow, + SkyflowConfig, + VaultConfig, + SkyflowError, + FileUploadResponse +} from 'skyflow-node'; + +/** + * Skyflow File Upload Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Create a file upload request + * 4. Handle response and errors + */ +async function performFileUpload() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + path: 'path-to-credentials-json', // Path to credentials file + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR, // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare File Upload Data + const tableName = 'table-name'; // Table name + const skyflowId = 'skyflow-id'; // Skyflow ID of the record + const columnName = 'column-name'; // Column name to store file + const filePath = 'file-path'; // Path to the file for upload + + // Step 5: Create File Upload Request + const uploadReq: FileUploadRequest = new FileUploadRequest( + tableName, + skyflowId, + columnName, + filePath + ); + + // Step 6: Perform File Upload + const response: FileUploadResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .uploadFile(uploadReq); + + // Handle Successful Response + console.log('File upload successful:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details, + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the file upload function +performFileUpload(); diff --git a/samples/vault-api/get-column-values.ts b/samples/vault-api/get-column-values.ts new file mode 100644 index 0000000..01363ef --- /dev/null +++ b/samples/vault-api/get-column-values.ts @@ -0,0 +1,89 @@ +import { + Env, + GetOptions, + LogLevel, + Skyflow, + GetColumnRequest, + Credentials, + SkyflowConfig, + VaultConfig, + SkyflowError, + GetResponse +} from 'skyflow-node'; + +/** + * Skyflow Secure Column-Based Retrieval Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Create a column-based get request + * 4. Handle response and errors + */ +async function performSecureColumnRetrieval() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + path: 'path-to-credentials-json', // Path to credentials file + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR, // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Column-Based Retrieval Data + const columnValues: Array = [ + 'value1', // Example Unique Column value 1 + 'value2', // Example Unique Column value 2 + ]; + const tableName: string = 'table-name'; // Replace with your actual table name + const columnName: string = 'column-name'; // Column name configured as unique in the schema + + // Step 5: Create Get Column Request + const getRequest: GetColumnRequest = new GetColumnRequest( + tableName, + columnName, + columnValues // Column values of the records to return + ); + + // Step 6: Configure Get Options + const getOptions: GetOptions = new GetOptions(); + getOptions.setReturnTokens(true); // Optional: Get tokens for retrieved data + + // Step 7: Perform Secure Retrieval + const response: GetResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .get(getRequest, getOptions); + + // Handle Successful Response + console.log('Column-based retrieval successful:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details, + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the secure column retrieval function +performSecureColumnRetrieval(); diff --git a/samples/vault-api/get-records.ts b/samples/vault-api/get-records.ts new file mode 100644 index 0000000..901a154 --- /dev/null +++ b/samples/vault-api/get-records.ts @@ -0,0 +1,86 @@ +import { + Credentials, + Env, + GetOptions, + GetRequest, + LogLevel, + Skyflow, + VaultConfig, + SkyflowConfig, + SkyflowError, + GetResponse +} from 'skyflow-node'; + +/** + * Skyflow Secure Data Retrieval Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Create a get request + * 4. Handle response and errors + */ +async function performSecureDataRetrieval() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + path: 'path-to-credentials-json', // Path to credentials file + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR, // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Retrieval Data + const getIds: Array = [ + 'skyflow-id1', + 'skyflow-id2', + ]; + + // Step 5: Create Get Request + const getRequest: GetRequest = new GetRequest( + 'sensitive_data_table', // Replace with your actual table name + getIds + ); + + // Step 6: Configure Get Options + const getOptions: GetOptions = new GetOptions(); + getOptions.setReturnTokens(true); // Optional: Get tokens for retrieved data + + // Step 7: Perform Secure Retrieval + const response: GetResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .get(getRequest, getOptions); + + // Handle Successful Response + console.log('Data retrieval successful:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details, + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the secure data retrieval function +performSecureDataRetrieval(); diff --git a/samples/vault-api/insert-byot.ts b/samples/vault-api/insert-byot.ts new file mode 100644 index 0000000..0c63490 --- /dev/null +++ b/samples/vault-api/insert-byot.ts @@ -0,0 +1,90 @@ +import { + TokenMode, + Credentials, + Env, + InsertOptions, + InsertRequest, + LogLevel, + Skyflow, + VaultConfig, + SkyflowConfig, + InsertResponse, + SkyflowError +} from 'skyflow-node'; + +/** + * Skyflow Insert with BYOT Example + * + * This example demonstrates: + * 1. Configuring credentials + * 2. Setting up vault configuration + * 3. Utilizing Bring Your Own Token (BYOT) during insertion + * 4. Handling responses and errors + */ +async function performSecureDataInsertionWithBYOT() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + token: 'bearer', // Bearer token authentication + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // Cluster ID from vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.INFO // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Insertion Data + const insertData: Array = [ + { card_number: 'skyflow_id1', card_cvv: 'skyflow_id2' }, + ]; + + const tableName: string = 'your-table-name'; + const insertReq: InsertRequest = new InsertRequest(tableName, insertData); + + // Step 5: BYOT Configuration + const tokens: Array = [ + { card_number: 'token1', card_cvv: 'token2' }, + ]; + + const insertOptions: InsertOptions = new InsertOptions(); + insertOptions.setReturnTokens(true); // Optionally get tokens for inserted data + insertOptions.setTokenMode(TokenMode.ENABLE); // Enable Bring Your Own Token (BYOT) + insertOptions.setTokens(tokens); // Specify tokens to use for BYOT + // insertOptions.setContinueOnError(true); // Optionally continue on partial errors + + // Step 6: Perform Secure Insertion + const response: InsertResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .insert(insertReq, insertOptions); + + // Handle Successful Response + console.log('Insertion Successful:', response); + + } catch (error) { + // Step 7: Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the secure data insertion function +performSecureDataInsertionWithBYOT(); diff --git a/samples/vault-api/insert-records.ts b/samples/vault-api/insert-records.ts new file mode 100644 index 0000000..8a642d3 --- /dev/null +++ b/samples/vault-api/insert-records.ts @@ -0,0 +1,87 @@ +import { + Credentials, + Env, + InsertOptions, + InsertRequest, + LogLevel, + Skyflow, + VaultConfig, + SkyflowConfig, + SkyflowError, + InsertResponse +} from 'skyflow-node'; + +/** + * Skyflow Secure Data Insertion Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Create an insert request + * 4. Handle response and errors + */ +async function performSecureDataInsertion() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + // Using API Key authentication + apiKey: 'your-skyflow-api-key', + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.INFO // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Insertion Data + const insertData: Array = [ + { card_number: '4111111111111112' } // Example sensitive data + ]; + + // Step 5: Create Insert Request + const insertReq: InsertRequest = new InsertRequest( + 'sensitive_data_table', // Replace with your actual table name + insertData + ); + + // Step 6: Configure Insertion Options + const insertOptions: InsertOptions = new InsertOptions(); + insertOptions.setReturnTokens(true); // Optional: Get tokens for inserted data + // insertOptions.setContinueOnError(true); // Optional: Continue on partial errors + + // Step 7: Perform Secure Insertion + const response: InsertResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .insert(insertReq, insertOptions); + + // Handle Successful Response + console.log('Insertion successful:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the secure data insertion function +performSecureDataInsertion(); diff --git a/samples/vault-api/invoke-connection.ts b/samples/vault-api/invoke-connection.ts new file mode 100644 index 0000000..77e6758 --- /dev/null +++ b/samples/vault-api/invoke-connection.ts @@ -0,0 +1,99 @@ +import { + Credentials, + Env, + InvokeConnectionRequest, + RequestMethod, + LogLevel, + Skyflow, + VaultConfig, + SkyflowConfig, + ConnectionConfig, + SkyflowError, + InvokeConnectionResponse +} from 'skyflow-node'; + +/** + * Skyflow Connection Invocation Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault and connection configurations + * 3. Invoke a connection + * 4. Handle response and errors + */ +async function invokeSkyflowConnection() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + // Using API Key authentication + apiKey: 'your-skyflow-api-key', + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Connection + const primaryConnectionConfig: ConnectionConfig = { + connectionId: 'your-connection-id', // Unique connection identifier + connectionUrl: 'your-connection-url', // connection url + credentials: credentials // Connection-specific credentials + }; + + // Step 4: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + connectionConfigs: [primaryConnectionConfig], + logLevel: LogLevel.INFO // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 5: Prepare Connection Request + const requestBody = { + key1: 'value1', // Replace with actual key-value pairs + key2: 'value2' + }; + + const requestHeaders = { + 'content-type': 'application/json' + }; + + const requestMethod: RequestMethod = RequestMethod.POST; + + // Step 6: Create Invoke Connection Request + const invokeReq: InvokeConnectionRequest = new InvokeConnectionRequest( + requestMethod, + requestBody, + requestHeaders + ); + + // Step 7: Invoke Connection + const response: InvokeConnectionResponse = await skyflowClient + .connection() + .invoke(invokeReq); + + // Handle Successful Response + console.log('Connection invocation successful:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the connection function +invokeSkyflowConnection(); diff --git a/samples/vault-api/query-records.ts b/samples/vault-api/query-records.ts new file mode 100644 index 0000000..bbeb349 --- /dev/null +++ b/samples/vault-api/query-records.ts @@ -0,0 +1,74 @@ +import { + Credentials, + Env, + LogLevel, + QueryRequest, + QueryResponse, + Skyflow, + SkyflowConfig, + SkyflowError, + VaultConfig +} from 'skyflow-node'; + +/** + * Skyflow Query Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Execute a query on the vault + * 4. Handle response and errors + */ +async function executeQuery() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + // Using API Key authentication + apiKey: 'your-skyflow-api-key', + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR, // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Query + const query = 'select * from table_name limit 1'; // Example query + const queryRequest: QueryRequest = new QueryRequest(query); + + // Step 5: Execute Query + const response: QueryResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .query(queryRequest); + + // Handle Successful Response + console.log('Query Result:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details, + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the query function +executeQuery(); diff --git a/samples/vault-api/tokenize-records.ts b/samples/vault-api/tokenize-records.ts new file mode 100644 index 0000000..4c65d1d --- /dev/null +++ b/samples/vault-api/tokenize-records.ts @@ -0,0 +1,78 @@ +import { + Credentials, + Env, + LogLevel, + Skyflow, + SkyflowConfig, + TokenizeRequest, + VaultConfig, + TokenizeRequestType, + TokenizeResponse, + SkyflowError +} from 'skyflow-node'; + +/** + * Skyflow Tokenization Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Tokenize sensitive data + * 4. Handle response and errors + */ +async function executeTokenization() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + apiKey: '', // API key for authentication + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: '', // Unique vault identifier + clusterId: '', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.ERROR, // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Tokenization Data + const tokenizeValues: Array = [ + { value: '4111111111111111', columnGroup: 'card_number_cg' }, + { value: '4242424242424242', columnGroup: 'card_number_cg' } + ]; + + const tokenReq: TokenizeRequest = new TokenizeRequest(tokenizeValues); + + // Step 5: Execute Tokenization + const response: TokenizeResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .tokenize(tokenReq); + + // Handle Successful Response + console.log('Tokenization Result:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details, + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the tokenization function +executeTokenization(); diff --git a/samples/vault-api/update-record.ts b/samples/vault-api/update-record.ts new file mode 100644 index 0000000..839e240 --- /dev/null +++ b/samples/vault-api/update-record.ts @@ -0,0 +1,87 @@ +import { + Credentials, + Env, + LogLevel, + Skyflow, + VaultConfig, + SkyflowConfig, + UpdateRequest, + UpdateOptions, + UpdateResponse, + SkyflowError +} from 'skyflow-node'; + +/** + * Skyflow Secure Data Update Example + * + * This example demonstrates how to: + * 1. Configure credentials + * 2. Set up vault configuration + * 3. Create an update request + * 4. Handle response and errors + */ +async function performSecureDataUpdate() { + try { + // Step 1: Configure Credentials + const credentials: Credentials = { + // Using API Key authentication + apiKey: 'your-skyflow-api-key', + }; + + // Step 2: Configure Vault + const primaryVaultConfig: VaultConfig = { + vaultId: 'your-vault-id', // Unique vault identifier + clusterId: 'your-cluster-id', // From vault URL + env: Env.PROD, // Deployment environment + credentials: credentials // Authentication method + }; + + // Step 3: Configure Skyflow Client + const skyflowConfig: SkyflowConfig = { + vaultConfigs: [primaryVaultConfig], + logLevel: LogLevel.INFO // Logging verbosity + }; + + // Initialize Skyflow Client + const skyflowClient: Skyflow = new Skyflow(skyflowConfig); + + // Step 4: Prepare Update Data + const updateData: object = { + skyflowId: 'your-skyflow-id', // Skyflow ID of the record to update + card_number: '1234567890123456' // Updated sensitive data + }; + + // Step 5: Create Update Request + const updateReq: UpdateRequest = new UpdateRequest( + 'sensitive_data_table', // Replace with your actual table name + updateData + ); + + // Step 6: Configure Update Options + const updateOptions: UpdateOptions = new UpdateOptions(); + updateOptions.setReturnTokens(true); // Optional: Get tokens for updated data + + // Step 7: Perform Secure Update + const response: UpdateResponse = await skyflowClient + .vault(primaryVaultConfig.vaultId) + .update(updateReq, updateOptions); + + // Handle Successful Response + console.log('Update successful:', response); + + } catch (error) { + // Comprehensive Error Handling + if (error instanceof SkyflowError) { + console.error('Skyflow Specific Error:', { + code: error.error?.http_code, + message: error.message, + details: error.error?.details + }); + } else { + console.error('Unexpected Error:', error); + } + } +} + +// Invoke the secure data update function +performSecureDataUpdate(); diff --git a/src/ _generated_/rest/api.ts b/src/ _generated_/rest/api.ts new file mode 100644 index 0000000..0ac7e38 --- /dev/null +++ b/src/ _generated_/rest/api.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from './api/audit-api'; +export * from './api/binlookup-api'; +export * from './api/query-api'; +export * from './api/records-api'; +export * from './api/tokens-api'; +export * from './api/authentication-api'; + diff --git a/src/ _generated_/rest/api/audit-api.ts b/src/ _generated_/rest/api/audit-api.ts new file mode 100644 index 0000000..a53d382 --- /dev/null +++ b/src/ _generated_/rest/api/audit-api.ts @@ -0,0 +1,546 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// URLSearchParams not necessarily used +// @ts-ignore +import { URL, URLSearchParams } from 'url'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { GooglerpcStatus } from '../models'; +// @ts-ignore +import type { V1AuditResponse } from '../models'; +/** + * AuditApi - axios parameter creator + * @export + */ +export const AuditApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Lists audit events that match query parameters. + * @summary List Audit Events + * @param {string} filterOpsAccountID Resources with the specified account ID. + * @param {string} [filterOpsContextChangeID] ID for the audit event. + * @param {string} [filterOpsContextRequestID] ID for the request that caused the event. + * @param {string} [filterOpsContextTraceID] ID for the request set by the service that received the request. + * @param {string} [filterOpsContextSessionID] ID for the session in which the request was sent. + * @param {string} [filterOpsContextActor] Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. + * @param {AuditServiceListAuditEventsFilterOpsContextActorTypeEnum} [filterOpsContextActorType] Type of member who sent the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum} [filterOpsContextAccessType] Type of access for the request. + * @param {string} [filterOpsContextIpAddress] IP Address of the client that made the request. + * @param {string} [filterOpsContextOrigin] HTTP Origin request header (including scheme, hostname, and port) of the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAuthModeEnum} [filterOpsContextAuthMode] Authentication mode the `actor` used. + * @param {string} [filterOpsContextJwtID] ID of the JWT token. + * @param {string} [filterOpsContextBearerTokenContextID] Embedded User Context. + * @param {string} [filterOpsParentAccountID] Resources with the specified parent account ID. + * @param {string} [filterOpsWorkspaceID] Resources with the specified workspace ID. + * @param {string} [filterOpsVaultID] Resources with the specified vault ID. + * @param {string} [filterOpsResourceIDs] Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". + * @param {AuditServiceListAuditEventsFilterOpsActionTypeEnum} [filterOpsActionType] Events with the specified action type. + * @param {AuditServiceListAuditEventsFilterOpsResourceTypeEnum} [filterOpsResourceType] Resources with the specified type. + * @param {string} [filterOpsTags] Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". + * @param {number} [filterOpsResponseCode] HTTP response code of the request. + * @param {string} [filterOpsStartTime] Start timestamp for the query, in SQL format. + * @param {string} [filterOpsEndTime] End timestamp for the query, in SQL format. + * @param {string} [filterOpsApiName] Name of the API called in the request. + * @param {string} [filterOpsResponseMessage] Response message of the request. + * @param {string} [filterOpsHttpMethod] HTTP method of the request. + * @param {string} [filterOpsHttpURI] HTTP URI of the request. + * @param {string} [sortOpsSortBy] Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). + * @param {AuditServiceListAuditEventsSortOpsOrderByEnum} [sortOpsOrderBy] Ascending or descending ordering of results. + * @param {string} [afterOpsTimestamp] Timestamp provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {string} [afterOpsChangeID] Change ID provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {number} [limit] Number of results to return. + * @param {number} [offset] Record position at which to start returning results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + auditServiceListAuditEvents: async (filterOpsAccountID: string, filterOpsContextChangeID?: string, filterOpsContextRequestID?: string, filterOpsContextTraceID?: string, filterOpsContextSessionID?: string, filterOpsContextActor?: string, filterOpsContextActorType?: AuditServiceListAuditEventsFilterOpsContextActorTypeEnum, filterOpsContextAccessType?: AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum, filterOpsContextIpAddress?: string, filterOpsContextOrigin?: string, filterOpsContextAuthMode?: AuditServiceListAuditEventsFilterOpsContextAuthModeEnum, filterOpsContextJwtID?: string, filterOpsContextBearerTokenContextID?: string, filterOpsParentAccountID?: string, filterOpsWorkspaceID?: string, filterOpsVaultID?: string, filterOpsResourceIDs?: string, filterOpsActionType?: AuditServiceListAuditEventsFilterOpsActionTypeEnum, filterOpsResourceType?: AuditServiceListAuditEventsFilterOpsResourceTypeEnum, filterOpsTags?: string, filterOpsResponseCode?: number, filterOpsStartTime?: string, filterOpsEndTime?: string, filterOpsApiName?: string, filterOpsResponseMessage?: string, filterOpsHttpMethod?: string, filterOpsHttpURI?: string, sortOpsSortBy?: string, sortOpsOrderBy?: AuditServiceListAuditEventsSortOpsOrderByEnum, afterOpsTimestamp?: string, afterOpsChangeID?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'filterOpsAccountID' is not null or undefined + assertParamExists('auditServiceListAuditEvents', 'filterOpsAccountID', filterOpsAccountID) + const localVarPath = `/v1/audit/events`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (filterOpsContextChangeID !== undefined) { + localVarQueryParameter['filterOps.context.changeID'] = filterOpsContextChangeID; + } + + if (filterOpsContextRequestID !== undefined) { + localVarQueryParameter['filterOps.context.requestID'] = filterOpsContextRequestID; + } + + if (filterOpsContextTraceID !== undefined) { + localVarQueryParameter['filterOps.context.traceID'] = filterOpsContextTraceID; + } + + if (filterOpsContextSessionID !== undefined) { + localVarQueryParameter['filterOps.context.sessionID'] = filterOpsContextSessionID; + } + + if (filterOpsContextActor !== undefined) { + localVarQueryParameter['filterOps.context.actor'] = filterOpsContextActor; + } + + if (filterOpsContextActorType !== undefined) { + localVarQueryParameter['filterOps.context.actorType'] = filterOpsContextActorType; + } + + if (filterOpsContextAccessType !== undefined) { + localVarQueryParameter['filterOps.context.accessType'] = filterOpsContextAccessType; + } + + if (filterOpsContextIpAddress !== undefined) { + localVarQueryParameter['filterOps.context.ipAddress'] = filterOpsContextIpAddress; + } + + if (filterOpsContextOrigin !== undefined) { + localVarQueryParameter['filterOps.context.origin'] = filterOpsContextOrigin; + } + + if (filterOpsContextAuthMode !== undefined) { + localVarQueryParameter['filterOps.context.authMode'] = filterOpsContextAuthMode; + } + + if (filterOpsContextJwtID !== undefined) { + localVarQueryParameter['filterOps.context.jwtID'] = filterOpsContextJwtID; + } + + if (filterOpsContextBearerTokenContextID !== undefined) { + localVarQueryParameter['filterOps.context.bearerTokenContextID'] = filterOpsContextBearerTokenContextID; + } + + if (filterOpsParentAccountID !== undefined) { + localVarQueryParameter['filterOps.parentAccountID'] = filterOpsParentAccountID; + } + + if (filterOpsAccountID !== undefined) { + localVarQueryParameter['filterOps.accountID'] = filterOpsAccountID; + } + + if (filterOpsWorkspaceID !== undefined) { + localVarQueryParameter['filterOps.workspaceID'] = filterOpsWorkspaceID; + } + + if (filterOpsVaultID !== undefined) { + localVarQueryParameter['filterOps.vaultID'] = filterOpsVaultID; + } + + if (filterOpsResourceIDs !== undefined) { + localVarQueryParameter['filterOps.resourceIDs'] = filterOpsResourceIDs; + } + + if (filterOpsActionType !== undefined) { + localVarQueryParameter['filterOps.actionType'] = filterOpsActionType; + } + + if (filterOpsResourceType !== undefined) { + localVarQueryParameter['filterOps.resourceType'] = filterOpsResourceType; + } + + if (filterOpsTags !== undefined) { + localVarQueryParameter['filterOps.tags'] = filterOpsTags; + } + + if (filterOpsResponseCode !== undefined) { + localVarQueryParameter['filterOps.responseCode'] = filterOpsResponseCode; + } + + if (filterOpsStartTime !== undefined) { + localVarQueryParameter['filterOps.startTime'] = filterOpsStartTime; + } + + if (filterOpsEndTime !== undefined) { + localVarQueryParameter['filterOps.endTime'] = filterOpsEndTime; + } + + if (filterOpsApiName !== undefined) { + localVarQueryParameter['filterOps.apiName'] = filterOpsApiName; + } + + if (filterOpsResponseMessage !== undefined) { + localVarQueryParameter['filterOps.responseMessage'] = filterOpsResponseMessage; + } + + if (filterOpsHttpMethod !== undefined) { + localVarQueryParameter['filterOps.httpMethod'] = filterOpsHttpMethod; + } + + if (filterOpsHttpURI !== undefined) { + localVarQueryParameter['filterOps.httpURI'] = filterOpsHttpURI; + } + + if (sortOpsSortBy !== undefined) { + localVarQueryParameter['sortOps.sortBy'] = sortOpsSortBy; + } + + if (sortOpsOrderBy !== undefined) { + localVarQueryParameter['sortOps.orderBy'] = sortOpsOrderBy; + } + + if (afterOpsTimestamp !== undefined) { + localVarQueryParameter['afterOps.timestamp'] = afterOpsTimestamp; + } + + if (afterOpsChangeID !== undefined) { + localVarQueryParameter['afterOps.changeID'] = afterOpsChangeID; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AuditApi - functional programming interface + * @export + */ +export const AuditApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AuditApiAxiosParamCreator(configuration) + return { + /** + * Lists audit events that match query parameters. + * @summary List Audit Events + * @param {string} filterOpsAccountID Resources with the specified account ID. + * @param {string} [filterOpsContextChangeID] ID for the audit event. + * @param {string} [filterOpsContextRequestID] ID for the request that caused the event. + * @param {string} [filterOpsContextTraceID] ID for the request set by the service that received the request. + * @param {string} [filterOpsContextSessionID] ID for the session in which the request was sent. + * @param {string} [filterOpsContextActor] Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. + * @param {AuditServiceListAuditEventsFilterOpsContextActorTypeEnum} [filterOpsContextActorType] Type of member who sent the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum} [filterOpsContextAccessType] Type of access for the request. + * @param {string} [filterOpsContextIpAddress] IP Address of the client that made the request. + * @param {string} [filterOpsContextOrigin] HTTP Origin request header (including scheme, hostname, and port) of the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAuthModeEnum} [filterOpsContextAuthMode] Authentication mode the `actor` used. + * @param {string} [filterOpsContextJwtID] ID of the JWT token. + * @param {string} [filterOpsContextBearerTokenContextID] Embedded User Context. + * @param {string} [filterOpsParentAccountID] Resources with the specified parent account ID. + * @param {string} [filterOpsWorkspaceID] Resources with the specified workspace ID. + * @param {string} [filterOpsVaultID] Resources with the specified vault ID. + * @param {string} [filterOpsResourceIDs] Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". + * @param {AuditServiceListAuditEventsFilterOpsActionTypeEnum} [filterOpsActionType] Events with the specified action type. + * @param {AuditServiceListAuditEventsFilterOpsResourceTypeEnum} [filterOpsResourceType] Resources with the specified type. + * @param {string} [filterOpsTags] Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". + * @param {number} [filterOpsResponseCode] HTTP response code of the request. + * @param {string} [filterOpsStartTime] Start timestamp for the query, in SQL format. + * @param {string} [filterOpsEndTime] End timestamp for the query, in SQL format. + * @param {string} [filterOpsApiName] Name of the API called in the request. + * @param {string} [filterOpsResponseMessage] Response message of the request. + * @param {string} [filterOpsHttpMethod] HTTP method of the request. + * @param {string} [filterOpsHttpURI] HTTP URI of the request. + * @param {string} [sortOpsSortBy] Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). + * @param {AuditServiceListAuditEventsSortOpsOrderByEnum} [sortOpsOrderBy] Ascending or descending ordering of results. + * @param {string} [afterOpsTimestamp] Timestamp provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {string} [afterOpsChangeID] Change ID provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {number} [limit] Number of results to return. + * @param {number} [offset] Record position at which to start returning results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async auditServiceListAuditEvents(filterOpsAccountID: string, filterOpsContextChangeID?: string, filterOpsContextRequestID?: string, filterOpsContextTraceID?: string, filterOpsContextSessionID?: string, filterOpsContextActor?: string, filterOpsContextActorType?: AuditServiceListAuditEventsFilterOpsContextActorTypeEnum, filterOpsContextAccessType?: AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum, filterOpsContextIpAddress?: string, filterOpsContextOrigin?: string, filterOpsContextAuthMode?: AuditServiceListAuditEventsFilterOpsContextAuthModeEnum, filterOpsContextJwtID?: string, filterOpsContextBearerTokenContextID?: string, filterOpsParentAccountID?: string, filterOpsWorkspaceID?: string, filterOpsVaultID?: string, filterOpsResourceIDs?: string, filterOpsActionType?: AuditServiceListAuditEventsFilterOpsActionTypeEnum, filterOpsResourceType?: AuditServiceListAuditEventsFilterOpsResourceTypeEnum, filterOpsTags?: string, filterOpsResponseCode?: number, filterOpsStartTime?: string, filterOpsEndTime?: string, filterOpsApiName?: string, filterOpsResponseMessage?: string, filterOpsHttpMethod?: string, filterOpsHttpURI?: string, sortOpsSortBy?: string, sortOpsOrderBy?: AuditServiceListAuditEventsSortOpsOrderByEnum, afterOpsTimestamp?: string, afterOpsChangeID?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.auditServiceListAuditEvents(filterOpsAccountID, filterOpsContextChangeID, filterOpsContextRequestID, filterOpsContextTraceID, filterOpsContextSessionID, filterOpsContextActor, filterOpsContextActorType, filterOpsContextAccessType, filterOpsContextIpAddress, filterOpsContextOrigin, filterOpsContextAuthMode, filterOpsContextJwtID, filterOpsContextBearerTokenContextID, filterOpsParentAccountID, filterOpsWorkspaceID, filterOpsVaultID, filterOpsResourceIDs, filterOpsActionType, filterOpsResourceType, filterOpsTags, filterOpsResponseCode, filterOpsStartTime, filterOpsEndTime, filterOpsApiName, filterOpsResponseMessage, filterOpsHttpMethod, filterOpsHttpURI, sortOpsSortBy, sortOpsOrderBy, afterOpsTimestamp, afterOpsChangeID, limit, offset, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuditApi.auditServiceListAuditEvents']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AuditApi - factory interface + * @export + */ +export const AuditApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AuditApiFp(configuration) + return { + /** + * Lists audit events that match query parameters. + * @summary List Audit Events + * @param {string} filterOpsAccountID Resources with the specified account ID. + * @param {string} [filterOpsContextChangeID] ID for the audit event. + * @param {string} [filterOpsContextRequestID] ID for the request that caused the event. + * @param {string} [filterOpsContextTraceID] ID for the request set by the service that received the request. + * @param {string} [filterOpsContextSessionID] ID for the session in which the request was sent. + * @param {string} [filterOpsContextActor] Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. + * @param {AuditServiceListAuditEventsFilterOpsContextActorTypeEnum} [filterOpsContextActorType] Type of member who sent the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum} [filterOpsContextAccessType] Type of access for the request. + * @param {string} [filterOpsContextIpAddress] IP Address of the client that made the request. + * @param {string} [filterOpsContextOrigin] HTTP Origin request header (including scheme, hostname, and port) of the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAuthModeEnum} [filterOpsContextAuthMode] Authentication mode the `actor` used. + * @param {string} [filterOpsContextJwtID] ID of the JWT token. + * @param {string} [filterOpsContextBearerTokenContextID] Embedded User Context. + * @param {string} [filterOpsParentAccountID] Resources with the specified parent account ID. + * @param {string} [filterOpsWorkspaceID] Resources with the specified workspace ID. + * @param {string} [filterOpsVaultID] Resources with the specified vault ID. + * @param {string} [filterOpsResourceIDs] Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". + * @param {AuditServiceListAuditEventsFilterOpsActionTypeEnum} [filterOpsActionType] Events with the specified action type. + * @param {AuditServiceListAuditEventsFilterOpsResourceTypeEnum} [filterOpsResourceType] Resources with the specified type. + * @param {string} [filterOpsTags] Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". + * @param {number} [filterOpsResponseCode] HTTP response code of the request. + * @param {string} [filterOpsStartTime] Start timestamp for the query, in SQL format. + * @param {string} [filterOpsEndTime] End timestamp for the query, in SQL format. + * @param {string} [filterOpsApiName] Name of the API called in the request. + * @param {string} [filterOpsResponseMessage] Response message of the request. + * @param {string} [filterOpsHttpMethod] HTTP method of the request. + * @param {string} [filterOpsHttpURI] HTTP URI of the request. + * @param {string} [sortOpsSortBy] Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). + * @param {AuditServiceListAuditEventsSortOpsOrderByEnum} [sortOpsOrderBy] Ascending or descending ordering of results. + * @param {string} [afterOpsTimestamp] Timestamp provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {string} [afterOpsChangeID] Change ID provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {number} [limit] Number of results to return. + * @param {number} [offset] Record position at which to start returning results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + auditServiceListAuditEvents(filterOpsAccountID: string, filterOpsContextChangeID?: string, filterOpsContextRequestID?: string, filterOpsContextTraceID?: string, filterOpsContextSessionID?: string, filterOpsContextActor?: string, filterOpsContextActorType?: AuditServiceListAuditEventsFilterOpsContextActorTypeEnum, filterOpsContextAccessType?: AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum, filterOpsContextIpAddress?: string, filterOpsContextOrigin?: string, filterOpsContextAuthMode?: AuditServiceListAuditEventsFilterOpsContextAuthModeEnum, filterOpsContextJwtID?: string, filterOpsContextBearerTokenContextID?: string, filterOpsParentAccountID?: string, filterOpsWorkspaceID?: string, filterOpsVaultID?: string, filterOpsResourceIDs?: string, filterOpsActionType?: AuditServiceListAuditEventsFilterOpsActionTypeEnum, filterOpsResourceType?: AuditServiceListAuditEventsFilterOpsResourceTypeEnum, filterOpsTags?: string, filterOpsResponseCode?: number, filterOpsStartTime?: string, filterOpsEndTime?: string, filterOpsApiName?: string, filterOpsResponseMessage?: string, filterOpsHttpMethod?: string, filterOpsHttpURI?: string, sortOpsSortBy?: string, sortOpsOrderBy?: AuditServiceListAuditEventsSortOpsOrderByEnum, afterOpsTimestamp?: string, afterOpsChangeID?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.auditServiceListAuditEvents(filterOpsAccountID, filterOpsContextChangeID, filterOpsContextRequestID, filterOpsContextTraceID, filterOpsContextSessionID, filterOpsContextActor, filterOpsContextActorType, filterOpsContextAccessType, filterOpsContextIpAddress, filterOpsContextOrigin, filterOpsContextAuthMode, filterOpsContextJwtID, filterOpsContextBearerTokenContextID, filterOpsParentAccountID, filterOpsWorkspaceID, filterOpsVaultID, filterOpsResourceIDs, filterOpsActionType, filterOpsResourceType, filterOpsTags, filterOpsResponseCode, filterOpsStartTime, filterOpsEndTime, filterOpsApiName, filterOpsResponseMessage, filterOpsHttpMethod, filterOpsHttpURI, sortOpsSortBy, sortOpsOrderBy, afterOpsTimestamp, afterOpsChangeID, limit, offset, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AuditApi - interface + * @export + * @interface AuditApi + */ +export interface AuditApiInterface { + /** + * Lists audit events that match query parameters. + * @summary List Audit Events + * @param {string} filterOpsAccountID Resources with the specified account ID. + * @param {string} [filterOpsContextChangeID] ID for the audit event. + * @param {string} [filterOpsContextRequestID] ID for the request that caused the event. + * @param {string} [filterOpsContextTraceID] ID for the request set by the service that received the request. + * @param {string} [filterOpsContextSessionID] ID for the session in which the request was sent. + * @param {string} [filterOpsContextActor] Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. + * @param {AuditServiceListAuditEventsFilterOpsContextActorTypeEnum} [filterOpsContextActorType] Type of member who sent the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum} [filterOpsContextAccessType] Type of access for the request. + * @param {string} [filterOpsContextIpAddress] IP Address of the client that made the request. + * @param {string} [filterOpsContextOrigin] HTTP Origin request header (including scheme, hostname, and port) of the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAuthModeEnum} [filterOpsContextAuthMode] Authentication mode the `actor` used. + * @param {string} [filterOpsContextJwtID] ID of the JWT token. + * @param {string} [filterOpsContextBearerTokenContextID] Embedded User Context. + * @param {string} [filterOpsParentAccountID] Resources with the specified parent account ID. + * @param {string} [filterOpsWorkspaceID] Resources with the specified workspace ID. + * @param {string} [filterOpsVaultID] Resources with the specified vault ID. + * @param {string} [filterOpsResourceIDs] Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". + * @param {AuditServiceListAuditEventsFilterOpsActionTypeEnum} [filterOpsActionType] Events with the specified action type. + * @param {AuditServiceListAuditEventsFilterOpsResourceTypeEnum} [filterOpsResourceType] Resources with the specified type. + * @param {string} [filterOpsTags] Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". + * @param {number} [filterOpsResponseCode] HTTP response code of the request. + * @param {string} [filterOpsStartTime] Start timestamp for the query, in SQL format. + * @param {string} [filterOpsEndTime] End timestamp for the query, in SQL format. + * @param {string} [filterOpsApiName] Name of the API called in the request. + * @param {string} [filterOpsResponseMessage] Response message of the request. + * @param {string} [filterOpsHttpMethod] HTTP method of the request. + * @param {string} [filterOpsHttpURI] HTTP URI of the request. + * @param {string} [sortOpsSortBy] Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). + * @param {AuditServiceListAuditEventsSortOpsOrderByEnum} [sortOpsOrderBy] Ascending or descending ordering of results. + * @param {string} [afterOpsTimestamp] Timestamp provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {string} [afterOpsChangeID] Change ID provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {number} [limit] Number of results to return. + * @param {number} [offset] Record position at which to start returning results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuditApiInterface + */ + auditServiceListAuditEvents(filterOpsAccountID: string, filterOpsContextChangeID?: string, filterOpsContextRequestID?: string, filterOpsContextTraceID?: string, filterOpsContextSessionID?: string, filterOpsContextActor?: string, filterOpsContextActorType?: AuditServiceListAuditEventsFilterOpsContextActorTypeEnum, filterOpsContextAccessType?: AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum, filterOpsContextIpAddress?: string, filterOpsContextOrigin?: string, filterOpsContextAuthMode?: AuditServiceListAuditEventsFilterOpsContextAuthModeEnum, filterOpsContextJwtID?: string, filterOpsContextBearerTokenContextID?: string, filterOpsParentAccountID?: string, filterOpsWorkspaceID?: string, filterOpsVaultID?: string, filterOpsResourceIDs?: string, filterOpsActionType?: AuditServiceListAuditEventsFilterOpsActionTypeEnum, filterOpsResourceType?: AuditServiceListAuditEventsFilterOpsResourceTypeEnum, filterOpsTags?: string, filterOpsResponseCode?: number, filterOpsStartTime?: string, filterOpsEndTime?: string, filterOpsApiName?: string, filterOpsResponseMessage?: string, filterOpsHttpMethod?: string, filterOpsHttpURI?: string, sortOpsSortBy?: string, sortOpsOrderBy?: AuditServiceListAuditEventsSortOpsOrderByEnum, afterOpsTimestamp?: string, afterOpsChangeID?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * AuditApi - object-oriented interface + * @export + * @class AuditApi + * @extends {BaseAPI} + */ +export class AuditApi extends BaseAPI implements AuditApiInterface { + /** + * Lists audit events that match query parameters. + * @summary List Audit Events + * @param {string} filterOpsAccountID Resources with the specified account ID. + * @param {string} [filterOpsContextChangeID] ID for the audit event. + * @param {string} [filterOpsContextRequestID] ID for the request that caused the event. + * @param {string} [filterOpsContextTraceID] ID for the request set by the service that received the request. + * @param {string} [filterOpsContextSessionID] ID for the session in which the request was sent. + * @param {string} [filterOpsContextActor] Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. + * @param {AuditServiceListAuditEventsFilterOpsContextActorTypeEnum} [filterOpsContextActorType] Type of member who sent the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum} [filterOpsContextAccessType] Type of access for the request. + * @param {string} [filterOpsContextIpAddress] IP Address of the client that made the request. + * @param {string} [filterOpsContextOrigin] HTTP Origin request header (including scheme, hostname, and port) of the request. + * @param {AuditServiceListAuditEventsFilterOpsContextAuthModeEnum} [filterOpsContextAuthMode] Authentication mode the `actor` used. + * @param {string} [filterOpsContextJwtID] ID of the JWT token. + * @param {string} [filterOpsContextBearerTokenContextID] Embedded User Context. + * @param {string} [filterOpsParentAccountID] Resources with the specified parent account ID. + * @param {string} [filterOpsWorkspaceID] Resources with the specified workspace ID. + * @param {string} [filterOpsVaultID] Resources with the specified vault ID. + * @param {string} [filterOpsResourceIDs] Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". + * @param {AuditServiceListAuditEventsFilterOpsActionTypeEnum} [filterOpsActionType] Events with the specified action type. + * @param {AuditServiceListAuditEventsFilterOpsResourceTypeEnum} [filterOpsResourceType] Resources with the specified type. + * @param {string} [filterOpsTags] Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". + * @param {number} [filterOpsResponseCode] HTTP response code of the request. + * @param {string} [filterOpsStartTime] Start timestamp for the query, in SQL format. + * @param {string} [filterOpsEndTime] End timestamp for the query, in SQL format. + * @param {string} [filterOpsApiName] Name of the API called in the request. + * @param {string} [filterOpsResponseMessage] Response message of the request. + * @param {string} [filterOpsHttpMethod] HTTP method of the request. + * @param {string} [filterOpsHttpURI] HTTP URI of the request. + * @param {string} [sortOpsSortBy] Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). + * @param {AuditServiceListAuditEventsSortOpsOrderByEnum} [sortOpsOrderBy] Ascending or descending ordering of results. + * @param {string} [afterOpsTimestamp] Timestamp provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {string} [afterOpsChangeID] Change ID provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @param {number} [limit] Number of results to return. + * @param {number} [offset] Record position at which to start returning results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuditApi + */ + public auditServiceListAuditEvents(filterOpsAccountID: string, filterOpsContextChangeID?: string, filterOpsContextRequestID?: string, filterOpsContextTraceID?: string, filterOpsContextSessionID?: string, filterOpsContextActor?: string, filterOpsContextActorType?: AuditServiceListAuditEventsFilterOpsContextActorTypeEnum, filterOpsContextAccessType?: AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum, filterOpsContextIpAddress?: string, filterOpsContextOrigin?: string, filterOpsContextAuthMode?: AuditServiceListAuditEventsFilterOpsContextAuthModeEnum, filterOpsContextJwtID?: string, filterOpsContextBearerTokenContextID?: string, filterOpsParentAccountID?: string, filterOpsWorkspaceID?: string, filterOpsVaultID?: string, filterOpsResourceIDs?: string, filterOpsActionType?: AuditServiceListAuditEventsFilterOpsActionTypeEnum, filterOpsResourceType?: AuditServiceListAuditEventsFilterOpsResourceTypeEnum, filterOpsTags?: string, filterOpsResponseCode?: number, filterOpsStartTime?: string, filterOpsEndTime?: string, filterOpsApiName?: string, filterOpsResponseMessage?: string, filterOpsHttpMethod?: string, filterOpsHttpURI?: string, sortOpsSortBy?: string, sortOpsOrderBy?: AuditServiceListAuditEventsSortOpsOrderByEnum, afterOpsTimestamp?: string, afterOpsChangeID?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { + return AuditApiFp(this.configuration).auditServiceListAuditEvents(filterOpsAccountID, filterOpsContextChangeID, filterOpsContextRequestID, filterOpsContextTraceID, filterOpsContextSessionID, filterOpsContextActor, filterOpsContextActorType, filterOpsContextAccessType, filterOpsContextIpAddress, filterOpsContextOrigin, filterOpsContextAuthMode, filterOpsContextJwtID, filterOpsContextBearerTokenContextID, filterOpsParentAccountID, filterOpsWorkspaceID, filterOpsVaultID, filterOpsResourceIDs, filterOpsActionType, filterOpsResourceType, filterOpsTags, filterOpsResponseCode, filterOpsStartTime, filterOpsEndTime, filterOpsApiName, filterOpsResponseMessage, filterOpsHttpMethod, filterOpsHttpURI, sortOpsSortBy, sortOpsOrderBy, afterOpsTimestamp, afterOpsChangeID, limit, offset, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const AuditServiceListAuditEventsFilterOpsContextActorTypeEnum = { + None: 'NONE', + User: 'USER', + ServiceAccount: 'SERVICE_ACCOUNT' +} as const; +export type AuditServiceListAuditEventsFilterOpsContextActorTypeEnum = typeof AuditServiceListAuditEventsFilterOpsContextActorTypeEnum[keyof typeof AuditServiceListAuditEventsFilterOpsContextActorTypeEnum]; +/** + * @export + */ +export const AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum = { + AccessNone: 'ACCESS_NONE', + Api: 'API', + Sql: 'SQL', + OktaLogin: 'OKTA_LOGIN' +} as const; +export type AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum = typeof AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum[keyof typeof AuditServiceListAuditEventsFilterOpsContextAccessTypeEnum]; +/** + * @export + */ +export const AuditServiceListAuditEventsFilterOpsContextAuthModeEnum = { + AuthNone: 'AUTH_NONE', + OktaJwt: 'OKTA_JWT', + ServiceAccountJwt: 'SERVICE_ACCOUNT_JWT', + PatJwt: 'PAT_JWT' +} as const; +export type AuditServiceListAuditEventsFilterOpsContextAuthModeEnum = typeof AuditServiceListAuditEventsFilterOpsContextAuthModeEnum[keyof typeof AuditServiceListAuditEventsFilterOpsContextAuthModeEnum]; +/** + * @export + */ +export const AuditServiceListAuditEventsFilterOpsActionTypeEnum = { + None: 'NONE', + Assign: 'ASSIGN', + Create: 'CREATE', + Delete: 'DELETE', + Execute: 'EXECUTE', + List: 'LIST', + Read: 'READ', + Unassign: 'UNASSIGN', + Update: 'UPDATE', + Validate: 'VALIDATE', + Login: 'LOGIN', + Rotate: 'ROTATE', + Schedulerotation: 'SCHEDULEROTATION', + Schedulerotationalert: 'SCHEDULEROTATIONALERT', + Import: 'IMPORT', + Getimportparameters: 'GETIMPORTPARAMETERS', + Ping: 'PING', + Getcloudprovider: 'GETCLOUDPROVIDER' +} as const; +export type AuditServiceListAuditEventsFilterOpsActionTypeEnum = typeof AuditServiceListAuditEventsFilterOpsActionTypeEnum[keyof typeof AuditServiceListAuditEventsFilterOpsActionTypeEnum]; +/** + * @export + */ +export const AuditServiceListAuditEventsFilterOpsResourceTypeEnum = { + NoneApi: 'NONE_API', + Account: 'ACCOUNT', + Audit: 'AUDIT', + BaseDataType: 'BASE_DATA_TYPE', + FieldTemplate: 'FIELD_TEMPLATE', + File: 'FILE', + Key: 'KEY', + Policy: 'POLICY', + ProtoParse: 'PROTO_PARSE', + Record: 'RECORD', + Role: 'ROLE', + Rule: 'RULE', + Secret: 'SECRET', + ServiceAccount: 'SERVICE_ACCOUNT', + Token: 'TOKEN', + User: 'USER', + Vault: 'VAULT', + VaultTemplate: 'VAULT_TEMPLATE', + Workspace: 'WORKSPACE', + Table: 'TABLE', + PolicyTemplate: 'POLICY_TEMPLATE', + Member: 'MEMBER', + Tag: 'TAG', + Connection: 'CONNECTION', + Migration: 'MIGRATION', + ScheduledJob: 'SCHEDULED_JOB', + Job: 'JOB', + ColumnName: 'COLUMN_NAME', + NetworkToken: 'NETWORK_TOKEN', + Subscription: 'SUBSCRIPTION' +} as const; +export type AuditServiceListAuditEventsFilterOpsResourceTypeEnum = typeof AuditServiceListAuditEventsFilterOpsResourceTypeEnum[keyof typeof AuditServiceListAuditEventsFilterOpsResourceTypeEnum]; +/** + * @export + */ +export const AuditServiceListAuditEventsSortOpsOrderByEnum = { + Ascending: 'ASCENDING', + Descending: 'DESCENDING' +} as const; +export type AuditServiceListAuditEventsSortOpsOrderByEnum = typeof AuditServiceListAuditEventsSortOpsOrderByEnum[keyof typeof AuditServiceListAuditEventsSortOpsOrderByEnum]; diff --git a/src/ _generated_/rest/api/authentication-api.ts b/src/ _generated_/rest/api/authentication-api.ts new file mode 100644 index 0000000..82b78d0 --- /dev/null +++ b/src/ _generated_/rest/api/authentication-api.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Management API + * # Management API This API controls aspects of your account and schema, including workspaces, vaults, keys, users, permissions, and more. The Management API is available from two base URIs:
  • Sandbox: https://manage.skyflowapis-preview.com
  • Production: https://manage.skyflowapis.com
When you make an API call, you need to add two headers:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
X-SKYFLOW-ACCOUNT-IDYour Skyflow account ID.X-SKYFLOW-ACCOUNT-ID: h451b763713e4424a7jke1bbkbbc84ef
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// URLSearchParams not necessarily used +// @ts-ignore +import { URL, URLSearchParams } from 'url'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { GooglerpcStatus } from '../models'; +// @ts-ignore +import type { V1GetAuthTokenRequest } from '../models'; +// @ts-ignore +import type { V1GetAuthTokenResponse } from '../models'; +/** + * AuthenticationApi - axios parameter creator + * @export + */ +export const AuthenticationApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + *

Generates a Bearer Token to authenticate with Skyflow. This method doesn\'t require the Authorization header.

Note: For recommended ways to authenticate, see API authentication.

+ * @summary Get Bearer Token + * @param {V1GetAuthTokenRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + authenticationServiceGetAuthToken: async (body: V1GetAuthTokenRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('authenticationServiceGetAuthToken', 'body', body) + const localVarPath = `/v1/auth/sa/oauth/token`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AuthenticationApi - functional programming interface + * @export + */ +export const AuthenticationApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration) + return { + /** + *

Generates a Bearer Token to authenticate with Skyflow. This method doesn\'t require the Authorization header.

Note: For recommended ways to authenticate, see API authentication.

+ * @summary Get Bearer Token + * @param {V1GetAuthTokenRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async authenticationServiceGetAuthToken(body: V1GetAuthTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.authenticationServiceGetAuthToken(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.authenticationServiceGetAuthToken']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AuthenticationApi - factory interface + * @export + */ +export const AuthenticationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AuthenticationApiFp(configuration) + return { + /** + *

Generates a Bearer Token to authenticate with Skyflow. This method doesn\'t require the Authorization header.

Note: For recommended ways to authenticate, see API authentication.

+ * @summary Get Bearer Token + * @param {V1GetAuthTokenRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + authenticationServiceGetAuthToken(body: V1GetAuthTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.authenticationServiceGetAuthToken(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AuthenticationApi - interface + * @export + * @interface AuthenticationApi + */ +export interface AuthenticationApiInterface { + /** + *

Generates a Bearer Token to authenticate with Skyflow. This method doesn\'t require the Authorization header.

Note: For recommended ways to authenticate, see API authentication.

+ * @summary Get Bearer Token + * @param {V1GetAuthTokenRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuthenticationApiInterface + */ + authenticationServiceGetAuthToken(body: V1GetAuthTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * AuthenticationApi - object-oriented interface + * @export + * @class AuthenticationApi + * @extends {BaseAPI} + */ +export class AuthenticationApi extends BaseAPI implements AuthenticationApiInterface { + /** + *

Generates a Bearer Token to authenticate with Skyflow. This method doesn\'t require the Authorization header.

Note: For recommended ways to authenticate, see API authentication.

+ * @summary Get Bearer Token + * @param {V1GetAuthTokenRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuthenticationApi + */ + public authenticationServiceGetAuthToken(body: V1GetAuthTokenRequest, options?: RawAxiosRequestConfig) { + return AuthenticationApiFp(this.configuration).authenticationServiceGetAuthToken(body, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/ _generated_/rest/api/binlookup-api.ts b/src/ _generated_/rest/api/binlookup-api.ts new file mode 100644 index 0000000..457ef97 --- /dev/null +++ b/src/ _generated_/rest/api/binlookup-api.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// URLSearchParams not necessarily used +// @ts-ignore +import { URL, URLSearchParams } from 'url'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { GooglerpcStatus } from '../models'; +// @ts-ignore +import type { V1BINListRequest } from '../models'; +// @ts-ignore +import type { V1BINListResponse } from '../models'; +/** + * BINLookupApi - axios parameter creator + * @export + */ +export const BINLookupApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Note: This endpoint is in beta and subject to change.

Returns the specified card metadata. + * @summary Get BIN + * @param {V1BINListRequest} body Request to return specific card metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + bINListServiceListCardsOfBIN: async (body: V1BINListRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('bINListServiceListCardsOfBIN', 'body', body) + const localVarPath = `/v1/card_lookup`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * BINLookupApi - functional programming interface + * @export + */ +export const BINLookupApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BINLookupApiAxiosParamCreator(configuration) + return { + /** + * Note: This endpoint is in beta and subject to change.

Returns the specified card metadata. + * @summary Get BIN + * @param {V1BINListRequest} body Request to return specific card metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async bINListServiceListCardsOfBIN(body: V1BINListRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.bINListServiceListCardsOfBIN(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BINLookupApi.bINListServiceListCardsOfBIN']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * BINLookupApi - factory interface + * @export + */ +export const BINLookupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BINLookupApiFp(configuration) + return { + /** + * Note: This endpoint is in beta and subject to change.

Returns the specified card metadata. + * @summary Get BIN + * @param {V1BINListRequest} body Request to return specific card metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + bINListServiceListCardsOfBIN(body: V1BINListRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.bINListServiceListCardsOfBIN(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * BINLookupApi - interface + * @export + * @interface BINLookupApi + */ +export interface BINLookupApiInterface { + /** + * Note: This endpoint is in beta and subject to change.

Returns the specified card metadata. + * @summary Get BIN + * @param {V1BINListRequest} body Request to return specific card metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BINLookupApiInterface + */ + bINListServiceListCardsOfBIN(body: V1BINListRequest, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * BINLookupApi - object-oriented interface + * @export + * @class BINLookupApi + * @extends {BaseAPI} + */ +export class BINLookupApi extends BaseAPI implements BINLookupApiInterface { + /** + * Note: This endpoint is in beta and subject to change.

Returns the specified card metadata. + * @summary Get BIN + * @param {V1BINListRequest} body Request to return specific card metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BINLookupApi + */ + public bINListServiceListCardsOfBIN(body: V1BINListRequest, options?: RawAxiosRequestConfig) { + return BINLookupApiFp(this.configuration).bINListServiceListCardsOfBIN(body, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/ _generated_/rest/api/query-api.ts b/src/ _generated_/rest/api/query-api.ts new file mode 100644 index 0000000..4e76fdd --- /dev/null +++ b/src/ _generated_/rest/api/query-api.ts @@ -0,0 +1,170 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// URLSearchParams not necessarily used +// @ts-ignore +import { URL, URLSearchParams } from 'url'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { GooglerpcStatus } from '../models'; +// @ts-ignore +import type { QueryServiceExecuteQueryBody } from '../models'; +// @ts-ignore +import type { V1GetQueryResponse } from '../models'; +/** + * QueryApi - axios parameter creator + * @export + */ +export const QueryApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns records for a valid SQL query. This endpoint
  • Can return redacted record values.
  • Supports only the SELECT command.
  • Returns a maximum of 25 records. To return additional records, perform another query using the OFFSET keyword.
  • Can\'t modify the vault or perform transactions.
  • Can\'t return tokens.
  • Can\'t return file download or render URLs.
  • Doesn\'t support the WHERE keyword with columns using transient tokenization.
  • Doesn\'t support `?` conditional for columns with column-level encryption disabled.
    • + * @summary Execute Query + * @param {string} vaultID ID of the vault. + * @param {QueryServiceExecuteQueryBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryServiceExecuteQuery: async (vaultID: string, body: QueryServiceExecuteQueryBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('queryServiceExecuteQuery', 'vaultID', vaultID) + // verify required parameter 'body' is not null or undefined + assertParamExists('queryServiceExecuteQuery', 'body', body) + const localVarPath = `/v1/vaults/{vaultID}/query` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * QueryApi - functional programming interface + * @export + */ +export const QueryApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = QueryApiAxiosParamCreator(configuration) + return { + /** + * Returns records for a valid SQL query. This endpoint
      • Can return redacted record values.
      • Supports only the SELECT command.
      • Returns a maximum of 25 records. To return additional records, perform another query using the OFFSET keyword.
      • Can\'t modify the vault or perform transactions.
      • Can\'t return tokens.
      • Can\'t return file download or render URLs.
      • Doesn\'t support the WHERE keyword with columns using transient tokenization.
      • Doesn\'t support `?` conditional for columns with column-level encryption disabled.
        • + * @summary Execute Query + * @param {string} vaultID ID of the vault. + * @param {QueryServiceExecuteQueryBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async queryServiceExecuteQuery(vaultID: string, body: QueryServiceExecuteQueryBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.queryServiceExecuteQuery(vaultID, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['QueryApi.queryServiceExecuteQuery']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * QueryApi - factory interface + * @export + */ +export const QueryApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = QueryApiFp(configuration) + return { + /** + * Returns records for a valid SQL query. This endpoint
          • Can return redacted record values.
          • Supports only the SELECT command.
          • Returns a maximum of 25 records. To return additional records, perform another query using the OFFSET keyword.
          • Can\'t modify the vault or perform transactions.
          • Can\'t return tokens.
          • Can\'t return file download or render URLs.
          • Doesn\'t support the WHERE keyword with columns using transient tokenization.
          • Doesn\'t support `?` conditional for columns with column-level encryption disabled.
            • + * @summary Execute Query + * @param {string} vaultID ID of the vault. + * @param {QueryServiceExecuteQueryBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryServiceExecuteQuery(vaultID: string, body: QueryServiceExecuteQueryBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.queryServiceExecuteQuery(vaultID, body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * QueryApi - interface + * @export + * @interface QueryApi + */ +export interface QueryApiInterface { + /** + * Returns records for a valid SQL query. This endpoint
              • Can return redacted record values.
              • Supports only the SELECT command.
              • Returns a maximum of 25 records. To return additional records, perform another query using the OFFSET keyword.
              • Can\'t modify the vault or perform transactions.
              • Can\'t return tokens.
              • Can\'t return file download or render URLs.
              • Doesn\'t support the WHERE keyword with columns using transient tokenization.
              • Doesn\'t support `?` conditional for columns with column-level encryption disabled.
                • + * @summary Execute Query + * @param {string} vaultID ID of the vault. + * @param {QueryServiceExecuteQueryBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof QueryApiInterface + */ + queryServiceExecuteQuery(vaultID: string, body: QueryServiceExecuteQueryBody, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * QueryApi - object-oriented interface + * @export + * @class QueryApi + * @extends {BaseAPI} + */ +export class QueryApi extends BaseAPI implements QueryApiInterface { + /** + * Returns records for a valid SQL query. This endpoint
                  • Can return redacted record values.
                  • Supports only the SELECT command.
                  • Returns a maximum of 25 records. To return additional records, perform another query using the OFFSET keyword.
                  • Can\'t modify the vault or perform transactions.
                  • Can\'t return tokens.
                  • Can\'t return file download or render URLs.
                  • Doesn\'t support the WHERE keyword with columns using transient tokenization.
                  • Doesn\'t support `?` conditional for columns with column-level encryption disabled.
                    • + * @summary Execute Query + * @param {string} vaultID ID of the vault. + * @param {QueryServiceExecuteQueryBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof QueryApi + */ + public queryServiceExecuteQuery(vaultID: string, body: QueryServiceExecuteQueryBody, options?: RawAxiosRequestConfig) { + return QueryApiFp(this.configuration).queryServiceExecuteQuery(vaultID, body, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/ _generated_/rest/api/records-api.ts b/src/ _generated_/rest/api/records-api.ts new file mode 100644 index 0000000..b2de051 --- /dev/null +++ b/src/ _generated_/rest/api/records-api.ts @@ -0,0 +1,1275 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
                      • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
                      • Production: https://_*identifier*.vault.skyflowapis.com
                      When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// URLSearchParams not necessarily used +// @ts-ignore +import { URL, URLSearchParams } from 'url'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +// import { FormData } from '../models'; +// @ts-ignore +import type { GooglerpcStatus } from '../models'; +// @ts-ignore +import type { RecordServiceBatchOperationBody } from '../models'; +// @ts-ignore +import type { RecordServiceBulkDeleteRecordBody } from '../models'; +// @ts-ignore +import type { RecordServiceInsertRecordBody } from '../models'; +// @ts-ignore +import type { RecordServiceUpdateRecordBody } from '../models'; +// @ts-ignore +import type { V1BatchOperationResponse } from '../models'; +// @ts-ignore +import type { V1BulkDeleteRecordResponse } from '../models'; +// @ts-ignore +import type { V1BulkGetRecordResponse } from '../models'; +// @ts-ignore +import type { V1DeleteFileResponse } from '../models'; +// @ts-ignore +import type { V1DeleteRecordResponse } from '../models'; +// @ts-ignore +import type { V1FieldRecords } from '../models'; +// @ts-ignore +import type { V1GetFileScanStatusResponse } from '../models'; +// @ts-ignore +import type { V1InsertRecordResponse } from '../models'; +// @ts-ignore +import type { V1UpdateRecordResponse } from '../models'; +/** + * RecordsApi - axios parameter creator + * @export + */ +export const RecordsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Deletes a file from the specified record. + * @summary Delete File + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fileServiceDeleteFile: async (vaultID: string, tableName: string, iD: string, columnName: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('fileServiceDeleteFile', 'vaultID', vaultID) + // verify required parameter 'tableName' is not null or undefined + assertParamExists('fileServiceDeleteFile', 'tableName', tableName) + // verify required parameter 'iD' is not null or undefined + assertParamExists('fileServiceDeleteFile', 'iD', iD) + // verify required parameter 'columnName' is not null or undefined + assertParamExists('fileServiceDeleteFile', 'columnName', columnName) + const localVarPath = `/v1/vaults/{vaultID}/{tableName}/{ID}/files/{columnName}` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"tableName"}}`, encodeURIComponent(String(tableName))) + .replace(`{${"ID"}}`, encodeURIComponent(String(iD))) + .replace(`{${"columnName"}}`, encodeURIComponent(String(columnName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the anti-virus scan status of a file. + * @summary Get File Scan Status + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fileServiceGetFileScanStatus: async (vaultID: string, tableName: string, iD: string, columnName: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('fileServiceGetFileScanStatus', 'vaultID', vaultID) + // verify required parameter 'tableName' is not null or undefined + assertParamExists('fileServiceGetFileScanStatus', 'tableName', tableName) + // verify required parameter 'iD' is not null or undefined + assertParamExists('fileServiceGetFileScanStatus', 'iD', iD) + // verify required parameter 'columnName' is not null or undefined + assertParamExists('fileServiceGetFileScanStatus', 'columnName', columnName) + const localVarPath = `/v1/vaults/{vaultID}/{tableName}/{ID}/files/{columnName}/scan-status` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"tableName"}}`, encodeURIComponent(String(tableName))) + .replace(`{${"ID"}}`, encodeURIComponent(String(iD))) + .replace(`{${"columnName"}}`, encodeURIComponent(String(columnName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Uploads a file to the specified record. + * @summary Upload File + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {FormData} [fileColumnName] Name of the column to store the file in. The column must have a form-data data type. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fileServiceUploadFile: async (vaultID: string, objectName: string, iD: string, fileColumnName?: FormData, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('fileServiceUploadFile', 'vaultID', vaultID) + // verify required parameter 'objectName' is not null or undefined + assertParamExists('fileServiceUploadFile', 'objectName', objectName) + // verify required parameter 'iD' is not null or undefined + assertParamExists('fileServiceUploadFile', 'iD', iD) + const localVarPath = `/v1/vaults/{vaultID}/{objectName}/{ID}/files` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"objectName"}}`, encodeURIComponent(String(objectName))) + .replace(`{${"ID"}}`, encodeURIComponent(String(iD))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new FormData(); + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + if (fileColumnName !== undefined && fileColumnName.has('columnName')) { + localVarFormParams.append(`${fileColumnName.get('columnName')}`, new Blob([JSON.stringify(fileColumnName)], { type: "application/json", })); + } + + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Performs multiple record operations in a single transaction. + * @summary Batch Operation + * @param {string} vaultID ID of the vault. + * @param {RecordServiceBatchOperationBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceBatchOperation: async (vaultID: string, body: RecordServiceBatchOperationBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceBatchOperation', 'vaultID', vaultID) + // verify required parameter 'body' is not null or undefined + assertParamExists('recordServiceBatchOperation', 'body', body) + const localVarPath = `/v1/vaults/{vaultID}` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes the specified records from a table. + * @summary Bulk Delete Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceBulkDeleteRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceBulkDeleteRecord: async (vaultID: string, objectName: string, body: RecordServiceBulkDeleteRecordBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceBulkDeleteRecord', 'vaultID', vaultID) + // verify required parameter 'objectName' is not null or undefined + assertParamExists('recordServiceBulkDeleteRecord', 'objectName', objectName) + // verify required parameter 'body' is not null or undefined + assertParamExists('recordServiceBulkDeleteRecord', 'body', body) + const localVarPath = `/v1/vaults/{vaultID}/{objectName}` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"objectName"}}`, encodeURIComponent(String(objectName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets the specified records from a table. + * @summary Get Record(s) + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table that contains the records. + * @param {Array} [skyflowIds] `skyflow_id` values of the records to return, with one value per `skyflow_ids` URL parameter. For example, `?skyflow_ids=abc&skyflow_ids=123`.<br /><br />If not specified, returns the first 25 records in the table. + * @param {RecordServiceBulkGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned records. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {string} [offset] Record position at which to start receiving data. + * @param {string} [limit] Number of record to return. Maximum 25. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {string} [columnName] Name of the column. It must be configured as unique in the schema. If you provide both column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {Array} [columnValues] Column values of the records to return, with one value per `column_values` URL parameter. For example, `?column_values=abc&column_values=123`.<br /><br />`column_name` is mandatory when providing `column_values`. If you use column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {RecordServiceBulkGetRecordOrderByEnum} [orderBy] Order to return records, based on `skyflow_id` values. To disable, set to `NONE`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceBulkGetRecord: async (vaultID: string, objectName: string, skyflowIds?: Array, redaction?: RecordServiceBulkGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, offset?: string, limit?: string, downloadURL?: boolean, columnName?: string, columnValues?: Array, orderBy?: RecordServiceBulkGetRecordOrderByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceBulkGetRecord', 'vaultID', vaultID) + // verify required parameter 'objectName' is not null or undefined + assertParamExists('recordServiceBulkGetRecord', 'objectName', objectName) + const localVarPath = `/v1/vaults/{vaultID}/{objectName}` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"objectName"}}`, encodeURIComponent(String(objectName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (skyflowIds) { + localVarQueryParameter['skyflow_ids'] = skyflowIds; + } + + if (redaction !== undefined) { + localVarQueryParameter['redaction'] = redaction; + } + + if (tokenization !== undefined) { + localVarQueryParameter['tokenization'] = tokenization; + } + + if (fields) { + localVarQueryParameter['fields'] = fields; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (downloadURL !== undefined) { + localVarQueryParameter['downloadURL'] = downloadURL; + } + + if (columnName !== undefined) { + localVarQueryParameter['column_name'] = columnName; + } + + if (columnValues) { + localVarQueryParameter['column_values'] = columnValues; + } + + if (orderBy !== undefined) { + localVarQueryParameter['order_by'] = orderBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes the specified record from a table.

Note: This method doesn\'t delete transient field tokens. Transient field values are available until they expire based on the fields\' time-to-live (TTL) setting. + * @summary Delete Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceDeleteRecord: async (vaultID: string, objectName: string, iD: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceDeleteRecord', 'vaultID', vaultID) + // verify required parameter 'objectName' is not null or undefined + assertParamExists('recordServiceDeleteRecord', 'objectName', objectName) + // verify required parameter 'iD' is not null or undefined + assertParamExists('recordServiceDeleteRecord', 'iD', iD) + const localVarPath = `/v1/vaults/{vaultID}/{objectName}/{ID}` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"objectName"}}`, encodeURIComponent(String(objectName))) + .replace(`{${"ID"}}`, encodeURIComponent(String(iD))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the specified record from a table. + * @summary Get Record By ID + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned record. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceGetRecord: async (vaultID: string, objectName: string, iD: string, redaction?: RecordServiceGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, downloadURL?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceGetRecord', 'vaultID', vaultID) + // verify required parameter 'objectName' is not null or undefined + assertParamExists('recordServiceGetRecord', 'objectName', objectName) + // verify required parameter 'iD' is not null or undefined + assertParamExists('recordServiceGetRecord', 'iD', iD) + const localVarPath = `/v1/vaults/{vaultID}/{objectName}/{ID}` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"objectName"}}`, encodeURIComponent(String(objectName))) + .replace(`{${"ID"}}`, encodeURIComponent(String(iD))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (redaction !== undefined) { + localVarQueryParameter['redaction'] = redaction; + } + + if (tokenization !== undefined) { + localVarQueryParameter['tokenization'] = tokenization; + } + + if (fields) { + localVarQueryParameter['fields'] = fields; + } + + if (downloadURL !== undefined) { + localVarQueryParameter['downloadURL'] = downloadURL; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Inserts a record in the specified table.

The time-to-live (TTL) for a transient field begins when the field value is set during record insertion.

Columns that have a string data type and a uniqueness constraint accept strings up to 2500 characters. If an inserted string exceeds 2500 characters, the call returns a token insertion error. + * @summary Insert Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceInsertRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceInsertRecord: async (vaultID: string, objectName: string, body: RecordServiceInsertRecordBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceInsertRecord', 'vaultID', vaultID) + // verify required parameter 'objectName' is not null or undefined + assertParamExists('recordServiceInsertRecord', 'objectName', objectName) + // verify required parameter 'body' is not null or undefined + assertParamExists('recordServiceInsertRecord', 'body', body) + const localVarPath = `/v1/vaults/{vaultID}/{objectName}` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"objectName"}}`, encodeURIComponent(String(objectName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates the specified record in a table.

When you update a field, include the entire contents you want the field to store. For JSON fields, include all nested fields and values. If a nested field isn\'t included, it\'s removed.

The time-to-live (TTL) for a transient field resets when the field value is updated. + * @summary Update Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceUpdateRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceUpdateRecord: async (vaultID: string, objectName: string, iD: string, body: RecordServiceUpdateRecordBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceUpdateRecord', 'vaultID', vaultID) + // verify required parameter 'objectName' is not null or undefined + assertParamExists('recordServiceUpdateRecord', 'objectName', objectName) + // verify required parameter 'iD' is not null or undefined + assertParamExists('recordServiceUpdateRecord', 'iD', iD) + // verify required parameter 'body' is not null or undefined + assertParamExists('recordServiceUpdateRecord', 'body', body) + const localVarPath = `/v1/vaults/{vaultID}/{objectName}/{ID}` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))) + .replace(`{${"objectName"}}`, encodeURIComponent(String(objectName))) + .replace(`{${"ID"}}`, encodeURIComponent(String(iD))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * RecordsApi - functional programming interface + * @export + */ +export const RecordsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = RecordsApiAxiosParamCreator(configuration) + return { + /** + * Deletes a file from the specified record. + * @summary Delete File + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fileServiceDeleteFile(vaultID: string, tableName: string, iD: string, columnName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fileServiceDeleteFile(vaultID, tableName, iD, columnName, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.fileServiceDeleteFile']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns the anti-virus scan status of a file. + * @summary Get File Scan Status + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fileServiceGetFileScanStatus(vaultID: string, tableName: string, iD: string, columnName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fileServiceGetFileScanStatus(vaultID, tableName, iD, columnName, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.fileServiceGetFileScanStatus']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Uploads a file to the specified record. + * @summary Upload File + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {FormData} [fileColumnName] Name of the column to store the file in. The column must have a form-data data type. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fileServiceUploadFile(vaultID: string, objectName: string, iD: string, fileColumnName?: FormData, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fileServiceUploadFile(vaultID, objectName, iD, fileColumnName, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.fileServiceUploadFile']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Performs multiple record operations in a single transaction. + * @summary Batch Operation + * @param {string} vaultID ID of the vault. + * @param {RecordServiceBatchOperationBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceBatchOperation(vaultID: string, body: RecordServiceBatchOperationBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceBatchOperation(vaultID, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.recordServiceBatchOperation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes the specified records from a table. + * @summary Bulk Delete Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceBulkDeleteRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceBulkDeleteRecord(vaultID: string, objectName: string, body: RecordServiceBulkDeleteRecordBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceBulkDeleteRecord(vaultID, objectName, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.recordServiceBulkDeleteRecord']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Gets the specified records from a table. + * @summary Get Record(s) + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table that contains the records. + * @param {Array} [skyflowIds] `skyflow_id` values of the records to return, with one value per `skyflow_ids` URL parameter. For example, `?skyflow_ids=abc&skyflow_ids=123`.<br /><br />If not specified, returns the first 25 records in the table. + * @param {RecordServiceBulkGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned records. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {string} [offset] Record position at which to start receiving data. + * @param {string} [limit] Number of record to return. Maximum 25. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {string} [columnName] Name of the column. It must be configured as unique in the schema. If you provide both column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {Array} [columnValues] Column values of the records to return, with one value per `column_values` URL parameter. For example, `?column_values=abc&column_values=123`.<br /><br />`column_name` is mandatory when providing `column_values`. If you use column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {RecordServiceBulkGetRecordOrderByEnum} [orderBy] Order to return records, based on `skyflow_id` values. To disable, set to `NONE`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceBulkGetRecord(vaultID: string, objectName: string, skyflowIds?: Array, redaction?: RecordServiceBulkGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, offset?: string, limit?: string, downloadURL?: boolean, columnName?: string, columnValues?: Array, orderBy?: RecordServiceBulkGetRecordOrderByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceBulkGetRecord(vaultID, objectName, skyflowIds, redaction, tokenization, fields, offset, limit, downloadURL, columnName, columnValues, orderBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.recordServiceBulkGetRecord']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes the specified record from a table.

Note: This method doesn\'t delete transient field tokens. Transient field values are available until they expire based on the fields\' time-to-live (TTL) setting. + * @summary Delete Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceDeleteRecord(vaultID: string, objectName: string, iD: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceDeleteRecord(vaultID, objectName, iD, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.recordServiceDeleteRecord']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns the specified record from a table. + * @summary Get Record By ID + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned record. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceGetRecord(vaultID: string, objectName: string, iD: string, redaction?: RecordServiceGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, downloadURL?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceGetRecord(vaultID, objectName, iD, redaction, tokenization, fields, downloadURL, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.recordServiceGetRecord']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Inserts a record in the specified table.

The time-to-live (TTL) for a transient field begins when the field value is set during record insertion.

Columns that have a string data type and a uniqueness constraint accept strings up to 2500 characters. If an inserted string exceeds 2500 characters, the call returns a token insertion error. + * @summary Insert Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceInsertRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceInsertRecord(vaultID: string, objectName: string, body: RecordServiceInsertRecordBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceInsertRecord(vaultID, objectName, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.recordServiceInsertRecord']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Updates the specified record in a table.

When you update a field, include the entire contents you want the field to store. For JSON fields, include all nested fields and values. If a nested field isn\'t included, it\'s removed.

The time-to-live (TTL) for a transient field resets when the field value is updated. + * @summary Update Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceUpdateRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceUpdateRecord(vaultID: string, objectName: string, iD: string, body: RecordServiceUpdateRecordBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceUpdateRecord(vaultID, objectName, iD, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RecordsApi.recordServiceUpdateRecord']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * RecordsApi - factory interface + * @export + */ +export const RecordsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = RecordsApiFp(configuration) + return { + /** + * Deletes a file from the specified record. + * @summary Delete File + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fileServiceDeleteFile(vaultID: string, tableName: string, iD: string, columnName: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fileServiceDeleteFile(vaultID, tableName, iD, columnName, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the anti-virus scan status of a file. + * @summary Get File Scan Status + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fileServiceGetFileScanStatus(vaultID: string, tableName: string, iD: string, columnName: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fileServiceGetFileScanStatus(vaultID, tableName, iD, columnName, options).then((request) => request(axios, basePath)); + }, + /** + * Uploads a file to the specified record. + * @summary Upload File + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {FormData} [fileColumnName] Name of the column to store the file in. The column must have a form-data data type. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fileServiceUploadFile(vaultID: string, objectName: string, iD: string, fileColumnName?: FormData, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fileServiceUploadFile(vaultID, objectName, iD, fileColumnName, options).then((request) => request(axios, basePath)); + }, + /** + * Performs multiple record operations in a single transaction. + * @summary Batch Operation + * @param {string} vaultID ID of the vault. + * @param {RecordServiceBatchOperationBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceBatchOperation(vaultID: string, body: RecordServiceBatchOperationBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceBatchOperation(vaultID, body, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes the specified records from a table. + * @summary Bulk Delete Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceBulkDeleteRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceBulkDeleteRecord(vaultID: string, objectName: string, body: RecordServiceBulkDeleteRecordBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceBulkDeleteRecord(vaultID, objectName, body, options).then((request) => request(axios, basePath)); + }, + /** + * Gets the specified records from a table. + * @summary Get Record(s) + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table that contains the records. + * @param {Array} [skyflowIds] `skyflow_id` values of the records to return, with one value per `skyflow_ids` URL parameter. For example, `?skyflow_ids=abc&skyflow_ids=123`.<br /><br />If not specified, returns the first 25 records in the table. + * @param {RecordServiceBulkGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned records. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {string} [offset] Record position at which to start receiving data. + * @param {string} [limit] Number of record to return. Maximum 25. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {string} [columnName] Name of the column. It must be configured as unique in the schema. If you provide both column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {Array} [columnValues] Column values of the records to return, with one value per `column_values` URL parameter. For example, `?column_values=abc&column_values=123`.<br /><br />`column_name` is mandatory when providing `column_values`. If you use column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {RecordServiceBulkGetRecordOrderByEnum} [orderBy] Order to return records, based on `skyflow_id` values. To disable, set to `NONE`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceBulkGetRecord(vaultID: string, objectName: string, skyflowIds?: Array, redaction?: RecordServiceBulkGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, offset?: string, limit?: string, downloadURL?: boolean, columnName?: string, columnValues?: Array, orderBy?: RecordServiceBulkGetRecordOrderByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceBulkGetRecord(vaultID, objectName, skyflowIds, redaction, tokenization, fields, offset, limit, downloadURL, columnName, columnValues, orderBy, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes the specified record from a table.

Note: This method doesn\'t delete transient field tokens. Transient field values are available until they expire based on the fields\' time-to-live (TTL) setting. + * @summary Delete Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceDeleteRecord(vaultID: string, objectName: string, iD: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceDeleteRecord(vaultID, objectName, iD, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the specified record from a table. + * @summary Get Record By ID + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned record. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceGetRecord(vaultID: string, objectName: string, iD: string, redaction?: RecordServiceGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, downloadURL?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceGetRecord(vaultID, objectName, iD, redaction, tokenization, fields, downloadURL, options).then((request) => request(axios, basePath)); + }, + /** + * Inserts a record in the specified table.

The time-to-live (TTL) for a transient field begins when the field value is set during record insertion.

Columns that have a string data type and a uniqueness constraint accept strings up to 2500 characters. If an inserted string exceeds 2500 characters, the call returns a token insertion error. + * @summary Insert Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceInsertRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceInsertRecord(vaultID: string, objectName: string, body: RecordServiceInsertRecordBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceInsertRecord(vaultID, objectName, body, options).then((request) => request(axios, basePath)); + }, + /** + * Updates the specified record in a table.

When you update a field, include the entire contents you want the field to store. For JSON fields, include all nested fields and values. If a nested field isn\'t included, it\'s removed.

The time-to-live (TTL) for a transient field resets when the field value is updated. + * @summary Update Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceUpdateRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceUpdateRecord(vaultID: string, objectName: string, iD: string, body: RecordServiceUpdateRecordBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceUpdateRecord(vaultID, objectName, iD, body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * RecordsApi - interface + * @export + * @interface RecordsApi + */ +export interface RecordsApiInterface { + /** + * Deletes a file from the specified record. + * @summary Delete File + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + fileServiceDeleteFile(vaultID: string, tableName: string, iD: string, columnName: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Returns the anti-virus scan status of a file. + * @summary Get File Scan Status + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + fileServiceGetFileScanStatus(vaultID: string, tableName: string, iD: string, columnName: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Uploads a file to the specified record. + * @summary Upload File + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {FormData} [fileColumnName] Name of the column to store the file in. The column must have a form-data data type. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + fileServiceUploadFile(vaultID: string, objectName: string, iD: string, fileColumnName?: FormData, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Performs multiple record operations in a single transaction. + * @summary Batch Operation + * @param {string} vaultID ID of the vault. + * @param {RecordServiceBatchOperationBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + recordServiceBatchOperation(vaultID: string, body: RecordServiceBatchOperationBody, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Deletes the specified records from a table. + * @summary Bulk Delete Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceBulkDeleteRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + recordServiceBulkDeleteRecord(vaultID: string, objectName: string, body: RecordServiceBulkDeleteRecordBody, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Gets the specified records from a table. + * @summary Get Record(s) + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table that contains the records. + * @param {Array} [skyflowIds] `skyflow_id` values of the records to return, with one value per `skyflow_ids` URL parameter. For example, `?skyflow_ids=abc&skyflow_ids=123`.<br /><br />If not specified, returns the first 25 records in the table. + * @param {RecordServiceBulkGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned records. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {string} [offset] Record position at which to start receiving data. + * @param {string} [limit] Number of record to return. Maximum 25. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {string} [columnName] Name of the column. It must be configured as unique in the schema. If you provide both column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {Array} [columnValues] Column values of the records to return, with one value per `column_values` URL parameter. For example, `?column_values=abc&column_values=123`.<br /><br />`column_name` is mandatory when providing `column_values`. If you use column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {RecordServiceBulkGetRecordOrderByEnum} [orderBy] Order to return records, based on `skyflow_id` values. To disable, set to `NONE`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + recordServiceBulkGetRecord(vaultID: string, objectName: string, skyflowIds?: Array, redaction?: RecordServiceBulkGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, offset?: string, limit?: string, downloadURL?: boolean, columnName?: string, columnValues?: Array, orderBy?: RecordServiceBulkGetRecordOrderByEnum, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Deletes the specified record from a table.

Note: This method doesn\'t delete transient field tokens. Transient field values are available until they expire based on the fields\' time-to-live (TTL) setting. + * @summary Delete Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + recordServiceDeleteRecord(vaultID: string, objectName: string, iD: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Returns the specified record from a table. + * @summary Get Record By ID + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned record. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + recordServiceGetRecord(vaultID: string, objectName: string, iD: string, redaction?: RecordServiceGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, downloadURL?: boolean, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Inserts a record in the specified table.

The time-to-live (TTL) for a transient field begins when the field value is set during record insertion.

Columns that have a string data type and a uniqueness constraint accept strings up to 2500 characters. If an inserted string exceeds 2500 characters, the call returns a token insertion error. + * @summary Insert Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceInsertRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + recordServiceInsertRecord(vaultID: string, objectName: string, body: RecordServiceInsertRecordBody, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Updates the specified record in a table.

When you update a field, include the entire contents you want the field to store. For JSON fields, include all nested fields and values. If a nested field isn\'t included, it\'s removed.

The time-to-live (TTL) for a transient field resets when the field value is updated. + * @summary Update Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceUpdateRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApiInterface + */ + recordServiceUpdateRecord(vaultID: string, objectName: string, iD: string, body: RecordServiceUpdateRecordBody, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * RecordsApi - object-oriented interface + * @export + * @class RecordsApi + * @extends {BaseAPI} + */ +export class RecordsApi extends BaseAPI implements RecordsApiInterface { + /** + * Deletes a file from the specified record. + * @summary Delete File + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public fileServiceDeleteFile(vaultID: string, tableName: string, iD: string, columnName: string, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).fileServiceDeleteFile(vaultID, tableName, iD, columnName, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the anti-virus scan status of a file. + * @summary Get File Scan Status + * @param {string} vaultID ID of the vault. + * @param {string} tableName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {string} columnName Name of the column that contains the file. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public fileServiceGetFileScanStatus(vaultID: string, tableName: string, iD: string, columnName: string, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).fileServiceGetFileScanStatus(vaultID, tableName, iD, columnName, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Uploads a file to the specified record. + * @summary Upload File + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {FormData} [fileColumnName] Name of the column to store the file in. The column must have a form-data data type. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public fileServiceUploadFile(vaultID: string, objectName: string, iD: string, fileColumnName?: FormData, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).fileServiceUploadFile(vaultID, objectName, iD, fileColumnName, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Performs multiple record operations in a single transaction. + * @summary Batch Operation + * @param {string} vaultID ID of the vault. + * @param {RecordServiceBatchOperationBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public recordServiceBatchOperation(vaultID: string, body: RecordServiceBatchOperationBody, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).recordServiceBatchOperation(vaultID, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes the specified records from a table. + * @summary Bulk Delete Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceBulkDeleteRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public recordServiceBulkDeleteRecord(vaultID: string, objectName: string, body: RecordServiceBulkDeleteRecordBody, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).recordServiceBulkDeleteRecord(vaultID, objectName, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets the specified records from a table. + * @summary Get Record(s) + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table that contains the records. + * @param {Array} [skyflowIds] `skyflow_id` values of the records to return, with one value per `skyflow_ids` URL parameter. For example, `?skyflow_ids=abc&skyflow_ids=123`.<br /><br />If not specified, returns the first 25 records in the table. + * @param {RecordServiceBulkGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned records. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {string} [offset] Record position at which to start receiving data. + * @param {string} [limit] Number of record to return. Maximum 25. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {string} [columnName] Name of the column. It must be configured as unique in the schema. If you provide both column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {Array} [columnValues] Column values of the records to return, with one value per `column_values` URL parameter. For example, `?column_values=abc&column_values=123`.<br /><br />`column_name` is mandatory when providing `column_values`. If you use column name or column value, you cannot use `skyflow_ids`. Passing either of these parameters with `skyflow_ids` returns an error. + * @param {RecordServiceBulkGetRecordOrderByEnum} [orderBy] Order to return records, based on `skyflow_id` values. To disable, set to `NONE`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public recordServiceBulkGetRecord(vaultID: string, objectName: string, skyflowIds?: Array, redaction?: RecordServiceBulkGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, offset?: string, limit?: string, downloadURL?: boolean, columnName?: string, columnValues?: Array, orderBy?: RecordServiceBulkGetRecordOrderByEnum, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).recordServiceBulkGetRecord(vaultID, objectName, skyflowIds, redaction, tokenization, fields, offset, limit, downloadURL, columnName, columnValues, orderBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes the specified record from a table.

Note: This method doesn\'t delete transient field tokens. Transient field values are available until they expire based on the fields\' time-to-live (TTL) setting. + * @summary Delete Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public recordServiceDeleteRecord(vaultID: string, objectName: string, iD: string, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).recordServiceDeleteRecord(vaultID, objectName, iD, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the specified record from a table. + * @summary Get Record By ID + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceGetRecordRedactionEnum} [redaction] Redaction level to enforce for the returned record. Subject to policies assigned to the API caller. + * @param {boolean} [tokenization] If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @param {Array} [fields] Fields to return for the record, with one value per `fields` URL parameter. For example, `?fields=abc&fields=123`.<br /><br />If not specified, returns all fields. + * @param {boolean} [downloadURL] If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public recordServiceGetRecord(vaultID: string, objectName: string, iD: string, redaction?: RecordServiceGetRecordRedactionEnum, tokenization?: boolean, fields?: Array, downloadURL?: boolean, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).recordServiceGetRecord(vaultID, objectName, iD, redaction, tokenization, fields, downloadURL, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Inserts a record in the specified table.

The time-to-live (TTL) for a transient field begins when the field value is set during record insertion.

Columns that have a string data type and a uniqueness constraint accept strings up to 2500 characters. If an inserted string exceeds 2500 characters, the call returns a token insertion error. + * @summary Insert Records + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {RecordServiceInsertRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public recordServiceInsertRecord(vaultID: string, objectName: string, body: RecordServiceInsertRecordBody, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).recordServiceInsertRecord(vaultID, objectName, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the specified record in a table.

When you update a field, include the entire contents you want the field to store. For JSON fields, include all nested fields and values. If a nested field isn\'t included, it\'s removed.

The time-to-live (TTL) for a transient field resets when the field value is updated. + * @summary Update Record + * @param {string} vaultID ID of the vault. + * @param {string} objectName Name of the table. + * @param {string} iD `skyflow_id` of the record. + * @param {RecordServiceUpdateRecordBody} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RecordsApi + */ + public recordServiceUpdateRecord(vaultID: string, objectName: string, iD: string, body: RecordServiceUpdateRecordBody, options?: RawAxiosRequestConfig) { + return RecordsApiFp(this.configuration).recordServiceUpdateRecord(vaultID, objectName, iD, body, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const RecordServiceBulkGetRecordRedactionEnum = { + Default: 'DEFAULT', + Redacted: 'REDACTED', + Masked: 'MASKED', + PlainText: 'PLAIN_TEXT' +} as const; +export type RecordServiceBulkGetRecordRedactionEnum = typeof RecordServiceBulkGetRecordRedactionEnum[keyof typeof RecordServiceBulkGetRecordRedactionEnum]; +/** + * @export + */ +export const RecordServiceBulkGetRecordOrderByEnum = { + Ascending: 'ASCENDING', + Descending: 'DESCENDING', + None: 'NONE' +} as const; +export type RecordServiceBulkGetRecordOrderByEnum = typeof RecordServiceBulkGetRecordOrderByEnum[keyof typeof RecordServiceBulkGetRecordOrderByEnum]; +/** + * @export + */ +export const RecordServiceGetRecordRedactionEnum = { + Default: 'DEFAULT', + Redacted: 'REDACTED', + Masked: 'MASKED', + PlainText: 'PLAIN_TEXT' +} as const; +export type RecordServiceGetRecordRedactionEnum = typeof RecordServiceGetRecordRedactionEnum[keyof typeof RecordServiceGetRecordRedactionEnum]; diff --git a/src/ _generated_/rest/api/tokens-api.ts b/src/ _generated_/rest/api/tokens-api.ts new file mode 100644 index 0000000..7f3bc5c --- /dev/null +++ b/src/ _generated_/rest/api/tokens-api.ts @@ -0,0 +1,267 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// URLSearchParams not necessarily used +// @ts-ignore +import { URL, URLSearchParams } from 'url'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { GooglerpcStatus } from '../models'; +// @ts-ignore +import type { V1DetokenizePayload } from '../models'; +// @ts-ignore +import type { V1DetokenizeResponse } from '../models'; +// @ts-ignore +import type { V1TokenizePayload } from '../models'; +// @ts-ignore +import type { V1TokenizeResponse } from '../models'; +/** + * TokensApi - axios parameter creator + * @export + */ +export const TokensApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns records that correspond to the specified tokens. + * @summary Detokenize + * @param {string} vaultID ID of the vault. + * @param {V1DetokenizePayload} detokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceDetokenize: async (vaultID: string, detokenizePayload: V1DetokenizePayload, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceDetokenize', 'vaultID', vaultID) + // verify required parameter 'detokenizePayload' is not null or undefined + assertParamExists('recordServiceDetokenize', 'detokenizePayload', detokenizePayload) + const localVarPath = `/v1/vaults/{vaultID}/detokenize` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(detokenizePayload, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns tokens that correspond to the specified records. Only applicable for fields with deterministic tokenization.

Note: This endpoint doesn\'t insert records—it returns tokens for existing values. To insert records and tokenize that new record\'s values, see Insert Record and the tokenization parameter. + * @summary Tokenize + * @param {string} vaultID ID of the vault. + * @param {V1TokenizePayload} tokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceTokenize: async (vaultID: string, tokenizePayload: V1TokenizePayload, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'vaultID' is not null or undefined + assertParamExists('recordServiceTokenize', 'vaultID', vaultID) + // verify required parameter 'tokenizePayload' is not null or undefined + assertParamExists('recordServiceTokenize', 'tokenizePayload', tokenizePayload) + const localVarPath = `/v1/vaults/{vaultID}/tokenize` + .replace(`{${"vaultID"}}`, encodeURIComponent(String(vaultID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(tokenizePayload, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TokensApi - functional programming interface + * @export + */ +export const TokensApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TokensApiAxiosParamCreator(configuration) + return { + /** + * Returns records that correspond to the specified tokens. + * @summary Detokenize + * @param {string} vaultID ID of the vault. + * @param {V1DetokenizePayload} detokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceDetokenize(vaultID: string, detokenizePayload: V1DetokenizePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceDetokenize(vaultID, detokenizePayload, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TokensApi.recordServiceDetokenize']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns tokens that correspond to the specified records. Only applicable for fields with deterministic tokenization.

Note: This endpoint doesn\'t insert records—it returns tokens for existing values. To insert records and tokenize that new record\'s values, see Insert Record and the tokenization parameter. + * @summary Tokenize + * @param {string} vaultID ID of the vault. + * @param {V1TokenizePayload} tokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recordServiceTokenize(vaultID: string, tokenizePayload: V1TokenizePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recordServiceTokenize(vaultID, tokenizePayload, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TokensApi.recordServiceTokenize']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * TokensApi - factory interface + * @export + */ +export const TokensApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TokensApiFp(configuration) + return { + /** + * Returns records that correspond to the specified tokens. + * @summary Detokenize + * @param {string} vaultID ID of the vault. + * @param {V1DetokenizePayload} detokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceDetokenize(vaultID: string, detokenizePayload: V1DetokenizePayload, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceDetokenize(vaultID, detokenizePayload, options).then((request) => request(axios, basePath)); + }, + /** + * Returns tokens that correspond to the specified records. Only applicable for fields with deterministic tokenization.

Note: This endpoint doesn\'t insert records—it returns tokens for existing values. To insert records and tokenize that new record\'s values, see Insert Record and the tokenization parameter. + * @summary Tokenize + * @param {string} vaultID ID of the vault. + * @param {V1TokenizePayload} tokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recordServiceTokenize(vaultID: string, tokenizePayload: V1TokenizePayload, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recordServiceTokenize(vaultID, tokenizePayload, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TokensApi - interface + * @export + * @interface TokensApi + */ +export interface TokensApiInterface { + /** + * Returns records that correspond to the specified tokens. + * @summary Detokenize + * @param {string} vaultID ID of the vault. + * @param {V1DetokenizePayload} detokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TokensApiInterface + */ + recordServiceDetokenize(vaultID: string, detokenizePayload: V1DetokenizePayload, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Returns tokens that correspond to the specified records. Only applicable for fields with deterministic tokenization.

Note: This endpoint doesn\'t insert records—it returns tokens for existing values. To insert records and tokenize that new record\'s values, see Insert Record and the tokenization parameter. + * @summary Tokenize + * @param {string} vaultID ID of the vault. + * @param {V1TokenizePayload} tokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TokensApiInterface + */ + recordServiceTokenize(vaultID: string, tokenizePayload: V1TokenizePayload, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * TokensApi - object-oriented interface + * @export + * @class TokensApi + * @extends {BaseAPI} + */ +export class TokensApi extends BaseAPI implements TokensApiInterface { + /** + * Returns records that correspond to the specified tokens. + * @summary Detokenize + * @param {string} vaultID ID of the vault. + * @param {V1DetokenizePayload} detokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TokensApi + */ + public recordServiceDetokenize(vaultID: string, detokenizePayload: V1DetokenizePayload, options?: RawAxiosRequestConfig) { + return TokensApiFp(this.configuration).recordServiceDetokenize(vaultID, detokenizePayload, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns tokens that correspond to the specified records. Only applicable for fields with deterministic tokenization.

Note: This endpoint doesn\'t insert records—it returns tokens for existing values. To insert records and tokenize that new record\'s values, see Insert Record and the tokenization parameter. + * @summary Tokenize + * @param {string} vaultID ID of the vault. + * @param {V1TokenizePayload} tokenizePayload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TokensApi + */ + public recordServiceTokenize(vaultID: string, tokenizePayload: V1TokenizePayload, options?: RawAxiosRequestConfig) { + return TokensApiFp(this.configuration).recordServiceTokenize(vaultID, tokenizePayload, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/ _generated_/rest/base.ts b/src/ _generated_/rest/base.ts new file mode 100644 index 0000000..d20af69 --- /dev/null +++ b/src/ _generated_/rest/base.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "https://identifier.vault.skyflowapis.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: RawAxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +/** + * + * @export + */ +export const operationServerMap: ServerMap = { +} diff --git a/src/ _generated_/rest/common.ts b/src/ _generated_/rest/common.ts new file mode 100644 index 0000000..33461d9 --- /dev/null +++ b/src/ _generated_/rest/common.ts @@ -0,0 +1,151 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; +import { URL, URLSearchParams } from 'url'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/ _generated_/rest/configuration.ts b/src/ _generated_/rest/configuration.ts new file mode 100644 index 0000000..dd95899 --- /dev/null +++ b/src/ _generated_/rest/configuration.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/ _generated_/rest/index.ts b/src/ _generated_/rest/index.ts new file mode 100644 index 0000000..9df9d8d --- /dev/null +++ b/src/ _generated_/rest/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; +export * from "./models"; diff --git a/src/ _generated_/rest/models/audit-event-audit-resource-type.ts b/src/ _generated_/rest/models/audit-event-audit-resource-type.ts new file mode 100644 index 0000000..2e3a019 --- /dev/null +++ b/src/ _generated_/rest/models/audit-event-audit-resource-type.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Type of the resource. + * @export + * @enum {string} + */ + +export const AuditEventAuditResourceType = { + NoneApi: 'NONE_API', + Account: 'ACCOUNT', + Audit: 'AUDIT', + BaseDataType: 'BASE_DATA_TYPE', + FieldTemplate: 'FIELD_TEMPLATE', + File: 'FILE', + Key: 'KEY', + Policy: 'POLICY', + ProtoParse: 'PROTO_PARSE', + Record: 'RECORD', + Role: 'ROLE', + Rule: 'RULE', + Secret: 'SECRET', + ServiceAccount: 'SERVICE_ACCOUNT', + Token: 'TOKEN', + User: 'USER', + Vault: 'VAULT', + VaultTemplate: 'VAULT_TEMPLATE', + Workspace: 'WORKSPACE', + Table: 'TABLE', + PolicyTemplate: 'POLICY_TEMPLATE', + Member: 'MEMBER', + Tag: 'TAG', + Connection: 'CONNECTION', + Migration: 'MIGRATION', + ScheduledJob: 'SCHEDULED_JOB', + Job: 'JOB', + ColumnName: 'COLUMN_NAME', + NetworkToken: 'NETWORK_TOKEN', + Subscription: 'SUBSCRIPTION' +} as const; + +export type AuditEventAuditResourceType = typeof AuditEventAuditResourceType[keyof typeof AuditEventAuditResourceType]; + + + diff --git a/src/ _generated_/rest/models/audit-event-context.ts b/src/ _generated_/rest/models/audit-event-context.ts new file mode 100644 index 0000000..eedfeb1 --- /dev/null +++ b/src/ _generated_/rest/models/audit-event-context.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ContextAccessType } from './context-access-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { ContextAuthMode } from './context-auth-mode'; +// May contain unused imports in some cases +// @ts-ignore +import type { V1MemberType } from './v1-member-type'; + +/** + * Context for an audit event. + * @export + * @interface AuditEventContext + */ +export interface AuditEventContext { + /** + * ID for the audit event. + * @type {string} + * @memberof AuditEventContext + */ + 'changeID'?: string; + /** + * ID for the request that caused the event. + * @type {string} + * @memberof AuditEventContext + */ + 'requestID'?: string; + /** + * ID for the request set by the service that received the request. + * @type {string} + * @memberof AuditEventContext + */ + 'traceID'?: string; + /** + * ID for the session in which the request was sent. + * @type {string} + * @memberof AuditEventContext + */ + 'sessionID'?: string; + /** + * Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. + * @type {string} + * @memberof AuditEventContext + */ + 'actor'?: string; + /** + * + * @type {V1MemberType} + * @memberof AuditEventContext + */ + 'actorType'?: V1MemberType; + /** + * + * @type {ContextAccessType} + * @memberof AuditEventContext + */ + 'accessType'?: ContextAccessType; + /** + * IP Address of the client that made the request. + * @type {string} + * @memberof AuditEventContext + */ + 'ipAddress'?: string; + /** + * HTTP Origin request header (including scheme, hostname, and port) of the request. + * @type {string} + * @memberof AuditEventContext + */ + 'origin'?: string; + /** + * + * @type {ContextAuthMode} + * @memberof AuditEventContext + */ + 'authMode'?: ContextAuthMode; + /** + * ID of the JWT token. + * @type {string} + * @memberof AuditEventContext + */ + 'jwtID'?: string; + /** + * Embedded User Context. + * @type {string} + * @memberof AuditEventContext + */ + 'bearerTokenContextID'?: string; +} + + + diff --git a/src/ _generated_/rest/models/audit-event-data.ts b/src/ _generated_/rest/models/audit-event-data.ts new file mode 100644 index 0000000..79d0a0f --- /dev/null +++ b/src/ _generated_/rest/models/audit-event-data.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Any Sensitive data that needs to be wrapped. + * @export + * @interface AuditEventData + */ +export interface AuditEventData { + /** + * The entire body of the data requested or the query fired. + * @type {string} + * @memberof AuditEventData + */ + 'content'?: string; +} + diff --git a/src/ _generated_/rest/models/audit-event-httpinfo.ts b/src/ _generated_/rest/models/audit-event-httpinfo.ts new file mode 100644 index 0000000..7290037 --- /dev/null +++ b/src/ _generated_/rest/models/audit-event-httpinfo.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface AuditEventHTTPInfo + */ +export interface AuditEventHTTPInfo { + /** + * The http URI that is used. + * @type {string} + * @memberof AuditEventHTTPInfo + */ + 'URI'?: string; + /** + * http method used. + * @type {string} + * @memberof AuditEventHTTPInfo + */ + 'method'?: string; +} + diff --git a/src/ _generated_/rest/models/batch-record-method.ts b/src/ _generated_/rest/models/batch-record-method.ts new file mode 100644 index 0000000..d4b9149 --- /dev/null +++ b/src/ _generated_/rest/models/batch-record-method.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Method of the operation. + * @export + * @enum {string} + */ + +export const BatchRecordMethod = { + None: 'NONE', + Post: 'POST', + Put: 'PUT', + Get: 'GET', + Delete: 'DELETE' +} as const; + +export type BatchRecordMethod = typeof BatchRecordMethod[keyof typeof BatchRecordMethod]; + + + diff --git a/src/ _generated_/rest/models/context-access-type.ts b/src/ _generated_/rest/models/context-access-type.ts new file mode 100644 index 0000000..d617fce --- /dev/null +++ b/src/ _generated_/rest/models/context-access-type.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Type of access for the request. + * @export + * @enum {string} + */ + +export const ContextAccessType = { + AccessNone: 'ACCESS_NONE', + Api: 'API', + Sql: 'SQL' +} as const; + +export type ContextAccessType = typeof ContextAccessType[keyof typeof ContextAccessType]; + + + diff --git a/src/ _generated_/rest/models/context-auth-mode.ts b/src/ _generated_/rest/models/context-auth-mode.ts new file mode 100644 index 0000000..fb29b11 --- /dev/null +++ b/src/ _generated_/rest/models/context-auth-mode.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Authentication mode the `actor` used. + * @export + * @enum {string} + */ + +export const ContextAuthMode = { + AuthNone: 'AUTH_NONE', + OktaJwt: 'OKTA_JWT', + ServiceAccountJwt: 'SERVICE_ACCOUNT_JWT', + PatJwt: 'PAT_JWT' +} as const; + +export type ContextAuthMode = typeof ContextAuthMode[keyof typeof ContextAuthMode]; + + + diff --git a/src/ _generated_/rest/models/detokenize-record-response-value-type.ts b/src/ _generated_/rest/models/detokenize-record-response-value-type.ts new file mode 100644 index 0000000..67d1f92 --- /dev/null +++ b/src/ _generated_/rest/models/detokenize-record-response-value-type.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const DetokenizeRecordResponseValueType = { + None: 'NONE', + String: 'STRING', + Integer: 'INTEGER', + Float: 'FLOAT', + Bool: 'BOOL', + Datetime: 'DATETIME', + Json: 'JSON', + Array: 'ARRAY', + Date: 'DATE' +} as const; + +export type DetokenizeRecordResponseValueType = typeof DetokenizeRecordResponseValueType[keyof typeof DetokenizeRecordResponseValueType]; + + + diff --git a/src/ _generated_/rest/models/googlerpc-status copy.ts b/src/ _generated_/rest/models/googlerpc-status copy.ts new file mode 100644 index 0000000..5ac0fb9 --- /dev/null +++ b/src/ _generated_/rest/models/googlerpc-status copy.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Management API + * # Management API This API controls aspects of your account and schema, including workspaces, vaults, keys, users, permissions, and more. The Management API is available from two base URIs:
  • Sandbox: https://manage.skyflowapis-preview.com
  • Production: https://manage.skyflowapis.com
When you make an API call, you need to add two headers:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
X-SKYFLOW-ACCOUNT-IDYour Skyflow account ID.X-SKYFLOW-ACCOUNT-ID: h451b763713e4424a7jke1bbkbbc84ef
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ProtobufAny } from './protobuf-any'; + +/** + * + * @export + * @interface GooglerpcStatus + */ +export interface GooglerpcStatus { + /** + * + * @type {number} + * @memberof GooglerpcStatus + */ + 'code'?: number; + /** + * + * @type {string} + * @memberof GooglerpcStatus + */ + 'message'?: string; + /** + * + * @type {Array} + * @memberof GooglerpcStatus + */ + 'details'?: Array; +} + diff --git a/src/ _generated_/rest/models/googlerpc-status.ts b/src/ _generated_/rest/models/googlerpc-status.ts new file mode 100644 index 0000000..2cc089f --- /dev/null +++ b/src/ _generated_/rest/models/googlerpc-status.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ProtobufAny } from './protobuf-any'; + +/** + * + * @export + * @interface GooglerpcStatus + */ +export interface GooglerpcStatus { + /** + * + * @type {number} + * @memberof GooglerpcStatus + */ + 'code'?: number; + /** + * + * @type {string} + * @memberof GooglerpcStatus + */ + 'message'?: string; + /** + * + * @type {Array} + * @memberof GooglerpcStatus + */ + 'details'?: Array; +} + diff --git a/src/ _generated_/rest/models/index.ts b/src/ _generated_/rest/models/index.ts new file mode 100644 index 0000000..ba8a29e --- /dev/null +++ b/src/ _generated_/rest/models/index.ts @@ -0,0 +1,58 @@ +export * from './audit-event-audit-resource-type'; +export * from './audit-event-context'; +export * from './audit-event-data'; +export * from './audit-event-httpinfo'; +export * from './batch-record-method'; +export * from './context-access-type'; +export * from './context-auth-mode'; +export * from './detokenize-record-response-value-type'; +export * from './googlerpc-status'; +export * from './protobuf-any'; +export * from './query-service-execute-query-body'; +export * from './record-service-batch-operation-body'; +export * from './record-service-bulk-delete-record-body'; +export * from './record-service-insert-record-body'; +export * from './record-service-update-record-body'; +export * from './redaction-enum-redaction'; +export * from './request-action-type'; +export * from './v1-audit-after-options'; +export * from './v1-audit-event-response'; +export * from './v1-audit-response'; +export * from './v1-audit-response-event'; +export * from './v1-audit-response-event-request'; +export * from './v1-binlist-request'; +export * from './v1-binlist-response'; +export * from './v1-byot'; +export * from './v1-batch-operation-response'; +export * from './v1-batch-record'; +export * from './v1-bulk-delete-record-response'; +export * from './v1-bulk-get-record-response'; +export * from './v1-card'; +export * from './v1-delete-file-response'; +export * from './v1-delete-record-response'; +export * from './v1-detokenize-payload'; +export * from './v1-detokenize-record-request'; +export * from './v1-detokenize-record-response'; +export * from './v1-detokenize-response'; +export * from './v1-field-records'; +export * from './v1-file-avscan-status'; +export * from './v1-file-info'; +export * from './v1-get-by-token-response'; +export * from './v1-get-file-scan-status-response'; +export * from './v1-get-query-response'; +export * from './v1-insert-record-response'; +export * from './v1-member-type'; +export * from './v1-record-meta-properties'; +export * from './v1-sort-options-order-by'; +export * from './v1-tokenize-payload'; +export * from './v1-tokenize-record-request'; +export * from './v1-tokenize-record-response'; +export * from './v1-tokenize-response'; +export * from './v1-update-record-response'; +export * from './v1-update-request-record'; +export * from './v1-vault-field-mapping'; +export * from './v1-vault-schema-config'; +export * from './googlerpc-status'; +export * from './protobuf-any'; +export * from './v1-get-auth-token-request'; +export * from './v1-get-auth-token-response'; \ No newline at end of file diff --git a/src/ _generated_/rest/models/protobuf-any copy.ts b/src/ _generated_/rest/models/protobuf-any copy.ts new file mode 100644 index 0000000..44140df --- /dev/null +++ b/src/ _generated_/rest/models/protobuf-any copy.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Management API + * # Management API This API controls aspects of your account and schema, including workspaces, vaults, keys, users, permissions, and more. The Management API is available from two base URIs:
  • Sandbox: https://manage.skyflowapis-preview.com
  • Production: https://manage.skyflowapis.com
When you make an API call, you need to add two headers:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
X-SKYFLOW-ACCOUNT-IDYour Skyflow account ID.X-SKYFLOW-ACCOUNT-ID: h451b763713e4424a7jke1bbkbbc84ef
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ProtobufAny + */ +export interface ProtobufAny { + [key: string]: object | any; + + /** + * + * @type {string} + * @memberof ProtobufAny + */ + '@type'?: string; +} + diff --git a/src/ _generated_/rest/models/protobuf-any.ts b/src/ _generated_/rest/models/protobuf-any.ts new file mode 100644 index 0000000..1a8ce5b --- /dev/null +++ b/src/ _generated_/rest/models/protobuf-any.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ProtobufAny + */ +export interface ProtobufAny { + [key: string]: object | any; + + /** + * + * @type {string} + * @memberof ProtobufAny + */ + '@type'?: string; +} + diff --git a/src/ _generated_/rest/models/query-service-execute-query-body.ts b/src/ _generated_/rest/models/query-service-execute-query-body.ts new file mode 100644 index 0000000..776905a --- /dev/null +++ b/src/ _generated_/rest/models/query-service-execute-query-body.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface QueryServiceExecuteQueryBody + */ +export interface QueryServiceExecuteQueryBody { + /** + * The SQL query to execute.

Supported commands:
  • SELECT
Supported operators:
  • >
  • <
  • =
  • AND
  • OR
  • NOT
  • LIKE
  • ILIKE
  • NULL
  • NOT NULL
Supported keywords:
  • FROM
  • JOIN
  • INNER JOIN
  • LEFT OUTER JOIN
  • LEFT JOIN
  • RIGHT OUTER JOIN
  • RIGHT JOIN
  • FULL OUTER JOIN
  • FULL JOIN
  • OFFSET
  • LIMIT
  • WHERE
Supported functions:
  • AVG()
  • SUM()
  • COUNT()
  • MIN()
  • MAX()
  • REDACTION()
+ * @type {string} + * @memberof QueryServiceExecuteQueryBody + */ + 'query'?: string; +} + diff --git a/src/ _generated_/rest/models/record-service-batch-operation-body.ts b/src/ _generated_/rest/models/record-service-batch-operation-body.ts new file mode 100644 index 0000000..d59eed2 --- /dev/null +++ b/src/ _generated_/rest/models/record-service-batch-operation-body.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1BYOT } from './v1-byot'; +// May contain unused imports in some cases +// @ts-ignore +import type { V1BatchRecord } from './v1-batch-record'; + +/** + * + * @export + * @interface RecordServiceBatchOperationBody + */ +export interface RecordServiceBatchOperationBody { + /** + * Record operations to perform. + * @type {Array} + * @memberof RecordServiceBatchOperationBody + */ + 'records'?: Array; + /** + * Continue performing operations on partial errors. + * @type {boolean} + * @memberof RecordServiceBatchOperationBody + */ + 'continueOnError'?: boolean; + /** + * + * @type {V1BYOT} + * @memberof RecordServiceBatchOperationBody + */ + 'byot'?: V1BYOT; +} + + + diff --git a/src/ _generated_/rest/models/record-service-bulk-delete-record-body.ts b/src/ _generated_/rest/models/record-service-bulk-delete-record-body.ts new file mode 100644 index 0000000..91652c7 --- /dev/null +++ b/src/ _generated_/rest/models/record-service-bulk-delete-record-body.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface RecordServiceBulkDeleteRecordBody + */ +export interface RecordServiceBulkDeleteRecordBody { + /** + * `skyflow_id` values of the records to delete. If `*` is specified, this operation deletes all records in the table. + * @type {Array} + * @memberof RecordServiceBulkDeleteRecordBody + */ + 'skyflow_ids'?: Array; +} + diff --git a/src/ _generated_/rest/models/record-service-insert-record-body.ts b/src/ _generated_/rest/models/record-service-insert-record-body.ts new file mode 100644 index 0000000..4e3451a --- /dev/null +++ b/src/ _generated_/rest/models/record-service-insert-record-body.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1BYOT } from './v1-byot'; +// May contain unused imports in some cases +// @ts-ignore +import type { V1FieldRecords } from './v1-field-records'; + +/** + * + * @export + * @interface RecordServiceInsertRecordBody + */ +export interface RecordServiceInsertRecordBody { + /** + * Record values and tokens. + * @type {Array} + * @memberof RecordServiceInsertRecordBody + */ + 'records'?: Array; + /** + * If `true`, this operation returns tokens for fields with tokenization enabled. + * @type {boolean} + * @memberof RecordServiceInsertRecordBody + */ + 'tokenization'?: boolean; + /** + * Name of a unique column in the table. Uses upsert operations to check if a record exists based on the unique column\'s value. If a matching record exists, the record updates with the values you provide. If a matching record doesn\'t exist, the upsert operation inserts a new record.

When you upsert a field, include the entire contents you want the field to store. For JSON fields, include all nested fields and values. If a nested field isn\'t included, it\'s removed. + * @type {string} + * @memberof RecordServiceInsertRecordBody + */ + 'upsert'?: string; + /** + * If `true`, this operation mandates that all the records have the same fields. This parameter does not work with upsert. + * @type {boolean} + * @memberof RecordServiceInsertRecordBody + */ + 'homogeneous'?: boolean; + /** + * + * @type {V1BYOT} + * @memberof RecordServiceInsertRecordBody + */ + 'byot'?: V1BYOT; +} + + + diff --git a/src/ _generated_/rest/models/record-service-update-record-body.ts b/src/ _generated_/rest/models/record-service-update-record-body.ts new file mode 100644 index 0000000..c541c27 --- /dev/null +++ b/src/ _generated_/rest/models/record-service-update-record-body.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1BYOT } from './v1-byot'; +// May contain unused imports in some cases +// @ts-ignore +import type { V1FieldRecords } from './v1-field-records'; + +/** + * + * @export + * @interface RecordServiceUpdateRecordBody + */ +export interface RecordServiceUpdateRecordBody { + /** + * + * @type {V1FieldRecords} + * @memberof RecordServiceUpdateRecordBody + */ + 'record'?: V1FieldRecords; + /** + * If `true`, this operation returns tokens for fields with tokenization enabled. + * @type {boolean} + * @memberof RecordServiceUpdateRecordBody + */ + 'tokenization'?: boolean; + /** + * + * @type {V1BYOT} + * @memberof RecordServiceUpdateRecordBody + */ + 'byot'?: V1BYOT; +} + + + diff --git a/src/ _generated_/rest/models/redaction-enum-redaction.ts b/src/ _generated_/rest/models/redaction-enum-redaction.ts new file mode 100644 index 0000000..4ce52c0 --- /dev/null +++ b/src/ _generated_/rest/models/redaction-enum-redaction.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Redaction type. Subject to policies assigned to the API caller. When used for detokenization, only supported for vaults that support [column groups](/tokenization-column-groups/). + * @export + * @enum {string} + */ + +export const RedactionEnumREDACTION = { + Default: 'DEFAULT', + Redacted: 'REDACTED', + Masked: 'MASKED', + PlainText: 'PLAIN_TEXT' +} as const; + +export type RedactionEnumREDACTION = typeof RedactionEnumREDACTION[keyof typeof RedactionEnumREDACTION]; + + + diff --git a/src/ _generated_/rest/models/request-action-type.ts b/src/ _generated_/rest/models/request-action-type.ts new file mode 100644 index 0000000..ac0c0c3 --- /dev/null +++ b/src/ _generated_/rest/models/request-action-type.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const RequestActionType = { + None: 'NONE', + Assign: 'ASSIGN', + Create: 'CREATE', + Delete: 'DELETE', + Execute: 'EXECUTE', + List: 'LIST', + Read: 'READ', + Unassign: 'UNASSIGN', + Update: 'UPDATE', + Validate: 'VALIDATE', + Login: 'LOGIN', + Rotate: 'ROTATE', + Schedulerotation: 'SCHEDULEROTATION', + Schedulerotationalert: 'SCHEDULEROTATIONALERT', + Import: 'IMPORT', + Getimportparameters: 'GETIMPORTPARAMETERS', + Ping: 'PING', + Getcloudprovider: 'GETCLOUDPROVIDER' +} as const; + +export type RequestActionType = typeof RequestActionType[keyof typeof RequestActionType]; + + + diff --git a/src/ _generated_/rest/models/v1-audit-after-options.ts b/src/ _generated_/rest/models/v1-audit-after-options.ts new file mode 100644 index 0000000..6e1d07b --- /dev/null +++ b/src/ _generated_/rest/models/v1-audit-after-options.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1AuditAfterOptions + */ +export interface V1AuditAfterOptions { + /** + * Timestamp provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @type {string} + * @memberof V1AuditAfterOptions + */ + 'timestamp'?: string; + /** + * Change ID provided in the previous audit response\'s `nextOps` attribute. An alternate way to manage response pagination. Can\'t be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. + * @type {string} + * @memberof V1AuditAfterOptions + */ + 'changeID'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-audit-event-response.ts b/src/ _generated_/rest/models/v1-audit-event-response.ts new file mode 100644 index 0000000..0189c83 --- /dev/null +++ b/src/ _generated_/rest/models/v1-audit-event-response.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { AuditEventData } from './audit-event-data'; + +/** + * Contains fields for defining Response Properties. + * @export + * @interface V1AuditEventResponse + */ +export interface V1AuditEventResponse { + /** + * The status of the overall operation. + * @type {number} + * @memberof V1AuditEventResponse + */ + 'code'?: number; + /** + * The status message for the overall operation. + * @type {string} + * @memberof V1AuditEventResponse + */ + 'message'?: string; + /** + * + * @type {AuditEventData} + * @memberof V1AuditEventResponse + */ + 'data'?: AuditEventData; + /** + * time when this response is generated, use extention method to set it. + * @type {string} + * @memberof V1AuditEventResponse + */ + 'timestamp'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-audit-response-event-request.ts b/src/ _generated_/rest/models/v1-audit-response-event-request.ts new file mode 100644 index 0000000..79c0c25 --- /dev/null +++ b/src/ _generated_/rest/models/v1-audit-response-event-request.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { AuditEventAuditResourceType } from './audit-event-audit-resource-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { AuditEventData } from './audit-event-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { AuditEventHTTPInfo } from './audit-event-httpinfo'; +// May contain unused imports in some cases +// @ts-ignore +import type { RequestActionType } from './request-action-type'; + +/** + * Contains fields for defining Request Properties. + * @export + * @interface V1AuditResponseEventRequest + */ +export interface V1AuditResponseEventRequest { + /** + * + * @type {AuditEventData} + * @memberof V1AuditResponseEventRequest + */ + 'data'?: AuditEventData; + /** + * API name. + * @type {string} + * @memberof V1AuditResponseEventRequest + */ + 'apiName'?: string; + /** + * The workspaceID (if any) of the request. + * @type {string} + * @memberof V1AuditResponseEventRequest + */ + 'workspaceID'?: string; + /** + * The vaultID (if any) of the request. + * @type {string} + * @memberof V1AuditResponseEventRequest + */ + 'vaultID'?: string; + /** + * Tags associated with the event. To provide better search capabilities. Like login. + * @type {Array} + * @memberof V1AuditResponseEventRequest + */ + 'tags'?: Array; + /** + * time when this request is generated, use extention method to set it. + * @type {string} + * @memberof V1AuditResponseEventRequest + */ + 'timestamp'?: string; + /** + * + * @type {RequestActionType} + * @memberof V1AuditResponseEventRequest + */ + 'actionType'?: RequestActionType; + /** + * + * @type {AuditEventAuditResourceType} + * @memberof V1AuditResponseEventRequest + */ + 'resourceType'?: AuditEventAuditResourceType; + /** + * + * @type {AuditEventHTTPInfo} + * @memberof V1AuditResponseEventRequest + */ + 'httpInfo'?: AuditEventHTTPInfo; +} + + + diff --git a/src/ _generated_/rest/models/v1-audit-response-event.ts b/src/ _generated_/rest/models/v1-audit-response-event.ts new file mode 100644 index 0000000..416a07d --- /dev/null +++ b/src/ _generated_/rest/models/v1-audit-response-event.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { AuditEventContext } from './audit-event-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { V1AuditEventResponse } from './v1-audit-event-response'; +// May contain unused imports in some cases +// @ts-ignore +import type { V1AuditResponseEventRequest } from './v1-audit-response-event-request'; + +/** + * Audit event details. + * @export + * @interface V1AuditResponseEvent + */ +export interface V1AuditResponseEvent { + /** + * + * @type {AuditEventContext} + * @memberof V1AuditResponseEvent + */ + 'context'?: AuditEventContext; + /** + * + * @type {V1AuditResponseEventRequest} + * @memberof V1AuditResponseEvent + */ + 'request'?: V1AuditResponseEventRequest; + /** + * + * @type {V1AuditEventResponse} + * @memberof V1AuditResponseEvent + */ + 'response'?: V1AuditEventResponse; + /** + * Parent account ID of the account that made the request, if any. + * @type {string} + * @memberof V1AuditResponseEvent + */ + 'parentAccountID'?: string; + /** + * ID of the account that made the request. + * @type {string} + * @memberof V1AuditResponseEvent + */ + 'accountID'?: string; + /** + * IDs for resources involved in the event. Presented in `{resourceType}/{resourceID}` format. For example, `VAULT/cd1d815aa09b4cbfbb803bd20349f202`. + * @type {Array} + * @memberof V1AuditResponseEvent + */ + 'resourceIDs'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-audit-response.ts b/src/ _generated_/rest/models/v1-audit-response.ts new file mode 100644 index 0000000..511054e --- /dev/null +++ b/src/ _generated_/rest/models/v1-audit-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1AuditAfterOptions } from './v1-audit-after-options'; +// May contain unused imports in some cases +// @ts-ignore +import type { V1AuditResponseEvent } from './v1-audit-response-event'; + +/** + * + * @export + * @interface V1AuditResponse + */ +export interface V1AuditResponse { + /** + * Events matching the query. + * @type {Array} + * @memberof V1AuditResponse + */ + 'event'?: Array; + /** + * + * @type {V1AuditAfterOptions} + * @memberof V1AuditResponse + */ + 'nextOps'?: V1AuditAfterOptions; +} + diff --git a/src/ _generated_/rest/models/v1-batch-operation-response.ts b/src/ _generated_/rest/models/v1-batch-operation-response.ts new file mode 100644 index 0000000..838512b --- /dev/null +++ b/src/ _generated_/rest/models/v1-batch-operation-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1BatchOperationResponse + */ +export interface V1BatchOperationResponse { + /** + * ID of the vault. + * @type {string} + * @memberof V1BatchOperationResponse + */ + 'vaultID'?: string; + /** + * Responses in the same order as in the request. Responses have the same payload structure as their corresponding APIs:
  • `POST` returns an Insert Records response.
  • `PUT` returns an Update Record response.
  • `GET` returns a Get Record response.
  • `DELETE` returns a Delete Record response.
+ * @type {Array} + * @memberof V1BatchOperationResponse + */ + 'responses'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-batch-record.ts b/src/ _generated_/rest/models/v1-batch-record.ts new file mode 100644 index 0000000..fe6c8a1 --- /dev/null +++ b/src/ _generated_/rest/models/v1-batch-record.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { BatchRecordMethod } from './batch-record-method'; +// May contain unused imports in some cases +// @ts-ignore +import type { RedactionEnumREDACTION } from './redaction-enum-redaction'; + +/** + * + * @export + * @interface V1BatchRecord + */ +export interface V1BatchRecord { + /** + * Field and value key pairs. For example, `{\'field_1\':\'value_1\', \'field_2\':\'value_2\'}`. Only valid when `method` is `POST` or `PUT`. + * @type {object} + * @memberof V1BatchRecord + */ + 'fields'?: object; + /** + * Name of the table to perform the operation on. + * @type {string} + * @memberof V1BatchRecord + */ + 'tableName'?: string; + /** + * + * @type {BatchRecordMethod} + * @memberof V1BatchRecord + */ + 'method'?: BatchRecordMethod; + /** + * ID to group operations by. Operations in the same group are executed sequentially. + * @type {string} + * @memberof V1BatchRecord + */ + 'batchID'?: string; + /** + * + * @type {RedactionEnumREDACTION} + * @memberof V1BatchRecord + */ + 'redaction'?: RedactionEnumREDACTION; + /** + * If `true`, this operation returns tokens for fields with tokenization enabled. Only applicable if `skyflow_id` values are specified. + * @type {boolean} + * @memberof V1BatchRecord + */ + 'tokenization'?: boolean; + /** + * `skyflow_id` for the record. Only valid when `method` is `GET`, `DELETE`, or `PUT`. + * @type {string} + * @memberof V1BatchRecord + */ + 'ID'?: string; + /** + * If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @type {boolean} + * @memberof V1BatchRecord + */ + 'downloadURL'?: boolean; + /** + * Column that stores primary keys for upsert operations. The column must be marked as unique in the vault schema. Only valid when `method` is `POST`. + * @type {string} + * @memberof V1BatchRecord + */ + 'upsert'?: string; + /** + * Fields and tokens for the record. For example, `{\'field_1\':\'token_1\', \'field_2\':\'token_2\'}`. + * @type {object} + * @memberof V1BatchRecord + */ + 'tokens'?: object; +} + + + diff --git a/src/ _generated_/rest/models/v1-binlist-request.ts b/src/ _generated_/rest/models/v1-binlist-request.ts new file mode 100644 index 0000000..5f4f32d --- /dev/null +++ b/src/ _generated_/rest/models/v1-binlist-request.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1VaultSchemaConfig } from './v1-vault-schema-config'; + +/** + * Request to return specific card metadata. + * @export + * @interface V1BINListRequest + */ +export interface V1BINListRequest { + /** + * Fields to return. If not specified, all fields are returned. + * @type {Array} + * @memberof V1BINListRequest + */ + 'fields'?: Array; + /** + * BIN of the card. + * @type {string} + * @memberof V1BINListRequest + */ + 'BIN'?: string; + /** + * + * @type {V1VaultSchemaConfig} + * @memberof V1BINListRequest + */ + 'vault_schema_config'?: V1VaultSchemaConfig; + /** + * skyflow_id of the record. + * @type {string} + * @memberof V1BINListRequest + */ + 'skyflow_id'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-binlist-response.ts b/src/ _generated_/rest/models/v1-binlist-response.ts new file mode 100644 index 0000000..a60f59c --- /dev/null +++ b/src/ _generated_/rest/models/v1-binlist-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1Card } from './v1-card'; + +/** + * Response to the Get BIN request. + * @export + * @interface V1BINListResponse + */ +export interface V1BINListResponse { + /** + * Card metadata associated with the specified BIN. + * @type {Array} + * @memberof V1BINListResponse + */ + 'cards_data'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-bulk-delete-record-response.ts b/src/ _generated_/rest/models/v1-bulk-delete-record-response.ts new file mode 100644 index 0000000..909aa69 --- /dev/null +++ b/src/ _generated_/rest/models/v1-bulk-delete-record-response.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1BulkDeleteRecordResponse + */ +export interface V1BulkDeleteRecordResponse { + /** + * IDs for the deleted records, or `*` if all records were deleted. + * @type {Array} + * @memberof V1BulkDeleteRecordResponse + */ + 'RecordIDResponse'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-bulk-get-record-response.ts b/src/ _generated_/rest/models/v1-bulk-get-record-response.ts new file mode 100644 index 0000000..26e8695 --- /dev/null +++ b/src/ _generated_/rest/models/v1-bulk-get-record-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1FieldRecords } from './v1-field-records'; + +/** + * + * @export + * @interface V1BulkGetRecordResponse + */ +export interface V1BulkGetRecordResponse { + /** + * The specified records. + * @type {Array} + * @memberof V1BulkGetRecordResponse + */ + 'records'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-byot.ts b/src/ _generated_/rest/models/v1-byot.ts new file mode 100644 index 0000000..cd493da --- /dev/null +++ b/src/ _generated_/rest/models/v1-byot.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Token insertion behavior. - DISABLE: Tokens aren\'t allowed for any fields. If tokens are specified, the request fails. - ENABLE: Tokens are allowed—but not required—for all fields. If tokens are specified, they\'re inserted. - ENABLE_STRICT: Tokens are required for all fields. If tokens are specified, they\'re inserted. If not, the request fails. + * @export + * @enum {string} + */ + +export const V1BYOT = { + Disable: 'DISABLE', + Enable: 'ENABLE', + EnableStrict: 'ENABLE_STRICT' +} as const; + +export type V1BYOT = typeof V1BYOT[keyof typeof V1BYOT]; + + + diff --git a/src/ _generated_/rest/models/v1-card.ts b/src/ _generated_/rest/models/v1-card.ts new file mode 100644 index 0000000..dd9a0a6 --- /dev/null +++ b/src/ _generated_/rest/models/v1-card.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Card metadata of the requested BIN. + * @export + * @interface V1Card + */ +export interface V1Card { + /** + * BIN of the card. + * @type {string} + * @memberof V1Card + */ + 'BIN'?: string; + /** + * Name of the card issuer bank. + * @type {string} + * @memberof V1Card + */ + 'issuer_name'?: string; + /** + * Country code of the card. + * @type {string} + * @memberof V1Card + */ + 'country_code'?: string; + /** + * Currency of the card. + * @type {string} + * @memberof V1Card + */ + 'currency'?: string; + /** + * Type of the card. + * @type {string} + * @memberof V1Card + */ + 'card_type'?: string; + /** + * Category of the card. + * @type {string} + * @memberof V1Card + */ + 'card_category'?: string; + /** + * Scheme of the card. + * @type {string} + * @memberof V1Card + */ + 'card_scheme'?: string; + /** + * Last four digits of the card number. + * @type {string} + * @memberof V1Card + */ + 'card_last_four_digits'?: string; + /** + * Expiry date of the card. + * @type {string} + * @memberof V1Card + */ + 'card_expiry'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-delete-file-response.ts b/src/ _generated_/rest/models/v1-delete-file-response.ts new file mode 100644 index 0000000..8b9d4d9 --- /dev/null +++ b/src/ _generated_/rest/models/v1-delete-file-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1DeleteFileResponse + */ +export interface V1DeleteFileResponse { + /** + * ID of the record. + * @type {string} + * @memberof V1DeleteFileResponse + */ + 'skyflow_id'?: string; + /** + * If `true`, the file was deleted. + * @type {boolean} + * @memberof V1DeleteFileResponse + */ + 'deleted'?: boolean; +} + diff --git a/src/ _generated_/rest/models/v1-delete-record-response.ts b/src/ _generated_/rest/models/v1-delete-record-response.ts new file mode 100644 index 0000000..0e5c39f --- /dev/null +++ b/src/ _generated_/rest/models/v1-delete-record-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1DeleteRecordResponse + */ +export interface V1DeleteRecordResponse { + /** + * ID of the deleted record. + * @type {string} + * @memberof V1DeleteRecordResponse + */ + 'skyflow_id'?: string; + /** + * If `true`, the record was deleted. + * @type {boolean} + * @memberof V1DeleteRecordResponse + */ + 'deleted'?: boolean; +} + diff --git a/src/ _generated_/rest/models/v1-detokenize-payload.ts b/src/ _generated_/rest/models/v1-detokenize-payload.ts new file mode 100644 index 0000000..ac93e14 --- /dev/null +++ b/src/ _generated_/rest/models/v1-detokenize-payload.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1DetokenizeRecordRequest } from './v1-detokenize-record-request'; + +/** + * + * @export + * @interface V1DetokenizePayload + */ +export interface V1DetokenizePayload { + /** + * Detokenization details. + * @type {Array} + * @memberof V1DetokenizePayload + */ + 'detokenizationParameters'?: Array; + /** + * If `true`, returns download URLs for fields with a file data type. URLs are valid for 15 minutes. If virus scanning is enabled, only returns if the file is clean. + * @type {boolean} + * @memberof V1DetokenizePayload + */ + 'downloadURL'?: boolean; + /** + * If `true`, the detokenization request continues even if an error occurs. + * @type {boolean} + * @memberof V1DetokenizePayload + */ + 'continueOnError'?: boolean; +} + diff --git a/src/ _generated_/rest/models/v1-detokenize-record-request.ts b/src/ _generated_/rest/models/v1-detokenize-record-request.ts new file mode 100644 index 0000000..ba5bc7b --- /dev/null +++ b/src/ _generated_/rest/models/v1-detokenize-record-request.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { RedactionEnumREDACTION } from './redaction-enum-redaction'; + +/** + * + * @export + * @interface V1DetokenizeRecordRequest + */ +export interface V1DetokenizeRecordRequest { + /** + * Token that identifies the record to detokenize. + * @type {string} + * @memberof V1DetokenizeRecordRequest + */ + 'token'?: string; + /** + * + * @type {RedactionEnumREDACTION} + * @memberof V1DetokenizeRecordRequest + */ + 'redaction'?: RedactionEnumREDACTION; +} + + + diff --git a/src/ _generated_/rest/models/v1-detokenize-record-response.ts b/src/ _generated_/rest/models/v1-detokenize-record-response.ts new file mode 100644 index 0000000..2da5266 --- /dev/null +++ b/src/ _generated_/rest/models/v1-detokenize-record-response.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { DetokenizeRecordResponseValueType } from './detokenize-record-response-value-type'; + +/** + * + * @export + * @interface V1DetokenizeRecordResponse + */ +export interface V1DetokenizeRecordResponse { + /** + * Token of the record. + * @type {string} + * @memberof V1DetokenizeRecordResponse + */ + 'token'?: string; + /** + * + * @type {DetokenizeRecordResponseValueType} + * @memberof V1DetokenizeRecordResponse + */ + 'valueType'?: DetokenizeRecordResponseValueType; + /** + * Data corresponding to the token. + * @type {string} + * @memberof V1DetokenizeRecordResponse + */ + 'value'?: string; + /** + * Error if token isn\'t found. + * @type {string} + * @memberof V1DetokenizeRecordResponse + */ + 'error'?: string; +} + + + diff --git a/src/ _generated_/rest/models/v1-detokenize-response.ts b/src/ _generated_/rest/models/v1-detokenize-response.ts new file mode 100644 index 0000000..b8d6327 --- /dev/null +++ b/src/ _generated_/rest/models/v1-detokenize-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1DetokenizeRecordResponse } from './v1-detokenize-record-response'; + +/** + * + * @export + * @interface V1DetokenizeResponse + */ +export interface V1DetokenizeResponse { + /** + * Records corresponding to the specified tokens. + * @type {Array} + * @memberof V1DetokenizeResponse + */ + 'records'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-field-records.ts b/src/ _generated_/rest/models/v1-field-records.ts new file mode 100644 index 0000000..817e7fe --- /dev/null +++ b/src/ _generated_/rest/models/v1-field-records.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Record values and tokens. + * @export + * @interface V1FieldRecords + */ +export interface V1FieldRecords { + /** + * Fields and values for the record. For example, `{\'field_1\':\'value_1\', \'field_2\':\'value_2\'}`. + * @type {object} + * @memberof V1FieldRecords + */ + 'fields'?: object; + /** + * Fields and tokens for the record. For example, `{\'field_1\':\'token_1\', \'field_2\':\'token_2\'}`. + * @type {object} + * @memberof V1FieldRecords + */ + 'tokens'?: object; +} + diff --git a/src/ _generated_/rest/models/v1-file-avscan-status.ts b/src/ _generated_/rest/models/v1-file-avscan-status.ts new file mode 100644 index 0000000..9f1bbe3 --- /dev/null +++ b/src/ _generated_/rest/models/v1-file-avscan-status.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Anti-virus scan status of the file. + * @export + * @enum {string} + */ + +export const V1FileAVScanStatus = { + None: 'SCAN_NONE', + Clean: 'SCAN_CLEAN', + Infected: 'SCAN_INFECTED', + Deleted: 'SCAN_DELETED', + Error: 'SCAN_ERROR', + Pending: 'SCAN_PENDING', + Unscannable: 'SCAN_UNSCANNABLE', + FileNotFound: 'SCAN_FILE_NOT_FOUND', + Invalid: 'SCAN_INVALID' +} as const; + +export type V1FileAVScanStatus = typeof V1FileAVScanStatus[keyof typeof V1FileAVScanStatus]; + + + diff --git a/src/ _generated_/rest/models/v1-file-info.ts b/src/ _generated_/rest/models/v1-file-info.ts new file mode 100644 index 0000000..58993a1 --- /dev/null +++ b/src/ _generated_/rest/models/v1-file-info.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1FileInfo + */ +export interface V1FileInfo { + /** + * The JSON Data for the notebook. + * @type {object} + * @memberof V1FileInfo + */ + 'fields'?: object; +} + diff --git a/src/ _generated_/rest/models/v1-get-auth-token-request.ts b/src/ _generated_/rest/models/v1-get-auth-token-request.ts new file mode 100644 index 0000000..a49d53c --- /dev/null +++ b/src/ _generated_/rest/models/v1-get-auth-token-request.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Management API + * # Management API This API controls aspects of your account and schema, including workspaces, vaults, keys, users, permissions, and more. The Management API is available from two base URIs:
  • Sandbox: https://manage.skyflowapis-preview.com
  • Production: https://manage.skyflowapis.com
When you make an API call, you need to add two headers:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
X-SKYFLOW-ACCOUNT-IDYour Skyflow account ID.X-SKYFLOW-ACCOUNT-ID: h451b763713e4424a7jke1bbkbbc84ef
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1GetAuthTokenRequest + */ +export interface V1GetAuthTokenRequest { + /** + * Grant type of the request. Set this to `urn:ietf:params:oauth:grant-type:jwt-bearer`. + * @type {string} + * @memberof V1GetAuthTokenRequest + */ + 'grant_type': string; + /** + * User-signed JWT token that contains the following fields:
  • iss: Issuer of the JWT.
  • key: Unique identifier for the key.
  • aud: Recipient the JWT is intended for.
  • exp: Time the JWT expires.
  • sub: Subject of the JWT.
  • ctx: (Optional) Value for Context-aware authorization.
+ * @type {string} + * @memberof V1GetAuthTokenRequest + */ + 'assertion': string; + /** + * Subject token. + * @type {string} + * @memberof V1GetAuthTokenRequest + */ + 'subject_token'?: string; + /** + * Subject token type. + * @type {string} + * @memberof V1GetAuthTokenRequest + */ + 'subject_token_type'?: string; + /** + * Token use type. Either `delegation` or `impersonation`. + * @type {string} + * @memberof V1GetAuthTokenRequest + */ + 'requested_token_use'?: string; + /** + * Subset of available roles to associate with the requested token. Uses the format \"role:\\ role:\\\". + * @type {string} + * @memberof V1GetAuthTokenRequest + */ + 'scope'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-get-auth-token-response.ts b/src/ _generated_/rest/models/v1-get-auth-token-response.ts new file mode 100644 index 0000000..5599bc4 --- /dev/null +++ b/src/ _generated_/rest/models/v1-get-auth-token-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Management API + * # Management API This API controls aspects of your account and schema, including workspaces, vaults, keys, users, permissions, and more. The Management API is available from two base URIs:
  • Sandbox: https://manage.skyflowapis-preview.com
  • Production: https://manage.skyflowapis.com
When you make an API call, you need to add two headers:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
X-SKYFLOW-ACCOUNT-IDYour Skyflow account ID.X-SKYFLOW-ACCOUNT-ID: h451b763713e4424a7jke1bbkbbc84ef
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1GetAuthTokenResponse + */ +export interface V1GetAuthTokenResponse { + /** + * AccessToken. + * @type {string} + * @memberof V1GetAuthTokenResponse + */ + 'accessToken'?: string; + /** + * TokenType : Bearer. + * @type {string} + * @memberof V1GetAuthTokenResponse + */ + 'tokenType'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-get-by-token-response.ts b/src/ _generated_/rest/models/v1-get-by-token-response.ts new file mode 100644 index 0000000..7289954 --- /dev/null +++ b/src/ _generated_/rest/models/v1-get-by-token-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1GetByTokenResponse + */ +export interface V1GetByTokenResponse { + /** + * Token of the returned record. + * @type {string} + * @memberof V1GetByTokenResponse + */ + 'token_id'?: string; + /** + * Record corresponding to the token. + * @type {object} + * @memberof V1GetByTokenResponse + */ + 'fields'?: object; +} + diff --git a/src/ _generated_/rest/models/v1-get-file-scan-status-response.ts b/src/ _generated_/rest/models/v1-get-file-scan-status-response.ts new file mode 100644 index 0000000..1c90f9e --- /dev/null +++ b/src/ _generated_/rest/models/v1-get-file-scan-status-response.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1FileAVScanStatus } from './v1-file-avscan-status'; + +/** + * + * @export + * @interface V1GetFileScanStatusResponse + */ +export interface V1GetFileScanStatusResponse { + /** + * + * @type {V1FileAVScanStatus} + * @memberof V1GetFileScanStatusResponse + */ + 'av_scan_status'?: V1FileAVScanStatus; +} + + + diff --git a/src/ _generated_/rest/models/v1-get-query-response.ts b/src/ _generated_/rest/models/v1-get-query-response.ts new file mode 100644 index 0000000..c61f771 --- /dev/null +++ b/src/ _generated_/rest/models/v1-get-query-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1FieldRecords } from './v1-field-records'; + +/** + * + * @export + * @interface V1GetQueryResponse + */ +export interface V1GetQueryResponse { + /** + * Records returned by the query. + * @type {Array} + * @memberof V1GetQueryResponse + */ + 'records'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-insert-record-response.ts b/src/ _generated_/rest/models/v1-insert-record-response.ts new file mode 100644 index 0000000..ba16091 --- /dev/null +++ b/src/ _generated_/rest/models/v1-insert-record-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1RecordMetaProperties } from './v1-record-meta-properties'; + +/** + * + * @export + * @interface V1InsertRecordResponse + */ +export interface V1InsertRecordResponse { + /** + * Identifiers for the inserted records. + * @type {Array} + * @memberof V1InsertRecordResponse + */ + 'records'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-member-type.ts b/src/ _generated_/rest/models/v1-member-type.ts new file mode 100644 index 0000000..7c940db --- /dev/null +++ b/src/ _generated_/rest/models/v1-member-type.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Type of the member. + * @export + * @enum {string} + */ + +export const V1MemberType = { + None: 'NONE', + User: 'USER', + ServiceAccount: 'SERVICE_ACCOUNT' +} as const; + +export type V1MemberType = typeof V1MemberType[keyof typeof V1MemberType]; + + + diff --git a/src/ _generated_/rest/models/v1-record-meta-properties.ts b/src/ _generated_/rest/models/v1-record-meta-properties.ts new file mode 100644 index 0000000..5753e0e --- /dev/null +++ b/src/ _generated_/rest/models/v1-record-meta-properties.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1RecordMetaProperties + */ +export interface V1RecordMetaProperties { + /** + * ID of the inserted record. + * @type {string} + * @memberof V1RecordMetaProperties + */ + 'skyflow_id'?: string; + /** + * Tokens for the record. + * @type {object} + * @memberof V1RecordMetaProperties + */ + 'tokens'?: object; +} + diff --git a/src/ _generated_/rest/models/v1-sort-options-order-by.ts b/src/ _generated_/rest/models/v1-sort-options-order-by.ts new file mode 100644 index 0000000..320a2ee --- /dev/null +++ b/src/ _generated_/rest/models/v1-sort-options-order-by.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const V1SortOptionsOrderBy = { + Ascending: 'ASCENDING', + Descending: 'DESCENDING' +} as const; + +export type V1SortOptionsOrderBy = typeof V1SortOptionsOrderBy[keyof typeof V1SortOptionsOrderBy]; + + + diff --git a/src/ _generated_/rest/models/v1-tokenize-payload.ts b/src/ _generated_/rest/models/v1-tokenize-payload.ts new file mode 100644 index 0000000..0adc9fd --- /dev/null +++ b/src/ _generated_/rest/models/v1-tokenize-payload.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1TokenizeRecordRequest } from './v1-tokenize-record-request'; + +/** + * + * @export + * @interface V1TokenizePayload + */ +export interface V1TokenizePayload { + /** + * Tokenization details. + * @type {Array} + * @memberof V1TokenizePayload + */ + 'tokenizationParameters'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-tokenize-record-request.ts b/src/ _generated_/rest/models/v1-tokenize-record-request.ts new file mode 100644 index 0000000..3a86cd3 --- /dev/null +++ b/src/ _generated_/rest/models/v1-tokenize-record-request.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1TokenizeRecordRequest + */ +export interface V1TokenizeRecordRequest { + /** + * Existing value to return a token for. + * @type {string} + * @memberof V1TokenizeRecordRequest + */ + 'value'?: string; + /** + * Name of the column group that the value belongs to. + * @type {string} + * @memberof V1TokenizeRecordRequest + */ + 'columnGroup'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-tokenize-record-response.ts b/src/ _generated_/rest/models/v1-tokenize-record-response.ts new file mode 100644 index 0000000..47d914b --- /dev/null +++ b/src/ _generated_/rest/models/v1-tokenize-record-response.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1TokenizeRecordResponse + */ +export interface V1TokenizeRecordResponse { + /** + * Token corresponding to a value. + * @type {string} + * @memberof V1TokenizeRecordResponse + */ + 'token'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-tokenize-response.ts b/src/ _generated_/rest/models/v1-tokenize-response.ts new file mode 100644 index 0000000..439f5f1 --- /dev/null +++ b/src/ _generated_/rest/models/v1-tokenize-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1TokenizeRecordResponse } from './v1-tokenize-record-response'; + +/** + * + * @export + * @interface V1TokenizeResponse + */ +export interface V1TokenizeResponse { + /** + * Tokens corresponding to the specified values. + * @type {Array} + * @memberof V1TokenizeResponse + */ + 'records'?: Array; +} + diff --git a/src/ _generated_/rest/models/v1-update-record-response.ts b/src/ _generated_/rest/models/v1-update-record-response.ts new file mode 100644 index 0000000..69c9c6a --- /dev/null +++ b/src/ _generated_/rest/models/v1-update-record-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1UpdateRecordResponse + */ +export interface V1UpdateRecordResponse { + /** + * ID of the updated record. + * @type {string} + * @memberof V1UpdateRecordResponse + */ + 'skyflow_id'?: string; + /** + * Tokens for the record. + * @type {object} + * @memberof V1UpdateRecordResponse + */ + 'tokens'?: object; +} + diff --git a/src/ _generated_/rest/models/v1-update-request-record.ts b/src/ _generated_/rest/models/v1-update-request-record.ts new file mode 100644 index 0000000..6d2dbb9 --- /dev/null +++ b/src/ _generated_/rest/models/v1-update-request-record.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface V1UpdateRequestRecord + */ +export interface V1UpdateRequestRecord { + /** + * ID of the record to be updated. + * @type {string} + * @memberof V1UpdateRequestRecord + */ + 'ID'?: string; + /** + * Record data. + * @type {object} + * @memberof V1UpdateRequestRecord + */ + 'fields'?: object; +} + diff --git a/src/ _generated_/rest/models/v1-vault-field-mapping.ts b/src/ _generated_/rest/models/v1-vault-field-mapping.ts new file mode 100644 index 0000000..5fcf4f8 --- /dev/null +++ b/src/ _generated_/rest/models/v1-vault-field-mapping.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Mapping of the fields in the vault to the fields to use for the lookup. + * @export + * @interface V1VaultFieldMapping + */ +export interface V1VaultFieldMapping { + /** + * Name of the column that stores the card number. + * @type {string} + * @memberof V1VaultFieldMapping + */ + 'card_number'?: string; + /** + * Name of the column that stores the card number suffix. + * @type {string} + * @memberof V1VaultFieldMapping + */ + 'card_last_four_digits'?: string; + /** + * Name of the column that stores the expiry date. + * @type {string} + * @memberof V1VaultFieldMapping + */ + 'card_expiry'?: string; +} + diff --git a/src/ _generated_/rest/models/v1-vault-schema-config.ts b/src/ _generated_/rest/models/v1-vault-schema-config.ts new file mode 100644 index 0000000..afabed0 --- /dev/null +++ b/src/ _generated_/rest/models/v1-vault-schema-config.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Skyflow Data API + * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault\'s URL.
  • Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
  • Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header:
HeaderValueExample
AuthorizationA Bearer Token. See API Authentication.Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA
+ * + * The version of the OpenAPI document: v1 + * Contact: support@skyflow.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { V1VaultFieldMapping } from './v1-vault-field-mapping'; + +/** + * Details of the vault that stores additional card details. + * @export + * @interface V1VaultSchemaConfig + */ +export interface V1VaultSchemaConfig { + /** + * ID of the vault that stores card details. + * @type {string} + * @memberof V1VaultSchemaConfig + */ + 'id'?: string; + /** + * Name of the table that stores card details. + * @type {string} + * @memberof V1VaultSchemaConfig + */ + 'table_name'?: string; + /** + * + * @type {V1VaultFieldMapping} + * @memberof V1VaultSchemaConfig + */ + 'mapping'?: V1VaultFieldMapping; +} + diff --git a/src/error/codes/index.ts b/src/error/codes/index.ts new file mode 100644 index 0000000..4be92e2 --- /dev/null +++ b/src/error/codes/index.ts @@ -0,0 +1,189 @@ +import errorMessages from "../messages"; + +const SKYFLOW_ERROR_CODE = { + CONFIG_MISSING: { http_code: 400, message: errorMessages.CONFIG_MISSING }, + INVALID_TYPE_FOR_CONFIG: { http_code: 400, message: errorMessages.INVALID_TYPE_FOR_CONFIG }, + EMPTY_VAULT_CONFIG: { http_code: 400, message: errorMessages.EMPTY_VAULT_CONFIG }, + EMPTY_CONNECTION_CONFIG: { http_code: 400, message: errorMessages.EMPTY_CONNECTION_CONFIG }, + INVALID_SKYFLOW_CONFIG: { http_code: 400, message: errorMessages.INVALID_SKYFLOW_CONFIG }, + + EMPTY_VAULT_ID: { http_code: 400, message: errorMessages.EMPTY_VAULT_ID }, + EMPTY_VAULT_ID_VALIDATION: { http_code: 400, message: errorMessages.EMPTY_VAULT_ID_VALIDATION }, + INVALID_VAULT_ID: { http_code: 400, message: errorMessages.INVALID_VAULT_ID }, + EMPTY_CLUSTER_ID: { http_code: 400, message: errorMessages.EMPTY_CLUSTER_ID }, + INVALID_CLUSTER_ID: { http_code: 400, message: errorMessages.INVALID_CLUSTER_ID }, + + INVALID_BEARER_TOKEN: { http_code: 400, message: errorMessages.INVALID_BEARER_TOKEN }, + INVALID_PARSED_CREDENTIALS_STRING: { http_code: 400, message: errorMessages.INVALID_PARSED_CREDENTIALS_STRING }, + INVALID_API_KEY: { http_code: 400, message: errorMessages.INVALID_API_KEY }, + INVALID_FILE_PATH: { http_code: 400, message: errorMessages.INVALID_FILE_PATH }, + + INVALID_BEARER_TOKEN_WITH_ID: { http_code: 400, message: errorMessages.INVALID_BEARER_TOKEN_WITH_ID }, + INVALID_PARSED_CREDENTIALS_STRING_WITH_ID: { http_code: 400, message: errorMessages.INVALID_PARSED_CREDENTIALS_STRING_WITH_ID }, + INVALID_API_KEY_WITH_ID: { http_code: 400, message: errorMessages.INVALID_API_KEY_WITH_ID }, + INVALID_FILE_PATH_WITH_ID: { http_code: 400, message: errorMessages.INVALID_FILE_PATH_WITH_ID }, + + INVALID_TOKEN: { http_code: 400, message: errorMessages.INVALID_TOKEN }, + TOKEN_EXPIRED: { http_code: 400, message: errorMessages.TOKEN_EXPIRED }, + INVALID_ENV: { http_code: 400, message: errorMessages.INVALID_ENV }, + INVALID_LOG_LEVEL: { http_code: 400, message: errorMessages.INVALID_LOG_LEVEL }, + EMPTY_CREDENTIAL_FILE_PATH: { http_code: 400, message: errorMessages.EMPTY_CREDENTIAL_FILE_PATH }, + INVALID_CREDENTIAL_FILE_PATH: { http_code: 400, message: errorMessages.INVALID_CREDENTIAL_FILE_PATH }, + + EMPTY_CONNECTION_ID: { http_code: 400, message: errorMessages.EMPTY_CONNECTION_ID }, + INVALID_CONNECTION_ID: { http_code: 400, message: errorMessages.INVALID_CONNECTION_ID }, + EMPTY_CONNECTION_ID_VALIDATION: { http_code: 400, message: errorMessages.EMPTY_CONNECTION_ID_VALIDATION }, + EMPTY_CONNECTION_URL: { http_code: 400, message: errorMessages.EMPTY_CONNECTION_URL }, + INVALID_CONNECTION_URL: { http_code: 400, message: errorMessages.INVALID_CONNECTION_URL }, + + VAULT_ID_EXITS_IN_CONFIG_LIST: { http_code: 400, message: errorMessages.VAULT_ID_EXITS_IN_CONFIG_LIST }, + CONNECTION_ID_EXITS_IN_CONFIG_LIST: { http_code: 400, message: errorMessages.CONNECTION_ID_EXITS_IN_CONFIG_LIST }, + VAULT_ID_NOT_IN_CONFIG_LIST: { http_code: 400, message: errorMessages.VAULT_ID_NOT_IN_CONFIG_LIST }, + CONNECTION_ID_NOT_IN_CONFIG_LIST: { http_code: 400, message: errorMessages.CONNECTION_ID_NOT_IN_CONFIG_LIST }, + + INVALID_CREDENTIALS: { http_code: 400, message: errorMessages.INVALID_CREDENTIALS }, + CREDENTIALS_WITH_NO_VALID_KEY: { http_code: 400, message: errorMessages.CREDENTIALS_WITH_NO_VALID_KEY }, + EMPTY_CREDENTIALS: { http_code: 400, message: errorMessages.EMPTY_CREDENTIALS }, + MULTIPLE_CREDENTIALS_PASSED: { http_code: 400, message: errorMessages.MULTIPLE_CREDENTIALS_PASSED }, + MULTIPLE_CREDENTIALS_PASSED_WITH_ID: { http_code: 400, message: errorMessages.MULTIPLE_CREDENTIALS_PASSED_WITH_ID }, + INVALID_CREDENTIALS_WITH_ID: { http_code: 400, message: errorMessages.INVALID_CREDENTIALS_WITH_ID }, + + FILE_NOT_FOUND: { http_code: 400, message: errorMessages.FILE_NOT_FOUND }, + INVALID_JSON_FILE: { http_code: 400, message: errorMessages.INVALID_JSON_FILE }, + + EMPTY_CREDENTIALS_STRING: { http_code: 400, message: errorMessages.EMPTY_CREDENTIALS_STRING }, + INVALID_CREDENTIALS_STRING: { http_code: 400, message: errorMessages.INVALID_CREDENTIALS_STRING }, + + + MISSING_TOKEN_URI: { http_code: 400, message: errorMessages.MISSING_TOKEN_URI }, + MISSING_CLIENT_ID: { http_code: 400, message: errorMessages.MISSING_CLIENT_ID }, + MISSING_KEY_ID: { http_code: 400, message: errorMessages.MISSING_KEY_ID }, + MISSING_PRIVATE_KEY: { http_code: 400, message: errorMessages.MISSING_PRIVATE_KEY }, + + INVALID_ROLES_KEY_TYPE: { http_code: 400, message: errorMessages.INVALID_ROLES_KEY_TYPE }, + EMPTY_ROLES: { http_code: 400, message: errorMessages.EMPTY_ROLES }, + + INVALID_JSON_FORMAT: { http_code: 400, message: errorMessages.INVALID_JSON_FORMAT }, + + EMPTY_DATA_TOKENS: { http_code: 400, message: errorMessages.EMPTY_DATA_TOKENS }, + DATA_TOKEN_KEY_TYPE: { http_code: 400, message: errorMessages.DATA_TOKEN_KEY_TYPE }, + TIME_TO_LIVE_KET_TYPE: { http_code: 400, message: errorMessages.TIME_TO_LIVE_KET_TYPE }, + + EMPTY_TABLE_NAME: { http_code: 400, message: errorMessages.EMPTY_TABLE_NAME }, + INVALID_TABLE_NAME: { http_code: 400, message: errorMessages.INVALID_TABLE_NAME }, + + EMPTY_REDACTION_TYPE: { http_code: 400, message: errorMessages.EMPTY_REDACTION_TYPE }, + INVALID_REDACTION_TYPE: { http_code: 400, message: errorMessages.INVALID_REDACTION_TYPE }, + + INVALID_DELETE_IDS_INPUT: { http_code: 400, message: errorMessages.INVALID_DELETE_IDS_INPUT }, + EMPTY_DELETE_IDS: { http_code: 400, message: errorMessages.EMPTY_DELETE_IDS }, + EMPTY_ID_IN_DELETE: { http_code: 400, message: errorMessages.EMPTY_ID_IN_DELETE }, + INVALID_ID_IN_DELETE: { http_code: 400, message: errorMessages.INVALID_ID_IN_DELETE }, + INVALID_DELETE_REQUEST: { http_code: 400, message: errorMessages.INVALID_DELETE_REQUEST }, + + INVALID_TOKENS_TYPE_IN_DETOKENIZE: { http_code: 400, message: errorMessages.INVALID_TOKENS_TYPE_IN_DETOKENIZE }, + EMPTY_TOKENS_IN_DETOKENIZE: { http_code: 400, message: errorMessages.EMPTY_TOKENS_IN_DETOKENIZE }, + EMPTY_TOKEN_IN_DETOKENIZE: { http_code: 400, message: errorMessages.EMPTY_TOKEN_IN_DETOKENIZE }, + INVALID_TOKEN_IN_DETOKENIZE: { http_code: 400, message: errorMessages.INVALID_TOKEN_IN_DETOKENIZE }, + INVALID_DETOKENIZE_REQUEST: { http_code: 400, message: errorMessages.INVALID_DETOKENIZE_REQUEST }, + + INVALID_INSERT_REQUEST: { http_code: 400, message: errorMessages.INVALID_INSERT_REQUEST }, + INVALID_RECORD_IN_INSERT: { http_code: 400, message: errorMessages.INVALID_RECORD_IN_INSERT }, + EMPTY_RECORD_IN_INSERT: { http_code: 400, message: errorMessages.EMPTY_RECORD_IN_INSERT }, + EMPTY_DATA_IN_INSERT: { http_code: 400, message: errorMessages.EMPTY_DATA_IN_INSERT }, + INVALID_TYPE_OF_DATA_IN_INSERT: { http_code: 400, message: errorMessages.INVALID_TYPE_OF_DATA_IN_INSERT }, + INVALID_RECORD_IN_UPDATE: { http_code: 400, message: errorMessages.INVALID_RECORD_IN_UPDATE }, + + MISSING_VALUES_IN_TOKENIZE: { http_code: 400, message: errorMessages.MISSING_VALUES_IN_TOKENIZE }, + INVALID_VALUES_TYPE_IN_TOKENIZE: { http_code: 400, message: errorMessages.INVALID_VALUES_TYPE_IN_TOKENIZE }, + EMPTY_VALUES_IN_TOKENIZE: { http_code: 400, message: errorMessages.EMPTY_VALUES_IN_TOKENIZE }, + EMPTY_DATA_IN_TOKENIZE: { http_code: 400, message: errorMessages.EMPTY_DATA_IN_TOKENIZE }, + INVALID_DATA_IN_TOKENIZE: { http_code: 400, message: errorMessages.INVALID_DATA_IN_TOKENIZE }, + INVALID_TOKENIZE_REQUEST: { http_code: 400, message: errorMessages.INVALID_TOKENIZE_REQUEST }, + INVALID_VALUE_IN_TOKENIZE: { http_code: 400, message: errorMessages.INVALID_VALUE_IN_TOKENIZE }, + INVALID_COLUMN_GROUP_IN_TOKENIZE: { http_code: 400, message: errorMessages.INVALID_COLUMN_GROUP_IN_TOKENIZE }, + EMPTY_COLUMN_GROUP_IN_TOKENIZE: { http_code: 400, message: errorMessages.EMPTY_COLUMN_GROUP_IN_TOKENIZE }, + EMPTY_VALUE_IN_TOKENIZE: { http_code: 400, message: errorMessages.EMPTY_VALUE_IN_TOKENIZE }, + + INVALID_QUERY_REQUEST: { http_code: 400, message: errorMessages.INVALID_QUERY_REQUEST }, + INVALID_QUERY: { http_code: 400, message: errorMessages.INVALID_QUERY }, + EMPTY_QUERY: { http_code: 400, message: errorMessages.EMPTY_QUERY }, + + MISSING_TABLE_IN_UPLOAD_FILE: { http_code: 400, message: errorMessages.MISSING_TABLE_IN_UPLOAD_FILE }, + INVALID_TABLE_IN_UPLOAD_FILE: { http_code: 400, message: errorMessages.INVALID_TABLE_IN_UPLOAD_FILE }, + MISSING_SKYFLOW_ID_IN_UPLOAD_FILE: { http_code: 400, message: errorMessages.MISSING_SKYFLOW_ID_IN_UPLOAD_FILE }, + INVALID_SKYFLOW_ID_IN_UPLOAD_FILE: { http_code: 400, message: errorMessages.INVALID_SKYFLOW_ID_IN_UPLOAD_FILE }, + MISSING_COLUMN_NAME_IN_UPLOAD_FILE: { http_code: 400, message: errorMessages.MISSING_COLUMN_NAME_IN_UPLOAD_FILE }, + INVALID_COLUMN_NAME_IN_UPLOAD_FILE: { http_code: 400, message: errorMessages.INVALID_COLUMN_NAME_IN_UPLOAD_FILE }, + MISSING_FILE_PATH_IN_UPLOAD_FILE: { http_code: 400, message: errorMessages.MISSING_FILE_PATH_IN_UPLOAD_FILE }, + INVALID_FILE_PATH_IN_UPLOAD_FILE: { http_code: 400, message: errorMessages.INVALID_FILE_PATH_IN_UPLOAD_FILE }, + INVALID_FILE_UPLOAD_REQUEST: { http_code: 400, message: errorMessages.INVALID_FILE_UPLOAD_REQUEST }, + + MISSING_SKYFLOW_ID_IN_UPDATE: { http_code: 400, message: errorMessages.MISSING_SKYFLOW_ID_IN_UPDATE }, + INVALID_SKYFLOW_ID_IN_UPDATE: { http_code: 400, message: errorMessages.INVALID_SKYFLOW_ID_IN_UPDATE }, + INVALID_TYPE_OF_UPDATE_DATA: { http_code: 400, message: errorMessages.INVALID_TYPE_OF_UPDATE_DATA }, + EMPTY_UPDATE_DATA: { http_code: 400, message: errorMessages.EMPTY_UPDATE_DATA }, + INVALID_UPDATE_REQUEST: { http_code: 400, message: errorMessages.INVALID_UPDATE_REQUEST }, + EMPTY_DATA_IN_UPDATE: { http_code: 400, message: errorMessages.EMPTY_DATA_IN_UPDATE }, + INVALID_DATA_IN_UPDATE: { http_code: 400, message: errorMessages.INVALID_DATA_IN_UPDATE }, + INVALID_UPDATE_TOKENS: { http_code: 400, message: errorMessages.INVALID_UPDATE_TOKENS }, + INVALID_TOKEN_IN_UPDATE: { http_code: 400, message: errorMessages.INVALID_TOKEN_IN_UPDATE }, + + INVALID_GET_REQUEST: { http_code: 400, message: errorMessages.INVALID_GET_REQUEST }, + EMPTY_IDS_IN_GET: { http_code: 400, message: errorMessages.EMPTY_IDS_IN_GET }, + EMPTY_ID_IN_GET: { http_code: 400, message: errorMessages.EMPTY_ID_IN_GET }, + INVALID_ID_IN_GET: { http_code: 400, message: errorMessages.INVALID_ID_IN_GET }, + INVALID_TYPE_OF_IDS: { http_code: 400, message: errorMessages.INVALID_TYPE_OF_IDS }, + + EMPTY_COLUMN_NAME: { http_code: 400, message: errorMessages.EMPTY_COLUMN_NAME }, + INVALID_COLUMN_NAME: { http_code: 400, message: errorMessages.INVALID_COLUMN_NAME }, + INVALID_GET_COLUMN_REQUEST: { http_code: 400, message: errorMessages.INVALID_GET_COLUMN_REQUEST }, + + INVALID_COLUMN_VALUES: { http_code: 400, message: errorMessages.INVALID_COLUMN_VALUES }, + EMPTY_COLUMN_VALUES: { http_code: 400, message: errorMessages.EMPTY_COLUMN_VALUES }, + INVALID_COLUMN_VALUE: { http_code: 400, message: errorMessages.INVALID_COLUMN_VALUE }, + EMPTY_COLUMN_VALUE: { http_code: 400, message: errorMessages.EMPTY_COLUMN_VALUE }, + + EMPTY_URL: { http_code: 400, message: errorMessages.EMPTY_URL }, + INVALID_URL: { http_code: 400, message: errorMessages.INVALID_URL }, + EMPTY_METHOD_NAME: { http_code: 400, message: errorMessages.EMPTY_METHOD_NAME }, + INVALID_METHOD_NAME: { http_code: 400, message: errorMessages.INVALID_METHOD_NAME }, + EMPTY_QUERY_PARAMS: { http_code: 400, message: errorMessages.EMPTY_QUERY_PARAMS }, + INVALID_QUERY_PARAMS: { http_code: 400, message: errorMessages.INVALID_QUERY_PARAMS }, + EMPTY_PATH_PARAMS: { http_code: 400, message: errorMessages.EMPTY_PATH_PARAMS }, + INVALID_PATH_PARAMS: { http_code: 400, message: errorMessages.INVALID_PATH_PARAMS }, + EMPTY_BODY: { http_code: 400, message: errorMessages.EMPTY_BODY }, + INVALID_BODY: { http_code: 400, message: errorMessages.INVALID_BODY }, + EMPTY_HEADERS: { http_code: 400, message: errorMessages.EMPTY_HEADERS }, + INVALID_HEADERS: { http_code: 400, message: errorMessages.INVALID_HEADERS }, + INVALID_INVOKE_CONNECTION_REQUEST: { http_code: 400, message: errorMessages.INVALID_INVOKE_CONNECTION_REQUEST }, + + INVALID_INSERT_TOKENS: { http_code: 400, message: errorMessages.INVALID_INSERT_TOKENS }, + EMPTY_INSERT_TOKEN: { http_code: 400, message: errorMessages.EMPTY_INSERT_TOKEN }, + INVALID_INSERT_TOKEN: { http_code: 400, message: errorMessages.INVALID_INSERT_TOKEN }, + INVALID_TOKEN_MODE: { http_code: 400, message: errorMessages.INVALID_TOKEN_MODE }, + INVALID_HOMOGENEOUS: { http_code: 400, message: errorMessages.INVALID_HOMOGENEOUS }, + INVALID_TOKEN_STRICT: { http_code: 400, message: errorMessages.INVALID_TOKEN_STRICT }, + INVALID_CONTINUE_ON_ERROR: { http_code: 400, message: errorMessages.INVALID_CONTINUE_ON_ERROR }, + INVALID_UPSERT: { http_code: 400, message: errorMessages.INVALID_UPSERT }, + INVALID_RETURN_TOKEN: { http_code: 400, message: errorMessages.INVALID_RETURN_TOKEN }, + + NO_TOKENS_WITH_TOKEN_MODE: { http_code: 400, message: errorMessages.NO_TOKENS_WITH_TOKEN_MODE }, + INSUFFICIENT_TOKENS_PASSED_FOR_TOKEN_MODE_ENABLE_STRICT: { http_code: 400, message: errorMessages.INSUFFICIENT_TOKENS_PASSED_FOR_TOKEN_MODE_ENABLE_STRICT }, + + INVALID_DOWNLOAD_URL: { http_code: 400, message: errorMessages.INVALID_DOWNLOAD_URL }, + + INVALID_FIELD: { http_code: 400, message: errorMessages.INVALID_FIELD }, + EMPTY_FIELD: { http_code: 400, message: errorMessages.EMPTY_FIELD }, + + INVALID_OFFSET: { http_code: 400, message: errorMessages.INVALID_OFFSET }, + INVALID_LIMIT: { http_code: 400, message: errorMessages.INVALID_LIMIT }, + + INVALID_ORDER_BY: { http_code: 400, message: errorMessages.INVALID_ORDER_BY }, + INVALID_FIELDS: { http_code: 400, message: errorMessages.INVALID_FIELDS }, + + EMPTY_VAULT_CLIENTS: { http_code: 400, message: errorMessages.EMPTY_VAULT_CLIENTS }, + EMPTY_CONNECTION_CLIENTS: { http_code: 400, message: errorMessages.EMPTY_CONNECTION_CLIENTS }, +}; + +export default SKYFLOW_ERROR_CODE; \ No newline at end of file diff --git a/src/error/index.ts b/src/error/index.ts new file mode 100644 index 0000000..1dce9cb --- /dev/null +++ b/src/error/index.ts @@ -0,0 +1,24 @@ +import { BAD_REQUEST, ISkyflowError, parameterizedString } from "../utils"; + +class SkyflowError extends Error { + + error?: ISkyflowError; + + constructor(errorCode: ISkyflowError, args: any[] = []) { + const formattedError = { + http_status: errorCode?.http_status || BAD_REQUEST, + details: errorCode?.details || [], + request_ID: errorCode?.request_ID || null, + grpc_code: errorCode?.grpc_code || null, + http_code: errorCode.http_code, + message: args?.length > 0 + ? parameterizedString(errorCode.message, ...args) + : errorCode.message, + }; + super(formattedError.message); + this.error = formattedError; + } + +} + +export default SkyflowError; \ No newline at end of file diff --git a/src/error/messages/index.ts b/src/error/messages/index.ts new file mode 100644 index 0000000..f4f6aed --- /dev/null +++ b/src/error/messages/index.ts @@ -0,0 +1,194 @@ +import sdkDetails from "../../../package.json"; + +const errorPrefix = `Skyflow Node SDK v${sdkDetails.version}`; + +const errorMessages = { + CONFIG_MISSING: `${errorPrefix} Initialization failed. Skyflow config cannot be empty. Specify a valid skyflow config.`, + INVALID_SKYFLOW_CONFIG: `${errorPrefix} Initialization failed. Invalid skyflow config. Vaults configs key missing in skyflow config.`, + INVALID_TYPE_FOR_CONFIG: `${errorPrefix} Initialization failed. Invalid %s1 config. Specify a valid %s1 config.`, + EMPTY_VAULT_CONFIG: `${errorPrefix} Initialization failed. Vault config cannot be empty. Specify a valid vault config.`, + EMPTY_CONNECTION_CONFIG: `${errorPrefix} Initialization failed. Connection config cannot be empty. Specify a valid connection config.`, + + EMPTY_VAULT_ID: `${errorPrefix} Initialization failed. Invalid vault ID. Specify a valid vault Id.`, + EMPTY_VAULT_ID_VALIDATION: `${errorPrefix} Validation error. Invalid vault ID. Specify a valid vault Id.`, + INVALID_VAULT_ID: `${errorPrefix} Initialization failed. Invalid vault ID. Specify a valid vault Id as a string.`, + EMPTY_CLUSTER_ID: `${errorPrefix} Initialization failed. Invalid cluster ID. Specify a valid cluster Id for vault with vaultId %s1 .`, + INVALID_CLUSTER_ID: `${errorPrefix} Initialization failed. Invalid cluster ID. Specify cluster Id as a string for vault with vaultId %s1.`, + INVALID_TOKEN: `${errorPrefix} Validation error. Invalid token. Specify a valid token.`, + TOKEN_EXPIRED: `${errorPrefix} Validation error. Token provided is either invalid or has expired. Specify a valid token.`, + INVALID_ENV: `${errorPrefix} Initialization failed. Invalid env. Specify a valid env for vault with vaultId %s1.`, + INVALID_LOG_LEVEL: `${errorPrefix} Initialization failed. Invalid log level. Specify a valid log level.`, + EMPTY_CREDENTIAL_FILE_PATH: `${errorPrefix} Initialization failed. Invalid credentials. Specify a valid file path.`, + INVALID_CREDENTIAL_FILE_PATH: `${errorPrefix} Initialization failed. Invalid credentials. Expected file path to be a string.`, + + INVALID_FILE_PATH: `${errorPrefix} Initialization failed. Invalid skyflow credentials. Expected file path to exists.`, + INVALID_API_KEY: `${errorPrefix} Initialization failed. Invalid skyflow credentials. Specify a valid api key.`, + INVALID_PARSED_CREDENTIALS_STRING: `${errorPrefix} Initialization failed. Invalid skyflow credentials. Specify a valid credentials string.`, + INVALID_BEARER_TOKEN: `${errorPrefix} Initialization failed. Invalid skyflow credentials. Specify a valid token.`, + + INVALID_FILE_PATH_WITH_ID: `${errorPrefix} Initialization failed. Invalid credentials. Expected file path to exists for %s1 with %s2 %s3.`, + INVALID_API_KEY_WITH_ID: `${errorPrefix} Initialization failed. Invalid credentials. Specify a valid api key for %s1 with %s2 %s3.`, + INVALID_PARSED_CREDENTIALS_STRING_WITH_ID: `${errorPrefix} Initialization failed. Invalid credentials. Specify a valid credentials string for %s1 with %s2 %s3.`, + INVALID_BEARER_TOKEN_WITH_ID: `${errorPrefix} Initialization failed. Invalid credentials. Specify a valid token for %s1 with %s2 %s3.`, + + EMPTY_CONNECTION_ID_VALIDATION: `${errorPrefix} Validation error. Invalid connection ID. Specify a valid connection Id.`, + EMPTY_CONNECTION_ID: `${errorPrefix} Initialization failed. Invalid connection ID. Specify a valid connection Id.`, + INVALID_CONNECTION_ID: `${errorPrefix} Initialization failed. Invalid connection ID. Specify connection Id as a string.`, + EMPTY_CONNECTION_URL: `${errorPrefix} Initialization failed. Invalid connection URL. Specify a valid connection Url.`, + INVALID_CONNECTION_URL: `${errorPrefix} Initialization failed. Invalid connection URL. Specify connection Url as a valid url.`, + + VAULT_ID_EXITS_IN_CONFIG_LIST: `${errorPrefix} Validation error. %s1 already exists in the config list. Specify a new vaultId.`, + CONNECTION_ID_EXITS_IN_CONFIG_LIST: `${errorPrefix} Validation error. %s1 already exists in the config list. Specify a new vaultId.`, + VAULT_ID_NOT_IN_CONFIG_LIST: `${errorPrefix} Validation error. %s1 is missing from the config. Specify the vaultId's from config.`, + CONNECTION_ID_NOT_IN_CONFIG_LIST: `${errorPrefix} Validation error. %s1 is missing from the config. Specify the connectionIds from config.`, + + EMPTY_CREDENTIALS: `${errorPrefix} Validation error. Invalid credentials. Credentials must not be empty.`, + INVALID_CREDENTIALS: `${errorPrefix} Validation error. Invalid credentials. Specify a valid credentials.`, + CREDENTIALS_WITH_NO_VALID_KEY: `${errorPrefix} Validation error. Invalid credentials. Credentials must include one of the following: { apiKey, token, credentials, path }.`, + MULTIPLE_CREDENTIALS_PASSED: `${errorPrefix} Validation error. Multiple credentials provided. Specify only one of the following: { apiKey, token, credentials, path }.`, + INVALID_CREDENTIALS_WITH_ID: `${errorPrefix} Validation error. Invalid credentials. Credentials must include one of the following: { apiKey, token, credentials, path } for %s1 with %s2 %s3.`, + MULTIPLE_CREDENTIALS_PASSED_WITH_ID: `${errorPrefix} Validation error. Invalid credentials.Specify only one of the following: { apiKey, token, credentials, path } for %s1 with %s2 %s3.`, + + FILE_NOT_FOUND: `${errorPrefix} Validation error. Credential file not found at %s1. Verify the file path.`, + INVALID_JSON_FILE: `${errorPrefix} Validation error. File at %s1 is not in valid JSON format. Verify the file contents.`, + + EMPTY_CREDENTIALS_STRING: `${errorPrefix} Validation error. Invalid credentials. Specify a valid credentials.`, + INVALID_CREDENTIALS_STRING: `${errorPrefix} Validation error. Invalid credentials. Specify credentials as a string.`, + + MISSING_PRIVATE_KEY: `${errorPrefix} Validation error. Unable to read private key in credentials. Verify your private key.`, + MISSING_CLIENT_ID: `${errorPrefix} Validation error. Unable to read client ID in credentials. Verify your client ID.`, + MISSING_KEY_ID: `${errorPrefix} Validation error. Unable to read key ID in credentials. Verify your key ID.`, + MISSING_TOKEN_URI: `${errorPrefix} Validation error. Unable to read token URI in credentials. Verify your token URI.`, + + INVALID_ROLES_KEY_TYPE: `${errorPrefix} Validation error. Invalid roles. Specify roles as an array.`, + EMPTY_ROLES: `${errorPrefix} Validation error. Invalid roles. Specify at least one role.`, + + INVALID_JSON_FORMAT: `${errorPrefix} Validation error. Credentials is not in valid JSON format. Verify the credentials.`, + + EMPTY_DATA_TOKENS: `${errorPrefix} Validation error. Invalid data tokens. Specify valid data tokens.`, + DATA_TOKEN_KEY_TYPE: `${errorPrefix} Validation error. Invalid data tokens. Specify data token as an string array.`, + TIME_TO_LIVE_KET_TYPE: `${errorPrefix} Validation error. Invalid time to live. Specify time to live parameter as an string.`, + + INVALID_DELETE_IDS_INPUT: `${errorPrefix} Validation error. Invalid delete ids type in delete request. Specify delete ids as a string array.`, + EMPTY_DELETE_IDS: `${errorPrefix} Validation error. Delete ids array cannot be empty. Specify id's in delete request.`, + INVALID_ID_IN_DELETE: `${errorPrefix} Validation error. Invalid type of id passed in delete request. Id must be of type string at index %s1.`, + INVALID_DELETE_REQUEST: `${errorPrefix} Validation error. Invalid delete request. Specify a valid delete request.`, + EMPTY_ID_IN_DELETE: `${errorPrefix} Validation error. Id cannot be empty in delete request. Specify a valid id.`, + + MISSING_REDACTION_TYPE_IN_DETOKENIZE: `${errorPrefix} Validation error. Redaction type cannot be empty in detokenize request. Specify the redaction type.`, + INVALID_REDACTION_TYPE_IN_DETOKENIZE: `${errorPrefix} Validation error. Invalid redaction type in detokenize request. Specify a redaction type.`, + INVALID_TOKENS_TYPE_IN_DETOKENIZE: `${errorPrefix} Validation error. Invalid tokens type in detokenize request. Specify tokens as a string array.`, + EMPTY_TOKENS_IN_DETOKENIZE: `${errorPrefix} Validation error. Tokens array cannot be empty. Specify token's in detokenize request.`, + EMPTY_TOKEN_IN_DETOKENIZE: `${errorPrefix} Validation error. Token cannot be empty in detokenize request. Specify a valid token at index %s1.`, + INVALID_TOKEN_IN_DETOKENIZE: `${errorPrefix} Validation error. Invalid type of token passed in detokenize request. token must be of type string at index %s1.`, + INVALID_DETOKENIZE_REQUEST: `${errorPrefix} Validation error. Invalid detokenize request. Specify a valid detokenize request.`, + + MISSING_VALUES_IN_TOKENIZE: `${errorPrefix} Validation error. Values cannot be empty in tokenize request. Specify valid values.`, + INVALID_VALUES_TYPE_IN_TOKENIZE: `${errorPrefix} Validation error. Invalid values type in tokenize request. Specify valid values of type array.`, + EMPTY_VALUES_IN_TOKENIZE: `${errorPrefix} Validation error. Values array cannot be empty. Specify value's in tokenize request.`, + EMPTY_DATA_IN_TOKENIZE: `${errorPrefix} Validation error. Data cannot be empty in tokenize request. Specify a valid data at index %s1.`, + INVALID_DATA_IN_TOKENIZE: `${errorPrefix} Validation error. Invalid Data. Specify a valid data at index %s1.`, + INVALID_COLUMN_GROUP_IN_TOKENIZE: `${errorPrefix} Validation error. Invalid type of column group passed in tokenize request. Column group must be of type string at index %s1.`, + INVALID_VALUE_IN_TOKENIZE: `${errorPrefix} Validation error. Invalid type of value passed in tokenize request. Value must be of type string at index %s1.`, + INVALID_TOKENIZE_REQUEST: `${errorPrefix} Validation error. Invalid tokenize request. Specify a valid tokenize request.`, + EMPTY_COLUMN_GROUP_IN_TOKENIZE: `${errorPrefix} Validation error. Column group cannot be empty in tokenize request. Specify a valid column group at index %s1.`, + EMPTY_VALUE_IN_TOKENIZE: `${errorPrefix} Validation error. Value cannot be empty in tokenize request. Specify a valid value at index %s1.`, + + INVALID_RECORD_IN_INSERT: `${errorPrefix} Validation error. Invalid data in insert request. data must be of type object at index %s1.`, + INVALID_RECORD_IN_UPDATE: `${errorPrefix} Validation error. Invalid data in update request. data must be of type object.`, + EMPTY_RECORD_IN_INSERT: `${errorPrefix} Validation error. Data cannot be empty in insert request. Specify valid data at index %s1.`, + INVALID_INSERT_REQUEST: `${errorPrefix} Validation error. Invalid insert request. Specify a valid insert request.`, + INVALID_TYPE_OF_DATA_IN_INSERT: `${errorPrefix} Validation error. Invalid type of data in insert request. Specify data as a object array.`, + EMPTY_DATA_IN_INSERT: `${errorPrefix} Validation error. Data array cannot be empty. Specify data in insert request.`, + + INVALID_QUERY_REQUEST: `${errorPrefix} Validation error. Invalid query request. Specify a valid query request.`, + EMPTY_QUERY: `${errorPrefix} Validation error. Query cannot be empty in query request. Specify a valid query.`, + INVALID_QUERY: `${errorPrefix} Validation error. Invalid query in query request. Specify a valid query.`, + + INVALID_FILE_UPLOAD_REQUEST: `${errorPrefix} Validation error. Invalid file upload request. Specify a valid file upload request.`, + MISSING_TABLE_IN_UPLOAD_FILE: `${errorPrefix} Validation error. Table name cannot be empty in file upload request. Specify table name as a string.`, + INVALID_TABLE_IN_UPLOAD_FILE: `${errorPrefix} Validation error. Invalid table name in file upload request. Specify a valid table name.`, + MISSING_SKYFLOW_ID_IN_UPLOAD_FILE: `${errorPrefix} Validation error. Skyflow id cannot be empty in file upload request. Specify a valid skyflow Id as string.`, + INVALID_SKYFLOW_ID_IN_UPLOAD_FILE: `${errorPrefix} Validation error. Invalid skyflow Id in file upload request. Specify a valid skyflow Id.`, + MISSING_COLUMN_NAME_IN_UPLOAD_FILE: `${errorPrefix} Validation error. Column name cannot be empty in file upload request. Specify a valid column name as string.`, + INVALID_COLUMN_NAME_IN_UPLOAD_FILE: `${errorPrefix} Validation error. Invalid column name in file upload request. Specify a valid column name.`, + MISSING_FILE_PATH_IN_UPLOAD_FILE: `${errorPrefix} Validation error. File path cannot be empty in file upload request. Specify a valid file path as string.`, + INVALID_FILE_PATH_IN_UPLOAD_FILE: `${errorPrefix} Validation error. Invalid file path in file upload request. Specify a valid file path.`, + + MISSING_SKYFLOW_ID_IN_UPDATE: `${errorPrefix} Validation error. Skyflow id name cannot be empty in update request. Specify a skyflow Id name as string.`, + INVALID_SKYFLOW_ID_IN_UPDATE: `${errorPrefix} Validation error. Invalid skyflow Id in update request. Specify a valid skyflow Id.`, + INVALID_TYPE_OF_UPDATE_DATA: `${errorPrefix} Validation error. Invalid update data in update request. Specify a valid update data as array of object.`, + EMPTY_UPDATE_DATA: `${errorPrefix} Validation error. Update data cannot be empty in update request. Specify a valid update data.`, + INVALID_UPDATE_REQUEST: `${errorPrefix} Validation error. Invalid update request. Specify a valid update request.`, + INVALID_DATA_IN_UPDATE: `${errorPrefix} Validation error. Invalid data in update request. data must be of type object at index %s1.`, + EMPTY_DATA_IN_UPDATE: `${errorPrefix} Validation error. Data cannot be empty in update request. Specify a valid data at index %s1.`, + INVALID_UPDATE_TOKENS: `${errorPrefix} Validation error. Invalid tokens. Specify valid tokens as object.`, + INVALID_TOKEN_IN_UPDATE: `${errorPrefix} Validation error. Invalid tokens. Specify valid tokens as key value pairs.`, + + EMPTY_TABLE_NAME: `${errorPrefix} Validation error. Table name cannot be empty. Specify a valid table name.`, + INVALID_TABLE_NAME: `${errorPrefix} Validation error. Invalid table name. Specify a valid table name as string.`, + EMPTY_REDACTION_TYPE: `${errorPrefix} Validation error. Redaction type cannot be empty. Specify a valid redaction type.`, + INVALID_REDACTION_TYPE: `${errorPrefix} Validation error. Invalid redaction type. Specify a valid redaction type.`, + + INVALID_TYPE_OF_IDS: `${errorPrefix} Validation error. Invalid ids passed in get request. Specify valid ids as array of string.`, + EMPTY_IDS_IN_GET: `${errorPrefix} Validation error. Ids cannot be empty in get request. Specify valid ids.`, + EMPTY_ID_IN_GET: `${errorPrefix} Validation error. Id cannot be empty. Specify a valid Id at index %s1.`, + INVALID_ID_IN_GET: `${errorPrefix} Validation error. Invalid Id. Specify a valid Id at index %s1 as string.`, + INVALID_GET_REQUEST: `${errorPrefix} Validation error. Invalid get request. Specify a valid get request.`, + + EMPTY_COLUMN_NAME: `${errorPrefix} Validation error. Column name cannot be empty. Specify a valid column name.`, + INVALID_COLUMN_NAME: `${errorPrefix} Validation error. Invalid column name. Specify a valid column name as string.`, + INVALID_COLUMN_VALUES: `${errorPrefix} Validation error. Invalid column values. Specify valid column values as string array.`, + EMPTY_COLUMN_VALUES: `${errorPrefix} Validation error. Column values cannot be empty. Specify valid column values.`, + EMPTY_COLUMN_VALUE: `${errorPrefix} Validation error. Column value cannot be empty. Specify a valid column value at index %s1.`, + INVALID_COLUMN_VALUE: `${errorPrefix} Validation error. Invalid column value. Specify a valid column value at index %s1 as string.`, + INVALID_GET_COLUMN_REQUEST: `${errorPrefix} Validation error. Invalid get column request. Specify a valid get column request.`, + + EMPTY_URL: `${errorPrefix} Validation error. Url cannot be empty. Specify a valid url.`, + INVALID_URL: `${errorPrefix} Validation error. Invalid url. Specify a valid url as a string.`, + EMPTY_METHOD_NAME: `${errorPrefix} Validation error. Method name cannot be empty. Specify a valid method name.`, + INVALID_METHOD_NAME: `${errorPrefix} Validation error. Invalid method name. Specify a valid method name as a string.`, + + EMPTY_PATH_PARAMS: `${errorPrefix} Validation error. Path params cannot be empty. Specify valid path params.`, + INVALID_PATH_PARAMS: `${errorPrefix} Validation error. Invalid path params. Specify valid path params.`, + EMPTY_QUERY_PARAMS: `${errorPrefix} Validation error. Query params cannot be empty. Specify valid query params.`, + INVALID_QUERY_PARAMS: `${errorPrefix} Validation error. Invalid query params. Specify valid query params.`, + EMPTY_BODY: `${errorPrefix} Validation error. Body cannot be empty. Specify a valid body.`, + INVALID_BODY: `${errorPrefix} Validation error. Invalid body. Specify a valid body.`, + EMPTY_HEADERS: `${errorPrefix} Validation error. Headers cannot be empty. Specify valid headers.`, + INVALID_HEADERS: `${errorPrefix} Validation error. Invalid headers. Specify valid headers.`, + + INVALID_INVOKE_CONNECTION_REQUEST: `${errorPrefix} Validation error. Invalid invoke connection request. Specify a valid get invoke connection request.`, + ERROR_OCCURRED: `${errorPrefix} API error. Error occurred.`, + + EMPTY_INSERT_TOKEN: `${errorPrefix} Validation error. Tokens object cannot be empty. Specify a valid tokens object at index %s1.`, + INVALID_INSERT_TOKEN: `${errorPrefix} Validation error. Invalid tokens object. Specify a valid tokens object at index %s1.`, + INVALID_INSERT_TOKENS: `${errorPrefix} Validation error. Invalid tokens. Specify valid tokens as object array.`, + INVALID_TOKEN_MODE: `${errorPrefix} Validation error. The token mode key has a value of type %s1. Specify token as type of TokenMode.`, + INVALID_HOMOGENEOUS: `${errorPrefix} Validation error. The homogeneous key has a value of type %s1. Specify homogeneous as boolean.`, + INVALID_TOKEN_STRICT: `${errorPrefix} Validation error. The tokenStrict key has a value of type %s1. Specify tokenStrict as boolean.`, + INVALID_CONTINUE_ON_ERROR: `${errorPrefix} Validation error. The continueOnError key has a value of type %s1. Specify continueOnError as boolean.`, + INVALID_UPSERT: `${errorPrefix} Validation error. The upsert key has a value of type %s1. Specify upsert as string.`, + INVALID_RETURN_TOKEN: `${errorPrefix} Validation error. The returnToken key has a value of type %s1. Specify returnToken as boolean.`, + + NO_TOKENS_WITH_TOKEN_MODE: `${errorPrefix} Validation error. Tokens weren't specified for records while 'tokenMode' was ENABLE or ENABLE_STRICT` , + INSUFFICIENT_TOKENS_PASSED_FOR_TOKEN_MODE_ENABLE_STRICT: `${errorPrefix} Validation error. 'tokenMode' is set to 'ENABLE_STRICT', but some fields are missing tokens. Specify tokens for all fields.`, + + INVALID_DOWNLOAD_URL: `${errorPrefix} Validation error. The downloadURL key has a value of type %s1. Specify downloadURL as string.`, + + EMPTY_FIELD: `${errorPrefix} Validation error. Filed value cannot be empty. Specify a valid filed value at index %s1.`, + INVALID_FIELD: `${errorPrefix} Validation error. Invalid filed value. Specify a valid filed value at index %s1 as string.`, + + INVALID_OFFSET: `${errorPrefix} Validation error. The offset key has a value of type %s1. Specify offset as string.`, + INVALID_LIMIT: `${errorPrefix} Validation error. The limit key has a value of type %s1. Specify limit as string.`, + + INVALID_ORDER_BY: `${errorPrefix} Validation error. The orderBy key has a value of type %s1. Specify orderBy as string.`, + INVALID_FIELDS: `${errorPrefix} Validation error. The fields key has a value of type %s1. Specify fields as array of strings.`, + + INVAILD_JSON_RESPONSE: `${errorPrefix} Validation error. The invalid json response. Please reach out to skyflow using requestId - %s1.`, + + EMPTY_VAULT_CLIENTS: `${errorPrefix} Validation error. No vault config found. Please add a vault config`, + EMPTY_CONNECTION_CLIENTS: `${errorPrefix} Validation error. No connection config found. Please add a connection config` +}; + +export default errorMessages; \ No newline at end of file diff --git a/src/index.js b/src/index.js deleted file mode 100644 index f41d44d..0000000 --- a/src/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { - generateToken, - generateBearerToken, - generateBearerTokenFromCreds, - generateSignedDataTokens, - generateSignedDataTokensFromCreds -} from './service-account/util/Token'; -import Skyflow from './vault-api/Skyflow'; -import { setLogLevel } from './vault-api/Logging'; -import { LogLevel } from './vault-api/utils/common'; -import { isValid, isExpired } from './vault-api/utils/jwt-utils'; -export { - generateBearerToken, - generateToken, - generateBearerTokenFromCreds, - setLogLevel, - LogLevel, - Skyflow, - isValid, - isExpired, - generateSignedDataTokens, - generateSignedDataTokensFromCreds -}; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..f8edec2 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,79 @@ +import Skyflow from './vault/skyflow'; +import { LogLevel, Env, RedactionType, RequestMethod, OrderByEnum, TokenMode } from './utils'; +import InsertRequest from './vault/model/request/insert'; +import InsertOptions from './vault/model/options/insert'; +import GetRequest from './vault/model/request/get'; +import GetOptions from './vault/model/options/get'; +import DetokenizeRequest from './vault/model/request/detokenize'; +import DetokenizeOptions from './vault/model/options/detokenize'; +import DeleteRequest from './vault/model/request/delete'; +import UpdateRequest from './vault/model/request/update'; +import FileUploadRequest from './vault/model/request/file-upload'; +import QueryRequest from './vault/model/request/query'; +import Credentials from './vault/config/credentials'; +import TokenizeRequest from './vault/model/request/tokenize'; +import TokenizeResponse from './vault/model/response/tokenize'; +import { BearerTokenOptions, generateBearerToken, generateBearerTokenFromCreds, generateSignedDataTokens, generateSignedDataTokensFromCreds, GenerateTokenOptions, SignedDataTokensOptions } from './service-account'; +import { isExpired } from './utils/jwt-utils'; +import UpdateOptions from './vault/model/options/update'; +import InvokeConnectionRequest from './vault/model/request/inkove'; +import GetColumnRequest from './vault/model/request/get-column'; +import InsertResponse from './vault/model/response/insert'; +import GetResponse from './vault/model/response/get'; +import DetokenizeResponse from './vault/model/response/detokenize'; +import DeleteResponse from './vault/model/response/delete'; +import UpdateResponse from './vault/model/response/update'; +import FileUploadResponse from './vault/model/response/file-upload'; +import QueryResponse from './vault/model/response/query'; +import InvokeConnectionResponse from './vault/model/response/invoke/invoke'; +import { SkyflowConfig, TokenizeRequestType } from './vault/types'; +import VaultConfig from './vault/config/vault'; +import SkyflowError from './error'; +import ConnectionConfig from './vault/config/connection'; + +export { + Env, + LogLevel, + RequestMethod, + Skyflow, + SkyflowConfig, + ConnectionConfig, + VaultConfig, + SkyflowError, + TokenizeRequestType, + BearerTokenOptions, + SignedDataTokensOptions, + GenerateTokenOptions, + generateBearerToken, + generateBearerTokenFromCreds, + generateSignedDataTokens, + generateSignedDataTokensFromCreds, + isExpired, + Credentials, + RedactionType, + OrderByEnum, + TokenMode, + InsertRequest, + InsertOptions, + InsertResponse, + GetRequest, + GetColumnRequest, + GetOptions, + GetResponse, + DetokenizeRequest, + DetokenizeOptions, + DetokenizeResponse, + DeleteRequest, + DeleteResponse, + UpdateRequest, + UpdateOptions, + UpdateResponse, + FileUploadRequest, + FileUploadResponse, + QueryRequest, + QueryResponse, + TokenizeRequest, + TokenizeResponse, + InvokeConnectionRequest, + InvokeConnectionResponse +}; \ No newline at end of file diff --git a/src/management/config/management/index.ts b/src/management/config/management/index.ts new file mode 100644 index 0000000..d48bab5 --- /dev/null +++ b/src/management/config/management/index.ts @@ -0,0 +1,15 @@ +//imports + +class ManagementConfig { + + //fields + + constructor() { + + } + + //getters and setters + +} + +export default ManagementConfig; diff --git a/src/management/controller/policy/index.ts b/src/management/controller/policy/index.ts new file mode 100644 index 0000000..48ffbdc --- /dev/null +++ b/src/management/controller/policy/index.ts @@ -0,0 +1,27 @@ +//imports + +class Policy { + + constructor() { + + } + + static initialize() { + //return policy object + } + + update() { + + } + + delete() { + + } + + get() { + + } + +} + +export default Policy; diff --git a/src/management/controller/role/index.ts b/src/management/controller/role/index.ts new file mode 100644 index 0000000..5e28a0e --- /dev/null +++ b/src/management/controller/role/index.ts @@ -0,0 +1,27 @@ +//imports + +class Role { + + constructor() { + + } + + static initialize() { + //return role object + } + + update() { + + } + + delete() { + + } + + get() { + + } + +} + +export default Role; diff --git a/src/management/controller/vault/index.ts b/src/management/controller/vault/index.ts new file mode 100644 index 0000000..f7ddeb2 --- /dev/null +++ b/src/management/controller/vault/index.ts @@ -0,0 +1,27 @@ +//imports + +class Vault { + + constructor() { + + } + + static initialize() { + //return vault object + } + + update() { + + } + + delete() { + + } + + get() { + + } + +} + +export default Vault; diff --git a/src/management/index.ts b/src/management/index.ts new file mode 100644 index 0000000..cd2079e --- /dev/null +++ b/src/management/index.ts @@ -0,0 +1,41 @@ +//imports + +class Management { + + constructor() { + + } + + static initialize() { + //return management object + } + + createVault() { + //return vault object using static func + //cache - store the vault object in a list + } + + createRole() { + //return role object using static func + //cache - store the role object in a list + } + + createPolicy() { + //return policy object using static func + //cache - store the policy object in a list + } + + vault(vaultId: string) { + // return vault object from the cached list + } + + role(roleId: string) { + // return role object from the cached list + } + + policy(policyId: string) { + // return policy object from the cached list + } +} + +export default Management; diff --git a/src/management/model/request/create-vault/index.ts b/src/management/model/request/create-vault/index.ts new file mode 100644 index 0000000..8907645 --- /dev/null +++ b/src/management/model/request/create-vault/index.ts @@ -0,0 +1,15 @@ +//imports + +class CreateVaultRequest { + + //fields + + constructor() { + + } + + //getters and setters + +} + +export default CreateVaultRequest; diff --git a/src/management/model/request/delete-policy/index.ts b/src/management/model/request/delete-policy/index.ts new file mode 100644 index 0000000..65ea565 --- /dev/null +++ b/src/management/model/request/delete-policy/index.ts @@ -0,0 +1,15 @@ +//imports + +class DeletePolicyRequest { + + //fields + + constructor() { + + } + + //getters and setters + +} + +export default DeletePolicyRequest; diff --git a/src/management/model/response/create-vault/index.ts b/src/management/model/response/create-vault/index.ts new file mode 100644 index 0000000..70c119e --- /dev/null +++ b/src/management/model/response/create-vault/index.ts @@ -0,0 +1,15 @@ +//imports + +class CreateVaultResponse { + + //fields + + constructor() { + + } + + //getters and setters + +} + +export default CreateVaultResponse; diff --git a/src/management/model/response/delete-policy/index.ts b/src/management/model/response/delete-policy/index.ts new file mode 100644 index 0000000..e4af19c --- /dev/null +++ b/src/management/model/response/delete-policy/index.ts @@ -0,0 +1,15 @@ +//imports + +class DeletePolicyResponse { + + //fields + + constructor() { + + } + + //getters and setters + +} + +export default DeletePolicyResponse; diff --git a/src/management/skyflow/index.ts b/src/management/skyflow/index.ts new file mode 100644 index 0000000..f79cf6c --- /dev/null +++ b/src/management/skyflow/index.ts @@ -0,0 +1,16 @@ +import { SkyflowConfig } from "../types"; + +class Skyflow { + + constructor(config: SkyflowConfig) { + + } + + management() { + //cache management object if created + // return management object using static func + } + +} + +export default Skyflow; diff --git a/src/management/types/index.ts b/src/management/types/index.ts new file mode 100644 index 0000000..7841e39 --- /dev/null +++ b/src/management/types/index.ts @@ -0,0 +1,7 @@ +import { LogLevel } from "../../utils"; +import ManagementConfig from "../config/management"; + +export interface SkyflowConfig { + managementConfig: ManagementConfig[], + logLevel?: LogLevel, +} \ No newline at end of file diff --git a/src/service-account/client/index.ts b/src/service-account/client/index.ts new file mode 100644 index 0000000..b2d07a9 --- /dev/null +++ b/src/service-account/client/index.ts @@ -0,0 +1,20 @@ +// imports +import { AuthenticationApi, Configuration } from "../../ _generated_/rest"; + + +class Client { + + configuration: Configuration; + + authApi: AuthenticationApi; + + constructor(tokenURI: string) { + this.configuration = new Configuration({ + basePath: tokenURI, + }); + this.authApi = new AuthenticationApi(this.configuration); + } + +} + +export default Client; \ No newline at end of file diff --git a/src/service-account/errors/Messages.ts b/src/service-account/errors/Messages.ts deleted file mode 100644 index bcb3c83..0000000 --- a/src/service-account/errors/Messages.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -export const errorMessages = { - ClientIDNotFound: "clientID not found", - TokenURINotFound: "tokenURI not found", - KeyIDNotFound: "keyID not found", - PrivateKeyNotFound: "privateKey not found", - NotAValidJSON: "not a valid JSON object", - FileNotFound: "file not found", - EmptyFile: "Empty file found", - CredentialsContentEmpty: "Empty string passed for credentials", - ExpectedStringParameter: "Parameter type passed is invalid, expected string", - ScopedRolesEmpty: "Empty array passed for roleIDs", - ExpectedRoleIDParameter: "RoleID type passed is invalid, expected string[]", - DataTokensNotFound: "dataTokens not found", - DataTokensEmpty: "Empty array passed for data tokens", - ExpectedDataTokensParameter: "Data tokens type passed is invalid, expected string[]", - ExpectedTimeToLiveParameter: "Time to live type passed is invalid, expected number", - -}; diff --git a/src/service-account/index.ts b/src/service-account/index.ts new file mode 100644 index 0000000..e31c3f4 --- /dev/null +++ b/src/service-account/index.ts @@ -0,0 +1,364 @@ +import * as fs from 'fs'; +import jwt from "jsonwebtoken"; +import { V1GetAuthTokenRequest } from '../ _generated_/rest'; +import { getBaseUrl, LogLevel, MessageType, parameterizedString, printLog } from '../utils'; +import Client from './client'; +import logs from '../utils/logs'; +import SkyflowError from '../error'; +import SKYFLOW_ERROR_CODE from '../error/codes'; + +export type BearerTokenOptions = { + ctx?: string, + roleIDs?: string[], + logLevel?: LogLevel, +} + +export type GenerateTokenOptions = { + logLevel?: LogLevel, +} + +export type SignedDataTokensResponse = { + token: string, + signedToken: string +} + +export type SignedDataTokensOptions = { + dataTokens: string[], + timeToLive?: number, + ctx?: string, + logLevel?: LogLevel, +} + +export type TokenResponse = { + accessToken: string, + tokenType: string +} + +function generateBearerToken(credentialsFilePath: string, options?: BearerTokenOptions): Promise { + return new Promise((resolve, reject) => { + let credentials; + + if (!fs.existsSync(credentialsFilePath)) { + printLog(parameterizedString(logs.errorLogs.FILE_NOT_FOUND, [credentialsFilePath]), MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.FILE_NOT_FOUND, [credentialsFilePath])); + } + credentials = fs.readFileSync(credentialsFilePath, "utf8"); + + if (credentials === '') { + printLog(logs.errorLogs.EMPTY_FILE, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_JSON_FILE, [credentialsFilePath])) + } + + try { + JSON.parse(credentials); + } catch (e) { + printLog(logs.errorLogs.NOT_A_VALID_JSON, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_JSON_FILE, [credentialsFilePath])); + } + + getToken(credentials, options).then((res) => { + resolve(res) + }).catch((err) => { reject(err) }) + }) +} + +function generateBearerTokenFromCreds(credentials, options?: BearerTokenOptions): Promise { + return getToken(credentials, options) +} + +function getToken(credentials, options?: BearerTokenOptions): Promise { + return new Promise((resolve, reject) => { + printLog(logs.infoLogs.GENERATE_BEARER_TOKEN_TRIGGERED, MessageType.LOG, options?.logLevel); + try { + if (!credentials || credentials === "" || credentials === "{}") { + printLog(logs.errorLogs.CREDENTIALS_CONTENT_EMPTY, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CREDENTIALS_STRING)); + } + if (typeof (credentials) !== "string") { + printLog(logs.errorLogs.EXPECTED_STRING_PARAMETER, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CREDENTIALS_STRING)); + } + + if (options?.roleIDs && options.roleIDs?.length == 0) { + printLog(logs.errorLogs.SCOPED_ROLES_EMPTY, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_ROLES)); + } + + if (options?.roleIDs && !Array.isArray(options.roleIDs)) { + printLog(logs.errorLogs.EXPECTED_ROLE_ID_PARAMETER, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ROLES_KEY_TYPE)); + } + let credentialsObj = JSON.parse("{}") + try { + credentialsObj = JSON.parse(credentials); + } + catch (e) { + printLog(logs.errorLogs.NOT_A_VALID_JSON, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_JSON_FORMAT)); + } + const expiryTime = Math.floor(Date.now() / 1000) + 3600; + const claims = { + iss: credentialsObj.clientID, + key: credentialsObj.keyID, + aud: credentialsObj.tokenURI, + exp: expiryTime, + sub: credentialsObj.clientID, + ...(options && options.ctx ? { ctx: options.ctx } : {}), + }; + if (claims.iss == null) { + printLog(logs.errorLogs.CLIENT_ID_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_CLIENT_ID)); + } + else if (claims.key == null) { + printLog(logs.errorLogs.KEY_ID_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_KEY_ID)); + } + else if (claims.aud == null) { + printLog(logs.errorLogs.TOKEN_URI_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TOKEN_URI)); + } + else if (credentialsObj.privateKey == null) { + printLog(logs.errorLogs.PRIVATE_KEY_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_PRIVATE_KEY)); + } + else { + const privateKey = credentialsObj.privateKey.toString("utf8"); + const signedJwt = jwt.sign(claims, privateKey, { algorithm: "RS256" }); + + const scopedRoles = options?.roleIDs && getRolesForScopedToken(options.roleIDs); + + const url = getBaseUrl(credentialsObj?.tokenURI); + + if (url === '') { + printLog(logs.errorLogs.TOKEN_URI_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TOKEN_URI)); + } + + const client = new Client(url); + + const req: V1GetAuthTokenRequest = { + grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer", + assertion: signedJwt, + scope: scopedRoles, + }; + client.authApi.authenticationServiceGetAuthToken( + req, + { headers: { "Content-Type": "application/json", } } + ).then((res: any) => { + successResponse(res, options?.logLevel).then((response) => resolve(response)).catch(err => reject(err)) + }) + .catch((err) => { + failureResponse(err).catch(err => reject(err)) + }); + } + } + catch (e) { + reject(e); + } + }); +} + +function generateSignedDataTokens(credentialsFilePath: string, options: SignedDataTokensOptions): Promise { + return new Promise((resolve, reject) => { + let credentials; + + if (!fs.existsSync(credentialsFilePath)) { + printLog(parameterizedString(logs.errorLogs.FILE_NOT_FOUND, [credentialsFilePath]), MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.FILE_NOT_FOUND, [credentialsFilePath])); + } + credentials = fs.readFileSync(credentialsFilePath, "utf8"); + + if (credentials === '') { + printLog(logs.errorLogs.EMPTY_FILE, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_JSON_FILE, [credentialsFilePath])) + } + + try { + JSON.parse(credentials); + } catch (e) { + printLog(logs.errorLogs.NOT_A_VALID_JSON, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_JSON_FILE, [credentialsFilePath])); + } + + getSignedTokens(credentials, options).then((res) => { + resolve(res) + }).catch((err) => { reject(err) }) + }) + +} + +function getSignedTokens(credentials, options: SignedDataTokensOptions): Promise { + return new Promise((resolve, reject) => { + printLog(logs.infoLogs.GENERATE_SIGNED_DATA_TOKENS_TRIGGERED, MessageType.LOG, options?.logLevel); + try { + if (!credentials && credentials == "") { + printLog(logs.errorLogs.CREDENTIALS_CONTENT_EMPTY, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CREDENTIALS_STRING)); + } + if (typeof (credentials) !== "string") { + printLog(logs.errorLogs.EXPECTED_STRING_PARAMETER, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CREDENTIALS_STRING)); + } + + if (options?.dataTokens && options.dataTokens?.length == 0) { + printLog(logs.errorLogs.DATA_TOKENS_EMPTY, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_DATA_TOKENS)); + } + + if (options && options.dataTokens == null || undefined) { + printLog(logs.errorLogs.DATA_TOKENS_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_DATA_TOKENS)); + } + + if (options?.dataTokens && !Array.isArray(options.dataTokens)) { + printLog(logs.errorLogs.EXPECTED_DATA_TOKENS_PARAMETER, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.DATA_TOKEN_KEY_TYPE)); + } + + if (options?.timeToLive && typeof (options.timeToLive) !== "number") { + printLog(logs.errorLogs.EXPECTED_TIME_TO_LIVE_PARAMETER, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.TIME_TO_LIVE_KET_TYPE)); + } + + let credentialsObj = JSON.parse("{}") + try { + credentialsObj = JSON.parse(credentials); + } + catch (e) { + printLog(logs.errorLogs.NOT_A_VALID_JSON, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_JSON_FORMAT)); + } + + let expiryTime; + if (options?.timeToLive && options?.timeToLive !== null) { + expiryTime = Math.floor(Date.now() / 1000) + options?.timeToLive; + } else { + expiryTime = Math.floor(Date.now() / 1000) + 60; + } + const prefix = "signed_token_"; + + let responseArray: SignedDataTokensResponse[] = []; + if (options && options?.dataTokens) { + options.dataTokens.forEach((token) => { + const claims = { + iss: "sdk", + key: credentialsObj.keyID, + aud: credentialsObj.tokenURI, + exp: expiryTime, + sub: credentialsObj.clientID, + tok: token, + ...(options && options.ctx ? { ctx: options.ctx } : {}), + }; + + if (claims.key == null) { + printLog(logs.errorLogs.KEY_ID_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_KEY_ID)); + } + else if (claims.aud == null) { + printLog(logs.errorLogs.TOKEN_URI_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TOKEN_URI)); + } + else if (credentialsObj.privateKey == null) { + printLog(logs.errorLogs.PRIVATE_KEY_NOT_FOUND, MessageType.ERROR, options?.logLevel); + reject(new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_PRIVATE_KEY)); + } + else { + const privateKey = credentialsObj.privateKey.toString("utf8"); + const signedJwt = jwt.sign(claims, privateKey, { algorithm: "RS256" }); + const responseObject = getSignedDataTokenResponseObject(prefix + signedJwt, token); + responseArray.push(responseObject) + } + }) + } + signedDataTokenSuccessResponse(responseArray, options?.logLevel).then((response) => resolve(response)).catch(err => reject(err)) + } + catch (e) { + reject(e); + } + }); +} + +function generateSignedDataTokensFromCreds(credentials, options: SignedDataTokensOptions): Promise { + return getSignedTokens(credentials, options) +} + +function failureResponse(err: any) { + return new Promise((_, reject) => { + if (err.response) { + let data = err.response.data + const headerMap = err.response.headers + const requestId = headerMap['x-request-id']; + const contentType = headerMap["content-type"]; + if (contentType && contentType.includes('application/json')) { + let description = data; + if (description?.error?.message) { + description =description?.error?.message; + } + printLog(description, MessageType.ERROR); + reject(new SkyflowError({ + http_code: err.response.status, + message: description, + request_ID: requestId, + })); + } else if (contentType && contentType.includes('text/plain')) { + let description = data + printLog(description, MessageType.ERROR); + reject(new SkyflowError({ + http_code: err.response.status, + message: description, + request_ID: requestId + })); + } else { + let description = logs.errorLogs.ERROR_OCCURED; + printLog(description, MessageType.ERROR); + reject(new SkyflowError({ + http_code: err.response.status, + message: description, + request_ID: requestId + })); + } + } else { + printLog(err.message, MessageType.ERROR); + reject(new SkyflowError({ + http_code: "500", + message: err.message, + })) + } + }) +} + +function successResponse(res: any, logLevel?: LogLevel): Promise { + printLog(logs.infoLogs.GENERATE_BEARER_TOKEN_SUCCESS, MessageType.LOG, logLevel); + return new Promise((resolve, _) => { + resolve({ + accessToken: res.data.accessToken, + tokenType: res.data.tokenType, + }); + }) +} + +function getSignedDataTokenResponseObject(signedToken, actualToken): SignedDataTokensResponse { + let responseObject: SignedDataTokensResponse = { + token: actualToken, + signedToken: signedToken, + } + return responseObject; +} + +function signedDataTokenSuccessResponse(res: SignedDataTokensResponse[], logLevel?: LogLevel): Promise { + printLog(logs.infoLogs.GENERATE_SIGNED_DATA_TOKEN_SUCCESS, MessageType.LOG, logLevel); + return new Promise((resolve, _) => { + resolve(res); + }) +} + +export function getRolesForScopedToken(roleIDs: string[]) { + let str = '' + roleIDs?.forEach((role) => { + str = str + "role:" + role + " " + }) + return str; +} + + +export { generateBearerToken, generateBearerTokenFromCreds, generateSignedDataTokens, generateSignedDataTokensFromCreds, getToken, successResponse, failureResponse }; \ No newline at end of file diff --git a/src/service-account/util/Token.ts b/src/service-account/util/Token.ts deleted file mode 100644 index 8a242e4..0000000 --- a/src/service-account/util/Token.ts +++ /dev/null @@ -1,360 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import fs from "fs"; -import Axios from "axios"; -import jwt from "jsonwebtoken"; -import { errorMessages } from "../errors/Messages"; -import { printLog } from "../../vault-api/utils/logs-helper"; -import logs from "../../vault-api/utils/logs"; -import { MessageType, SDK_METRICS_HEADER_KEY } from "../../vault-api/utils/common"; -import SkyflowError from '../../vault-api/libs/SkyflowError'; -import { generateSDKMetrics } from "../../vault-api/utils/helpers"; - -export type ResponseToken = { accessToken: string, tokenType: string } -export type ResponseSignedDataTokens = { token: string, signedToken: string } - - - -export type BearerTokenOptions = { - ctx?: string, - roleIDs?: string[], -} - -export type SignedDataTokensOptions = { - dataTokens: string[], - timeToLive?: number, - ctx?: string, -} - -function generateBearerToken(credentialsFilePath, options?: BearerTokenOptions): Promise { - return new Promise((resolve, reject) => { - let credentials; - - if (!fs.existsSync(credentialsFilePath)) { - printLog(errorMessages.FileNotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.FileNotFound })); - } - credentials = fs.readFileSync(credentialsFilePath, "utf8"); - - if (credentials === '') { - printLog(errorMessages.EmptyFile, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.EmptyFile })) - } - - try { - JSON.parse(credentials); - } catch (e) { - printLog(errorMessages.NotAValidJSON, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.NotAValidJSON })); - } - - getToken(credentials, options).then((res) => { - resolve(res) - }).catch((err) => { reject(err) }) - }) -} - -function getToken(credentials, options?: BearerTokenOptions): Promise { - return new Promise((resolve, reject) => { - printLog(logs.infoLogs.GENERATE_BEARER_TOKEN_TRIGGERED, MessageType.LOG); - try { - if (!credentials && credentials == "") { - printLog(errorMessages.CredentialsContentEmpty, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.CredentialsContentEmpty })); - } - if (typeof (credentials) !== "string") { - printLog(errorMessages.ExpectedStringParameter, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.ExpectedStringParameter })); - } - - if (options?.roleIDs && options.roleIDs?.length == 0) { - printLog(errorMessages.ScopedRolesEmpty, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.ScopedRolesEmpty })); - } - - if (options?.roleIDs && !Array.isArray(options.roleIDs)) { - printLog(errorMessages.ExpectedRoleIDParameter, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.ExpectedRoleIDParameter })); - } - let credentialsObj = JSON.parse("{}") - try { - credentialsObj = JSON.parse(credentials); - } - catch (e) { - printLog(errorMessages.NotAValidJSON, MessageType.ERROR); - throw new SkyflowError({ code: 400, description: errorMessages.NotAValidJSON }); - } - const expiryTime = Math.floor(Date.now() / 1000) + 3600; - - const claims = { - iss: credentialsObj.clientID, - key: credentialsObj.keyID, - aud: credentialsObj.tokenURI, - exp: expiryTime, - sub: credentialsObj.clientID, - ...(options && options.ctx ? { ctx: options.ctx } : {}), - }; - - if (claims.iss == null) { - printLog(errorMessages.ClientIDNotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.ClientIDNotFound })); - } - else if (claims.key == null) { - printLog(errorMessages.KeyIDNotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.KeyIDNotFound })); - } - else if (claims.aud == null) { - printLog(errorMessages.TokenURINotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.TokenURINotFound })); - } - else if (credentialsObj.privateKey == null) { - printLog(errorMessages.PrivateKeyNotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.PrivateKeyNotFound })); - } - else { - const privateKey = credentialsObj.privateKey.toString("utf8"); - - const signedJwt = jwt.sign(claims, privateKey, { algorithm: "RS256" }); - - const scopedRoles = options?.roleIDs && getRolesForScopedToken(options.roleIDs) - Axios(`${credentialsObj.tokenURI}`, { - method: "POST", - headers: { - "Content-Type": "application/json", - [SDK_METRICS_HEADER_KEY]: JSON.stringify(generateSDKMetrics()), - }, - data: { - grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer", - assertion: signedJwt, - scope: scopedRoles, - }, - }) - .then((res) => { - successResponse(res).then((response) => resolve(response)).catch(err => reject(err)) - }) - .catch((err) => { - failureResponse(err).catch(err => reject(err)) - }); - } - } - catch (e) { - reject(e); - } - }); -} - -export function getRolesForScopedToken(roleIDs: string[]) { - let str = '' - roleIDs.forEach((role) => { - str = str + "role:" + role + " " - }) - return str; -} - -function successResponse(res: any): Promise { - printLog(logs.infoLogs.GENERATE_BEARER_TOKEN_SUCCESS, MessageType.LOG); - return new Promise((resolve, _) => { - resolve({ - accessToken: res.data.accessToken, - tokenType: res.data.tokenType, - }); - }) -} - -function getSignedDataTokenResponseObject(signedToken, actualToken): ResponseSignedDataTokens { - let responseObject: ResponseSignedDataTokens = { - token: actualToken, - signedToken: signedToken, - } - return responseObject; -} - -function signedDataTokenSuccessResponse(res: ResponseSignedDataTokens[]): Promise { - printLog(logs.infoLogs.GENERATE_SIGNED_DATA_TOKEN_SUCCESS, MessageType.LOG); - - return new Promise((resolve, _) => { - resolve(res); - }) -} - -function failureResponse(err: any) { - return new Promise((_, reject) => { - if (err.response) { - let data = err.response.data - const headerMap = err.response.headers - const requestId = headerMap['x-request-id']; - const contentType = headerMap["content-type"]; - if (contentType && contentType.includes('application/json')) { - let description = data; - if (description?.error?.message) { - description = requestId ? `${description?.error?.message} - requestId: ${requestId}` : description?.error?.message; - } - printLog(description, MessageType.ERROR); - reject(new SkyflowError({ - code: err.response.status, - description: description, - }, [], true)); - } else if (contentType && contentType.includes('text/plain')) { - let description = requestId ? `${data} - requestId: ${requestId}` : data - printLog(description, MessageType.ERROR); - reject(new SkyflowError({ - code: err.response.status, - description, - }, [], true)); - } else { - let description = requestId ? `${logs.errorLogs.ERROR_OCCURED} - requestId: ${requestId}` : logs.errorLogs.ERROR_OCCURED - printLog(description, MessageType.ERROR); - reject(new SkyflowError({ - code: err.response.status, - description, - }, [], true)); - } - } else { - printLog(err.message, MessageType.ERROR); - reject(new SkyflowError({ - code: "500", - description: err.message, - })) - } - }) -} -function generateToken(credentialsFilePath): Promise { - printLog(logs.warnLogs.GENERATE_BEARER_DEPRECATED, MessageType.WARN) - return generateBearerToken(credentialsFilePath) -} - -function generateBearerTokenFromCreds(credentials, options?: BearerTokenOptions): Promise { - return getToken(credentials, options) -} - -function generateSignedDataTokens(credentialsFilePath, options: SignedDataTokensOptions): Promise { - return new Promise((resolve, reject) => { - let credentials; - - if (!fs.existsSync(credentialsFilePath)) { - printLog(errorMessages.FileNotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.FileNotFound })); - } - credentials = fs.readFileSync(credentialsFilePath, "utf8"); - - if (credentials === '') { - printLog(errorMessages.EmptyFile, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.EmptyFile })) - } - - try { - JSON.parse(credentials); - } catch (e) { - printLog(errorMessages.NotAValidJSON, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.NotAValidJSON })); - } - - getSignedTokens(credentials, options).then((res) => { - resolve(res) - }).catch((err) => { reject(err) }) - }) - -} - -function getSignedTokens(credentials, options: SignedDataTokensOptions): Promise { - return new Promise((resolve, reject) => { - printLog(logs.infoLogs.GENERATE_SIGNED_DATA_TOKENS_TRIGGERED, MessageType.LOG); - try { - if (!credentials && credentials == "") { - printLog(errorMessages.CredentialsContentEmpty, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.CredentialsContentEmpty })); - } - if (typeof (credentials) !== "string") { - printLog(errorMessages.ExpectedStringParameter, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.ExpectedStringParameter })); - } - - if (options?.dataTokens && options.dataTokens?.length == 0) { - printLog(errorMessages.DataTokensEmpty, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.DataTokensEmpty })); - } - - if (options && options.dataTokens == null || undefined) { - printLog(errorMessages.DataTokensNotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.DataTokensNotFound })); - } - - if (options?.dataTokens && !Array.isArray(options.dataTokens)) { - printLog(errorMessages.ExpectedDataTokensParameter, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.ExpectedDataTokensParameter })); - } - - if (options?.timeToLive && typeof (options.timeToLive) !== "number") { - printLog(errorMessages.ExpectedTimeToLiveParameter, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.ExpectedTimeToLiveParameter })); - } - - let credentialsObj = JSON.parse("{}") - try { - credentialsObj = JSON.parse(credentials); - } - catch (e) { - printLog(errorMessages.NotAValidJSON, MessageType.ERROR); - throw new SkyflowError({ code: 400, description: errorMessages.NotAValidJSON }); - } - - let expiryTime; - if (options?.timeToLive && options?.timeToLive !== null) { - expiryTime = Math.floor(Date.now() / 1000) + options?.timeToLive; - } else { - expiryTime = Math.floor(Date.now() / 1000) + 60; - } - const prefix = "signed_token_"; - - let responseArray: ResponseSignedDataTokens[] = []; - if (options && options?.dataTokens) { - options.dataTokens.forEach((token) => { - const claims = { - iss: "sdk", - key: credentialsObj.keyID, - aud: credentialsObj.tokenURI, - exp: expiryTime, - sub: credentialsObj.clientID, - tok: token, - ...(options && options.ctx ? { ctx: options.ctx } : {}), - }; - - if (claims.key == null) { - printLog(errorMessages.KeyIDNotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.KeyIDNotFound })); - } - else if (claims.aud == null) { - printLog(errorMessages.TokenURINotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.TokenURINotFound })); - } - else if (credentialsObj.privateKey == null) { - printLog(errorMessages.PrivateKeyNotFound, MessageType.ERROR); - reject(new SkyflowError({ code: 400, description: errorMessages.PrivateKeyNotFound })); - } - else { - const privateKey = credentialsObj.privateKey.toString("utf8"); - const signedJwt = jwt.sign(claims, privateKey, { algorithm: "RS256" }); - const responseObject = getSignedDataTokenResponseObject(prefix + signedJwt, token); - responseArray.push(responseObject) - } - }) - } - signedDataTokenSuccessResponse(responseArray).then((response) => resolve(response)).catch(err => reject(err)) - } - catch (e) { - reject(e); - } - }); -} - -function generateSignedDataTokensFromCreds(credentials, options: SignedDataTokensOptions): Promise { - return getSignedTokens(credentials, options) -} - -export { generateBearerToken, generateToken, generateBearerTokenFromCreds, generateSignedDataTokens, generateSignedDataTokensFromCreds }; - -export const __testing = { - successResponse, - failureResponse -} diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..b75dce9 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,371 @@ +import SkyflowError from "../error"; +import * as sdkDetails from "../../package.json"; +import { generateBearerToken, generateBearerTokenFromCreds } from "../service-account"; +import Credentials from "../vault/config/credentials"; +import dotenv from "dotenv"; +import logs from "./logs"; +import os from 'os'; +import process from "process"; +import SKYFLOW_ERROR_CODE from "../error/codes"; +import { isExpired } from "./jwt-utils"; +import { isValidAPIKey } from "./validations"; + +dotenv.config(); + +export const SDK_METRICS_HEADER_KEY = "sky-metadata"; + +export const SKYFLOW_ID = "skyflowId"; + +export const BAD_REQUEST = "Bad Request"; + +export const SKYFLOW_AUTH_HEADER_KEY = "x-skyflow-authorization"; + +export const REQUEST_ID_KEY = "x-request-id"; + +export const LOGLEVEL = "loglevel"; + +export const CREDENTIALS = "credentials"; + +export const VAULT_ID = "vaultId"; + +export const CONNECTION_ID = "connectionId"; + +export const VAULT = "vault"; + +export const CONNECTION = "connection"; + +export enum TokenMode { + DISABLE = 'DISABLE', + ENABLE = 'ENABLE', + ENABLE_STRICT = 'ENABLE_STRICT' +}; + +export enum LogLevel { + WARN = 'WARN', + INFO = 'INFO', + DEBUG = 'DEBUG', + ERROR = 'ERROR', + OFF = 'OFF' +} + +export enum AuthType { + TOKEN = 'TOKEN', + API_KEY = 'API_KEY' +} + +export enum MessageType { + LOG = 'LOG', + WARN = 'WARN', + ERROR = 'ERROR', +} + +export enum RequestMethod { + POST = 'POST', + GET = 'GET', + PUT = 'PUT', + PATCH = 'PATCH', +} + +export enum Env { + DEV = 'DEV', + STAGE = 'STAGE', + SANDBOX = 'SANDBOX', + PROD = 'PROD', +} + +export enum RedactionType { + DEFAULT = 'DEFAULT', + PLAIN_TEXT = 'PLAIN_TEXT', + MASKED = 'MASKED', + REDACTED = 'REDACTED', +} + +export enum OrderByEnum { + ASCENDING = 'ASCENDING', + DESCENDING = 'DESCENDING', + NONE = 'NONE' +}; + +export const TYPES = { + INSERT: 'INSERT', + INSERT_BATCH: 'INSERT_BATCH', + DETOKENIZE: 'DETOKENIZE', + TOKENIZE: 'TOKENIZE', + DELETE: 'DELETE', + UPDATE: 'UPDATE', + GET: 'GET', + FILE_UPLOAD: 'FILE_UPLOAD', + QUERY: 'QUERY', + INVOKE_CONNECTION: 'INVOKE_CONNECTION', +}; + +export interface ISkyflowError { + http_status?: string | number | null, + grpc_code?: string | number | null, + http_code: string | number | null, + message: string, + request_ID?: string | null, + details?: Array | null, +} + +export interface AuthInfo { + key: string, + type: AuthType +} + +export function getVaultURL(clusterID: string, env: Env) { + switch (env) { + case Env.PROD: + return `https://${clusterID}.vault.skyflowapis.com`; + case Env.SANDBOX: + return `https://${clusterID}.vault.skyflowapis-preview.com`; + case Env.DEV: + return `https://${clusterID}.vault.skyflowapis.dev`; + case Env.STAGE: + return `https://${clusterID}.vault.skyflowapis.tech`; + default: + return `https://${clusterID}.vault.skyflowapis.com`; + } +} + +export function getConnectionBaseURL(clusterID: string, env: Env) { + switch (env) { + case Env.PROD: + return `https://${clusterID}.gateway.skyflowapis.com`; + case Env.SANDBOX: + return `https://${clusterID}.gateway.skyflowapis-preview.com`; + case Env.DEV: + return `https://${clusterID}.gateway.skyflowapis.dev`; + case Env.STAGE: + return `https://${clusterID}.gateway.skyflowapis.tech`; + default: + return `https://${clusterID}.gateway.skyflowapis.com`; + } +} + +export function validateToken(token: string) { + if (isExpired(token)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.TOKEN_EXPIRED); + } + return token; +} + +export function removeSDKVersion(message: string): string { + const sdkVersionPattern = /Skyflow Node SDK v[\d\.a-zA-Z\-]+/; + const cleanedMessage = message.replace(sdkVersionPattern, '').trim(); + return cleanedMessage; +} + +// Helper function to generate token based on credentials +export async function getToken(credentials?: Credentials, logLevel?: LogLevel) { + if (credentials?.credentialsString) { + printLog(logs.infoLogs.USING_CREDENTIALS_STRING, MessageType.LOG, logLevel); + return generateBearerTokenFromCreds(credentials.credentialsString, { + roleIDs: credentials.roles, + ctx: credentials.context, + logLevel, + }); + } + + if (credentials?.path) { + printLog(logs.infoLogs.USING_PATH, MessageType.LOG, logLevel); + return generateBearerToken(credentials.path, { + roleIDs: credentials.roles, + ctx: credentials.context, + logLevel, + }); + } + + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CREDENTIALS); +} + +export async function getBearerToken(credentials?: Credentials, logLevel?: LogLevel): Promise { + try { + // If no credentials and no environment variable, throw error + if (!credentials && process.env.SKYFLOW_CREDENTIALS === undefined) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CREDENTIALS); + } + // If credentials are missing but environment variable exists, use it + if (!credentials && process.env.SKYFLOW_CREDENTIALS) { + printLog(logs.infoLogs.USING_SKYFLOW_CREDENTIALS_ENV, MessageType.LOG, logLevel); + credentials = { + credentialsString: process.env.SKYFLOW_CREDENTIALS + } + } + + // If token already exists, resolve immediately + if (credentials?.apiKey && credentials.apiKey.trim().length > 0) { + if(isValidAPIKey(credentials?.apiKey)){ + printLog(logs.infoLogs.USING_API_KEY, MessageType.LOG, logLevel); + return { type: AuthType.API_KEY, key: credentials.apiKey }; + } + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_API_KEY); + } + + // If token already exists, resolve immediately + if (credentials?.token) { + printLog(logs.infoLogs.USING_BEARER_TOKEN, MessageType.LOG, logLevel); + return { type: AuthType.TOKEN, key: validateToken(credentials.token) }; + } + + printLog(logs.infoLogs.BEARER_TOKEN_LISTENER, MessageType.LOG, logLevel); + + // Generate token based on provided credentials + const token = await getToken(credentials, logLevel); + + printLog(logs.infoLogs.BEARER_TOKEN_RESOLVED, MessageType.LOG, logLevel); + + return { type: AuthType.TOKEN, key: token.accessToken }; + + } catch (err) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CREDENTIALS); // rethrow any errors that occur + } +}; + +export function getBaseUrl(url: string): string { + try { + const parsedUrl = new URL(url); + return `${parsedUrl.protocol}//${parsedUrl.hostname}`; + } catch (error) { + return ''; + } +} + +export function fillUrlWithPathAndQueryParams(url: string, + pathParams?: object, + queryParams?: object) { + let filledUrl = url; + if (pathParams) { + Object.entries(pathParams).forEach(([key, value]) => { + filledUrl = url.replace(`{${key}}`, value); + }); + } + if (queryParams) { + filledUrl += '?'; + Object.entries(queryParams).forEach(([key, value]) => { + filledUrl += `${key}=${value}&`; + }); + filledUrl = filledUrl.substring(0, filledUrl.length - 1); + } + return filledUrl; +} + +export const LogLevelOptions = { + DEBUG: { + showDebugLogs: true, showInfoLogs: true, showWarnLogs: true, showErrorLogs: true, + }, + INFO: { + showDebugLogs: false, showInfoLogs: true, showWarnLogs: true, showErrorLogs: true, + }, + WARN: { + showDebugLogs: false, showInfoLogs: false, showWarnLogs: true, showErrorLogs: true, + }, + ERROR: { + showDebugLogs: false, showInfoLogs: false, showWarnLogs: false, showErrorLogs: true, + }, + OFF: { + showDebugLogs: false, showInfoLogs: false, showWarnLogs: false, showErrorLogs: false, + } +}; + + +export const printLog = (message: string, messageType: MessageType, logLevel: LogLevel = LogLevel.ERROR) => { + const { + showDebugLogs, showInfoLogs, showWarnLogs, showErrorLogs, + } = LogLevelOptions[logLevel]; + const version = sdkDetails?.version ? `v${sdkDetails?.version}` : ''; + if (messageType === MessageType.LOG && showDebugLogs) { + // eslint-disable-next-line no-console + console.log(`DEBUG: [Skyflow Node SDK ${version}] ` + message); + } else if (messageType === MessageType.LOG && showInfoLogs) { + // eslint-disable-next-line no-console + console.log(`INFO: [Skyflow Node SDK ${version}] ` + message); + } else if (messageType === MessageType.WARN && showWarnLogs) { + // eslint-disable-next-line no-console + console.warn(`WARN: [Skyflow Node SDK ${version}] ` + message); + } else if (messageType === MessageType.ERROR && showErrorLogs) { + // eslint-disable-next-line no-console + console.error(`ERROR: [Skyflow Node SDK ${version}] ` + message); + } +}; + +export const parameterizedString = (...args: any[]) => { + const str = args[0]; + const params = args.filter((arg, index) => index !== 0); + if (!str) return ''; + return str.replace(/%s[0-9]+/g, (matchedStr: any) => { + const variableIndex = matchedStr.replace('%s', '') - 1; + return params[variableIndex]; + }); +}; + +export const generateSDKMetrics = (logLevel?: LogLevel) => { + let sdkNameVersion = ""; + let clientDeviceModel = ""; + let clientOSDetails = ""; + let runtimeDetails = ""; + try { + sdkNameVersion = `${sdkDetails.name ? `${sdkDetails.name}@` : ""}${sdkDetails.version ? sdkDetails.version : "" + }`; + } catch (err) { + printLog( + parameterizedString(logs.infoLogs.UNABLE_TO_GENERATE_SDK_METRIC, "sdkNameVersion") + , MessageType.LOG, + logLevel + ); + sdkNameVersion = ""; + } + + try { + clientDeviceModel = `${process.platform ? `${process.platform}` : ""} ${process.arch ? process.arch : "" + }`; + } catch (err) { + printLog( + parameterizedString(logs.infoLogs.UNABLE_TO_GENERATE_SDK_METRIC, "clientDeviceModel") + , MessageType.LOG, + logLevel + ); + clientDeviceModel = ""; + } + + try { + clientOSDetails = `${os.release() && os.platform() ? os.platform() + '-' + os.release() : ""}`; + } catch (err) { + printLog( + parameterizedString(logs.infoLogs.UNABLE_TO_GENERATE_SDK_METRIC, "clientOSDetails") + , MessageType.LOG, + logLevel + ); + clientOSDetails = ""; + } + + try { + runtimeDetails = `${process.version ? `Node@${process.version}` : ""}`; + } catch (err) { + printLog( + parameterizedString(logs.infoLogs.UNABLE_TO_GENERATE_SDK_METRIC, "runtimeDetails") + , MessageType.LOG, + logLevel + ); + runtimeDetails = ""; + } + + return { + sdk_name_version: sdkNameVersion, + sdk_client_device_model: clientDeviceModel, + sdk_client_os_details: clientOSDetails, + sdk_runtime_details: runtimeDetails, + }; +}; + +export const isValidURL = (url: string) => { + if (url && url.substring(0, 5).toLowerCase() !== 'https') { + return false; + } + try { + const tempUrl = new URL(url); + if (tempUrl) return true; + } catch (err) { + return false; + } +}; diff --git a/src/utils/jwt-utils/index.ts b/src/utils/jwt-utils/index.ts new file mode 100644 index 0000000..489f812 --- /dev/null +++ b/src/utils/jwt-utils/index.ts @@ -0,0 +1,41 @@ +import jwt_decode, { JwtPayload } from 'jwt-decode'; +import { MessageType, printLog } from '..'; +import logs from '../logs'; + +function isExpired(token: string) { + try { + if (token === "") { + printLog(logs.infoLogs.EMPTY_BEARER_TOKEN, MessageType.LOG); + return true; + } + let isJwtExpired = false; + const decoded: JwtPayload = jwt_decode(token); + const currentTime = (new Date().getTime() / 1000); + const expiryTime = decoded.exp; + if (expiryTime && currentTime > expiryTime) { + printLog(logs.infoLogs.BEARER_TOKEN_EXPIRED, MessageType.LOG); + isJwtExpired = true; + } + return isJwtExpired; + } catch (err) { + return true; + } +} + +function isTokenValid(token: string) { + try { + if (token === "") return false + let isJwtExpired = false; + const decoded: JwtPayload = jwt_decode(token); + const currentTime = (new Date().getTime() / 1000); + const expiryTime = decoded.exp; + if (expiryTime && currentTime > expiryTime) { + isJwtExpired = true; + } + return !isJwtExpired; + } catch (err) { + return false; + } +}; + +export { isExpired, isTokenValid }; \ No newline at end of file diff --git a/src/utils/logs/index.ts b/src/utils/logs/index.ts new file mode 100644 index 0000000..3b4211a --- /dev/null +++ b/src/utils/logs/index.ts @@ -0,0 +1,166 @@ +const logs = { + infoLogs: { + EMPTY_BEARER_TOKEN: "BearerToken is Empty", + BEARER_TOKEN_EXPIRED: "BearerToken is expired", + GENERATE_BEARER_TOKEN_TRIGGERED: "generateBearerToken is triggered", + GENERATE_BEARER_TOKEN_SUCCESS: "BearerToken is generated", + GENERATE_SIGNED_DATA_TOKEN_SUCCESS: 'Signed Data tokens are generated', + INITIALIZE_CLIENT: 'Initializing skyflow client.', + VALIDATING_VAULT_CONFIG: 'Validating vault config.', + VALIDATING_CONNECTION_CONFIG: 'Validating connection config.', + VAULT_CONTROLLER_INITIALIZED: 'Initialized vault controller with vault ID %s1.', + CONNECTION_CONTROLLER_INITIALIZED: 'Intitialized connection controller with connection ID %s1.', + vaultId_CONFIG_EXISTS: 'Vault config with vault ID %s1 already exists.', + vaultId_CONFIG_DOES_NOT_EXIST: `Vault config with vault ID %s1 doesn't exist.`, + connectionId_CONFIG_EXISTS: `Connection config with connection ID %s1 already exists.`, + connectionId_CONFIG_DOES_NOT_EXIST: `Connection config with connection ID %s1 doesn't exist.`, + CURRENT_LOG_LEVEL: 'Current log level is %s1.', + CLIENT_INITIALIZED: 'Initialized skyflow client successfully.', + VALIDATE_INSERT_INPUT: 'Validating insert input.', + VALIDATE_DETOKENIZE_INPUT: 'Validating detokenize input.', + VALIDATE_TOKENIZE_INPUT: 'Validating tokenize input.', + VALIDATE_FILE_UPLOAD_INPUT: 'Validating detokenize input.', + VALIDATE_GET_INPUT: 'Validating get method input.', + VALIDATE_QUERY_INPUT: 'Validating query method input.', + VALIDATE_DELETE_INPUT: 'Validating delete method input.', + VALIDATE_UPDATE_INPUT: 'Validating update method input.', + VALIDATE_CONNECTION_CONFIG: 'Validating connection config.', + INSERT_DATA_SUCCESS: 'Data inserted.', + FILE_UPLOAD_DATA_SUCCESS: 'File uploaded.', + DETOKENIZE_SUCCESS: 'Data detokenized.', + GET_SUCCESS: 'Data revealed.', + UPDATE_SUCCESS: 'Data updated.', + DELETE_SUCCESS: 'Data deleted.', + TOKENIZE_SUCCESS: 'Data tokenized.', + QUERY_SUCCESS: 'Query executed.', + BEARER_TOKEN_LISTENER: 'Get bearer token listener added.', + BEARER_TOKEN_RESOLVED: 'GetBearerToken promise resolved successfully.', + REUSE_BEARER_TOKEN: 'Reusing bearer token.', + REUSE_API_KEY: 'Reusing api key.', + CONTROLLER_INITIALIZED: 'SkyflowController initialized.', + INSERT_TRIGGERED: 'Insert method triggered.', + DETOKENIZE_TRIGGERED: 'Detokenize method triggered.', + TOKENIZE_TRIGGERED: 'Tokenize method triggered.', + GET_BY_ID_TRIGGERED: 'Get by ID triggered.', + GET_TRIGGERED: 'Get call triggered.', + QUERY_TRIGGERED: 'Query call triggered.', + UPLOAD_FILE_TRIGGERED: 'Upload file call triggered.', + INVOKE_CONNECTION_TRIGGERED: 'Invoke connection triggered.', + DELETE_TRIGGERED: 'Delete method Triggered', + DELETE_REQUEST_RESOLVED: 'Delete method is resolved', + TOKENIZE_REQUEST_RESOLVED: 'Tokenize method is resolved', + QUERY_REQUEST_RESOLVED: 'Query method is resolved', + FILE_UPLOAD_REQUEST_RESOLVED: 'File upload method is resolved', + EMIT_REQUEST: 'Emitted %s1 request.', + DETOKENIZE_REQUEST_RESOLVED: 'Detokenize request is resolved.', + INSERT_REQUEST_RESOLVED: 'Insert request is resolved.', + INSERT_BATCH_REQUEST_RESOLVED: 'Insert request is resolved.', + GET_REQUEST_RESOLVED: 'Get request is resolved.', + INVOKE_CONNECTION_REQUEST_RESOLVED: 'Invoke connection request resolved.', + GENERATE_SIGNED_DATA_TOKENS_TRIGGERED: "generateSignedDataTokens is triggered", + UPDATE_TRIGGERED: 'Update method triggered.', + UPDATE_REQUEST_RESOLVED: 'Update request is resolved.', + UNABLE_TO_GENERATE_SDK_METRIC: 'Unable to generate %s1 metric.', + USING_BEARER_TOKEN: 'Using token from credentials', + USING_API_KEY: 'Using api key from credentials', + USING_CREDENTIALS_STRING: 'Using credentials string from credentials', + USING_PATH: 'Using path from credentials', + USING_SKYFLOW_CREDENTIALS_ENV: 'Using SKYFLOW_CREDENTIALS from env' + }, + errorLogs: { + VAULT_CONFIG_KEY_MISSING: "Invalid skyflow config. Vaults configs key missing in skyflow config.", + EMPTY_VAULT_ID: "Invalid vault config. Vault Id can not be empty.", + INVALID_VAULT_ID: "Invalid vault config. Vault Id is required.", + EMPTY_CLUSTER_ID: "Invalid vault config. Cluster Id can not be empty.", + INVALID_CLUSTER_ID: "Invalid vault config. Cluster Id is required.", + INVALID_ENV: "Invalid vault config. Specify a valid env as Env.", + + EMPTY_CONNECTION_ID: "Invalid connection config. Connection ID can not be empty.", + INVALID_CONNECTION_ID: "Invalid connection config. Connection ID is required.", + EMPTY_CONNECTION_URL: "Invalid connection config. Connection URL can not be empty.", + INVALID_CONNECTION_URL: "Invalid connection config. Connection URL is required.", + INVALID_CONNECTION_URL_TYPE: "ERROR: [Skyflow] Invalid connection config. Connection URL is not a valid URL.", + + EMPTY_CREDENTIALS_PATH: "Invalid credentials. Credentials path can not be empty.", + EMPTY_CREDENTIALS_STRING: "Invalid credentials. Credentials string can not be empty.", + EMPTY_TOKEN_VALUE: "Invalid credentials. Token can not be empty.", + EMPTY_API_KEY_VALUE: "Invalid credentials. Api key can not be empty.", + INVALID_API_KEY: "Invalid credentials. Api key is invalid.", + + CLIENT_ID_NOT_FOUND: "Invalid credentials. Client ID cannot be empty.", + TOKEN_URI_NOT_FOUND: "Invalid credentials. Token URI cannot be empty.", + KEY_ID_NOT_FOUND: "Invalid credentials. Key ID cannot be empty.", + PRIVATE_KEY_NOT_FOUND: "Invalid credentials. Private key cannot be empty.", + NOT_A_VALID_JSON: "Credentials is not in valid JSON format. Verify the credentials.", + FILE_NOT_FOUND: "Credential file not found at %s1. Verify the file path.", + EMPTY_FILE: "Invalid File. File contents cannot be empty.", + CREDENTIALS_CONTENT_EMPTY: "Invalid credentials. Specify a valid string for credentials", + EXPECTED_STRING_PARAMETER: "Invalid credentials. Specify a valid parameter as string.", + SCOPED_ROLES_EMPTY: "Invalid roles. Roles array cannot be empty.", + EXPECTED_ROLE_ID_PARAMETER: "Invalid roles. Specify a valid role id.", + DATA_TOKENS_NOT_FOUND: "Invalid data tokens. Data tokens cannot be empty.", + DATA_TOKENS_EMPTY: "Invalid data tokens. Data tokens cannot be empty.", + EXPECTED_DATA_TOKENS_PARAMETER: "Invalid data tokens. Specify valid data tokens as string array.", + EXPECTED_TIME_TO_LIVE_PARAMETER: "Invalid time to live parameter. Specify time to live parameter as number.", + + DETOKENIZE_REQUEST_REJECTED: 'Detokenize request resulted in failure.', + TOKENIZE_REQUEST_REJECTED: 'Tokenize request resulted in failure.', + INVOKE_CONNECTION_REQUEST_REJECTED: 'Invoke connection request resulted in failure.', + QUERY_REQUEST_REJECTED: 'Query request resulted in failure.', + INSERT_REQUEST_REJECTED: 'Insert request resulted in failure.', + INSERT_BATCH_REQUEST_REJECTED: 'Insert request resulted in failure.', + FILE_UPLOAD_REQUEST_REJECTED: 'File upload request resulted in failure.', + GET_REQUEST_REJECTED: 'Get request resulted in failure.', + SEND_INVOKE_CONNECTION_REJECTED: 'Invoke connection request rejected.', + UPDATE_REQUEST_REJECTED: 'Update request resulted in failure.', + DELETE_REQUEST_REJECTED: 'Delete request resulted in failure.', + ERROR_OCCURED: 'Error occurred.', + + EMPTY_QUERY: "Invalid query request. Query can not be empty.", + QUERY_IS_REQUIRED: "Invalid query request. Query is required.", + + VALUES_IS_REQUIRED_TOKENIZE: "Invalid tokenize request. Values are required.", + EMPTY_VALUES_IN_TOKENIZE: "Invalid tokenize request. Values can not be empty.", + EMPTY_COLUMN_GROUP_IN_COLUMN_VALUES: "Invalid tokenize request. Column group can not be null or empty in column values at index %s1.", + + EMPTY_TABLE_IN_DELETE: "Invalid delete request. Table name can not be empty.", + INVALID_TABLE_IN_DELETE: "Invalid delete request. Table name is required.", + EMPTY_IDS_IN_DELETE: "Invalid delete request. Ids can not be empty.", + INVALID_ID_IN_DELETE: "Invalid delete request. Id can not be null or empty in ids at index %s1.", + + EMPTY_TABLE_IN_INSERT: "Invalid insert request.Table name can not be empty.", + INVALID_TABLE_IN_INSERT: "Invalid insert request. Table name is required.", + + EMPTY_TABLE_IN_GET: "Invalid get request.Table name can not be empty.", + INVALID_TABLE_IN_GET: "Invalid get request. Table name is required.", + EMPTY_IDS_IN_GET: "Invalid get request.Ids name can not be empty.", + INVALID_ID_IN_GET: "Invalid get request. Id can not be null or empty in ids at index %s1.", + + EMPTY_TOKENS_IN_DETOKENIZE: "Invalid detokenize request. Tokens can not be empty.", + INVALID_TOKENS_IN_DETOKENIZE: "Invalid detokenize request. Tokens are required.", + INVALID_TOKEN_IN_DETOKENIZE: "Invalid detokenize request. Token can not be null or empty in tokens at index %s1.", + + EMPTY_TABLE_IN_GET_COLUMN: "Invalid get column request.Table name can not be empty.", + INVALID_TABLE_IN_GET_COLUMN: "Invalid get column request. Table name is required.", + EMPTY_COLUMN_NAME_IN_GET_COLUMN: "Invalid get column request. Column name can not be empty.", + INVALID_COLUMN_NAME_IN_GET_COLUMN: "Invalid get column request. Column name is required.", + EMPTY_COLUMN_VALUES_IN_GET_COLUMN: "Invalid get column request. Column values can not be empty.", + INVALID_COLUMN_VALUES_IN_GET_COLUMN: "Invalid get column request. Column values are required.", + INVALID_COLUMN_VALUE_IN_GET_COLUMN: "Invalid get column request. Column value can not by null or empty in column values at index %s1.", + + EMPTY_SKYFLOW_ID_IN_UPDATE: "Invalid update request. Skyflow Id can not be empty.", + INVALID_SKYFLOW_ID_IN_UPDATE: "Invalid update request. Skyflow Id is required.", + EMPTY_TABLE_IN_UPDATE: "Invalid update request. Table name can not be empty.", + INVALID_TABLE_IN_UPDATE: "Invalid update request. Table name is required.", + + EMPTY_TABLE_IN_FILE_UPLOAD: "Invalid file upload request.Table name can not be empty.", + INVALID_TABLE_IN_FILE_UPLOAD: "Invalid file upload request. Table name is required.", + EMPTY_SKYFLOW_ID_IN_FILE_UPLOAD: "Invalid file upload request. Skyflow Id can not be empty.", + INVALID_SKYFLOW_ID_IN_FILE_UPLOAD: "Invalid file upload request. Skyflow Id is required.", + + }, + warnLogs: { + } +}; + +export default logs; \ No newline at end of file diff --git a/src/utils/validations/index.ts b/src/utils/validations/index.ts new file mode 100644 index 0000000..09b31ba --- /dev/null +++ b/src/utils/validations/index.ts @@ -0,0 +1,964 @@ +import { CONNECTION, CONNECTION_ID, Env, isValidURL, LogLevel, MessageType, RequestMethod, OrderByEnum, parameterizedString, printLog, RedactionType, SKYFLOW_ID, VAULT, VAULT_ID, TokenMode } from ".."; +import { V1BYOT } from "../../ _generated_/rest"; +import SkyflowError from "../../error"; +import SKYFLOW_ERROR_CODE from "../../error/codes"; +import ConnectionConfig from "../../vault/config/connection"; +import Credentials from "../../vault/config/credentials"; +import VaultConfig from "../../vault/config/vault"; +import DetokenizeOptions from "../../vault/model/options/detokenize"; +import GetOptions from "../../vault/model/options/get"; +import InsertOptions from "../../vault/model/options/insert"; +import UpdateOptions from "../../vault/model/options/update"; +import DeleteRequest from "../../vault/model/request/delete"; +import DetokenizeRequest from "../../vault/model/request/detokenize"; +import FileUploadRequest from "../../vault/model/request/file-upload"; +import GetRequest from "../../vault/model/request/get"; +import GetColumnRequest from "../../vault/model/request/get-column"; +import InvokeConnectionRequest from "../../vault/model/request/inkove"; +import InsertRequest from "../../vault/model/request/insert"; +import QueryRequest from "../../vault/model/request/query"; +import TokenizeRequest from "../../vault/model/request/tokenize"; +import UpdateRequest from "../../vault/model/request/update"; +import { SkyflowConfig, StringKeyValueMapType } from "../../vault/types"; +import * as fs from 'fs'; +import { isExpired } from "../jwt-utils"; +import logs from "../logs"; + +export function isEnv(value?: string): boolean { + return value !== undefined && Object.values(Env).includes(value as Env); +} + +export function isRedactionType(value?: string): boolean { + return value !== undefined && Object.values(RedactionType).includes(value as RedactionType); +} + +export function isByot(value?: string): boolean { + return value !== undefined && Object.values(V1BYOT).includes(value as V1BYOT); +} + +export function isOrderBy(value?: string): boolean { + return value !== undefined && Object.values(OrderByEnum).includes(value as OrderByEnum); +} + +export function isMethod(value?: string): boolean { + return value !== undefined && Object.values(RequestMethod).includes(value as RequestMethod); +} + +export function isLogLevel(value?: string): boolean { + return value !== undefined && Object.values(LogLevel).includes(value as LogLevel); +} + +export function isValidAPIKey(apiKey: string) { + if (!apiKey || apiKey === null || apiKey === undefined) { + return false; + } + if (apiKey && typeof apiKey === 'string' && apiKey.startsWith("sky-")) { + return true; + } + return false; +}; + +function isValidCredentialsString(credentialsString: string) { + if (!credentialsString || credentialsString === null || credentialsString === undefined) { + return false; + } + if (credentialsString && typeof credentialsString === 'string') { + try { + let credentialsObj = JSON.parse("{}") + credentialsObj = JSON.parse(credentialsString); + if (credentialsObj?.clientID === null || credentialsObj?.keyID === null || credentialsObj?.clientID === null) { + return false; + } + return true; + } catch (err) { + return false; + } + } + return false; +}; + +function isValidPath(path: string) { + if (!path || path === null || path === undefined) { + return false; + } + if (path && typeof path === 'string' && fs.existsSync(path)) { + return true; + } + return false; +}; + +export const validateSkyflowConfig = (config: SkyflowConfig, logLevel: LogLevel = LogLevel.ERROR) => { + if (config) { + if (!Object.prototype.hasOwnProperty.call(config, 'vaultConfigs')) { + printLog(logs.errorLogs.VAULT_CONFIG_KEY_MISSING, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_SKYFLOW_CONFIG); + } + + if (config?.vaultConfigs && !Array.isArray(config.vaultConfigs)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TYPE_FOR_CONFIG, [VAULT]) + } + + if (config?.vaultConfigs.length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULT_CONFIG); + } + + if (config?.connectionConfigs && !Array.isArray(config?.connectionConfigs)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TYPE_FOR_CONFIG, [CONNECTION]) + } + + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.CONFIG_MISSING); + } +}; + + +export const validateCredentialsWithId = (credentials: Credentials, type: string, typeId: string, id: string, logLevel: LogLevel = LogLevel.ERROR) => { + // validates types for ctx roles + const { token, path, credentialsString, apiKey } = credentials; + + // Count how many of the fields are defined + const definedFields = [token, path, credentialsString, apiKey].filter(Boolean).length; + + // If none are present + if (definedFields === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CREDENTIALS_WITH_ID, [type, typeId, id]); + } + + // If more than one is present + if (definedFields > 1) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.MULTIPLE_CREDENTIALS_PASSED_WITH_ID, [type, typeId, id]); + } + + if (credentials?.token && (typeof credentials?.token !== 'string' || isExpired(credentials?.token))) { + printLog(logs.errorLogs.EMPTY_TOKEN_VALUE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_BEARER_TOKEN_WITH_ID, [type, typeId, id]); + } + + if (credentials?.credentialsString && (typeof credentials?.credentialsString !== 'string' || !isValidCredentialsString(credentials?.credentialsString))) { + printLog(logs.errorLogs.EMPTY_CREDENTIALS_STRING, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_PARSED_CREDENTIALS_STRING_WITH_ID, [type, typeId, id]); + } + + if (credentials?.apiKey && (typeof credentials?.apiKey !== 'string' || !isValidAPIKey(credentials?.apiKey))) { + printLog(logs.errorLogs.INVALID_API_KEY, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_API_KEY_WITH_ID, [type, typeId, id]); + } + + if (credentials?.path && (typeof credentials?.path !== 'string' || !isValidPath(credentials?.path))) { + printLog(logs.errorLogs.EMPTY_CREDENTIALS_PATH, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FILE_PATH_WITH_ID, [type, typeId, id]); + } + +}; + +export const validateVaultConfig = (vaultConfig: VaultConfig, logLevel: LogLevel = LogLevel.ERROR) => { + if (vaultConfig) { + if (!Object.prototype.hasOwnProperty.call(vaultConfig, 'vaultId')) { + printLog(logs.errorLogs.EMPTY_VAULT_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULT_ID); + } + if (!vaultConfig.vaultId || typeof vaultConfig.vaultId !== 'string') { + printLog(logs.errorLogs.INVALID_VAULT_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_VAULT_ID); + } + if (!Object.prototype.hasOwnProperty.call(vaultConfig, 'clusterId')) { + printLog(logs.errorLogs.EMPTY_CLUSTER_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CLUSTER_ID, [vaultConfig?.vaultId]); + } + if (!vaultConfig.clusterId || typeof vaultConfig.clusterId !== 'string') { + printLog(logs.errorLogs.INVALID_CLUSTER_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CLUSTER_ID, [vaultConfig?.vaultId]); + } + if (vaultConfig?.env && !isEnv(vaultConfig.env)) { + printLog(logs.errorLogs.INVALID_ENV, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ENV, [vaultConfig?.vaultId]); + } + if (vaultConfig?.credentials) { + validateCredentialsWithId(vaultConfig.credentials, VAULT, VAULT_ID, vaultConfig.vaultId, logLevel); + } + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULT_CONFIG); + } +}; + +export const validateUpdateVaultConfig = (vaultConfig: VaultConfig, logLevel: LogLevel = LogLevel.ERROR) => { + if (vaultConfig) { + if (!Object.prototype.hasOwnProperty.call(vaultConfig, 'vaultId')) { + printLog(logs.errorLogs.EMPTY_VAULT_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULT_ID); + } + if (!vaultConfig?.vaultId || typeof vaultConfig?.vaultId !== 'string') { + printLog(logs.errorLogs.INVALID_VAULT_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_VAULT_ID); + } + if (vaultConfig?.clusterId && typeof vaultConfig.clusterId !== 'string') { + printLog(logs.errorLogs.INVALID_CLUSTER_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CLUSTER_ID, [vaultConfig?.vaultId]); + } + if (vaultConfig?.env && !isEnv(vaultConfig.env)) { + printLog(logs.errorLogs.INVALID_ENV, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ENV, [vaultConfig?.vaultId]); + } + if (vaultConfig?.credentials) { + validateCredentialsWithId(vaultConfig.credentials, VAULT, VAULT_ID, vaultConfig.vaultId, logLevel); + } + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULT_CONFIG); + } +}; + +export const validateSkyflowCredentials = (credentials: Credentials, logLevel: LogLevel = LogLevel.ERROR) => { + const { token, path, credentialsString, apiKey } = credentials; + + // Count how many of the fields are defined + const definedFields = [token, path, credentialsString, apiKey].filter(Boolean).length; + + // If none are present + if (definedFields === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.CREDENTIALS_WITH_NO_VALID_KEY); + } + + // If more than one is present + if (definedFields > 1) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.MULTIPLE_CREDENTIALS_PASSED); + } + + if (credentials?.token && (typeof credentials?.token !== 'string' || isExpired(credentials?.token))) { + printLog(logs.errorLogs.EMPTY_TOKEN_VALUE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_BEARER_TOKEN); + } + + if (credentials?.credentialsString && (typeof credentials?.credentialsString !== 'string' || !isValidCredentialsString(credentials?.credentialsString))) { + printLog(logs.errorLogs.EMPTY_CREDENTIALS_STRING, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_PARSED_CREDENTIALS_STRING); + } + + if (credentials?.apiKey && (typeof credentials?.apiKey !== 'string' || !isValidAPIKey(credentials?.apiKey))) { + printLog(logs.errorLogs.INVALID_API_KEY, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_API_KEY); + } + + if (credentials?.path && (typeof credentials?.path !== 'string' || !isValidPath(credentials?.path))) { + printLog(logs.errorLogs.EMPTY_CREDENTIALS_PATH, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FILE_PATH); + } + +}; + +export const validateConnectionConfig = (connectionConfig: ConnectionConfig, logLevel: LogLevel = LogLevel.ERROR) => { + if (connectionConfig) { + if (!Object.prototype.hasOwnProperty.call(connectionConfig, 'connectionId')) { + printLog(logs.errorLogs.EMPTY_CONNECTION_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CONNECTION_ID); + } + + if (typeof connectionConfig?.connectionId !== 'string' || connectionConfig?.connectionId.trim().length === 0) { + printLog(logs.errorLogs.INVALID_CONNECTION_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONNECTION_ID); + } + + if (!Object.prototype.hasOwnProperty.call(connectionConfig, 'connectionUrl')) { + printLog(logs.errorLogs.EMPTY_CONNECTION_URL, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CONNECTION_URL); + } + + if (typeof connectionConfig?.connectionUrl !== 'string' || connectionConfig?.connectionUrl.trim().length === 0) { + printLog(logs.errorLogs.INVALID_CONNECTION_URL, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONNECTION_URL); + } + + if (connectionConfig.connectionUrl && !isValidURL(connectionConfig.connectionUrl)) { + printLog(logs.errorLogs.INVALID_CONNECTION_URL_TYPE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONNECTION_URL); + } + + if (connectionConfig?.credentials) { + validateCredentialsWithId(connectionConfig.credentials, CONNECTION, CONNECTION_ID, connectionConfig.connectionId, logLevel); + } + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CONNECTION_CONFIG) + } +}; + +export const validateUpdateConnectionConfig = (connectionConfig: ConnectionConfig, logLevel: LogLevel = LogLevel.ERROR) => { + if (connectionConfig) { + if (!Object.prototype.hasOwnProperty.call(connectionConfig, 'connectionId')) { + printLog(logs.errorLogs.EMPTY_CONNECTION_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CONNECTION_ID); + } + + if (typeof connectionConfig?.connectionId !== 'string' || connectionConfig?.connectionId.trim().length === 0) { + printLog(logs.errorLogs.INVALID_CONNECTION_ID, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONNECTION_ID); + } + + if (connectionConfig?.connectionUrl && (typeof connectionConfig?.connectionUrl !== 'string' || connectionConfig?.connectionUrl.trim().length === 0)) { + printLog(logs.errorLogs.INVALID_CONNECTION_URL, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONNECTION_URL); + } + + if (connectionConfig?.connectionUrl && !isValidURL(connectionConfig.connectionUrl)) { + printLog(logs.errorLogs.INVALID_CONNECTION_URL_TYPE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONNECTION_URL); + } + + if (connectionConfig?.credentials) { + validateCredentialsWithId(connectionConfig.credentials, CONNECTION, CONNECTION_ID, connectionConfig.connectionId, logLevel); + } + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CONNECTION_CONFIG) + } +}; + +function validateInsertInput(input: unknown, index: number): void { + try { + const inputObject = input as { [key: string]: unknown }; + + // Check if the object is empty + const entries = Object.entries(inputObject); + + if (entries.length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_INSERT, [index]); + } + + // Iterate over the key-value pairs and check their types + for (const [key, value] of entries) { + if (key && typeof key !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_INSERT, [index]); + } + // update the data type accordingly + if (value && typeof value !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_INSERT, [index]); + } + } + + } catch (error) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_INSERT, [index]); + } + +} + +function validateUpdateInput(input: unknown): void { + try { + const inputObject = input as { [key: string]: unknown }; + + // Check if the object is empty + const entries = Object.entries(inputObject); + + if (entries.length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_UPDATE); + } + + // Iterate over the key-value pairs and check their types + for (const [key, value] of entries) { + if (key && typeof key !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_UPDATE); + } + // update the data type accordingly + if (value && typeof value !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_UPDATE); + } + } + + } catch (error) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_UPDATE); + } + +} + +function validateUpdateToken(input: unknown): void { + try { + const inputObject = input as { [key: string]: unknown }; + + // Check if the object is empty + const entries = Object.entries(inputObject); + + if (entries.length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKEN_IN_UPDATE); + } + + // Iterate over the key-value pairs and check their types + for (const [key, value] of entries) { + if (key && typeof key !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKEN_IN_UPDATE); + } + // update the data type accordingly + if (value && typeof value !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKEN_IN_UPDATE); + } + } + + } catch (error) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKEN_IN_UPDATE); + } + +} + +export const validateInsertOptions = (insertOptions?: InsertOptions) => { + if (insertOptions) { + if (insertOptions?.getReturnTokens && insertOptions?.getReturnTokens() && typeof insertOptions?.getReturnTokens() !== 'boolean') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RETURN_TOKEN, [typeof insertOptions?.getReturnTokens()]); + } + + if (insertOptions?.getUpsertColumn && insertOptions?.getUpsertColumn() && typeof insertOptions.getUpsertColumn() !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_UPSERT, [typeof insertOptions?.getUpsertColumn()]); + } + + if (insertOptions?.getContinueOnError && insertOptions?.getContinueOnError() && typeof insertOptions.getContinueOnError() !== 'boolean') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONTINUE_ON_ERROR, [typeof insertOptions?.getContinueOnError()]); + } + + if (insertOptions?.getHomogeneous && insertOptions?.getHomogeneous() && typeof insertOptions.getHomogeneous() !== 'boolean') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_HOMOGENEOUS, [typeof insertOptions?.getHomogeneous()]); + } + + if (insertOptions?.getTokenMode && insertOptions?.getTokenMode() && !isByot(insertOptions?.getTokenMode())) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKEN_MODE, [typeof insertOptions?.getTokenMode()]); + } + + if (insertOptions?.getTokens && insertOptions?.getTokens() && !Array.isArray(insertOptions?.getTokens())) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_INSERT_TOKENS); + } + + if (insertOptions?.getTokens && insertOptions?.getTokens() && Array.isArray(insertOptions?.getTokens())) { + insertOptions.getTokens()!.forEach((token, index) => { + if (!token) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_INSERT_TOKEN, [index]); + } + if (typeof token !== 'object') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_INSERT_TOKEN, [index]); + } + }); + } + } +}; + +const validateTokensMapWithTokenStrict = ( + data: object, + tokens: object +) => { + const dataKeys = Object.keys(data); + + for (const key of dataKeys) { + if (!tokens.hasOwnProperty(key)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INSUFFICIENT_TOKENS_PASSED_FOR_TOKEN_MODE_ENABLE_STRICT); + } + } +}; + +export const validateTokensForInsertRequest = ( + insertRequest?: InsertRequest, + insertOptions?: InsertOptions +) => { + if (insertRequest && insertOptions && insertOptions.getTokenMode()) { + if ( + (insertOptions.getTokenMode() == TokenMode.ENABLE || + insertOptions.getTokenMode() == TokenMode.ENABLE_STRICT) && !insertOptions.getTokens() + ) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.NO_TOKENS_WITH_TOKEN_MODE); + } + + if((insertOptions.getTokenMode() == TokenMode.ENABLE_STRICT) && insertOptions.getTokens()) { + if(insertRequest.data.length!=insertOptions.getTokens()?.length) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INSUFFICIENT_TOKENS_PASSED_FOR_TOKEN_MODE_ENABLE_STRICT); + } + + if(insertOptions.getTokens()) { + for(let i=0;i { // + if (insertRequest) { + if (!insertRequest?.tableName || !Object.prototype.hasOwnProperty.call(insertRequest, '_tableName')) { + printLog(logs.errorLogs.EMPTY_TABLE_IN_INSERT, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TABLE_NAME); + } + + if (typeof insertRequest.tableName !== 'string' || insertRequest.tableName.trim().length === 0) { + printLog(logs.errorLogs.INVALID_TABLE_IN_INSERT, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_NAME); + } + + if (!insertRequest.data) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_DATA_IN_INSERT) + } + + if (!Array.isArray(insertRequest.data)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TYPE_OF_DATA_IN_INSERT) + } + + const records = insertRequest.data; + if (records.length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_DATA_IN_INSERT); + } + + records.forEach((record, index) => { + if (!record) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORD_IN_INSERT, [index]); + } + if (typeof record !== 'object') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_IN_INSERT, [index]); + } + validateInsertInput(record, index); + }); + validateInsertOptions(insertOptions); + validateTokensForInsertRequest(insertRequest, insertOptions) + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_INSERT_REQUEST); + } +}; + +export const validateUpdateOptions = (updateOptions?: UpdateOptions) => { + if (updateOptions) { + if (updateOptions?.getReturnTokens && updateOptions?.getReturnTokens() && typeof updateOptions?.getReturnTokens() !== 'boolean') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RETURN_TOKEN, [typeof updateOptions?.getReturnTokens()]); + } + + if (updateOptions?.getTokenMode && updateOptions?.getTokenMode() && !isByot(updateOptions?.getTokenMode())) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKEN_MODE, [typeof updateOptions?.getTokenMode()]); + } + + if (updateOptions?.getTokens && updateOptions?.getTokens() && typeof updateOptions?.getTokens() !== 'object') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_UPDATE_TOKENS); + } + + if (updateOptions?.getTokens && updateOptions?.getTokens()) { + validateUpdateToken(updateOptions?.getTokens()); + } + } +}; + +export const validateUpdateRequest = (updateRequest: UpdateRequest, updateOptions?: UpdateOptions, logLevel: LogLevel = LogLevel.ERROR) => { + if (updateRequest) { + if (!updateRequest?.tableName || !Object.prototype.hasOwnProperty.call(updateRequest, '_tableName')) { + printLog(logs.errorLogs.EMPTY_TABLE_IN_UPDATE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TABLE_NAME); + } + + if (typeof updateRequest.tableName !== 'string' || updateRequest.tableName.trim().length === 0) { + printLog(logs.errorLogs.INVALID_TABLE_IN_UPDATE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_NAME); + } + + if (!updateRequest.data) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_UPDATE_DATA); + } + if (typeof updateRequest.data !== 'object') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TYPE_OF_UPDATE_DATA); + } + + if (updateRequest?.data && !Object.prototype.hasOwnProperty.call(updateRequest.data, SKYFLOW_ID)) { + printLog(logs.errorLogs.EMPTY_SKYFLOW_ID_IN_UPDATE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_SKYFLOW_ID_IN_UPDATE); + } + + if (updateRequest?.data[SKYFLOW_ID] && typeof updateRequest.data[SKYFLOW_ID] !== 'string' || updateRequest.data[SKYFLOW_ID].trim().length === 0) { + printLog(logs.errorLogs.INVALID_SKYFLOW_ID_IN_UPDATE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_SKYFLOW_ID_IN_UPDATE); + } + + validateUpdateInput(updateRequest.data); + validateUpdateOptions(updateOptions); + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_UPDATE_REQUEST); + } +}; + +export const validateGetOptions = (getOptions?: GetOptions) => { + if (getOptions) { + if (getOptions?.getReturnTokens && getOptions?.getReturnTokens() && typeof getOptions?.getReturnTokens() !== 'boolean') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RETURN_TOKEN, [typeof getOptions?.getReturnTokens()]); + } + + if (getOptions?.getRedactionType && getOptions?.getRedactionType() && !isRedactionType(getOptions?.getRedactionType())) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_REDACTION_TYPE); + } + + if (getOptions?.getOffset && getOptions?.getOffset() && typeof getOptions.getOffset() !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_OFFSET, [typeof getOptions?.getOffset()]); + } + + if (getOptions?.getLimit && getOptions?.getLimit() && typeof getOptions.getLimit() !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_LIMIT, [typeof getOptions?.getLimit()]); + } + + if (getOptions?.getDownloadURL && getOptions?.getDownloadURL() && typeof getOptions.getDownloadURL() !== 'boolean') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_DOWNLOAD_URL, [typeof getOptions?.getDownloadURL()]); + } + + if (getOptions?.getColumnName && getOptions?.getColumnName() && typeof getOptions.getColumnName() !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_NAME); + } + + if (getOptions?.getOrderBy && getOptions?.getOrderBy() && !isOrderBy(getOptions.getOrderBy())) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ORDER_BY, [typeof getOptions?.getOrderBy()]); + } + + if (getOptions?.getFields && getOptions?.getFields() && !Array.isArray(getOptions?.getFields())) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FIELDS, [typeof getOptions?.getFields()]); + } + + if (getOptions?.getFields && getOptions?.getFields() && Array.isArray(getOptions?.getFields())) { + getOptions?.getFields()!.forEach((field, index) => { + if (!field) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_FIELD, [index]); + } + if (typeof field !== 'string' || field.trim().length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FIELD, [index]); + } + }); + } + + if (getOptions?.getColumnValues && getOptions?.getColumnValues() && !Array.isArray(getOptions?.getColumnValues())) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_VALUES); + } + + if (getOptions?.getColumnValues && getOptions?.getColumnValues() && Array.isArray(getOptions?.getColumnValues())) { + getOptions?.getColumnValues()!.forEach((column, index) => { + if (!column) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_COLUMN_VALUE, [index]); + } + if (typeof column !== 'string' || column.trim().length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_VALUE, [index]); + } + }); + } + } +}; + +export const validateGetRequest = (getRequest: GetRequest, getOptions?: GetOptions, logLevel: LogLevel = LogLevel.ERROR) => { + if (getRequest) { + if (!getRequest?.tableName || !Object.prototype.hasOwnProperty.call(getRequest, '_tableName')) { + printLog(logs.errorLogs.EMPTY_TABLE_IN_GET, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TABLE_NAME); + } + + if (typeof getRequest.tableName !== 'string' || getRequest.tableName.trim().length === 0) { + printLog(logs.errorLogs.INVALID_TABLE_IN_GET, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_NAME); + } + + if (!getRequest?.ids) { + printLog(logs.errorLogs.EMPTY_IDS_IN_GET, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_IDS_IN_GET) + } + + if (!Array.isArray(getRequest?.ids)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TYPE_OF_IDS) + } + + const ids = getRequest.ids; + if (ids.length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_IDS_IN_GET); + } + ids.forEach((id, index) => { + if (!id) { + printLog(parameterizedString(logs.errorLogs.INVALID_ID_IN_GET, [index]), MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_ID_IN_GET, [index]); + } + if (typeof id !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ID_IN_GET, [index]); + } + }); + validateGetOptions(getOptions); + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_GET_REQUEST); + } +}; + +export const validateGetColumnRequest = (getRequest: GetColumnRequest, getOptions?: GetOptions, logLevel: LogLevel = LogLevel.ERROR) => { + if (getRequest) { + if (!getRequest?.tableName || !Object.prototype.hasOwnProperty.call(getRequest, '_tableName')) { + printLog(logs.errorLogs.EMPTY_TABLE_IN_GET_COLUMN, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TABLE_NAME); + } + + if (typeof getRequest.tableName !== 'string' || getRequest.tableName.trim().length === 0) { + printLog(logs.errorLogs.INVALID_TABLE_IN_GET_COLUMN, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_NAME); + } + + if (!getRequest?.columnName || !Object.prototype.hasOwnProperty.call(getRequest, '_columnName')) { + printLog(logs.errorLogs.EMPTY_COLUMN_NAME_IN_GET_COLUMN, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_COLUMN_NAME); + } + + if (typeof getRequest.columnName !== 'string' || getRequest.columnName.trim().length === 0) { + printLog(logs.errorLogs.INVALID_COLUMN_NAME_IN_GET_COLUMN, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_NAME); + } + + if (!getRequest?.columnValues) { + printLog(logs.errorLogs.EMPTY_COLUMN_VALUES_IN_GET_COLUMN, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_COLUMN_VALUES) + } + + if (!Array.isArray(getRequest.columnValues)) { + printLog(logs.errorLogs.INVALID_COLUMN_VALUES_IN_GET_COLUMN, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_VALUES) + } + + const columnValues = getRequest.columnValues; + if (columnValues.length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_COLUMN_VALUES); + } + columnValues.forEach((columnValue, index) => { + if (!columnValue) { + printLog(parameterizedString(logs.errorLogs.INVALID_COLUMN_VALUE_IN_GET_COLUMN, [index]), MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_COLUMN_VALUE, [index]); + } + if (typeof columnValue !== 'string') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_VALUE, [index]); + } + }); + validateGetOptions(getOptions); + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_GET_COLUMN_REQUEST); + } +}; + +export const validateDetokenizeOptions = (detokenizeOptions?: DetokenizeOptions) => { + if (detokenizeOptions) { + + if (detokenizeOptions?.getContinueOnError && detokenizeOptions?.getContinueOnError() && typeof detokenizeOptions.getContinueOnError() !== 'boolean') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONTINUE_ON_ERROR, [typeof detokenizeOptions?.getContinueOnError()]); + } + + if (detokenizeOptions?.getDownloadURL && detokenizeOptions?.getDownloadURL() && typeof detokenizeOptions.getDownloadURL() !== 'boolean') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_DOWNLOAD_URL, [typeof detokenizeOptions?.getDownloadURL()]); + } + + } +}; + +export const validateDetokenizeRequest = (detokenizeRequest: DetokenizeRequest, detokenizeOptions?: DetokenizeOptions, logLevel: LogLevel = LogLevel.ERROR) => { + if (detokenizeRequest) { + if (!detokenizeRequest?.tokens) { + printLog(logs.errorLogs.EMPTY_TOKENS_IN_DETOKENIZE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TOKENS_IN_DETOKENIZE) + } + + if (!Array.isArray(detokenizeRequest.tokens)) { + printLog(logs.errorLogs.INVALID_TOKENS_IN_DETOKENIZE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKENS_TYPE_IN_DETOKENIZE) + } + + const tokens = detokenizeRequest?.tokens; + + if (tokens.length === 0) + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TOKENS_IN_DETOKENIZE); + + tokens.forEach((token, index) => { + if (!token) { + printLog(parameterizedString(logs.errorLogs.INVALID_TOKEN_IN_DETOKENIZE, [index]), MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TOKEN_IN_DETOKENIZE, [index]); + } + if (typeof token !== 'string' || token.trim().length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKEN_IN_DETOKENIZE, [index]); + } + }); + + if (detokenizeRequest?.redactionType && (typeof detokenizeRequest.redactionType !== 'string' || !isRedactionType(detokenizeRequest.redactionType))) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_REDACTION_TYPE); + } + + validateDetokenizeOptions(detokenizeOptions); + + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_DETOKENIZE_REQUEST); + } +}; + +export const validateTokenizeRequest = (tokenizeRequest: TokenizeRequest, logLevel: LogLevel = LogLevel.ERROR) => { + if (tokenizeRequest) { + if (!tokenizeRequest?.values || !Object.prototype.hasOwnProperty.call(tokenizeRequest, '_values')) { + printLog(logs.errorLogs.EMPTY_VALUES_IN_TOKENIZE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_VALUES_IN_TOKENIZE); + } + + if (!Array.isArray(tokenizeRequest?.values)) { + printLog(logs.errorLogs.VALUES_IS_REQUIRED_TOKENIZE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_VALUES_TYPE_IN_TOKENIZE) + } + + const values = tokenizeRequest?.values; + + if (values.length === 0) + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VALUES_IN_TOKENIZE); + + values.forEach((data, index) => { + if (!data) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_DATA_IN_TOKENIZE, [index]); + } + if (typeof data !== 'object') { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_DATA_IN_TOKENIZE, [index]); + } + if (!data.value) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VALUE_IN_TOKENIZE, [index]); + } + if (typeof data.value !== 'string' || data.value.trim().length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_VALUE_IN_TOKENIZE, [index]); + } + if (!data.columnGroup) { + printLog(parameterizedString(logs.errorLogs.EMPTY_COLUMN_GROUP_IN_COLUMN_VALUES, [index]), MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_COLUMN_GROUP_IN_TOKENIZE, [index]); + } + if (typeof data.columnGroup !== 'string' || data.columnGroup.trim().length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_GROUP_IN_TOKENIZE, [index]); + } + }); + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKENIZE_REQUEST); + } +}; + +export const validateDeleteRequest = (deleteRequest: DeleteRequest, logLevel: LogLevel = LogLevel.ERROR) => { + if (deleteRequest) { + if (!deleteRequest?.tableName || !Object.prototype.hasOwnProperty.call(deleteRequest, '_tableName')) { + printLog(logs.errorLogs.EMPTY_TABLE_IN_DELETE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TABLE_NAME); + } + + if (typeof deleteRequest?.tableName !== 'string' || deleteRequest?.tableName.trim().length === 0) { + printLog(logs.errorLogs.INVALID_TABLE_IN_DELETE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_NAME); + } + + if (!deleteRequest?.ids) { + printLog(logs.errorLogs.EMPTY_IDS_IN_DELETE, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_DELETE_IDS) + } + + if (!Array.isArray(deleteRequest?.ids)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_DELETE_IDS_INPUT) + } + + const deleteIds = deleteRequest?.ids; + if (deleteIds.length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_DELETE_IDS); + } + + deleteIds.forEach((deleteId, index) => { + if (!deleteId) { + printLog(parameterizedString(logs.errorLogs.INVALID_ID_IN_DELETE, [index]), MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_ID_IN_DELETE, [index]); + } + if (typeof deleteId !== 'string' || deleteId.trim().length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ID_IN_DELETE, [index]); + } + }); + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_DELETE_REQUEST); + } +} + +export const validateUploadFileRequest = (fileRequest: FileUploadRequest, logLevel: LogLevel = LogLevel.ERROR) => { + if (fileRequest) { + if (!fileRequest?.tableName || !Object.prototype.hasOwnProperty.call(fileRequest, '_tableName')) { + printLog(logs.errorLogs.EMPTY_TABLE_IN_FILE_UPLOAD, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TABLE_IN_UPLOAD_FILE); + } + + if (typeof fileRequest?.tableName !== 'string' || fileRequest?.tableName.trim().length === 0) { + printLog(logs.errorLogs.INVALID_TABLE_IN_FILE_UPLOAD, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_UPLOAD_FILE); + } + + if (!fileRequest?.skyflowId || !Object.prototype.hasOwnProperty.call(fileRequest, '_skyflowId')) { + printLog(logs.errorLogs.EMPTY_SKYFLOW_ID_IN_FILE_UPLOAD, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_SKYFLOW_ID_IN_UPLOAD_FILE); + } + + if (typeof fileRequest?.skyflowId !== 'string' || fileRequest.skyflowId.trim().length === 0) { + printLog(logs.errorLogs.INVALID_SKYFLOW_ID_IN_FILE_UPLOAD, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_SKYFLOW_ID_IN_UPLOAD_FILE); + } + + + if (!fileRequest?.columnName || !Object.prototype.hasOwnProperty.call(fileRequest, '_columnName')) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_COLUMN_NAME_IN_UPLOAD_FILE); + } + + if (typeof fileRequest?.columnName !== 'string' || fileRequest?.columnName.trim().length === 0) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_NAME_IN_UPLOAD_FILE); + } + + + if (!fileRequest?.filePath || !Object.prototype.hasOwnProperty.call(fileRequest, '_filePath')) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_FILE_PATH_IN_UPLOAD_FILE); + } + + if (typeof fileRequest?.filePath !== 'string' || fileRequest?.filePath.trim().length === 0 || !isValidPath(fileRequest.filePath)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FILE_PATH_IN_UPLOAD_FILE); + } + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FILE_UPLOAD_REQUEST); + } +} + +export const validateQueryRequest = (queryRequest: QueryRequest, logLevel: LogLevel = LogLevel.ERROR) => { + if (queryRequest) { + if (!queryRequest?.query || !Object.prototype.hasOwnProperty.call(queryRequest, '_query')) { + printLog(logs.errorLogs.EMPTY_QUERY, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_QUERY); + } + + if (typeof queryRequest?.query !== 'string' || queryRequest?.query.trim().length === 0) { + printLog(logs.errorLogs.QUERY_IS_REQUIRED, MessageType.ERROR, logLevel); + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_QUERY); + } + + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_QUERY_REQUEST); + } +} + +function isStringKeyValueMap(obj: any): obj is StringKeyValueMapType { + if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) { + return false; + } + + for (const key in obj) { + if (typeof key !== 'string' || (typeof obj[key] !== 'object' && typeof obj[key] !== 'string')) { + return false; + } + } + + return true; +} + +export const validateInvokeConnectionRequest = (invokeRequest: InvokeConnectionRequest) => { + if (invokeRequest) { + + if (!invokeRequest?.method || !Object.prototype.hasOwnProperty.call(invokeRequest, 'method')) + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_METHOD_NAME); + + if (!isMethod(invokeRequest.method)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_METHOD_NAME); + } + + if (invokeRequest?.queryParams && !isStringKeyValueMap(invokeRequest?.queryParams)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_QUERY_PARAMS); + } + + if (invokeRequest?.pathParams && !isStringKeyValueMap(invokeRequest?.pathParams)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_PATH_PARAMS); + } + + if (invokeRequest?.body && !isStringKeyValueMap(invokeRequest?.body)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_BODY); + } + + if (invokeRequest?.headers && !isStringKeyValueMap(invokeRequest?.headers)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_HEADERS); + } + + } else { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_INVOKE_CONNECTION_REQUEST); + } +}; \ No newline at end of file diff --git a/src/vault-api/Controller.ts b/src/vault-api/Controller.ts deleted file mode 100644 index 47f9814..0000000 --- a/src/vault-api/Controller.ts +++ /dev/null @@ -1,361 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import Client from './client'; - -import { - validateConnectionConfig, validateInsertRecords, validateDetokenizeInput, validateGetByIdInput, validateInitConfig, validateUpsertOptions, validateUpdateInput, validateGetInput, validateDeleteInputAndOptions -} from './utils/validators'; - -import { - ContentType, - IDeleteInput, - IDeleteOptions, - IGetInput, - IGetOptions, - IInsertOptions, - IUpdateInput, - IUpdateOptions, - TYPES, -} from './utils/common'; -import { - printLog, - parameterizedString, -} from './utils/logs-helper'; -import logs from './utils/logs'; -import { - IDetokenizeInput, IGetByIdInput, IConnectionConfig, MessageType, -} from './utils/common'; - -import { - constructInsertRecordRequest, - constructInsertRecordResponse, -} from './core/Collect'; - -import { - fetchRecordsBySkyflowID, - fetchRecordsByTokenId, - updateRecordsBySkyflowID, -} from './core/Reveal'; -import { - fillUrlWithPathAndQueryParams, toLowerKeys, -} from './utils/helpers'; -import { isTokenValid } from './utils/jwt-utils'; -import SKYFLOW_ERROR_CODE from './utils/constants'; -import SkyflowError from './libs/SkyflowError'; -import { deleteRecordsBySkyflowID } from './core/Delete'; - -class Controller { - #client: Client; - - constructor(client) { - this.#client = client; - printLog(logs.infoLogs.CONTROLLER_INITIALIZED, MessageType.LOG); - } - #bearerToken = "" - - detokenize(detokenizeInput: IDetokenizeInput): Promise { - - return new Promise((resolve, reject) => { - try { - validateInitConfig(this.#client.config) - printLog(logs.infoLogs.VALIDATE_DETOKENIZE_INPUT, MessageType.LOG); - validateDetokenizeInput(detokenizeInput); - printLog(parameterizedString(logs.infoLogs.EMIT_REQUEST, TYPES.DETOKENIZE), - MessageType.LOG); - this.getToken().then((res)=>{ - fetchRecordsByTokenId(detokenizeInput.records, this.#client,res) - .then( - (resolvedResult) => { - printLog(logs.infoLogs.FETCH_RECORDS_RESOLVED, MessageType.LOG); - resolve(resolvedResult); - }, - (rejectedResult) => { - reject(rejectedResult); - }, - ); - }).catch(err=>reject(err)) - } catch (e) { - if(e instanceof Error) - printLog(e.message, MessageType.ERROR); - reject(e); - } - }); - } - - insert(records, options?:IInsertOptions): Promise { - return new Promise((resolve, reject) => { - try { - validateInitConfig(this.#client.config); - if (options && options.tokens && typeof options.tokens !== 'boolean') { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKENS_IN_INSERT, [], true); - } - if (options && options.continueOnError && typeof options.continueOnError !== 'boolean') { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONTINUE_ON_ERROR_IN_INSERT, [], true); - } - if (options) { - options = { - ...options, - tokens: options?.tokens !== undefined ? options.tokens : true, - continueOnError: options?.continueOnError !== undefined ? options.continueOnError : false - }; - } else { - options = { tokens: true, continueOnError: false }; - } - if (options?.upsert) { - validateUpsertOptions(options.upsert); - } - printLog(logs.infoLogs.VALIDATE_RECORDS, MessageType.LOG); - validateInsertRecords(records); - printLog(parameterizedString(logs.infoLogs.EMIT_REQUEST, TYPES.INSERT), - MessageType.LOG); - this.insertData(records,options) - .then((result) => { - printLog(logs.infoLogs.INSERT_RECORDS_RESOLVED, MessageType.LOG); - resolve(result); - }) - .catch((error) => { - reject(error); - }); - } catch (e) { - if(e instanceof Error) - printLog(e.message, MessageType.ERROR); - reject(e); - } - }); - } - - getById(getByIdInput: IGetByIdInput) { - return new Promise((resolve, reject) => { - try { - validateInitConfig(this.#client.config) - printLog(logs.infoLogs.VALIDATE_GET_BY_ID_INPUT, MessageType.LOG); - validateGetByIdInput(getByIdInput); - printLog(parameterizedString(logs.infoLogs.EMIT_REQUEST, - TYPES.GET_BY_ID), - MessageType.LOG); - this.getToken().then((res)=>{ - fetchRecordsBySkyflowID( - getByIdInput.records, - this.#client, - res - ).then( - (resolvedResult) => { - printLog(logs.infoLogs.GET_BY_SKYFLOWID_RESOLVED, MessageType.LOG); - resolve(resolvedResult); - }, - (rejectedResult) => { - reject(rejectedResult); - }, - ); - }).catch(err => { - reject(err) - }) - } catch (e) { - if (e instanceof Error) - printLog(e.message, MessageType.ERROR); - reject(e); - } - }); - } - - get(getInput: IGetInput,options:IGetOptions={}) { - return new Promise((resolve, reject) => { - try { - validateInitConfig(this.#client.config) - printLog(logs.infoLogs.VALIDATE_GET_INPUT, MessageType.LOG); - validateGetInput(getInput,options); - printLog(parameterizedString(logs.infoLogs.EMIT_REQUEST, - TYPES.GET), - MessageType.LOG); - this.getToken().then((res) => { - fetchRecordsBySkyflowID( - getInput.records, - this.#client, - res, - options - ).then( - (resolvedResult) => { - printLog(logs.infoLogs.GET_BY_SKYFLOWID_RESOLVED, MessageType.LOG); - resolve(resolvedResult); - }, - (rejectedResult) => { - reject(rejectedResult); - }, - ); - }).catch(err => { - reject(err) - }) - } catch (e) { - if (e instanceof Error) - printLog(e.message, MessageType.ERROR); - reject(e); - } - }); - } - - invokeConnection(configuration: IConnectionConfig) { - return new Promise((resolve, reject) => { - try { - printLog(logs.infoLogs.VALIDATE_CONNECTION_CONFIG, MessageType.LOG); - validateConnectionConfig(configuration); - const config = configuration as IConnectionConfig; - const filledUrl = fillUrlWithPathAndQueryParams(config.connectionURL,config.pathParams, config.queryParams); - config.connectionURL = filledUrl; - printLog(parameterizedString(logs.infoLogs.EMIT_REQUEST, - TYPES.INVOKE_CONNECTION), - MessageType.LOG); - this.sendInvokeConnectionRequest(config).then((resultResponse) => { - printLog(logs.infoLogs.SEND_INVOKE_CONNECTION_RESOLVED, MessageType.LOG); - resolve(resultResponse); - }).catch((rejectedResponse) => { - printLog(logs.errorLogs.SEND_INVOKE_CONNECTION_REJECTED, MessageType.ERROR); - reject({ error: rejectedResponse }); - }); - } catch (error) { - if(error instanceof Error) - printLog(error.message, MessageType.ERROR); - reject(error); - } - }); - - } - - update(updateInput: IUpdateInput, options?: IUpdateOptions){ - return new Promise((resolve,reject)=>{ - try{ - validateInitConfig(this.#client.config); - if (options && options.tokens && typeof options.tokens !== 'boolean') { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKENS_IN_UPDATE); - } - if (options) { - options = { ...options, tokens: options?.tokens !== undefined ? options.tokens : true }; - } else { - options = { tokens: true,}; - } - validateUpdateInput(updateInput); - this.getToken().then((authToken)=>{ - updateRecordsBySkyflowID(updateInput.records,options,this.#client,authToken) - .then((response)=>{ - printLog(logs.infoLogs.UPDATE_REQUEST_RESOLVED, MessageType.LOG); - resolve(response); - }).catch((error)=>{ - printLog(logs.errorLogs.UPDATE_REQUEST_REJECTED, MessageType.ERROR); - reject(error); - }); - }).catch((err)=>{ - reject(err); - }) - - }catch(error){ - if(error instanceof Error) - printLog(error.message, MessageType.ERROR); - reject(error); - } - }); - } - - delete(deleteInput: IDeleteInput, options?: IDeleteOptions) { - return new Promise((resolve, reject) => { - try { - validateInitConfig(this.#client.config); - validateDeleteInputAndOptions(deleteInput, options); - this.getToken().then((authToken) => { - deleteRecordsBySkyflowID(deleteInput.records, options = {}, this.#client, authToken) - .then((response) => { - printLog(logs.infoLogs.DELETE_REQUEST_RESOLVED, MessageType.LOG); - resolve(response); - }).catch((error) => { - printLog(logs.errorLogs.DELETE_REQUEST_REJECTED, MessageType.ERROR); - reject(error); - }); - }).catch((err) => { - reject(err); - }) - - } catch (error) { - if (error instanceof Error) - printLog(error.message, MessageType.ERROR); - reject(error); - } - }) - } - - insertData(records, options) { - const requestBody = constructInsertRecordRequest(records, options); - return new Promise((rootResolve, rootReject) => { - this.getToken().then((res)=>{ - this.#client - .request({ - body: { ...requestBody }, - requestMethod: 'POST', - url: - `${this.#client.config.vaultURL - }/v1/vaults/${ - this.#client.config.vaultID}`, - headers: { - Authorization: `Bearer ${res}`, - 'content-type': 'application/json', - }, - }) - .then((response: any) => { - rootResolve( - constructInsertRecordResponse( - response, - options, - records.records, - ), - ); - }) - .catch((error) => { - rootReject(error); - }); - }).catch(err =>{ - rootReject(err) - }) - }); - } - - sendInvokeConnectionRequest(config:IConnectionConfig) { - return new Promise((rootResolve, rootReject) => { - - this.getToken().then((res)=>{ - const invokeRequest = this.#client.request({ - url: config.connectionURL, - requestMethod: config.methodName, - body: config.requestBody, - headers: { 'x-skyflow-authorization': res, 'content-type': ContentType.APPLICATIONORJSON,...toLowerKeys(config.requestHeader) }, - }); - invokeRequest.then((response: any) => { - rootResolve(response.data); - }).catch((err) => { - rootReject({ errors: [err] }); - }); - }).catch(err =>{ - rootReject(err); - }) - }); - } - - - getToken() : Promise { - return new Promise((resolve,reject)=>{ - if(isTokenValid(this.#bearerToken)) { - resolve(this.#bearerToken) - } - else { - this.#client.config.getBearerToken().then((authToken) => { - if(isTokenValid(authToken)) { - resolve(authToken) - } - else { - reject(new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_BEARER_TOKEN)) - } - }).catch((err)=>{ - reject(err) - }) - } - }) - } -} -export default Controller; diff --git a/src/vault-api/Logging.ts b/src/vault-api/Logging.ts deleted file mode 100644 index c62b5c6..0000000 --- a/src/vault-api/Logging.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { LogLevel } from "./utils/common"; - -const logging = { - logLevel : LogLevel.ERROR, -} - -export function setLogLevel(logLevel: LogLevel){ - logging.logLevel = logLevel -} - -export function getLogLevel(): LogLevel{ - return logging.logLevel -} diff --git a/src/vault-api/Skyflow.ts b/src/vault-api/Skyflow.ts deleted file mode 100644 index e3a6f0c..0000000 --- a/src/vault-api/Skyflow.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ - -/** - * @module Skyflow - */ - -import Client from './client'; -import { printLog } from './utils/logs-helper'; -import logs from './utils/logs'; -import Controller from './Controller'; -import { - IRevealResponseType, - IConnectionConfig, - RequestMethod, - IInsertRecordInput, - IDetokenizeInput, - IGetByIdInput, - RedactionType, - MessageType, - IInsertOptions, - IUpdateInput, - IUpdateOptions, - IGetInput, - IGetOptions, - IDeleteInput, - IDeleteOptions, -} from './utils/common'; -import { formatVaultURL } from './utils/helpers'; - -/** - * Parameters for the Skyflow client. - * @property vaultID ID of the vault to connect to. - * @property vaultURL URL of the vault to connect to. - * @property getBearerToken Function that retrieves a Skyflow bearer token from your backend. - * @property options Additional configuration options. - */ -export interface ISkyflow { - vaultID?: string; - vaultURL?: string; - getBearerToken: () => Promise; - options?: Record; -} - -/** -* Parent Skyflow class that consists of all the methods exposed to the client. -* @class Skyflow -*/ -class Skyflow { - /** - * @internal - */ - #client: Client; - - /** - * @internal - */ - #metadata = { }; - - /** - * @internal - */ - #Controller: Controller; - - /** - * @internal - */ - constructor(config: ISkyflow) { - this.#client = new Client( - { - ...config, - } - , - this.#metadata, - ); - this.#Controller = new Controller(this.#client); - - printLog(logs.infoLogs.BEARER_TOKEN_LISTENER, MessageType.LOG); - } - - /** - * Initializes the Skyflow client. - * @public - * @param config Configuration for the Skyflow client. - * @returns Returns an instance of the Skyflow client. - */ - static init(config: ISkyflow): Skyflow { - printLog(logs.infoLogs.INITIALIZE_CLIENT, MessageType.LOG); - config.vaultURL = formatVaultURL(config.vaultURL) - const skyflow = new Skyflow(config); - printLog(logs.infoLogs.CLIENT_INITIALIZED, MessageType.LOG); - return skyflow; - } - - /** - * Inserts data into the vault. - * @public - * @param records Records to insert. - * @param options Options for the insertion. - * @returns Returns the insert response. - */ - insert( - records: IInsertRecordInput, - options?: IInsertOptions, - ) { - printLog(logs.infoLogs.INSERT_TRIGGERED, MessageType.LOG); - return this.#Controller.insert(records, options); - } - - /** - * Returns values that correspond to the specified tokens. - * @public - * @param detokenizeInput Tokens to return values for. - * @returns Tokens to return values for. - */ - detokenize(detokenizeInput: IDetokenizeInput): Promise { - printLog(logs.infoLogs.DETOKENIZE_TRIGGERED, - MessageType.LOG); - return this.#Controller.detokenize(detokenizeInput); - } - - /** - * Returns records by Skyflow ID. - * @public - * @deprecated Use {@link get} instead. - * @param getByIdInput Skyflow IDs. - * @returns Returns the specified records and any errors. - * @public - */ - getById(getByIdInput: IGetByIdInput) { - printLog(logs.infoLogs.GET_BY_ID_TRIGGERED, - MessageType.LOG); - return this.#Controller.getById(getByIdInput); - } - - /** - * Returns records by Skyflow IDs or column values. - * @public - * @param getInput Identifiers for the records. - * @param options options for getting the records. - * @returns Returns the specified records and any errors. - */ - get(getInput: IGetInput,options?:IGetOptions) { - printLog(logs.infoLogs.GET_CALL_TRIGGERED, - MessageType.LOG); - return this.#Controller.get(getInput,options); - } - - /** - * Invokes a connection to a third-party service. - * @public - * @param config Configuration for the connection. - * @returns Returns the connection response. - */ - invokeConnection(config: IConnectionConfig) { - printLog(logs.infoLogs.INVOKE_CONNECTION_TRIGGERED, - MessageType.LOG); - - return this.#Controller.invokeConnection(config); - } - - /** - * Updates the configuration of elements inside the composable container. - * @public - * @param updateInput Input data for the update operation. - * @param options Options for the container update. - * @returns Returns the response for the update operation. - */ - update(updateInput: IUpdateInput,options?:IUpdateOptions){ - printLog(logs.infoLogs.UPDATE_TRIGGERED, - MessageType.LOG); - return this.#Controller.update(updateInput,options); - } - - /** - * Deletes record from vault - * @public - * @param deleteInput Input data for the delete operation. - * @param options Options for the deletion. - * @returns Returns the response for the delete operation. - */ - delete(deleteInput: IDeleteInput, options?: IDeleteOptions) { - printLog(logs.infoLogs.UPDATE_TRIGGERED, MessageType.LOG); - return this.#Controller.delete(deleteInput, options) - } - - static get RedactionType() { - return RedactionType; - } - - static get RequestMethod() { - return RequestMethod; - } -} -export default Skyflow; diff --git a/src/vault-api/client/index.ts b/src/vault-api/client/index.ts deleted file mode 100644 index 7c39737..0000000 --- a/src/vault-api/client/index.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import SkyflowError from '../libs/SkyflowError'; -import { ISkyflow } from '../Skyflow'; -import SKYFLOW_ERROR_CODE from '../utils/constants'; -import logs from '../utils/logs'; -import { - printLog -} from '../utils/logs-helper'; -import { - ContentType, - MessageType, - SDK_METRICS_HEADER_KEY -} from '../utils/common'; -import axios, { Method } from 'axios'; -import { generateSDKMetrics, objectToFormData, toLowerKeys } from '../utils/helpers'; -export interface IClientRequest { - body?: any; - headers?: Record; - requestMethod:Method; - url: string; -} - -class Client { - config: ISkyflow; - - #metaData: any; - - constructor(config: ISkyflow, metadata) { - this.config = config; - this.#metaData = metadata; - } - - convertRequestBody = (body:any,contentType:string) => { - if (contentType?.includes(ContentType.FORMURLENCODED)) { - const qs = require('qs'); - return qs.stringify(body) - } else if (contentType?.includes(ContentType.FORMDATA)) { - return objectToFormData(body); - } else { - return JSON.stringify({ ...body}) - } - } - getHeaders = (data:any,headerKeys:any) =>{ - if(headerKeys['content-type'] === "multipart/form-data") { - return {...headerKeys, ...data.getHeaders()} - } else { - return {...headerKeys} - } - } - - request = (request: IClientRequest) => new Promise((resolve, reject) => { - const headerKeys = toLowerKeys(request.headers); - let contentType = headerKeys['content-type'] - headerKeys[SDK_METRICS_HEADER_KEY] = JSON.stringify(generateSDKMetrics()); - const data = this.convertRequestBody(request.body,contentType) - const headers = this.getHeaders(data,headerKeys) - axios({ - method : request.requestMethod, - url: request.url, - data: data, - headers: this.getHeaders(data,headerKeys) - } - ).then((res)=> { - // res.data['requestId'] = res.headers['x-request-id'] - let requestId = res.headers['x-request-id'] - resolve({data: res.data, metadata: {requestId}}) - }).catch((err)=> { - this.failureResponse(err).catch((err)=>reject(err)) - }) - }); - - failureResponse = (err:any) => new Promise((_,reject) => { - const contentType = err.response?.headers['content-type'] - const data = err.response.data - const requestId = err.response?.headers['x-request-id'] - if (contentType && contentType.includes('application/json')) { - let description = JSON.parse(JSON.stringify(data)); - if (description?.error?.message) { - description = requestId ? `${description?.error?.message} - requestId: ${requestId}` : description?.error?.message; - } - printLog(description, MessageType.ERROR); - reject(new SkyflowError({ - code: err.response.status, - description, - }, [], true)); - } else if (contentType && contentType.includes('text/plain')) { - let description = requestId ? `${data} - requestId: ${requestId}` : data - printLog(description, MessageType.ERROR); - reject(new SkyflowError({ - code: err.response.status, - description, - }, [], true)); - } else { - let description = requestId ? `${logs.errorLogs.ERROR_OCCURED} - requestId: ${requestId}` : logs.errorLogs.ERROR_OCCURED - printLog(description, MessageType.ERROR); - reject(new SkyflowError({ - code: err.response.status, - description, - }, [], true)); - } - }) -} - - -export default Client; diff --git a/src/vault-api/core/Collect.ts b/src/vault-api/core/Collect.ts deleted file mode 100644 index c8c545c..0000000 --- a/src/vault-api/core/Collect.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import _ from 'lodash'; -import { IInsertRecordInput, IInsertRecord, IInsertOptions } from '../utils/common'; - -const getUpsertColumn = (tableName: string, options: Record) => { - let uniqueColumn = ''; - options?.upsert?.forEach((upsertOptions) => { - if (tableName === upsertOptions.table) { - uniqueColumn = upsertOptions.column; - } - }); - return uniqueColumn; -}; -export const constructInsertRecordRequest = ( - records: IInsertRecordInput, - options: Record = { tokens: true }, -) => { - let requestBody: any = []; - records.records.forEach((record, index) => { - const upsertColumn = getUpsertColumn(record.table, options); - requestBody.push({ - method: 'POST', - quorum: true, - tableName: record.table, - fields: record.fields, - ...(options?.upsert ? { upsert: upsertColumn } : {}), - ...(options?.tokens ? { tokenization: true } : {}), - }); - }); - requestBody = { records: requestBody, continueOnError: options.continueOnError } - return requestBody; -}; - -export const constructInsertRecordResponse = ( - responseBody: any, - options: IInsertOptions, - records: IInsertRecord[], -) => { - if (options.continueOnError) { - const successObjects: any = []; - const failureObjects: any= []; - responseBody.data.responses - .forEach((response, index) => { - const status = response['Status'] - const body = response['Body'] - if ('records' in body) { - const record = body['records'][0] - if (options.tokens) { - successObjects.push({ - table: records[index].table, - fields: { - skyflow_id: record.skyflow_id, - ...record.tokens, - }, - request_index: index, - }) - } else { - successObjects.push({ - table: records[index].table, - skyflow_id: record.skyflow_id, - request_index: index, - }) - } - } else { - failureObjects.push({ - error: { - code: status, - description: `${body['error']} - requestId: ${responseBody.metadata.requestId}`, - request_index: index, - } - }) - } - }) - const finalResponse = {}; - if (successObjects.length > 0) { - finalResponse['records'] = successObjects; - } - if (failureObjects.length > 0) { - finalResponse['errors'] = failureObjects; - } - return finalResponse; - } else if (options.tokens) { - return { - records: responseBody.data.responses - .map((res, index) => { - const skyflowId = res.records[0].skyflow_id; - const tokens = res.records[0].tokens; - return { - table: records[index].table, - fields: { - skyflow_id: skyflowId, - ...tokens, - }, - "request_index": index, - }; - }), - }; - } - return { - records: responseBody.data.responses.map((res, index) => ({ - table: records[index].table, - skyflow_id: res.records[0].skyflow_id, - "request_index": index - })), - }; -}; \ No newline at end of file diff --git a/src/vault-api/core/Delete.ts b/src/vault-api/core/Delete.ts deleted file mode 100644 index a73f56f..0000000 --- a/src/vault-api/core/Delete.ts +++ /dev/null @@ -1,83 +0,0 @@ -import Client from "../client"; -import SkyflowError from "../libs/SkyflowError"; -import { IDeleteOptions, IDeleteRecord } from "../utils/common"; - -const formatForPureJsFailure = (cause, skyflowId: string) => ({ - id: skyflowId, - ...new SkyflowError({ - code: cause?.error?.code, - description: cause?.error?.description, - }, [], true), -}); - -const deleteRecordInVault = ( - deleteRecord: IDeleteRecord, - options: IDeleteOptions, - client: Client, - authToken: string, -): Promise => { - const vaultEndPointURL: string = `${client.config.vaultURL}/v1/vaults/${client.config.vaultID}/${deleteRecord.table}/${deleteRecord.id}`; - return client.request({ - requestMethod: 'DELETE', - url: vaultEndPointURL, - headers: { - Authorization: `Bearer ${authToken}`, - 'Content-Type': 'application/json', - } - }); -}; - -/** Delete By Skyflow ID */ -export const deleteRecordsBySkyflowID = ( - deleteRecords: IDeleteRecord[], - options: IDeleteOptions, - client: Client, - authToken: String -) => { - return new Promise((rootResolve, rootReject) => { - const vaultResponseSet: Promise[] = deleteRecords.map( - (deleteRecord) => - new Promise((resolve) => { - const deleteResponse: any = []; - deleteRecordInVault( - deleteRecord, - options, - client, - authToken as string - ) - .then( - (response: any) => { - deleteResponse.push(response.data); - }, - (cause: any) => { - deleteResponse.push(formatForPureJsFailure(cause, deleteRecord.id)); - } - ) - .finally(() => { - resolve(deleteResponse); - }); - }) - ); - - Promise.allSettled(vaultResponseSet).then((resultSet) => { - const recordsResponse: Record[] = []; - const errorResponse: Record[] = []; - resultSet.forEach((result) => { - if (result.status === "fulfilled") { - result.value.forEach((res: Record) => { - if (Object.prototype.hasOwnProperty.call(res, "error")) { - errorResponse.push(res); - } else { - recordsResponse.push(res); - } - }); - } - }); - if (errorResponse.length === 0) { - rootResolve({ records: recordsResponse }); - } else if (recordsResponse.length === 0) { - rootReject({ errors: errorResponse }); - }else rootReject({ records: recordsResponse, errors: errorResponse }); - }); - }); -}; diff --git a/src/vault-api/core/Reveal.ts b/src/vault-api/core/Reveal.ts deleted file mode 100644 index 582026d..0000000 --- a/src/vault-api/core/Reveal.ts +++ /dev/null @@ -1,311 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import Client from '../client'; -import SkyflowError from '../libs/SkyflowError'; -import { - ISkyflowIdRecord, IRevealRecord, IRevealResponseType, IUpdateRecord, IUpdateOptions,RedactionType, IGetOptions -} from '../utils/common'; -import 'core-js/modules/es.promise.all-settled'; -interface IApiSuccessResponse { - records: [ - { - token: string; - valueType: string; - value: string; - }, - ]; -} - -interface IUpdateApiResponse{ - skyflow_id: string; - tokens: Record -} - -const formatForPureJsSuccess = (response: IApiSuccessResponse) => { - const currentResponseRecords = response.records; - return currentResponseRecords.map((record) => ({ token: record.token, value: record.value })); -}; - -const formatForPureJsFailure = (cause, tokenId: string) => ({ - token: tokenId, - ...new SkyflowError({ - code: cause?.error?.code, - description: cause?.error?.description, - }, [], true), -}); - -const formatUpdateSuccessResponse = (response:IUpdateApiResponse)=>{ - return { - id: response.skyflow_id, - ...(response?.tokens?{fields:{...response.tokens}}:{}), - } -}; - -const formatUpdateFailureResponse = (cause,id:string)=>{ - return { - id: id, - ...new SkyflowError({ - code : cause?.error?.code, - description: cause?.error?.description, - },[],true) - } -} - -const getSkyflowIdRecordsFromVault = ( - skyflowIdRecord: ISkyflowIdRecord, - client: Client, - authToken: string, - options?: IGetOptions -) => { - let paramList: string = ''; - - - skyflowIdRecord.ids?.forEach((skyflowId) => { - paramList += `skyflow_ids=${skyflowId}&`; - }); - - if (options && Object.prototype.hasOwnProperty.call(options, 'encodeURI') && options?.encodeURI === false){ - skyflowIdRecord.columnValues?.forEach((column,index) => { - paramList += `${index === 0 ?`column_name=${skyflowIdRecord.columnName}&`:''}column_values=${column}&`; - }); - } else { - skyflowIdRecord.columnValues?.forEach((column,index) => { - var encode_column_value = encodeURIComponent(column) - paramList += `${index === 0 ?`column_name=${skyflowIdRecord.columnName}&`:''}column_values=${encode_column_value}&`; - }); - } - - if(options && Object.prototype.hasOwnProperty.call(options,'tokens')){ - paramList += `tokenization=${options.tokens}&` - } - - if(skyflowIdRecord?.redaction){ - paramList += `redaction=${skyflowIdRecord.redaction}` - } - - const vaultEndPointurl: string = `${client.config.vaultURL}/v1/vaults/${client.config.vaultID}/${skyflowIdRecord.table}?${paramList}`; - - return client.request({ - requestMethod: 'GET', - url: vaultEndPointurl, - headers: { - Authorization: `Bearer ${authToken}`, - 'Content-Type': 'application/json', - }, - }); -}; - -const getTokenRecordsFromVault = ( - tokenRecord: IRevealRecord, - client: Client, - authToken: string, -): Promise => { - const vaultEndPointurl: string = `${client.config.vaultURL}/v1/vaults/${client.config.vaultID}/detokenize`; - return client.request({ - requestMethod: 'POST', - url: vaultEndPointurl, - headers: { - Authorization: `Bearer ${authToken}`, - 'Content-Type': 'application/json', - }, - body: - { - detokenizationParameters: [ - { - token : tokenRecord.token, - redaction: (tokenRecord?.redaction ? tokenRecord.redaction : RedactionType.PLAIN_TEXT) - }, - ], - }, - }); -}; - -export const fetchRecordsByTokenId = ( - tokenIdRecords: IRevealRecord[], - client: Client, - authToken: String -): Promise => new Promise((rootResolve, rootReject) => { - const vaultResponseSet: Promise[] = tokenIdRecords.map( - (tokenRecord) => new Promise((resolve) => { - const apiResponse: any = []; - getTokenRecordsFromVault(tokenRecord, client, authToken as string) - .then( - (response: any) => { - const fieldsData = formatForPureJsSuccess(response.data); - apiResponse.push(...fieldsData); - }, - (cause: any) => { - const errorData = formatForPureJsFailure(cause, tokenRecord.token); - apiResponse.push(errorData); - }, - ) - .finally(() => { - resolve(apiResponse); - }); - }), - ); - - Promise.allSettled(vaultResponseSet).then((resultSet) => { - const recordsResponse: Record[] = []; - const errorResponse: Record[] = []; - resultSet.forEach((result) => { - if (result.status === 'fulfilled') { - result.value.forEach((res: Record) => { - if (Object.prototype.hasOwnProperty.call(res, 'error')) { - errorResponse.push(res); - } else { - recordsResponse.push(res); - } - }); - } - }); - if (errorResponse.length === 0) { - rootResolve({ records: recordsResponse }); - } else if (recordsResponse.length === 0) rootReject({ errors: errorResponse }); - else rootReject({ records: recordsResponse, errors: errorResponse }); - }); -}); - - - - -/** SKYFLOW ID */ -export const fetchRecordsBySkyflowID = async ( - skyflowIdRecords: ISkyflowIdRecord[], - client: Client, - authToken: string, - options?: IGetOptions -) => new Promise((rootResolve, rootReject) => { - let vaultResponseSet: Promise[]; - vaultResponseSet = skyflowIdRecords.map( - (skyflowIdRecord) => new Promise((resolve, reject) => { - getSkyflowIdRecordsFromVault(skyflowIdRecord, client, authToken as string,options) - .then( - (resolvedResult: any) => { - const response: any[] = []; - const recordsData: any[] = resolvedResult.data.records; - recordsData.forEach((fieldData) => { - const id = fieldData.fields.skyflow_id; - const currentRecord = { - fields: { - id, - ...fieldData.fields, - }, - table: skyflowIdRecord.table, - }; - delete currentRecord.fields.skyflow_id; - response.push(currentRecord); - }); - resolve(response); - }, - (rejectedResult) => { - let errorResponse = rejectedResult; - if (rejectedResult && rejectedResult.error) { - errorResponse = { - error: { - code: rejectedResult?.error?.code, - description: rejectedResult?.error?.description, - }, - ids: skyflowIdRecord.ids, - ...(skyflowIdRecord?.columnName?{columnName:skyflowIdRecord?.columnName}:{}) - }; - } - reject(errorResponse); - }, - ) - .catch((error) => { - reject(error); - }); - }), - ); - Promise.allSettled(vaultResponseSet).then((resultSet) => { - const recordsResponse: any[] = []; - const errorsResponse: any[] = []; - resultSet.forEach((result) => { - if (result.status === 'fulfilled') { - recordsResponse.push(...result.value); - } else { - errorsResponse.push(result.reason); - } - }); - if (errorsResponse.length === 0) { - rootResolve({ records: recordsResponse }); - } else if (recordsResponse.length === 0) rootReject({ errors: errorsResponse }); - else rootReject({ records: recordsResponse, errors: errorsResponse }); - }); -}); - - -const updateRecordInVault = ( - updateRecord: IUpdateRecord, - options:IUpdateOptions, - client: Client, - authToken:string, -): Promise => { - const vaultEndPointURL: string = `${client.config.vaultURL}/v1/vaults/${client.config.vaultID}/${updateRecord.table}/${updateRecord.id}`; - return client.request({ - requestMethod: 'PUT', - url: vaultEndPointURL, - headers: { - Authorization: `Bearer ${authToken}`, - 'Content-Type': 'application/json', - }, - body: - { - record:{ - fields:{ ...updateRecord.fields } - }, - tokenization: options.tokens - }, - }); -}; - - -/** Update By Skyflow ID */ -export const updateRecordsBySkyflowID = ( - updateRecords: IUpdateRecord[], - options, - client: Client, - authToken: String, -)=>{ - return new Promise((rootResolve,rootReject)=>{ - const vaultResponseSet: Promise[] = updateRecords.map( - (updateRecord) => new Promise((resolve) => { - const updateResponse: any = []; - updateRecordInVault(updateRecord, options, client, authToken as string) - .then( - (response: any) => { - updateResponse.push(formatUpdateSuccessResponse(response.data)); - }, - (cause: any) => { - updateResponse.push(formatUpdateFailureResponse(cause,updateRecord.id)); - }, - ) - .finally(() => { - resolve(updateResponse); - }); - }), - ); - - Promise.allSettled(vaultResponseSet).then((resultSet) => { - const recordsResponse: Record[] = []; - const errorResponse: Record[] = []; - resultSet.forEach((result) => { - if (result.status === 'fulfilled') { - result.value.forEach((res: Record) => { - if (Object.prototype.hasOwnProperty.call(res, 'error')) { - errorResponse.push(res); - } else { - recordsResponse.push(res); - } - }); - } - }); - if (errorResponse.length === 0) { - rootResolve({ records: recordsResponse }); - } else if (recordsResponse.length === 0) rootReject({ errors: errorResponse }); - else rootReject({ records: recordsResponse, errors: errorResponse }); - }); - }); -} \ No newline at end of file diff --git a/src/vault-api/libs/SkyflowError.ts b/src/vault-api/libs/SkyflowError.ts deleted file mode 100644 index ae10e71..0000000 --- a/src/vault-api/libs/SkyflowError.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { parameterizedString } from '../utils/logs-helper'; - -export interface ISkyflowError{ - code:string | number, - description:string, -} - -export default class SkyflowError extends Error { - error?: ISkyflowError; - - errors?: ISkyflowError[]; - - constructor(errorCode: ISkyflowError, - args?: any[], isSingularError: boolean = false) { - const formattedError = { - code: errorCode.code, - description: (args && args?.length > 0) - ? parameterizedString(errorCode.description, ...args) - : errorCode.description, - }; - super(formattedError.description); - if (isSingularError) { - this.error = formattedError; - } else { - this.errors = [formattedError]; - } - } -} diff --git a/src/vault-api/utils/common/index.ts b/src/vault-api/utils/common/index.ts deleted file mode 100644 index 4b03966..0000000 --- a/src/vault-api/utils/common/index.ts +++ /dev/null @@ -1,266 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ - -/** - * @module Utils - */ - -/** - * Supported redaction types. - */ -export enum RedactionType { - DEFAULT = 'DEFAULT', - PLAIN_TEXT = 'PLAIN_TEXT', - MASKED = 'MASKED', - REDACTED = 'REDACTED', -} - -/** - * Supported request methods. - */ -export enum RequestMethod { - GET = 'GET', - POST = 'POST', - PUT = 'PUT', - PATCH = 'PATCH', - DELETE = 'DELETE', -} - -/** - * Supported log levels. - */ -export enum LogLevel { - WARN = 'WARN', - INFO = 'INFO', - DEBUG = 'DEBUG', - ERROR = 'ERROR', - OFF = 'OFF' -} - -/** - * Supported message types. - */ -export enum MessageType { - LOG = 'LOG', - WARN = 'WARN', - ERROR = 'ERROR', -} - -/** - * Parameters for the insert record input. - * @property records An array of insert records. - */ -export interface IInsertRecordInput { - records: IInsertRecord[]; -} - -/** - * Parameters for inserting a record. - * @property table Table that the data belongs to. - * @property fields Fields to insert data into. - */ -export interface IInsertRecord { - table: string; - fields: Record; -} - -/** - * Parameters by the Reveal record. - * @property redaction Redaction type applied to the data. Defaults to `RedactionType.PLAIN_TEXT`. - * @property token Token of the revealed data. - */ -export interface IRevealRecord { - token: string; - redaction?: RedactionType; -} - -/** - * Parameters by the reveal response. - * @property records Records revealed, if any. - * @property errors Errors, if any. - */ -export interface IRevealResponseType { - records?: Record[]; - errors?: Record[]; -} - -/** - * Parameters for detokenizing input. - * @property records Revealed records. - */ -export interface IDetokenizeInput { - records: IRevealRecord[]; -} - -/** - * Parameters for Skyflow ID record. - * @property ids Skyflow IDs of the records to get. - * @property redaction Type of redaction for values. - * @property table Type of redaction for values. - * @property columnName Column the data belongs to. - * @property columnValues Values of the records. - */ -export interface ISkyflowIdRecord { - ids?: string[]; - redaction?: RedactionType; - table: string; - columnName?: string; - columnValues?: string[]; -} - -/** - * Parameters by Skyflow record. - * @property ids Skyflow IDs of the records to get. - * @property redaction Type of redaction for values. - * @property table Type of redaction for values. - */ -export interface ISkyflowRecord { - ids: string[]; - redaction: RedactionType; - table: string; -} - -/** - * Parameters by the getbyid input. - * @property records Records to get. - */ -export interface IGetByIdInput { - records: ISkyflowRecord[]; -} - -/** - * Parameters to retrieve input. - * @property records Records to retrieve. - */ -export interface IGetInput { - records: ISkyflowIdRecord[]; -} - -// export interface Context{ -// logLevel:LogLevel -// } - -/** - * Configuration to establish a connection. - * @property connectionURL URL of the outbound/inbound connection. - * @property methodName The HTTP request method to be used. - * @property pathParams Parameters to be included in the URL path. - * @property queryParams Query parameters to be included in the URL. - * @property requestBody Data to be included in the request body. - * @property requestHeader Headers to be included in the request. - */ -export interface IConnectionConfig { - connectionURL: string; - methodName: RequestMethod; - pathParams?: any; - queryParams?: any; - requestBody?: any; - requestHeader?: any; -} - -export const TYPES = { - INSERT: 'INSERT', - DETOKENIZE: 'DETOKENIZE', - GET_BY_ID: 'GET_BY_ID', - GET: 'GET', - INVOKE_CONNECTION: 'INVOKE_CONNECTION', -}; - -/** - * Supported content types. - */ -export enum ContentType { - APPLICATIONORJSON = 'application/json', - TEXTORPLAIN = 'text/plain', - TEXTORXML = 'text/xml', - FORMURLENCODED = 'application/x-www-form-urlencoded', - FORMDATA = 'multipart/form-data', -} - -/** - * Parameters by upsert option. - * @property table Table that the data belongs to. - * @property column Name of the unique column. - */ -export interface IUpsertOption { - table: string; - column: string; -} - -/** - * Parameters by insert options. - * @property tokens If `true`, returns tokens for the collected data. Defaults to `false`. - * @property upsert If specified, upserts data. If not specified, inserts data. - * @property continueOnError If specified, decides whether to continue after experiencing failure. - */ -export interface IInsertOptions { - tokens?: boolean; - upsert?: IUpsertOption[]; - continueOnError?: boolean; -} - -/** - * Parameters for updating a record. - * @property id Skyflow ID of the record to update. - * @property table Table that the data belongs to. - * @property fields Fields to update data into. - */ -export interface IUpdateRecord{ - id: string, - table: string, - fields: Record -} - -/** - * Parameters for updating a record. - * @property records An array of update records. - */ -export interface IUpdateInput{ - records: IUpdateRecord[]; -} - -/** - * Parameters by update options. - * @property tokens If `true`, returns tokens for the collected data. Defaults to `false`. - */ -export interface IUpdateOptions{ - tokens: boolean -} - -/** - * Parameters by get records options. - * @property tokens If `true`, returns tokens for the collected data. Defaults to `false`. - * @property encodeURI If `true`, encoded column values will be sent in API call. Defaults to `true`. - */ -export interface IGetOptions{ - tokens?: boolean - encodeURI?: boolean -} - -/** - * Parameters for deleting a record. - * @property id Skyflow ID of the record to be deleted. - * @property table Table name from which the record has to be deleted. - */ -export interface IDeleteRecord { - id: string; - table: string; -} - -/** - * Parameters for deleting a record. - * @property records An array of delete records. - */ -export interface IDeleteInput { - records: IDeleteRecord[]; -} - -/** - * Parameters by delete options. - */ -export interface IDeleteOptions { - -} - -export const SDK_METRICS_HEADER_KEY = "sky-metadata"; diff --git a/src/vault-api/utils/constants.ts b/src/vault-api/utils/constants.ts deleted file mode 100644 index 2146f8e..0000000 --- a/src/vault-api/utils/constants.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import logs from './logs'; - -const SKYFLOW_ERROR_CODE = { - VAULTID_IS_REQUIRED: { code: 400, description: logs.errorLogs.VAULTID_IS_REQUIRED }, - EMPTY_VAULTID_IN_INIT: { code: 400, description: logs.errorLogs.EMPTY_VAULTID_IN_INIT }, - VAULTURL_IS_REQUIRED: { code: 400, description: logs.errorLogs.VAULTURL_IS_REQUIRED }, - EMPTY_VAULTURL_IN_INIT: { code: 400, description: logs.errorLogs.EMPTY_VAULTURL_IN_INIT }, - INVALID_VAULTURL_IN_INIT: { code: 400, description: logs.errorLogs.INVALID_VAULTURL_IN_INIT }, - GET_BEARER_TOKEN_IS_REQUIRED: { - code: 400, - description: logs.errorLogs.GET_BEARER_TOKEN_IS_REQUIRED, - }, - INVALID_BEARER_TOKEN: { code: 400, description: logs.errorLogs.INVALID_BEARER_TOKEN }, - INVALID_CREDENTIALS: { code: 400, description: logs.errorLogs.INVALID_CREDENTIALS }, - INVALID_CONTAINER_TYPE: { code: 400, description: logs.errorLogs.INVALID_CONTAINER_TYPE }, - INVALID_TABLE_OR_COLUMN: { code: 400, description: logs.errorLogs.INVALID_TABLE_OR_COLUMN }, - CLIENT_CONNECTION: { code: 400, description: logs.errorLogs.CLIENT_CONNECTION }, - RECORDS_KEY_NOT_FOUND: { code: 404, description: logs.errorLogs.RECORDS_KEY_NOT_FOUND }, - EMPTY_RECORDS: { code: 400, description: logs.errorLogs.EMPTY_RECORDS }, - MISSING_RECORDS: { code: 400, description: logs.errorLogs.MISSING_RECORDS }, - EMPTY_RECORD_IDS: { code: 400, description: logs.errorLogs.EMPTY_RECORD_IDS }, - EMPTY_RECORD_COLUMN_VALUES: { code: 400, description: logs.errorLogs.EMPTY_RECORD_COLUMN_VALUES }, - INVALID_RECORD_ID_TYPE: { code: 400, description: logs.errorLogs.INVALID_RECORD_ID_TYPE }, - INVALID_RECORD_COLUMN_VALUE_TYPE: { code: 400, description: logs.errorLogs.INVALID_RECORD_COLUMN_VALUE_TYPE }, - INVALID_COLUMN_VALUES_OPTION_TYPE: { code: 400, description: logs.errorLogs.INVALID_COLUMN_VALUES_OPTION_TYPE }, - - - INVALID_RECORD_LABEL: { code: 400, description: logs.errorLogs.INVALID_RECORD_LABEL }, - INVALID_RECORD_ALT_TEXT: { code: 400, description: logs.errorLogs.INVALID_RECORD_ALT_TEXT }, - EMPTY_TABLE_AND_FIELDS: { code: 400, description: logs.errorLogs.EMPTY_TABLE_AND_FIELDS }, - EMPTY_TABLE: { code: 400, description: logs.errorLogs.EMPTY_TABLE }, - MISSING_TABLE: { code: 400, description: logs.errorLogs.MISSING_TABLE }, - EMPTY_COLUMN_NAME: { code: 400, description: logs.errorLogs.EMPTY_COLUMN_NAME }, - EMPTY_COLUMN_VALUE: { code: 400, description: logs.errorLogs.EMPTY_COLUMN_VALUE }, - INVALID_RECORD_TABLE_VALUE: { code: 400, description: logs.errorLogs.INVALID_RECORD_TABLE_VALUE }, - INVALID_RECORD_COLUMN_VALUE: { code: 400, description: logs.errorLogs.INVALID_RECORD_COLUMN_VALUE }, - MISSING_RECORD_COLUMN_VALUE: { code: 400, description: logs.errorLogs.MISSING_RECORD_COLUMN_VALUE }, - MISSING_RECORD_COLUMN_NAME: { code: 400, description: logs.errorLogs.MISSING_RECORD_COLUMN_NAME }, - MISSING_ID_AND_COLUMN_NAME: { code: 400, description: logs.errorLogs.MISSING_ID_AND_COLUMN_NAME }, - INVALID_TOKEN_ID: { code: 400, description: logs.errorLogs.INVALID_TOKEN_ID }, - MISSING_TOKEN: { code: 400, description: logs.errorLogs.MISSING_TOKEN }, - MISSING_TOKEN_KEY: { code: 400, description: logs.errorLogs.MISSING_TOKEN_KEY }, - INVALID_REDACTION_TYPE: { code: 400, description: logs.errorLogs.INVALID_REDACTION_TYPE }, - MISSING_REDACTION: { code: 400, description: logs.errorLogs.MISSING_REDACTION }, - MISSING_REDACTION_VALUE: { code: 400, description: logs.errorLogs.MISSING_REDACTION_VALUE }, - MISSING_IDS: { code: 400, description: logs.errorLogs.MISSING_IDS }, - MISSING_CONNECTION_URL: { code: 400, description: logs.errorLogs.MISSING_CONNECTION_URL }, - INVALID_CONNECTION_URL_TYPE: { code: 400, description: logs.errorLogs.INVALID_CONNECTION_URL_TYPE }, - INVALID_CONNECTION_URL: { code: 400, description: logs.errorLogs.INVALID_CONNECTION_URL }, - MISSING_METHODNAME_KEY: { code: 400, description: logs.errorLogs.MISSING_METHODNAME_KEY }, - INVALID_METHODNAME_VALUE: { code: 400, description: logs.errorLogs.INVALID_METHODNAME_VALUE }, - UNKNOWN_ERROR: { code: 400, description: logs.errorLogs.UNKNOWN_ERROR }, - CONNECTION_ERROR: { code: 400, description: logs.errorLogs.CONNECTION_ERROR }, - TRANSACTION_ERROR: { code: 400, description: logs.errorLogs.TRANSACTION_ERROR }, - INVALID_UPSERT_OPTION_TYPE: { - code: 400, - description: logs.errorLogs.INVALID_UPSERT_OPTION_TYPE, - }, - EMPTY_UPSERT_OPTIONS_ARRAY: { - code: 400, - description: logs.errorLogs.EMPTY_UPSERT_OPTIONS_ARRAY, - }, - INVALID_UPSERT_OPTION_OBJECT_TYPE: { - code: 400, - description: logs.errorLogs.INVALID_UPSERT_OPTION_OBJECT_TYPE, - }, - MISSING_TABLE_IN_UPSERT_OPTION: { - code: 400, - description: logs.errorLogs.MISSING_TABLE_IN_UPSERT_OPTION, - }, - MISSING_COLUMN_IN_UPSERT_OPTION: { - code: 400, - description: logs.errorLogs.MISSING_COLUMN_IN_UPSERT_OPTION, - }, - INVALID_TABLE_IN_UPSERT_OPTION: { - code: 400, - description: logs.errorLogs.INVALID_TABLE_IN_UPSERT_OPTION, - }, - INVALID_COLUMN_IN_UPSERT_OPTION: { - code: 400, - description: logs.errorLogs.INVALID_COLUMN_IN_UPSERT_OPTION, - }, - INVALID_TOKENS_IN_INSERT: { - code: 400, - description: logs.errorLogs.INVALID_TOKENS_IN_INSERT, - }, - INVALID_CONTINUE_ON_ERROR_IN_INSERT: { - code: 400, - description: logs.errorLogs.INVALID_TOKENS_IN_INSERT, - }, - INVALID_TOKENS_IN_UPDATE: { - code: 400, - description: logs.errorLogs.INVALID_TOKENS_IN_UPDATE, - }, - MISSING_TABLE_IN_IN_UPDATE: { - code: 400, - description: logs.errorLogs.MISSING_TABLE_IN_IN_UPDATE, - }, - MISSING_FIELDS_IN_IN_UPDATE: { - code: 400, - description: logs.errorLogs.MISSING_FIELDS_IN_IN_UPDATE, - }, - MISSING_ID_IN_UPDATE: { - code: 400, - description: logs.errorLogs.MISSING_ID_IN_UPDATE, - }, - INVALID_ID_IN_UPDATE: { - code: 400, - description: logs.errorLogs.INVALID_ID_IN_UPDATE, - }, - INVALID_TABLE_IN_UPDATE: { - code: 400, - description: logs.errorLogs.INVALID_TABLE_IN_UPDATE, - }, - INVALID_FIELDS_IN_UPDATE: { - code: 400, - description: logs.errorLogs.INVALID_FIELDS_IN_UPDATE, - }, - INVALID_UPDATE_INPUT: { - code: 400, - description: logs.errorLogs.INVALID_UPDATE_INPUT, - }, - INVALID_RECORDS_UPDATE_INPUT:{ - code: 400, - description: logs.errorLogs.INVALID_RECORDS_UPDATE_INPUT, - }, - INVALID_GET_BY_ID_INPUT:{ - code: 400, - description: logs.errorLogs.INVALID_GET_BY_ID_INPUT, - }, - INVALID_TOKENS_IN_GET: { - code: 400, - description: logs.errorLogs.INVALID_TOKENS_IN_GET, - }, - TOKENS_GET_COLUMN_NOT_SUPPORTED: { - code: 400, - description: logs.errorLogs.TOKENS_GET_COLUMN_NOT_SUPPORTED, - }, - REDACTION_WITH_TOKENS_NOT_SUPPORTED: { - code: 400, - description: logs.errorLogs.REDACTION_WITH_TOKENS_NOT_SUPPORTED, - }, - INVALID_ENCODE_URI_IN_GET: { - code: 400, - description: logs.errorLogs.INVALID_ENCODE_URI_IN_GET, - }, - MISSING_ID_IN_DELETE: { - code: 400, - description: logs.errorLogs.MISSING_ID_IN_DELETE, - }, - INVALID_ID_IN_DELETE: { - code: 400, - description: logs.errorLogs.INVALID_ID_IN_DELETE, - }, - MISSING_TABLE_IN_DELETE: { - code: 400, - description: logs.errorLogs.MISSING_TABLE_IN_DELETE, - }, - INVALID_TABLE_IN_DELETE: { - code: 400, - description: logs.errorLogs.INVALID_TABLE_IN_DELETE, - }, - INVALID_DELETE_INPUT: { - code: 400, - description: logs.errorLogs.INVALID_DELETE_INPUT, - }, - INVLAID_DELETE_RECORDS_INPUT: { - code: 400, - description: logs.errorLogs.INVLAID_DELETE_RECORDS_INPUT, - }, - DETOKENIZE_INVALID_REDACTION_TYPE:{ - code: 400, - description: logs.errorLogs.DETOKENIZE_INVALID_REDACTION_TYPE, - } -}; - -export default SKYFLOW_ERROR_CODE; diff --git a/src/vault-api/utils/helpers/index.ts b/src/vault-api/utils/helpers/index.ts deleted file mode 100644 index 5c8219a..0000000 --- a/src/vault-api/utils/helpers/index.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import * as sdkDetails from "../../../../package.json"; -import { MessageType } from "../common"; -import logs from "../logs"; -import { parameterizedString, printLog } from "../logs-helper"; -const FormData = require("form-data"); -const os = require("os"); -const process = require("process"); - -export function fillUrlWithPathAndQueryParams(url:string, - pathParams?:object, - queryParams?:object) { - let filledUrl = url; - if (pathParams) { - Object.entries(pathParams).forEach(([key, value]) => { - filledUrl = url.replace(`{${key}}`, value); - }); - } - if (queryParams) { - filledUrl += '?'; - Object.entries(queryParams).forEach(([key, value]) => { - filledUrl += `${key}=${value}&`; - }); - filledUrl = filledUrl.substring(0, filledUrl.length - 1); - } - return filledUrl; -} - -export function formatVaultURL(vaultURL) { - if (typeof vaultURL !== 'string') return vaultURL; - return (vaultURL?.trim().slice(-1) === '/') ? vaultURL.slice(0, -1) : vaultURL.trim(); -} - -export function toLowerKeys(obj) { - if (obj && typeof obj === 'object') { - return Object.keys(obj).reduce((accumulator, key) => { - accumulator[key.toLowerCase()] = obj[key]; - return accumulator; - }, {}); - } - return {} -} -export function objectToFormData(obj: any, form?: FormData, namespace?: string) { - const fd = form || new FormData(); - let formKey: string; - Object.keys(obj).forEach((property) => { - if (Object.prototype.hasOwnProperty.call(obj, property)) { - if (namespace) { - formKey = `${namespace}[${property}]`; - } else { - formKey = property; - } - - if (typeof obj[property] === 'object') { - objectToFormData(obj[property], fd, property); - } else { - fd.append(formKey, obj[property]); - } - } - }); - - return fd; -} - - -export const generateSDKMetrics = () => { - let sdkNameVersion = ""; - let clientDeviceModel = ""; - let clientOSDetails = ""; - let runtimeDetails = ""; - try { - sdkNameVersion = `${sdkDetails.name ? `${sdkDetails.name}@` : ""}${ - sdkDetails.version ? sdkDetails.version : "" - }`; - } catch (err) { - printLog( - parameterizedString(logs.infoLogs.UNABLE_TO_GENERATE_SDK_METRIC,"sdkNameVersion") - ,MessageType.LOG - ); - sdkNameVersion = ""; - } - - try { - clientDeviceModel = `${process.platform ? `${process.platform} ` : ""} ${ - process.arch ? process.arch : "" - }`; - } catch (err) { - printLog( - parameterizedString(logs.infoLogs.UNABLE_TO_GENERATE_SDK_METRIC,"clientDeviceModel") - ,MessageType.LOG - ); - clientDeviceModel = ""; - } - - try { - clientOSDetails = `${os.version() ? os.version() : ""}`; - } catch (err) { - printLog( - parameterizedString(logs.infoLogs.UNABLE_TO_GENERATE_SDK_METRIC,"clientOSDetails") - ,MessageType.LOG - ); - clientOSDetails = ""; - } - - try { - runtimeDetails = `${process.version ? `Node@${process.version}` : ""}`; - } catch (err) { - printLog( - parameterizedString(logs.infoLogs.UNABLE_TO_GENERATE_SDK_METRIC,"runtimeDetails") - ,MessageType.LOG - ); - runtimeDetails = ""; - } - - return { - sdk_name_version: sdkNameVersion, - sdk_client_device_model: clientDeviceModel, - sdk_client_os_details: clientOSDetails, - sdk_runtime_details: runtimeDetails, - }; -}; \ No newline at end of file diff --git a/src/vault-api/utils/jwt-utils/index.ts b/src/vault-api/utils/jwt-utils/index.ts deleted file mode 100644 index c5b9851..0000000 --- a/src/vault-api/utils/jwt-utils/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import jwt_decode, { JwtPayload } from 'jwt-decode'; -import logs from "../logs"; -import { MessageType } from "../common"; -import { printLog } from "../logs-helper"; - -function isValid(token: string) { - printLog(logs.warnLogs.ISVALID_DEPRECATED, MessageType.WARN) - return !isExpired(token) -}; - -function isExpired(token: string) { - if(token === ""){ - printLog(logs.infoLogs.EMPTY_BEARER_TOKEN, MessageType.LOG); - return true - } - let isJwtExpired = false; - const decoded: JwtPayload = jwt_decode(token); - const currentTime = (new Date().getTime() / 1000); - const expiryTime = decoded.exp; - - if (expiryTime && currentTime > expiryTime) { - printLog(logs.infoLogs.BEARER_TOKEN_EXPIRED, MessageType.LOG); - isJwtExpired = true; - } - return isJwtExpired; -} -function isTokenValid(token: string) { - if(token === "") return false - let isJwtExpired = false; - const decoded: JwtPayload = jwt_decode(token); - const currentTime = (new Date().getTime() / 1000); - const expiryTime = decoded.exp; - if (expiryTime && currentTime > expiryTime) { - isJwtExpired = true; - } - return !isJwtExpired; -}; - -export {isValid,isExpired,isTokenValid}; diff --git a/src/vault-api/utils/logs-helper/index.ts b/src/vault-api/utils/logs-helper/index.ts deleted file mode 100644 index 7214d66..0000000 --- a/src/vault-api/utils/logs-helper/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { getLogLevel } from '../../Logging'; -import { MessageType } from '../common'; - -export const LogLevelOptions = { - DEBUG: { - showDebugLogs: true, showInfoLogs: true, showWarnLogs: true, showErrorLogs: true, - }, - INFO: { - showDebugLogs: false, showInfoLogs: true, showWarnLogs: true, showErrorLogs: true, - }, - WARN: { - showDebugLogs: false, showInfoLogs: false, showWarnLogs: true, showErrorLogs: true, - }, - ERROR: { - showDebugLogs: false, showInfoLogs: false, showWarnLogs: false, showErrorLogs: true, - }, - OFF: { - showDebugLogs: false, showInfoLogs: false, showWarnLogs: false, showErrorLogs: false, - } -}; - -export const EnvOptions = { - PROD: { - doesReturnValue: false, - }, - DEV: { - doesReturnValue: true, - }, -}; - -export const printLog = (message: string, messageType:MessageType) => { - const logLevel = getLogLevel() - const { - showDebugLogs, showInfoLogs, showWarnLogs, showErrorLogs, - } = LogLevelOptions[logLevel]; - if (messageType === MessageType.LOG && showDebugLogs) { - // eslint-disable-next-line no-console - console.log("DEBUG: [Skyflow] " + message); - } else if (messageType === MessageType.LOG && showInfoLogs) { - // eslint-disable-next-line no-console - console.log("INFO: [Skyflow] " + message); - } else if (messageType === MessageType.WARN && showWarnLogs) { - // eslint-disable-next-line no-console - console.warn("WARN: [Skyflow] " + message); - } else if (messageType === MessageType.ERROR && showErrorLogs) { - // eslint-disable-next-line no-console - console.error("ERROR: [Skyflow] " + message); - } -}; - -export const parameterizedString = (...args: any[]) => { - const str = args[0]; - const params = args.filter((arg, index) => index !== 0); - if (!str) return ''; - return str.replace(/%s[0-9]+/g, (matchedStr: any) => { - const variableIndex = matchedStr.replace('%s', '') - 1; - return params[variableIndex]; - }); -}; - -export const getElementName = (name:string) => atob(name.split(':')[2]); diff --git a/src/vault-api/utils/logs.ts b/src/vault-api/utils/logs.ts deleted file mode 100644 index 85577ce..0000000 --- a/src/vault-api/utils/logs.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -const logs = { - infoLogs: { - EMPTY_BEARER_TOKEN: "BearerToken is Empty", - BEARER_TOKEN_EXPIRED: "BearerToken is expired", - GENERATE_BEARER_TOKEN_TRIGGERED: "generateBearerToken is triggered", - GENERATE_BEARER_TOKEN_SUCCESS: "BearerToken is generated", - GENERATE_SIGNED_DATA_TOKEN_SUCCESS: 'Signed Data tokens are generated', - INITIALIZE_CLIENT: 'Initializing skyflow client.', - CLIENT_INITIALIZED: 'Initialized skyflow client successfully.', - VALIDATE_RECORDS: 'Validating insert records.', - VALIDATE_DETOKENIZE_INPUT: 'Validating detokenize input.', - VALIDATE_GET_BY_ID_INPUT: 'Validating getById method input.', - VALIDATE_GET_INPUT: 'Validating get method input.', - VALIDATE_CONNECTION_CONFIG: 'Validating connection config.', - INSERT_DATA_SUCCESS: 'Data has been inserted successfully.', - DETOKENIZE_SUCCESS: 'Data has been revealed successfully.', - GET_BY_ID_SUCCESS: 'Data has been revealed successfully.', - BEARER_TOKEN_LISTENER: 'Get bearer token listener added.', - BEARER_TOKEN_RESOLVED: 'GetBearerToken promise resolved successfully.', - REUSE_BEARER_TOKEN: 'Reusing the bearer token.', - CONTROLLER_INITIALIZED: 'SkyflowController initialized.', - INSERT_TRIGGERED: 'Insert method triggered.', - DETOKENIZE_TRIGGERED: 'Detokenize method triggered.', - GET_BY_ID_TRIGGERED: 'Get by ID triggered.', - GET_CALL_TRIGGERED: 'Get call triggered.', - INVOKE_CONNECTION_TRIGGERED: 'Invoke connection triggered.', - DELETE_TRIGGERED: 'Delete method Triggered', - DELETE_REQUEST_RESOLVED: 'Delete method is resolved', - EMIT_REQUEST: 'Emitted %s1 request.', - FETCH_RECORDS_RESOLVED: 'Detokenize request is resolved.', - INSERT_RECORDS_RESOLVED: 'Insert request is resolved.', - GET_BY_SKYFLOWID_RESOLVED: 'Get request is resolved.', - SEND_INVOKE_CONNECTION_RESOLVED: 'Invoke connection request resolved.', - GENERATE_SIGNED_DATA_TOKENS_TRIGGERED: "generateSignedDataTokens is triggered", - UPDATE_TRIGGERED: 'Update method triggered.', - UPDATE_REQUEST_RESOLVED:'Update request is resolved.', - UNABLE_TO_GENERATE_SDK_METRIC:'Unable to generate %s1 metric.' - - }, - errorLogs: { - CLIENT_CONNECTION: 'client connection not established.', - VAULTID_IS_REQUIRED: 'Interface: init - Invalid client credentials. vaultID is required.', - EMPTY_VAULTID_IN_INIT: 'Interface: init - Invalid client credentials. vaultID cannot be empty.', - VAULTURL_IS_REQUIRED: 'Interface: init - Invalid client credentials. vaultURL is required.', - EMPTY_VAULTURL_IN_INIT: 'Interface: init - Invalid client credentials. vaultURL cannot be empty.', - INVALID_VAULTURL_IN_INIT: 'Interface: init - Invalid client credentials. Expecting https://XYZ for vaultURL', - GET_BEARER_TOKEN_IS_REQUIRED: 'Interface: init - Invalid client credentials. getBearerToken is required.', - BEARER_TOKEN_REJECTED: 'Interface: init - GetBearerToken promise got rejected.', - INVALID_ENCODE_URI_IN_GET: 'Interface: get method - Invalid encodeURI type in get.', - INVALID_BEARER_TOKEN: 'Bearer token is invalid or expired.', - INVALID_VAULT_ID: 'Vault Id is invalid or cannot be found.', - EMPTY_VAULT_ID: 'VaultID is empty.', - INVALID_CREDENTIALS: 'Invalid client credentials.', - INVALID_CONTAINER_TYPE: 'Invalid container type.', - INVALID_COLLECT_VALUE: 'Invalid value', - INVALID_COLLECT_VALUE_WITH_LABEL: 'Invalid %s1', - RECORDS_KEY_NOT_FOUND: 'records object key value not found.', - EMPTY_RECORDS: 'records object is empty.', - RECORDS_KEY_ERROR: 'Key “records” is missing or payload is incorrectly formatted.', - MISSING_RECORDS: 'Missing records property.', - INVALID_RECORDS: 'Invalid Records.', - EMPTY_RECORD_IDS: 'Record ids cannot be Empty.', - EMPTY_RECORD_COLUMN_VALUES: 'Record column values cannot be empty.', - INVALID_RECORD_ID_TYPE: 'Invalid Type of Records Id.', - INVALID_RECORD_COLUMN_VALUE_TYPE: 'Invalid Type of Records Column Values.', - INVALID_RECORD_LABEL: 'Invalid Record Label Type.', - INVALID_RECORD_ALT_TEXT: 'Invalid Record altText Type.', - FETCH_RECORDS_REJECTED: 'Detokenize request is rejected.', - INSERT_RECORDS_REJECTED: 'Insert request is rejected.', - GET_BY_SKYFLOWID_REJECTED: 'Get request is rejected.', - SEND_INVOKE_CONNECTION_REJECTED: 'Invoke connection request rejected.', - UPDATE_REQUEST_REJECTED: 'Update request is rejected.', - INVALID_TABLE_NAME: 'Table Name passed doesn’t exist in the vault with id.', - EMPTY_TABLE_NAME: 'Table Name is empty.', - EMPTY_TABLE_AND_FIELDS: 'table or fields parameter cannot be passed as empty at index %s1 in records array.', - EMPTY_TABLE: "Table can't be passed as empty at index %s1 in records array.", - TABLE_KEY_ERROR: 'Key “table” is missing or payload is incorrectly formatted.', - FIELDS_KEY_ERROR: 'Key “fields” is missing or payload is incorrectly formatted.', - INVALID_TABLE_OR_COLUMN: 'Invalid table or column.', - INVALID_COLUMN_NAME: 'Column with given name is not present in the table in vault.', - EMPTY_COLUMN_NAME: 'Column name is empty.', - MISSING_TABLE: 'Missing Table Property.', - MISSING_RECORD_COLUMN_VALUE: 'Column Values can not be empty when Column Name is specified.', - MISSING_RECORD_COLUMN_NAME: 'Column Name can not be empty when Column Values are specified.', - MISSING_ID_AND_COLUMN_NAME:'Provide either ids or column name to get records', - EMPTY_COLUMN_VALUE: 'Column Value is empty.', - INVALID_RECORD_TABLE_VALUE: 'Invalid Record Table value.', - INVALID_RECORD_COLUMN_VALUE: 'Invalid Record Column value.', - INVALID_COLUMN_VALUES_OPTION_TYPE: 'Invalid Column Values type, should be an Array.', - INVALID_TOKEN_ID: 'Token provided is invalid.', - INVALID_TOKEN_ID_WITH_ID: 'Token %s1 provided is invalid', - EMPTY_TOKEN_ID: 'Token is empty.', - ID_KEY_ERROR: "Key 'token' is missing in the payload provided.", - MISSING_TOKEN: 'Missing token property.', - MISSING_TOKEN_KEY: 'token key is Missing.', - REDACTION_KEY_ERROR: 'Key “redaction” is missing or payload is incorrectly formatted.', - INVALID_REDACTION_TYPE: 'Redaction type value isn’t one of: “PLAIN_TEXT”, “REDACTED” ,“DEFAULT” or “MASKED”.', - MISSING_REDACTION: 'Missing Redaction property.', - MISSING_REDACTION_VALUE: 'Missing redaction value.', - MISSING_IDS: 'Missing ids property.', - MISSING_CONNECTION_URL: 'connection URL Key is Missing.', - INVALID_CONNECTION_URL_TYPE: 'Invalid connection URL type.', - INVALID_CONNECTION_URL: 'Invalid connection URL.', - MISSING_METHODNAME_KEY: 'methodName Key is Missing.', - INVALID_METHODNAME_VALUE: 'Invalid methodName value.', - UNKNOWN_ERROR: 'Unknown Error.', - TRANSACTION_ERROR: 'An error occurred during transaction.', - CONNECTION_ERROR: 'Error while initializing the connection.', - ERROR_OCCURED: 'Error occurred.', - RESPONSE_BODY_KEY_MISSING: '%s1 is missing in the response.', - INVALID_UPSERT_OPTION_TYPE: 'Interface: insert method - Invalid upsert option, should be an array.', - EMPTY_UPSERT_OPTIONS_ARRAY: 'Interface: insert method - upsert option cannot be an empty array, atleast one object of table and column is required.', - INVALID_UPSERT_OPTION_OBJECT_TYPE: 'Interface: insert method - Invalid upsert object at index %s1, an object of table and column is required.', - MISSING_TABLE_IN_UPSERT_OPTION: 'Interface: insert method - "table" key is required in upsert options object at index %s1.', - MISSING_COLUMN_IN_UPSERT_OPTION: 'Interface: insert method - "column" key is required in upsert option at index %s1.', - INVALID_TABLE_IN_UPSERT_OPTION: 'Interface: insert method - Invalid table in upsert object at index %s1, table of type non empty string is required.', - INVALID_COLUMN_IN_UPSERT_OPTION: 'Interface: insert method - Invalid column in upsert object at index %s1, column of type non empty string is required.', - INVALID_TOKENS_IN_INSERT: 'Interface: insert method - Invalid tokens in options. tokens of type boolean is required.', - INVALID_CONTINUE_ON_ERROR_IN_INSERT: 'Interface: insert method - Invalid continueOnError in options. Value of type boolean is required.', - INVALID_TOKENS_IN_UPDATE: 'Interface: update method - Invalid tokens in options. tokens of type boolean is required.', - MISSING_TABLE_IN_IN_UPDATE: 'Interface: update method - table key is required in records object at index %s1', - MISSING_FIELDS_IN_IN_UPDATE: 'Interface: update method - fields key is required in records object at index %s1', - MISSING_ID_IN_UPDATE: 'Interface: update method - id key is required in records object at index %s1', - INVALID_ID_IN_UPDATE: 'Interface: update method - Invalid id in records object at index %s1, id of type non empty string is required.', - INVALID_TABLE_IN_UPDATE: 'Interface: update method - Invalid table in records object at index %s1, table of type non empty string is required.', - INVALID_FIELDS_IN_UPDATE: 'Interface: update method - Invalid fields in records object at index %s1, object with fields to be updated are required.', - INVALID_UPDATE_INPUT: 'Interface: update method - Invalid argument , object with records key is required.', - INVALID_RECORDS_UPDATE_INPUT: 'Interface: update method - Invalid records type, records should be an array of objects.', - INVALID_GET_BY_ID_INPUT: 'Interface: getById method - columnName or columnValues cannot be passed, use get method instead.', - INVALID_TOKENS_IN_GET: 'Interface: get method - Invalid tokens in options. tokens of type boolean is required.', - TOKENS_GET_COLUMN_NOT_SUPPORTED: 'Interface: get method - column_name or column_values cannot be used with tokens in options.', - REDACTION_WITH_TOKENS_NOT_SUPPORTED: 'Interface: get method - redaction cannot be used when tokens are true in options.', - INVALID_DELETE_INPUT: 'Interface: delete method - Invalid argument , object with records key is required.', - INVLAID_DELETE_RECORDS_INPUT: 'Interface: delete method - Invalid records type, records should be an array of objects.', - MISSING_ID_IN_DELETE: 'Interface: delete method - id key is required in records object at index %s1', - INVALID_ID_IN_DELETE: 'Interface: delete method - Invalid id in records object at index %s1, id of type non empty string is required.', - MISSING_TABLE_IN_DELETE: 'Interface: delete method - table key is required in records object at index %s1', - INVALID_TABLE_IN_DELETE: 'Interface: delete method - Invalid table in records object at index %s1, table of type non empty string is required.', - DELETE_REQUEST_REJECTED: 'Delete request is rejected.', - DETOKENIZE_INVALID_REDACTION_TYPE:'Interface: detokenize method - Invalid redaction type, use Skyflow.RedactionType enum.', - }, - warnLogs: { - GENERATE_BEARER_DEPRECATED: 'This method has been deprecated will be removed in future release, use GenerateBearerToken instead', - ISVALID_DEPRECATED: 'This method has been deprecated will be removed in future release, use isExpired instead' - } -}; - -export default logs; \ No newline at end of file diff --git a/src/vault-api/utils/validators/index.ts b/src/vault-api/utils/validators/index.ts deleted file mode 100644 index 6b85bb6..0000000 --- a/src/vault-api/utils/validators/index.ts +++ /dev/null @@ -1,325 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import SkyflowError from '../../libs/SkyflowError'; -import { ISkyflow } from '../../Skyflow'; -import { - IInsertRecordInput, IDetokenizeInput, RedactionType, IGetByIdInput, IConnectionConfig, RequestMethod, IUpdateInput, IGetInput, IGetOptions, IDeleteInput, IDeleteOptions, -} from '../common'; -import SKYFLOW_ERROR_CODE from '../constants'; - - -export const validateInsertRecords = (recordObj: IInsertRecordInput) => { - if (!('records' in recordObj)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.RECORDS_KEY_NOT_FOUND, [], true); - } - const { records } = recordObj; - if (records.length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS, [], true); - } - records.forEach((record, index) => { - if (!('table' in record && 'fields' in record)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TABLE_AND_FIELDS, [`${index}`], true); - } - if (record.table === '') { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_TABLE, [`${index}`], true); - } - }); -}; - -export const validateDetokenizeInput = (detokenizeInput: IDetokenizeInput) => { - if (!Object.prototype.hasOwnProperty.call(detokenizeInput, 'records')) throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_RECORDS); - - const { records } = detokenizeInput; - if (records.length === 0) throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - records.forEach((record) => { - if (Object.keys(record).length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - } - - const recordToken = record.token; - if (!recordToken) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TOKEN); - } - if (recordToken === '' || typeof recordToken !== 'string') { throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKEN_ID); } - - if (Object.prototype.hasOwnProperty.call(record, 'redaction')) { - if (!Object.values(RedactionType).includes(record.redaction as RedactionType)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.DETOKENIZE_INVALID_REDACTION_TYPE); - } - } - - }); -}; - -export const validateGetByIdInput = (getByIdInput: IGetByIdInput) => { - if (!Object.prototype.hasOwnProperty.call(getByIdInput, 'records')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_RECORDS); - } - const { records } = getByIdInput; - if (records.length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - } - - records.forEach((record) => { - if (Object.keys(record).length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - } - - const recordIds = record.ids; - - if (!recordIds) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_IDS); - } - if (recordIds?.length === 0) throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORD_IDS); - recordIds?.forEach((skyflowId) => { - if (typeof skyflowId !== 'string') throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_ID_TYPE); - }); - - const recordRedaction = record.redaction; - if (!recordRedaction) throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_REDACTION); - if (!Object.values(RedactionType).includes(recordRedaction)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_REDACTION_TYPE); - } - - const recordTable = record.table; - if (!Object.prototype.hasOwnProperty.call(record, 'table')) { throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TABLE); } - - if (recordTable === '' || typeof recordTable !== 'string') { throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_TABLE_VALUE); } - - if(record.hasOwnProperty('columnName') || record.hasOwnProperty('columnValues')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_GET_BY_ID_INPUT); - } - }); -}; - -export const validateGetInput = (getInput: IGetInput,options?:IGetOptions) => { - if (!Object.prototype.hasOwnProperty.call(getInput, 'records')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_RECORDS); - } - const { records } = getInput; - if (records.length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - } - - if (Object.prototype.hasOwnProperty.call(options, 'tokens') && (typeof options?.tokens !== 'boolean')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TOKENS_IN_GET); - } - - if (Object.prototype.hasOwnProperty.call(options, 'encodeURI') && (typeof options?.encodeURI !== 'boolean')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ENCODE_URI_IN_GET); - } - - records.forEach((record) => { - if (Object.keys(record).length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - } - - const recordIds = record.ids; - if (recordIds?.length === 0) throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORD_IDS); - recordIds?.forEach((skyflowId) => { - if (typeof skyflowId !== 'string') throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_ID_TYPE); - }); - - const recordRedaction = record.redaction; - if(!(options && Object.prototype.hasOwnProperty.call(options, 'tokens') && options?.tokens === true)){ - if (!recordRedaction) throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_REDACTION); - if (!Object.values(RedactionType).includes(recordRedaction)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_REDACTION_TYPE); - } - } - - - const recordTable = record.table; - if (!Object.prototype.hasOwnProperty.call(record, 'table')) { throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TABLE); } - - if (recordTable === '' || typeof recordTable !== 'string') { throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_TABLE_VALUE); } - - if (record.columnName === undefined && record.columnValues === undefined && recordIds === undefined) { throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_ID_AND_COLUMN_NAME); } - if (record.columnName != undefined && record.columnValues === undefined) { throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_RECORD_COLUMN_VALUE); } - if (record.columnName === undefined && record.columnValues !== undefined) { throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_RECORD_COLUMN_NAME); } - - const columnName = record.columnName; - if (columnName != null && typeof columnName !== 'string') { throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_COLUMN_VALUE); } - if (columnName != null && columnName === '') { throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_COLUMN_NAME); } - - const columnValues = record.columnValues; - if (columnValues != null && !(columnValues && Array.isArray(columnValues))) - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_VALUES_OPTION_TYPE) - - if (columnValues != null) { - if (columnValues.length === 0) throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORD_COLUMN_VALUES); - columnValues.forEach((eachColumnValue) => { - if (typeof eachColumnValue !== 'string') throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORD_COLUMN_VALUE_TYPE); - if (eachColumnValue === '') throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_COLUMN_VALUE); - }); - } - if(options && Object.prototype.hasOwnProperty.call(options, 'tokens') && options?.tokens === true){ - if(columnName || columnValues) - throw new SkyflowError(SKYFLOW_ERROR_CODE.TOKENS_GET_COLUMN_NOT_SUPPORTED) - - if(recordRedaction) - throw new SkyflowError(SKYFLOW_ERROR_CODE.REDACTION_WITH_TOKENS_NOT_SUPPORTED) - } - }); -}; - -export const isValidURL = (url: string) => { - if (url.substring(0, 5).toLowerCase() !== 'https') { - return false; - } - try { - const tempUrl = new URL(url); - if (tempUrl) return true; - } catch (err) { - return false; - } - - return true; -}; - -export const validateConnectionConfig = (config: IConnectionConfig) => { - if (!Object.prototype.hasOwnProperty.call(config, 'connectionURL')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_CONNECTION_URL); - } - if (typeof config.connectionURL !== 'string') { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONNECTION_URL_TYPE); - } - if (!isValidURL(config.connectionURL)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_CONNECTION_URL); - } - - if (!Object.prototype.hasOwnProperty.call(config, 'methodName')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_METHODNAME_KEY); - } - if (!Object.values(RequestMethod).includes(config.methodName)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_METHODNAME_VALUE); - } -}; - -export const validateInitConfig = (initConfig: ISkyflow) => { - if (!Object.prototype.hasOwnProperty.call(initConfig, 'vaultID')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.VAULTID_IS_REQUIRED, [], true); - } - if (!initConfig.vaultID) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULTID_IN_INIT, [], true); - } - if (!Object.prototype.hasOwnProperty.call(initConfig, 'vaultURL')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.VAULTURL_IS_REQUIRED, [], true); - } - if (!initConfig.vaultURL) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULTURL_IN_INIT, [], true); - } - if (initConfig.vaultURL && !isValidURL(initConfig.vaultURL)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_VAULTURL_IN_INIT, [], true); - } - if (!Object.prototype.hasOwnProperty.call(initConfig, 'getBearerToken')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.GET_BEARER_TOKEN_IS_REQUIRED, [], true); - } -}; - -export const validateUpsertOptions = (upsertOptions) => { - if (!(upsertOptions && Array.isArray(upsertOptions))) - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_UPSERT_OPTION_TYPE, [], true); - - if (!upsertOptions.length) - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_UPSERT_OPTIONS_ARRAY, [], true); - - upsertOptions.forEach((upsertOption, index: number) => { - if (!(upsertOption && typeof upsertOption === 'object')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_UPSERT_OPTION_OBJECT_TYPE, [index], true); - } - - if (!Object.prototype.hasOwnProperty.call(upsertOption, 'table')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TABLE_IN_UPSERT_OPTION, [index], true); - } - - if (!(upsertOption.table && typeof upsertOption.table === 'string' && upsertOption.table.length)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_UPSERT_OPTION, [index], true); - } - if (!Object.prototype.hasOwnProperty.call(upsertOption, 'column')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_COLUMN_IN_UPSERT_OPTION, [index], true); - } - - if (!(upsertOption.column && typeof upsertOption.column === 'string' && upsertOption.column.length)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_COLUMN_IN_UPSERT_OPTION, [index], true); - } - }); -}; - -export const validateUpdateInput = (updateInput: IUpdateInput) => { - if (updateInput) { - if (!Object.prototype.hasOwnProperty.call(updateInput, 'records')) - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_RECORDS); - - if (!Array.isArray(updateInput.records)) - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_RECORDS_UPDATE_INPUT) - const { records } = updateInput; - if (records.length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - } - records.forEach((updateRecord, index) => { - if (Object.keys(updateRecord).length === 0) - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - - if (!Object.prototype.hasOwnProperty.call(updateRecord, 'id')) - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_ID_IN_UPDATE, [index]); - if (typeof updateRecord.id !== 'string' || updateRecord.id.trim().length === 0) - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ID_IN_UPDATE, [index]); - - if (!Object.prototype.hasOwnProperty.call(updateRecord, 'table')) - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TABLE_IN_IN_UPDATE, [index]); - - const recordTable = updateRecord.table; - if (typeof recordTable !== 'string' || recordTable.trim().length === 0) - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_UPDATE, [index]); - - if (!Object.prototype.hasOwnProperty.call(updateRecord, 'fields')) - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_FIELDS_IN_IN_UPDATE, [index]); - if (typeof updateRecord?.fields !== 'object' || Object.keys(updateRecord).length === 0) - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FIELDS_IN_UPDATE, [index]); - }); - } else { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_UPDATE_INPUT); - } -}; - -export const validateDeleteInputAndOptions = (deleteInput: IDeleteInput, options?: IDeleteOptions) => { - if (deleteInput) { - if (!Object.prototype.hasOwnProperty.call(deleteInput, 'records')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_RECORDS); - } - - if (!Array.isArray(deleteInput.records)) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVLAID_DELETE_RECORDS_INPUT) - } - const { records } = deleteInput; - if (records.length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - } - records.forEach((deleteRecord, index) => { - if (Object.keys(deleteRecord).length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - } - - if (!Object.prototype.hasOwnProperty.call(deleteRecord, 'id')){ - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_ID_IN_DELETE, [index]); - } - - if (typeof deleteRecord.id !== 'string' || deleteRecord.id.trim().length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ID_IN_DELETE, [index]); - } - - if (!Object.prototype.hasOwnProperty.call(deleteRecord, 'table')) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TABLE_IN_DELETE, [index]); - } - - const recordTable = deleteRecord.table; - if (typeof recordTable !== 'string' || recordTable.trim().length === 0) { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_DELETE, [index]); - } - }); - } else { - throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_DELETE_INPUT); - } -} \ No newline at end of file diff --git a/src/vault/client/index.ts b/src/vault/client/index.ts new file mode 100644 index 0000000..b43f454 --- /dev/null +++ b/src/vault/client/index.ts @@ -0,0 +1,173 @@ +// imports +import { Configuration, QueryApi, RecordsApi, TokensApi } from "../../ _generated_/rest"; +import SkyflowError from "../../error"; +import errorMessages from "../../error/messages"; +import { AuthInfo, AuthType, LogLevel, MessageType, printLog, TYPES } from "../../utils/index"; +import { isExpired } from "../../utils/jwt-utils"; +import logs from "../../utils/logs"; +import Credentials from "../config/credentials"; + +class VaultClient { + + vaultId!: string; + + url!: string; + + configuration!: Configuration; + + vaultAPI!: RecordsApi; + + tokensAPI!: TokensApi; + + queryAPI!: QueryApi; + + individualCredentials?: Credentials; + + skyflowCredentials?: Credentials; + + logLevel!: LogLevel; + + authInfo?: AuthInfo; + + updateTriggered: boolean = false; + + constructor(url: string, vaultId: string, individualCredentials?: Credentials, skyflowCredentials?: Credentials, logLevel?: LogLevel) { + this.initializeClient(url, vaultId, individualCredentials, skyflowCredentials, logLevel); + } + + private initializeClient(url: string, vaultId: string, individualCredentials?: Credentials, skyflowCredentials?: Credentials, logLevel?: LogLevel) { + this.url = url; + this.vaultId = vaultId; + this.individualCredentials = individualCredentials; + this.skyflowCredentials = skyflowCredentials; + this.logLevel = logLevel || LogLevel.ERROR; + } + + updateClientConfig(clusterID: string, vaultId: string, individualCredentials?: Credentials, skyflowCredentials?: Credentials, logLevel?: LogLevel) { + this.updateTriggered = true; + this.initializeClient(clusterID, vaultId, individualCredentials, skyflowCredentials, logLevel); + } + + private initConfig(authInfo: AuthInfo) { + this.authInfo = authInfo; + this.configuration = new Configuration({ + basePath: this.url, + accessToken: authInfo.key, + }); + + } + + initAPI(authInfo: AuthInfo, apiType: string) { + this.initConfig(authInfo); + switch (apiType) { + case TYPES.DELETE: + case TYPES.FILE_UPLOAD: + case TYPES.GET: + case TYPES.INSERT: + case TYPES.INSERT_BATCH: + case TYPES.UPDATE: + this.vaultAPI = new RecordsApi(this.configuration); + break; + case TYPES.DETOKENIZE: + case TYPES.TOKENIZE: + this.tokensAPI = new TokensApi(this.configuration); + break; + case TYPES.QUERY: + this.queryAPI = new QueryApi(this.configuration); + break; + default: + break; + } + + } + + getCredentials(): Credentials | undefined { + if (this.authInfo?.key && !this.updateTriggered) { + switch (this.authInfo.type) { + case AuthType.API_KEY: + printLog(logs.infoLogs.REUSE_API_KEY, MessageType.LOG, this.logLevel); + return { apiKey: this.authInfo.key } as Credentials; + case AuthType.TOKEN: + if (!isExpired(this.authInfo.key)) { + printLog(logs.infoLogs.REUSE_BEARER_TOKEN, MessageType.LOG, this.logLevel); + return { token: this.authInfo.key } as Credentials; + } + } + } + this.updateTriggered = false; + return this.individualCredentials ?? this.skyflowCredentials; + } + + getLogLevel(): LogLevel { + return this.logLevel; + } + + updateLogLevel(logLevel: LogLevel) { + this.logLevel = logLevel; + } + + updateSkyflowCredentials(credentials?: Credentials) { + this.updateTriggered = true; + this.skyflowCredentials = credentials; + } + + failureResponse = (err: any) => new Promise((_, reject) => { + const contentType = err.response?.headers['content-type']; + const data = err.response?.data; + const requestId = err.response?.headers['x-request-id']; + + if (contentType) { + if (contentType.includes('application/json')) { + this.handleJsonError(err, data, requestId, reject); + } else if (contentType.includes('text/plain')) { + this.handleTextError(err, data, requestId, reject); + } else { + this.handleGenericError(err, requestId, reject); + } + } else { + this.handleGenericError(err, requestId, reject); + } + }); + + private handleJsonError(err: any, data: any, requestId: string, reject: Function) { + let description = data; + const statusCode = description?.error?.http_status; + const grpcCode = description?.error?.grpc_code; + const details = description?.error?.details; + + description = description?.error?.message || description; + this.logAndRejectError(description, err, requestId, reject, statusCode, grpcCode, details); + } + + private handleTextError(err: any, data: any, requestId: string, reject: Function) { + this.logAndRejectError(data, err, requestId, reject); + } + + private handleGenericError(err: any, requestId: string, reject: Function) { + const description = err?.response?.data || err?.message || errorMessages.ERROR_OCCURRED; + this.logAndRejectError(description, err, requestId, reject); + } + + private logAndRejectError( + description: string, + err: any, + requestId: string, + reject: Function, + httpStatus?: number, + grpcCode?: number, + details?: any + ) { + printLog(description, MessageType.ERROR, this.getLogLevel()); + reject(new SkyflowError({ + http_code: err?.response?.status || 400, + message: description, + request_ID: requestId, + grpc_code: grpcCode, + http_status: httpStatus, + details: details, + }, [])); + } + +} + +export default VaultClient; \ No newline at end of file diff --git a/src/vault/config/connection/index.ts b/src/vault/config/connection/index.ts new file mode 100644 index 0000000..899d454 --- /dev/null +++ b/src/vault/config/connection/index.ts @@ -0,0 +1,10 @@ +//imports +import Credentials from "../credentials"; + +interface ConnectionConfig { + connectionUrl: string; + connectionId: string; + credentials?: Credentials; +} + +export default ConnectionConfig; diff --git a/src/vault/config/credentials/index.ts b/src/vault/config/credentials/index.ts new file mode 100644 index 0000000..7ad9e02 --- /dev/null +++ b/src/vault/config/credentials/index.ts @@ -0,0 +1,11 @@ + +interface Credentials { + token?: string; + path?: string; + credentialsString?: string; + apiKey?: string; + roles?: Array; + context?: string; +} + +export default Credentials; \ No newline at end of file diff --git a/src/vault/config/vault/index.ts b/src/vault/config/vault/index.ts new file mode 100644 index 0000000..f33610d --- /dev/null +++ b/src/vault/config/vault/index.ts @@ -0,0 +1,12 @@ +// imports +import { Env } from "../../../utils"; +import Credentials from "../credentials"; + +interface VaultConfig { + vaultId: string; + clusterId: string; + env?: Env; + credentials?: Credentials; +} + +export default VaultConfig; diff --git a/src/vault/controller/audit/index.ts b/src/vault/controller/audit/index.ts new file mode 100644 index 0000000..df9e5ec --- /dev/null +++ b/src/vault/controller/audit/index.ts @@ -0,0 +1,19 @@ +//imports + +class AuditController { + + constructor() { + + } + + static initialize() { + //return audit object + } + + list() { + + } + +} + +export default AuditController; diff --git a/src/vault/controller/binlookup/index.ts b/src/vault/controller/binlookup/index.ts new file mode 100644 index 0000000..9120979 --- /dev/null +++ b/src/vault/controller/binlookup/index.ts @@ -0,0 +1,19 @@ +//imports + +class BinLookUpController { + + constructor() { + + } + + static initialize() { + //return binlookup object + } + + get() { + + } + +} + +export default BinLookUpController; diff --git a/src/vault/controller/connections/index.ts b/src/vault/controller/connections/index.ts new file mode 100644 index 0000000..7845699 --- /dev/null +++ b/src/vault/controller/connections/index.ts @@ -0,0 +1,64 @@ +//imports +import axios from "axios"; +import { fillUrlWithPathAndQueryParams, generateSDKMetrics, getBearerToken, LogLevel, MessageType, RequestMethod, parameterizedString, printLog, SDK_METRICS_HEADER_KEY, SKYFLOW_AUTH_HEADER_KEY, REQUEST_ID_KEY, TYPES } from "../../../utils"; +import InvokeConnectionRequest from "../../model/request/inkove"; +import logs from "../../../utils/logs"; +import { validateInvokeConnectionRequest } from "../../../utils/validations"; +import VaultClient from "../../client"; +import InvokeConnectionResponse from "../../model/response/invoke/invoke"; + +class ConnectionController { + + private client: VaultClient; + + private logLevel: LogLevel; + + constructor(client: VaultClient) { + this.client = client; + this.logLevel = client.getLogLevel(); + } + + invoke(invokeRequest: InvokeConnectionRequest): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.INVOKE_CONNECTION_TRIGGERED, MessageType.LOG, this.logLevel); + printLog(logs.infoLogs.VALIDATE_CONNECTION_CONFIG, MessageType.LOG, this.logLevel); + // validations checks + validateInvokeConnectionRequest(invokeRequest); + const filledUrl = fillUrlWithPathAndQueryParams(this.client.url, invokeRequest.pathParams, invokeRequest.queryParams); + getBearerToken(this.client.getCredentials(), this.logLevel).then((token) => { + printLog(parameterizedString(logs.infoLogs.EMIT_REQUEST, TYPES.INVOKE_CONNECTION), MessageType.LOG, this.logLevel); + const sdkHeaders = {}; + sdkHeaders[SKYFLOW_AUTH_HEADER_KEY] = token.key; + sdkHeaders[SDK_METRICS_HEADER_KEY] = JSON.stringify(generateSDKMetrics()); + axios({ + url: filledUrl, + method: invokeRequest.method || RequestMethod.POST, + data: invokeRequest.body, + headers: { ...invokeRequest.headers, ...sdkHeaders } + }).then((response: any) => { + printLog(logs.infoLogs.INVOKE_CONNECTION_REQUEST_RESOLVED, MessageType.LOG, this.logLevel); + let requestId = response.headers[REQUEST_ID_KEY] + const invokeConnectionResponse = new InvokeConnectionResponse({ + data: response.data, + metadata: {requestId} + }); + resolve(invokeConnectionResponse); + }).catch((err) => { + printLog(logs.errorLogs.INVOKE_CONNECTION_REQUEST_REJECTED, MessageType.LOG, this.logLevel); + this.client.failureResponse(err).catch((err)=>reject(err)) + }); + }).catch(err => { + reject(err); + }) + } catch (e) { + if (e instanceof Error) + printLog(e.message, MessageType.ERROR, this.logLevel); + reject(e); + } + }); + } + +} + +export default ConnectionController; diff --git a/src/vault/controller/detect/index.ts b/src/vault/controller/detect/index.ts new file mode 100644 index 0000000..e467a48 --- /dev/null +++ b/src/vault/controller/detect/index.ts @@ -0,0 +1,27 @@ +//imports + +class DetectController { + + constructor() { + + } + + static initialize() { + //return detect object + } + + deIdentify() { + return this; + } + + text() { + + } + + file() { + + } + +} + +export default DetectController; diff --git a/src/vault/controller/vault/index.ts b/src/vault/controller/vault/index.ts new file mode 100644 index 0000000..9facd08 --- /dev/null +++ b/src/vault/controller/vault/index.ts @@ -0,0 +1,552 @@ +//imports +import * as fs from 'fs'; +import InsertRequest from "../../model/request/insert"; +import { BatchRecordMethod, QueryServiceExecuteQueryBody, RecordServiceBatchOperationBody, RecordServiceBulkDeleteRecordBody, RecordServiceInsertRecordBody, RecordServiceUpdateRecordBody, V1BYOT, V1DetokenizePayload, V1DetokenizeRecordRequest, V1FieldRecords, V1TokenizePayload, V1TokenizeRecordRequest } from "../../../ _generated_/rest"; +import InsertOptions from "../../model/options/insert"; +import GetRequest from "../../model/request/get"; +import GetOptions from "../../model/options/get"; +import DetokenizeRequest from "../../model/request/detokenize"; +import DetokenizeOptions from "../../model/options/detokenize"; +import DeleteRequest from "../../model/request/delete"; +import UpdateRequest from "../../model/request/update"; +import UpdateOptions from "../../model/options/update"; +import FileUploadRequest from "../../model/request/file-upload"; +import QueryRequest from '../../model/request/query'; +import InsertResponse from '../../model/response/insert'; +import DetokenizeResponse from '../../model/response/detokenize'; +import UpdateResponse from '../../model/response/update'; +import DeleteResponse from '../../model/response/delete'; +import GetResponse from '../../model/response/get'; +import QueryResponse from '../../model/response/query'; +import FileUploadResponse from '../../model/response/file-upload'; +import TokenizeResponse from '../../model/response/tokenize'; +import TokenizeRequest from '../../model/request/tokenize'; +import { ParsedDetokenizeResponse, ParsedInsertBatchResponse, TokenizeRequestType } from '../../types'; +import { generateSDKMetrics, getBearerToken, MessageType, parameterizedString, printLog, TYPES, SDK_METRICS_HEADER_KEY, removeSDKVersion, RedactionType, SKYFLOW_ID } from '../../../utils'; +import GetColumnRequest from '../../model/request/get-column'; +import logs from '../../../utils/logs'; +import VaultClient from '../../client'; +import { RawAxiosRequestConfig } from 'axios'; +import { validateDeleteRequest, validateDetokenizeRequest, validateGetColumnRequest, validateGetRequest, validateInsertRequest, validateQueryRequest, validateTokenizeRequest, validateUpdateRequest, validateUploadFileRequest } from '../../../utils/validations'; + +class VaultController { + + private client: VaultClient; + + constructor(client: VaultClient) { + this.client = client; + printLog(logs.infoLogs.CONTROLLER_INITIALIZED, MessageType.LOG, this.client.getLogLevel()); + } + + private createSdkHeaders() { + return { [SDK_METRICS_HEADER_KEY]: JSON.stringify(generateSDKMetrics()) }; + } + + private handleRecordsResponse(data: any): any[] { + if (data?.records && Array.isArray(data.records) && data.records.length > 0) { + return data.records; + } + return []; + } + + private handleInsertBatchResponse(data: any): any[] { + if (data?.responses && Array.isArray(data.responses) && data.responses.length > 0) { + return data.responses; + } + return []; + } + + private parseDetokenizeResponse(records: any[]): ParsedDetokenizeResponse { + const response: ParsedDetokenizeResponse = { + success: [], + errors: [] + }; + if (!Array.isArray(records) || records.length === 0) { + return response; + } + records.forEach(record => { + if (record.error) { + response.errors.push({ + token: record.token, + error: record.error + }); + } else { + response.success.push({ + token: record.token, + value: record.value, + type: record.valueType + }); + } + }); + return response; + } + + private parseInsertBatchResponse(records: any[]): InsertResponse { + const response: ParsedInsertBatchResponse = { + success: [], + errors: [] + }; + + if (!records || !Array.isArray(records) || records.length === 0) { + return new InsertResponse({ insertedFields:[], errors: [] }); + } + + records.forEach((record, index) => { + if (this.isSuccess(record)) { + this.processSuccess(record, index, response); + } else { + this.processError(record, index, response); + } + }); + + return new InsertResponse({ insertedFields: response.success, errors: response.errors }); + } + + private isSuccess(record: any): boolean { + return record?.Status === 200; + } + + private processSuccess(record: any, index: number, response: ParsedInsertBatchResponse): void { + record.Body.records.forEach((field: any) => { + response.success.push({ + skyflowId: field?.skyflow_id, + requestIndex: index, + ...field?.tokens + }); + }); + } + + private processError(record: any, index: number, response: ParsedInsertBatchResponse): void { + response.errors.push({ + requestIndex: index, + error: record?.Body?.error + }); + } + + private handleRequest(apiCall: Function, requestType: string): Promise { + return new Promise((resolve, reject) => { + printLog(parameterizedString(logs.infoLogs.EMIT_REQUEST, TYPES[requestType]), MessageType.LOG, this.client.getLogLevel()); + const sdkHeaders = this.createSdkHeaders(); + + getBearerToken(this.client.getCredentials(), this.client.getLogLevel()).then(authInfo => { + this.client.initAPI(authInfo, requestType); + apiCall({ headers: { ...sdkHeaders } }) + .then((response: any) => { + const data = response.data; + printLog(logs.infoLogs[`${requestType}_REQUEST_RESOLVED`], MessageType.LOG, this.client.getLogLevel()); + switch (requestType) { + case TYPES.INSERT: + case TYPES.GET: + case TYPES.QUERY: + case TYPES.DETOKENIZE: + case TYPES.TOKENIZE: + resolve(this.handleRecordsResponse(data)) + break; + case TYPES.INSERT_BATCH: + resolve(this.handleInsertBatchResponse(data)) + break; + case TYPES.UPDATE: + case TYPES.FILE_UPLOAD: + resolve(data) + break; + case TYPES.DELETE: + resolve(new DeleteResponse({ deletedIds: data.RecordIDResponse, errors: [] })); + break; + } + }).catch((error: any) => { + printLog(logs.errorLogs[`${requestType}_REQUEST_REJECTED`], MessageType.ERROR, this.client.getLogLevel()); + this.client.failureResponse(error).catch((err) => reject(err)) + }); + }).catch(reject); + }); + } + + private getTokens(index:number, tokens?: Array) : object | undefined { + if(tokens && tokens.length !== 0 && tokens.length > index ) return tokens[index]; + } + + private buildBatchInsertBody(request: InsertRequest, options?: InsertOptions): RecordServiceBatchOperationBody { + const records = request.data.map((record, index) => ({ + fields: record, + tableName: request.tableName, + tokenization: options?.getReturnTokens() || false, + method: BatchRecordMethod.Post, + tokens: this.getTokens(index, options?.getTokens()), + upsert: options?.getUpsertColumn(), + })); + return { + records, + continueOnError: true, + byot: options?.getTokenMode(), + }; + } + + private buildBulkInsertBody(request: InsertRequest, options?: InsertOptions): RecordServiceInsertRecordBody { + const records = request.data.map((record, index) => ({ + fields: record, + tokens: this.getTokens(index, options?.getTokens()), + })) as Array; + return { + records, + tokenization: options?.getReturnTokens(), + upsert: options?.getUpsertColumn(), + homogeneous: options?.getHomogeneous(), + byot: options?.getTokenMode() + }; + } + + private parseBulkInsertResponse(records: any[]): InsertResponse { + const insertedFields = records.map(record => ({ + skyflowId: record.skyflow_id, + ...record.tokens + })); + return new InsertResponse({ insertedFields, errors: [] }); + } + + insert(request: InsertRequest, options?: InsertOptions): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.INSERT_TRIGGERED, MessageType.LOG, this.client.getLogLevel()); + printLog(logs.infoLogs.VALIDATE_INSERT_INPUT, MessageType.LOG, this.client.getLogLevel()); + // validations checks + validateInsertRequest(request, options, this.client.getLogLevel()); + + const isContinueOnError = options?.getContinueOnError(); + + const requestBody = isContinueOnError + ? this.buildBatchInsertBody(request, options) + : this.buildBulkInsertBody(request, options); + + + const operationType = isContinueOnError ? TYPES.INSERT_BATCH : TYPES.INSERT; + const tableName = request.tableName; + + this.handleRequest( + (headers: RawAxiosRequestConfig | undefined) => + isContinueOnError + ? this.client.vaultAPI.recordServiceBatchOperation(this.client.vaultId, requestBody, headers) + : this.client.vaultAPI.recordServiceInsertRecord(this.client.vaultId, tableName, requestBody as RecordServiceInsertRecordBody, headers), + operationType + ).then((resp: any) => { + printLog(logs.infoLogs.INSERT_DATA_SUCCESS, MessageType.LOG, this.client.getLogLevel()); + const parsedResponse = isContinueOnError + ? this.parseInsertBatchResponse(resp) + : this.parseBulkInsertResponse(resp); + resolve(parsedResponse); + }) + .catch(error => { + reject(error); + }); + } catch (error) { + if (error instanceof Error) + printLog(removeSDKVersion(error.message), MessageType.ERROR, this.client.getLogLevel()); + reject(error); + } + }); + } + + update(request: UpdateRequest, options?: UpdateOptions): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.UPDATE_TRIGGERED, MessageType.LOG, this.client.getLogLevel()); + printLog(logs.infoLogs.VALIDATE_UPDATE_INPUT, MessageType.LOG, this.client.getLogLevel()); + // Validation checks + validateUpdateRequest(request, options, this.client.getLogLevel()); + + const skyflowId = request.data[SKYFLOW_ID]; + delete request.data[SKYFLOW_ID]; + const record = { fields: request.data, tokens: options?.getTokens() }; + const strictMode = options?.getTokenMode() ? options?.getTokenMode() : V1BYOT.Disable; + const updateData: RecordServiceUpdateRecordBody = { + record: record, + tokenization: options?.getReturnTokens(), + byot: strictMode + }; + + this.handleRequest( + (headers: RawAxiosRequestConfig | undefined) => this.client.vaultAPI.recordServiceUpdateRecord( + this.client.vaultId, + request.tableName, + skyflowId, + updateData, + headers + ), + TYPES.UPDATE + ).then(data => { + printLog(logs.infoLogs.UPDATE_SUCCESS, MessageType.LOG, this.client.getLogLevel()); + const updatedRecord = { + skyflowId: data.skyflow_id, + ...data?.tokens + }; + resolve(new UpdateResponse({ updatedField: updatedRecord, errors: [] })); + }) + .catch(error => { + reject(error); + }); + } catch (error) { + if (error instanceof Error) + printLog(removeSDKVersion(error.message), MessageType.ERROR, this.client.getLogLevel()); + reject(error); + } + }); + } + + delete(request: DeleteRequest): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.DELETE_TRIGGERED, MessageType.LOG, this.client.getLogLevel()); + printLog(logs.infoLogs.VALIDATE_DELETE_INPUT, MessageType.LOG, this.client.getLogLevel()); + // Validation checks + validateDeleteRequest(request, this.client.getLogLevel()); + + const deleteRequest: RecordServiceBulkDeleteRecordBody = { + skyflow_ids: request.ids, + }; + + this.handleRequest( + (headers: RawAxiosRequestConfig | undefined) => this.client.vaultAPI.recordServiceBulkDeleteRecord( + this.client.vaultId, + request.tableName, + deleteRequest, + headers + ), + TYPES.DELETE + ).then(data => { + printLog(logs.infoLogs.DELETE_SUCCESS, MessageType.LOG, this.client.getLogLevel()); + resolve(data); + }) + .catch(error => { + reject(error); + }); + } catch (error: any) { + if (error instanceof Error) + printLog(removeSDKVersion(error.message), MessageType.ERROR, this.client.getLogLevel()); + reject(error); + } + }); + } + + get(request: GetRequest | GetColumnRequest, options?: GetOptions): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.GET_TRIGGERED, MessageType.LOG, this.client.getLogLevel()); + printLog(logs.infoLogs.VALIDATE_GET_INPUT, MessageType.LOG, this.client.getLogLevel()); + + // Validation checks + if (request instanceof GetRequest) { + validateGetRequest(request, options, this.client.getLogLevel()); + } + if (request instanceof GetColumnRequest) { + validateGetColumnRequest(request, options, this.client.getLogLevel()); + } + + + let records: Array = []; + let columnName: string = ""; + let columnValues: Array = []; + if (request instanceof GetRequest && request.ids) { + records = request.ids as Array; + } + if (request instanceof GetColumnRequest && request.columnName && request.columnValues) { + columnName = request.columnName as string; + columnValues = request.columnValues as Array; + } + + this.handleRequest( + (headers: RawAxiosRequestConfig | undefined) => this.client.vaultAPI.recordServiceBulkGetRecord( + this.client.vaultId, + request.tableName, + records, + options?.getRedactionType(), + options?.getReturnTokens(), + options?.getFields(), + options?.getOffset(), + options?.getLimit(), + options?.getDownloadURL(), + columnName, + columnValues, + options?.getOrderBy(), + headers + ), + TYPES.GET + ).then(records => { + printLog(logs.infoLogs.GET_SUCCESS, MessageType.LOG, this.client.getLogLevel()); + const processedRecords = records.map(record => ({ + ...record.fields, + })); + resolve(new GetResponse({ data: processedRecords, errors: [] })); + }) + .catch(error => { + reject(error); + }); + } catch (error) { + if (error instanceof Error) + printLog(removeSDKVersion(error.message), MessageType.ERROR, this.client.getLogLevel()); + reject(error); + } + }); + } + + uploadFile(request: FileUploadRequest): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.UPLOAD_FILE_TRIGGERED, MessageType.LOG, this.client.getLogLevel()); + printLog(logs.infoLogs.VALIDATE_FILE_UPLOAD_INPUT, MessageType.LOG, this.client.getLogLevel()); + + // Validation checks + validateUploadFileRequest(request, this.client.getLogLevel()); + + //handle file exits + const formData = new FormData(); + const fileStream = fs.createReadStream(request.filePath) as unknown as Blob; + formData.append('file', fileStream); + formData.append('columnName', request.columnName); + + this.handleRequest( + (headers: RawAxiosRequestConfig | undefined) => this.client.vaultAPI.fileServiceUploadFile( + this.client.vaultId, + request.tableName, + request.skyflowId, + formData, + headers + ), + TYPES.FILE_UPLOAD + ).then(data => { + printLog(logs.infoLogs.FILE_UPLOAD_DATA_SUCCESS, MessageType.LOG, this.client.getLogLevel()); + resolve(new FileUploadResponse({ skyflowId: data.skyflow_id, errors: [] })); + }) + .catch(error => { + reject(error); + }); + } catch (error) { + if (error instanceof Error) + printLog(removeSDKVersion(error.message), MessageType.ERROR, this.client.getLogLevel()); + reject(error); + } + }); + } + + query(request: QueryRequest): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.QUERY_TRIGGERED, MessageType.LOG, this.client.getLogLevel()); + printLog(logs.infoLogs.VALIDATE_QUERY_INPUT, MessageType.LOG, this.client.getLogLevel()); + + // Validation checks + validateQueryRequest(request, this.client.getLogLevel()); + + const query: QueryServiceExecuteQueryBody = { + query: request.query, + }; + + this.handleRequest( + (headers: RawAxiosRequestConfig | undefined) => this.client.queryAPI.queryServiceExecuteQuery( + this.client.vaultId, + query, + headers + ), + TYPES.QUERY + ).then(records => { + printLog(logs.infoLogs.QUERY_SUCCESS, MessageType.LOG, this.client.getLogLevel()); + const processedRecords = records.map(record => ({ + ...record?.fields, + tokenizedData: { + ...record?.tokens, + }, + })); + resolve(new QueryResponse({ fields: processedRecords, errors: [] })); + }) + .catch(error => { + reject(error); + }); + } catch (error) { + if (error instanceof Error) + printLog(removeSDKVersion(error.message), MessageType.ERROR, this.client.getLogLevel()); + reject(error); + } + }); + } + + detokenize(request: DetokenizeRequest, options?: DetokenizeOptions): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.DETOKENIZE_TRIGGERED, MessageType.LOG, this.client.getLogLevel()); + printLog(logs.infoLogs.VALIDATE_DETOKENIZE_INPUT, MessageType.LOG, this.client.getLogLevel()); + + //validations checks + validateDetokenizeRequest(request, options, this.client.getLogLevel()); + + const fields = request.tokens.map(record => ({ token: record, redaction: request?.redactionType || RedactionType.PLAIN_TEXT })) as Array; + const detokenizePayload: V1DetokenizePayload = { detokenizationParameters: fields, continueOnError: options?.getContinueOnError(), downloadURL: options?.getDownloadURL() }; + + this.handleRequest( + (headers: RawAxiosRequestConfig | undefined) => this.client.tokensAPI.recordServiceDetokenize(this.client.vaultId, detokenizePayload, headers), + TYPES.DETOKENIZE + ).then(records => { + printLog(logs.infoLogs.DETOKENIZE_SUCCESS, MessageType.LOG, this.client.getLogLevel()); + const parsedResponse: ParsedDetokenizeResponse = this.parseDetokenizeResponse(records); + resolve(new DetokenizeResponse({ detokenizedFields: parsedResponse.success, errors: parsedResponse.errors })); + }) + .catch(error => { + reject(error); + }); + } catch (error) { + if (error instanceof Error) + printLog(removeSDKVersion(error.message), MessageType.ERROR, this.client.getLogLevel()); + reject(error); + } + }); + } + + tokenize(request: TokenizeRequest): Promise { + return new Promise((resolve, reject) => { + try { + printLog(logs.infoLogs.TOKENIZE_TRIGGERED, MessageType.LOG, this.client.getLogLevel()); + printLog(logs.infoLogs.VALIDATE_TOKENIZE_INPUT, MessageType.LOG, this.client.getLogLevel()); + + //validation checks + validateTokenizeRequest(request, this.client.getLogLevel()); + + const fields = request.values.map((record: TokenizeRequestType) => ({ value: record.value, columnGroup: record.columnGroup })) as Array; + const tokenizePayload: V1TokenizePayload = { tokenizationParameters: fields }; + + this.handleRequest( + () => this.client.tokensAPI.recordServiceTokenize(this.client.vaultId, tokenizePayload), + TYPES.TOKENIZE + ).then(records => { + printLog(logs.infoLogs.TOKENIZE_SUCCESS, MessageType.LOG, this.client.getLogLevel()); + resolve(new TokenizeResponse({ tokens: records, errors: [] })) + }) + .catch(error => { + reject(error); + }); + } catch (error) { + if (error instanceof Error) + printLog(removeSDKVersion(error.message), MessageType.ERROR, this.client.getLogLevel()); + reject(error); + } + }); + } + + connection() { + // cache detect object if created + // return detect object using static func + } + + lookUpBin() { + // cache binlookup object if created + // return binlookup object using static func + } + + audit() { + // cache audit object if created + // return audit object using static func + } + + detect() { + // cache detect object if created + // return detect object using static func + } +} + +export default VaultController; \ No newline at end of file diff --git a/src/vault/model/options/detokenize/index.ts b/src/vault/model/options/detokenize/index.ts new file mode 100644 index 0000000..ed97b97 --- /dev/null +++ b/src/vault/model/options/detokenize/index.ts @@ -0,0 +1,30 @@ + +class DetokenizeOptions { + // Fields with default values + private continueOnError?: boolean; + private downloadURL?: boolean; + + // Constructor + constructor() { } + + // Setters + setContinueOnError(continueOnError: boolean) { + this.continueOnError = continueOnError; + } + + setDownloadURL(downloadURL: boolean) { + this.downloadURL = downloadURL; + } + + // Getters + getContinueOnError(): boolean | undefined { + return this.continueOnError; + } + + getDownloadURL(): boolean | undefined { + return this.downloadURL; + } +} + + +export default DetokenizeOptions; \ No newline at end of file diff --git a/src/vault/model/options/get/index.ts b/src/vault/model/options/get/index.ts new file mode 100644 index 0000000..bd8a5fc --- /dev/null +++ b/src/vault/model/options/get/index.ts @@ -0,0 +1,94 @@ +// Imports +import { OrderByEnum, RedactionType } from "../../../../utils"; + +class GetOptions { + // Fields + private redactionType?: RedactionType; + private returnTokens?: boolean; + private fields?: Array; + private offset?: string; + private limit?: string; + private downloadURL?: boolean; + private columnName?: string; + private columnValues?: Array; + private orderBy?: OrderByEnum; + + // Constructor + constructor() {} + + // Setters + setRedactionType(redactionType: RedactionType) { + this.redactionType = redactionType; + } + + setReturnTokens(returnTokens: boolean) { + this.returnTokens = returnTokens; + } + + setFields(fields: Array) { + this.fields = fields; + } + + setOffset(offset: string) { + this.offset = offset; + } + + setLimit(limit: string) { + this.limit = limit; + } + + setDownloadURL(downloadURL: boolean) { + this.downloadURL = downloadURL; + } + + setColumnName(columnName: string) { + this.columnName = columnName; + } + + setColumnValues(columnValues: Array) { + this.columnValues = columnValues; + } + + setOrderBy(orderBy: OrderByEnum) { + this.orderBy = orderBy; + } + + // Getters + getRedactionType(): RedactionType | undefined { + return this.redactionType; + } + + getReturnTokens(): boolean | undefined { + return this.returnTokens; + } + + getFields(): Array | undefined { + return this.fields; + } + + getOffset(): string | undefined { + return this.offset; + } + + getLimit(): string | undefined { + return this.limit; + } + + getDownloadURL(): boolean | undefined { + return this.downloadURL; + } + + getColumnName(): string | undefined { + return this.columnName; + } + + getColumnValues(): Array | undefined { + return this.columnValues; + } + + getOrderBy(): OrderByEnum | undefined { + return this.orderBy; + } +} + +export default GetOptions; diff --git a/src/vault/model/options/insert/index.ts b/src/vault/model/options/insert/index.ts new file mode 100644 index 0000000..14703bc --- /dev/null +++ b/src/vault/model/options/insert/index.ts @@ -0,0 +1,67 @@ +import { TokenMode } from "../../../../utils"; + +//imports +class InsertOptions { + // Fields + private returnTokens?: boolean; + private upsert?: string; + private tokens?: Array; + private homogeneous?: boolean; + private tokenMode?: TokenMode; + private continueOnError?: boolean; + + // Constructor + constructor() { } + + // Setters + setReturnTokens(returnTokens: boolean) { + this.returnTokens = returnTokens; + } + + setUpsertColumn(upsert: string) { + this.upsert = upsert; + } + + setTokens(tokens: Array) { + this.tokens = tokens; + } + + setHomogeneous(homogeneous: boolean) { + this.homogeneous = homogeneous; + } + + setTokenMode(tokenMode: TokenMode) { + this.tokenMode = tokenMode; + } + + setContinueOnError(continueOnError: boolean) { + this.continueOnError = continueOnError; + } + + // Getters + getReturnTokens(): boolean | undefined { + return this.returnTokens; + } + + getUpsertColumn(): string | undefined { + return this.upsert; + } + + getTokens(): Array | undefined { + return this.tokens; + } + + getHomogeneous(): boolean | undefined { + return this.homogeneous; + } + + getTokenMode(): TokenMode | undefined { + return this.tokenMode; + } + + getContinueOnError(): boolean | undefined { + return this.continueOnError; + } +} + +export default InsertOptions; diff --git a/src/vault/model/options/update/index.ts b/src/vault/model/options/update/index.ts new file mode 100644 index 0000000..3485321 --- /dev/null +++ b/src/vault/model/options/update/index.ts @@ -0,0 +1,41 @@ +//imports +import { TokenMode } from "../../../../utils"; + +class UpdateOptions { + + //fields + private returnTokens?: boolean; + private tokenMode?: TokenMode; + private tokens?: object; + + // Constructor + constructor() { + } + + setReturnTokens(returnTokens: boolean) { + this.returnTokens = returnTokens; + } + + setTokens(tokens: object) { + this.tokens = tokens; + } + + setTokenMode(tokenMode: TokenMode) { + this.tokenMode = tokenMode; + } + + getTokenMode(): TokenMode | undefined { + return this.tokenMode; + } + + getTokens(): object | undefined { + return this.tokens; + } + + getReturnTokens(): boolean | undefined { + return this.returnTokens; + } + +} + +export default UpdateOptions; diff --git a/src/vault/model/request/delete/index.ts b/src/vault/model/request/delete/index.ts new file mode 100644 index 0000000..aaec334 --- /dev/null +++ b/src/vault/model/request/delete/index.ts @@ -0,0 +1,36 @@ +//imports + +class DeleteRequest { + //fields + private _tableName: string; + private _ids: Array; + + // Constructor + constructor(tableName: string, deleteIds: Array) { + this._tableName = tableName; + this._ids = deleteIds; + } + + // Getter for tableName + public get tableName(): string { + return this._tableName; + } + + // Setter for tableName + public set tableName(value: string) { + this._tableName = value; + } + + // Getter for deleteData + public get ids(): Array { + return this._ids; + } + + // Setter for deleteData + public set ids(value: Array) { + this._ids = value; + } + +} + +export default DeleteRequest; diff --git a/src/vault/model/request/detokenize/index.ts b/src/vault/model/request/detokenize/index.ts new file mode 100644 index 0000000..5388444 --- /dev/null +++ b/src/vault/model/request/detokenize/index.ts @@ -0,0 +1,39 @@ +//imports + +import { RedactionType } from "../../../../utils"; + +class DetokenizeRequest { + + //fields + private _tokens: Array; + private _redactionType?: RedactionType; + + // Constructor + constructor(tokens: Array, redactionType?: RedactionType) { + this._tokens = tokens; + this._redactionType = redactionType; + } + + // Getter for redactionType + public get redactionType(): RedactionType | undefined { + return this._redactionType; + } + + // Setter for redactionType + public set redactionType(value: RedactionType) { + this._redactionType = value; + } + + // Getter for tokens + public get tokens(): Array { + return this._tokens; + } + + // Setter for tokens + public set tokens(value: Array) { + this._tokens = value; + } + +} + +export default DetokenizeRequest; diff --git a/src/vault/model/request/file-upload/index.ts b/src/vault/model/request/file-upload/index.ts new file mode 100644 index 0000000..38a4e12 --- /dev/null +++ b/src/vault/model/request/file-upload/index.ts @@ -0,0 +1,60 @@ +//imports + +class FileUploadRequest { + + //fields + private _tableName: string; + private _skyflowId: string; + private _columnName: string; + private _filePath: string; + + // Constructor + constructor(tableName: string, skyflowId: string, columnName: string, filePath: string) { + this._tableName = tableName; + this._skyflowId = skyflowId; + this._columnName = columnName; + this._filePath = filePath; + } + + // Getter for tableName + public get tableName(): string { + return this._tableName; + } + + // Setter for tableName + public set tableName(value: string) { + this._tableName = value; + } + + // Getter for skyflowId + public get skyflowId(): string { + return this._skyflowId; + } + + // Setter for skyflowId + public set skyflowId(value: string) { + this._skyflowId = value; + } + + // Getter for columnName + public get columnName(): string { + return this._columnName; + } + + // Setter for columnName + public set columnName(value: string) { + this._columnName = value; + } + + // Getter for filePath + public get filePath(): string { + return this._filePath; + } + + // Setter for filePath + public set filePath(value: string) { + this._filePath = value; + } +} + +export default FileUploadRequest; diff --git a/src/vault/model/request/get-column/index.ts b/src/vault/model/request/get-column/index.ts new file mode 100644 index 0000000..10ba453 --- /dev/null +++ b/src/vault/model/request/get-column/index.ts @@ -0,0 +1,48 @@ +//imports + +class GetColumnRequest { + + //fields + private _tableName: string; + private _columnName: string; + private _columnValues: Array; + + // Constructor + constructor(tableName: string, _columnName: string, _columnValues: Array) { + this._tableName = tableName; + this._columnName = _columnName; + this._columnValues = _columnValues; + } + + // Getter for tableName + public get tableName(): string { + return this._tableName; + } + + // Setter for tableName + public set tableName(value: string) { + this._tableName = value; + } + + // Getter for columnName + public get columnName(): string { + return this._columnName; + } + + // Setter for columnName + public set columnName(value: string) { + this._columnName = value; + } + + // Getter for columnValues + public get columnValues(): Array { + return this._columnValues; + } + + // Setter for columnValues + public set columnValues(value: Array) { + this._columnValues = value; + } +} + +export default GetColumnRequest; diff --git a/src/vault/model/request/get/index.ts b/src/vault/model/request/get/index.ts new file mode 100644 index 0000000..f830fcf --- /dev/null +++ b/src/vault/model/request/get/index.ts @@ -0,0 +1,39 @@ +//imports + +import { RedactionType } from "../../../../utils"; + +class GetRequest { + + //fields + private _tableName: string; + private _ids: Array; + + // Constructor + constructor(tableName: string, _ids: Array) { + this._tableName = tableName; + this._ids = _ids; + } + + // Getter for tableName + public get tableName(): string { + return this._tableName; + } + + // Setter for tableName + public set tableName(value: string) { + this._tableName = value; + } + + // Getter for ids + public get ids(): Array { + return this._ids; + } + + // Setter for ids + public set ids(value: Array) { + this._ids = value; + } + +} + +export default GetRequest; diff --git a/src/vault/model/request/inkove/index.ts b/src/vault/model/request/inkove/index.ts new file mode 100644 index 0000000..d063bb9 --- /dev/null +++ b/src/vault/model/request/inkove/index.ts @@ -0,0 +1,25 @@ +//imports +import { RequestMethod } from "../../../../utils"; +import { StringKeyValueMapType } from "../../../types"; + +class InvokeConnectionRequest { + //fields + method: RequestMethod; + queryParams?: StringKeyValueMapType; + pathParams?: StringKeyValueMapType; + body?: StringKeyValueMapType; + headers?: StringKeyValueMapType; + + constructor(method: RequestMethod, body?: StringKeyValueMapType, headers?: StringKeyValueMapType, pathParams?: StringKeyValueMapType, queryParams?: StringKeyValueMapType) { + this.method = method; + this.pathParams = pathParams; + this.queryParams = queryParams; + this.body = body; + this.headers = headers; + } + + //getters and setters + +} + +export default InvokeConnectionRequest; diff --git a/src/vault/model/request/insert/index.ts b/src/vault/model/request/insert/index.ts new file mode 100644 index 0000000..a97c46f --- /dev/null +++ b/src/vault/model/request/insert/index.ts @@ -0,0 +1,37 @@ +//imports + +class InsertRequest { + + //fields + private _tableName: string; + private _data: object[]; + + // Constructor + constructor(tableName: string, data: object[]) { + this._tableName = tableName; + this._data = data; + } + + // Getter for tableName + public get tableName(): string { + return this._tableName; + } + + // Setter for tableName + public set tableName(value: string) { + this._tableName = value; + } + + // Getter for _data + public get data(): object[] { + return this._data; + } + + // Setter for _data + public set data(data: object[]) { + this._data = data; + } + +} + +export default InsertRequest; diff --git a/src/vault/model/request/query/index.ts b/src/vault/model/request/query/index.ts new file mode 100644 index 0000000..1fe3da9 --- /dev/null +++ b/src/vault/model/request/query/index.ts @@ -0,0 +1,20 @@ + +class QueryRequest { + private _query: string; + + constructor(query: string) { + this._query = query; + } + + // Getter for query + public get query(): string { + return this._query; + } + + // Setter for query + public set query(value: string) { + this._query = value; + } +} + +export default QueryRequest; \ No newline at end of file diff --git a/src/vault/model/request/tokenize/index.ts b/src/vault/model/request/tokenize/index.ts new file mode 100644 index 0000000..f7ef067 --- /dev/null +++ b/src/vault/model/request/tokenize/index.ts @@ -0,0 +1,27 @@ +//imports + +import { TokenizeRequestType } from "../../../types"; + +class TokenizeRequest { + + //fields + private _values: Array; + + // Constructor + constructor(values: Array) { + this._values = values; + } + + // Getter for _values + public get values(): Array { + return this._values; + } + + // Setter for _values + public set values(value: Array) { + this._values = value; + } + +} + +export default TokenizeRequest; diff --git a/src/vault/model/request/update/index.ts b/src/vault/model/request/update/index.ts new file mode 100644 index 0000000..3cf82cf --- /dev/null +++ b/src/vault/model/request/update/index.ts @@ -0,0 +1,37 @@ +//imports + +class UpdateRequest { + + //fields + private _tableName: string; + private _data: object; + + // Constructor + constructor(tableName: string, data: object) { + this._tableName = tableName; + this._data = data; + } + + // Getter for tableName + public get tableName(): string { + return this._tableName; + } + + // Setter for tableName + public set tableName(value: string) { + this._tableName = value; + } + + // Getter for updateData + public get data(): object { + return this._data; + } + + // Setter for updateData + public set data(value: object) { + this._data = value; + } + +} + +export default UpdateRequest; diff --git a/src/vault/model/response/delete/index.ts b/src/vault/model/response/delete/index.ts new file mode 100644 index 0000000..b42fd70 --- /dev/null +++ b/src/vault/model/response/delete/index.ts @@ -0,0 +1,20 @@ +//imports + +class DeleteResponse { + + //fields + + deletedIds?: Array; + + errors?: Object; + + constructor({ deletedIds, errors }: { deletedIds?: Array, errors?: object }) { + this.deletedIds = deletedIds; + this.errors = errors; + } + + //getters and setters + +} + +export default DeleteResponse; diff --git a/src/vault/model/response/detokenize/index.ts b/src/vault/model/response/detokenize/index.ts new file mode 100644 index 0000000..6c2f879 --- /dev/null +++ b/src/vault/model/response/detokenize/index.ts @@ -0,0 +1,21 @@ +//imports + +import { ErrorDetokenizeResponse, SuccessDetokenizeResponse } from "../../../types"; + +class DetokenizeResponse { + + //fields + detokenizedFields?: Array; + + errors?: Array; + + constructor({ detokenizedFields, errors }: { detokenizedFields?: Array, errors?: Array }) { + this.detokenizedFields = detokenizedFields; + this.errors = errors; + } + + //getters and setters + +} + +export default DetokenizeResponse; diff --git a/src/vault/model/response/file-upload/index.ts b/src/vault/model/response/file-upload/index.ts new file mode 100644 index 0000000..ba0bfd0 --- /dev/null +++ b/src/vault/model/response/file-upload/index.ts @@ -0,0 +1,19 @@ +//imports + +class FileUploadResponse { + + //fields + skyflowId?: string; + + errors?: Object; + + constructor({ skyflowId, errors }: { skyflowId?: string, errors?: object }) { + this.skyflowId = skyflowId; + this.errors = errors; + } + + //getters and setters + +} + +export default FileUploadResponse; diff --git a/src/vault/model/response/get/index.ts b/src/vault/model/response/get/index.ts new file mode 100644 index 0000000..e0778f6 --- /dev/null +++ b/src/vault/model/response/get/index.ts @@ -0,0 +1,21 @@ +//imports + +import { insertResponseType } from "../../../types"; + +class GetResponse { + + //fields + data?: Array; + + errors?: object; + + constructor({ data, errors }: { data?: Array, errors?: object }) { + this.data = data; + this.errors = errors; + } + + //getters and setters + +} + +export default GetResponse; diff --git a/src/vault/model/response/insert/index.ts b/src/vault/model/response/insert/index.ts new file mode 100644 index 0000000..8b37106 --- /dev/null +++ b/src/vault/model/response/insert/index.ts @@ -0,0 +1,20 @@ +//imports +import { insertResponseType } from "../../../types"; + +class InsertResponse { + + //fields + insertedFields: Array; + + errors?: object; + + constructor({ insertedFields, errors }: { insertedFields: Array, errors?: object }) { + this.insertedFields = insertedFields; + this.errors = errors; + } + + //getters and setters + +} + +export default InsertResponse; diff --git a/src/vault/model/response/invoke/invoke.ts b/src/vault/model/response/invoke/invoke.ts new file mode 100644 index 0000000..a09cfbf --- /dev/null +++ b/src/vault/model/response/invoke/invoke.ts @@ -0,0 +1,23 @@ +//imports + +import { queryResponseType } from "../../../types"; + +class InvokeConnectionResponse { + //fields + data?: Object; + + metadata?: Object; + + errors?: Object; + + constructor({ data, metadata, errors }: { data?: object, metadata?: Object, errors?: object }) { + this.data = data; + this.metadata = metadata; + this.errors = errors; + } + + //getters and setters + +} + +export default InvokeConnectionResponse; diff --git a/src/vault/model/response/query/index.ts b/src/vault/model/response/query/index.ts new file mode 100644 index 0000000..cb8ac5b --- /dev/null +++ b/src/vault/model/response/query/index.ts @@ -0,0 +1,21 @@ +//imports + +import { queryResponseType } from "../../../types"; + +class QueryResponse { + + //fields + fields?: Array; + + errors?: Object; + + constructor( { fields, errors }: { fields?: Array, errors?: object }) { + this.fields = fields; + this.errors = errors; + } + + //getters and setters + +} + +export default QueryResponse; diff --git a/src/vault/model/response/tokenize/index.ts b/src/vault/model/response/tokenize/index.ts new file mode 100644 index 0000000..8f24006 --- /dev/null +++ b/src/vault/model/response/tokenize/index.ts @@ -0,0 +1,19 @@ +//imports + +class TokenizeResponse { + + //fields + tokens?: Array; + + errors?: Object; + + constructor({ tokens, errors }: { tokens?: Array, errors?: object }) { + this.tokens = tokens; + this.errors = errors; + } + + //getters and setters + +} + +export default TokenizeResponse; diff --git a/src/vault/model/response/update/index.ts b/src/vault/model/response/update/index.ts new file mode 100644 index 0000000..32d7a96 --- /dev/null +++ b/src/vault/model/response/update/index.ts @@ -0,0 +1,21 @@ +//imports + +import { insertResponseType } from "../../../types"; + +class UpdateResponse { + + //fields + updatedField?: Array; + + errors?: object; + + constructor({ updatedField, errors }: { updatedField?: Array, errors?: object }) { + this.updatedField = updatedField; + this.errors = errors; + } + + //getters and setters + +} + +export default UpdateResponse; diff --git a/src/vault/skyflow/index.ts b/src/vault/skyflow/index.ts new file mode 100644 index 0000000..eb37ac4 --- /dev/null +++ b/src/vault/skyflow/index.ts @@ -0,0 +1,237 @@ +import { CONNECTION_ID, CREDENTIALS, Env, getVaultURL, ISkyflowError, LOGLEVEL, LogLevel, MessageType, parameterizedString, printLog, VAULT_ID } from "../../utils"; +import ConnectionConfig from "../config/connection"; +import VaultConfig from "../config/vault"; +import { SkyflowConfig, ClientObj } from "../types"; +import VaultController from "../controller/vault"; +import ConnectionController from "../controller/connections"; +import VaultClient from "../client"; +import Credentials from "../config/credentials"; +import SkyflowError from "../../error"; +import logs from "../../utils/logs"; +import { isLogLevel, validateConnectionConfig, validateSkyflowConfig, validateSkyflowCredentials, validateUpdateConnectionConfig, validateUpdateVaultConfig, validateVaultConfig } from "../../utils/validations"; +import SKYFLOW_ERROR_CODE from "../../error/codes"; + +class Skyflow { + + private vaultClients: ClientObj = {}; + + private connectionClients: ClientObj = {}; + + private commonCredentials?: Credentials; + + private logLevel: LogLevel = LogLevel.ERROR; + + constructor(config: SkyflowConfig) { + validateSkyflowConfig(config, this.logLevel); + printLog(logs.infoLogs.INITIALIZE_CLIENT, MessageType.LOG, this.logLevel); + if (config?.logLevel && !isLogLevel(config?.logLevel)) + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_LOG_LEVEL); + + this.logLevel = config.logLevel || LogLevel.ERROR; + printLog(parameterizedString(logs.infoLogs.CURRENT_LOG_LEVEL,[this.logLevel]), MessageType.LOG, this.logLevel); + + if (config?.skyflowCredentials) + validateSkyflowCredentials(config.skyflowCredentials) + + this.commonCredentials = config?.skyflowCredentials; + printLog(logs.infoLogs.VALIDATING_VAULT_CONFIG, MessageType.LOG, this.logLevel); + config.vaultConfigs.map(vaultConfig => { + this.addVaultConfig(vaultConfig); + }); + printLog(logs.infoLogs.VALIDATING_CONNECTION_CONFIG, MessageType.LOG, this.logLevel); + config.connectionConfigs?.map(connectionConfig => { + this.addConnectionConfig(connectionConfig); + }); + printLog(logs.infoLogs.CLIENT_INITIALIZED, MessageType.LOG, this.logLevel); + } + + private addVaultClient(config: VaultConfig, clients: ClientObj) { + const env = config.env || Env.PROD; + const vaultUrl = getVaultURL(config.clusterId, env); + const client = new VaultClient(vaultUrl, config.vaultId, config?.credentials, this.commonCredentials, this.logLevel); + const controller = new VaultController(client); + printLog(parameterizedString(logs.infoLogs.VAULT_CONTROLLER_INITIALIZED, [config.vaultId]), MessageType.LOG, this.logLevel); + clients[config.vaultId] = { config, client, controller }; + } + + private addConnectionClient(config: ConnectionConfig, clients: ClientObj) { + const client = new VaultClient(config.connectionUrl, '', config?.credentials, this.commonCredentials, this.logLevel); + const controller = new ConnectionController(client); + printLog(parameterizedString(logs.infoLogs.CONNECTION_CONTROLLER_INITIALIZED, [config.connectionId]), MessageType.LOG, this.logLevel); + clients[config.connectionId] = { config, client, controller }; + } + + addVaultConfig(config: VaultConfig) { + validateVaultConfig(config, this.logLevel); + this.throwErrorIfIdExits(config?.vaultId, this.vaultClients, VAULT_ID); + this.addVaultClient(config, this.vaultClients); + } + + addConnectionConfig(config: ConnectionConfig) { + validateConnectionConfig(config, this.logLevel); + this.throwErrorIfIdExits(config?.connectionId, this.connectionClients, CONNECTION_ID); + this.addConnectionClient(config, this.connectionClients); + } + + private updateVaultClient(config: VaultConfig, clients: ClientObj, idKey: string) { + const existingClient = clients[config[idKey]]; + if (existingClient) { + const updatedConfig = { ...existingClient.config, ...config }; + const vaultUrl = getVaultURL(updatedConfig.clusterId, updatedConfig.env || Env.PROD); + existingClient.config = updatedConfig; + existingClient.client.updateClientConfig(vaultUrl, updatedConfig.vaultId, updatedConfig.credentials, this.commonCredentials, this.logLevel); + } else { + this.throwErrorForUnknownId(config[idKey], idKey) + } + } + + private updateConnectionClient(config: ConnectionConfig, clients: ClientObj, idKey: string) { + const existingClient = clients[config[idKey]]; + if (existingClient) { + const updatedConfig = { ...existingClient.config, ...config }; + existingClient.config = updatedConfig; + existingClient.client.updateClientConfig(updatedConfig.connectionUrl, '', updatedConfig.credentials, this.commonCredentials, this.logLevel); + } else { + this.throwErrorForUnknownId(config[idKey], idKey) + } + } + + updateVaultConfig(config: VaultConfig) { + validateUpdateVaultConfig(config, this.logLevel); + this.updateVaultClient(config, this.vaultClients, VAULT_ID); + } + + updateConnectionConfig(config: ConnectionConfig) { + validateUpdateConnectionConfig(config, this.logLevel); + this.updateConnectionClient(config, this.connectionClients, CONNECTION_ID); + } + + getVaultConfig(vaultId: string) { + return this.getConfig(vaultId, this.vaultClients, VAULT_ID); + } + + removeVaultConfig(vaultId: string) { + this.removeConfig(vaultId, this.vaultClients, VAULT_ID); + } + + getConnectionConfig(connectionId: string) { + return this.getConfig(connectionId, this.connectionClients, CONNECTION_ID); + } + + removeConnectionConfig(connectionId: string) { + this.removeConfig(connectionId, this.connectionClients, CONNECTION_ID); + } + + private throwSkyflowError(idKey: string, errorMapping: { [key: string]: ISkyflowError }, params?: string[]) { + const errorCode = errorMapping[idKey]; + if (errorCode) { + throw new SkyflowError(errorCode, params); + } + } + + private throwErrorIfIdExits(id: string, clients: ClientObj, idKey: string) { + const errorMapping = { + [VAULT_ID]: SKYFLOW_ERROR_CODE.VAULT_ID_EXITS_IN_CONFIG_LIST, + [CONNECTION_ID]: SKYFLOW_ERROR_CODE.CONNECTION_ID_EXITS_IN_CONFIG_LIST, + }; + if(Object.keys(clients).includes(id)){ + printLog(parameterizedString(logs.infoLogs[`${idKey}_CONFIG_EXISTS`], [id]), MessageType.ERROR, this.logLevel); + this.throwSkyflowError(idKey, errorMapping, [id]); + } + } + + private throwErrorForUnknownId(id: string, idKey: string) { + const errorMapping = { + [VAULT_ID]: SKYFLOW_ERROR_CODE.VAULT_ID_NOT_IN_CONFIG_LIST, + [CONNECTION_ID]: SKYFLOW_ERROR_CODE.CONNECTION_ID_NOT_IN_CONFIG_LIST, + }; + printLog(parameterizedString(logs.infoLogs[`${idKey}_CONFIG_DOES_NOT_EXIST`], [id]), MessageType.ERROR, this.logLevel); + this.throwSkyflowError(idKey, errorMapping, [id]); + } + + private throwErrorForEmptyClients(idKey: string) { + const errorMapping = { + [VAULT_ID]: SKYFLOW_ERROR_CODE.EMPTY_VAULT_CLIENTS, + [CONNECTION_ID]: SKYFLOW_ERROR_CODE.EMPTY_CONNECTION_CLIENTS, + }; + this.throwSkyflowError(idKey, errorMapping); + } + + private throwErrorForEmptyId(idKey: string) { + const errorMapping = { + [VAULT_ID]: SKYFLOW_ERROR_CODE.EMPTY_VAULT_ID_VALIDATION, + [CONNECTION_ID]: SKYFLOW_ERROR_CODE.EMPTY_CONNECTION_ID_VALIDATION, + }; + this.throwSkyflowError(idKey, errorMapping); + } + + private removeConfig(id: string, clients: ClientObj, idKey: string) { + if (!clients[id]) this.throwErrorForUnknownId(id, idKey); + delete clients[id]; + } + + private getConfig(id: string, clients: ClientObj, idKey: string) { + if(!id) this.throwErrorForEmptyId(idKey); + if (!clients[id]) this.throwErrorForUnknownId(id, idKey); + return clients[id].config; + } + + updateLogLevel(logLevel: LogLevel) { + if (logLevel && !isLogLevel(logLevel)) { + throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_LOG_LEVEL); + } + this.logLevel = logLevel; + this.updateClients(LOGLEVEL); + } + + getLogLevel() { + return this.logLevel; + } + + updateSkyflowCredentials(credentials: Credentials) { + if (!credentials) + throw new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_CREDENTIALS); + validateSkyflowCredentials(credentials); + this.commonCredentials = credentials; + this.updateClients(CREDENTIALS); + } + + getSkyflowCredentials() { + return this.commonCredentials; + } + + vault(vaultId?: string) { + return this.getClient(vaultId, this.vaultClients, VAULT_ID) as VaultController; + } + + connection(connectionId?: string) { + return this.getClient(connectionId, this.connectionClients, CONNECTION_ID) as ConnectionController; + } + + private getClient(id: string | undefined, clients: ClientObj, idKey: string) { + if(Object.keys(clients).length === 0) this.throwErrorForEmptyClients(idKey) + const clientId = id || Object.keys(clients)[0]; + if (clientId && clients[clientId]?.controller) { + return clients[clientId].controller; + } + if (clientId) this.throwErrorForUnknownId(clientId, idKey) + } + + private updateClients(updateType: string) { + this.updateClient(updateType, this.vaultClients); + this.updateClient(updateType, this.connectionClients); + } + + private updateClient(updateType: string, list: ClientObj) { + Object.values(list).forEach(clientConfig => { + if (updateType === LOGLEVEL) { + clientConfig.client.updateLogLevel(this.logLevel); + } else if (updateType === CREDENTIALS) { + clientConfig.client.updateSkyflowCredentials(this.commonCredentials); + } + }); + } + +} + +export default Skyflow; diff --git a/src/vault/types/index.ts b/src/vault/types/index.ts new file mode 100644 index 0000000..2efe1d8 --- /dev/null +++ b/src/vault/types/index.ts @@ -0,0 +1,69 @@ +import { LogLevel } from "../../utils"; +import ConnectionConfig from "../config/connection"; +import VaultConfig from "../config/vault" +import Credentials from "../config/credentials"; +import VaultController from "../controller/vault"; +import ConnectionController from "../controller/connections"; +import VaultClient from "../client"; + +export interface SkyflowConfig { + vaultConfigs: VaultConfig[]; + connectionConfigs?: ConnectionConfig[]; + skyflowCredentials?: Credentials; + logLevel?: LogLevel; +} + +export interface ClientConfig { + config: VaultConfig | ConnectionConfig; + controller: VaultController | ConnectionController; + client: VaultClient; +} + +export interface ClientObj { + [vaultId: string]: ClientConfig; +} + +export interface insertResponseType { + skyflowId: string; + [key: string]: string; +} + +export interface queryResponseType { + skyflowId: string; + tokenizedData: insertResponseType; + [key: string]: string | insertResponseType; +} + +export interface StringKeyValueMapType { + [key: string]: object | string; +} + +export interface TokenizeRequestType { + columnGroup: string; + value: string; +} +export interface SuccessDetokenizeResponse { + token: string; + value: string; + type: string; +} + +export interface ErrorDetokenizeResponse { + token: string; + error: string; +} + +export interface ParsedDetokenizeResponse { + success: SuccessDetokenizeResponse[]; + errors: ErrorDetokenizeResponse[]; +} + +export interface ErrorInsertBatchResponse { + requestIndex: number; + error: string; +} + +export interface ParsedInsertBatchResponse { + success: insertResponseType[]; + errors: ErrorInsertBatchResponse[]; +} \ No newline at end of file diff --git a/test/GenerateToken.test.js b/test/GenerateToken.test.js deleted file mode 100644 index c96bfdb..0000000 --- a/test/GenerateToken.test.js +++ /dev/null @@ -1,364 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import { - generateBearerToken, generateBearerTokenFromCreds, generateToken, getToken, __testing, getRolesForScopedToken, - generateSignedDataTokens, generateSignedDataTokensFromCreds -} from "../src/service-account/util/Token"; -import { errorMessages } from "../src/service-account/errors/Messages"; -import { setLogLevel } from "../src/vault-api/Logging"; -import { LogLevel } from "../src/vault-api/utils/common"; -import SkyflowError from "../src/vault-api/libs/SkyflowError"; - -describe("fileValidityTest", () => { - setLogLevel(LogLevel.WARN) - test("invalidJSON", async () => { - try { - const res = await generateToken("test/demo-credentials/invalidJson.json") - } catch (err) { - expect(err).toBeDefined(); - } - }); - test("empty json", async () => { - try { - const res = await generateToken("test/demo-credentials/empty.json") - } catch (err) { - expect(err).toBeDefined(); - } - }); - test("no client id", async () => { - try { - const res = await generateToken("test/demo-credentials/noClientId.json") - } catch (err) { - expect(err).toBeDefined(); - } - }); - test("no key id", async () => { - try { - const res = await generateToken("test/demo-credentials/noKeyId.json") - } catch (err) { - expect(err).toBeDefined(); - } - }); - test("no private key", async () => { - try { - const res = await generateBearerToken("test/demo-credentials/noPrivateKey.json") - } catch (err) { - expect(err).toBeDefined(); - } - }); - test("no token uri key", async () => { - try { - const res = await generateToken("test/demo-credentials/noTokenURI.json") - } catch (err) { - expect(err).toBeDefined(); - } - }); - test("generateBearerTokenFromCreds test", async () => { - try { - const res = await generateBearerTokenFromCreds("{}") - } catch (err) { - expect(err).toBeDefined(); - } - }); - - test("File does not exist", async () => { - try { - await generateBearerToken('invalid-file-path.json') - } catch (err) { - expect(err).toBeDefined(); - } - }) - - test("Get token with non-string credentials", async () => { - try { - await getToken({ credentials: "non-string" }) - } catch (err) { - expect(err).toBeDefined(); - } - }) - - test("Success response processing", async () => { - const success = await __testing.successResponse({ - data: { - accessToken: "access token", - tokenType: "Bearer" - } - }) - - expect(success).toBeDefined(); - }) - - test("failure response processing JSON", async () => { - const error = { - response: { - headers: { - 'x-request-id': 'RID', - 'content-type': 'application/json' - }, - data: { - error: { - message: "Internal Server Error" - } - } - } - } - - - try { - const failure = await __testing.failureResponse(error) - } catch (err) { - expect(err).toBeDefined(); - } - }); - - test("failure response processing Plain text", async () => { - const error = { - response: { - headers: { - 'x-request-id': 'RID', - 'content-type': 'text/plain' - }, - data: { - error: { - message: "Internal Server Error" - } - } - } - } - try { - const failure = await __testing.failureResponse(error) - } catch (err) { - expect(err).toBeDefined(); - } - }); -}); -test("failure response processing Unknown format", async () => { - const error = { - response: { - headers: { - 'x-request-id': 'RID', - 'content-type': 'invalid-type' - }, - data: { - error: { - message: "Internal Server Error" - } - } - } - } - - - try { - const failure = await __testing.failureResponse(error) - } catch (err) { - expect(err).toBeDefined(); - } -}); - -describe('context and scoped token options test', () => { - - const creds_without_context = process.env.SA_WITHOUT_CONTEXT - - const credentials = { - clientID: "test-client-id", - keyID: "test-key-id", - tokenURI: "https://test-token-uri.com", - privateKey: null, - data: "no-data", - }; - - test("empty roleID array passed to generate scoped token", async () => { - const expectedError = new SkyflowError({ - code: 400, - description: errorMessages.ScopedRolesEmpty, - }); - - const options = { - roleIDs: [], - }; - try { - await generateBearerTokenFromCreds(credentials, options); - } catch (err) { - expect(err.description).toBe(expectedError.description); - } - }); - test("invlaid type passed to generate scoped token", async () => { - const expectedError = new SkyflowError({ - code: 400, - description: errorMessages.ExpectedRoleIDParameter, - }); - const options = { - roleIDs: true, - }; - try { - await generateBearerTokenFromCreds(credentials, options); - } catch (err) { - expect(err.description).toBe(expectedError.description); - } - }); - - test('empty roleID array passed to generate scoped token', async () => { - const options = { - roleIDs: [] - } - try { - await generateBearerTokenFromCreds(creds_without_context, options) - - } catch (err) { - expect(err.message).toBe(errorMessages.ScopedRolesEmpty) - } - }) - test('invlaid type passed to generate scoped token', async () => { - const options = { - roleIDs: true - } - try { - await generateBearerTokenFromCreds(creds_without_context, options) - - } catch (err) { - expect(err.message).toBe(errorMessages.ExpectedRoleIDParameter) - } - }) - test("String [] passed as roleIDs ", async () => { - const response = getRolesForScopedToken(['roleID1']) - expect(response).toStrictEqual("role:roleID1 ") - }) - test("Empty [] passed as roleIDs ", async () => { - try { - await getRolesForScopedToken([]) - } catch (err) { - expect(err).toBeDefined() - } - }) - test("Invalid type passed as roleIDs ", async () => { - try { - await getRolesForScopedToken(undefined) - } catch (err) { - expect(err).toBeDefined() - } - }) -}) - -describe('signed data token generation test', () => { - - const data_token_creds = process.env.SIGNED_TOKEN_SA; - - test("no private key", async () => { - const options = { - dataTokens: ['datatoken1'] - } - try { - const res = await generateSignedDataTokens("test/demo-credentials/noPrivateKey.json", options) - } catch (err) { - expect(err).toBeDefined(); - } - }); - test("no token uri key", async () => { - try { - const res = await generateSignedDataTokens("test/demo-credentials/noTokenURI.json", options) - } catch (err) { - expect(err).toBeDefined(); - } - }); - test("generateBearerTokenFromCreds test", async () => { - try { - const res = await generateBearerTokenFromCreds("{}", options) - } catch (err) { - expect(err).toBeDefined(); - } - }); - - test("File does not exist", async () => { - try { - await generateSignedDataTokensFromCreds('invalid-file-path.json', options) - } catch (err) { - expect(err).toBeDefined(); - } - }) - - test("File is empty", async () => { - const options = { - dataTokens: ['token'], - } - try { - await generateSignedDataTokens("test/demo-credentials/empty.json", options) - } catch (err) { - expect(err.message).toBe(errorMessages.EmptyFile); - } - }) - test("no file path passed", async () => { - const options = { - dataTokens: ['token'], - } - try { - await generateSignedDataTokens("", options) - } catch (err) { - expect(err.message).toBe(errorMessages.FileNotFound); - } - }) - - test("Empty data token array passed", async () => { - const options = { - dataTokens: [] - } - try { - await generateSignedDataTokensFromCreds(data_token_creds, options) - } catch (err) { - expect(err.message).toBe(errorMessages.DataTokensEmpty); - } - }) - - test("data token is undefined", async () => { - const options = { - dataTokens: undefined - } - try { - await generateSignedDataTokensFromCreds(data_token_creds, options) - } catch (err) { - expect(err.message).toBe(errorMessages.DataTokensNotFound); - } - }) - test("invalid data token type provided", async () => { - const options = { - dataTokens: 'string' - } - try { - await generateSignedDataTokensFromCreds(data_token_creds, options) - } catch (err) { - expect(err.message).toBe(errorMessages.ExpectedDataTokensParameter); - } - }) - test("invalid time to live type provided", async () => { - const options = { - dataTokens: ['token'], - timeToLive: 'string' - } - try { - await generateSignedDataTokensFromCreds(data_token_creds, options) - } catch (err) { - expect(err.message).toBe(errorMessages.ExpectedTimeToLiveParameter); - } - }) - test("invalid credentials type provided", async () => { - const options = { - dataTokens: ['token'], - } - try { - await generateSignedDataTokensFromCreds(true, options) - } catch (err) { - expect(err.message).toBe(errorMessages.ExpectedStringParameter); - } - }) - test("TokenURINotFound", async () => { - const options = { - dataTokens: ['token'], - } - try { - await generateSignedDataTokens('test/demo-credentials/noTokenURI.json', options) - } catch (err) { - expect(err.message).toBe(errorMessages.TokenURINotFound); - } - }) -}) - diff --git a/test/demo-credentials/valid.json b/test/demo-credentials/valid.json new file mode 100644 index 0000000..ac7f5c0 --- /dev/null +++ b/test/demo-credentials/valid.json @@ -0,0 +1,7 @@ +{ + "clientID": "test-client-id", + "keyID": "test-key-id", + "tokenURI": "https://manage.skyflow.dev", + "privateKey": "KEY", + "data": "DATA" +} \ No newline at end of file diff --git a/test/service-account/token.test.js b/test/service-account/token.test.js new file mode 100644 index 0000000..7ca2f48 --- /dev/null +++ b/test/service-account/token.test.js @@ -0,0 +1,412 @@ +import { + generateBearerToken, + generateBearerTokenFromCreds, + generateToken, + getToken, + successResponse, + failureResponse, + getRolesForScopedToken, + generateSignedDataTokens, + generateSignedDataTokensFromCreds, +} from "../../src/service-account"; +import SkyflowError from '../../src/error'; +import errorMessages from '../../src/error/messages'; +import jwt from 'jsonwebtoken'; +import axios from 'axios'; +import { LogLevel } from "../../src"; + +describe("File Validity Tests", () => { + const testCases = [ + { description: "invalid JSON", filePath: "test/demo-credentials/invalidJson.json" }, + { description: "empty JSON", filePath: "test/demo-credentials/empty.json" }, + { description: "no client ID", filePath: "test/demo-credentials/noClientId.json" }, + { description: "no key ID", filePath: "test/demo-credentials/noKeyId.json" }, + { description: "no private key", method: generateBearerToken, filePath: "test/demo-credentials/noPrivateKey.json" }, + { description: "no token URI key", filePath: "test/demo-credentials/noTokenURI.json" }, + { description: "generateBearerTokenFromCreds test", method: generateBearerTokenFromCreds, filePath: "{}" }, + { description: "file does not exist", method: generateBearerToken, filePath: 'invalid-file-path.json' }, + { description: "get token with non-string credentials", method: getToken, credentials: { credentials: "non-string" } } + ]; + + testCases.forEach(({ description, method = generateBearerToken, filePath, credentials }) => { + test(description, async () => { + await expect(method(filePath || credentials)).rejects.toBeDefined(); + }); + }); + + test("Success response processing", async () => { + const success = await successResponse({ + data: { + accessToken: "access token", + tokenType: "Bearer" + } + }); + expect(success).toBeDefined(); + }); + + const errorCases = [ + { + description: "failure response processing JSON", + errorData: { + response: { + headers: { + 'x-request-id': 'RID', + 'content-type': 'application/json' + }, + data: { + error: { + message: "Internal Server Error" + } + } + } + } + }, + { + description: "failure response processing Plain text", + errorData: { + response: { + headers: { + 'x-request-id': 'RID', + 'content-type': 'text/plain' + }, + data: { + error: { + message: "Internal Server Error" + } + } + } + } + }, + { + description: "failure response processing Unknown format", + errorData: { + response: { + headers: { + 'x-request-id': 'RID', + 'content-type': 'invalid-type' + }, + data: { + error: { + message: "Internal Server Error" + } + } + } + } + } + ]; + + errorCases.forEach(({ description, errorData }) => { + test(description, async () => { + await expect(failureResponse(errorData)).rejects.toBeDefined(); + }); + }); +}); + +describe("Context and Scoped Token Options Tests", () => { + const credsWithoutContext = process.env.SA_WITHOUT_CONTEXT; + + const credentials = { + clientID: "test-client-id", + keyID: "test-key-id", + tokenURI: "https://test-token-uri.com", + privateKey: null, + data: "no-data", + }; + + + test("Empty roleID array passed to generate scoped token", async () => { + const expectedError = new SkyflowError({ + http_code: 400, + message: errorMessages.INVALID_CREDENTIALS_STRING, + }); + try { + await generateBearerTokenFromCreds(credentials, { roleIDs: [] }); + } catch (err) { + expect(err.message).toBe(expectedError.message); + } + }); + + test("Invalid type passed to generate scoped token", async () => { + const expectedError = new SkyflowError({ + http_code: 400, + message: errorMessages.INVALID_CREDENTIALS_STRING, + }); + try { + await generateBearerTokenFromCreds(credentials, { roleIDs: true }); + } catch (err) { + expect(err.message).toBe(expectedError.message); + } + }); + + test("Empty roleID array passed to generate scoped token (without context)", async () => { + const options = { roleIDs: [] }; + try { + await generateBearerTokenFromCreds(credsWithoutContext, options); + } catch (err) { + expect(err.message).toBe(errorMessages.EMPTY_ROLES); + } + }); + + test("Invalid type passed to generate scoped token (without context)", async () => { + const options = { roleIDs: true }; + try { + await generateBearerTokenFromCreds(credsWithoutContext, options); + } catch (err) { + expect(err.message).toBe(errorMessages.INVALID_ROLES_KEY_TYPE); + } + }); + + test("String array passed as roleIDs", () => { + const response = getRolesForScopedToken(["roleID1"]); + expect(response).toStrictEqual("role:roleID1 "); + }); + + test("Empty array passed as roleIDs", () => { + const roles = getRolesForScopedToken([]); + expect(roles).toBeDefined(); + }); + + test("Invalid type passed as roleIDs", () => { + const roles = getRolesForScopedToken(undefined); + expect(roles).toBeDefined(); + }); +}); + +describe('Signed Data Token Generation Test', () => { + const dataTokenCreds = "SIGNED_TOKEN_SA"; + const credentials = { + clientID: "test-client-id", + keyID: "test-key-id", + tokenURI: "https://skyflow-test.com", + privateKey: "KEY", + data: "DATA", + }; + const defaultOptions = { dataTokens: ['datatoken1'] }; + const invalidJSONFormat = "not in valid JSON format."; + const credFileNotFound = "Credential file not found"; + + test("Missing private key in credentials", async () => { + try { + await generateSignedDataTokens("test/demo-credentials/noPrivateKey.json", defaultOptions); + } catch (err) { + expect(err).toBeDefined(); + } + }); + + test("Missing token URI in credentials", async () => { + try { + await generateSignedDataTokens("test/demo-credentials/noTokenURI.json", defaultOptions); + } catch (err) { + expect(err).toBeDefined(); + } + }); + + test("Empty file path passed to generateSignedDataTokens", async () => { + const emptyFilePath = 'test/demo-credentials/empty.json'; + try { + await generateSignedDataTokens(emptyFilePath, defaultOptions); + } catch (err) { + expect(err.message).toContain(invalidJSONFormat); + } + }); + + test("No file path passed to generateSignedDataTokens", async () => { + try { + await generateSignedDataTokens("", defaultOptions); + } catch (err) { + expect(err.message).toContain(credFileNotFound); + } + }); + + test("Empty data token array passed", async () => { + const options = { dataTokens: [] }; + try { + await generateSignedDataTokensFromCreds(dataTokenCreds, options); + } catch (err) { + expect(err.message).toBe(errorMessages.EMPTY_DATA_TOKENS); + } + }); + + test("Undefined data token array passed", async () => { + const options = { dataTokens: undefined }; + try { + await generateSignedDataTokensFromCreds(dataTokenCreds, options); + } catch (err) { + expect(err.message).toBe(errorMessages.EMPTY_DATA_TOKENS); + } + }); + + test("Invalid data token type passed (string instead of array)", async () => { + const options = { dataTokens: 'string' }; // Incorrect type + try { + await generateSignedDataTokensFromCreds(dataTokenCreds, options); + } catch (err) { + expect(err.message).toBe(errorMessages.DATA_TOKEN_KEY_TYPE); + } + }); + + test("Invalid timeToLive type provided", async () => { + const options = { + dataTokens: ['token'], + timeToLive: 'string' // Invalid type + }; + try { + await generateSignedDataTokensFromCreds(dataTokenCreds, options); + } catch (err) { + expect(err.message).toBe(errorMessages.TIME_TO_LIVE_KET_TYPE); + } + }); + + test("valid timeToLive type provided", async () => { + const options = { + dataTokens: ['token'], + timeToLive: 10000 // valid type + }; + jest.spyOn(jwt, 'sign').mockReturnValue('mocked_token'); + try { + await generateSignedDataTokensFromCreds(JSON.stringify(credentials), options); + } catch (err) { + expect(err.message).toBe(errorMessages.TIME_TO_LIVE_KET_TYPE); + } + }); + + test("Invalid credentials type provided", async () => { + const options = { dataTokens: ['token'] }; + try { + await generateSignedDataTokensFromCreds(true, options); // Invalid type for credentials + } catch (err) { + expect(err.message).toBe(errorMessages.INVALID_CREDENTIALS_STRING); + } + }); + + test("Missing Token URI in credentials file", async () => { + const filePath = 'test/demo-credentials/noTokenURI.json'; + try { + await generateSignedDataTokens(filePath, defaultOptions); + } catch (err) { + expect(err.message).toBe(errorMessages.MISSING_TOKEN_URI); + } + }); + + test("Valid credentials file", async () => { + const filePath = 'test/demo-credentials/valid.json'; + jest.spyOn(jwt, 'sign').mockReturnValue('mocked_token'); + try { + await generateSignedDataTokens(filePath, defaultOptions); + } catch (err) { + expect(err.message).toBe(errorMessages.MISSING_TOKEN_URI); + } + }); + + test("File does not exist", async () => { + const invalidFilePath = 'invalid-file-path.json'; + try { + await generateSignedDataTokensFromCreds(invalidFilePath, defaultOptions); + } catch (err) { + expect(err.message).toContain(invalidJSONFormat); + } + }); + + test("Empty credentials string passed to generateBearerTokenFromCreds", async () => { + try { + await generateBearerTokenFromCreds("{}", defaultOptions); + } catch (err) { + expect(err).toBeDefined(); + } + }); +}); + +describe('getToken Tests', () => { + const credentials = { + clientID: "test-client-id", + keyID: "test-key-id", + tokenURI: "https://manage.skyflow.dev", /// remove this URL + privateKey: "KEY", + data: "DATA", + }; + + const credentialsWithInvalidUrl = { + clientID: "test-client-id", + keyID: "test-key-id", + tokenURI: "https://test-token-uri.com", + privateKey: "KEY", + data: "DATA", + }; + + const credentialsWithNoneUrl = { + clientID: "test-client-id", + keyID: "test-key-id", + tokenURI: "test-token", + privateKey: "KEY", + data: "DATA", + }; + + const mockTokenResponse = { + data: { + access_token: 'mocked_access_token', + token_type: 'Bearer', + } + }; + + // Mocking axios and jwt globally for all tests + beforeEach(() => { + jest.spyOn(axios, 'post').mockResolvedValue(mockTokenResponse); + jest.spyOn(jwt, 'sign').mockReturnValue('mocked_token'); + }); + + afterEach(() => { + jest.restoreAllMocks(); // Restore original implementations after each test + }); + + // Helper function to simplify repetitive test logic + const runTokenTest = async (creds, logLevel = LogLevel.OFF) => { + const result = await getToken(JSON.stringify(creds), { logLevel }); + expect(result).toBeDefined(); + expect(result.access_token).toBe('mocked_access_token'); + expect(result.token_type).toBe('Bearer'); + expect(axios.post).toHaveBeenCalledWith( + creds.tokenURI, + expect.anything(), + expect.anything() + ); + }; + + test("should get token with valid credentials", async () => { + jest.mock('axios'); + axios.post.mockResolvedValue({ + data: { + access_token: 'mocked_access_token', + token_type: 'Bearer', + }, + }); + await getToken(JSON.stringify(credentials), { logLevel: LogLevel.OFF }); + }); + + test("should get Bearer Token with valid credentials", async () => { + const filePath = 'test/demo-credentials/valid.json'; + jest.mock('axios'); + axios.post.mockResolvedValue({ + data: { + access_token: 'mocked_access_token', + token_type: 'Bearer', + }, + }); + await generateBearerToken(filePath, { logLevel: LogLevel.OFF }); + }); + + test("should get token with credentials having invalid URL", async () => { + try { + await runTokenTest(credentialsWithInvalidUrl); + } catch (err) { + expect(err).toBeDefined(); + } + }); + + test("should get token with credentials having None URL", async () => { + try { + await runTokenTest(credentialsWithNoneUrl); + } catch (err) { + expect(err).toBeDefined(); + } + }); +}); diff --git a/test/vault-api/Client.test.js b/test/vault-api/Client.test.js deleted file mode 100644 index edb7e87..0000000 --- a/test/vault-api/Client.test.js +++ /dev/null @@ -1,133 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import Client from "../../src/vault-api/client"; -import axios from "axios"; -import { generateSDKMetrics } from "../../src/vault-api/utils/helpers"; - -jest.mock("axios", () => { - return { - __esModule: true, - default: jest.fn(), - }; -}); - -describe("Client Class",()=>{ - - const client = new Client( - { - vaultId: "123", - vaultURL: "https://url.com", - getBearerToken: jest.fn(), - }, - {} - ); - - test("should make a request to client with the correct method, url, data and headers", async () => { - const request = { - requestMethod: "POST", - url: "https://example.com", - body: { name: "John Doe", age: 30 }, - headers: { "Content-Type": "application/json" }, - }; - const data = JSON.stringify({ name: "John Doe", age: 30 }); - const headers = { "content-type": "application/json","sky-metadata":JSON.stringify(generateSDKMetrics()) }; - axios.mockImplementation(() => - Promise.resolve({ data: { message: "Success" }, headers: { "x-request-id": "22r5-dfbf-3543" }}) - ); - - const response = await client.request(request); - - expect(axios).toHaveBeenCalledWith({ - method: request.requestMethod, - url: request.url, - data: data, - headers: headers, - }); - expect(response).toEqual({ - data: {message: "Success"}, - metadata: {requestId: "22r5-dfbf-3543"} - }); - }); - - test("should return an error if the request to client fails", async () => { - const request = { - requestMethod: "GET", - url: "https://example.com", - body: { name: "John Doe", age: 30 }, - headers: { "Content-Type": "application/json" }, - }; - const error = new Error("Request failed"); - axios.mockImplementation(() => Promise.reject(error)); - client.failureResponse = jest.fn().mockReturnValue(Promise.reject(error)); - await expect(client.request(request)).rejects.toEqual(error); - }); - - test("test convertRequestBody",()=>{ - const client = new Client({vaultId:"",vaultURL:"https://url.com",getBearerToken:jest.fn()},{}) - let response = client.convertRequestBody({"type":"card","number":"123"},"application/x-www-form-urlencoded"); - expect(response).toBe("type=card&number=123") - - response = client.convertRequestBody({"type":"card","number":"123"},"application/json"); - expect(response).toBe("{\"type\":\"card\",\"number\":\"123\"}") - - response = client.convertRequestBody({"type":"card","number":"123"},"multipart/form-data"); - expect(response).toBeDefined() - - }) - - test("test getHeaders",()=>{ - const client = new Client({vaultId:"",vaultURL:"https://url.com",getBearerToken:jest.fn()},{}) - const FormData = require("form-data"); - const formData = FormData(); - formData.append("type","card") - let response = client.getHeaders(formData,{"content-type":"multipart/form-data"}); - expect(response).toBeDefined() - }) - - test("test failure response with json",()=>{ - const error = { - "response": { - "headers": { - "content-type" : "application/json", - "x-request-id": "123" - }, - "data" : { - "error" : { - "message" : "unauthorized" - } - } - } - } - const client = new Client({vaultId:"",vaultURL:"https://url.com",getBearerToken:jest.fn()},{}) - client.failureResponse(error).catch((err)=> expect(err).toBeDefined()) - }) - - test("test failure response with text/plain content type",()=>{ - const error = { - "response": { - "headers": { - "content-type" : "text/plain", - "x-request-id": "123" - }, - "data" : "unauthorized" - } - } - const client = new Client({vaultId:"",vaultURL:"https://url.com",getBearerToken:jest.fn()},{}) - client.failureResponse(error).catch((err)=> expect(err).toBeDefined()) - }) - - test("test failure response with other content type",()=>{ - const error = { - "response": { - "headers": { - "content-type" : "text/xml", - "x-request-id": "123" - }, - "data" : "unauthorized" - } - } - const client = new Client({vaultId:"",vaultURL:"https://url.com",getBearerToken:jest.fn()},{}) - client.failureResponse(error).catch((err)=> expect(err).toBeDefined()) - }) -}); \ No newline at end of file diff --git a/test/vault-api/Delete.test.js b/test/vault-api/Delete.test.js deleted file mode 100644 index 1bd03a9..0000000 --- a/test/vault-api/Delete.test.js +++ /dev/null @@ -1,187 +0,0 @@ -import Skyflow from "../../src/vault-api/Skyflow"; -import clientModule from "../../src/vault-api/client"; -import logs from "../../src/vault-api/utils/logs"; - -jest.mock("../../src/vault-api/utils/jwt-utils", () => ({ - __esModule: true, - isTokenValid: jest.fn((token) => token === "token"), -})); - -jest.mock("../../src/vault-api/client"); - -const errorDeleteInput = { - records: [ - { - id: "invalid_delete_id", - table: "table1", - }, - ], -}; - -const errorDeleteRequestResponse = { - error: { - code: "404", - description: "No Records Found.", - }, -}; - -const deleteFailure = { - errors: [ - { - id : 'invalid_delete_id', - ...errorDeleteRequestResponse, - } - ] -}; - -describe("testing delete with invalid bearer token", () => { - test("delete failure with invalid token 1", (done) => { - try { - const skyflowConfig = { - vaultID: "", - vaultURL: "https://www.vaulturl.com", - getBearerToken: () => { - return new Promise((_, reject) => { - reject("invalid token"); - }); - }, - }; - - const clientReq = jest.fn(() => - Promise.reject(errorDeleteRequestResponse) - ); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {}, - }; - - clientModule.mockImplementation(() => { - return mockClient; - }); - - const skyflow = Skyflow.init({ - vaultID: "", - vaultURL: "https://www.vaulturl.com", - getBearerToken: () => { - return new Promise((_, reject) => { - reject("invalid token"); - }); - }, - }); - - const result = skyflow.delete(errorDeleteInput); - try { - result.catch((err) => { - expect(err).toEqual("invalid token"); - done(); - }); - } catch (err) { - done(err); - } - } catch (err) { - done(err); - } - }); - - test("delete failure with invalid token 2", (done) => { - try { - const skyflowConfig = { - vaultID: "", - vaultURL: "https://www.vaulturl.com", - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve(""); - }); - }, - }; - - const clientReq = jest.fn(() => - Promise.reject(errorDeleteRequestResponse) - ); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {}, - }; - - clientModule.mockImplementation(() => { - return mockClient; - }); - - const skyflow = Skyflow.init({ - vaultID: "", - vaultURL: "https://www.vaulturl.com", - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve(""); - }); - }, - }); - - const result = skyflow.delete(errorDeleteInput); - try { - result.catch((err) => { - expect(err.message).toEqual(logs.errorLogs.INVALID_BEARER_TOKEN); - done(); - }); - } catch (err) { - done(err); - } - } catch (err) { - done(err); - } - }); - - test("delete failure with invalid token 3", (done) => { - try { - const skyflowConfig = { - vaultID: "", - vaultURL: "https://www.vaulturl.com", - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token"); - }); - }, - }; - - const clientReq = jest.fn(() => - Promise.reject(errorDeleteRequestResponse) - ); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {}, - }; - - clientModule.mockImplementation(() => { - return mockClient; - }); - - const skyflow = Skyflow.init({ - vaultID: "", - vaultURL: "https://www.vaulturl.com", - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token"); - }); - }, - }); - - const result = skyflow.delete(errorDeleteInput); - try { - result.catch((err) => { - expect(err).toEqual(deleteFailure); - done(); - }); - } catch (err) { - done(err); - } - } catch (err) { - done(err); - } - }); -}); diff --git a/test/vault-api/Skyflow.test.js b/test/vault-api/Skyflow.test.js deleted file mode 100644 index fdb5122..0000000 --- a/test/vault-api/Skyflow.test.js +++ /dev/null @@ -1,2444 +0,0 @@ -/* - Copyright (c) 2022 Skyflow, Inc. -*/ -import Skyflow from '../../src/vault-api/Skyflow'; -import { LogLevel, RedactionType, RequestMethod } from '../../src/vault-api/utils/common'; -import { isValidURL} from '../../src/vault-api/utils/validators'; -import clientModule from '../../src/vault-api/client'; -import { setLogLevel } from '../../src/vault-api/Logging'; -import SKYFLOW_ERROR_CODE from '../../src/vault-api/utils/constants'; -import logs from '../../src/vault-api/utils/logs'; -jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), -})); -jest.mock('../../src/vault-api/client'); -const skyflowConfig = { - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - }, -}; - -const clientData = { - client: { - config: { ...skyflowConfig }, - metadata: {}, - }, - context: { logLevel: LogLevel.ERROR} -} -describe('Skyflow initialization', () => { - test('should initialize the skyflow object ', () => { - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - expect(skyflow.constructor === Skyflow).toBe(true); - }); - - test('invalid vaultURL testing', async () => { - try { - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - } catch (error) { - expect(error).toBeDefined(); - } - }); - - test('invalid method name for getAccessToken', async () => { - try { - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getTokens: () => Promise.resolve(httpRequestToken()), - }); - } catch (error) { - expect(error).toBeDefined(); - } - }); -}); - -describe('skyflow insert validations', () => { - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - - test('invalid input', async () => { - try { - const res = await skyflow.insert({}); - } catch (err) { - expect(err).toBeDefined(); - } - }); - - test('records object empty', async () => { - try { - const res = await skyflow.insert({ records: [] }); - } catch (err) { - expect(err).toBeDefined(); - } - }); - - test('missing fields', async () => { - try { - const res = await skyflow.insert({ records: [{ table: 'test' }] }); - } catch (err) { - expect(err).toBeDefined(); - } - }); - - test('missing table', async () => { - try { - const res = await skyflow.insert({ records: [{ fields: { name: 'joey' } }] }); - } catch (err) { - expect(err).toBeDefined(); - } - }); - - test('empty table name', async () => { - try { - const res = await skyflow.insert({ records: [{ table: '', fields: { name: 'joey' } }] }); - } catch (err) { - expect(err).toBeDefined(); - } - }); -}); - -const records = { - records: [ - { - fields: { - cvv: "234", - card_number: "411111111111111", - fullname: "san", - expiry_date: "11/22", - }, - table: "cards", - } - ], -}; - -const options = { - tokens: true, -}; - -const insertResponse = {"vaultID":"","responses":[{"records":[{"skyflow_id":"id","tokens":{"card_number":"token","cvv":"token","expiry_date":"token","fullname":"token"}}]}]} -const insertResponseWithoutTokens = {"vaultID":"","responses":[{"records":[{"skyflow_id":"id"}]}]} -const insertResponseCOEWithTokens = {"vaultID":"","responses":[{"Status":400,"Body":{"error":"Error Inserting Records due to unique constraint violation"}},{"Status":200,"Body":{"records":[{"skyflow_id":"id","tokens":{"card_number":"token","cvv":"token","expiry_date":"token","fullname":"token"}}]}}]} -const insertResponseCOEWithoutTokens = {"vaultID":"","responses":[{"Status":400,"Body":{"error":"Error Inserting Records due to unique constraint violation"}},{"Status":200,"Body":{"records":[{"skyflow_id":"id"}]}}]} -const on = jest.fn(); - -describe('skyflow insert', () => { - - let skyflow; - beforeEach(() => { - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - }); - - test('insert invalid input', (done) => { - try { - const res = skyflow.insert({"records":[]}); - let error; - res.catch((err) => error = err); - - setTimeout(() => { - expect(error).toBeDefined(); - done(); - }, 1000); - } catch (err) { - } - }); - - test('insert success with valid token', () => { - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.resolve({data:insertResponse})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - setLogLevel(LogLevel.WARN) - clientModule.mockImplementation(() => {return mockClient}); - - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.insert(records); - - return res.then((res) => { - expect(clientReq).toHaveBeenCalled(); - expect(res.records.length).toBe(1); - expect(res.error).toBeUndefined(); - }); - - }); - - test('insert success without tokens', () => { - - - const clientReq = jest.fn(() => Promise.resolve({data:insertResponseWithoutTokens})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - setLogLevel(LogLevel.WARN) - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.insert(records,{tokens:false}); - return res.then((res) => { - expect(clientReq).toHaveBeenCalled(); - expect(res.records.length).toBe(1); - expect(res.error).toBeUndefined(); - }); - - }); - - test('insert error', (done) => { - - try { - const clientReq = jest.fn(() => Promise.reject({ error: { message: "resource doesn't exist", code: 404 } })); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - setLogLevel(LogLevel.INFO) - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.insert(records,{tokens:false}); - let error; - res.catch((err) => error = err); - - setTimeout(() => { - expect(error).toBeDefined(); - done(); - }, 1000); - } catch (err) { - } - }); - - test('insert success with upsert options', () => { - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.resolve({data:insertResponse})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.insert(records,{upsert:[ - { - table: 'table1', column: 'column2' - } - ]}); - - return res.then((res) => { - expect(clientReq).toHaveBeenCalled(); - expect(res.records.length).toBe(1); - expect(res.error).toBeUndefined(); - }); - - }); - - test('insert with invalid tokens option type',(done)=>{ - try{ - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.insert(records,{tokens:{}}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }catch(err){ - done(err); - } - }); - - test('insert without any options',(done)=>{ - try{ - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.insert({}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }catch(err){ - done(err); - } - }); - - test('insert with invalid continueOnError option type', (done) => { - try { - const res = skyflow.insert(records, { continueOnError: {} }); - res.catch((err) => { - expect(err).toBeDefined(); - done(); - }); - } catch (err) { - done(err); - } - }); - - test('insert success with continueOnError as true with tokens', (done) => { - try { - jest.mock('../../src/vault-api/utils/jwt-utils', () => ({ - __esModule: true, - isTokenValid:jest.fn(() => true), - })); - const clientReq = jest.fn(() => Promise.resolve({ - data: insertResponseCOEWithTokens, metadata: {requestId: 123} - })); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - setLogLevel(LogLevel.WARN) - clientModule.mockImplementation(() => { return mockClient }); - - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token"); - }) - } - }); - const res = skyflow.insert({ - records: [ - records['records'][0], - records['records'][0] - ] - }, { tokens: true, continueOnError: true }); - res.then((res) => { - expect(clientReq).toHaveBeenCalled(); - expect(res.records.length).toBe(1); - expect(res.errors.length).toBe(1); - done(); - }); - } catch (err) { - done(err); - } - }); - - test('insert success with continueOnError as true without tokens', (done) => { - try { - jest.mock('../../src/vault-api/utils/jwt-utils', () => ({ - __esModule: true, - isTokenValid:jest.fn(() => true), - })); - const clientReq = jest.fn(() => Promise.resolve({ - data: insertResponseCOEWithoutTokens, metadata: {requestId: 123} - })); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - setLogLevel(LogLevel.WARN) - clientModule.mockImplementation(() => { return mockClient }); - - skyflow = Skyflow.init(skyflowConfig); - const res = skyflow.insert({ - records: [ - records['records'][0], - records['records'][0] - ] - }, { tokens: false, continueOnError: true }); - res.then((res) => { - expect(clientReq).toHaveBeenCalled(); - expect(res.records.length).toBe(1); - expect(res.errors.length).toBe(1); - done(); - }); - } catch (err) { - done(err); - } - }); -}); - -const detokenizeInput = { - records: [{ - token: 'token1', - }], -}; -const invalidDetokenizeInput = { - recordscds: [{ - token: 'token1', - }], -} - -const invalidDetokenizeInputEmptyToken = { - records: [{ - token: '', - }], -} - -const invalidDetokenizeInputEmptyRecords = { - records: [], -} - -const invalidDetokenizeInputEmptyRecordObject = { - records: [ - { - - } - ], -} -const detokenizeRes = { - records: [{ - token: 'token1', - value: '1234', - valueType: 'string' - }], -}; - -const invalidTokenDetokenizeResponse = { error: { message: "token doesn't exist", code: 404 } } - -describe('skyflow detokenize', () => { - - let skyflow; - beforeEach(() => { - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - }); - - test('detokenize success with valid bearer token', (done) => { - try { - - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.resolve({data:detokenizeRes})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - setLogLevel(LogLevel.ERROR) - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.detokenize(detokenizeInput); - let data; - res.then((res) => data = res); - - setTimeout(() => { - expect(data.records.length).toBe(1); - expect(data.error).toBeUndefined(); - done(); - }, 1000); - } catch (err) { - } - }); - - - test('detokenize error', (done) => { - - try { - - const clientReq = jest.fn(() => Promise.reject(invalidTokenDetokenizeResponse)); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - setLogLevel(LogLevel.DEBUG) - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.detokenize(detokenizeInput); - let error; - res.catch((err) => error = err); - - setTimeout(() => { - expect(error).toBeDefined(); - done(); - }, 1000); - } catch (err) { - } - }); - - test('detokenize invalid input 1',()=>{ - try { - - const res = skyflow.detokenize(invalidDetokenizeInput); - res.catch((err)=>{ - expect(err).toBeDefined(); - }) - }catch(err){ - } - }); - - test('detokenize invalid input 2',()=>{ - try { - - const res = skyflow.detokenize({}); - res.catch((err)=>{ - expect(err).toBeDefined(); - }) - }catch(err){ - } - }); - - test('detokenize invalid input 3',()=>{ - try { - - const res = skyflow.detokenize(invalidDetokenizeInputEmptyRecords); - res.catch((err)=>{ - expect(err).toBeDefined(); - }) - }catch(err){ - } - }); - - test('detokenize invalid input 4',()=>{ - try { - - const res = skyflow.detokenize(invalidDetokenizeInputEmptyToken); - res.catch((err)=>{ - expect(err).toBeDefined(); - }) - }catch(err){ - } - }); - - test('detokenize invalid input 5',()=>{ - try { - - const res = skyflow.detokenize(invalidDetokenizeInputEmptyRecordObject); - res.catch((err)=>{ - expect(err).toBeDefined(); - }) - }catch(err){ - } - }); -}); - -const getByIdInput = { - records: [{ - ids: ['id'], - table: 'cards', - redaction: 'PLAIN_TEXT', - }], -}; - -const getByIdInputWithoutRedaction = { - records: [{ - ids: ['id'], - table: 'cards', - }], -}; - -const getByIdInputMissingIds = { - records: [{ - table: 'cards', - redaction: 'PLAIN_TEXT', - }], -}; - -const getByIdInputInvalidRedaction = { - records: [{ - ids: ['id'], - table: 'cards', - redaction: 'PLAITEXT', - }], -}; - -const getByIdInputMissingColumnName= { - records: [ - { - table: "cards", - columnValues: ["ab"], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdInputMissingColumnValues= { - records: [ - { - table: "cards", - columnName: "cards", - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdInputWithColumnName= { - records: [ - { - table: "cards", - ids: ['id'], - columnName: " ", - columnValues: ["ab"], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdInputWithEmptyTable= { - records: [ - { - table: " ", - ids: ['id'], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdInputWithMissingTable= { - records: [ - { - ids: ['id'], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdInputInvalidColumnNameType= { - records: [ - { - table: "cards", - columnName: true, - columnValues: ["ab"], - redaction: "PLAIN_TEXT", - }, - ], -}; -const getByIdInputInvalidColumnValuesType= { - records: [ - { - table: "cards", - columnName: "abc", - columnValues: true, - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdInputEmptyColumnValues= { - records: [ - { - table: "cards", - columnName: "abc", - columnValues: [], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdInputInvalidOptionsColumnValues= { - records: [ - { - table: "cards", - columnName: "abc", - columnValues: [true], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdInputEmptydOptionsColumnValues= { - records: [ - { - table: "cards", - columnName: "abc", - columnValues: [""], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdWithValidUniqColumnOptions= { - records: [ - { - table: "cards", - columnName: "abc", - columnValues: ["value"], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdWithValidMultipleUniqColumnOptions= { - records: [ - { - table: "cards", - columnName: "abc", - columnValues: ["value","value2","value3"], - redaction: "PLAIN_TEXT", - }, - ], -}; - -const getByIdRes = { - records: [ - { - fields: { - cvv: '123', - }, - table: 'pii_fields', - }, - ], -}; - -const getWithNoSkyflowIDAndColumnName = { - records: [ - { - table: "cards", - redaction: "PLAIN_TEXT", - }, - ], -} - -const getByIdError = { error: { message: "id doesn't exist", code: 404 } }; - -describe('skyflow getById', () => { - - let skyflow; - beforeEach(() => { - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - - }); - - test('getById success with valid bearer token', (done) => { - try { - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.resolve({data:getByIdRes})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.getById(getByIdInput); - let data; - res.then((res) => data = res); - - setTimeout(() => { - expect(data.records.length).toBe(1); - expect(data.error).toBeUndefined(); - done(); - }, 1000); - } catch (err) { - } - }); - - - test('getById error', (done) => { - - try { - const clientReq = jest.fn(() => Promise.reject(getByIdError)); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.getById(getByIdInput); - let error; - res.catch((err) => error = err); - - setTimeout(() => { - expect(error).toBeDefined(); - done(); - }, 1000); - } catch (err) { - } - }); - test('getById invalid input-1',(done)=>{ - const res = skyflow.getById({}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('getById invalid input-2',(done)=>{ - const res = skyflow.getById({"records":[]}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('getById invalid input-3',(done)=>{ - const res = skyflow.getById({"records":[{}]}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('getById invalid input-4',(done)=>{ - const res = skyflow.getById({"records":[{}]}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('getById invalid input-5',(done)=>{ - const res = skyflow.getById(getByIdInputMissingIds); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('getById invalid input-6',(done)=>{ - const res = skyflow.getById(getByIdInputInvalidRedaction); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('getById invalid input-7',(done)=>{ - const res = skyflow.getById(getByIdInputWithColumnName); - res.catch((err)=>{ - expect(err.message).toBe(logs.errorLogs.INVALID_GET_BY_ID_INPUT); - done(); - }); - }); - test('getById invalid input-8',(done)=>{ - const res = skyflow.getById(getByIdInputWithColumnName); - res.catch((err)=>{ - expect(err.message).toBe(logs.errorLogs.INVALID_GET_BY_ID_INPUT); - done(); - }); - }); - test('getById invalid input-9',(done)=>{ - const res = skyflow.getById(getByIdInputWithEmptyTable); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('getById invalid input-10',(done)=>{ - const res = skyflow.getById(getByIdInputWithMissingTable); - res.catch((err)=>{ - expect(err).toBeDefined; - done(); - }); - }); -}); - -describe('skyflow get method', () => { - - let skyflow; - beforeEach(() => { - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - - }); - - test('get method success with valid bearer token', (done) => { - try { - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.resolve({data:getByIdRes})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.get(getByIdInput); - let data; - res.then((res) => data = res); - - setTimeout(() => { - expect(data.records.length).toBe(1); - expect(data.error).toBeUndefined(); - done(); - }, 1000); - } catch (err) { - } - }); - - - test('get method error', (done) => { - - try { - const clientReq = jest.fn(() => Promise.reject(getByIdError)); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.get(getByIdInput); - let error; - res.catch((err) => error = err); - - setTimeout(() => { - expect(error).toBeDefined(); - done(); - }, 1000); - } catch (err) { - } - }); - test('get method invalid input-1',(done)=>{ - const res = skyflow.get({}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('get method invalid input-2',(done)=>{ - const res = skyflow.get({"records":[]}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('get method invalid input-3',(done)=>{ - const res = skyflow.get({"records":[{}]}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('get method invalid input-4',(done)=>{ - const res = skyflow.get({"records":[{}]}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('get method invalid input-5',(done)=>{ - const res = skyflow.get(getByIdInputMissingIds); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test('get method invalid input-6',(done)=>{ - const res = skyflow.get(getByIdInputInvalidRedaction); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }); - }); - test("get method invalid input-7", () => { - const res = skyflow.get(getByIdInputMissingColumnName); - res.catch((err) => { - expect(err.message).toBe(logs.errorLogs.MISSING_RECORD_COLUMN_NAME); - }); - }); - test("get method invalid input-8", () => { - const res = skyflow.get(getByIdInputMissingColumnValues); - res.catch((err) => { - expect(err.message).toBe(logs.errorLogs.MISSING_RECORD_COLUMN_VALUE); - }); - }); - test("get method invalid input-9", () => { - const res = skyflow.get(getByIdInputInvalidColumnNameType); - res.catch((err) => { - expect(err.message).toBe(logs.errorLogs.INVALID_RECORD_COLUMN_VALUE); - }); - }); - test("get method invalid input-10", () => { - const res = skyflow.get(getByIdInputInvalidColumnValuesType); - res.catch((err) => { - expect(err.message).toBe(logs.errorLogs.INVALID_COLUMN_VALUES_OPTION_TYPE); - }); - }); - test("get method invalid input-11", () => { - const res = skyflow.get(getByIdInputEmptyColumnValues); - res.catch((err) => { - expect(err.message).toBe(logs.errorLogs.EMPTY_RECORD_COLUMN_VALUES); - }); - }); - test("get method invalid input-12", () => { - const res = skyflow.get(getByIdInputInvalidOptionsColumnValues); - res.catch((err) => { - expect(err.message).toBe(logs.errorLogs.INVALID_RECORD_COLUMN_VALUE_TYPE); - }); - }); - test("get method invalid input-13", () => { - const res = skyflow.get(getByIdInputEmptydOptionsColumnValues); - res.catch((err) => { - expect(err.message).toBe(logs.errorLogs.EMPTY_COLUMN_VALUE); - }); - }); - test("get method invalid input-14", () => { - const res = skyflow.get(getWithNoSkyflowIDAndColumnName); - res.catch((err) => { - expect(err.message).toBe(logs.errorLogs.MISSING_ID_AND_COLUMN_NAME); - }); - }); - test("get method with valid column name and column values input", () => { - const res = skyflow.get(getByIdWithValidUniqColumnOptions); - res.catch((err) => { - expect(err.message).toBe(undefined) - }); - }); -}); - -const invokeConnectionReq = { - connectionURL: 'https://connectionurl.com', - methodName: 'POST', - pathParams: { - cardNumber: '4111111111111111', - }, - queryParams: { - expiryDate: '12/2024', - }, - responseBody: { - resource: { - cvv: 'cvvId:123', - }, - }, -}; - -const missingconnectionURL = { - connectionURL: 1234, - methodName: 'POST', - pathParams: { - cardNumber: '4111111111111111', - }, - queryParams: { - expiryDate: '12/2024', - }, - responseBody: { - resource: { - cvv: 'cvvId:123', - }, - }, -}; - -const invalidconnectionURL = { - methodName: 'POST', - pathParams: { - cardNumber: '4111111111111111', - }, - queryParams: { - expiryDate: '12/2024', - }, - responseBody: { - resource: { - cvv: 'cvvId:123', - }, - }, -}; - -const missingMethod = { - connectionURL: 'https://connectionurl.com', - pathParams: { - cardNumber: '4111111111111111', - }, - queryParams: { - expiryDate: '12/2024', - }, - responseBody: { - resource: { - cvv: 'cvvId:123', - }, - }, -}; - -const invalidMEthod = { - connectionURL: 'https://connectionurl.com', - methodName: 'ppp', - pathParams: { - cardNumber: '4111111111111111', - }, - queryParams: { - expiryDate: '12/2024', - }, - responseBody: { - resource: { - cvv: 'cvvId:123', - }, - }, -}; - -const invokeConnectionRes = { - receivedTimestamp: '2019-05-29 21:49:56.625', - processingTimeinMs: 116, -}; - -describe('skyflow invoke connection', () => { - let skyflow; - beforeEach(() => { - - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - }); - - test('invoke connection success with valid bearer token', (done) => { - try { - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.resolve({data:invokeConnectionRes})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const res = skyflow.invokeConnection(invokeConnectionReq); - - let data; - res.then((res) => data = res); - - setTimeout(() => { - expect(data).toBeDefined(); - expect(!('resource' in data)).toBeTruthy(); - expect(data.error).toBeUndefined(); - done(); - }, 1000); - } catch (err) { - console.log(err) - } - }); - - test('invoke connection invalidInput -1 ',(done)=>{ - try { - const res = skyflow.invokeConnection({connectionURL:"invalid_url"}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }) - }catch(err){ - - } - }); - test('invoke connection invalidInput -2 ',(done)=>{ - try { - const res = skyflow.invokeConnection({connectionURL:"invalid_url"}); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }) - }catch(err){ - - } - }); - - test('invoke connection invalidInput -3 ',(done)=>{ - try { - const res = skyflow.invokeConnection(invalidconnectionURL); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }) - }catch(err){ - - } - }); - test('invoke connection invalidInput -4 ',(done)=>{ - try { - const res = skyflow.invokeConnection(missingconnectionURL); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }) - }catch(err){ - - } - }); - test('invoke connection invalidInput -5 ',(done)=>{ - try { - const res = skyflow.invokeConnection(missingMethod); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }) - }catch(err){ - - } - }); - test('invoke connection invalidInput -6 ',(done)=>{ - try { - const res = skyflow.invokeConnection(invalidMEthod); - res.catch((err)=>{ - expect(err).toBeDefined(); - done(); - }) - }catch(err){ - - } - }); - -}); - -describe("Skyflow Enums",()=>{ - - - test("Skyflow.RedactionType",()=>{ - expect(Skyflow.RedactionType.DEFAULT).toEqual(RedactionType.DEFAULT); - expect(Skyflow.RedactionType.MASKED).toEqual(RedactionType.MASKED); - expect(Skyflow.RedactionType.PLAIN_TEXT).toEqual(RedactionType.PLAIN_TEXT); - expect(Skyflow.RedactionType.REDACTED).toEqual(RedactionType.REDACTED); - }); - - test("Skyflow.RequestMethod",()=>{ - expect(Skyflow.RequestMethod.GET).toEqual(RequestMethod.GET); - expect(Skyflow.RequestMethod.POST).toEqual(RequestMethod.POST); - expect(Skyflow.RequestMethod.PUT).toEqual(RequestMethod.PUT); - expect(Skyflow.RequestMethod.DELETE).toEqual(RequestMethod.DELETE); - expect(Skyflow.RequestMethod.PATCH).toEqual(RequestMethod.PATCH); - }); - - test("isvalid url true",()=>{ - expect(isValidURL("https://www.google.com")).toBe(true); - }) - - - test("invalid url true",()=>{ - expect(isValidURL("httpsww.google.com")).toBe(false); - - }) - -}); - -const updateInput = { - records : [ - { - id: "test_update_id", - table:"table1", - fields:{ - "column":'update_value' - } - }, - ] -}; -const partialSuccessInput = { - records:[ - ...updateInput.records, - { - id: "invalid_update_id", - table:"table1", - fields:{ - "column":'update_value' - } - } -] -} -const successUpdateRequestResponse = { - "skyflow_id":'test_update_id', - "tokens": { - "column":"test_token" - } -}; - -const successUpdateRequestWithoutTokensResponse = { - "skyflow_id":'test_update_id', -}; -const errorUpdateRequestResponse = { - error:{ - code : '404', - description : "Token Not Found." - } -}; -const updateResponse = { - "records":[ - { - id: "test_update_id", - "fields": { - "column":"test_token" - } - } - ] -} -const updateResponseWithoutTokens = { - "records":[ - { - id: "test_update_id" - } - ] -} - -const updateFailure = { - "errors":[ - { - id : 'test_update_id', - ...errorUpdateRequestResponse - } - ] -} - -const partialUpdateFailure = { - "errors":[ - { - id : 'invalid_update_id', - ...errorUpdateRequestResponse - } - ] -} -describe("Update method",()=>{ - - test("test update success case",(done)=>{ - try{ - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.resolve({data:successUpdateRequestResponse})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const result = skyflow.update(updateInput); - result.then((response)=>{ - expect(response).toEqual(updateResponse); - done(); - }).catch((err)=>{ - done(err); - }); - } catch (err) { - done(err); - } - }); - test("test update success case with tokens false",(done)=>{ - try{ - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.resolve({data:successUpdateRequestWithoutTokensResponse})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const result = skyflow.update(updateInput); - result.then((response)=>{ - expect(response).toEqual(updateResponseWithoutTokens); - done(); - }).catch((err)=>{ - done(err); - }); - } catch (err) { - done(err); - } - }); - - test("test update partial success case",(done)=>{ - try{ - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn().mockImplementation((args) => { - const check = args.url.includes('test_update_id') - if(check) - return Promise.resolve({data:successUpdateRequestResponse}); - else - return Promise.reject(errorUpdateRequestResponse); - }); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const result = skyflow.update(partialSuccessInput); - result.then((response)=>{ - done(response); - }).catch((error)=>{ - expect(error).toEqual({...updateResponse,...partialUpdateFailure}); - done(); - }); - } catch (err) { - done(err); - } - }); - - test("test update error case",(done)=>{ - try{ - jest.mock('../../src/vault-api/utils/jwt-utils',()=>({ - __esModule: true, - isTokenValid:jest.fn(()=>true), - })); - const clientReq = jest.fn(() => Promise.reject(errorUpdateRequestResponse)); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const result = skyflow.update(updateInput,{tokens:true}); - result.then((response)=>{ - done(response); - }).catch((err)=>{ - expect(err).toEqual(updateFailure); - done(); - }); - } catch (err) { - done(err); - } - }); - - test('test invalid option tokens type',(done)=>{ - const clientReq = jest.fn(() => Promise.reject(errorUpdateRequestResponse)); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - clientModule.mockImplementation(() => {return mockClient}); - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: ()=>{ - return new Promise((resolve,_)=>{ - resolve("token") - }) - } - }); - const result = skyflow.update(updateInput,{tokens:{}}); - result.then((response)=>{ - done(response); - }).catch((err)=>{ - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.INVALID_TOKENS_IN_UPDATE.description); - done(); - }); - }); - -}); - -describe('skyflow detokenize with redaction', () => { - - let skyflow; - beforeEach(() => { - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - }); - - test('request body should contains plain text redaction when passed plain text', (done) => { - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:detokenizeRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.detokenize({ - records: [ - { - token: '123', - redaction: RedactionType.PLAIN_TEXT - } - ] - }); - - response.then(() => { - console.log(reqArg.body); - const tokenRecords = reqArg.body.detokenizationParameters - tokenRecords.forEach((record) => { - expect(record.token).toBe('123'); - expect(record.redaction).toBe('PLAIN_TEXT'); - }) - done(); - }).catch((err) => { - done(err); - }) - - - }); - - test('request body should contains redacted redaction when passed redacted', (done) => { - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:detokenizeRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.detokenize({ - records: [ - { - token: '123', - redaction: RedactionType.REDACTED - } - ] - }); - - response.then(() => { - console.log(reqArg.body); - const tokenRecords = reqArg.body.detokenizationParameters - tokenRecords.forEach((record) => { - expect(record.token).toBe('123'); - expect(record.redaction).toBe('REDACTED'); - }) - done(); - }).catch((err) => { - done(err); - }) - - - }); - - test('request body should contains masked redaction when passed masked', (done) => { - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:detokenizeRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.detokenize({ - records: [ - { - token: '123', - redaction: RedactionType.MASKED - } - ] - }); - - response.then(() => { - console.log(reqArg.body); - const tokenRecords = reqArg.body.detokenizationParameters - tokenRecords.forEach((record) => { - expect(record.token).toBe('123'); - expect(record.redaction).toBe('MASKED'); - }) - done(); - }).catch((err) => { - done(err); - }) - - - }); - - test('request body should contains default redaction when passed default', (done) => { - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:detokenizeRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.detokenize({ - records: [ - { - token: '123', - redaction: RedactionType.DEFAULT - } - ] - }); - - response.then(() => { - console.log(reqArg.body); - const tokenRecords = reqArg.body.detokenizationParameters - tokenRecords.forEach((record) => { - expect(record.token).toBe('123'); - expect(record.redaction).toBe('DEFAULT'); - }) - done(); - }).catch((err) => { - done(err); - }) - - - }); - - test('request body should contains plain text redaction when not passed.', (done) => { - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:detokenizeRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.detokenize({ - records: [ - { - token: '123', - } - ] - }); - - response.then(() => { - console.log(reqArg.body); - const tokenRecords = reqArg.body.detokenizationParameters - tokenRecords.forEach((record) => { - expect(record.token).toBe('123'); - expect(record.redaction).toBe('PLAIN_TEXT'); - }) - done(); - }).catch((err) => { - done(err); - }) - - - }); - - test('detokenize should throw error when invalid null redaction value is passed.', (done) => { - const response = skyflow.detokenize({ - records: [ - { - token: '123', - redaction: null - } - ] - }); - - response.then((res) => { - done('should throw error'); - }).catch((err) => { - expect(err.errors[0].description).toBe(SKYFLOW_ERROR_CODE.DETOKENIZE_INVALID_REDACTION_TYPE.description); - done(); - }) - - }); - - test('detokenize should throw error when invalid undefined redaction value is passed.', (done) => { - const response = skyflow.detokenize({ - records: [ - { - token: '123', - redaction: undefined - } - ] - }); - - response.then((res) => { - done('should throw error'); - }).catch((err) => { - expect(err.errors[0].description).toBe(SKYFLOW_ERROR_CODE.DETOKENIZE_INVALID_REDACTION_TYPE.description); - done(); - }) - - }); - - test('detokenize should throw error when invalid type redaction value is passed.', (done) => { - const response = skyflow.detokenize({ - records: [ - { - token: '123', - redaction: '' - } - ] - }); - - response.then((res) => { - done('should throw error'); - }).catch((err) => { - expect(err.errors[0].description).toBe(SKYFLOW_ERROR_CODE.DETOKENIZE_INVALID_REDACTION_TYPE.description); - done(); - }) - - }); -}); - -describe('get method with options', () => { - let skyflow; - beforeEach(() => { - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: jest.fn(), - }); - }); - - - test('get method should send request url with tokenization true when tokens are true', (done) => { - - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:getByIdRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.get(getByIdInputWithoutRedaction, { tokens: true }); - response.then((res) => { - expect((reqArg.url).includes('tokenization=true')).toBe(true); - done(); - }).catch((er) => { - done(er) - }); - - - }); - - test('get method should send request url with single column name for multiple column value', (done) => { - - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:getByIdRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.get(getByIdWithValidMultipleUniqColumnOptions); - response.then((res) => { - expect((reqArg.url).match(/column_name=abc/gi)?.length).toBe(1); - done(); - }).catch((er) => { - done(er) - }); - - - }); - - test('get method should send request url with single column name for multiple column value', (done) => { - - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:getByIdRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.get(getByIdWithValidMultipleUniqColumnOptions,{encodeURI:false}); - response.then((res) => { - expect((reqArg.url).match(/column_name=abc/gi)?.length).toBe(1); - done(); - }).catch((er) => { - done(er) - }); - - - }); - - - test('get method should send request url with tokenization false and redaction when tokens are false', (done) => { - - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:getByIdRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.get(getByIdInput, { tokens: false }); - response.then((res) => { - expect((reqArg.url).includes('tokenization=false')).toBe(true); - expect((reqArg.url).includes('redaction=PLAIN_TEXT')).toBe(true); - done(); - }).catch((er) => { - done(er) - }); - - - }); - - test('get method should not send redaction along with url if redaction is not passed.', (done) => { - - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:getByIdRes}) - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {} - } - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const response = skyflow.get(getByIdInputWithoutRedaction, { tokens: true }); - response.then((res) => { - console.log(reqArg.url); - expect((reqArg.url).includes('redaction=PLAIN_TEXT')).toBe(false); - done(); - }).catch((er) => { - done(er) - }); - - - }); - - test('get method should throw error when tokens options is invalid type value', (done) => { - - skyflow.get(getByIdInput, { tokens: '12343' }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.INVALID_TOKENS_IN_GET.description); - done(); - }) - }); - - test('get method should throw error when tokens options is invalid type value', (done) => { - - skyflow.get(getByIdInput, { tokens: "true" }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.INVALID_TOKENS_IN_GET.description); - done(); - }) - }); - - test('get method should throw error when tokens options is null', (done) => { - skyflow.get(getByIdInput, { tokens: null }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.INVALID_TOKENS_IN_GET.description); - done(); - }) - }); - - test('get method should throw error when tokens options is undefined', (done) => { - skyflow.get(getByIdInput, { tokens: undefined }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.INVALID_TOKENS_IN_GET.description); - done(); - }) - }); - - test('get method should throw error when tokens options along with column values', (done) => { - skyflow.get(getByIdWithValidUniqColumnOptions, { tokens: true }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.TOKENS_GET_COLUMN_NOT_SUPPORTED.description); - done(); - }) - }); - - test('get method should throw error when tokens options used along with redaction', (done) => { - skyflow.get(getByIdInput, { tokens: true }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.REDACTION_WITH_TOKENS_NOT_SUPPORTED.description); - done(); - }) - }); - - test('get method should encode column values when encodeURI option is true', (done) => { - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:getByIdRes}); - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {}, - }; - - clientModule.mockImplementation(() => { return mockClient }); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("encodeURI") - }) - } - }); - - const response = skyflow.get(getByIdWithValidUniqColumnOptions, { encodeURI: true }); - response.then((res) => { - expect((reqArg.url).includes('tokenization=false')).toBe(false); - done(); - }).catch((er) => { - done(er) - }); - }); - - test('get method should not encode column values when encodeURI option is false', (done) => { - let reqArg; - const clientReq = jest.fn((arg) => { - reqArg = arg; - return Promise.resolve({data:getByIdRes}); - }); - - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata: {}, - }; - - clientModule.mockImplementation(() => mockClient); - skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("encodeURI") - }) - } - }); - - const response = skyflow.get(getByIdWithValidUniqColumnOptions, { encodeURI: false }); - response.then((res) => { - expect((reqArg.url).includes('tokenization=false')).toBe(false); - done(); - }).catch((er) => { - done(er) - }); - }); - - test('get method should throw error when encodeURI options is invalid type value', (done) => { - - skyflow.get(getByIdWithValidUniqColumnOptions, { encodeURI: '12343' }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.INVALID_ENCODE_URI_IN_GET.description); - done(); - }) - }); - - test('get method should throw error when encodeURI options is null', (done) => { - skyflow.get(getByIdWithValidUniqColumnOptions, { encodeURI: null }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.INVALID_ENCODE_URI_IN_GET.description); - done(); - }) - }); - - test('get method should throw error when encodeURI options is undefined', (done) => { - skyflow.get(getByIdWithValidUniqColumnOptions, { encodeURI: undefined }).then((res) => { - done('Should throw error.') - }).catch((err) => { - expect(err.errors[0].description).toEqual(SKYFLOW_ERROR_CODE.INVALID_ENCODE_URI_IN_GET.description); - done(); - }) - }); -}); - -const deleteInput = { - records: [ - { - id: 'test_delete_id', - table: 'table1', - } - ] -}; - -const errorDeleteInput = { - records: [ - { - id: 'invalid_delete_id', - table: 'table1', - } - ] -}; - -const partialDeleteSuccessInput = { - records: [ - ...deleteInput.records, - ...errorDeleteInput.records, - ] -}; - -const successDeleteRequestResponse = { - skyflow_id: 'test_delete_id', - deleted: true -}; - -const errorDeleteRequestResponse = { - error: { - code: '404', - description: 'No Records Found.' - } -}; - -const deleteResponse = { - records: [ - { - skyflow_id: 'test_delete_id', - deleted: true - } - ] -}; - -const deleteFailure = { - errors: [ - { - id : 'invalid_delete_id', - ...errorDeleteRequestResponse, - } - ] -}; - -const partialDeleteSuccess = { - ...deleteResponse, - ...deleteFailure, -}; - -describe('skyflow delete method', () => { - test('delete success', (done) => { - try { - jest.mock('../../src/vault-api/utils/jwt-utils', () => ({ - __esModule: true, - isTokenValid: jest.fn(() => true), - })); - - const clientReq = jest.fn(() => Promise.resolve({data:successDeleteRequestResponse})); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - - clientModule.mockImplementation(() => { return mockClient }); - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const result = skyflow.delete(deleteInput); - result.then((response) => { - expect(response).toEqual(deleteResponse); - done(); - }).catch((err) => { - done(err); - }); - } catch (err) { - done(err); - } - }) - - test('delete failure', (done) => { - try { - jest.mock('../../src/vault-api/utils/jwt-utils', () => ({ - __esModule: true, - isTokenValid: jest.fn(() => true), - })); - - const clientReq = jest.fn(() => Promise.reject(errorDeleteRequestResponse)); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - - clientModule.mockImplementation(() => { return mockClient }); - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const result = skyflow.delete(errorDeleteInput); - try { - result.catch((err) => { - expect(err).toEqual(deleteFailure); - done(); - }); - } catch (err) { - done(err); - } - } catch (err) { - done(err); - } - }) - - test('delete partial success', (done) => { - try { - jest.mock('../../src/vault-api/utils/jwt-utils', () => ({ - __esModule: true, - isTokenValid: jest.fn(() => true), - })); - - const clientReq = jest.fn((args) => { - const check = args.url.includes('test_delete_id') - if (check) { - return Promise.resolve({data:successDeleteRequestResponse}); - } else { - return Promise.reject(errorDeleteRequestResponse); - } - }); - const mockClient = { - config: skyflowConfig, - request: clientReq, - metadata:{} - } - - clientModule.mockImplementation(() => { return mockClient }); - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const result = skyflow.delete(partialDeleteSuccessInput); - try { - result.catch((err) => { - expect(err).toEqual(partialDeleteSuccess); - done(); - }); - } catch (err) { - done(err); - } - } catch (err) { - done(err); - } - }) - - test('Invalid Input - missing table', async () => { - try { - const skyflow = Skyflow.init({ - vaultID: '', - vaultURL: 'https://www.vaulturl.com', - getBearerToken: () => { - return new Promise((resolve, _) => { - resolve("token") - }) - } - }); - - const result = await skyflow.delete({ records: [{ id: 'skyflow_id' }]}); - } catch (err) { - expect(err).toBeDefined(); - } - }) -}); \ No newline at end of file diff --git a/test/vault-api/Util.test.js b/test/vault-api/Util.test.js deleted file mode 100644 index b5eb61f..0000000 --- a/test/vault-api/Util.test.js +++ /dev/null @@ -1,707 +0,0 @@ -import { - validateUpsertOptions, - validateUpdateInput, - validateInsertRecords, - validateInitConfig, - isValidURL, - validateDeleteInputAndOptions -} from "../../src/vault-api/utils/validators"; -import SKYFLOW_ERROR_CODE from "../../src/vault-api/utils/constants"; -import { parameterizedString } from "../../src/vault-api/utils/logs-helper"; -import SkyflowError from "../../src/vault-api/libs/SkyflowError"; -import { fillUrlWithPathAndQueryParams, formatVaultURL, toLowerKeys, objectToFormData, generateSDKMetrics } from "../../src/vault-api/utils/helpers"; -import logs from "../../src/vault-api/utils/logs"; -const FormData = require('form-data'); - -let mockJson = {}; -jest.mock('../../package.json',()=>(mockJson)); -let mockProcess = {}; -jest.mock('process',()=>(mockProcess)); -let mockOS= {}; -jest.mock('os',()=>(mockOS)) - -describe("validate upsert options in collect", () => { - it("invalid upsert options type", () => { - try { - validateUpsertOptions({}); - } catch (err) { - expect(err?.error?.description).toEqual( - SKYFLOW_ERROR_CODE.INVALID_UPSERT_OPTION_TYPE.description - ); - } - }); - it("empty upsert array", () => { - try { - validateUpsertOptions([]); - } catch (err) { - expect(err?.error?.description).toEqual( - SKYFLOW_ERROR_CODE.EMPTY_UPSERT_OPTIONS_ARRAY.description - ); - } - }); - it("invalid upsert object type", () => { - try { - validateUpsertOptions([undefined]); - } catch (err) { - expect(err?.error?.description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_UPSERT_OPTION_OBJECT_TYPE.description, - 0 - ) - ); - } - }); - it("missing table key", () => { - try { - validateUpsertOptions([ - { - column: "column", - }, - ]); - } catch (err) { - expect(err?.error?.description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.MISSING_TABLE_IN_UPSERT_OPTION.description, - 0 - ) - ); - } - }); - it("missing column key", () => { - try { - validateUpsertOptions([ - { - table: "table", - }, - ]); - } catch (err) { - expect(err?.error?.description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.MISSING_COLUMN_IN_UPSERT_OPTION.description, - 0 - ) - ); - } - }); - it("invalid table key type", () => { - try { - validateUpsertOptions([ - { - table: true, - column: "column", - }, - ]); - } catch (err) { - expect(err?.error?.description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_UPSERT_OPTION.description, - 0 - ) - ); - } - }); - it("invalid column key type", () => { - try { - validateUpsertOptions([ - { - table: "table", - column: true, - }, - ]); - } catch (err) { - expect(err?.error?.description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_COLUMN_IN_UPSERT_OPTION.description, - 0 - ) - ); - } - }); -}); - -describe("it validateUpdateInput", () => { - it("it invalid update input", () => { - try { - validateUpdateInput(null); - } catch (err) { - expect(err?.errors[0].description).toEqual( - SKYFLOW_ERROR_CODE.INVALID_UPDATE_INPUT.description - ); - } - try { - validateUpdateInput(undefined); - } catch (err) { - expect(err?.errors[0].description).toEqual( - SKYFLOW_ERROR_CODE.INVALID_UPDATE_INPUT.description - ); - } - }); - - it("it missing records key in update input", () => { - try { - validateUpdateInput({}); - } catch (err) { - expect(err?.errors[0].description).toEqual( - SKYFLOW_ERROR_CODE.MISSING_RECORDS.description - ); - } - }); - - it("it records not array input", () => { - try { - validateUpdateInput({ records: {} }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - SKYFLOW_ERROR_CODE.INVALID_RECORDS_UPDATE_INPUT.description - ); - } - - try { - validateUpdateInput({ records: true }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - SKYFLOW_ERROR_CODE.INVALID_RECORDS_UPDATE_INPUT.description - ); - } - }); - - it("it records empty array input", () => { - try { - validateUpdateInput({ records: {} }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - SKYFLOW_ERROR_CODE.INVALID_RECORDS_UPDATE_INPUT.description - ); - } - }); - - it("it records empty array input", () => { - try { - validateUpdateInput({ records: [] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - SKYFLOW_ERROR_CODE.EMPTY_RECORDS.description - ); - } - }); - - it("it invalid empty record object", () => { - try { - validateUpdateInput({ records: [{}] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString(SKYFLOW_ERROR_CODE.EMPTY_RECORDS.description, 0) - ); - } - }); - - it("it missing id key in record object", () => { - try { - validateUpdateInput({ records: [{ ids: [] }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.MISSING_ID_IN_UPDATE.description, - 0 - ) - ); - } - }); - - it("it invalid id values in record object", () => { - try { - validateUpdateInput({ records: [{ id: {} }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_ID_IN_UPDATE.description, - 0 - ) - ); - } - try { - validateUpdateInput({ records: [{ id: true }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_ID_IN_UPDATE.description, - 0 - ) - ); - } - try { - validateUpdateInput({ records: [{ id: "" }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_ID_IN_UPDATE.description, - 0 - ) - ); - } - }); - - it("it missing table key in record object", () => { - try { - validateUpdateInput({ records: [{ id: "it_id" }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.MISSING_TABLE_IN_IN_UPDATE.description, - 0 - ) - ); - } - }); - - it("it invalid table values in record object", () => { - try { - validateUpdateInput({ records: [{ id: "it_id", table: {} }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_UPDATE.description, - 0 - ) - ); - } - try { - validateUpdateInput({ records: [{ id: "it_id", table: true }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_UPDATE.description, - 0 - ) - ); - } - try { - validateUpdateInput({ records: [{ id: "it_id", table: "" }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_UPDATE.description, - 0 - ) - ); - } - }); - - it("it missing fields key in record object", () => { - try { - validateUpdateInput({ records: [{ id: "it_id", table: "table1" }] }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.MISSING_FIELDS_IN_IN_UPDATE.description, - 0 - ) - ); - } - }); - - it("it invalid fields values in record object", () => { - try { - validateUpdateInput({ - records: [{ id: "it_id", table: "table1", fields: true }], - }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_FIELDS_IN_UPDATE.description, - 0 - ) - ); - } - try { - validateUpdateInput({ - records: [{ id: "it_id", table: "table1", fields: "" }], - }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_FIELDS_IN_UPDATE.description, - 0 - ) - ); - } - try { - validateUpdateInput({ - records: [{ id: "it_id", table: "table1", fields: {} }], - }); - } catch (err) { - expect(err?.errors[0].description).toEqual( - parameterizedString( - SKYFLOW_ERROR_CODE.INVALID_FIELDS_IN_UPDATE.description, - 0 - ) - ); - } - }); -}); - -describe("validateInsertRecords", () => { - it("should throw an error if the records key is not found in recordObj", () => { - const recordObj = {}; - const error = new SkyflowError(SKYFLOW_ERROR_CODE.RECORDS_KEY_NOT_FOUND); - expect(() => validateInsertRecords(recordObj)).toThrow(error); - }); - - it("should throw an error if the records array is empty", () => { - const recordObj = { records: [] }; - const error = new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_RECORDS); - expect(() => validateInsertRecords(recordObj)).toThrow(error); - }); - - it("should throw an error if table and fields keys not found in a record", () => { - const recordObj = { records: [{}] }; - const error = new SkyflowError({ - code: 400, - description: parameterizedString( - SKYFLOW_ERROR_CODE.EMPTY_TABLE_AND_FIELDS.description, - 0 - ), - }); - expect(() => validateInsertRecords(recordObj)).toThrow(error); - }); - - it("should throw an error if table is empty in a record", () => { - const recordObj = { records: [{ table: "", fields: {} }] }; - const error = new SkyflowError({ - code: 400, - description: parameterizedString( - SKYFLOW_ERROR_CODE.EMPTY_TABLE.description, - 0 - ), - }); - expect(() => validateInsertRecords(recordObj)).toThrow(error); - }); - - it("should not throw an error if the records array has valid records", () => { - const recordObj = { - records: [{ table: "users", fields: { name: "John Doe" } }], - }; - expect(() => validateInsertRecords(recordObj)).not.toThrow(); - }); -}); - -describe("validateInitConfig", () => { - it("should throw an error if the vault id is not found in initConfig", () => { - const initConfigObj = { vaultURL: "https://example.com" }; - const error = new SkyflowError(SKYFLOW_ERROR_CODE.VAULTID_IS_REQUIRED); - expect(() => validateInitConfig(initConfigObj)).toThrow(error); - }); - - it("should throw an error if the vault id is found but empty in initConfig", () => { - const initConfigObj = { vaultID: "", vaultURL: "https://example.com" }; - const error = new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULTID_IN_INIT); - expect(() => validateInitConfig(initConfigObj)).toThrow(error); - }); - - it("should throw an error if the vault url is not found in initConfig", () => { - const initConfigObj = { vaultID: "123" }; - const error = new SkyflowError(SKYFLOW_ERROR_CODE.VAULTURL_IS_REQUIRED); - expect(() => validateInitConfig(initConfigObj)).toThrow(error); - }); - - it("should throw an error if the vault url is found but empty in initConfig", () => { - const initConfigObj = { vaultID: "123", vaultURL: "" }; - const error = new SkyflowError(SKYFLOW_ERROR_CODE.EMPTY_VAULTURL_IN_INIT); - expect(() => validateInitConfig(initConfigObj)).toThrow(error); - }); - - it("should throw an error if the vault url is found but it is in invalid format in initConfig", () => { - const initConfigObj = { vaultID: "123", vaultURL: "invalid" }; - const error = new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_VAULTURL_IN_INIT); - expect(() => validateInitConfig(initConfigObj)).toThrow(error); - }); - - it("should throw an error if valid vault url and id are given but getBearerToken method is not present", () => { - const initConfigObj = { - vaultID: "123", - vaultURL: "https://example.com", - }; - const error = new SkyflowError( - SKYFLOW_ERROR_CODE.GET_BEARER_TOKEN_IS_REQUIRED - ); - expect(() => validateInitConfig(initConfigObj)).toThrow(error); - }); -}); - -describe("validateURL", () => { - it("should it for Valid URL for given url's", () => { - expect(isValidURL("https://example.com")).toBe(true); - expect(isValidURL("http://example.com")).toBe(false); - expect(isValidURL("example.com")).toBe(false); - expect(isValidURL("")).toBe(false); - expect(isValidURL("https://www .example.com")).toBe(false); - expect(isValidURL("https://www.example.com")).toBe(true); - }); -}); - -describe("URL helper its", () => { - - it('fillUrlWithPathAndQueryParams should add query params to the url', () => { - const url = 'https://example.com'; - const queryParams = { param1: 'value1', param2: 'value2' }; - const expectedUrl = 'https://example.com?param1=value1¶m2=value2'; - - const result = fillUrlWithPathAndQueryParams(url, undefined, queryParams); - - expect(result).toEqual(expectedUrl); - }); - - it('fillUrlWithPathAndQueryParams should replace path params and add query params to the url', () => { - const url = 'https://example.com/{param1}'; - const pathParams = { param1: 'path1' }; - const queryParams = { param2: 'value2', param3: 'value3' }; - const expectedUrl = 'https://example.com/path1?param2=value2¶m3=value3'; - - const result = fillUrlWithPathAndQueryParams(url, pathParams, queryParams); - - expect(result).toEqual(expectedUrl); - }); - - it('fillUrlWithPathAndQueryParams should not change the url if no pathParams and queryParams are passed', () => { - const url = 'https://example.com'; - const expectedUrl = 'https://example.com'; - - const result = fillUrlWithPathAndQueryParams(url); - - expect(result).toEqual(expectedUrl); - }); - - it('formatVaultURL should remove trailing slash from the url', () => { - const url = 'https://example.com/'; - const expectedUrl = 'https://example.com'; - - const result = formatVaultURL(url); - - expect(result).toEqual(expectedUrl); - }); - - it('formatVaultURL should remove leading and trailing whitespaces from the url', () => { - const url = ' https://example.com '; - const expectedUrl = 'https://example.com'; - - const result = formatVaultURL(url); - - expect(result).toEqual(expectedUrl); - }); - - it('formatVaultURL should not change the url if it is already formatted', () => { - const url = 'https://example.com'; - const expectedUrl = 'https://example.com'; - - const result = formatVaultURL(url); - - expect(result).toEqual(expectedUrl); - }); - - it('formatVaultURL should not change the url if it is not a string', () => { - const url = { key: 'value' }; - const expectedUrl = { key: 'value' }; - - const result = formatVaultURL(url); - - expect(result).toEqual(expectedUrl); - }); - - it('toLowerKeys should convert object keys to lowercase', () => { - const obj = { Key1: 'value1', Key2: 'value2' }; - const expectedObj = { key1: 'value1', key2: 'value2' }; - - const result = toLowerKeys(obj); - - expect(result).toEqual(expectedObj); - }); - - it('toLowerKeys should return an empty object if input is not an object', () => { - const obj = 'string'; - const expectedObj = {}; - - const result = toLowerKeys(obj); - - expect(result).toEqual(expectedObj); - }); - - it('toLowerKeys should return an empty object if input is null or undefined', () => { - const obj = null; - const expectedObj = {}; - - const result = toLowerKeys(obj); - - expect(result).toEqual(expectedObj); - }); - - it('objectToFormData should convert object to form data', () => { - const obj = { key1: 'value1', key2: 'value2' }; - const form = new FormData(); - form.append('key1', 'value1'); - form.append('key2', 'value2'); - const result = objectToFormData(obj); - expect(result).toBeDefined() - }); - - it('objectToFormData should convert nested object to form data', () => { - const obj = { key1: 'value1', key2: { key3: 'value3', key4: 'value4' } }; - const form = new FormData(); - form.append('key1', 'value1'); - form.append('key2[key3]', 'value3'); - form.append('key2[key4]', 'value4'); - const result = objectToFormData(obj); - expect(result).toBeDefined(); - }); - - it('objectToFormData should convert array of objects to form data', () => { - const obj = { key1: 'value1', key2: [{ key3: 'value3' }, { key4: 'value4' }] }; - const form = new FormData(); - form.append('key1', 'value1'); - form.append('key2[0][key3]', 'value3'); - form.append('key2[1][key4]', 'value4'); - const result = objectToFormData(obj); - expect(result).toBeDefined(); - }); -}); - -describe("test generateSDKMetrics",()=>{ - - test('should set it empty string when name version are undefined',()=>{ - mockJson = {name:undefined,version:null} - const metrics = generateSDKMetrics(); - expect(metrics.sdk_name_version).toBe(''); - }); - - test('should set it device model empty string when process is invalid or empty',()=>{ - mockProcess = {}; - const metrics = generateSDKMetrics(); - expect(metrics.sdk_client_device_model).toBe(''); - }); - - test('should set it run time details empty string when process is invalid or empty',()=>{ - mockProcess = {}; - const metrics = generateSDKMetrics(); - expect(metrics.sdk_runtime_details).toBe(''); - }); - - test('should set it os details empty string when process is invalid or empty',()=>{ - mockOS = {}; - const metrics = generateSDKMetrics(); - expect(metrics.sdk_client_os_details).toBe(''); - }); - -}); - -describe('skyflow delete method validation tests', () => { - test('Invalid Input - null delete input', () => { - try { - validateDeleteInputAndOptions(null); - } catch (err) { - expect(err).toBeDefined(); - expect(err.message).toBe(logs.errorLogs.INVALID_DELETE_INPUT); - } - }) - - test('Invalid Input - missing records key', () => { - try { - validateDeleteInputAndOptions({}); - } catch (err) { - expect(err).toBeDefined(); - expect(err.message).toBe(logs.errorLogs.MISSING_RECORDS); - } - }) - - test('Invalid Input - invalid records key type', () => { - try { - validateDeleteInputAndOptions({ records: {}}); - } catch (err) { - expect(err).toBeDefined(); - expect(err.message).toBe(logs.errorLogs.INVLAID_DELETE_RECORDS_INPUT); - } - }) - - test('Invalid Input - empty records array', () => { - try { - validateDeleteInputAndOptions({ records: []}); - } catch (err) { - expect(err).toBeDefined(); - expect(err.message).toBe(logs.errorLogs.EMPTY_RECORDS); - } - }) - - test('Invalid Input - empty record in records', () => { - try { - validateDeleteInputAndOptions({ records: [{}]}); - } catch (err) { - expect(err).toBeDefined(); - expect(err.message).toBe(logs.errorLogs.EMPTY_RECORDS); - } - }) - - test('Invalid Input - missing ID', () => { - try { - validateDeleteInputAndOptions({ records: [{ table: 'table' }]}); - } catch (err) { - const skyflowError = new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_ID_IN_DELETE, [0], true); - - expect(err).toBeDefined(); - expect(err.message).toBe(skyflowError.error.description); - } - }) - - test('Invalid Input - invalid ID 1', () => { - try { - validateDeleteInputAndOptions({ records: [{ id: 123 }]}); - } catch (err) { - const skyflowError = new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ID_IN_DELETE, [0], true); - - expect(err).toBeDefined(); - expect(err.message).toBe(skyflowError.error.description); - } - }) - - test('Invalid Input - invalid ID 2', () => { - try { - validateDeleteInputAndOptions({ records: [{ id: ' ' }]}); - } catch (err) { - const skyflowError = new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_ID_IN_DELETE, [0], true); - - expect(err).toBeDefined(); - expect(err.message).toBe(skyflowError.error.description); - } - }) - - test('Invalid Input - missing table', () => { - try { - validateDeleteInputAndOptions({ records: [{ id: 'skyflow_id' }]}); - } catch (err) { - const skyflowError = new SkyflowError(SKYFLOW_ERROR_CODE.MISSING_TABLE_IN_DELETE, [0], true); - - expect(err).toBeDefined(); - expect(err.message).toBe(skyflowError.error.description); - } - }) - - test('Invalid Input - invalid table 1', () => { - try { - validateDeleteInputAndOptions({ records: [{ id: 'skyflow_id', table: {} }]}); - } catch (err) { - const skyflowError = new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_DELETE, [0], true); - - expect(err).toBeDefined(); - expect(err.message).toBe(skyflowError.error.description); - } - }) - - test('Invalid Input - invalid table 2', () => { - try { - validateDeleteInputAndOptions({ records: [{ id: 'skyflow_id', table: ' ' }]}); - } catch (err) { - const skyflowError = new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_TABLE_IN_DELETE, [0], true); - - expect(err).toBeDefined(); - expect(err.message).toBe(skyflowError.error.description); - } - }) - -}); diff --git a/test/vault/client/client.test.js b/test/vault/client/client.test.js new file mode 100644 index 0000000..045ca45 --- /dev/null +++ b/test/vault/client/client.test.js @@ -0,0 +1,315 @@ +import VaultClient from '../../../src/vault/client'; // Adjust the import path +import { Configuration, QueryApi, RecordsApi, TokensApi } from '../../../src/ _generated_/rest'; +import { AuthType, LogLevel, TYPES } from '../../../src/utils'; +import { isExpired } from '../../../src/utils/jwt-utils'; +import SkyflowError from '../../../src/error'; + +jest.mock('../../../src/ _generated_/rest'); +jest.mock('../../../src/utils/jwt-utils'); +jest.mock('../../../src/error'); + +describe('VaultClient', () => { + const url = 'https://vault.skyflow.com'; + const vaultId = 'vault123'; + const apiKey = 'api_key_123'; + const token = 'token_123'; + const authInfo = { key: token, type: AuthType.TOKEN }; + + let vaultClient; + + beforeEach(() => { + vaultClient = new VaultClient(url, vaultId, { apiKey }, { token }, LogLevel.INFO); + }); + + describe('Constructor and Initialization', () => { + test('should initialize the client with correct values and default log level', () => { + expect(vaultClient.url).toBe(url); + expect(vaultClient.vaultId).toBe(vaultId); + expect(vaultClient.individualCredentials).toEqual({ apiKey }); + expect(vaultClient.skyflowCredentials).toEqual({ token }); + expect(vaultClient.logLevel).toBe(LogLevel.INFO); // Scenario 1: Specific log level provided + }); + + test('should set log level to ERROR if no log level is provided', () => { + const clientWithoutLogLevel = new VaultClient(url, vaultId, { apiKey }, { token }); + expect(clientWithoutLogLevel.logLevel).toBe(LogLevel.ERROR); // Scenario 2: Default log level + }); + }); + + describe('initAPI', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + test('should initialize RecordsApi for DELETE', () => { + vaultClient.initAPI(authInfo, TYPES.DELETE); + expect(RecordsApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize RecordsApi for FILE_UPLOAD', () => { + vaultClient.initAPI(authInfo, TYPES.FILE_UPLOAD); + expect(RecordsApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize RecordsApi for GET', () => { + vaultClient.initAPI(authInfo, TYPES.GET); + expect(RecordsApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize RecordsApi for INSERT', () => { + vaultClient.initAPI(authInfo, TYPES.INSERT); + expect(RecordsApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize RecordsApi for INSERT_BATCH', () => { + vaultClient.initAPI(authInfo, TYPES.INSERT_BATCH); + expect(RecordsApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize RecordsApi for UPDATE', () => { + vaultClient.initAPI(authInfo, TYPES.UPDATE); + expect(RecordsApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize TokensApi for DETOKENIZE', () => { + vaultClient.initAPI(authInfo, TYPES.DETOKENIZE); + expect(TokensApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize TokensApi for TOKENIZE', () => { + vaultClient.initAPI(authInfo, TYPES.TOKENIZE); + expect(TokensApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize QueryApi for QUERY', () => { + vaultClient.initAPI(authInfo, TYPES.QUERY); + expect(QueryApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should not initialize API for unsupported type', () => { + vaultClient.initAPI(authInfo, 'UNSUPPORTED_TYPE'); + expect(RecordsApi).not.toHaveBeenCalled(); + expect(TokensApi).not.toHaveBeenCalled(); + expect(QueryApi).not.toHaveBeenCalled(); + }); + }); + + describe('updateClientConfig', () => { + test('should set updateTriggered flag and reinitialize client', () => { + const newUrl = 'https://new-vault.com'; + const newVaultId = 'vault456'; + vaultClient.updateClientConfig(newUrl, newVaultId, { apiKey: 'newApiKey' }, { token: 'newToken' }, LogLevel.DEBUG); + + expect(vaultClient.url).toBe(newUrl); + expect(vaultClient.vaultId).toBe(newVaultId); + expect(vaultClient.individualCredentials).toEqual({ apiKey: 'newApiKey' }); + expect(vaultClient.skyflowCredentials).toEqual({ token: 'newToken' }); + expect(vaultClient.logLevel).toBe(LogLevel.DEBUG); + expect(vaultClient.updateTriggered).toBe(true); + }); + }); + + describe('initAPI', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + test('should initialize RecordsApi for INSERT', () => { + vaultClient.initAPI(authInfo, TYPES.INSERT); + expect(RecordsApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize TokensApi for TOKENIZE', () => { + vaultClient.initAPI(authInfo, TYPES.TOKENIZE); + expect(TokensApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should initialize QueryApi for QUERY', () => { + vaultClient.initAPI(authInfo, TYPES.QUERY); + expect(QueryApi).toHaveBeenCalledWith(expect.any(Configuration)); + }); + + test('should not initialize API for unsupported type', () => { + vaultClient.initAPI(authInfo, 'UNSUPPORTED'); + expect(RecordsApi).not.toHaveBeenCalled(); + expect(TokensApi).not.toHaveBeenCalled(); + expect(QueryApi).not.toHaveBeenCalled(); + }); + }); + + describe('getCredentials', () => { + test('should return API key if authInfo type is API_KEY', () => { + vaultClient.authInfo = { key: apiKey, type: AuthType.API_KEY }; + const credentials = vaultClient.getCredentials(); + expect(credentials).toEqual({ apiKey }); + }); + + test('should return token if authInfo type is TOKEN and token is not expired', () => { + isExpired.mockReturnValue(false); + vaultClient.authInfo = { key: token, type: AuthType.TOKEN }; + const credentials = vaultClient.getCredentials(); + expect(credentials).toEqual({ token }); + }); + + test('should return individualCredentials if token is expired', () => { + isExpired.mockReturnValue(true); + vaultClient.authInfo = { key: token, type: AuthType.TOKEN }; + const credentials = vaultClient.getCredentials(); + expect(credentials).toEqual({ apiKey }); + }); + + test('should return skyflowCredentials if no individualCredentials exist', () => { + vaultClient.individualCredentials = undefined; + const credentials = vaultClient.getCredentials(); + expect(credentials).toEqual({ token }); + }); + }); + + describe('getLogLevel and updateLogLevel', () => { + test('should return current log level', () => { + expect(vaultClient.getLogLevel()).toBe(LogLevel.INFO); + }); + + test('should update the log level', () => { + vaultClient.updateLogLevel(LogLevel.DEBUG); + expect(vaultClient.getLogLevel()).toBe(LogLevel.DEBUG); + }); + }); + + describe('updateSkyflowCredentials', () => { + test('should update skyflow credentials', () => { + const newCredentials = { token: 'new_token_456' }; + vaultClient.updateSkyflowCredentials(newCredentials); + expect(vaultClient.skyflowCredentials).toEqual(newCredentials); + }); + }); + + describe('getCredentials', () => { + + test('should return undefined if authInfo is undefined', () => { + vaultClient.authInfo = undefined; + const credentials = vaultClient.getCredentials(); + expect(credentials).toEqual({ apiKey }); // Should fall back to skyflowCredentials + }); + + test('should return individualCredentials if authInfo.key is undefined', () => { + vaultClient.authInfo = { key: undefined, type: AuthType.API_KEY }; + const credentials = vaultClient.getCredentials(); + expect(credentials).toEqual({ apiKey }); // Should fall back to skyflowCredentials + }); + + test('should return individualCredentials if both credentials are undefined', () => { + vaultClient.individualCredentials = undefined; + vaultClient.skyflowCredentials = undefined; + const credentials = vaultClient.getCredentials(); + expect(credentials).toBeUndefined(); // Should return undefined + }); + }); + + describe('failureResponse', () => { + test('should handle JSON error responses correctly', () => { + const errorResponse = { + response: { + headers: { 'content-type': 'application/json', 'x-request-id': '12345' }, + data: { error: { message: 'JSON error occurred', http_status: 400 } }, + status: 400, + }, + }; + vaultClient.failureResponse(errorResponse).catch(err => { + expect(err).toBeInstanceOf(SkyflowError); + }) + }); + + test('should handle JSON error responses with empty error correctly', () => { + const errorResponse = { + response: { + headers: { 'content-type': 'application/json', 'x-request-id': '12345' }, + data: { error: { } }, + status: 400, + }, + }; + vaultClient.failureResponse(errorResponse).catch(err => { + expect(err).toBeInstanceOf(SkyflowError); + }) + }); + + test('should handle JSON error responses with empty data correctly', () => { + const errorResponse = { + response: { + headers: { 'content-type': 'application/json', 'x-request-id': '12345' }, + data: { }, + status: 400, + }, + }; + vaultClient.failureResponse(errorResponse).catch(err => { + expect(err).toBeInstanceOf(SkyflowError); + }) + }); + + test('should handle JSON error responses without data correctly', () => { + const errorResponse = { + response: { + headers: { 'content-type': 'application/json', 'x-request-id': '12345' }, + status: 400, + }, + }; + vaultClient.failureResponse(errorResponse).catch(err => { + expect(err).toBeInstanceOf(SkyflowError); + }) + }); + + test('should handle without error responses correctly', () => { + const errorResponse = {}; + vaultClient.failureResponse(errorResponse).catch(err => { + expect(err).toBeInstanceOf(SkyflowError); + }) + }); + + test('should handle text error responses correctly', () => { + const errorResponse = { + response: { + headers: { 'content-type': 'text/plain', 'x-request-id': '12345' }, + data: 'Text error occurred', + status: 500, + }, + }; + vaultClient.failureResponse(errorResponse).catch(err => { + expect(err).toBeInstanceOf(SkyflowError); + }) + }); + + test('should handle errors without content-type correctly', () => { + const errorResponse = { + response: { + headers: { 'content-type': 'none' }, + status: 500, + }, + }; + vaultClient.failureResponse(errorResponse).catch(err => { + expect(err).toBeInstanceOf(SkyflowError); + }) + }); + + test('should handle generic errors without content-type correctly', () => { + const errorResponse = { + response: { + headers: {}, + status: 500, + }, + }; + vaultClient.failureResponse(errorResponse).catch(err => { + expect(err).toBeInstanceOf(SkyflowError); + }); + }); + }); + + describe('updateClientConfig', () => { + test('should retain existing state when no new credentials are provided', () => { + vaultClient.updateClientConfig(url, vaultId); + expect(vaultClient.url).toBe(url); + expect(vaultClient.vaultId).toBe(vaultId); + expect(vaultClient.logLevel).toBe(LogLevel.ERROR); + }); + }); +}); + diff --git a/test/vault/controller/connection.test.js b/test/vault/controller/connection.test.js new file mode 100644 index 0000000..1ec65e3 --- /dev/null +++ b/test/vault/controller/connection.test.js @@ -0,0 +1,126 @@ +import axios from "axios"; +import { fillUrlWithPathAndQueryParams, generateSDKMetrics, getBearerToken, LogLevel, MessageType, RequestMethod, parameterizedString, printLog, SDK_METRICS_HEADER_KEY, TYPES } from "../../../src/utils"; +import logs from "../../../src/utils/logs"; +import { validateInvokeConnectionRequest } from "../../../src/utils/validations"; +import VaultClient from "../../../src/vault/client"; +import ConnectionController from "../../../src/vault/controller/connections"; + +jest.mock("axios"); +jest.mock("../../../src/utils"); +jest.mock("../../../src/utils/validations"); + +describe("ConnectionController", () => { + let mockClient; + let connectionController; + + beforeEach(() => { + mockClient = new VaultClient(); + connectionController = new ConnectionController(mockClient); + jest.clearAllMocks(); // Clear previous mocks before each test + }); + + it("should invoke a connection successfully", async () => { + const invokeRequest = { + pathParams: { id: "123" }, + queryParams: { search: "test" }, + body: { data: "sample" }, + method: RequestMethod.POST, + headers: { "Custom-Header": "value" }, + }; + + const token = { key: "bearer_token" }; + const response = { data: { success: true }, headers: { 'x-request-id': 'request_id' } }; + + // Mocking implementations + mockClient.getLogLevel = jest.fn().mockReturnValue(LogLevel.INFO); + mockClient.getCredentials = jest.fn().mockReturnValue({ username: "user", password: "pass" }); + getBearerToken.mockResolvedValue(token); + fillUrlWithPathAndQueryParams.mockReturnValue("https://api.example.com/resource"); + generateSDKMetrics.mockReturnValue({ metric: "value" }); + axios.mockResolvedValue(response); + validateInvokeConnectionRequest.mockImplementation(() => {}); // No-op for validation + + const result = await connectionController.invoke(invokeRequest); + + expect(validateInvokeConnectionRequest).toHaveBeenCalledWith(invokeRequest); + expect(getBearerToken).toHaveBeenCalledWith(mockClient.getCredentials(), LogLevel.ERROR); + expect(axios).toHaveBeenCalledWith({ + url: "https://api.example.com/resource", + method: RequestMethod.POST, + data: invokeRequest.body, + headers: { + ...invokeRequest.headers, + 'x-skyflow-authorization': token.key, + [SDK_METRICS_HEADER_KEY]: JSON.stringify(generateSDKMetrics()), + }, + }); + expect(result).toEqual({ data: response.data, metadata: { requestId: 'request_id' } }); + }); + + it("should handle errors in getBearerToken", async () => { + const invokeRequest = { + pathParams: { id: "123" }, + queryParams: { search: "test" }, + body: { data: "sample" }, + method: RequestMethod.POST, + headers: { "Custom-Header": "value" }, + }; + + // Mocking implementations + mockClient.getLogLevel = jest.fn().mockReturnValue(LogLevel.INFO); + mockClient.getCredentials = jest.fn().mockReturnValue({ username: "user", password: "pass" }); + getBearerToken.mockRejectedValue(new Error("Token error")); + + await expect(connectionController.invoke(invokeRequest)).rejects.toThrow("Token error"); + }); + + it("should handle errors in axios call", async () => { + const invokeRequest = { + pathParams: { id: "123" }, + queryParams: { search: "test" }, + body: { data: "sample" }, + // method: RequestMethod.POST, + headers: { "Custom-Header": "value" }, + }; + + const token = { key: "bearer_token" }; + const errorResponse = { + response: { + status: 500, + data: { message: "Internal Server Error" }, + headers: { 'x-request-id': 'request_id' }, + } + }; + + // Mocking implementations + mockClient.getLogLevel = jest.fn().mockReturnValue(LogLevel.INFO); + mockClient.getCredentials = jest.fn().mockReturnValue({ username: "user", password: "pass" }); + getBearerToken.mockResolvedValue(token); + fillUrlWithPathAndQueryParams.mockReturnValue("https://api.example.com/resource"); + generateSDKMetrics.mockReturnValue({ metric: "value" }); + validateInvokeConnectionRequest.mockImplementation(() => {}); + axios.mockRejectedValue(errorResponse); + mockClient.failureResponse = jest.fn().mockResolvedValue(undefined); + + connectionController.invoke(invokeRequest).catch(err=>{ + expect(err).toBeDefined(); + }) + + expect(mockClient.failureResponse).not.toHaveBeenCalledWith(errorResponse); + }); + + it("should handle synchronous validation errors", async () => { + const invokeRequest = { + pathParams: { id: "123" }, + queryParams: { search: "test" }, + body: { data: "sample" }, + method: RequestMethod.POST, + headers: { "Custom-Header": "value" }, + }; + + const validationError = new Error("Validation error"); + validateInvokeConnectionRequest.mockImplementation(() => { throw validationError; }); + + await expect(connectionController.invoke(invokeRequest)).rejects.toThrow(validationError); + }); +}); diff --git a/test/vault/controller/vault.test.js b/test/vault/controller/vault.test.js new file mode 100644 index 0000000..e3e9c44 --- /dev/null +++ b/test/vault/controller/vault.test.js @@ -0,0 +1,1473 @@ +import VaultController from '../../../src/vault/controller/vault'; +import { printLog, MessageType, removeSDKVersion, LogLevel } from '../../../src/utils'; +import logs from '../../../src/utils/logs'; +import { validateInsertRequest, validateDetokenizeRequest, validateDeleteRequest, validateTokenizeRequest, validateQueryRequest, validateUpdateRequest, validateUploadFileRequest, validateGetRequest, validateGetColumnRequest } from '../../../src/utils/validations'; +import InsertResponse from '../../../src/vault/model/response/insert'; +import DeleteResponse from '../../../src/vault/model/response/delete'; +import TokenizeResponse from '../../../src/vault/model/response/tokenize'; +import QueryResponse from '../../../src/vault/model/response/query'; +import UpdateResponse from '../../../src/vault/model/response/update'; +import FileUploadResponse from '../../../src/vault/model/response/file-upload'; +import GetResponse from '../../../src/vault/model/response/get'; +import GetRequest from '../../../src/vault/model/request/get'; +import GetColumnRequest from '../../../src/vault/model/request/get-column'; +import SkyflowError from '../../../src/error'; +import * as fs from 'fs'; + +jest.mock('fs'); + +global.FormData = class { + data = {}; + + append(key, value) { + this.data[key] = value; + } + + getData() { + return this.data; + } +}; + +jest.mock('../../../src/utils', () => ({ + printLog: jest.fn(), + parameterizedString: jest.fn(), + removeSDKVersion: jest.fn(), + MessageType: { + LOG: 'LOG', + ERROR: 'ERROR', + }, + RedactionType: { + DEFAULT: 'DEFAULT', + PLAIN_TEXT: 'PLAIN_TEXT', + MASKED: 'MASKED', + REDACTED: 'REDACTED', + }, + SKYFLOW_ID: 'skyflowId', + TYPES: { + INSERT: 'INSERT', + INSERT_BATCH: 'INSERT_BATCH', + DETOKENIZE: 'DETOKENIZE', + TOKENIZE: 'TOKENIZE', + DELETE: 'DELETE', + UPDATE: 'UPDATE', + GET: 'GET', + FILE_UPLOAD: 'FILE_UPLOAD', + QUERY: 'QUERY', + INVOKE_CONNECTION: 'INVOKE_CONNECTION', + }, + generateSDKMetrics: jest.fn(), + getBearerToken: jest.fn().mockResolvedValue(Promise.resolve('your-bearer-token')) +})); + +jest.mock('../../../src/utils/validations', () => ({ + validateInsertRequest: jest.fn(), + validateDetokenizeRequest: jest.fn(), + validateDeleteRequest: jest.fn(), + validateTokenizeRequest: jest.fn(), + validateQueryRequest: jest.fn(), + validateUpdateRequest: jest.fn(), + validateUploadFileRequest: jest.fn(), + validateGetRequest: jest.fn(), + validateGetColumnRequest: jest.fn(), +})); + +jest.mock('../../../src/utils/logs', () => ({ + infoLogs: { + CONTROLLER_INITIALIZED: 'VaultController initialized successfully.', + }, + errorLogs: { + INSERT_REQUEST_REJECTED: 'INSERT_REJECTED', + } +})); + +describe('VaultController', () => { + let mockVaultClient; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + }; + jest.clearAllMocks(); // Clear all mocks before each test to avoid interference + }); + + test('should initialize VaultController and call printLog with correct parameters', () => { + const vaultController = new VaultController(mockVaultClient); + + // Ensure the constructor sets the client and logs the initialization + expect(vaultController).toBeInstanceOf(VaultController); + expect(vaultController.client).toBe(mockVaultClient); + + // Verify printLog is called with expected parameters + expect(printLog).toHaveBeenCalledTimes(1); + expect(printLog).toHaveBeenCalledWith( + logs.infoLogs.CONTROLLER_INITIALIZED, + MessageType.LOG, + 'DEBUG' // getLogLevel() should return 'DEBUG' + ); + }); + + test('should have the connection method defined', () => { + const vaultController = new VaultController(mockVaultClient); + expect(vaultController.connection).toBeDefined(); + expect(typeof vaultController.connection).toBe('function'); + }); + + test('should have the lookUpBin method defined', () => { + const vaultController = new VaultController(mockVaultClient); + expect(vaultController.lookUpBin).toBeDefined(); + expect(typeof vaultController.lookUpBin).toBe('function'); + }); + + test('should have the audit method defined', () => { + const vaultController = new VaultController(mockVaultClient); + expect(vaultController.audit).toBeDefined(); + expect(typeof vaultController.audit).toBe('function'); + }); + + test('should have the detect method defined', () => { + const vaultController = new VaultController(mockVaultClient); + expect(vaultController.detect).toBeDefined(); + expect(typeof vaultController.detect).toBe('function'); + }); +}); + +describe('VaultController insert method', () => { + let mockVaultClient; + let vaultController; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + vaultAPI: { + recordServiceInsertRecord: jest.fn(), + recordServiceBatchOperation: jest.fn(), + }, + initAPI: jest.fn(), + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce({}) + }; + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + }); + + test('should successfully insert records with bulk insert', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(false), + getReturnTokens: jest.fn().mockReturnValue(true), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue(''), + getTokens: jest.fn().mockReturnValue([{}]) + }; + const mockResponseData = { records: [{ skyflow_id: 'id123', tokens: {} }] }; + + mockVaultClient.vaultAPI.recordServiceInsertRecord.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.insert(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceInsertRecord).toHaveBeenCalledWith( + mockVaultClient.vaultId, + mockRequest.tableName, + expect.any(Object), // Request body + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(InsertResponse); + expect(response.insertedFields).toHaveLength(1); + }); + + test('should successfully insert records with bulk insert', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(false), + getReturnTokens: jest.fn().mockReturnValue(true), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue(''), + getTokens: jest.fn().mockReturnValue([{}]) + }; + const mockResponseData = { records: [{ skyflow_id: 'id123', tokens: {} }] }; + + mockVaultClient.vaultAPI.recordServiceInsertRecord.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.insert(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceInsertRecord).toHaveBeenCalledWith( + mockVaultClient.vaultId, + mockRequest.tableName, + expect.any(Object), // Request body + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(InsertResponse); + expect(response.insertedFields).toHaveLength(1); + }); + + test('should reject insert records with bulk insert', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(false), + getReturnTokens: jest.fn().mockReturnValue(true), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue(''), + getTokens: jest.fn().mockReturnValue([{}]) + }; + const mockResponseData = { skyflow_id: 'id123', tokens: {} }; + + mockVaultClient.vaultAPI.recordServiceInsertRecord.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.insert(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceInsertRecord).toHaveBeenCalledWith( + mockVaultClient.vaultId, + mockRequest.tableName, + expect.any(Object), // Request body + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(InsertResponse); + expect(response.insertedFields).toHaveLength(0); + }); + + test('should successfully insert records with batch insert', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getReturnTokens: jest.fn().mockReturnValue(false), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue(''), + getTokens: jest.fn().mockReturnValue([]) + }; + const mockResponseData = { responses: [{ Body: { records: [{ skyflow_id: 'id123' }] }, Status: 200 }, { Body: { records: [{ skyflow_id: 'id123' }] }, Status: 400 }] }; + + mockVaultClient.vaultAPI.recordServiceBatchOperation.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.insert(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceBatchOperation).toHaveBeenCalled(); + expect(response.insertedFields).toHaveLength(1); + }); + + test('should successfully insert records with batch insert with null record', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getReturnTokens: jest.fn().mockReturnValue(false), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue(''), + getTokens: jest.fn().mockReturnValue([]) + }; + const mockResponseData = { responses: [{ Body: { records: [{ skyflow_id: 'id123' }] }, Status: 200 }, null] }; + + mockVaultClient.vaultAPI.recordServiceBatchOperation.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.insert(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceBatchOperation).toHaveBeenCalled(); + expect(response.insertedFields).toHaveLength(1); + }); + + test('should successfully insert records with batch insert with null response', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getReturnTokens: jest.fn().mockReturnValue(false), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue(''), + getTokens: jest.fn().mockReturnValue([]) + }; + const mockResponseData = null; + + mockVaultClient.vaultAPI.recordServiceBatchOperation.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.insert(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceBatchOperation).toHaveBeenCalled(); + expect(response.insertedFields).toStrictEqual([]); + }); + + test('should reject insert records with batch insert', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getReturnTokens: jest.fn().mockReturnValue(false), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue(''), + getTokens: jest.fn().mockReturnValue([]) + }; + const mockResponseData = [{ Body: { records: [{ skyflow_id: 'id123' }] }, Status: 200 }]; + + mockVaultClient.vaultAPI.recordServiceBatchOperation.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.insert(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceBatchOperation).toHaveBeenCalled(); + expect(response.insertedFields).toStrictEqual([]); + }); + + test('should handle validation errors', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(false), + getReturnTokens: jest.fn().mockReturnValue(true), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue('') + }; + + validateInsertRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + + await expect(vaultController.insert(mockRequest, mockOptions)).rejects.toThrow('Validation error'); + expect(validateInsertRequest).toHaveBeenCalled(); + expect(mockVaultClient.vaultAPI.recordServiceInsertRecord).not.toHaveBeenCalled(); + }); + + test('should log and reject on API error', async () => { + const mockRequest = { + data: [{ field1: 'value1' }], + tableName: 'testTable', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(false), + getReturnTokens: jest.fn().mockReturnValue(true), + getUpsertColumn: jest.fn().mockReturnValue(''), + getHomogeneous: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue('') + }; + const errorResponse = new Error("Validation error"); + mockVaultClient.vaultAPI.recordServiceInsertRecord.mockRejectedValueOnce(errorResponse.message); + + await expect(vaultController.insert(mockRequest, mockOptions)).rejects.toEqual(errorResponse); + }); +}); + +describe('VaultController detokenize method', () => { + let mockVaultClient; + let vaultController; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + initAPI: jest.fn(), + tokensAPI: { + recordServiceDetokenize: jest.fn(), + }, + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce(new SkyflowError({http_code:500,message:"Invalid"})), + }; + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + }); + + test('should successfully detokenize records', async () => { + const mockRequest = { + tokens: ['token1', 'token2'], + redactionType: 'PLAIN_TEXT', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getDownloadURL: jest.fn().mockReturnValue(false) + }; + const mockDetokenizeResponse = { + data: { + records: [ + { token: 'token1', value: 'value1' }, + { token: 'token2', error: 'error2' } + ] + } + }; + + mockVaultClient.tokensAPI.recordServiceDetokenize.mockResolvedValueOnce(mockDetokenizeResponse); + + const response = await vaultController.detokenize(mockRequest, mockOptions); + + expect(mockVaultClient.tokensAPI.recordServiceDetokenize).toHaveBeenCalledWith( + 'vault123', + expect.anything(), // Detokenization payload + expect.any(Object) // Headers + ); + expect(response.detokenizedFields).toHaveLength(1); // Success responses + expect(response.errors).toHaveLength(1); // Error responses + }); + + test('should successfully detokenize records with different request', async () => { + const mockRequest = { + tokens: ['token1', 'token2'], + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(false), + getDownloadURL: jest.fn().mockReturnValue(true) + }; + const mockDetokenizeResponse = { + data: { + records: [ + { token: 'token1', value: 'value1' }, + { token: 'token2', error: 'error2' } + ] + } + }; + + mockVaultClient.tokensAPI.recordServiceDetokenize.mockResolvedValueOnce(mockDetokenizeResponse); + + const response = await vaultController.detokenize(mockRequest, mockOptions); + + expect(mockVaultClient.tokensAPI.recordServiceDetokenize).toHaveBeenCalledWith( + 'vault123', + expect.anything(), // Detokenization payload + expect.any(Object) // Headers + ); + expect(response.detokenizedFields).toHaveLength(1); // Success responses + expect(response.errors).toHaveLength(1); // Error responses + }); + + test('should successfully detokenize records with empty options', async () => { + const mockRequest = { + tokens: ['token1', 'token2'], + }; + + const mockDetokenizeResponse = { + data: { + records: [ + { token: 'token1', value: 'value1' }, + { token: 'token2', error: 'error2' } + ] + } + }; + + mockVaultClient.tokensAPI.recordServiceDetokenize.mockResolvedValueOnce(mockDetokenizeResponse); + + const response = await vaultController.detokenize(mockRequest); + + expect(mockVaultClient.tokensAPI.recordServiceDetokenize).toHaveBeenCalledWith( + 'vault123', + expect.anything(), // Detokenization payload + expect.any(Object) // Headers + ); + expect(response.detokenizedFields).toHaveLength(1); // Success responses + expect(response.errors).toHaveLength(1); // Error responses + }); + + test('should return unknown detokenize records', async () => { + const mockRequest = { + tokens: ['token1', 'token2'], + redactionType: 'PLAIN_TEXT', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getDownloadURL: jest.fn().mockReturnValue(false) + }; + const mockDetokenizeResponse = { + data: { + records: {} + } + }; + + mockVaultClient.tokensAPI.recordServiceDetokenize.mockResolvedValueOnce(mockDetokenizeResponse); + + const response = await vaultController.detokenize(mockRequest, mockOptions); + + expect(mockVaultClient.tokensAPI.recordServiceDetokenize).toHaveBeenCalledWith( + 'vault123', + expect.anything(), // Detokenization payload + expect.any(Object) // Headers + ); + expect(response.detokenizedFields).toHaveLength(0); // Success responses + expect(response.errors).toHaveLength(0); // Error responses + }); + + test('should reject detokenize records with validation error', async () => { + const mockRequest = { + tokens: ['token1', 'token2'], + redactionType: 'PLAIN_TEXT', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getDownloadURL: jest.fn().mockReturnValue(false) + }; + + validateDetokenizeRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + + await expect(vaultController.detokenize(mockRequest, mockOptions)).rejects.toThrow('Validation error'); + }); + + test('should handle API error during detokenize', async () => { + const mockRequest = { + tokens: ['token1', 'token2'] + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getDownloadURL: jest.fn().mockReturnValue(false) + }; + + validateDetokenizeRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + const errorResponse = new Error("Invalid"); + mockVaultClient.tokensAPI.recordServiceDetokenize.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.detokenize(mockRequest, mockOptions)).rejects.toThrow('Invalid'); + expect(mockVaultClient.tokensAPI.recordServiceDetokenize).toHaveBeenCalled(); + }); + + test('should log and resolve with empty arrays when no records are returned', async () => { + const mockRequest = { + tokens: ['token1', 'token2'], + redactionType: 'PLAIN_TEXT', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getDownloadURL: jest.fn().mockReturnValue(false) + }; + + validateDetokenizeRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + + mockVaultClient.tokensAPI.recordServiceDetokenize.mockResolvedValueOnce(new Error("Invalid")); + + try { + const response = await vaultController.detokenize(mockRequest, mockOptions); + } catch (err) { + expect(err).toBeDefined(); + } + }); + + test('should reject when an unexpected error occurs', async () => { + const mockRequest = { + tokens: ['token1', 'token2'], + redactionType: 'PLAIN_TEXT', + }; + const mockOptions = { + getContinueOnError: jest.fn().mockReturnValue(true), + getDownloadURL: jest.fn().mockReturnValue(false) + }; + validateDetokenizeRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + + const unexpectedError = new Error("Validation error"); + mockVaultClient.tokensAPI.recordServiceDetokenize.mockRejectedValueOnce(unexpectedError); + + await expect(vaultController.detokenize(mockRequest, mockOptions)).rejects.toThrow('Validation error'); + expect(mockVaultClient.tokensAPI.recordServiceDetokenize).not.toHaveBeenCalled(); + }); +}); + +describe('VaultController delete method', () => { + let mockVaultClient; + let vaultController; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + vaultAPI: { + recordServiceBulkDeleteRecord: jest.fn(), + }, + initAPI: jest.fn(), + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce(new SkyflowError({http_code:500,message:"Invalid"})) + }; + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + }); + + test('should successfully delete records', async () => { + const mockRequest = { + deleteIds: ['id123'], + tableName: 'testTable', + }; + const mockResponseData = { RecordIDResponse: ['id123'] }; + + mockVaultClient.vaultAPI.recordServiceBulkDeleteRecord.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.delete(mockRequest); + + expect(mockVaultClient.vaultAPI.recordServiceBulkDeleteRecord).toHaveBeenCalledWith( + mockVaultClient.vaultId, + mockRequest.tableName, + expect.any(Object), // Request body + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(DeleteResponse); + expect(response.deletedIds).toHaveLength(1); + expect(response.errors).toHaveLength(0); + }); + + test('should handle delete validation errors', async () => { + const mockRequest = { + deleteIds: ['id123'], + tableName: 'testTable', + }; + + validateDeleteRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + + await expect(vaultController.delete(mockRequest)).rejects.toThrow('Validation error'); + expect(validateDeleteRequest).toHaveBeenCalled(); + expect(mockVaultClient.vaultAPI.recordServiceBulkDeleteRecord).not.toHaveBeenCalled(); + }); + + test('should handle API errors during delete', async () => { + const mockRequest = { + deleteIds: ['id123'], + tableName: 'testTable', + }; + const errorResponse = new Error('Invalid'); + validateDeleteRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + mockVaultClient.vaultAPI.recordServiceBulkDeleteRecord.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.delete(mockRequest)).rejects.toEqual(errorResponse); + expect(mockVaultClient.vaultAPI.recordServiceBulkDeleteRecord).toHaveBeenCalled(); + }); + + test('should reject when API returns no deleted records', async () => { + const mockRequest = { + deleteIds: ['id123'], + tableName: 'testTable', + }; + const mockResponseData = { RecordIDResponse: [] }; // Simulate no records deleted + validateDeleteRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + mockVaultClient.vaultAPI.recordServiceBulkDeleteRecord.mockResolvedValueOnce({ data: mockResponseData }); + + const response = await vaultController.delete(mockRequest); + + expect(response.deletedIds).toHaveLength(0); + expect(response.errors).toHaveLength(0); + }); + + test('should log and reject when API returns errors during delete', async () => { + const mockRequest = { + deleteIds: ['id123'], + tableName: 'testTable', + }; + const errorResponse = new Error('Validation error'); + validateDeleteRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + mockVaultClient.vaultAPI.recordServiceBulkDeleteRecord.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.delete(mockRequest)).rejects.toEqual(errorResponse); + expect(mockVaultClient.vaultAPI.recordServiceBulkDeleteRecord).not.toHaveBeenCalled(); + }); +}); + +describe('VaultController tokenize method', () => { + let mockVaultClient; + let vaultController; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + tokensAPI: { + recordServiceTokenize: jest.fn(), + }, + initAPI: jest.fn(), + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce(new SkyflowError({http_code:500,message:"Invalid"})) + }; + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + }); + + test('should successfully tokenize records', async () => { + const mockRequest = { + values: [{ value: 'sensitiveData', columnGroup: 'group1' }], + }; + const mockResponseData = { data: { records: [{ token: 'token123' }] } }; + + mockVaultClient.tokensAPI.recordServiceTokenize.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.tokenize(mockRequest); + + expect(mockVaultClient.tokensAPI.recordServiceTokenize).toHaveBeenCalledWith( + mockVaultClient.vaultId, + expect.any(Object) // Tokenize payload + ); + expect(response).toBeInstanceOf(TokenizeResponse); + expect(response.tokens).toHaveLength(1); + expect(response.errors).toHaveLength(0); + }); + + test('should handle validation errors', async () => { + const mockRequest = { + values: [{ value: 'sensitiveData', columnGroup: 'group1' }], + }; + + validateTokenizeRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + + await expect(vaultController.tokenize(mockRequest)).rejects.toThrow('Validation error'); + expect(validateTokenizeRequest).toHaveBeenCalled(); + expect(mockVaultClient.tokensAPI.recordServiceTokenize).not.toHaveBeenCalled(); + }); + + test('should handle API errors during tokenization', async () => { + const mockRequest = { + values: [{ value: 'sensitiveData', columnGroup: 'group1' }], + }; + validateTokenizeRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + const errorResponse = new Error('Invalid'); + + mockVaultClient.tokensAPI.recordServiceTokenize.mockRejectedValueOnce(errorResponse.message); + + await expect(vaultController.tokenize(mockRequest)).rejects.toEqual(errorResponse); + expect(mockVaultClient.tokensAPI.recordServiceTokenize).toHaveBeenCalled(); + }); + + test('should reject when API returns no tokens', async () => { + const mockRequest = { + values: [{ value: 'sensitiveData', columnGroup: 'group1' }], + }; + const mockResponseData = []; // Simulate no tokens returned + + validateTokenizeRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + mockVaultClient.tokensAPI.recordServiceTokenize.mockResolvedValueOnce(mockResponseData); + + try { + const response = await vaultController.tokenize(mockRequest); + } catch (err) { + expect(err).toBeDefined(); + } + }); + + test('should log and reject when API returns errors during tokenization', async () => { + const mockRequest = { + values: [{ value: 'sensitiveData', columnGroup: 'group1' }], + }; + const errorResponse = new Error('Validation error'); + + validateTokenizeRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + mockVaultClient.tokensAPI.recordServiceTokenize.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.tokenize(mockRequest)).rejects.toEqual(errorResponse); + expect(mockVaultClient.tokensAPI.recordServiceTokenize).not.toHaveBeenCalled(); + }); +}); + +describe('VaultController query method', () => { + let mockVaultClient; + let vaultController; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + queryAPI: { + queryServiceExecuteQuery: jest.fn(), + }, + initAPI: jest.fn(), + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce(new SkyflowError({http_code:500,message:"Invalid"})) + }; + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + }); + + test('should successfully query records', async () => { + const mockRequest = { + query: 'SELECT * FROM table WHERE id=1', + }; + const mockResponseData = {data:{ records: [{ + fields: { id: '1', name: 'test' }, + tokens: { id: 'token123' }, + }]}}; + + mockVaultClient.queryAPI.queryServiceExecuteQuery.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.query(mockRequest); + + expect(mockVaultClient.queryAPI.queryServiceExecuteQuery).toHaveBeenCalledWith( + mockVaultClient.vaultId, + expect.any(Object), // Query body + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(QueryResponse); + expect(response.fields).toHaveLength(1); + expect(response.fields[0].id).toBe('1'); + expect(response.fields[0].tokenizedData.id).toBe('token123'); + expect(response.errors).toHaveLength(0); + }); + + test('should successfully query records as null', async () => { + const mockRequest = { + query: 'SELECT * FROM table WHERE id=1', + }; + const mockResponseData = {data:null}; + + mockVaultClient.queryAPI.queryServiceExecuteQuery.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.query(mockRequest); + + expect(mockVaultClient.queryAPI.queryServiceExecuteQuery).toHaveBeenCalledWith( + mockVaultClient.vaultId, + expect.any(Object), // Query body + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(QueryResponse); + expect(response.fields).toHaveLength(0); + expect(response.errors).toHaveLength(0); + }); + + test('should handle validation errors', async () => { + const mockRequest = { + query: 'SELECT * FROM table WHERE id=1', + }; + + validateQueryRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + + await expect(vaultController.query(mockRequest)).rejects.toThrow('Validation error'); + expect(validateQueryRequest).toHaveBeenCalled(); + expect(mockVaultClient.queryAPI.queryServiceExecuteQuery).not.toHaveBeenCalled(); + }); + + test('should handle API errors during query execution', async () => { + const mockRequest = { + query: 'SELECT * FROM table WHERE id=1', + }; + const errorResponse = new Error('Invalid'); + validateQueryRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + mockVaultClient.queryAPI.queryServiceExecuteQuery.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.query(mockRequest)).rejects.toEqual(errorResponse); + expect(mockVaultClient.queryAPI.queryServiceExecuteQuery).toHaveBeenCalled(); + }); + + test('should return empty fields when no records are returned', async () => { + const mockRequest = { + query: 'SELECT * FROM table WHERE id=1', + }; + const mockResponseData = []; // Simulate no records returned + + mockVaultClient.queryAPI.queryServiceExecuteQuery.mockResolvedValueOnce(mockResponseData); + try{ + const response = await vaultController.query(mockRequest); + } catch(err){ + expect(err).toBeDefined() + } + }); + + test('should reject and log when API returns error during query', async () => { + const mockRequest = { + query: 'SELECT * FROM table WHERE id=1', + }; + const errorResponse = new Error('Invalid'); + + mockVaultClient.queryAPI.queryServiceExecuteQuery.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.query(mockRequest)).rejects.toEqual(errorResponse); + expect(mockVaultClient.queryAPI.queryServiceExecuteQuery).toHaveBeenCalled(); + }); +}); + +describe('VaultController update method', () => { + let mockVaultClient; + let vaultController; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + vaultAPI: { + recordServiceUpdateRecord: jest.fn(), + }, + initAPI: jest.fn(), + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce(new SkyflowError({http_code:500,message:"Invalid"})) + }; + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + }); + + test('should successfully update record', async () => { + const skyflowId = 'id123'; + const mockRequest = { + data: { field1: 'value1', skyflowId }, + tableName: 'testTable', + }; + const mockOptions = { + getReturnTokens: jest.fn().mockReturnValue(true), + getTokenMode: jest.fn().mockReturnValue("DISABLE"), + getTokens: jest.fn().mockReturnValue({}), + }; + const mockResponseData = {data: { skyflow_id: 'id123', tokens: { field1: 'token123' } }}; + + mockVaultClient.vaultAPI.recordServiceUpdateRecord.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.update(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceUpdateRecord).toHaveBeenCalledWith( + mockVaultClient.vaultId, + mockRequest.tableName, + skyflowId, + expect.any(Object), // Update data + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(UpdateResponse); + expect(response.updatedField.skyflowId).toBe('id123'); + expect(response.updatedField.field1).toBe('token123'); + expect(response.errors).toHaveLength(0); + }); + + test('should successfully update record', async () => { + const skyflowId = 'id123'; + const mockRequest = { + data: { field1: 'value1', skyflowId }, + tableName: 'testTable', + }; + const mockOptions = null; + const mockResponseData = {data: { skyflow_id: 'id123', tokens: { field1: 'token123' } }}; + + mockVaultClient.vaultAPI.recordServiceUpdateRecord.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.update(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceUpdateRecord).toHaveBeenCalledWith( + mockVaultClient.vaultId, + mockRequest.tableName, + skyflowId, + expect.any(Object), // Update data + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(UpdateResponse); + expect(response.updatedField.skyflowId).toBe('id123'); + expect(response.updatedField.field1).toBe('token123'); + expect(response.errors).toHaveLength(0); + }); + test('should successfully update record using enable tokens', async () => { + const skyflowId = 'id123'; + const mockRequest = { + data: { field1: 'value1', skyflowId }, + tableName: 'testTable', + }; + const mockOptions = { + getReturnTokens: jest.fn().mockReturnValue(true), + getTokenMode: jest.fn().mockReturnValue("ENABLE"), + getTokens: jest.fn().mockReturnValue({}), + }; + const mockResponseData = {data: { skyflow_id: 'id123', tokens: { field1: 'token123' } }}; + + mockVaultClient.vaultAPI.recordServiceUpdateRecord.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.update(mockRequest, mockOptions); + + expect(mockVaultClient.vaultAPI.recordServiceUpdateRecord).toHaveBeenCalledWith( + mockVaultClient.vaultId, + mockRequest.tableName, + skyflowId, + expect.any(Object), // Update data + expect.any(Object) // Headers + ); + expect(response).toBeInstanceOf(UpdateResponse); + expect(response.updatedField.skyflowId).toBe('id123'); + expect(response.updatedField.field1).toBe('token123'); + expect(response.errors).toHaveLength(0); + }); + + test('should handle validation errors', async () => { + const mockRequest = { + data: { field1: 'value1', skyflowId: 'id123' }, + tableName: 'testTable', + }; + const mockOptions = { + getReturnTokens: jest.fn().mockReturnValue(true), + getTokenMode: jest.fn().mockReturnValue(false), + getTokens: jest.fn().mockReturnValue({}), + }; + + validateUpdateRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + + await expect(vaultController.update(mockRequest, mockOptions)).rejects.toThrow('Validation error'); + expect(validateUpdateRequest).toHaveBeenCalled(); + expect(mockVaultClient.vaultAPI.recordServiceUpdateRecord).not.toHaveBeenCalled(); + }); + + test('should handle API errors during record update', async () => { + const mockRequest = { + data: { field1: 'value1', skyflowId: 'id123' }, + tableName: 'testTable', + }; + const mockOptions = { + getReturnTokens: jest.fn().mockReturnValue(true), + getTokenMode: jest.fn().mockReturnValue(""), + getTokens: jest.fn().mockReturnValue({}), + }; + validateUpdateRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + const errorResponse = new Error('Invalid'); + + mockVaultClient.vaultAPI.recordServiceUpdateRecord.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.update(mockRequest, mockOptions)).rejects.toEqual(errorResponse); + expect(mockVaultClient.vaultAPI.recordServiceUpdateRecord).toHaveBeenCalled(); + }); + + test('should return updated record without tokens when token mode is disabled', async () => { + const mockRequest = { + data: { field1: 'value1', skyflowId: 'id123' }, + tableName: 'testTable', + }; + const mockOptions = { + getReturnTokens: jest.fn().mockReturnValue(false), + getTokenMode: jest.fn().mockReturnValue(false), + getTokens: jest.fn().mockReturnValue({}), + }; + const mockResponseData = { skyflow_id: 'id123' }; + + mockVaultClient.vaultAPI.recordServiceUpdateRecord.mockResolvedValueOnce(mockResponseData); + + try{ + const response = await vaultController.update(mockRequest, mockOptions); + } catch(err) { + expect(err).toBeDefined(); + } + }); + + test('should reject and log when API returns error during update', async () => { + const mockRequest = { + data: { field1: 'value1', skyflowId: 'id123' }, + tableName: 'testTable', + }; + const mockOptions = { + getReturnTokens: jest.fn().mockReturnValue(true), + getTokenMode: jest.fn().mockReturnValue(false), + getTokens: jest.fn().mockReturnValue({}), + }; + validateUpdateRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + const errorResponse = new Error('Invalid'); + + mockVaultClient.vaultAPI.recordServiceUpdateRecord.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.update(mockRequest, mockOptions)).rejects.toEqual(errorResponse); + expect(mockVaultClient.vaultAPI.recordServiceUpdateRecord).toHaveBeenCalled(); + }); +}); + +describe('VaultController uploadFile method', () => { + let mockVaultClient; + let vaultController; + let mockFormData; + let mockFs; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + vaultAPI: { + fileServiceUploadFile: jest.fn(), + }, + initAPI: jest.fn(), + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce(new SkyflowError({http_code:500,message:"Invalid"})) + }; + mockFormData = require('form-data'); + mockFs = require('fs'); + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + }); + + test('should successfully upload file', async () => { + const mockRequest = { + filePath: '/path/to/file', + columnName: 'testColumn', + tableName: 'testTable', + skyflowId: 'id123', + }; + const mockResponseData = {data:{ skyflow_id: 'id123' }}; + + const mockStream = { on: jest.fn() }; + jest.spyOn(mockFs, 'createReadStream').mockReturnValueOnce(mockStream); + mockVaultClient.vaultAPI.fileServiceUploadFile.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.uploadFile(mockRequest); + + expect(mockFs.createReadStream).toHaveBeenCalledWith(mockRequest.filePath); + + expect(response).toBeInstanceOf(FileUploadResponse); + expect(response.skyflowId).toBe('id123'); + expect(response.errors).toHaveLength(0); + }); + + test('should handle validation errors during upload', async () => { + const mockRequest = { + filePath: '/path/to/file', + columnName: 'testColumn', + tableName: 'testTable', + skyflowId: 'id123', + }; + + validateUploadFileRequest.mockImplementation(() => { + throw new Error('Validation error'); + }); + + await expect(vaultController.uploadFile(mockRequest)).rejects.toThrow('Validation error'); + expect(validateUploadFileRequest).toHaveBeenCalled(); + expect(mockVaultClient.vaultAPI.fileServiceUploadFile).not.toHaveBeenCalled(); + }); + + test('should handle file stream creation failure', async () => { + const mockRequest = { + filePath: '/path/to/nonexistent/file', + columnName: 'testColumn', + tableName: 'testTable', + skyflowId: 'id123', + }; + + jest.spyOn(mockFs, 'createReadStream').mockImplementationOnce(() => { + throw new Error('Validation error'); + }); + + await expect(vaultController.uploadFile(mockRequest)).rejects.toThrow('Validation error'); + expect(mockFs.createReadStream).not.toHaveBeenCalledWith(mockRequest.filePath); + expect(mockVaultClient.vaultAPI.fileServiceUploadFile).not.toHaveBeenCalled(); + }); + + test('should handle API errors during file upload', async () => { + const mockRequest = { + filePath: '/path/to/file', + columnName: 'testColumn', + tableName: 'testTable', + skyflowId: 'id123', + }; + const mockStream = { on: jest.fn() }; + jest.spyOn(mockFs, 'createReadStream').mockReturnValueOnce(mockStream); + validateUploadFileRequest.mockImplementation(() => { + // throw new Error('Validation error'); + }); + const errorResponse = new Error('Validation error'); + mockVaultClient.vaultAPI.fileServiceUploadFile.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.uploadFile(mockRequest)).rejects.toEqual(errorResponse); + expect(mockVaultClient.vaultAPI.fileServiceUploadFile).not.toHaveBeenCalled(); + }); + + test('should log and reject errors during file upload', async () => { + const mockRequest = { + filePath: '/path/to/file', + columnName: 'testColumn', + tableName: 'testTable', + skyflowId: 'id123', + }; + const mockStream = { on: jest.fn() }; + jest.spyOn(mockFs, 'createReadStream').mockReturnValueOnce(mockStream); + + const errorResponse = new Error('Invalid'); + mockVaultClient.vaultAPI.fileServiceUploadFile.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.uploadFile(mockRequest)).rejects.toEqual(errorResponse); + expect(mockVaultClient.vaultAPI.fileServiceUploadFile).toHaveBeenCalled(); + // expect(printLog).toHaveBeenCalledWith(errorResponse.message, MessageType.ERROR, mockVaultClient.getLogLevel()); + }); +}); + +describe('VaultController get method', () => { + let mockVaultClient; + let vaultController; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + vaultAPI: { + recordServiceBulkGetRecord: jest.fn(), + }, + initAPI: jest.fn(), + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce(new SkyflowError({http_code:500,message:"Invalid"})) + }; + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + }); + + const createGetRequest = (ids) => new GetRequest('testTable', ids ); + const createGetColumnRequest = (columnName, columnValues) => new GetColumnRequest('testTable', columnName, columnValues ); + + test('should successfully get records for GetRequest', async () => { + const mockRequest = createGetRequest(['id1', 'id2']); + const mockResponseData = { data: { records: [{ fields: { field1: 'value1' } }, { fields: { field2: 'value2' } }] } }; + + mockVaultClient.vaultAPI.recordServiceBulkGetRecord.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.get(mockRequest); + + // Validate that the correct validation method was called + // expect(validateGetRequest).toHaveBeenCalledWith(mockRequest); + + // Validate the response structure and content + expect(response).toBeInstanceOf(GetResponse); + expect(response.data).toEqual([{ field1: 'value1' }, { field2: 'value2' }]); + expect(response.errors).toHaveLength(0); + }); + + test('should successfully get records for GetRequest with options', async () => { + const mockRequest = createGetRequest(['id1', 'id2']); + const mockResponseData = { data: { records: [{ fields: { field1: 'value1' } }, { fields: { field2: 'value2' } }] } }; + const mockOptions = { + getRedactionType: jest.fn().mockReturnValue(true), + getReturnTokens: jest.fn().mockReturnValue(true), + getFields: jest.fn().mockReturnValue(true), + getOffset: jest.fn().mockReturnValue(true), + getLimit: jest.fn().mockReturnValue(true), + getDownloadURL: jest.fn().mockReturnValue(true), + getOrderBy: jest.fn().mockReturnValue(true) + }; + + mockVaultClient.vaultAPI.recordServiceBulkGetRecord.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.get(mockRequest,mockOptions); + + // Validate that the correct validation method was called + // expect(validateGetRequest).toHaveBeenCalledWith(mockRequest); + + // Validate the response structure and content + expect(response).toBeInstanceOf(GetResponse); + expect(response.data).toEqual([{ field1: 'value1' }, { field2: 'value2' }]); + expect(response.errors).toHaveLength(0); + }); + + test('should successfully get records for GetColumnRequest', async () => { + const mockRequest = createGetColumnRequest('columnName', ['value1', 'value2']); + const mockResponseData = { data: { records:[{ fields: { field1: 'value1' } }]}}; + + mockVaultClient.vaultAPI.recordServiceBulkGetRecord.mockResolvedValueOnce(mockResponseData); + + const response = await vaultController.get(mockRequest); + + // Validate that the correct validation method was called + // expect(validateGetColumnRequest).toHaveBeenCalledWith(mockRequest); + + // Validate the response structure and content + expect(response).toBeInstanceOf(GetResponse); + expect(response.data).toEqual([{ field1: 'value1' }]); + expect(response.errors).toHaveLength(0); + }); + + test('should handle validation errors for GetRequest', async () => { + const mockRequest = createGetRequest(['id1']); + validateGetRequest.mockImplementation(() => { throw new Error('Validation error'); }); + + await expect(vaultController.get(mockRequest)).rejects.toThrow('Validation error'); + + // Validate that the validation method was called + // expect(validateGetRequest).toHaveBeenCalledWith(mockRequest); + + // Ensure that the API call was not made + expect(mockVaultClient.vaultAPI.recordServiceBulkGetRecord).not.toHaveBeenCalled(); + }); + + test('should handle validation errors for GetColumnRequest', async () => { + const mockRequest = createGetColumnRequest('columnName', ['value1']); + validateGetColumnRequest.mockImplementation(() => { throw new Error('Validation error'); }); + + await expect(vaultController.get(mockRequest)).rejects.toThrow('Validation error'); + + // Validate that the validation method was called + // expect(validateGetColumnRequest).toHaveBeenCalledWith(mockRequest); + + // Ensure that the API call was not made + expect(mockVaultClient.vaultAPI.recordServiceBulkGetRecord).not.toHaveBeenCalled(); + }); + + test('should handle API errors during get', async () => { + const mockRequest = createGetRequest(['id1']); + const errorResponse = new Error('Invalid'); + validateGetRequest.mockImplementation(() => { + }); + mockVaultClient.vaultAPI.recordServiceBulkGetRecord.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.get(mockRequest)).rejects.toEqual(errorResponse); + + // Validate that the API call was made + expect(mockVaultClient.vaultAPI.recordServiceBulkGetRecord).toHaveBeenCalled(); + }); + + test('should log and reject errors during get', async () => { + const mockRequest = createGetRequest(['id1']); + const errorResponse = new Error('Invalid'); + + mockVaultClient.vaultAPI.recordServiceBulkGetRecord.mockRejectedValueOnce(errorResponse); + + await expect(vaultController.get(mockRequest)).rejects.toEqual(errorResponse); + }); + + test('should handle undefined parameters correctly', async () => { + const mockRequest = createGetRequest(undefined); // Pass undefined IDs + const mockResponseData = [{ fields: { field1: 'value1' } }]; + validateGetRequest.mockImplementation(() => { + }); + mockVaultClient.vaultAPI.recordServiceBulkGetRecord.mockResolvedValueOnce(mockResponseData); + + try{ + const response = await vaultController.get(mockRequest); + } catch(err) { + expect(err).toBeDefined(); + } + }); +}); + +describe('VaultController Error Handling', () => { + let mockVaultClient; + let vaultController; + + beforeEach(() => { + mockVaultClient = { + getLogLevel: jest.fn().mockReturnValue('DEBUG'), + vaultAPI: { + recordServiceInsertRecord: jest.fn(), + recordServiceBatchOperation: jest.fn(), + }, + initAPI: jest.fn(), + getCredentials: jest.fn().mockReturnValue({}), + vaultId: 'vault123', + failureResponse: jest.fn().mockRejectedValueOnce(new SkyflowError({http_code:500,message:"Invalid"})) + }; + vaultController = new VaultController(mockVaultClient); + jest.clearAllMocks(); + validateInsertRequest.mockImplementation(() => {}); + }); + + test('failureResponse should handle JSON error correctly', async () => { + const mockError = { + response: { + headers: { + 'content-type': 'application/json', + 'x-request-id': 'req123', + }, + data: { + error: { + message: 'Not Found', + http_status: 404, + grpc_code: 'NOT_FOUND', + }, + }, + status: 404, + }, + }; + + mockVaultClient.vaultAPI.recordServiceInsertRecord.mockRejectedValueOnce(mockError); + + await expect(vaultController.insert({ tableName: 'users', data: [{}] })).rejects.toThrow(SkyflowError); + + // You can check if the error contains the right message + try { + await vaultController.insert({ tableName: 'users', data: [{}] }); + } catch (e) { + expect(e).toBeDefined(); + } + }); + + test('failureResponse should handle text error correctly', async () => { + const mockError = { + response: { + headers: { + 'content-type': 'text/plain', + 'x-request-id': 'req123', + }, + data: 'An unexpected error occurred.', + status: 400, + }, + }; + + mockVaultClient.vaultAPI.recordServiceInsertRecord.mockRejectedValueOnce(mockError); + + await expect(vaultController.insert({ tableName: 'users', data: [{}] })).rejects.toThrow(SkyflowError); + + // Check that the error message is as expected + try { + await vaultController.insert({ tableName: 'users', data: [{}] }); + } catch (e) { + expect(e).toBeDefined(); + } + }); + + test('failureResponse should handle generic error when no content type', async () => { + const mockError = { + response: { + headers: {}, + data: 'An unknown error occurred.', + status: 500, + }, + }; + + mockVaultClient.vaultAPI.recordServiceInsertRecord.mockRejectedValueOnce(mockError); + + await expect(vaultController.insert({ tableName: 'users', data: [{}] })).rejects.toThrow(SkyflowError); + + // Check that the error message is as expected + try { + await vaultController.insert({ tableName: 'users', data: [{}] }); + } catch (e) { + expect(e).toBeDefined(); + } + }); + + test('failureResponse should handle generic error when no response object', async () => { + const mockError = new Error('Network Error'); + + mockVaultClient.vaultAPI.recordServiceInsertRecord.mockRejectedValueOnce(mockError); + + await expect(vaultController.insert({ tableName: 'users', data: [{}] })).rejects.toThrow(SkyflowError); + + // Check that the error message is as expected + try { + await vaultController.insert({ tableName: 'users', data: [{}] }); + } catch (e) { + expect(e).toBeDefined(); + } + }); +}); diff --git a/test/vault/skyflow/skyflow.test.js b/test/vault/skyflow/skyflow.test.js new file mode 100644 index 0000000..531a337 --- /dev/null +++ b/test/vault/skyflow/skyflow.test.js @@ -0,0 +1,437 @@ +import { LogLevel, Skyflow, Env } from '../../../src'; + +describe('Skyflow initialization', () => { + const credentials = { + apiKey: "sky-key" + }; + const validSkyflowConfig = { + vaultConfigs: [{ + vaultId: "vaultId", + clusterId: "clusterId", + credentials: credentials, + }], + connectionConfigs: [{ + connectionId: "CONN_ID", + connectionUrl: "https://conurl.com", + credentials: credentials, + }], + logLevel: LogLevel.INFO, + skyflowCredentials: credentials, + }; + + const validSkyflowConfigWithoutCredentials = { + vaultConfigs: [{ + vaultId: "vaultId", + clusterId: "clusterId", + }], + connectionConfigs: [{ + connectionId: "CONN_ID", + connectionUrl: "https://conurl.com", + }], + logLevel: LogLevel.INFO, + }; + + const emptyConfigError = "Skyflow config cannot be empty."; + const invalidConfigError = "Invalid skyflow config."; + const invalidVaultConfigError = "Invalid vault config."; + const emptyVaultConfigError = "Vault config cannot be empty."; + const invalidConnectionConfigError = "Invalid connection config."; + + test('should initialize the Skyflow object', () => { + const skyflow = new Skyflow(validSkyflowConfig); + expect(skyflow).toBeInstanceOf(Skyflow); + }); + + test('should initialize the Skyflow object without credentials', () => { + const skyflow = new Skyflow(validSkyflowConfigWithoutCredentials); + expect(skyflow).toBeInstanceOf(Skyflow); + }); + + test('should throw error when empty skyflowConfig is passed', () => { + expect(() => new Skyflow()).toThrowError(emptyConfigError); + }); + + test('should throw error when invalid skyflowConfig is passed', () => { + expect(() => new Skyflow({ + vaultConfig: { + vaultId: "VAULT_ID", + clusterId: true + } + })).toThrowError(invalidConfigError); + }); + + test('should throw error when invalid vaultConfig is passed', () => { + expect(() => new Skyflow({ + vaultConfigs: { + vaultId: "VAULT_ID", + clusterId: true + } + })).toThrowError(invalidVaultConfigError); + }); + + test('should throw error when empty vaultConfig is passed', () => { + expect(() => new Skyflow({ vaultConfigs: [] })).toThrowError(emptyVaultConfigError); + }); + + test('should throw error when invalid connectionConfig is passed', () => { + expect(() => new Skyflow({ + vaultConfigs: [{ + vaultId: "VAULT_ID", + clusterId: "CLUSTER_ID" + }], + connectionConfigs: { + vaultId: "VAULT_ID", + clusterId: true + } + })).toThrowError(invalidConnectionConfigError); + }); + + describe('Log Level Tests', () => { + const validVaultConfig = [{ + vaultId: "VAULT_ID", + clusterId: "CLUSTER_ID" + }]; + + const invalidLogLevelError = "Invalid log level."; + + test('should throw error when invalid logLevel is passed during initialization', () => { + expect(() => new Skyflow({ + vaultConfigs: validVaultConfig, + logLevel: "LEVEL" + })).toThrowError(invalidLogLevelError); + }); + + test('should update to valid logLevel', () => { + const skyflow = new Skyflow({ + vaultConfigs: validVaultConfig, + logLevel: LogLevel.ERROR + }); + skyflow.updateLogLevel(LogLevel.OFF); + expect(skyflow.getLogLevel()).toBe(LogLevel.OFF); + }); + + test('should throw error when updating to invalid logLevel', () => { + const skyflow = new Skyflow({ + vaultConfigs: validVaultConfig, + logLevel: LogLevel.ERROR + }); + + expect(() => skyflow.updateLogLevel("DUMMY")) + .toThrowError(invalidLogLevelError); + }); + }); + + describe('Skyflow Credentials Tests', () => { + const validVaultConfig = [{ + vaultId: "VAULT_ID", + clusterId: "CLUSTER_ID" + }]; + + const invalidCredentialsError = "Invalid credentials."; + const multipleCredentialsError = "Multiple credentials provided."; + + test('should throw error for invalid skyflow credentials', () => { + expect(() => new Skyflow({ + vaultConfigs: validVaultConfig, + logLevel: LogLevel.OFF, + skyflowCredentials: {} + })).toThrowError(invalidCredentialsError); + }); + + test('should throw error when multiple credentials are passed', () => { + expect(() => new Skyflow({ + vaultConfigs: validVaultConfig, + logLevel: LogLevel.OFF, + skyflowCredentials: { + token: "TOKEN", + apiKey: "sky-KEY" + } + })).toThrowError(multipleCredentialsError); + }); + + test('should update to valid skyflow credentials', () => { + const skyflow = new Skyflow({ + vaultConfigs: validVaultConfig, + logLevel: LogLevel.OFF, + skyflowCredentials: { + apiKey: "sky-KEY" + } + }); + const newCredentials = { apiKey: "sky-VALID_KEY" }; + skyflow.updateSkyflowCredentials(newCredentials); + expect(skyflow.getSkyflowCredentials()).toBe(newCredentials); + }); + + test('should throw error when updating with empty skyflow credentials', () => { + const skyflow = new Skyflow({ + vaultConfigs: validVaultConfig, + logLevel: LogLevel.OFF, + skyflowCredentials: { + apiKey: "sky-KEY" + } + }); + expect(() => skyflow.updateSkyflowCredentials()) + .toThrowError(invalidCredentialsError); + }); + + test('should throw error when updating with multiple credentials', () => { + const skyflow = new Skyflow({ + vaultConfigs: validVaultConfig, + logLevel: LogLevel.OFF, + skyflowCredentials: { + apiKey: "sky-KEY" + } + }); + expect(() => skyflow.updateSkyflowCredentials({ + token: "TOKEN", + apiKey: "sky-KEY" + })).toThrowError(multipleCredentialsError); + }); + }); + + describe('Vault Config Tests', () => { + const invalidVaultIdError = "Invalid vault ID."; + const invalidClusterIdError = "Invalid cluster ID."; + const invalidEnvError = "Invalid env."; + const missingVaultConfigError = "VAULT_ID is missing from the config."; + const missingIdConfigError = "ID is missing from the config."; + const noConfigFound = "No vault config found."; + const idExits = "already exists in the config list."; + + const validVaultConfig = { + vaultId: "VAULT_ID", + clusterId: "CLUSTER_ID", + env: Env.DEV + }; + + test('should throw error for invalid vaultId in vaultConfig', () => { + expect(() => new Skyflow({ + vaultConfigs: [{ vaultId: true }] + })).toThrowError(invalidVaultIdError); + }); + + test('should throw error for invalid vaultId in vaultConfig', () => { + expect(() => new Skyflow({ + vaultConfigs: [{ vaultId: true }] + })).toThrowError(invalidVaultIdError); + }); + + test('should throw error for invalid clusterId in vaultConfig', () => { + expect(() => new Skyflow({ + vaultConfigs: [{ vaultId: "VAULT_ID", clusterId: null }] + })).toThrowError(invalidClusterIdError); + }); + + test('should throw error for invalid env in vaultConfig', () => { + expect(() => new Skyflow({ + vaultConfigs: [{ vaultId: "VAULT_ID", clusterId: "CLUSTER_ID", env: "dummy" }] + })).toThrowError(invalidEnvError); + }); + + test('should update vault config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [{ + vaultId: "VAULT_ID", + clusterId: "CLUSTER_ID", + }], + }); + const updatedVaultConfig = { + vaultId: "VAULT_ID", + clusterId: "CLUSTER_ID" + }; + skyflow.updateVaultConfig(updatedVaultConfig); + expect(skyflow.getVaultConfig(updatedVaultConfig.vaultId)).toStrictEqual(updatedVaultConfig); + }); + + test('should remove vault config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + skyflow.removeVaultConfig("VAULT_ID"); + expect(() => skyflow.getVaultConfig("VAULT_ID")).toThrowError(missingVaultConfigError); + }); + + test('should throw error when removing a non-existing vault config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + expect(() => skyflow.removeVaultConfig("ID")).toThrowError(missingIdConfigError); + }); + + test('should throw error when calling a non-existing vault config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + expect(() => skyflow.vault("ID")).toThrowError(missingIdConfigError); + }); + + test('should throw error when no vault configs exits', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + skyflow.removeVaultConfig("VAULT_ID"); + expect(() => skyflow.vault("ID")).toThrowError(noConfigFound); + }); + + test('should throw error when getting vault config with empty vaultID', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + expect(() => skyflow.getVaultConfig()).toThrowError(invalidVaultIdError); + }); + + test('should throw error when adding vault config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + expect(() => skyflow.addVaultConfig(validVaultConfig)).toThrowError(idExits); + }); + + test('should throw error when updating a non-existing vault config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + const updatedVaultConfig = { + vaultId: "ID", + clusterId: "CLUSTER_ID", + env: Env.PROD + }; + expect(() => skyflow.updateVaultConfig(updatedVaultConfig)).toThrowError("ID is missing from the config."); + }); + + test('should throw error when updating vault config with invalid id', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + const updatedVaultConfig = { + clusterId: "CLUSTER_ID", + env: Env.PROD + }; + expect(() => skyflow.updateVaultConfig(updatedVaultConfig)).toThrowError("Invalid vault ID."); + }); + + test('should return vault controller', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig] + }); + expect(skyflow.vault("VAULT_ID")).toBeTruthy(); + }); + + test('should return vault controller when called without vault id', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig] + }); + expect(skyflow.vault()).toBeTruthy(); + }); + + test('should throw error for invalid vault id', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + }); + skyflow.removeVaultConfig("VAULT_ID"); + expect(() => skyflow.vault("ID")).toThrowError(noConfigFound); + }); + }); + + describe('Connection Config Tests', () => { + const validVaultConfig = { + vaultId: "VAULT_ID", + clusterId: "CLUSTER_ID" + }; + + const validConnectionConfig = { + connectionId: "CONN_ID", + connectionUrl: "https://connection-url.com" + }; + + test('should initialize with valid connection config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [validConnectionConfig] + }); + expect(skyflow.constructor).toBe(Skyflow); + }); + + test('should throw error for invalid connection id in connection config', () => { + expect(() => new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [{ connectionId: true }] + })).toThrowError("Invalid connection ID."); + }); + + test('should throw error for invalid connection url in connection config', () => { + expect(() => new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [{ connectionId: "CONN_ID", connectionUrl: null }] + })).toThrowError("Invalid connection URL."); + }); + + test('should throw error for empty connectionId in connection config', () => { + expect(() => new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [{ connectionId: "" }] + })).toThrowError("Invalid connection ID."); + }); + + test('should throw error for empty connection url in connection config', () => { + expect(() => new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [{ connectionId: "CONN_ID", connectionUrl: "" }] + })).toThrowError("Invalid connection URL."); + }); + + test('should update connection config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [validConnectionConfig] + }); + const updatedConnectionConfig = { + connectionId: "CONN_ID", + connectionUrl: "https://connection-two-url.com" + }; + skyflow.updateConnectionConfig(updatedConnectionConfig); + expect(skyflow.getConnectionConfig(updatedConnectionConfig.connectionId)).toStrictEqual(updatedConnectionConfig); + }); + + test('should throw error when updating a non-existing connection config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [validConnectionConfig] + }); + const updatedConnectionConfig = { + connectionId: "CONN", + connectionUrl: "https://connection-two-url.com" + }; + expect(() => skyflow.updateConnectionConfig(updatedConnectionConfig)).toThrowError("CONN is missing from the config."); + }); + + test('should throw error when updating connection config with invalid id', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [validConnectionConfig] + }); + const updatedConnectionConfig = { + connectionUrl: "https://connection-two-url.com" + }; + expect(() => skyflow.updateConnectionConfig(updatedConnectionConfig)).toThrowError("Invalid connection ID."); + }); + + test('should remove connection config', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [validConnectionConfig] + }); + skyflow.removeConnectionConfig("CONN_ID"); + expect(() => skyflow.getConnectionConfig("CONN_ID")).toThrowError("CONN_ID is missing from the config."); + }); + + test('should return connection controller', () => { + const skyflow = new Skyflow({ + vaultConfigs: [validVaultConfig], + connectionConfigs: [validConnectionConfig] + }); + expect(skyflow.connection("CONN_ID")).toBeTruthy(); + }); + }); + +}); diff --git a/test/vault/utils/jwt-utils/jwt.test.js b/test/vault/utils/jwt-utils/jwt.test.js new file mode 100644 index 0000000..14c397b --- /dev/null +++ b/test/vault/utils/jwt-utils/jwt.test.js @@ -0,0 +1,39 @@ +import jwt_decode from 'jwt-decode'; +import { isTokenValid, isExpired } from '../../../../src/utils/jwt-utils'; + +jest.mock('jwt-decode'); + +describe('isTokenValid Tests', () => { + const mockDecodedPayload = { sub: '12345', name: 'John Doe', exp: 1609459200 }; + + beforeEach(() => { + jwt_decode.mockReturnValue(mockDecodedPayload); + }); + + test('should return false for an invalid token', () => { + const isValid = isTokenValid("token"); + expect(isValid).toBe(false); + }); + + test('should return false for an empty token', () => { + const isValid = isTokenValid(""); + expect(isValid).toBe(false); + }); + + test('should return false in catch', () => { + jwt_decode.mockImplementation(() => { + throw new Error("Invalid Token"); + }); + const isValid = isTokenValid("TOKEN"); + expect(isValid).toBe(false); + }); + + test('should return false in catch for isExpired', () => { + jwt_decode.mockImplementation(() => { + throw new Error("Invalid Token"); + }); + const isValid = isExpired("TOKEN"); + expect(isValid).toBe(true); + }); +}); + diff --git a/test/vault/utils/utils.test.js b/test/vault/utils/utils.test.js new file mode 100644 index 0000000..a9ab6ea --- /dev/null +++ b/test/vault/utils/utils.test.js @@ -0,0 +1,505 @@ +import errorMessages from "../../../src/error/messages"; +import { Env, getConnectionBaseURL, getVaultURL, validateToken, isValidURL, fillUrlWithPathAndQueryParams, generateSDKMetrics, printLog, getToken, getBearerToken, MessageType, LogLevel } from "../../../src/utils"; +import jwt_decode from 'jwt-decode'; +import os from 'os'; +import { generateBearerTokenFromCreds, generateBearerToken } from '../../../src/service-account'; +import sdkDetails from '../../../package.json'; + +jest.mock('jwt-decode'); + +jest.mock('../../../src/service-account', () => ({ + generateBearerTokenFromCreds: jest.fn(), + generateBearerToken: jest.fn(), +})); + +describe('Vault URL Helper', () => { + const clusterId = "clusterId"; + const expectedUrls = { + [Env.DEV]: `https://${clusterId}.vault.skyflowapis.dev`, + [Env.STAGE]: `https://${clusterId}.vault.skyflowapis.tech`, + [Env.SANDBOX]: `https://${clusterId}.vault.skyflowapis-preview.com`, + [Env.PROD]: `https://${clusterId}.vault.skyflowapis.com`, + "INVALID": `https://${clusterId}.vault.skyflowapis.com` + }; + + const testCases = [ + { env: Env.DEV, expected: expectedUrls[Env.DEV], description: 'dev vault URL' }, + { env: Env.STAGE, expected: expectedUrls[Env.STAGE], description: 'stage vault URL' }, + { env: Env.SANDBOX, expected: expectedUrls[Env.SANDBOX], description: 'sandbox vault URL' }, + { env: Env.PROD, expected: expectedUrls[Env.PROD], description: 'prod vault URL' }, + { env: "INVALID", expected: expectedUrls["INVALID"], description: 'prod vault URL for invalid ENV' }, + ]; + + testCases.forEach(({ env, expected, description }) => { + test(`should return ${description}`, () => { + expect(getVaultURL(clusterId, env)).toBe(expected); + }); + }); +}); + +describe('Connection URL Helper', () => { + const connectionId = "connectionId"; + const expectedUrls = { + [Env.DEV]: `https://${connectionId}.gateway.skyflowapis.dev`, + [Env.STAGE]: `https://${connectionId}.gateway.skyflowapis.tech`, + [Env.SANDBOX]: `https://${connectionId}.gateway.skyflowapis-preview.com`, + [Env.PROD]: `https://${connectionId}.gateway.skyflowapis.com`, + "INVALID": `https://${connectionId}.gateway.skyflowapis.com` + }; + + const testCases = [ + { env: Env.DEV, expected: expectedUrls[Env.DEV], description: 'dev connection URL' }, + { env: Env.STAGE, expected: expectedUrls[Env.STAGE], description: 'stage connection URL' }, + { env: Env.SANDBOX, expected: expectedUrls[Env.SANDBOX], description: 'sandbox connection URL' }, + { env: Env.PROD, expected: expectedUrls[Env.PROD], description: 'prod connection URL' }, + { env: "INVALID", expected: expectedUrls["INVALID"], description: 'prod connection URL for invalid ENV' }, + ]; + + testCases.forEach(({ env, expected, description }) => { + test(`should return ${description}`, () => { + expect(getConnectionBaseURL(connectionId, env)).toBe(expected); + }); + }); +}); + +describe('Validate Token Helper', () => { + const mockPrevDecodedPayload = { sub: '12345', name: 'John Doe', exp: 1609459200 }; + const mockFutureDecodedPayload = { sub: '12345', name: 'John Doe', exp: 1918741979 }; + const mockDecodedPayload = { sub: '12345', name: 'John Doe'}; + + beforeEach(() => { + jest.clearAllMocks(); + jwt_decode.mockReturnValue(mockPrevDecodedPayload); + }); + + test('should throw an error for invalid token', () => { + expect(() => validateToken("connectionId")) + .toThrowError(new Error(errorMessages.TOKEN_EXPIRED)); + }); + + test('should throw an error for invalid token', () => { + jwt_decode.mockReturnValue(mockFutureDecodedPayload); + expect(validateToken("connectionId")) + .toBeTruthy(); + }); + + test('should throw an error for invalid token', () => { + jwt_decode.mockReturnValue(mockDecodedPayload); + expect(validateToken("connectionId")) + .toBeTruthy(); + }); + + test('should return error for a empty token', () => { + expect(() => validateToken("")).toThrowError(new Error(errorMessages.TOKEN_EXPIRED)); + }); +}); + +describe('isValidURL', () => { + + test('should return false for non-https URLs', () => { + const result = isValidURL('http://example.com'); + expect(result).toBe(false); + }); + + test('should return true for valid https URL', () => { + const result = isValidURL('https://example.com'); + expect(result).toBe(true); // Covers final return true + }); + + test('should return false for invalid URLs (catch block)', () => { + const result = isValidURL('https://invalid-url'); + expect(result).toBe(true); // Covers the catch block + }); + + test('should return false for an empty string', () => { + const result = isValidURL(''); + expect(result).toBe(false); + }); + + test('should return false for malformed URL strings (catch block)', () => { + const result = isValidURL('not-a-url'); + expect(result).toBe(false); // Covers the catch block + }); + + test('should return false for null or undefined', () => { + // Additional edge case for undefined/null inputs + expect(isValidURL(undefined)).toBe(false); // Covers the catch block + expect(isValidURL(null)).toBe(false); // Covers the catch block + }); +}); + +describe('fillUrlWithPathAndQueryParams', () => { + + test('should replace path parameters in the URL', () => { + const url = '/api/resource/{id}'; + const pathParams = { id: '123' }; + const result = fillUrlWithPathAndQueryParams(url, pathParams); + expect(result).toBe('/api/resource/123'); + }); + + test('should add query parameters to the URL', () => { + const url = '/api/resource'; + const queryParams = { search: 'test', page: '2' }; + const result = fillUrlWithPathAndQueryParams(url, undefined, queryParams); + expect(result).toBe('/api/resource?search=test&page=2'); + }); + + test('should replace path parameters and add query parameters', () => { + const url = '/api/resource/{id}'; + const pathParams = { id: '123' }; + const queryParams = { search: 'test', page: '2' }; + const result = fillUrlWithPathAndQueryParams(url, pathParams, queryParams); + expect(result).toBe('/api/resource/123?search=test&page=2'); + }); + + test('should return the original URL when no path or query parameters are provided', () => { + const url = '/api/resource'; + const result = fillUrlWithPathAndQueryParams(url); + expect(result).toBe('/api/resource'); + }); + + test('should handle multiple path parameters', () => { + const url = '/api/resource/{category}/{id}'; + const pathParams = { category: 'books', id: '456' }; + const result = fillUrlWithPathAndQueryParams(url, pathParams); + expect(result).toBe('/api/resource/{category}/456'); + }); + + test('should handle query parameters with special characters', () => { + const url = '/api/resource'; + const queryParams = { search: 'test value', filter: 'a&b' }; + const result = fillUrlWithPathAndQueryParams(url, undefined, queryParams); + expect(result).toBe('/api/resource?search=test value&filter=a&b'); + }); + + test('should correctly remove trailing "&" in query parameters', () => { + const url = '/api/resource'; + const queryParams = { search: 'test' }; + const result = fillUrlWithPathAndQueryParams(url, undefined, queryParams); + expect(result).toBe('/api/resource?search=test'); + }); +}); + +describe('generateSDKMetrics', () => { + const originalPlatform = process.platform; + const originalArch = process.arch; + const originalVersion = process.version; + + beforeEach(() => { + jest.clearAllMocks(); + // Mocking os functions + jest.spyOn(os, 'release').mockReturnValue('5.4.0'); + jest.spyOn(os, 'platform').mockReturnValue('linux'); + }); + + afterEach(() => { + // Restore the original values after each test + Object.defineProperty(process, 'platform', { value: originalPlatform, writable: true }); + Object.defineProperty(process, 'arch', { value: originalArch, writable: true }); + Object.defineProperty(process, 'version', { value: originalVersion, writable: true }); + }); + + test('should return correct SDK metrics when no errors are thrown', () => { + Object.defineProperty(process, 'platform', { value: 'linux', writable: true }); + Object.defineProperty(process, 'arch', { value: 'x64', writable: true }); + Object.defineProperty(process, 'version', { value: 'v14.15.0', writable: true }); + + const metrics = generateSDKMetrics(); + + expect(metrics).toEqual({ + sdk_name_version: `skyflow-node@${sdkDetails.version}`, + sdk_client_device_model: 'linux x64', + sdk_client_os_details: 'linux-5.4.0', + sdk_runtime_details: 'Node@v14.15.0', + }); + }); + + test('should handle error when sdkNameVersion cannot be generated', () => { + Object.defineProperty(process, 'platform', { value: 'linux', writable: true }); + Object.defineProperty(process, 'arch', { value: 'x64', writable: true }); + Object.defineProperty(process, 'version', { value: 'v14.15.0', writable: true }); + + const metrics = generateSDKMetrics(); + + expect(metrics.sdk_name_version).toBe(`skyflow-node@${sdkDetails.version}`); + }); + + test('should handle when clientDeviceModel cannot be generated', () => { + Object.defineProperty(process, 'platform', { value: undefined, writable: true }); // Simulate error in clientDeviceModel + Object.defineProperty(process, 'arch', { value: 'x64', writable: true }); + + const metrics = generateSDKMetrics(); + + expect(metrics.sdk_client_device_model).toBe(` x64`); + }); + + test('should handle error when clientOSDetails cannot be generated', () => { + jest.spyOn(os, 'release').mockImplementation(() => { throw new Error(); }); + + const metrics = generateSDKMetrics(); + + expect(metrics.sdk_client_os_details).toBe(''); + }); + + test('should handle error when runtimeDetails cannot be generated', () => { + Object.defineProperty(process, 'version', { value: undefined, writable: true }); // Simulate error in runtimeDetails + + const metrics = generateSDKMetrics(); + + expect(metrics.sdk_runtime_details).toBe(''); + }); +}); + +describe('generateSDKMetrics With errors', () => { + const logLevel = 'INFO'; + + beforeEach(() => { + jest.mock('../../../package.json', () => ({ + name: 'mock-sdk', // Default mock values for the rest of the tests + version: '1.0.0', + })); + jest.clearAllMocks(); + }); + + test('should log error and set runtimeDetails to empty if accessing process.version throws an error', () => { + // Mock process.version to throw an error + const originalProcessVersion = process.version; + Object.defineProperty(process, 'version', { + get: () => { + throw new Error('mock error'); + } + }); + + const metrics = generateSDKMetrics(logLevel); + + expect(metrics.sdk_runtime_details).toBe(""); // Check that runtimeDetails is set to an empty string + }); + + test('should log error and set clientDeviceModel to empty if accessing process.platform or process.arch throws an error', () => { + // Save original process.platform and process.arch + const originalPlatform = process.platform; + const originalArch = process.arch; + + // Override process.platform and process.arch to throw an error + Object.defineProperty(process, 'platform', { + get: () => { + throw new Error('mock error'); + } + }); + Object.defineProperty(process, 'arch', { + get: () => { + throw new Error('mock error'); + } + }); + + const metrics = generateSDKMetrics(logLevel); + + // Ensure clientDeviceModel is set to an empty string + expect(metrics.sdk_client_device_model).toBe(""); + + // Restore original process.platform and process.arch + Object.defineProperty(process, 'platform', { value: originalPlatform }); + Object.defineProperty(process, 'arch', { value: originalArch }); + }); + + test('should log error and set sdkNameVersion to empty if accessing sdkDetails throws an error', () => { + // Override the sdkDetails module to throw an error + jest.resetModules(); + Object.defineProperty(sdkDetails, 'name', { + get: () => { throw new Error('mock error'); } + }); + + const metrics = generateSDKMetrics(logLevel); + + // Ensure sdkNameVersion is set to an empty string + expect(metrics.sdk_name_version).toBe(""); + }); +}); + +describe('printLog', () => { + beforeEach(() => { + jest.clearAllMocks(); + jest.resetModules(); // Reset modules to avoid state leaks + global.console = { + log: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; // Mock console methods + }); + + test('should log DEBUG messages when level is DEBUG', () => { + printLog('This is a debug message', MessageType.LOG, LogLevel.DEBUG); + expect(console.log).toHaveBeenCalledWith(`DEBUG: [Skyflow Node SDK v${sdkDetails.version}] This is a debug message`); + }); + + test('should log INFO messages when level is DEBUG', () => { + printLog('This is an info message', MessageType.LOG, LogLevel.DEBUG); + expect(console.log).toHaveBeenCalledWith(`DEBUG: [Skyflow Node SDK v${sdkDetails.version}] This is an info message`); + }); + + test('should log WARN messages when level is DEBUG', () => { + printLog('This is a warning message', MessageType.WARN, LogLevel.DEBUG); + expect(console.warn).toHaveBeenCalledWith(`WARN: [Skyflow Node SDK v${sdkDetails.version}] This is a warning message`); + }); + + test('should log ERROR messages when level is DEBUG', () => { + printLog('This is an error message', MessageType.ERROR, LogLevel.DEBUG); + expect(console.error).toHaveBeenCalledWith(`ERROR: [Skyflow Node SDK v${sdkDetails.version}] This is an error message`); + }); + + test('should log INFO messages when level is INFO', () => { + printLog('This is an info message', MessageType.LOG, LogLevel.INFO); + expect(console.log).toHaveBeenCalledWith(`INFO: [Skyflow Node SDK v${sdkDetails.version}] This is an info message`); + }); + + test('should log WARN messages when level is INFO', () => { + printLog('This is a warning message', MessageType.WARN, LogLevel.INFO); + expect(console.warn).toHaveBeenCalledWith(`WARN: [Skyflow Node SDK v${sdkDetails.version}] This is a warning message`); + }); + + test('should log ERROR messages when level is INFO', () => { + printLog('This is an error message', MessageType.ERROR, LogLevel.INFO); + expect(console.error).toHaveBeenCalledWith(`ERROR: [Skyflow Node SDK v${sdkDetails.version}] This is an error message`); + }); + + test('should log WARN messages when level is WARN', () => { + printLog('This is a warning message', MessageType.WARN, LogLevel.WARN); + expect(console.warn).toHaveBeenCalledWith(`WARN: [Skyflow Node SDK v${sdkDetails.version}] This is a warning message`); + }); + + test('should log ERROR messages when level is WARN', () => { + printLog('This is an error message', MessageType.ERROR, LogLevel.WARN); + expect(console.error).toHaveBeenCalledWith(`ERROR: [Skyflow Node SDK v${sdkDetails.version}] This is an error message`); + }); + + test('should log ERROR messages when level is ERROR', () => { + printLog('This is an error message', MessageType.ERROR, LogLevel.ERROR); + expect(console.error).toHaveBeenCalledWith(`ERROR: [Skyflow Node SDK v${sdkDetails.version}] This is an error message`); + }); + + test('should not log anything when level is OFF', () => { + printLog('This message should not appear', MessageType.LOG, LogLevel.OFF); + expect(console.log).not.toHaveBeenCalled(); + expect(console.warn).not.toHaveBeenCalled(); + expect(console.error).not.toHaveBeenCalled(); + }); +}); + +describe('getToken', () => { + const logLevel = LogLevel.INFO; + + test('should generate token from credentialsString', async () => { + const credentials = { + credentialsString: 'someCredentials', + roles: ['role1', 'role2'], + context: 'someContext' + }; + const mockToken = { accessToken: 'token123' }; + + generateBearerTokenFromCreds.mockResolvedValue(mockToken); + console.log(getToken) + const result = await getToken(credentials, logLevel); + + expect(result).toEqual(mockToken); + expect(generateBearerTokenFromCreds).toHaveBeenCalledWith('someCredentials', { + roleIDs: credentials.roles, + ctx: credentials.context, + logLevel, + }); + }); + + test('should generate token from path', async () => { + const credentials = { + path: '/some/path', + roles: ['role1'], + context: 'anotherContext' + }; + const mockToken = { accessToken: 'token456' }; + + generateBearerToken.mockResolvedValue(mockToken); + + const result = await getToken(credentials, logLevel); + + expect(result).toEqual(mockToken); + expect(generateBearerToken).toHaveBeenCalledWith('/some/path', { + roleIDs: credentials.roles, + ctx: credentials.context, + logLevel, + }); + }); + +}); + +describe('getBearerToken', () => { + const logLevel = LogLevel.INFO; + + beforeEach(() => { + jest.clearAllMocks(); + process.env.SKYFLOW_CREDENTIALS = undefined; // Reset environment variable before each test + }); + + test('should use environment variable if no credentials passed but environment variable exists', async () => { + try { + process.env.SKYFLOW_CREDENTIALS = 'someEnvCredentials'; + const mockToken = { accessToken: 'token456' }; + const getToken = jest.fn(); + getToken.mockResolvedValue(mockToken); + + const result = await getBearerToken(undefined, logLevel); + + expect(getToken).toHaveBeenCalledWith({ + credentialsString: 'someEnvCredentials' + }, logLevel); + expect(result).toEqual({ type: AuthType.TOKEN, key: mockToken.accessToken }); + } catch (err) { + expect(err).toBeDefined(); + } + }); + + test('should return API key immediately if apiKey is provided in credentials', async () => { + try { + const credentials = { apiKey: 'someApiKey' }; + + const result = await getBearerToken(credentials, logLevel); + + expect(result).toEqual({ type: AuthType.API_KEY, key: 'someApiKey' }); + expect(getToken).not.toHaveBeenCalled(); + } catch (err) { + expect(err).toBeDefined(); + } + }); + + test('should return token immediately after validating token if token is provided', async () => { + try { + const credentials = { token: 'someToken' }; + validateToken.mockReturnValue('validatedToken'); + + const result = await getBearerToken(credentials, logLevel); + + expect(validateToken).toHaveBeenCalledWith('someToken'); + expect(result).toEqual({ type: AuthType.TOKEN, key: 'validatedToken' }); + expect(getToken).not.toHaveBeenCalled(); + } catch (err) { + expect(err).toBeDefined(); + } + }); + + test('should generate token if valid credentials are provided for token generation', async () => { + try { + const credentials = { credentialsString: 'someCreds' }; + const mockToken = { accessToken: 'generatedToken' }; + const getToken = jest.fn(); + getToken.mockResolvedValue(mockToken); + + const result = await getBearerToken(credentials, logLevel); + + expect(printLog).toHaveBeenCalledWith(logs.infoLogs.BEARER_TOKEN_LISTENER, 'LOG', logLevel); + expect(getToken).toHaveBeenCalledWith(credentials, logLevel); + expect(result).toEqual({ type: AuthType.TOKEN, key: mockToken.accessToken }); + } catch (err) { + expect(err).toBeDefined(); + } + }); + +}); + diff --git a/tsconfig.json b/tsconfig.json index ec55ea3..fe5799a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "sourceMap": true, "noImplicitAny": false, "target": "es6", - "lib": ["es2015", "es2017", "dom", "ES2020.Promise","es2018"], + "lib": ["es2015", "es2017", "dom"], "esModuleInterop": true, "module": "commonjs", "removeComments": true, @@ -19,6 +19,6 @@ "outDir": "lib", "types": ["node"] }, - "include": ["src","typings.d.ts"], - "exclude": ["node_modules", "dist", "tests/*.test.*"], + "include": ["src/**/*.ts","typings.d.ts"], + "exclude": ["node_modules", "dist", "tests/**/*.test.*"], }